healeycodes
What Makes LLM Tokenization Slow?
$ bat 2.ts
───────────────
1 │ function one() {
2 │ let x = 1;
3 │ defer (() => { throw new Error("thrown from one!"); })()
4 │ x = 2;
5 │ }
6 │ one();
─────┴─────────
$ node 2.js
~/healeycodes-typescript-go/2.js:29
throw _errors_1[0];
^
Error: thrown from one!
at _callee_1 (/Users/andrew/Documents/GitHub/healeycodes-typescript-go/2.js:9:46)
at /Users/andrew/Documents/GitHub/healeycodes-typescript-go/2.js:10:33
at one (/Users/andrew/Documents/GitHub/healeycodes-typescript-go/2.js:22:31)
at Object.<anonymous> (/Users/andrew/Documents/GitHub/healeycodes-typescript-go/2.js:34:1)
at Module._compile (node:internal/modules/cjs/loader:1830:14)
at Object..js (node:internal/modules/cjs/loader:1961:10)
at Module.load (node:internal/modules/cjs/loader:1553:32)
at Module._load (node:internal/modules/cjs/loader:1355:12)
at wrapModuleLoad (node:internal/modules/cjs/loader:255:19)
at Module.executeUserEntryPoint [as runMain (node:internal/modules/run_main:154:5)
Node.js v24.15.0Adding Go's Defer to the TypeScript Compiler
> When I read Allan and Kennedy my impression was that vectorising arbitrary imperative code is a much harder problem than designing a language that only allows for vectorisable constructs to be expressed in the first place.
Yeah, I buy this.
> In my example that would produce different code, requiring a multiplication:
lambda i: table[(phase0 + i*inc) % TABLE_LEN]
I think some compilers may lower this without the multiplication.. (e.g. turning it back into an induction variable) but with floats they may not be allowed to, since repeated addition and "phase0 + i*inc" are not strictly equal.A Tiny Compiler for Data-Parallel Kernels
IIRC readline uses a `char *` internally since the length of a user-edited line is fairly bounded.
For side-projects, I have to ask myself if I'm writing a parser, or if I'm building something else; e.g. for a toy programming language, it's way more fun to start with an AST and play around, and come back to the parser if you really fall in love with it.
Building a Shell
A Fair, Cancelable Semaphore in Go
Solving NYT's Pips Puzzle
Compiling a Forth
Icepath: A 2D Programming Language
Counting Words at SIMD Speed
Optimizing My Disk Usage Program
Maybe the Fastest Disk Usage Program on macOS
Filesystem Backed by an LLM
Solving Queuedle
Show HN: Queuedle – Daily word-sliding puzzle inspired by Wordle and Scrabble
Hey HN!Queuedle is a daily word-sliding puzzle that I play with my friends. It combines the positional gameplay of Scrabble with the daily puzzle and discovery elements of Wordle.The letter distribution mirrors Scrabble's tile frequencies, and daily puzzles are generated deterministically using the current date as a seed. It uses the Scrabble (TWL06-US) word list, but excludes two-letter...
Visualizing Chess Bitboards
Installing NPM Packages Quickly
Building Game Prototypes with LÖVE
Compiling Lisp to Bytecode and Running It
Generating Mazes
```lisp
(+ 1 2)
```