Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What does 1.5 lines of code mean?


'Give me your attention'.


I was wondering the same thing. Perhaps he means all the extra "fire::" annotations one needs to put in place in function parameter lists as well as the ultimate dispatcher instatiating cpp macro? Really there is always at least 2.5 with the #include <fire.h>, later macro and annotations.

https://github.com/c-blake/cligen achieves the actual 1-line of code dream without extra annotations and even leveraging existing API documentation and even colorizing said rST docs in terminal generated help output. { Of course, that one line might be an "import cligen; dispatch(foo)" which is arguably denser than most people would format it. } One usually wants to add some per-parameter help, though, unless your parameter names are always much more descriptive than "x" and "y".


I think 1 line to modify the function sig, and .5 to call the library

Its purely marketing math, I think.


I think it’s the opposite


Neither alternative makes sense, so you are both correct.


>Note that parsing and conversion takes up just 0.5 lines of fired_main().


The last line calls fired_main and is the full line.

The definition of the function fired_main is similar to the definition of the function main, so it is not an extra line that is needed. But about half of the line deal with describing the command line arguments.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: