3 ms·
Yeah. That is my goal as well. I struggled choosing between learning Rust, Zig, Ocaml or F# and landed at Nim Given the compilation step to C allows nice FFI a
by weitzj 4y ago
Yeah. That is my goal as well. I struggled choosing between learning Rust, Zig, Ocaml or F# and landed at Nim
Given the compilation step to C allows nice FFI and using all kinds of compilers
- cb321 4y agoI think it's a pretty nice prog.lang (PL). You may be very happy. Though nothing is perfect, there is much to recommend it. By now I've written over 150 command-line tools with https://github.com/c-blake/cligen https://github.com/c-blake/cligen . A few are at https://github.com/c-blake/bu https://github.com/c-blake/bu or https://github.com/c-blake/nio https://github.com/c-blake/nio { screw 1970s COBOL-esque SQL ;-) } or in their own repos. I use quite a few every day..(EDIT: some even dozens of times per day - "production" is more an aspect of code than a PL itself - e.g., is poorly tested Python code "production"). If it helps, I like to use the "mob branch" [0] of TinyCC/tcc [1] for really fast builds in debugging mode, but this may only work if you toss `@if tcc: mm:markAndSweep @end` or similar in your nim.cfg. Then I have a little `@if r: ...` so I can say `nim c -d:r foo` for a release build with gcc/whatever. [0] https://repo.or.cz/w/tinycc.git https://repo.or.cz/w/tinycc.git [1] https://en.wikipedia.org/wiki/Tiny_C_Compiler https://en.wikipedia.org/wiki/Tiny_C_Compiler
- sva_ 4y ago> https://github.com/c-blake/bu https://github.com/c-blake/bu That's quite an impressive amount of cmdline tools.
- cb321 4y agoThanks. Just a fraction published as I try to motivate/document/clean up before doing so. I kind of live at the Zsh prompt and tend to fill gaps as I find them & iterate on that. Also, if you think of an idea for more, please feel free to raise an issue - maybe it's already done somewhere. Or even better, use it as an excuse to learn Nim and file a PR or even better do your own repo. :)