README.md |
The System
I've been stuck in analysis paralysis for literally years about choosing a systems programming language.
I've always wanted to write code for computers. But I've never really worked with a natively compiled language, except for a bit of C++ in an old job, but that was so tied up in a Visual Studio behemoth I felt completely distanced from the machine.
I made an attempt to learn Zig via the ziglings: https://git.adamu.jp/adam/ziglings. I even flew to Italy and attended the Software You Can Love conference 2022. But then got stuck once I actually tried to write anything due to memory management. I want to give it another go.
But I'm also torn on whether I should learn Rust instead. Zig feels like the right choice: simplicity, not run by a megacorp, no weird governance issues, etc., however I can't stop myself from thinking things like "but so many people use Go, maybe I should just use it", or "life's too short to manually manage memory, maybe Rust's borrow checker is the answer", etc.
Anyway, rather than be constantly stuck in indecision, I decided to try a simple project in each of Zig, Rust, and Go, to get a feel for each one. I will start very simple, then add a couple of layers of complexity to get a feel for how code organization works. It's not an ideal plan, because I'll be judging as a beginner and will have likely made a bunch of newbie errors or followed some anti-patterns, but at least it'll give me concrete experience in order to make a more informed decision for which one to commit to learning more fully.
Initial App
It's dull, but I'll make a simple CLI calculator.
It should be able to parse an input and perform the four basic operators:: +
, -
, *
, /
,
printing the result to the console.
Bigger App
Once the calculator is done, I might have made a decision or decided to drop some candidates. If there is still some indecision, I will also implement a mini Mastodon CLI. I'm probably not going to implement ActivityPub, but more just use the Mastodon API. This will give me a taste for making HTTP request and a bit of networking.
There should be two commands:
- toot - send a toot
- feed - show the first few toots of my feed
Instance URL and auth tokens etc. can be handled via environment variables.
Final challenge
NIFs for an Elixir library.
I like Elixir, I've been using it as a hobby since ~2016 and professionally since 2021. I've always been curious about native bindings, so as a final challenge I would like to make some kind of Elixir library that uses NIFs built using these languages.
Progress
Space for notes and thoughts as I progress.