5 ms·
This sounds like the kind of thing where Raymond Chen would write up a historically completely sensible rationale for why that code is the way it is.
by layer8 3y ago
This sounds like the kind of thing where Raymond Chen would write up a historically completely sensible rationale for why that code is the way it is.
- cratermoon 3y agoIf there was one, he would have written it by now.
- veave 3y agoIt's been a few years since it seems he ran out of interesting historic things to tell.
- MBCook 3y agoNot knowing anything about x87 programming, but assuming the code is rational, I would guess this causes the code to work with a handful of _really_ broken or flakey FPUs. Or perhaps just one popular one.
- smitty1e 3y agoIf git had existed, one would anticipate the commit log for the code would read like a Lovecraftian descent into madness as the coder makes increasingly unhinged pleas to the Great Old Ones to accept the unit tests.
- Sesse__ 3y agoHaving read plenty of version control system logs from around the turn of the millennium (i.e. when things were _far_ less crazy than 1987), I'd wager most of it would come in the form of commits marked “implemented EGA driver, faster AI in Reversi, improve FPU exception code”, aka “I'm done for today, committing”.
- kelnos 3y agoWhich makes sense, in a way. Most (all?) of the popular version control systems back then were centralized, and required the central server to even make a commit. Even Subversion, a "better CVS", required this. When you have to wait several seconds (or more) to make a commit, and you couldn't edit things to tidy up history after the fact, you tended to make commits much less often. I kinda take git for granted now, where commits happen in a fraction of a second. Sometimes it's hard to remember what a pain it was using CVS, and even SVN.
- matheusmoreira 3y agoWish this was more common. I really want to build a collection of such "unhinged religious text" commits. Right now I only know of one example: the mpv locale commit.
- vitus 3y agoFor context, since I hadn't seen this before: https://github.com/mpv-player/mpv/commit/1e70e82baa9193f6f027338b0fab0f5078971fbe https://github.com/mpv-player/mpv/commit/1e70e82baa9193f6f02... (advisory: _lots_ of profanity)
- matheusmoreira 3y agoI didn't want to link it because if I did I'd feel the need to read the entire commit again. Which I just did. It really is a religious text. It even granted me absolution. When I read it I realized I wasn't alone in thinking the C standard library is total garbage. Sometimes I'd post my opinions on the matter and people would argue with me but there's no arguing with that commit. I become increasingly convinced we should all just start over from scratch every time I read it.
- thechao 3y agoSometimes I think a "better C" is just C, but with a rational standard library. Then I remember that we're not allowed to have nice things.
- matheusmoreira 3y agoI agree completely. I started writing freestanding C exclusively and it's a much better language compared to hosted C. There's zero cruft for you to deal with. It's just C and whatever you make of it. Nothing holding you back. Some years ago I started a liblinux project so I could have lightweight Linux system calls but then I discovered the kernel's nolibc headers which are vastly superior. Now I'm working on a Lisp written completely in freestanding C with zero libc bullshit. Turns out you can get surprisingly far with a statically allocated array of bytes.
- bsder 3y agoMost likely cuplrit: AutoCAD. AutoCAD did all manner of nasty things with floating point numbers in order to stash extra data into them. Denormals, NaNs and the like were painfully common. You had to make sure your trap handlers were fast or AutoCAD performance would suck and everybody would slag your computer. AutoCAD was one of the banes of existence for the FX!32 guys.
- Ballas 3y agoDid AutoCAD ever run inside Windows 3.xx? From my vague recollection, it was a DOS program in those days that was launched outside of Windows, or am missing something?
- bsder 3y agoR11 was apparently Win 3.xx https://winworldpc.com/product/autodesk-autocad/r11-win https://winworldpc.com/product/autodesk-autocad/r11-win
- anonymoushn 3y agoI've written to him to ask why huge pages cannot be used by 99% of software targeting windows even though they speed up most software by 10-20% but he hasn't written anything bout it yet :(
- layer8 3y agoWhat do you mean “cannot be used”? Applications have to be coded specifically for huge/large pages. It’s similar on Linux, only certain applications support huge pages.
- anonymoushn 3y agoFor example applications like Microsoft Word or World of Warcraft cannot use huge pages because users won't mess with security policies then reboot the machine and immediately start the application as administrator and never close it, and these are the steps required of the end user for an application to use huge pages on Windows.
- layer8 3y agoAre you positive that those applications even have large-page support?
- anonymoushn 3y agoIt doesn't make much sense for developers to spend time adding features that users cannot use.