WTF Bites


  • Considered Harmful

    @Gustav said in WTF Bites:

    @error why wouldn't it? It's all going through FS cache first anyway, it's not like it puts any extra wear on the hardware.

    If you ignore existence of recompilation watchers, it makes perfect sense.

    For starters, it's fucking annoying that I get compilation errors for lines that will be valid once I finish typing them.



  • @error said in WTF Bites:

    I mean, why is it saving after each character I type?

    Your Electron-based editor is just trying to make sure it doesn't accidentally forget about some of the characters. Besides, it needs the RAM to keep track of all the JS garbage that it has to deal with.



  • @Gustav said in WTF Bites:

    connecting a cable to my desktop's only USB-C port causes immediate reboot.

    This issue is very old 🍹

    https://youtu.be/Wpj1SgQQ984



  • Yo dawg, we herd C++ didn't have proper reflection, so we made C++ badly "parse" C++ while it parsed C++.

    https://twitter.com/krisjusiak/status/1615086312767516672:
    53965156-8b8e-4cf7-a80b-d5d752903505-image.png

    #embed is neat, though.


  • Discourse touched me in a no-no place

    @Gustav said in WTF Bites:

    Speaking of @Tsaukpaetra, yesterday I discovered connecting a cable to my desktop's only USB-C port causes immediate reboot. Repro rate 2 out of 2.

    You sure you didn't plug it in upside down?


  • Banned

    @loopback0 lemme tr


  • Discourse touched me in a no-no place

    @Gustav said in WTF Bites:

    @loopback0 lemme tr

    No rush, you can finish typing first


  • Considered Harmful

    @loopback0 said in WTF Bites:

    @Gustav said in WTF Bites:

    @loopback0 lemme tr

    No rush, you can finish typing first

    Nope, it must save after every keystroke.


  • Considered Harmful

    @Gustav said in WTF Bites:

    Speaking of @Tsaukpaetra, yesterday I discovered connecting a cable to my desktop's only USB-C port causes immediate reboot. Repro rate 2 out of 2.

    Seems it's not as universal-serial as it claims! Whenever I plug an RS232-C into a USB-C jack, the stupid machine won't even boot any more 🤷



  • @loopback0 said in WTF Bites:

    You sure you didn't plug it in upside down?

    I'm pretty sure I have seen a USB C cable where the orientation matters. This was a bit of a WTF, so it led to some Googling, which in turn led to this.


  • Considered Harmful

    @error Anything like truss you can throw around the editor?


  • Considered Harmful

    @Gribnit said in WTF Bites:

    @error Anything like truss you can throw around the editor?

    I was able to disable the Auto Save feature, though I still don't know how it got turned on (QooC is :arrows:) or why anyone would want that.



  • @error said in WTF Bites:

    or why anyone would want that.

    Could be useful to people who are stuck with @Tsaukpaetra‐hardware.


  • Considered Harmful

    @error said in WTF Bites:

    why anyone would want that.

    Handy with a sequence-knock to a command console, for instance for activating the perimeter defenses and intrusion countermeasures without leaving the code. In a comment, of course. And not hooked to the compiler. At least make that wait until no braces are open.

    IntelliJ works like this but less stupid, and it's missing the hidden command console.


  • BINNED

    @cvi said in WTF Bites:

    Yo dawg, we herd C++ didn't have proper reflection, so we made C++ badly "parse" C++ while it parsed C++.

    https://twitter.com/krisjusiak/status/1615086312767516672:
    53965156-8b8e-4cf7-a80b-d5d752903505-image.png

    #embed is neat, though.

    At this point, writing in brainfuck would surely be easier, no?

    They probably heard that compile times are supposed to get better with modules, then asked themselves how they can bring it up again.



  • @error said in WTF Bites:

    or why anyone would want that.

    Would have been nice in the Win9x days, since the machine crashed so often 🤷♂



  • @cvi said in WTF Bites:

    @loopback0 said in WTF Bites:

    You sure you didn't plug it in upside down?

    I'm pretty sure I have seen a USB C cable where the orientation matters. This was a bit of a WTF, so it led to some Googling, which in turn led to this.

    :wtf_owl::trwtf:⁉

    If the two symmetrically opposite pads were connected both in the socket and in the plug, it would lead to a resilient connector that would still work if either of them had poor contact. But this suggests they are only connected in the socket while in the plug usually only one is connect and the other is dummy. Why the mighty flying fuck‽


  • Notification Spam Recipient

    @error said in WTF Bites:

    @Gustav said in WTF Bites:

    @error why wouldn't it? It's all going through FS cache first anyway, it's not like it puts any extra wear on the hardware.

    If you ignore existence of recompilation watchers, it makes perfect sense.

    For starters, it's fucking annoying that I get compilation errors for lines that will be valid once I finish typing them.

    Ah, you're not used to this, it's a known problem since Visual Studio started unintellisensing.



  • @Tsaukpaetra Debillisense is a different thing – or at least that's how I understood it.

    Debillisense is OK if it's fast enough. You are typing, it has a squiggly red underline indicating it's not complete yet, when you complete it, the squiggly line slithers away indicating it's now complete and you can move your attention focus to the next thing. It becomes a bit annoying when it gets slower so the squiggly line appears after you already finished and takes a couple more seconds to realize it shouldn't have bothered appearing.

    But that's debillisense. It only parses the current file and undersquiggles errors and warnings and does not actually rebuild and reload anything. Rebuilding and reloading the browser with partially written files is something else. It is δ-ε-mented.


  • Discourse touched me in a no-no place

    @Bulb Sounds like the language server is running slow.



  • @Gustav said in WTF Bites:

    @error why wouldn't it? It's all going through FS cache first anyway, it's not like it puts any extra wear on the hardware.

    The FS cache typically has fairly short (a few seconds max) write-back timeouts, so it does put a bit of extra wear on the hardware.

    If you ignore existence of recompilation watchers, it makes perfect sense.

    But you can't ignore the existence of recompilation watchers, or rather of other things that may be reading the file in general. There are many cases where you don't want to write the file until you are done with the change.

    The better way is to create a recovery file and write the current state there, but only write the edited file on request. ViM mmaps that file, which means even if it crashes, the kernel will still write out the very last state, but many editors (including Word) have recovery files with varying granularity.


  • BINNED

    @Bulb said in WTF Bites:

    If you ignore existence of recompilation watchers, it makes perfect sense.

    But you can't ignore the existence of recompilation watchers, or rather of other things that may be reading the file in general.

    Am I the only one who doesn't care about file system watchers and simply doesn't want the file to be written unless I save it out of principle? This is not a phone. Save a auto-restore file if you have to.

    The other day I was editing a presentation in LibreOffice (:arrows:) and realized that when I messed something up in embedded diagrams etc. the undo function doesn't always seem to work. It appears to have multiple state-dependent undo stacks for embedded stuff, or something, who knows. It was easier to just reload the file from the previous save state then to manually undo the damage I'd done.



  • @topspin said in WTF Bites:

    Am I the only one who doesn't care about file system watchers and simply doesn't want the file to be written unless I save it out of principle?

    No.

    @Bulb said in WTF Bites:

    There are many cases where you don't want to write the file until you are done with the change.

    … which includes the case that you simply don't want to.


  • Banned

    @Bulb said in WTF Bites:

    But you can't ignore the existence of recompilation watchers

    :thats_the_joke:


  • BINNED

    @Bulb reading (to the end) is hard. 🍹


  • I survived the hour long Uno hand

    @topspin said in WTF Bites:

    @Bulb reading (to the end) is hard. 🍹

    After all, someone might :hanzo: me and steal all my Internet pointzzzzz if I don’t respond to your frist sentence right now!



  • One of the supermarket chains around here seems to have updated their self-checkout PoS software. There seem to have been some cosmetic changes (which mostly only matter if you try to buy stuff like bread rolls or fruits that have no bar code).

    And ...

    And, well, they made the system significantly worse. Before (as with most self-checkout things), you'd wave your item at the scanner, until it made some sort noise and added the item to the list of stuff on screen. The things were never exactly fast -- in general, the better systems are OK, and the worse ones are laggy, but typically at least semi-tolerable.

    The new system is special, though. It's asynchronous to some degree. You wave your item at the bar code scanner. If you listen very very carefully, it will make a subtle and sad "meep" sound. It's kinda easy to miss. Much later, the main unit realizes that something has happened, emits another, louder "boop" sound, and then slowly redraws the screen. (I'm not sure how you can make an UI redraw this slowly, even the e-ink screen redrawing on my decade old e-reader is faster and more subtle.)

    The time between the subtle "meep" and the main system doing anything is sufficient to grab a new item, and scan it as well. I'm pretty sure you can even queue up multiple items -- in fact, the delay between the scanner "scannering" a bar code and meeping at you to the main system realizing something is going on is sufficient to scan the initial item twice. So, if you miss the first meep and continue waving the item at the bar code scanner, you'll likely be greeted with two of the item showing up in the list ... about half an eternity later. (To add to the annoyance, removing an item requires getting an attendant, because, while I'm perfectly trusted to scan (or, I guess, not-scan) items, trying to remove an item is suddenly suspicious.)


  • BINNED

    I was just trying to compile an example project that comes with my Qt install, using the Qt Creator IDE. The project uses CMake, which the Qt install ships along, and I have VS 2019 installed to use as the C++ compiler. Just trying to configure the project, before it even gets to compiling, I get this amazing failure of an output (user paths anonymized):

    Executing C:\Qt\Tools\CMake_64\bin\cmake.exe -S //path/to/test/project/TEST -B //path/to/test/project/TEST-Desktop_Qt_6_4_1_MSVC2019_64bit-Debug "-DCMAKE_BUILD_TYPE:STRING=Debug" "-DQT_QMAKE_EXECUTABLE:FILEPATH=C:/Qt/6.4.1/msvc2019_64/bin/qmake.exe" "-DCMAKE_PREFIX_PATH:PATH=C:/Qt/6.4.1/msvc2019_64" "-DCMAKE_C_COMPILER:FILEPATH=C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.29.30133/bin/HostX64/x64/cl.exe" "-DCMAKE_CXX_COMPILER:FILEPATH=C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.29.30133/bin/HostX64/x64/cl.exe" "-DCMAKE_CXX_FLAGS_INIT:STRING=-DQT_QML_DEBUG" "-DCMAKE_GENERATOR:STRING=Ninja" in "\\path\to\test\project\build-TEST-Desktop_Qt_6_4_1_MSVC2019_64bit-Debug".
    -- The CXX compiler identification is MSVC 19.29.30147.0
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - failed
    -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.29.30133/bin/HostX64/x64/cl.exe
    -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.29.30133/bin/HostX64/x64/cl.exe - broken
    CMake Error at C:/Qt/Tools/CMake_64/share/cmake-3.24/Modules/CMakeTestCXXCompiler.cmake:62 (message):
      The C++ compiler
    
        "C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.29.30133/bin/HostX64/x64/cl.exe"
    
      is not able to compile a simple test program.
    
      It fails with the following output:
    
        Change Dir: //path/to/test/project/build-TEST-Desktop_Qt_6_4_1_MSVC2019_64bit-Debug/CMakeFiles/CMakeTmp
        
        Run Build Command(s):C:/PROGRA~2/MIB055~1/2019/PR6BCE~1/Common7/IDE/CO3FF2~1/MIE74D~1/CMake/Ninja/ninja.exe cmTC_dfe61 && [1/2] Building CXX object CMakeFiles\cmTC_dfe61.dir\testCXXCompiler.cxx.obj
        [2/2] Linking CXX executable cmTC_dfe61.exe
        FAILED: cmTC_dfe61.exe 
        cmd.exe /C "cd . && C:\Qt\Tools\CMake_64\bin\cmake.exe -E vs_link_exe --intdir=CMakeFiles\cmTC_dfe61.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\107D2B~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\107D2B~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MIB055~1\2019\PR6BCE~1\VC\Tools\MSVC\14226C~1.301\bin\Hostx64\x64\link.exe /nologo CMakeFiles\cmTC_dfe61.dir\testCXXCompiler.cxx.obj  /out:cmTC_dfe61.exe /implib:cmTC_dfe61.lib /pdb:cmTC_dfe61.pdb /version:0.0 /machine:x64  /debug /INCREMENTAL /subsystem:console  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
        '\\path\to\test\project\build-TEST-Desktop_Qt_6_4_1_MSVC2019_64bit-Debug\CMakeFiles\CMakeTmp'
        CMD.EXE was started with the above path as the current directory.
        UNC paths are not supported.  Defaulting to Windows directory.
        ninja: build stopped: subcommand failed.
    

    Count the WTFs. I got a few, but I'm sure there's more.

    • In %CURRENT_YEAR%, Windows still has short file names enabled somehow. As far as I know, you can disable them completely, but how did they end up getting used here, anyway? Probably some bullshit about unix-originating programs and LONG LIST OF PROGRAMS THAT CAN'T HANDLE SPACES IN PATHS :arrows:, or something.
    • Why is the short name of "C:\Program Files (x86)\Microsoft Visual Studio" "C:\PROGRA~2\MIB055~1", anyway?
    • Why does it need to run commands through cmd.exe instead of executing them directly? And what the heck is cd . supposed to accomplish?
    • UNC paths are a Windows invention and have been around since, what, the dawn of NT? Why the absolute fuck does cmd.exe not support them?!

    Fuck!



  • @topspin said in WTF Bites:

    Qt

    @topspin said in WTF Bites:

    CMake

    @topspin said in WTF Bites:

    VS

    Look, if you go out of your way to hurt yourself, you don't get to complain about getting hurt. 🚎


  • BINNED

    @Zerosquare do you propose I use JavaScript instead and run it through 86 layers of "compilers"?

    (Also, yes, I hate CMake.)



  • @topspin said in WTF Bites:

    86 layers of "compilers"

    No, no. They're transpilers, not compilers. Definitely not the same thing, they have a whole range of new and exciting problems!


  • Discourse touched me in a no-no place

    @Zerosquare said in WTF Bites:

    they have a whole range of new and exciting problems!

    The main one is that you still have Javascript afterwards.



  • @topspin said in WTF Bites:

    Windows

    e3246558-378e-4078-91dc-cbdfd6b9b4ab-image.png



  • @cvi said in WTF Bites:

    he screen. (I'm not sure how you can make an UI redraw this slowly

    Javascript.


  • Notification Spam Recipient

    @topspin said in WTF Bites:

    the undo function doesn't always seem to work.

    To be fair, I think it's replicating Excel in that regard.


  • Notification Spam Recipient

    @cvi said in WTF Bites:

    and then slowly redraws the screen. (I'm not sure how you can make an UI redraw this slowly, even the e-ink screen redrawing on my decade old e-reader is faster and more subtle.)

    I should record the self-serve kiosks here at $workplace. There's always several seconds lag between touch and reaction, but at least inputs seem to be buffered so I can get away with stored touches and checkout so long as I use an accurate dead-reckoning model it usually works out Ok.

    Because, you know, it's hard to process an arrow key incrementing a numeric spinbox...



  • Bonus wtf for the day. Attempting to compile the rust compiler:

    thread 'rustc' panicked at 'Span must not be empty and have no suggestion', /rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6/compiler/rustc_errors/src/diagnostic.rs:570:9

    <snip long back trace />

    error: internal compiler error: unexpected panic

    note: the compiler unexpectedly panicked. this is a bug.

    (But it's not a segfault, so all is good. :tro-pop:)


  • Notification Spam Recipient

    @topspin said in WTF Bites:

    Why the absolute fuck does cmd.exe not support them?!

    Because legacy. Everything in CMD world needs to be done with a drive letter and existing current directory.


  • Discourse touched me in a no-no place

    @cvi said in WTF Bites:

    (But it's not a segfault, so all is good. :tro-pop:)

    It's not a truly mysterious fault until you get an internal crash in LLVM (or GCC for that matter) that corresponds to absolutely nothing that you supplied as an input. The wrong thing reported against the wrong function by the wrong code, and your only clue is that the previous commit on that branch worked and the delta between the two is really small.



  • @topspin said in WTF Bites:

    Why is the short name of "C:\Program Files (x86)\Microsoft Visual Studio" "C:\PROGRA~2\MIB055~1", anyway?

    After a certain number of collisions (MICROS~5, IIRC), Windows switches to using the first two letters and a 4-character hash to avoid pathological behavior.

    @topspin said in WTF Bites:

    Why does it need to run commands through cmd.exe instead of executing them directly?

    CMake probably wants to support people doing Weird Shell Things, like these or this:

    SET /H
    Two new switches have been added to the SET command:
    
        SET /A expression
        SET /P variable=[promptString]
    
    The /A switch specifies that the string to the right of the equal sign
    is a numerical expression that is evaluated.  The expression evaluator
    is pretty simple and supports the following operations, in decreasing
    order of precedence:
    
        ()                  - grouping
        ! ~ -               - unary operators
        * / %               - arithmetic operators
        + -                 - arithmetic operators
        << >>               - logical shift
        &                   - bitwise and
        ^                   - bitwise exclusive or
        |                   - bitwise or
        = *= /= %= += -=    - assignment
        &= ^= |= <<= >>=
        ,                   - expression separator
    
    If you use any of the logical or modulus operators, you will need to
    enclose the expression string in quotes.  Any non-numeric strings in the
    expression are treated as environment variable names whose values are
    converted to numbers before using them.  If an environment variable name
    is specified but is not defined in the current environment, then a value
    of zero is used.  This allows you to do arithmetic with environment
    variable values without having to type all those % signs to get their
    values.  If SET /A is executed from the command line outside of a
    command script, then it displays the final value of the expression.  The
    assignment operator requires an environment variable name to the left of
    the assignment operator.  Numeric values are decimal numbers, unless
    prefixed by 0x for hexadecimal numbers, and 0 for octal numbers.
    So 0x12 is the same as 18 is the same as 022. Please note that the octal
    notation can be confusing: 08 and 09 are not valid numbers because 8 and
    9 are not valid octal digits.
    
    The /P switch allows you to set the value of a variable to a line of input
    entered by the user.  Displays the specified promptString before reading
    the line of input.  The promptString can be empty.
    
    Environment variable substitution has been enhanced as follows:
    
        %PATH:str1=str2%
    
    would expand the PATH environment variable, substituting each occurrence
    of "str1" in the expanded result with "str2".  "str2" can be the empty
    string to effectively delete all occurrences of "str1" from the expanded
    output.  "str1" can begin with an asterisk, in which case it will match
    everything from the beginning of the expanded output to the first
    occurrence of the remaining portion of str1.
    
    May also specify substrings for an expansion.
    
        %PATH:~10,5%
    
    would expand the PATH environment variable, and then use only the 5
    characters that begin at the 11th (offset 10) character of the expanded
    result.  If the length is not specified, then it defaults to the
    remainder of the variable value.  If either number (offset or length) is
    negative, then the number used is the length of the environment variable
    value added to the offset or length specified.
    
        %PATH:~-10%
    
    would extract the last 10 characters of the PATH variable.
    
        %PATH:~0,-2%
    
    would extract all but the last 2 characters of the PATH variable.
    
    Finally, support for delayed environment variable expansion has been
    added.  This support is always disabled by default, but may be
    enabled/disabled via the /V command line switch to CMD.EXE.  See CMD /?
    
    Delayed environment variable expansion is useful for getting around
    the limitations of the current expansion which happens when a line
    of text is read, not when it is executed.  The following example
    demonstrates the problem with immediate variable expansion:
    
        set VAR=before
        if "%VAR%" == "before" (
            set VAR=after
            if "%VAR%" == "after" @echo If you see this, it worked
        )
    
    would never display the message, since the %VAR% in BOTH IF statements
    is substituted when the first IF statement is read, since it logically
    includes the body of the IF, which is a compound statement.  So the
    IF inside the compound statement is really comparing "before" with
    "after" which will never be equal.  Similarly, the following example
    will not work as expected:
    
        set LIST=
        for %i in (*) do set LIST=%LIST% %i
        echo %LIST%
    
    in that it will NOT build up a list of files in the current directory,
    but instead will just set the LIST variable to the last file found.
    Again, this is because the %LIST% is expanded just once when the
    FOR statement is read, and at that time the LIST variable is empty.
    So the actual FOR loop we are executing is:
    
        for %i in (*) do set LIST= %i
    
    which just keeps setting LIST to the last file found.
    
    Delayed environment variable expansion allows you to use a different
    character (the exclamation mark) to expand environment variables at
    execution time.  If delayed variable expansion is enabled, the above
    examples could be written as follows to work as intended:
    
        set VAR=before
        if "%VAR%" == "before" (
            set VAR=after
            if "!VAR!" == "after" @echo If you see this, it worked
        )
    
        set LIST=
        for %i in (*) do set LIST=!LIST! %i
        echo %LIST%
    
    If Command Extensions are enabled, then there are several dynamic
    environment variables that can be expanded but which don't show up in
    the list of variables displayed by SET.  These variable values are
    computed dynamically each time the value of the variable is expanded.
    If the user explicitly defines a variable with one of these names, then
    that definition will override the dynamic one described below:
    
    %CD% - expands to the current directory string.
    
    %DATE% - expands to current date using same format as DATE command.
    
    %TIME% - expands to current time using same format as TIME command.
    
    %RANDOM% - expands to a random decimal number between 0 and 32767.
    
    %ERRORLEVEL% - expands to the current ERRORLEVEL value
    
    %CMDEXTVERSION% - expands to the current Command Processor Extensions
        version number.
    
    %CMDCMDLINE% - expands to the original command line that invoked the
        Command Processor.
    
    %HIGHESTNUMANODENUMBER% - expands to the highest NUMA node number
        on this machine.
    

    @topspin said in WTF Bites:

    And what the heck is cd . supposed to accomplish?

    :attack_helicopter_shrugging:

    @topspin said in WTF Bites:

    since, what, the dawn of NT?

    Microsoft LAN Manager for OS/2 in 1987, and its DOS client.

    @topspin said in WTF Bites:

    Why the absolute fuck does cmd.exe not support them?!

    Compatibility with batch files and applications that don't support them. Batch files and applications that might get confused by there being no drive letter in %CD%. Batch files and applications that don't know they can't meaningfully change the first two particles of that path, since they're a hostname and sharename and not directory names. Batch files and applications that may not even know that current directories exist (1983 called) which is why if you don't put a slash after X: it assumes you mean "relative to the current directory on drive X", which is actually stored in a hidden X: environment variable.

    @topspin said in WTF Bites:

    Fuck!

    SUBST and NET USE are your reluctant, easily-abused friends.


  • Considered Harmful

    I think I need to have a chat with a developer about Enumerating Badness.

    7fbbcfea-276b-41fe-9852-360931b7cf4d-image.png


  • BINNED

    @TwelveBaud said in WTF Bites:

    @topspin said in WTF Bites:

    Why the absolute fuck does cmd.exe not support them?!

    Compatibility with batch files and applications that don't support them. Batch files and applications that might get confused by there being no drive letter in %CD%. Batch files and applications that don't know they can't meaningfully change the first two particles of that path, since they're a hostname and sharename and not directory names. Batch files and applications that may not even know that current directories exist (1983 called) which is why if you don't put a slash after X: it assumes you mean "relative to the current directory on drive X", which is actually stored in a hidden X: environment variable.

    Why would that imply cmd.exe doesn't support them, just because there's applications/batch files which don't? By that same logic, cmd.exe shouldn't support directories either. And Windows shouldn't support UNC paths at all.

    @topspin said in WTF Bites:

    Fuck!

    SUBST and NET USE are your reluctant, easily-abused friends.

    Yeah, I used those back when I was running actual fucking DOS, last century. :rolleyes:



  • @cvi said in WTF Bites:

    Attempting to compile the rust compiler

    Both :there's_your_problem: and :why_would_you_do_that: seem appropriate here.



  • @HardwareGeek It's not by choice, if that's what you're asking.



  • @topspin said in WTF Bites:

    • In %CURRENT_YEAR%, Windows still has short file names enabled somehow. As far as I know, you can disable them completely, but how did they end up getting used here, anyway? Probably some bullshit about unix-originating programs and LONG LIST OF PROGRAMS THAT CAN'T HANDLE SPACES IN PATHS :arrows:, or something.

    Includes Make, which makes existence of short paths a huge blessing for a lot of development tools CMake has good reasons to support. Also a lot of tools tend to run into path or argument length limits and short file names are, well, shorter.

    • Why is the short name of "C:\Program Files (x86)\Microsoft Visual Studio" "C:\PROGRA~2\MIB055~1", anyway?

    At some point if there is many directories sharing the first 6 characters it starts making up semi-random strings instead. Whatever.

    • Why does it need to run commands through cmd.exe instead of executing them directly? And what the heck is cd . supposed to accomplish?
    • cmd.exe: To support environment variables and complex commands. Which it is with the cd . && prefix.
    • cd .: I think it is a unixism that resolves symlinks in the path—path resolution is a huge mess and the way out CMake chose is to convert all of them to canonical absolute ones.
    • UNC paths are a Windows invention and have been around since, what, the dawn of NT? Why the absolute fuck does cmd.exe not support them?!

    I guess because Microsoft came up with that Powershell abomination and stopped developing it.

    … since these days Visual Studio installs Git by default, and Git still depends on Bash, every Windows workstation used for development has Bash available these days. I haven't worked with CMake for a while though so I don't remember how to persuade it to use it instead of cmd.exe, or whether it will generate the correct form of the commands then.

    :wtf: are you developing on a UNC path anyway?

    … and of course there is always the option to map a drive letter to the build path with subst. Did it in the past to get around some particularly short path limits (i.e. had to map drive to the root of the checkout, otherwise it'd never build).


  • Notification Spam Recipient

    @Bulb said in WTF Bites:

    (i.e. had to map drive to the root of the checkout, otherwise it'd never build).

    Yeah, this is done with Hypatia builds as well, because Unreal Engine.

    Supposedly it is better in newer versions, but I doubt it.


  • BINNED

    @Bulb said in WTF Bites:

    :wtf: are you developing on a UNC path anyway?

    … and of course there is always the option to map a drive letter to the build path with subst. Did it in the past to get around some particularly short path limits (i.e. had to map drive to the root of the checkout, otherwise it'd never build).

    Network mounts.
    In fact, it is already mounted to a drive letter and I never specified any UNC paths manually. Something in there tried very hard to resolve that to the original path, and in the process created something it can’t actually deal with. :rolleyes:


  • Considered Harmful

    @dkf said in WTF Bites:

    @Zerosquare said in WTF Bites:

    they have a whole range of new and exciting problems!

    The main one is that you still have Javascript afterwards.

    But absolutely lint-free, except for any left over.


  • Considered Harmful

    @error but you'll need to kill them first, and then how will they hear you?



  • @topspin said in WTF Bites:

    • UNC paths are a Windows invention and have been around since, what, the dawn of NT? Why the absolute fuck does cmd.exe not support them?!

    Worse, I think it's Windows itself not supporting a thing here.
    Namely, not merely a UNC path, but a UNC path as "current directory".

    ...Or, Windows supports it but cmd.exe does not for one specific reason: For compatibility, cmd.exe is required to support multiple current directories, namely one per drive letter. So if you give it a "current directory" without a drive letter, it chokes.

    Or more exactly, it chokes if you try to cd an UNC path. But if you use pushd instead, it will "map network drive" to the highest letter available and unmap when you popd.


Log in to reply