Zsh and Fish’s simple but clever trick for highlighting missing linefeeds
tl;dr: We look at how Zsh and Fish is able to indicate a missing terminating linefeed in program output when the Unix programming model precludes examining the output itself.
Visit vidarholen.net → On Hacker News Apr 2017 – Jul 2025
Software Engineering 10Tools & Productivity 4Systems & Performance 2Programming Languages 2Math & Algorithms 1History & Retro Computing 1
tl;dr: We look at how Zsh and Fish is able to indicate a missing terminating linefeed in program output when the Unix programming model precludes examining the output itself.
When seeing the phrase “dynamic programming” in an algorithms class or leetcode study guide, the first question people ask is “what does ‘dynamic’ mean in this context?”.
In shell scripting you sometimes come across comparisons where each value is prefixed with "x". Here are some examples from GitHub:
tl;dr: dd works for reading and writing disks, but it has no "low level I/O" capabilities that make it more suited for this than any other shell utility. Like cat you should use it where it makes sense, e.g. to take advantage of its wide array of options, rather than try to ensure that all disk related commands begin…
The target system was a distributed data processing platform that ran across hundreds of thousands of machines. At such scales, a 0.5% improvement would easily make up my salary going forward, and 2% was a good result for the half.
ShellCheck is a static analysis tool that points out common problems and pitfalls in shell scripts.
The latest 4.13.9 source release of the Linux kernel is 780MiB, but thanks to xz compression, the download is a much more managable 96 MiB (an 88% reduction)
How many times are words, names or functions found in the Linux kernel source code? Browse an example or write your own comma-separated list to find out! You can use * for wildcards, foo|bar for sums, and a word is defined as \<[[:alnum:]_]+\> (ignoring case, considering accents).
There is a subreddit /r/nononoyes for videos of things that look like they’ll go horribly wrong, but amazingly turn out ok.
tl;dr: With the Netpbm file formats, it’s trivial to output pixels using nothing but text based IO