IRC channel logs
2026-05-10.log
back to list of logs
<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 <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>I'm still working my way slowly through the blynn compiler. I'll be ready to try our your bit soon. <aggi>wildwestrom> I understand the urge 100% <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 <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 <siraben>no one has taken up the Forth challenge yet :P I think it's a bit impractical <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 <siraben>hcc path to self-hosting TCC is 7m56s vs. 4m31s for MesCC <roconnor>it goes from mutually right to virtually. <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>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>To be fair, I have a *somewhat* newer M2Planet, so this is not entirely unexpected. <siraben>I believe we have a Nix definition in that repo for reproducibility