So this is another post on the janet journey. My goal here was to create a simple moving average function in janet (maybe just as a functional programming lover).
The code
I created a repo named numja that I intend to put all mathy stuff there. And moving average fits that category.
The second step was to create a small script that would run with the new “lib”.
The result
Simple as the proposition is, simple the code and simple the result. I used the “lib”, and plotted with gnuplot and voila!
Do you like C but changed because you were tired of the low productivity, the annoying syntax and - oh my god! - Segmentation fault? Holy shit! Me too!
But then, a couple of years ago, a friend of mine showed me Janet. And I was from the get go hooked! It took me a while to create something in it, now I have something to show.
Well, I have this pet project that it is to create a Janet wrapper for ncurses. But that will deserve a post on its own. For now, I will show a game of life using the prototype version of the janet-ncurses.
/comments ~lucasemmoreira/opinions@lists.sr.ht?Subject=Re: Moving averages beatifully