News for hackers. Stuff that matters.
Re:Nim in 2020: A Short Recap by cb321 on Thursday December 31, 2020 @01:32PM (#25595503)
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 [2] https://news.ycombinator.com/item?id=25596285

Re:Nim in 2020: A Short Recap by blackrock on Friday January 01, 2021 @03:18AM (#25601691)
Nim’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.

Re:Nim in 2020: A Short Recap by cb321 on Friday January 01, 2021 @05:14AM (#25602192)
Well, 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/therap...

[2] https://www.iffycan.com/nim-argparse/argparse.html

Re:Nim in 2020: A Short Recap by blackrock on Friday January 01, 2021 @06:03AM (#25602395)
I 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.