HackerTrans
TopNewTrendsCommentsPastAskShowJobs

healeycodes

no profile record

Submissions

A Tiny Compiler for Data-Parallel Kernels

healeycodes.com
52 points·by healeycodes·il y a 19 jours·5 comments

Building a Shell

healeycodes.com
13 points·by healeycodes·il y a 4 mois·1 comments

A Fair, Cancelable Semaphore in Go

healeycodes.com
2 points·by healeycodes·il y a 7 mois·0 comments

Solving NYT's Pips Puzzle

healeycodes.com
2 points·by healeycodes·il y a 9 mois·0 comments

Compiling a Forth

healeycodes.com
70 points·by healeycodes·il y a 9 mois·9 comments

Icepath: A 2D Programming Language

healeycodes.com
3 points·by healeycodes·il y a 11 mois·0 comments

Counting Words at SIMD Speed

healeycodes.com
58 points·by healeycodes·il y a 11 mois·15 comments

Optimizing My Disk Usage Program

healeycodes.com
19 points·by healeycodes·il y a 11 mois·0 comments

Maybe the Fastest Disk Usage Program on macOS

healeycodes.com
3 points·by healeycodes·il y a 12 mois·0 comments

Filesystem Backed by an LLM

healeycodes.com
6 points·by healeycodes·l’année dernière·0 comments

Solving Queuedle

healeycodes.com
3 points·by healeycodes·l’année dernière·0 comments

Show HN: Queuedle – Daily word-sliding puzzle inspired by Wordle and Scrabble

queuedle.com
1 points·by healeycodes·l’année dernière·0 comments

Visualizing Chess Bitboards

healeycodes.com
3 points·by healeycodes·l’année dernière·1 comments

Installing NPM Packages Quickly

healeycodes.com
1 points·by healeycodes·l’année dernière·0 comments

Building Game Prototypes with LÖVE

healeycodes.com
206 points·by healeycodes·il y a 2 ans·79 comments

Compiling Lisp to Bytecode and Running It

healeycodes.com
4 points·by healeycodes·il y a 2 ans·0 comments

Generating Mazes

healeycodes.com
2 points·by healeycodes·il y a 2 ans·0 comments

Making Python Less Random

healeycodes.com
87 points·by healeycodes·il y a 2 ans·43 comments

2D Multiplayer from Scratch

healeycodes.com
4 points·by healeycodes·il y a 2 ans·0 comments

I added some optimizations to my compiler that turns Lisp into JavaScript

healeycodes.com
112 points·by healeycodes·il y a 2 ans·23 comments

comments

healeycodes
·il y a 17 jours·discuss
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.
healeycodes
·il y a 4 mois·discuss
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.
healeycodes
·il y a 4 mois·discuss
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.
healeycodes
·il y a 11 mois·discuss
Author here, one of the fastest improvements I've seen is @cloud11665's idea here: https://x.com/cloud11665/status/1955958965046595699
healeycodes
·il y a 2 ans·discuss
You can annotate the code blocks in the README to get generic lisp syntax highlighting.

```lisp

(+ 1 2)

```
healeycodes
·il y a 2 ans·discuss
Yes, it works on any process that makes a SYS_getrandom call.
healeycodes
·il y a 2 ans·discuss
Ah, this is a useful distinction. Thanks.
healeycodes
·il y a 2 ans·discuss
The Lisp variant that the compiler supports at the moment only handles f64 numbers so I don't think this kind of issue is possible.

However, this is a very relevant point. If the goal is just shorter code (as opposed to a mix of shorter code and less run-time operations), then you need to check that folding strings (and similar types) actually makes the expression shorter to represent.