Better HN
topnewbestaskshowjobs
Log inSign up

healeycodes

782 karma · joined Jan 12, 2018 (8y ago) · 94 submissions

I write about software @ https://healeycodes.com

My email is on my home page at the bottom.

Submissions

comment 4d ago · link · parent

Author here. The owner of sokobano.de/wiki/index.php?title=Solver_Statistics is currently independently verifying the performance of my solver (and the early signs look good)!

2.

Introducing the World's Strongest Sokoban Solver(healeycodes.com ↗)

4 points · by healeycodes · 1w ago · discuss

3.

Decompiling Fast Food Tycoon 2: Drawing the World(healeycodes.com ↗)

209 points · by healeycodes · 1mo ago · 43 comments

4.

What Makes LLM Tokenization Slow?(healeycodes.com ↗)

1 points · by healeycodes · 2mo ago · discuss

comment 3mo ago · link · parent

Cool! I kinda feel like these should be built-in. But this looks useful for closing the DX gap here.

comment 3mo ago · link · parent

Reasonably? Yes. Could probably be made to work well.

  $ 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.0

comment 3mo ago · link · parent

Author here. I find try/finally verbose and vulnerable to mistakes. For me, it adds "function noise".

8.

Adding Go's Defer to the TypeScript Compiler(healeycodes.com ↗)

21 points · by healeycodes · 3mo ago · 29 comments

comment 5mo ago · link · parent

You're right that my post's algo does not handle this case (it's more of a toy to explain the basic cases).

> 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.

10.

A Tiny Compiler for Data-Parallel Kernels(healeycodes.com ↗)

52 points · by healeycodes · 5mo ago · 5 comments

comment 8mo ago · link · parent

Editing the current line works because I brought in https://man7.org/linux/man-pages/man3/readline.3.html towards the end so I could support editing, tab completion, and history.

IIRC readline uses a `char *` internally since the length of a user-edited line is fairly bounded.

comment 8mo ago · link · parent

Author here, and yeah, I agree. I skipped writing a parser altogether and just split on whitespace and `|` so that I could get to the interesting bits.

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.

13.

Building a Shell(healeycodes.com ↗)

13 points · by healeycodes · 8mo ago · 1 comment

14.

A Fair, Cancelable Semaphore in Go(healeycodes.com ↗)

2 points · by healeycodes · 11mo ago · discuss

15.

Solving NYT's Pips Puzzle(healeycodes.com ↗)

2 points · by healeycodes · 1y ago · discuss

16.

Compiling a Forth(healeycodes.com ↗)

70 points · by healeycodes · 1y ago · 9 comments

17.

Icepath: A 2D Programming Language(healeycodes.com ↗)

3 points · by healeycodes · 1y ago · discuss

comment 1y ago · link · parent

Author here, one of the fastest improvements I've seen is @cloud11665's idea here: https://x.com/cloud11665/status/1955958965046595699

19.

Counting Words at SIMD Speed(healeycodes.com ↗)

58 points · by healeycodes · 1y ago · 15 comments

20.

Optimizing My Disk Usage Program(healeycodes.com ↗)

19 points · by healeycodes · 1y ago · discuss

21.

Maybe the Fastest Disk Usage Program on macOS(healeycodes.com ↗)

3 points · by healeycodes · 1y ago · discuss

22.

Filesystem Backed by an LLM(healeycodes.com ↗)

6 points · by healeycodes · 1y ago · discuss

23.

Solving Queuedle(healeycodes.com ↗)

3 points · by healeycodes · 1y ago · discuss

24.

Show HN: Queuedle – Daily word-sliding puzzle inspired by Wordle and Scrabble(queuedle.com ↗)

1 points · by healeycodes · 1y ago · discuss

25.

Visualizing Chess Bitboards(healeycodes.com ↗)

3 points · by healeycodes · 1y ago · 1 comment

26.

Installing NPM Packages Quickly(healeycodes.com ↗)

1 points · by healeycodes · 1y ago · discuss

27.

Building Game Prototypes with LÖVE(healeycodes.com ↗)

206 points · by healeycodes · 1y ago · 79 comments

28.

Compiling Lisp to Bytecode and Running It(healeycodes.com ↗)

4 points · by healeycodes · 2y ago · discuss

29.

Generating Mazes(healeycodes.com ↗)

2 points · by healeycodes · 2y ago · discuss

1234