IRC channel logs

2026-05-10.log

back to list of logs

<roconnor> https://github.com/NixOS/nixpkgs/pull/460845/changes#diff-2b785bf781ca48bb673412ce518ffc6bfee4606930822e59b7c41816dfb36159R38-R42
<roconnor>interesting
<siraben>that's a lot of patching
<roconnor>Oh I see, the blynn-complier switches from outputing ION assembly to C at some point. That's a little sad.
<siraben>roconnor: well it's still majority ION assembly
<siraben>in raw bytearray form
<roconnor>Oh I see.
<matrix_bridge><wildwestrom> roconnor
<matrix_bridge> "drive C out of the entire software ecosystem"
<matrix_bridge><wildwestrom> I understand the urge 100%. That's what initially led me to this project.
<roconnor>wildwestrom: In order to eschew C for functional languages the first thing to do would be to actually bootstrap a functional language without using C. I had been working on a design for that.
<roconnor>You'd probably want to start with a simple combinator language which is easy to implement in assembly, and build up from there: first implementing a "bracket abstraction" algorithm which lets you add lambda expressions to your language. Then writing a more complex but better bracket abstraction algorithm with the aid of having lambda expression. Add datatypes that compile to Church or Scott representations, and something something something.
<roconnor>Anyhow, I didn't know this, but it turns out that Ben Lynn had already figured out and documented such a design years ago.
<roconnor>And while his goals were not quite the same with regards to eliminating C, basically his entire design could achive this with a little bit more work.
<roconnor>Though I still have a bit of an open question with regards to writing a garbage collector where maybe using a linear type system might be the answer.
<awesomebish>how does it cut the bootsrap roconnor ? as in gc or not, does it inject before tcc -> gcc say?
<siraben>roconnor: the vm or rts file could be rewritten in m1 directly I think. with a bit of work could just go to blynn via assembly rather than through m2-planet
<siraben>let me know if you have any questions or feedback about the bootstrap, can replicate it etc. i added CI yesterday
<roconnor>siraben: That's what I'm imagining.
<roconnor>I'm still working my way slowly through the blynn compiler. I'll be ready to try our your bit soon.
<siraben>great.
<aggi>wildwestrom> I understand the urge 100%
<aggi>i don't
<aggi>in the end, the cornerstone of proof is a complete bootstrap including firmware/platform-initialization, bootloader, kernel
<siraben>no urge im just excited someone else is looking at it too
<siraben>it's pretty much done i'm just working on whittling down the end-to-end time and extending it for other platforms, need to take some timing measurements against mescc
<matrix_bridge><Jeremiah Orians> Well, thus far only C, FORTH and Lisp have bootstraps from M0 (with C just being the one that made it to the finish line of bootstrapping first)
<aggi>for that matter, the pnut -> tinycc bootstrap from laurenth is much faster than mescc already
<siraben>oh, what's pnut?
<siraben> https://pnut.sh/
<matrix_bridge><Jeremiah Orians> Using a shell to bootstrap tcc
<aggi>it's an intermediate c-compiler spawn from M2
<aggi>the posix shell is one variant, there's another for pnut -> tcc
<aggi>i've already re-integrated pnut into the tiny-bootstrap fork (codeberg.org/aggi/tiny-bootstrap)
<aggi>and succeeded to swap tcc-0.9.27 for tcc-head
<aggi>but there's another intermediate tcc-0.9.26 needed which i could not yet replace with tcc-head
<siraben>cool, so we have a bunch of bootstrap paths now
<matrix_bridge><Jeremiah Orians> And it’ll only grow with time and make DDC much more robust
<aggi>yes, and as a bonus i could review and re-confirm live-bootstrap stage0/M2-planet was/is relatively stable
<aggi>ddc?
<siraben>no one has taken up the Forth challenge yet :P I think it's a bit impractical
<siraben>diverse double compiling
<matrix_bridge><Jeremiah Orians> https://dwheeler.com/trusting-trust/
<aggi>ok
<matrix_bridge><Jeremiah Orians> Honestly the FORTH development in https://collapseos.org and https://duskos.org are able too bootstrap M2-Planet targets as well (it is up to M2-Planet parity)
<matrix_bridge><Jeremiah Orians> And one could connect multiple 8MB ROMs to store the whole bootstrap if one is willing do a little address decoding logic
<aggi>nonetheless i remain sceptical coreboot/SeaBIOS could be a candidate for a firmware-bootstrap
<aggi>although those are more lightweight fitting into 512KiB ROM than typical vendor-bios which ship with 8MiB for AGESA/ACPI/UEFI etc.
<matrix_bridge><Jeremiah Orians> We don’t need a full bios, only a handful of bios interrupts
<aggi>i'll git-push the coreboot-fork for AMD FM2 soon, it's a nice-to-have only for a linux-tcc 2.4 kernel, which actually is fully functional with a little patching to coreboot
<matrix_bridge><Jeremiah Orians> The only big thing required is RAM initialization (and that is CPU specific and can be done in assembly easily)
<aggi>yes, i do agree, a full firmware coreboot/seabios bootstrap is not feasible, and a minified platform-initialization belongs into the 4KiB size real of rickmasters stage0
<aggi>*realm
<siraben>hcc path to self-hosting TCC is 7m56s vs. 4m31s for MesCC
<roconnor>what's hcc?
<siraben>the c compiler written in haskell
<roconnor>Interesting. https://crypto.stanford.edu/~blynn/compiler/mvp.html doesn't have "uniquely".
<roconnor>it goes from mutually right to virtually.
<matrix_bridge><Andrius Štikonas> this page is probably out of date
<matrix_bridge><Andrius Štikonas> (though of course I might be wrong)
<roconnor> https://github.com/blynn/compiler/commit/b65887427dab010388122b7c9020827c3a4b451d
<roconnor>uniquely was removed in 2023 which was after the repo was forked.
<roconnor>Anyhow, I'll stick with the oriansj/blynn-compiler for nwo.
<matrix_bridge><Andrius Štikonas> yeah, makes sense now. orisnsj's fork is quite out of date now and didn't see much development
<siraben>roconnor: I added them as submodules and just went off of blynn's upstream
<roconnor>oh hmm.
<roconnor>Anyhow I ran into a small snag that I cannot build marginally.c with my more recent version of M2-Planet
<roconnor>You are not allowed to use a keyword as a argument variable name
<roconnor>Subprocess error 1
<roconnor>ABORTING HARD
<roconnor>I'll have to figure this out later.
<roconnor>for the record marginally.c is https://paste.sh/YHk413IF#YqXJpqQABvdG40RtEsttsexu
<siraben>roconnor: on oriansj's fork?
<roconnor>yeah
<roconnor>To be fair, I have a *somewhat* newer M2Planet, so this is not entirely unexpected.
<roconnor>It is a little strange though.
<siraben>I believe we have a Nix definition in that repo for reproducibility
<siraben>nix-build -A blynn-compiler