Things of Your Day

After reading this I wonder why other text editors don’t adopt Notepad’s architecture for opening files.

The only reason I can think of is that memory mapping files isn’t part of the standard, portable C/C++ APIs. If you want to memory map a file, you need to call an OS-specific API (CreateFileMapping() on Windows, mmap() on Unix and its clones), whereas most C/C++ programmers generally first think of calling fopen() or std::fstream as they are universal and portable across all OSes as part of the standard C/C++ libraries.

I, for one, love me some code riddled with stuff like

#ifdef WIN32
1 Like

Back at my first job out of college, I had to work on a program that had to run on Windows, about a half dozen different versions of Unix, and even Unisys OS 2200. We didn’t want to #ifdef the crap out of our mainline code, so we ended up creating abstraction libraries that hid the various OS differences between each other, so we’d just call, for example, my_mmap() which would do the right thing to memory-map a file depending on the OS. Almost all the #ifdefs were relegated to this library, which made the mainline code much cleaner, and it would be my preference if working on anything portable that needs to use non-portable OS-level services.

Yeah, that’s kind of the obvious architecture. If a project isn’t even abstracting things away at that kind of basic level, then it’s either old legacy crap or being written by people with not enough experience.

1 Like

1960s cartoon cheese is the best cheese.

https://www.youtube.com/watch?v=R-0Dms74v9o

This channel has more of it.

1 Like

https://youtu.be/Y8hi6A5MPVY

1 Like
1 Like

1 Like

https://youtu.be/SMRiFsFwDQg

1 Like

God damn I loved that game as a kid. Too bad it doesn’t age well at all.

Daniel Floyd is leaving Extra Credits.

https://www.youtube.com/watch?v=_2LKrwiGFFs

He’ll be missed.

For I moment I had a mental break because I thought I was in the “Celebrity Deaths” thread and only read “Daniel Floyd of Extra Credits. He’ll be missed.” Thankfully it’s not quite as severe as that, though I am not sure how the shows are going to continue without him. His pitched-up voice is their second calling card after the art style, and he was also moving quite a bit of things behind the scenes.

https://youtu.be/_xS-BIcu4ew

https://www.youtube.com/watch?v=lLLBhIJbVFs

1 Like

Fun facts related to that video - Malaka roughly means “Wanker” in Greek.