News for hackers. Stuff that matters.

xandris

Re:Bash code generator for command-line arguments on Friday October 02, 2020 @12:45PM (#24664435)
Wait, --help should print to stdout so that

    fancycommand --help | less
works as expected. Otherwise, the help text will dump to the screen and less will erase it when it decides to redraw its empty buffer! Actual error messages should go to stderr so that I can redirect them to an error log or so I can suppress them if need be, or I could also be doing > /dev/stdout to silence normal output but I don't want errors to be discarded.
Re:Being OK with not being extraordinary on Monday August 24, 2020 @02:10PM (#24263525)
This is my steady state. I don't think people shouldn't be valued by their output, and I'm content to spend time with my family, learn about the world around me, have fun, and do my best at work. I do go through episodes where the need to create something worthwhile takes ahold of me, though, and it can be debilitating for a few days.
Re:Where do argc and argv come from? on Monday August 10, 2020 @02:08PM (#24112207)
At least on the toolchains I'm familiar with, the linker will insert crt0.o, a very basic part of the C runtime, which contains a _start implementation that pulls argc, argv, and envp from the stack:

https://en.wikipedia.org/wiki/Crt0

So it's not really part of the "compiler" itself, it's usually an object file the linker includes in the linking job on your behalf.