3 ms·
Off topic but related: I played around with getting Nim running on an Arduino. 1. I found a critical bug almost immediately, but Andreas fixed it within 24 hou
by wiremine 4y ago
Off topic but related: I played around with getting Nim running on an Arduino.
1. I found a critical bug almost immediately, but Andreas fixed it within 24 hours, and was super helpful.
2. Once the issue was resolved, it was surprisingly straight forward to get it running. I started by wrapping the arduino libs, and quickly shifted to wrapping the AVR libraries directly.
One take away was: Nim (and Julia) are likely really nice languages to run in these sort of low-level environments.
Another take away: there's an opportunity to develop a low-level C-based library to better support efforts like this. Both AVR and Arduino libraries weren't designed to be wrapped in something like Nim. And the Arduino codebase could use a healthy refactoring.
- j-james 4y agoNim also has some pretty good ESP32 bindings: https://github.com/elcritch/nesper https://github.com/elcritch/nesper
- amkkma 4y agoCool! How big were the emitted nim binaries?
- wiremine 4y agoNot to bad! I don't have a detailed analysis, but they were small. Maybe a few extra K over straight C code.
- hahaitsfunny 4y ago> And the Arduino codebase could use a healthy refactoring. So could Nim's stdlib and compiler backend, but the leaders have no intention of doing that, and never have, which is why there is a hard fork.
- planetis 4y agoLies, Nim 2 is in development.