fosstodon.org is one of the many independent Mastodon servers you can use to participate in the fediverse.
Fosstodon is an invite only Mastodon instance that is open to those who are interested in technology; particularly free & open source software. If you wish to join, contact us for an invite.

Administered by:

Server stats:

11K
active users

“The Design of a Self-Compiling C Transpiler Targeting POSIX Shell” (2024)
doi.org/10.1145/3687997.369563

“We have developed pnut, a C to POSIX shell transpiler written in C that generates human-readable shell code. […] Together, pnut and the shell serve as the seed for a chain of builds that create increasingly capable compilers up to the most recent version of [GCC]”

(@monnier is among the authors 👋)

Cc: @janneke @stikonas

ACM ConferencesThe Design of a Self-Compiling C Transpiler Targeting POSIX Shell | Proceedings of the 17th ACM SIGPLAN International Conference on Software Language Engineering

The bit about Guix’s full-source bootstrap relying “on a large amount of x86 machine encoding of instructions and assembler code that require experts to audit”, right after mentioning the 357 bytes of x86 instructions, is hard to understand.

@monnier @janneke @stikonas

I also wonder what makes the authors think “pnut can bootstrap these binaries in fewer steps and less code to audit”.

The “readable shell” part is questionable to me: I think the right way to frame it is in terms of whether the thing is source code, not whether it’s “readable”—if it’s not source, why even look at it?

@stikonas @janneke @monnier

Anyway, good to see the #bootstrappable community growing with a diversity of options on the table. Let’s talk!

@monnier @janneke @stikonas

@stikonas Woow. I thought this had reached a climax but I keep being impressed.

@janneke @monnier

@civodul @janneke @monnier I just realized that I can shrink hex0 from 190 bytes to 182 bytes. So it keeps going down.

@stikonas @civodul @monnier that's amazing!

And I'm sure you won't sacrifice readability, right?

@janneke @civodul @monnier Well, it's a change only in the elf header, we can overlap some identical parts. No changes in the actual program itself.

@janneke @civodul @monnier Hmm, though I should check whether builder-hex0 deals fine with such hack...