News for hackers. Stuff that matters.
Re:Stop writing CLI validation. Parse it right the first time by andrewguy9 on Saturday September 06, 2025 @09:48PM (#45154641)
Docopt!

http://docopt.org/

Make use of the usage string be the specification!

A criminally underused library.

Re:Stop writing CLI validation. Parse it right the first time by tomjakubowski on Sunday September 07, 2025 @12:11AM (#45155334)
A great example of "declaration follows use" outside of C syntax.
Re:Stop writing CLI validation. Parse it right the first time by fragmede on Saturday September 06, 2025 @10:13PM (#45154764)
My favorite. A bit too much magic for some, but it seems well specified to me.