~/talk

The Design of a Self-Compiling C Transpiler Targeting POSIX Shell

Talkat SLE 2024 · 2024-10-20..10-21· [software-architecture]
links:none on file
links:none on file
links:none on file
links:none on file
slides:none on file

A C-to-POSIX-shell transpiler called pnut is implemented in C and is self-applicable: it compiles itself to human-readable shell that runs on POSIX shells (bash 2.05b and others) and serves as a seed to bootstrap a full GCC toolchain from only a shell and source. Generated shell is about 35% larger than the C, compiling the pexe compiler from shell takes ~1 minute, pexe is ~5,000 LOC, and current limits include no floats, unsigned fields, function pointers, varargs or unions.

AI-written summary · about

  1. 0:00Peanut C Transpiler intro
  2. 1:05Targeting POSIX shell for bootstrapping
  3. 3:14Compilation and shell benefits
  4. 5:22Bootstrapping workflow
  5. 7:29Challenges in C to shell
  6. 8:53Arithmetic and memory handling
  7. 11:23Function calls in shell
  8. 13:31Character I/O implementation
  9. 14:36Magic numbers and constants
  10. 16:23C subset and compiler features
  11. 17:49Performance and compatibility
  12. 18:29Conclusion and future work
  13. 19:06Q&A: Parallelism
  14. 20:12Q&A: Unsupported C features
  15. 20:56Q&A: Structs and unions
  16. 21:41Q&A: Error handling
  17. 22:02Q&A: Auditing automation
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.