Top all-time · #1553
etalabs.net
Personal blog · etalabs.netprogrammingsystems
etalabs.net is a personal blog at etalabs.net about programming and systems. Since 2011, 49 different Hacker News readers have linked it 59 times, most often “Comparison of C/Posix standard library implementations for Linux”. No feed was found, so read it on the site itself.
Most-linked posts?
- Comparison of C/Posix standard library implementations for Linux23 people · 24 mentions · first linked 2012-06-02
- Rich’s sh (Posix shell) tricks9 people · 15 mentions · first linked 2014-04-16
- Rich’s sh (Posix shell) tricks5 people · 7 mentions · first linked 2020-01-17
- Musl libc4 people · 4 mentions · first linked 2011-02-14
- Comparison of C/POSIX standard library implementations for Linux3 people · 3 mentions · first linked 2019-04-15
- What Is Overcommit? And Why Is It Bad?2 people · 2 mentions · first linked 2019-06-27
- Musl 0.9 released, now under the MIT license2 people · 2 mentions · first linked 2012-05-14
What Hacker News says?
Oh, my young friend, you have no idea what POSIX has done to you. "While no one sane would put newlines in directory names, such corruption of the results could lead to exploitable vulnerabilities in scripts." http://www.etalabs.net/sh_tricks.html
Comment linking /sh_tricks.html
on “I'm “still afraid to use spaces in file names” years old”Submitted Comparison of C/POSIX standard library implementations for Linux as a story · 142 points
HN discussionI notice that the author is going into awk for floating point processing. The 1993 language standard for the Korn shell brings floating point into the language as a native data type. This advanced version of the Korn language does not appear to be under active maintenance, but it will likely be much, much faster than handling floating point in awk. Unfortunately, none of the BSD-licensed clones of Korn support the 1…
Comment linking /sh_tricks.html
on “My thoughts on writing a Minecraft server from scratch in Bash”Submitted Comparison of C/Posix standard library implementations for Linux as a story · 110 points
HN discussionI found this web page, from the author of musl libc, very insightful: http://www.etalabs.net/sh_tricks.html Shell scripts are great, I use and write them every day (and quite advanced ones, too). But it's very hard to make a shell script robust. Unfortunately it's hard to find a replacement that is stable and installed everywhere. Perl is pretty close. And python too, if you are careful about making your script comp…
Comment linking /sh_tricks.html
on “Better bash in 15 minutes”Submitted Musl libc as a story · 85 points
HN discussionPOSIX shell is miserable for programming anything beyond a couple lines. It doesn't even have arrays[1], so you have no available container types within the interpreter itself. [1] Well, it has $@, which you can use as a general-purpose array with some hacks[2], but that's no way to live. [2] http://www.etalabs.net/sh_tricks.html
Comment linking /sh_tricks.html
on “Hypermodern Python”Submitted Comparison of C/Posix standard library implementations for Linux as a story · 70 points
HN discussionHere's another link which compares musl, uClibc, dietlibc, and glibc sizes, features, and performance. http://www.etalabs.net/compare_libcs.html It says musl's smallest static C program can be 1.8k as opposed to glibc's 662k, showing libc doesn't always have to be big and bloated.
Comment linking /compare_libcs.html
on “Web Assembly and Go: A look to the future”Submitted Rich’s sh (Posix shell) tricks as a story · 54 points
HN discussionI will just leave this here. "I am a strong believer that Bourne-derived languages are extremely bad, on the same order of badness as Perl, for programming, and consider programming sh for any purpose other than as a super-portable, lowest-common-denominator platform for build or bootstrap scripts and the like, as an extremely misguided endeavor. As such you won’t see me spending many words on extensions particular…
Comment linking /sh_tricks.html
on “Pure Bash Bible – A collection of pure bash alternatives to external processes”Submitted Rich’s sh (Posix shell) tricks as a story · 4 points
HN discussionHere's my full bash reading list: - ShellCheck: life-changing BASH linter and testing toolkit https://github.com/koalaman/shellcheck - 30 interesting commands for the Linux shell – Víctor López Ferrando https://www.lopezferrando.com/30-interesting-shell-commands/ - 7 Surprising Bash Variables https://zwischenzugs.com/2019/05/11/seven-surprising-bash-va... - anordal/shellharden https://github.com/anordal/shellharden/…
Comment linking /sh_tricks.html
on “Bash Pitfalls”Submitted Rich’s sh (Posix shell) tricks as a story · 3 points
HN discussionmusl is about 2x slower than glibc: http://www.etalabs.net/compare_libcs.html . Other libraries are even worse.
Comment linking /compare_libcs.html
on “Docker Official Images Are Moving to Alpine Linux”Submitted Musl 0.9 released, now under the MIT license as a story · 3 points
HN discussion> Glibc is faster (and better) Faster is objective, and in most cases correct. Glibc has a lot mor optimization over the years. Better is subjective and completely depends on your use case: http://www.etalabs.net/compare_libcs.html Similar point to systemd, it is kind of misleading to say that it's faster, it is parallel and event driven, which definitely makes it's end to end time shorter on parallel hardware. And…
Comment linking /compare_libcs.html
on “Microcontainers – Tiny, Portable Docker Containers”Submitted What Is Overcommit? And Why Is It Bad? as a story · 2 points
HN discussionIf I may add a few critiques... # Make sure no one else is using rsync pro_on=$(ps aux | grep -c rsync) A better way to do that is with the flock utility. ( flock -n 9 || exit 1 # Critical section-allow only one process. ...single thread shell script ) 9> ~/.empty_lock_file Note that the flock utility is specific to Linux, but POSIX mkdir() is atomic and could be more portable. "$ {SOURCES[@]}" POSIX shells do not s…
Comment linking /sh_tricks.html
on “An almost perfect rsync over SSH backup script”Submitted Rich’s sh (Posix shell) tricks as a story · 2 points
HN discussionThese ones found no difference: http://www.etalabs.net/compare_libcs.html https://users.rust-lang.org/t/optimizing-rust-binaries-obser... This guy found Musl much slower for multithreaded allocation: https://www.linkedin.com/pulse/testing-alternative-c-memory-... These found Musl a bit slower with LTO: https://github.com/vectordotdev/vector/issues/2313 Except for that LinkedIn one (which feels like it might be a bug…
Comment linking /compare_libcs.html
on “Porting systemd to musl Libc-powered Linux”Submitted Rich’s sh (Posix shell) tricks as a story · 2 points
HN discussion1. naming conventions are unusual and inconsistent (List_destroy but then there's destroy_svcs_list) 2. the return value of malloc() et al. isn't checked ( http://www.etalabs.net/overcommit.html ) 3. the register storage-class specifier is used multiple times (mainly lib/s16db/translate.c) 4. function declarations are missing a prototype (() instead of (void))
Comment linking /overcommit.html
on “System XVI: A replacement for systemd”Submitted What is overcommit and why it is bad as a story · 2 points
HN discussionThe author of the musl C library has a very poor opinion of the POSIX shell, and has published his "tricks" to force expected behavior. This is very useful for those who are stumped by a failing script. "I am a strong believer that Bourne-derived languages are extremely bad, on the same order of badness as Perl, for programming, and consider programming sh for any purpose other than as a super-portable, lowest-commo…
Comment linking /sh_tricks.html
on “Effective Shell”Submitted Comparison of C/Posix standard library implementations for Linux as a story · 2 points
HN discussionWow, you people are really young. http://www.etalabs.net/sh_tricks.html
Comment linking /sh_tricks.html
on “Why not parse `ls` and what to do instead”Submitted Comparison of C/Posix standard library implementations as a story · 2 points
HN discussionHere is a web page comparing the different C library implementations: http://www.etalabs.net/compare_libcs.html For the .a size: musl: 426k uClibc: 500k dietlibc: 120k If you statically link to these, your final binary will only pull what is actually needed and be smaller than this.
Comment linking /compare_libcs.html
on “Efficient string copying and concatenation in C”Submitted Comparison of C/POSIX standard library implementations for Linux as a story · 2 points
HN discussion