3 ms·
If a little CLI app to do something useful (instead of say, some shell script/batch file or something) is your entry point then you might try cligen [1]. Every
by cb321 6y ago
If a little CLI app to do something useful (instead of say, some shell script/batch file or something) is your entry point then you might try cligen [1]. Everyone is different, but from many and varied reports (e.g. in this very thread [2]), it is hugely more probable that you get up & running with some basic skills in like 30 minutes to 4 hours or so with Nim than you would with Rust. Nim really seems to "scale up gracefully" for most.
[1] https://github.com/c-blake/cligen https://github.com/c-blake/cligen
[2] https://news.ycombinator.com/item?id=25596285 https://news.ycombinator.com/item?id=25596285
- blackrock 6y agoNim’s available argument parser library needs some more maturity, as compared to Python. Python has a great argparse library, and it would be good if Nim could emulate that.
- cb321 6y agoWell, cligen is pretty mature/featureful, less work to use and well maintained and is the most common recommendation in Nim. If you happen to like more verbosely specified CLI interfaces like Python's argparse there are at least two pretty close to the Python argparse -- therapist [1] and nim-argparse [2]. There is much more to any programming language than its stdlib. { If you find these insufficiently "drop-in compatible", well, you can write your own port of argparse.py that is closer. :-) That is probably a good exercise. } [1] https://maxgrenderjones.bitbucket.io/therapist/latest/therapist.html https://maxgrenderjones.bitbucket.io/therapist/latest/therap... [2] https://www.iffycan.com/nim-argparse/argparse.html https://www.iffycan.com/nim-argparse/argparse.html
- blackrock 6y agoI did entertain that idea. But it would’ve detracted my efforts from my actual goal. therapist looks interesting. I’ll take a look at this. Thanks.