4 ms·
I like to increment the most significant digit of my terminal history size every time I run into a compiler error that exceeds the previous value. On Saturday,
by AlotOfReading 2y ago
I like to increment the most significant digit of my terminal history size every time I run into a compiler error that exceeds the previous value. On Saturday, it went up from 40k to 50k.
I laugh to hide my pain.
- codetrotter 2y agoWhen you get to 100k, will the next increment be to 200k then?
- AlotOfReading 2y agoI think the next increment from 100k would be to seriously consider a different language.
- bee_rider 2y agoYou must have a much more advanced relationship to errors than me. I don’t think I could tell the difference between 100k or 40k lines worth of errors, and it was only halfway through writing this message that I realized you might actually be talking about the size of an error? Oh no.
- Twisol 2y agoI suspect you'd notice simply because scrolling to the top of your history isn't sufficient anymore to find the first error. (Assuming one clears their shell history before compilation, which is very nearly required in this context...)
- lqet 2y agoI tutored a C++ beginners course on Linux a few times. I have had people ask me for help because the error messages were so long, their terminal history wasn't large enough to scroll back to the first error. Even if you have basic bash skills, just piping the compiler output to less or head also doesn't work, because the errors go to stderr. It's an incredible source of frustration for beginners.
- wglb 2y agoWouldn't it work if you did 2>&1 as part of the redirect?
- rocqua 2y agoYes, but if someone only just learned about less and piping, they probably won't know about fd 2 being stderr, fd based redirection, and hence don't understand it at all
- professoretc 2y agoFor my beginner programming class, I have them use a script `compile` which handles compilation and linking, while also enabling enabling all the warnings/errors I think are helpful, and also doing the above redirection. An absolute beginner doesn't gain anything from invoking `g++` directly.
- paulddraper 2y agoYes, but most beginners have never seen (or remember) that.
- wglb 2y agoKnowing about some of these shell bits would be useful for someone learning about C++.
- jprete 2y agoI know about that mechanism but I use it so infrequently that I have to look it up every time; the syntax doesn't really match anything else I know. It's also hard to look up because even the right search terms fetch a lot of nearby-concept results so I have to dig for the exact idea. (Probably this is an ideal LLM question though!)
- LoganDark 2y agoThere used to be a search engine called SymbolHound whose entire shtick was to not ignore special characters in the query. Unfortunately it looks like it's gone now, seemingly without so much as a farewell. Their posts just stopped.
- queuebert 2y agoPipe to command-line LLM: https://justine.lol/oneliners/ https://justine.lol/oneliners/
- renox 2y ago|& tee <log file> is your friend.