IRC channel logs

2024-09-14.log

back to list of logs

<stikonas>oriansj: do you remember if we have a way to align data structures in M2-Planet?
<stikonas>well, I guess to 4 KiB (page size)
<stikonas>hmm, perhaps I don't need that... I can just align myself after memory is allocated...
<oriansj>stikonas: M2-Planet doesn't yet support data alignment (implicit padding) but M1 and Hex2 both do
<oriansj>just do < to align to a word
<oriansj>or <123 to padd out 123 zero bytes
<oriansj>(wouldn't be that complex to add)
<stikonas>anyway, for now I don't think I need it. I can just grab dynamic memory and align myself, don't need anything global to be aligned
<Maja_>hi, i am having thoughts about writing a standard ml implementation. have there been efforts around making that language bootstrappable yet?
<stikonas>Maja_: nothing on this channel as far as I'm aware...
<Googulator>OCaml is the closest to Standard ML to achieve a bootstrap; sadly it wasn't propagated to current versions
<oriansj>yeah the only ML we have any sort of bootstrap is OCaml: https://github.com/Ekdohibs/camlboot which uses guile which is used to generate OCaml bytecode, which is then executed by the OCaml runtime (which as far as I can tell is just a 2.6MB binary blob checked into the ocaml source repo and probably needs to be addressed to give ocaml a proper bootstrap)
<stikonas_>oh does it use another blob?
<oriansj>Maja_: so if you could look into the OCaml runtime's bootstrap and/or extend the OCaml bootstrap to the current release, that would be extremely helpful for the ML family bootstrap.
<stikonas_> https://arxiv.org/pdf/2202.09231 mentions something called minicomp
<stikonas>isn't blob only used when you don't use camlboot?
<Maja_>ah, well, I'm mostly looking at this from the perspective of "hey, writing a compiler for a language with an ML-style type system would be fun", and then I realized that something like that might be useful for the bootstrappable project
<oriansj>stikonas: I haven't yet found how they make the OCaml rumtime; all I have found for it is binary blobs in repos
<stikonas>hmm, i'm reading that pdf now
<stikonas>I think the process starts in page 6
<stikonas>mplement an interpreter for OCaml, that we call interp
<oriansj>Maja_: well there are a great many places where an ML compiler/interpreter would be useful; both early and late in the bootstrap. So there are lots of potentially fun places for you to make progress.
<oriansj>yeah An interpreter of OCaml written in a subset of OCaml called miniml
<oriansj>A compiler for miniml in written in Scheme (guile) compiles miniml to OCaml bytecode, which is then executed by the OCaml runtime.
<oriansj>and A handwritten lexer for the bootstrapping of ocamllex
<oriansj>and the PDF mentions "The runtime, as well as ocamlrun, are implemented in C code." but when I look in the https://github.com/ocaml/ocaml ; it appears that they don't even include the C code and they just copy a blob: https://github.com/ocaml/ocaml/blob/trunk/Makefile#L690
<oriansj>there is also a definite possiblity that I am just blind: https://github.com/ocaml/ocaml/tree/trunk/runtime
<oriansj>and I wonder if they intended to commit interpreter/interp which is a generated binary
<stikonas>ocaml probably
<stikonas>I think that's how they bootstrap the next version
<stikonas>hence camlboot bootstrap...