HN user

healeycodes

687 karma

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

My email is on my home page at the bottom.

Posts55
Comments29
View on HN
healeycodes.com 27d ago

A Tiny Compiler for Data-Parallel Kernels

healeycodes
52pts5
healeycodes.com 4mo ago

Building a Shell

healeycodes
13pts1
healeycodes.com 7mo ago

A Fair, Cancelable Semaphore in Go

healeycodes
2pts0
healeycodes.com 9mo ago

Solving NYT's Pips Puzzle

healeycodes
2pts0
healeycodes.com 9mo ago

Compiling a Forth

healeycodes
70pts9
healeycodes.com 11mo ago

Icepath: A 2D Programming Language

healeycodes
3pts0
healeycodes.com 11mo ago

Counting Words at SIMD Speed

healeycodes
58pts15
healeycodes.com 11mo ago

Optimizing My Disk Usage Program

healeycodes
19pts0
healeycodes.com 11mo ago

Maybe the Fastest Disk Usage Program on macOS

healeycodes
3pts0
healeycodes.com 1y ago

Filesystem Backed by an LLM

healeycodes
6pts0
healeycodes.com 1y ago

Solving Queuedle

healeycodes
3pts0
queuedle.com 1y ago

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

healeycodes
1pts0
healeycodes.com 1y ago

Visualizing Chess Bitboards

healeycodes
3pts1
healeycodes.com 1y ago

Installing NPM Packages Quickly

healeycodes
1pts0
healeycodes.com 1y ago

Building Game Prototypes with LÖVE

healeycodes
206pts79
healeycodes.com 1y ago

Compiling Lisp to Bytecode and Running It

healeycodes
4pts0
healeycodes.com 1y ago

Generating Mazes

healeycodes
2pts0
healeycodes.com 2y ago

Making Python Less Random

healeycodes
87pts43
healeycodes.com 2y ago

2D Multiplayer from Scratch

healeycodes
4pts0
healeycodes.com 2y ago

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

healeycodes
112pts23
healeycodes.com 2y ago

Lisp to JavaScript Compiler

healeycodes
2pts0
healeycodes.com 2y ago

Compressing CS2 Demos

healeycodes
1pts0
healeycodes.com 2y ago

Rendering Counter-Strike Demos in the Browser

healeycodes
2pts0
healeycodes.com 2y ago

Running Untrusted Python Code

healeycodes
4pts0
healeycodes.com 3y ago

Building Family Websites

healeycodes
2pts0
healeycodes.com 3y ago

My Own Python Web Framework

healeycodes
60pts18
healeycodes.com 3y ago

My Time at the Recurse Center

healeycodes
1pts0
healeycodes.com 3y ago

Sandboxing JavaScript Code

healeycodes
4pts0
healeycodes.com 3y ago

Making a Text Editor with a Game Engine

healeycodes
21pts1
healeycodes.com 3y ago

Adding for Loops to an Interpreter

healeycodes
1pts0

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.
Building a Shell 4 months ago

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.

You can annotate the code blocks in the README to get generic lisp syntax highlighting.

```lisp

(+ 1 2)

```

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.

When a val is deployed on val town, my understanding is that it's parsed/compiled. At that point, can you save the parts of the program that people might search for? Names of imports, functions, variables, comments, etc.

Yes (my blog is on my profile).

People email me about things I’m interested in, and I’ve made new friends through it too.

It's nice to look back and see my progress — taking on harder projects, and writing more clearly.

Does the time spent writing feels worth it to you?

Yes but I've always enjoyed writing.

Did it help to get noticed/ find jobs or other opportunities?

Yes.

Do you learn something new from it?

Yes, by writing for it. And, I suppose, by "running it" I learned more about the frameworks I've used.

Gunicorn 5 years ago

I really like the clear example at the bottom of the page.

It seems the only way to protect against theft is to ride an old bicycle.

I like this blog on that topic:

https://calpaterson.com/bicycle-threat-model.html

One father I know had his primary-school-age daughter "decorate" his commuting bicycle with girly stickers and pink glitter. If anyone examines his bicycle closely he looks like a complete loon but I think his motivation is right: it's going to be much less appealing to steal when it's covered in Miffy stickers.

They are the colored threads that you stitch with. DMC is a brand but it’s also the colloquial term for the fixed set of colors that are commonly used and sold.

I’ll see if I can make that clearer — thanks.

I welcome any improvements to my naive exploration in this article!

I've received two emails from readers:

- One suggested converting RGB to a color space that better matches human visual perception, like CIELAB.

- Another suggested compressing the color space by using K-means clustering (by guessing K as the number of threads)

(n.b. I gave feedback on an early draft of this book.)

It's very thorough, written with care, and presented in a way that makes sense. Even as an intermediate Python programmer, I found use in this book.

I tried to code up Markov chains when I was first learning to program but I found that many resources didn't have clear/terse enough code snippets. Most articles also didn't walk you from zero to understanding.

So I'm trying to fill that gap and help out anyone who is trying to learn the basics.

Ebiten in 2020 6 years ago

I wrote about building the boids flocking simulation with Ebiten and deploying it with WebAssembly[0].

I found Ebiten very easy to build a simple project with. The project maintainer is helpful, kind, and highly responsive too.

There is a #ebiten channel in the Gophers slack that is quite active.

-

[0] https://healeycodes.com/boids-flocking-simulation/

I'm looking forward to listening to this one. My favourite so far as been the one on Clock Synchronization (https://signalsandthreads.com/clock-synchronization/)

Clock synchronization, keeping all of the clocks on your network set to the “correct” time, sounds straightforward: our smartphones sure don’t seem to have trouble with it. Next, keep them all accurate to within 100 microseconds, and prove that you did -- now things start to get tricky. In this episode, Ron talks with Chris Perl, a systems engineer at Jane Street about the fundamental difficulty of solving this problem at scale and how we solved it.

It was so enthralling that I ordered a GPS receiver for my Raspberry Pi to bring high accuracy time to my flat!