[Toybox] Lots of libc's.

David Seikel onefang_toybox at dave.isageek.net
Tue Aug 30 01:59:37 PDT 2022


Justine Tunney is the main developer, perhaps our local Google people
might know her, she used to work there.

On 2022-08-28 06:35:00, Rob Landley wrote:
> On 8/27/22 20:11, David Seikel wrote:
> > On 2022-08-27 04:06:58, Rob Landley wrote:
> >> Honestly: people have already done this. A lot. What new niche is not being
> >> served here? Just "not invented here"...?
> >> 
> >> Ahem. Backing slowly away, as previously mentioned...
> > 
> > Have you stumbled across https://github.com/jart/cosmopolitan yet?
> 
> Just enough to sigh deeply, note that you can sing "Dunning Kruger" to Frere
> Jacques, and move on.

If you had spent the amount of time you had spent writing that wall of
text, instead actually reading some of the top level docs first, then
your wall of text would not have so many wrong assumptions.

If I had spent more time writing that last paragraph, it might be easier
to understand.  lol

<big snip>

The ability to run on different OSes is coz the beginning of it is a
polyglot hack that on Linux looks like a shell script that runs the rest
of the binary, but on Windows looks like an executable header.  Actually
read their description of how that works for more details.  Apparently it
can also run from bare metal, EFI can boot straight into it.  I've not
tested that.


I once did a similar polyglot hack that merged .ini config files and
shell scripts, calling them .shini files.  Coz .ini has # as a comment
character, so it started with the usual shell -
#! /usr/local/bin/programThatReadsThisIniFile.

They do try to write their library to be POSIX, filling in some for those
OSes that are not so much POSIX.

Lots of the libc parts are assembler.

A web server in a zip file that runs most places works for my OpenSim
replacement project, since OpenSim is mostly a bunch of badly written
from scratch web servers that fall over each others feet.  Redbean can
already run itself within itself as a separation of concerns web server. 
That and Lua support greatly interests me.

> With many years of diligent effort from a very large team, the thing you pointed
> at might manage to only suck as badly as cygwin. If they're very lucky. I could
> be wrong and thus pleasantly surprised, but... you know, poke me if so?

It all sounds great, so long as the quality is there.  I've only begun to
poke at it, would love some others opinions that know this stuff.  And
from those that know Justine.

The down sides I have found so far -

It's assembler bits are x86 only,  Maybe only 64 bit x86.  They mention
some sort of emulation layer for ARM that I haven't looked into.

You can't really build it from scratch without using their pre built
build tools, which they do provide the source for.  I'm reminded of
Reflections on trusting trust.  I'm hoping your airlock build thingy
might help there.

Some of the code leans more towards the unreadable clever hack end of the
spectrum.  I'm good at reading code, but I know you are not.

-- 
A big old stinking pile of genius that no one wants
coz there are too many silver coated monkeys in the world.


More information about the Toybox mailing list