Andrew Quinn’s TILs

A place to keep track of things I’ve learned. Inspired by Simon Willison’s TILs.

All thoughts, opinions, etc. expressed herein are strictly my own and not of my employer’s.

Consulting available under the business name Siilikuin. For inquiries please email my first name at siilikuin.com.

Comments at the bottom of every page, including this one - check it out!

You don't need CGO to use SQLite in your Go binary

At least not for most use cases. You can just use modernc.org/sqlite instead as your SQLite driver. For people who aren’t in the Go know, “pure” Go programs are trivially easy to compile cross-platform to all the major platforms by default. You read that right - you can just go build a single Windows executable, Mac executable, and Linux executable on the same machine and just ship it: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 # This can all happen on the same box! export CGO_ENABLED=0 # no c cross-compilation please export GOOS=linux GOARCH=amd64 go build -o hello-linux-amd64 hello.go GOARCH=arm64 go build -o hello-linux-arm64 hello.go export GOOS=darwin # aka mac GOARCH=amd64 go build -o hello-darwin-amd64 hello.go GOARCH=arm64 go build -o hello-darwin-arm64 hello.go export GOOS=windows GOARCH=amd64 go build -o hello-windows-amd64.exe hello.go GOARCH=arm64 go build -o hello-windows-arm64.exe hello.go This was the real reason I chose Go over Python for tsk, my instant-search Finnish to English pocket dictionary. I wanted to be able to give Windows users a single .exe they could just run and have work out of the box. ...

July 18, 2025

Incentivize grandchildren by writing them into your will

It’s no secret that I’m a fan of economics-inspired solutions to otherwise hard problems. The other day I happened across an old post by GMU economist Bryan Caplan which I think does this very elegantly, for a problem of some interest to me. The vast majority of wills evenly divide the residuary estate between children. Mine evenly divides the residuary estate between (children and grandchildren). I like this a lot. It makes it unambiguously clear where your priorities in the case of your untimely demise lie. It is also self-reinforcing; children of yours who have no children themselves will recieve less, but when it comes time to write their own wills, they won’t have any children or grandchildren to bequeath to anyway. Children of yours who have many children themselves, perhaps inspired by this very policy, might decide in the end they were duped - but it seems far more likely to me they’ll cite it as one of the biggest reasons they ultimately went for 4 instead of 3, or 2 instead of 1, or 1 instead of none. After seeing it work in practice on themselves, they might decide they want to incentivize bringing their own grandchildren into being in kind. ...

July 16, 2025

The second wave of spaced repetition apps

Spaced repetition has been around for a long time. If you’ve never heard the term before, it’s best described as flashcards on timers. an algorithm such as SM-2 or the more recent FSRS keeps track of how you did on the flashcard, makes a guess as to how long it could possibly wait to show you the flashcard again before you below, say, a 90% chance of getting it right the next time, and then schedules the flashcard for a new day. ...

July 14, 2025

Experiment registry: Can I simply enjoy everything I do?

N.B.: If I link you to this personally, it is to explain why I usually seem to be in a great mood. It’s an experiment. I’m normally in merely a good mood, and I am pushing myself to be great. This is an unusual entry for a Today I Learned site, even by my standards. But I think it’s something I would prefer to pre-register ahead of time. I’ve always been predisposed to mirth. I laugh easily; I rarely get depressed; I’m just about always in a content mood these days, in no small part because I have actually succeeded on the meager goals I set for myself as a teenager (soulmate: check, child: check, sujuvuus vieraalla kielellä: yhä työn alla mutta kyllä se siitä, give me maybe five more years). Yet for some reason I have always felt it is, I don’t know, low status to be so effortlessly joyful and opulent. Like people will take you less seriously or something. So I’ve been reluctant to push my naturally good mood into the realm of actively loving life as my default state. ...

July 7, 2025

Switching Vim colorschemes based on which keyboard layout I have active

Did you know Vim has a client-server model baked in? Of course it does. If you run 1 vim --servername LOVE , then in another terminal something like 1 vim --servername LOVE --remote-send "<Cmd>colorscheme peachpuff<CR>" , you’ll find your Vim terminal switch to the creamy default theme all true gangsters love - without you actually having to do anything. I frequently flip between a US- and Finnish-based keyboard while doing my language studies. I already had a tiny shell script in place which plays a seventh major chord every time they switch, courtesy of Sway WM: ...

July 6, 2025

Using LLMs to generate small semantic perturbations for language learning writing practice

Still images of this GIF are at the bottom. Learning to read a language is mostly a game of getting massive quantities of comprehensible input. Learning to write that same language is a whole ’nother ballgame. But, using the 4-quadrant Anki card setup from my earlier post, I think I’m finding more and more ways to make this as amenable to spaced repetition as possible. One thing I’ve been experimenting with with surprising success is the idea of using LLMs to generate “semantic perturbations” on sentences I already “know” how to write, where “know” = “have in active review in Anki”, for our purposes. ...

July 4, 2025

The language learning "Delta" Anki card pattern

1 2 3 4 5 +--------------------------+------------------------------------------+ | L2, fixable | L1, intention | +--------------------------+------------------------------------------+ | L2, fixed | L1, (fixable -> fixed) explanation | +--------------------------+------------------------------------------+ The above 2x2 layout for Anki cards, which I call a “comprehensible delta”, is one of the best things I’ve happened upon in a while for learning another language. Let’s say you are learning Finnish, and you want to say ...

June 28, 2025

Save your disk, write files directly into RAM with /dev/shm

Given my interest in extending the life of my SD cards and hard drives as much as possible, I’m surprised I haven’t come across /dev/shm before. In a word it’s a world-accessible RAM scratchpad, which seems baked right into POSIX, so that virtually every Unix EDIT: Linux system already has it mounted as a tmpfs by default: 1 2 ❯ mount | grep '/dev/shm' tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,inode64) Today’s lucky 10,000, indeed. It gets mentioned often in Hacker News comments, but surprisingly I couldn’t find any actual articles talking about it. The existence of /dev/shm is a boon for me mostly because it means I never have to worry about whether /tmp is really RAM-based again. ...

June 26, 2025

LLM, JavaScript, GitHub Pages, localStorage: A recipe for free apps anyone can use

Earlier today on Hacker News Scrappy made the rounds, with the explicit tagline “make little apps for you and your friends”. I always like to see new projects in this vein. That’s why I’d like to outline my alternative approach, which Works cross-platform and on mobile devices by default, Doesn’t require any app store tomfoolery, Has great uptime built in, Gives you just enough data persistence to not get in your way, and Is owned by you, forever. This is the stack I used to build my diet checklist, which I keep as a little icon on my phone’s home page. Here it is: ...

June 18, 2025

Create multi-stage Anki card answers with HTML's <details> tag

This works as of, at least, Anki 24.06.3. According to the Mozilla Developer Network, The <details> HTML element creates a disclosure widget in which information is visible only when the widget is toggled into an open state. In standard web browsers, absent any CSS to the contrary, a <details> tag starts closed until further notice. Since Anki is basically a local web browser on top of a timer, this also works there. ...

June 7, 2025