Andrew Healey

871 posts

Andrew Healey banner
Andrew Healey

Andrew Healey

@healeycodes

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

🇬🇧 Se unió Ocak 2019
901 Siguiendo1.4K Seguidores
Tweet fijado
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
63
5.3K
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
49
3.5K
Andrew Healey
Andrew Healey@healeycodes·
glad y'all like this one 🫡
Andrew Healey tweet media
English
0
0
18
772
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
236
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
200
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
929
Andrew Healey
Andrew Healey@healeycodes·
and here's tokens -> bytecode
English
1
0
0
158
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
4
215
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
192
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
322
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
11
543
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
2K
Geoff Langdale
Geoff Langdale@geofflangdale·
@healeycodes for the last 8 16-wide iterations", since there's no reason to do 8b popcount on those. Intel SIMD allows 64b popcounts, which means you're only getting 6 bits of results and could scan huge amounts of data without overflow. Anyhow, I'll stop now, thx for coming to my Ted talk.
English
1
0
3
65
Andrew Healey
Andrew Healey@healeycodes·
wrote the same word-counting program 5 times, each faster than the last best result: 494× faster than my first Python version — by using SIMD in C all are O(n), but some squeeze far more from the CPU and memory!
Andrew Healey tweet media
English
13
45
516
45.7K