Hacker News new | ask | show | jobs
by ninjin 1311 days ago
Since I teach a fair amount of machine learning, I have been pondering on what a “minimal”, low-level implementation of a library would look like and got very excited hearing about LibNC. Sadly it seems like Bellard is keeping the source for this one: “The LibNC library is free to use as a binary shared library. Contact the author if access to its source code is required.” [1]. Not that you can every accuse the man of being greedy after all the code he has shared, but dang I wanted to read it. '^^

[1]: https://bellard.org/libnc/libnc.html#License

2 comments

Seems that it would be worth your time to contact Bellard and ask about making it available for teaching (and/or under an open license of some kind)?
Thank you, I will try to gather the courage. Partially I guess I suspect that he chose to do what he did for a (good?) reason and I do not really think it is my place to question it. Partially I guess I am somewhat reluctant to poke a borderline god of our discipline with a beggar’s request. '^^

No promises, but I will try to gather the courage and thank you for the encouragement.

TinyGrad is basically that and is open source, albeit not in C
Yes, kind of, but it depends on NumPy which is fairly big if your goal is for students to grasp and demystify the whole way down to the hardware. Other candidates would be torch7 [1], but it is somewhat married to the Lua API which drives it.

[1]: https://github.com/torch/torch7

You might like micrograd: https://github.com/karpathy/micrograd. There's also this video where the author explains how he built it: https://www.youtube.com/watch?v=VMj-3S1tku0