TIL that AMD64 instructions generally don't support immediates greater than 32-bit: https://c9x.me/notes/2015-09-19.html
If you really need a large immediate value, you need to use MOV into a register first.
Explicitly configuring a 'hyper' key for global shortcuts, regardless of the current active application: https://prodtyping.com/blog/hyperkey-hammerspoon
Nice idea -- making the desktop more like a modeless UI!
TIL that nasm does optimisation!
It will convert `mov rax, 1` to `mov eax, 1` unless you specify -O0.
Handy, but surprised me when tinkering with some machine code.
It's well known that certain compiler optimisations matter way more than others (e.g. inlining).
Is there a similar principle for linters? I find red squiggles under unused/undefined variables the single most useful check.
I really like the framing of legacy code as "money making code".
Presumably if it wasn't making money (possibly indirectly), it would have been deleted!
Emacs survey results are out! Lots of interesting tidbits: people love magit, ivy and flycheck, and a striking number of respondents are fairly new to Emacs! This seems great for the health of the community.
Installing Linux on a NVMe device today. The naming scheme is helpful: /dev/nvme1n1p2 is the second partition on the device. /dev/sdb2 is little less explicit.
If I'm about to run a complex or scary terminal command, I like putting echo in front of it:
$ echo dd if=/dev/urandom of=/dev/...
It's a nice way of having a last check of your command. The command is now in your scrollback, as well as your history.
The Futamura projections are really cool: partially applying an interpreter gives you a compiler!
I'm not really sure what this enables though. You'd get a pretty poor compiler.
Is this idea used much? I've occasionally heard it referenced for RPython.