Finally done with a series of blog posts about re-creating classical programming langauges in 50 lines of code each: https://github.com/zserge/tinylangs It was a great little weekend project that still took much longer than I expected #tinycode #programming #lisp #basic #apl #pascal #forth
zserge
Turning complex problems into lightweight and simple software solutions. YAGNI as a service. #programming #music #minimalism #fedi22
And my 6502 emulator is finally working and passing some tests (only 280 lines of code)! https://github.com/zserge/bsoz #tinycode #retrocomputing
Finished a small educational project: https://zserge.com/posts/pennybase - a toy clone of Firebase/Supabase/Pocketbase. In 700 lines of Go with zero dependencies it has dynamic record schemas, reasonably fast "document store" using CSV files, orthogonal REST APIs + realtime watch over SSE, authNZ with simple RBAC, pluggable hooks.
Enough to build a real-time chat app or a management system. Works well with HTMX and Go templates.
Not for serious use, of course! #golang #backend #baas #firebase #rest #csv
TIL that rhymezone.com is all written in AWK and works just fine since 1996. AWK is truly the most underappreciated
UNIX tool/language.
A little [tab](https://github.com/zserge/tab/) utility is mostly complete! Guitar, ukulele, cigar box guitar, diddley bow tabs, also recorders, folk whistles, ocarinas, native american flutes, trumpets, saxophones, keyboards and Jianpu are all supported. Converted some songs from the Real Book into tabs, feels great to be able play a tune from the first attempt. Perhaps it's time to make the first stable release. #music #minimal #terminal #cli
As a self-taught music enthusiast I like exploring/collecting new instruments. Apart from an obvious guitar+piano I'm surrounded with all sorts of string instruments, various flutes, ocarinas, kalimbas, a sax, and a trumpet. It's difficult to memorise the fingerings for all of them, so I made a simple CLI utility that converts ABC notation into tabs. https://github.com/zserge/tab/ #music #musicians #tinwhistle #flute #guitar
Well this day has come. I started writing my first MOS6502 emulator.
What a wonderful language is C. Took me some time to find a bug with my array. And this could happen in so many languages...
```
int D[] = {
-9, 9, -1, 1, 0, 0, 0, 0, // Rook
-19, -17, 19, 17, -11, -7, 7, 11, // Horse
-20, -16, 20, 16, 0, 0, 0, 0, // Elephant
-10, -8, 10, 8, 0, 0, 0, 0, // Advisor
-9, 9, -1, 1, 0, 0, 0, 0, // King
-9, 1, -1, 0, 0, 0, 0, 0, // Soldier
-9, 9, -1, 1, 0, 0, 0, 0 // Cannon
-9, -9, 9, 9, -1, 1, -1, 1, // Horse "legs" for each horse move
};
```
And it even runs some Apple 1 tapes and some BASIC code! #retrocomputing Still a few glitches to catch but it's a good getaway from daily "useful" programming.