I wrote my first ever library; using Nim.
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 (link below).
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!
https://github.com/bsljth/printo
https://www.davidhaney.io/npm-left-pad-have-we-forgotten-how-to-program/
Subscribe to my newsletter
Read articles from Basil Ajith directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Basil Ajith
Basil Ajith
In Christ Jesus - Husband of Alfia Abubaker - Father of Ezra Don Basil - Making Computers Do Things