So, I've started writing a blog series on writing an interpreter from scratch: https://mort.coffee/home/interpreter-from-scratch-part-0/
It's still very much not done; only parts 0 and 1 are written, and those parts probably contain errors and typos, but I'm interested in some early feedback. What do you think?
Beware of accidental inputs while a long-running command is running.
I spent hours compiling clang into the directory `clang-prefix`, but during those hours, I ended up inputting the up arrow key a few times, followed by enter. That meant that once the build eventually finished, some command from my zsh history was immediately executed.
That command? `rm -r clang-prefix`.
> The software development world is plagued with the idea that developer productivity and happiness comes before all other considerations. Can you imagine a car manufacturer building something that get's 2 mpg but excusing it with "but it was quicker to build"? Yet we have electron.
- flukus on HN
I'm compiling Clang again.
In a modern, high quality desktop OS, one program shouldn't be able to make the entire computer completely unresponsive for half an hour. Yet Linux, when starved for RAM, will do precisely that, and ctrl+alt+f2 to get to a TTY won't even work. This reliably happens any time you're linking big projects in parallel, even with increased niceness.
Linux, I love you, but this isn't good enough.
There are two ways to make fast software; make the whole stack simple enough that there's no way for the software to be slow, or add a ton of complexity to power through the slowness with data structures and background helpers.
Always prefer the former when possible. I did not, because I chose GTK for an application which needs to open quickly as a response to a hotkey. https://github.com/mortie/mauncher/commit/212c7f531f49851d76a76b1820bf03c376e15562
As we all know, graphical Linux systems don't work perfectly when you run low on RAM. I just had my computer hang for over half an hour because I accidentally tried to link a debug build of LLVM (C++ is rough on the linker...)
It feels like it shouldn't be too difficult to protect the DE and core apps from being paged out, which I bet would make low memory situations much nicer. Has anyone experimented with anything like that for Linux?
Just in case anyone ever decided they needed a more bloated dmenu which works with hidpi on Wayland: https://github.com/mortie/mauncher
Rebooting an iPhone is surprisingly hard. It used to be that you slide to power off, wait for the Apple logo to go away, then hold the power button to boot. These days, the screen will immediately go dark while the phone is shutting off, so you just sort of have to start and stop holding the power button until it eventually responds because it's done powering off.
I can't imagine many other reasons to power off a phone other than to reboot to solve a problem, so that seems like a weird choice.
When running makefiles, I use a tool I call msoak to "soak up" output and show me the output in less if it's too long (in addition to printing to stderr so the output is there after closing less too).
Since integrating a simple C++ nesting color highlighter I wrote into msoak, debugging C++ template issues has become so much nicer.
ElementaryOS on an old laptop I use while travelling.
It's curious, Japan apparently doesn't really use sunglasses. The only place we've found some in #tokyo is a shop called J!NS with ridiculously expensive sunglasses, heh. There are cheap ones in every petrol station and tourist-y area in Norway.
Time to find some glue and repair the broken cheap-o sunglasses we brought from home.