IRC channel logs
2023-05-14.log
back to list of logs
<stikonas>oriansj: hex2 only supports 32-bit labels, doesn't it? <oriansj>stikonas: well we figured one wouldn't need to produce more than a 2GB binary in hex2 and that %0 %label or %label %0 would work for big or little endian 64bit addresses <stikonas>yeah, we wouldn't build much more than tcc... <stikonas>anyway, maybe I can skip that 64-bit part for riscv64... <stikonas>well, I'm just modyfing existing 64-bit port that was using pre riscv defines <stikonas>which wouldn't really work well with either old or new mescc-tools <stikonas>but in any case it's easier than new port (riscv32) <probie>oriansj: is a lisp interpreter in Haskell (that can be run by Blynn Haskell) particularly desirable, or just a case of "would be cool"? <stikonas[m]>probie: I don't think it's particularly desirable... Just might be cool <stikonas[m]>But it would probably be slow, even slower than mes-m2 <stikonas>oriansj: anyway, I'm now trying to figure out what is all that wrap-in stuff in mescc... <stikonas>I'm getting errors like Wrong type (expecting string): (#:string "Hello, Mescc!\n") <stikonas>so it looks like variables that I get are not strings but somehow wrapped-in strings <oriansj>probie: I encourage people to pursue projects they might find fun or cool; not that they always should be useful <oriansj>probie: well probably because of the transistion from FILE* builtin type and proper FILE* structs <oriansj>and we transistioned to using M2libc after we noticed a good bit of duplication occuring. <probie>Nah, I think it's pulling a bad version of M2libc (or not pulling it at all). It's getting "Unable to open for reading file: M2libc/sys/types.h" <oriansj>if you are using M2-Mesoplanet use -I or setting the env variable M2LIBC_PATH to where a copy of M2libc is located <oriansj>but there might still be a few lines using the old //CONSTANT behavior <emilytrau[m]><ericson2314> "emilytrau: it looks like kaem-..." <- i didn't notice! great catch thank you! <emilytrau[m]><ericson2314> "it would also be good to use ..." <- what's the difference between `derivation` and `derivationStrict`? I can't find docs for it or examples in nixpkgs <ericson2314><emilytrau[m]> "what's the difference between `..." <- `derivationStrict` is the actual primop, and doesn't leak its inputs <ericson2314>but some of us have been thinking it would be good to migrate Nixpkgs away from always leaking this steam (for perf and sanity) <ericson2314>and the bootstrap, being self contained, is an excellent place to start :) <stikonas[m]>Possibly rn works on directories too but I'm not sure now <ericson2314>yeah it make have just made me a blank dir or something <stikonas[m]>As long as we I don't need any new syscalls. We would like to keep initial syscall set small, to not extend builder-hex0 kernel <stikonas>janneke: so I'm looking a bit at riscv64/as.scm and M1.scm. So x86 version had lots of calls like (#:address ,label) in as.scm that are processed in M1.scm file. <stikonas>janneke: so for riscv64 I think I need to add similar addresses but specific riscv64 instuction formats <stikonas>e.g. what is in x86 hex2:offset3, in riscv64 is address for u-type instructions <janneke>stikonas: yes, adding another type (#:u-format) sounds as the way to go <janneke>stikonas: or possibly keep (#:offset ..) and (#:address ..), but in M1.scm differentiate how to handle those according to the archictecture in info <stikonas>e.g. in x86 it was (string-append "mov____0x32,%" r) (#:address ,label) <janneke>yeah, using new labels seems the proper solution <stikonas>on the other on riscv64 I need to emit a few instructions <stikonas>"rd_a0 ~label auipc" and then "rd_a0 rs1_a0 !label addiw" <stikonas>auipc loads high bits and addiw then adds lower bits <stikonas>though don't expect anything fast... I'm still fighting with scheme which I'm just barely familiar with <janneke>stikonas: i'm delighted you're willing to look into this <janneke>and i'd much rather have you can enjoy it than finish a bit sooner <ericson2314>janneke: I would like to add a CLI flag for the CRT dir for tinycc <mihi>stikonas, I assume you have solved the mystery of "wrapped strings"? :) <mihi>ok :) I would not call those list expressions inside quasiquote and pmatch "calls", they are just list expressions which are later processed by pmatch :) <janneke>ericson2314: the latest in use in guix, is mes-0.23 <Irvise_>A potentially dumdum question. Can Mes be run in a "normal" Linux distro? <Irvise_>I would like to test its Scheme support. However, it seems it requires "blood-elf" to be installed in the system. That requires Mescc-tools, which require M1 planet, but that seems to require the rest of the "low level" bootstrap procedures... <mihi>Irvise_, you can build mescc-tools with gcc or tcc, no M2-Planet required <mihi>just use the included Makefile <janneke>Irvise_: sure, i believe mes is included in debian <janneke>as is mescc-tools, no planets are needed <janneke>it's also included in guix, as a regular (non-bootstrap) package <Irvise_>OpenSUSE does not have nyacc available in the repos. I will go down the Guix route :) <janneke>Irvise_: to run mes itself, you don't need mescc-tools or nyacc <janneke>those are only required to run mescc <mihi>ACTION was not aware that mes, mescc-tools and nyacc are packaged in Debian. Also, the only package depending on either nyacc or mescc-tools in Debian is mes :) But mes in debian stale is at 0.22 and mescc-tools at 1.1 :) <janneke>sure, well, in guix you can have both <mihi>ACTION wonders if did anyone did ddc with mes built with itself or mes-m2 for different compilers that built first mes? <mihi>I would expect the binaries should be identical once you have built mes with mescc. <stikonas>I think I've seen that with mes-m2 0.24, haven't tried building tcc with mes-m2 <stikonas>but binary mes-m2 build with M2-Planet will be quite different from mes built with mescc <stikonas>M2-Planet binary is maybe twice as big and is 30% or so slower <mihi>stikonas, so you tested it, but is that just the expectation? <mihi>okay :) best argument ever :P