14th March 2025
Ever since I got my first ereader twelve years ago I’ve wanted an epaper laptop. The allure of a laptop which would work in direct sunlight and has incredible battery life has always drawn me. Sure, laptops have come a long way in the past twelve years, especially the battery life aspect has gotten much better. But there’s still nothing which beats epaper when it comes to the direct sunlight application. Whether or not I…
1st November 2023
Error handling, a contentious and oft-discussed topic. Each language has some way of dealing with errors, be it error codes, result types, exceptions, something entirely different, or a mix. How to properly deal with things going wrong in our programs has been important pretty much ever since we started writing programs. Papers have been written about it, talks have been held on the topic, and countless libraries have been written to bring one languages way…
8th September 2023
Recently I was met with an interesting problem when wrapping a C library in Nim. The library in question was MAPM, an older but quite complete library for dealing with arbitrary precision maths. Unfortunately the library doesn’t have much in the way of error handling. If something goes wrong it almost always writes to stderr
and returns the number 0. And to be fair, there isn’t a whole lot that can go wrong in…
8th June 2023
Nim is a great candidate for server development, but if you want to run your own server and are new to the world of server management or Linux there can be a daunting amount of information to consume in order to do it right. In this article I’ll give a quick rundown of setting up a small server capable of running your Nim server in a safe way. It is much more low-level than many…
17th April 2023
As we discovered in my last article, Nim will by default generate C code and then call on a C compiler to actually produce a binary. This might seem like an odd choice, especially in the age of LLVM. However it’s actually not uncommon for languages to compile or transpile into another language. Initially the choice to not use LLVM was simply because it wasn’t as mature back when Nim was created. Though going through…