Hacker News new | past | comments | ask | show | jobs | submit
I have written some useful small programs in uxn, such as: hex decoder in 39 bytes (which handles optional spaces and line breaks, uppercase and lowercase, etc), a program to convert JSON to NDJSON in 125 bytes, a program to convert DER to a subset of TER in 220 bytes, BLAKE2s in 1024 bytes (although some of it is padding for alignment, which is why it comes out to exactly 1024), a card game (including graphics, sound effects, fonts, scoring, etc) in 1853 bytes, etc. (These do not always check for errors (although the card game does check that you had made a valid move), which is one of the things that makes them short; since you might want such things sometimes that makes other programs longer, and this is not specific to uxn or to programs I wrote.) Other people might have also done.

The description of uxn and varvara are also small and might need only two pages (I did not write it).

I also remember reading in a book that someone made a game on Atari in 2 kilobytes, and described how they could make it fit (by making the map symmetric, etc), which was rejected because they had 4 kilobyte cartridges by then. (The article in this submission also links to a different game that (probably) someone else made in 2 kilobytes, but this time with JavaScript and HTML. Atari and uxn/varvara are much simpler systems than HTML/JavaScript, though.)

uxntal and varvara bring me such joy, it's that perfect complexity where everything feels like a fun puzzle you can approach one step at a time.

The first time I saw it years back I was skeptical. As foremost a hardware guy I saw instructions in transistor count and gate delay, all that spaffed away on 16x16 multiply and you couldn't spare one flip flop for an overflow flag? Preposterous!

But the software already written was cool enough to convince me it was worth emulating, and once you've got an emulator you may as well write some software. A few short programs and I was in love. It's not about running code efficiently, it's about making it fun to write efficient code.

No sharp edges, no corner cases, generally minimal machine state. The cognitive load is so much smaller than any real world assembly I've used.

I didn't mean to write such a lot of meandering offtopic fluff, but damn, I just love that little guy ( ⊖-w-⊖)

Hal Finney wrote a BASIC interpreter for the Mattel Intellivision in about 2K of ROM.

Of course, Hal was a genius.