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
};
```
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
17.9.2024 10:33Finally done with a series of blog posts about re-creating classical programming langauges in 50 lines of code each:...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
17.3.2024 11:59A little [tab](https://github.com/zserge/tab/) utility is mostly complete! Guitar, ukulele, cigar box guitar, diddley bow tabs, also...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
14.3.2024 18:10As a self-taught music enthusiast I like exploring/collecting new instruments. Apart from an obvious guitar+piano I'm surrounded with...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.
20.1.2024 20:59And 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...And my 6502 emulator is finally working and passing some tests (only 280 lines of code)! https://github.com/zserge/bsoz #tinycode #retrocomputing
20.1.2024 20:51And my 6502 emulator is finally working and passing some tests (only 280 lines of code)! https://github.com/zserge/bsoz #tinycode...Well this day has come. I started writing my first MOS6502 emulator.
20.1.2024 13:27Well this day has come. I started writing my first MOS6502 emulator.Horoscopes is birthday racism
10.9.2023 08:55Horoscopes is birthday racism"This bird is no more! He has ceased to be! He's expired and gone to meet his maker! He's a stiff! Bereft of life, he rests in peace! If you hadn't nailed him to the perch he'd be pushing up the daisies! His metabolic processes are now history! He's off the twig! He's kicked the bucket, He's shuffled off his mortal coil, run down the curtain and joined the bleedin' choir invisible!! THIS IS AN X-BIRD!!"
https://www.youtube.com/watch?v=vZw35VUBdzo&t=167s #twitter #X
24.7.2023 15:22"This bird is no more! He has ceased to be! He's expired and gone to meet his maker! He's a stiff! Bereft of life, he rests in...So, apparently Germans can quickly unite, put their best effort, get coordinated, work 24/7, organise a nightwatch to maintain pixels on /r/place, but not to finish the everlasting road construction next to my house. Still, I'm impressed!
23.7.2023 17:31So, apparently Germans can quickly unite, put their best effort, get coordinated, work 24/7, organise a nightwatch to maintain pixels on...As per my pet GPT-2 implementation, the first law of robotics is "do not talk about robotics". #artificialintelligence #gpt2_345m
2.4.2023 17:24As per my pet GPT-2 implementation, the first law of robotics is "do not talk about robotics". #artificialintelligence #gpt2_345mOn a somewhat nostalgic wave I remembered of RetroBSD - a lightweight UNIX-like OS, inspired by BSD2.11 (yes, the one from '91) for 8-bit and 16-bit MCUs.
Even though the development seems to have stopped, it still could serve as a source of wisdom and inspiration to some C programmers today: https://github.com/RetroBSD/retrobsd
Would be really nice to see something small and simple like that ported to ESP32 or RISCV. #retrocomputing #programming #embedded #iot
22.3.2023 19:49On a somewhat nostalgic wave I remembered of RetroBSD - a lightweight UNIX-like OS, inspired by BSD2.11 (yes, the one from '91) for...Can't wait for AI to replace us
22.3.2023 10:52Can't wait for AI to replace usThe Git repository for the cross-platform graphics library is at https://github.com/zserge/fenster and it can even run Doom! #programming #tinycode #doom #retrocomputing
24.1.2023 09:31The Git repository for the cross-platform graphics library is at https://github.com/zserge/fenster and it can even run Doom! #programming...Another little story about writing a small (if not the smallest) cross-platform GUI+audio library: https://zserge.com/posts/fenster/
24.1.2023 09:30Another little story about writing a small (if not the smallest) cross-platform GUI+audio library: https://zserge.com/posts/fenster/A new little blog post about how Git works in a few lines of code: https://zserge.com/posts/git/ #programming #git #tinycode
23.1.2023 08:47A new little blog post about how Git works in a few lines of code: https://zserge.com/posts/git/ #programming #git #tinycodeZig package manager has a really great start: https://github.com/ziglang/zig/pull/14265
I like that the MVP demo shows a large, famous C codebase (ffmpeg). It really keeps me thinking that Zig could become "a better C". #zig #programming
Does anyone have a script to install a dev mastodon instance? Everything I found so far seems to target mastodon V2 or older. And HEAD revision fails to connect to this. I really wish this was a single binary zero dependently software. #mastodon #docker
11.1.2023 09:49Does anyone have a script to install a dev mastodon instance? Everything I found so far seems to target mastodon V2 or older. And HEAD...