Originally posted on my old blog on 03 August 2023. Edited.
I wrote my first ever library using the Nim programming language. It’s called printo
(pronounced “print-o”). You can check it out at its GitHub repo.
It’s a small library. I was initially worried whether it is worth making and making it public. Then, I read the story of left-pad and the controversy around it. FYI, left-pad was a NPM library that was being used by thousand other projects for adding some padding to a string (yeah, it’s true). The controversy around the library was that the author decided to pull the plug on one not-so-fine day which led to the thousand projects using it to break (at least some might have). This was big news.
Anyway, the total lines of code in left-pad was 47 (excluding the types file, package.json etc.). However, 47 lines of code were being used by thousands (actually, about 15 lines are just comments). If this cannot motivate someone to write a library, nothing will. So, I made printo. Enjoy!
Leave a Reply