Andrew Healey

873 posts

Andrew Healey banner
Andrew Healey

Andrew Healey

@healeycodes

software engineer @vercel • I write about performance, compilers, puzzles, &more on my website • @recursecenter alum

🇬🇧 Katılım Ocak 2019
907 Takip Edilen1.4K Takipçiler
Sabitlenmiş Tweet
Andrew Healey
Andrew Healey@healeycodes·
I wrote a very fast disk usage program for macOS most of the popular disk usage CLIs aren't using getattrlistbulk to reduce the number of syscalls required to scan directories (it's free real estate)
Andrew Healey tweet media
English
4
5
64
5.4K
Andrew Healey
Andrew Healey@healeycodes·
quickjs is GOATed delightful API surface I was able to hack together a tiny runtime and event loop v quickly with it
Andrew Healey tweet media
English
1
1
23
1.6K
Andrew Healey
Andrew Healey@healeycodes·
I built a tiny shell with C so I could learn more about syscalls and pipes great fun I found C to be quite suited for the task (fork, execvp) ... until I had to manage some string lifetime stuff 🥲
Andrew Healey tweet media
English
2
4
48
3.7K
Andrew Healey
Andrew Healey@healeycodes·
glad y'all like this one 🫡
Andrew Healey tweet media
English
0
0
18
791
Andrew Healey
Andrew Healey@healeycodes·
I suggested to my friend that writing a semaphore is fairly trivial but when I sat down to write one I was pretty humbled the edge cases around context cancellation are no joke more notes and my solution below down there ⇣
Andrew Healey tweet media
English
1
0
6
249
Andrew Healey
Andrew Healey@healeycodes·
I also made a search-tree view that I used to debug the solver and get a feel for how it behaved with different optimizations
English
1
0
3
206
Andrew Healey
Andrew Healey@healeycodes·
I built a solver for NYT's daily Pips puzzle I started with a brute-force search and optimized it to be 16× more efficient (by the number of nodes that need to be checked)
English
2
0
5
937
Andrew Healey
Andrew Healey@healeycodes·
and here's tokens -> bytecode
English
1
0
0
164
Andrew Healey
Andrew Healey@healeycodes·
I made a Forth compiler and VM with some visualizations for the tokenization->bytecode->VM steps here's the VM running (it's calculating the 10th Fib. sequence)
English
1
0
5
223
Andrew Healey
Andrew Healey@healeycodes·
added sheep! they spawn when a chunk is created and then randomly walk around, avoiding obstacles (added very rudimentary 'entity system') added torch flicker (sine wave whose phase is derived from cell coords, scales with light level so cells nearer a torch flicker a bit more)
English
0
0
3
199
Andrew Healey
Andrew Healey@healeycodes·
added stone, and ore veins (based on seed, and placed via biased random walk) added torches/BFS lighting (attenuates by 1 per cell, blocked by stone/ore) I'm cheating a bit with the lighting because there's just a dark overlay that is reduced by the lighting effect
English
1
0
3
330
Andrew Healey
Andrew Healey@healeycodes·
playing around with an idea for an article called 'the algorithms behind minecraft' probably with everything in 2d I've just got terrain generation working in a canvas
English
2
0
12
553
Andrew Healey
Andrew Healey@healeycodes·
I made a small 2d programming language called icepath I wanted the same vibe as the ice puzzles in the johto caves in pokemon gold and silver 🧊 sliding around a cave and hitting opcodes
English
4
3
21
2.1K