[HN Gopher] Musl: List of alternative libs that are lightweight,...
___________________________________________________________________
Musl: List of alternative libs that are lightweight, not bloated
and efficient
Author : _benj
Score : 52 points
Date : 2023-07-21 12:39 UTC (10 hours ago)
(HTM) web link (wiki.musl-libc.org)
(TXT) w3m dump (wiki.musl-libc.org)
| pipeline_peak wrote:
| Honestly not trying to troll, if you're trying to avoid bloat
| shouldn't you go with C instead of C++.
|
| At some point you're going to run into virtual tables among other
| overhead.
| mike_hock wrote:
| You run into virtual tables more often in C because you can't
| build an abstraction otherwise, whereas in C++ it could be
| inlined.
|
| Example: Callbacks in C are always virtual, whereas in C++ you
| can take the callback as a template parameter.
|
| Not distinguishing between "virtual" or "function pointer" or
| any other names for the same concept (dynamic call address).
| dundarious wrote:
| Your general point is in agreement with the article then.
| SubjectToChange wrote:
| Less "bloat" doesn't mean more performance. C++ libraries have
| soundly beaten their C counterparts in HPC, HFT, ML, etc. And
| in any case it is still possible to write a C-dialect in C++ if
| you so choose.
| pipeline_peak wrote:
| I was referring to bloat as in memory usage.
|
| A quick glance at Moe, I see inheritance in something as
| fundamental as buffers.
| SubjectToChange wrote:
| Again, you can write a C89 (even more with C++20) dialect
| _in C++_. There's practically nothing C can do that C++
| can't. Also, the fact that the linked page recommends
| tinycc and pcc pretty much proves they don't care about
| performance _or_ memory usage.
| Y_Y wrote:
| Great case for an Oxford comma here
| _benj wrote:
| hehe! ESL is strong with this one :-)
| _benj wrote:
| Funny to get downvoted for a tongue-in-cheek self-deprecating
| joke about your own sentence!
| chmaynard wrote:
| I'll take a bloated and efficient library any day.
| mike_hock wrote:
| Not fixing an unchecked malloc failure in an ncurses alternative
| gets you struck out on the list, but having unpatched
| vulnerabilities in a crypto library doesn't.
|
| Also, the link to uSTL is dead.
| SubjectToChange wrote:
| What is the best piece of software the musl/suckless/cat-v crowd
| have to offer? They smugly moan about the state of modern
| software but only manage to write alternatives to relatively
| trivial programs. For instance, it's ridiculous to recommend
| tinycc or pcc as an alternative to GCC or Clang.
| sebastiandb wrote:
| You're right, but that's kind of the point of suckless. To
| them, we should all be using software that is small, self-
| contained, and simple in implementation; both GCC and Clang are
| too complex in that case. C++ itself sucks to them, so g++ and
| clang++ don't need alternatives anyway.
|
| Sometimes, it would mean separating what one piece of software
| does into many in order to replicate what that one complex
| thing does.
|
| I don't subscribe to their philosophy, by the way. "Good"
| software which is elegant and easy to use is often very
| complicated in implementation.
| _benj wrote:
| musl itself, busybox let's you have a full unix set of tools
| for 700kb, which is awesome for embedded Linux. There's also
| dropbear, and ssh/sshd implementation in about 110kb binary. So
| when talking about bloat in embedded, it something very
| measurable when the option is a 32MB NOR flash chip for the
| root file system
| dduong wrote:
| dwm is nice. I enjoyed using it for a while.
| SubjectToChange wrote:
| I'll assume dwm is great and all, but I feel like that just
| proves my point.
___________________________________________________________________
(page generated 2023-07-21 23:02 UTC)