IRC channel logs

2024-01-04.log

back to list of logs

<rickmasters>stikonas: i'd increase __FILEDES_MAX to much higher, like 512
<stikonas>rickmasters: oh thanks, I messed that I left it commented out
<stikonas>probably 4096 would work too...
<rickmasters>and MAX_MEMORY_PER_PROC may not be enough for mes
<stikonas>hmm, true...
<stikonas>though I expected mes --version to work
<stikonas>but let me try with more memory
<rickmasters>yes, should be enough for --version
<stikonas>hmm, maybe it wasn't
<stikonas>it's now something else...
<stikonas>instead of showing error message, it now hangs
<stikonas>yet on baremetal behaviour is opposite
<stikonas>oh, maybe not opposite...
<stikonas>now both are showing a different error message
<stikonas>which is good I guess...
<stikonas>so 128 MiB was not enough
<stikonas>thanks again!
<stikonas>didn't have much time today, but still we made some progress
<stikonas>getting something like (unhandled exception: unbound-variable: (make-record-type) now
<rickmasters>I hope you get it working
<stikonas>yeah, hopefully...
<stikonas>in any case, even if we want full POSIX kernel at this stage
<stikonas>I think it's a harder problem
<stikonas>it's probably easier to first rely on UEFI
<stikonas>and then if we want, we port each syscall to what real kernel should do
<stikonas>oh, that mes error is due to missing symlinks (same workaround is needed as live-bootstrap does, just copy files)
<stikonas>though of course there is a next issue :(
<stikonas>ok, looks like for some reason mes/module/mes/getopt-long.scm gets autocreated with zero size
<stikonas>and then shadows module/mes/getopt-long.scm file
<stikonas>moving latter file to the former location actually makes mes --version work, though this is just a workaround for now
<stikonas>hmm, perhaps sys_access creates empty file on UEFI...
<stikonas>yaeh, we are jus returning 0 there right now
<stikonas>I guess it needs a check if file exists
<Googulator>How do we currently deal with psyntax-pp in Mes?
<Googulator>Do we just not use it?
<matrix_bridge><Andrius Štikonas> Googulator: we unlink it in pass1.kaem mes build script
<matrix_bridge><Andrius Štikonas> Though in builder-hex0 unlink is not implemented
<Googulator>maybe we should do rename-then-delete in that case
<Googulator>although its non-use is verified by bwrap working
<Googulator>where builder-hex0 is not used
<matrix_bridge><Andrius Štikonas> Well rename is also not implemented in builder-hex0...
<Googulator>Does anyone know if GHC's CVS repository ever got archived? https://downloads.haskell.org/~ghc/6.2/docs/html/building/sec-cvs.html
<Googulator>I'm hoping to recover the pre-0.26 history this way.
<matrix_bridge><Andrius Štikonas> Probably not, people had trouble finding old ghc versions...
<shrekrequiem>Has anyone seen Jeremiah ?
<muurkha>not since Jan. 3
<janneke>snuik: seen oriansj?
<snuik>oriansj was in #bootstrappable one day and 19 hours ago, saying: which would be surprising but certainly a good reason for them to change
<janneke>snuik: botsnack
<snuik>(y)
<oriansj>lol
<oriansj>snuik: seen me?
<snuik>Sorry, no.
<oriansj>snuik: botsnack never change
<snuik>Err...
<matrix_bridge><Andrius Štikonas> snuik: seen snuik?
<snuik>Does not compute.
<oriansj>snuik: botsnack
<snuik>:)
<matrix_bridge><Andrius Štikonas> Argh, must be matrix prefix...
<Googulator>A glitch in the matrix.
<oriansj>guess it couldn't handle stikonas' great UEFI work.
<Mikaku>rickmasters: I'm reading your PR66
<rickmasters>Mikaku: thanks
<stikonas>is this the last big piece of upstreaming?
<Mikaku>stikonas: I hope so :-)
<rickmasters>stikonas: yes, there is one more small PR from Googulator for PAE and then we'll be able to pull directly from Mikaku
<pder>Will the pregenerated files in nyacc issue go away with mes 0.26 now that it has module support?
<stikonas>pder: no
<stikonas>though you could try that other long tcc chain from cosinusoidally
<stikonas>pder: it turns out that regeneration scripts require psyntax.pp from mes
<stikonas>which is itself pregenerated
<stikonas>live-bootstrap rm's those files right now from mes
<oriansj>nyacc is a bit of a problem in terms of performance and bootstrapping
<stikonas>so for now eiter nyacc or mes is pregenerated
<stikonas>well, performance is probably due to both mes and nyacc
<stikonas>well, I guess if it was just performance, then it's not super big deal
<stikonas>it's not like builder-hex0 or stage0-uefi are optimized for speed...
<oriansj>well mes.c can always become a better scheme interpreter in regards to performance and features
<pder>psyntax.pp can not be regenerated using mes?
<stikonas>pder: well, somebody has to figure it out
<stikonas>it was done for guile, but it was non-trivial effort
<oriansj>pder: we can regenerate it from guile which was properly bootstrapped but that is long after we stop using mes.c
<stikonas>it's probably taken from an older guile...
<stikonas>I wonder how far we are from using M2-Planet directly instead of nyacc...
<stikonas>probably still quite far
<stikonas>10% of effort maybe has taken us 90% there, but last bits are probably more complicatedf
<stikonas>and needs far more effort to fix
<oriansj>well if you remove the need to do bit-slices from tcc (which just requires tcc to output assembly rather than binaries); then M2-Planet would be able to directly compile TCC
<stikonas>there are always various small issues, e.g. tcc assumes 32-bit integers, etc...
<stikonas>really?
<stikonas>I would expect other things broke
<stikonas>broken
<stikonas>M2-Planet is not as good with operator precedence...
<oriansj>potentially some C preprocessor bits but M2-Mesoplanet can be extended to handle those
<oriansj>It complies with the C standard in regards to operator precedence but it doesn't yet short-circuit
<stikonas>I thought it does not fully work... hmm
<stikonas>let me try...
<oriansj>that is why there is that function call pattern up the operators exists in M2-Planet
<oriansj>rather than just a flat if/else block in a single function
<stikonas>yeah, it's not returning the same results as gcc
<stikonas>I just tried 1 + 2 * 3 and gcc returns 7, M2-Planet 9
<stikonas>and it's probably not super easy to fix
<stikonas>since M2-Planet doesn't look forward that much
<stikonas>I guess to fix that you need abstract syntax tree
<oriansj>probably just need to make + and * a different priority
<oriansj>which is why ( works), it is a higher priority than +/*/etc
<stikonas>maybe...
<rickmasters>stikonas: fun fact: time from start of stage0-posix to post-mes is 15:28 for linux, 14:51 for builder-hex0
<rickmasters>lack of memory protection and faking syscalls has speed advantages
<stikonas>oh, that's really good
<stikonas>I guess it's mostly loading file system that is slow
<rickmasters>yeah that makes it much slower overall
<rickmasters>Mikaku: if you're still up I think its pretty late your location so please don't feel rushed to process PR until tomorrow
<mihi>re nyacc and psyntax: It seemed to me that samplet's progress in <https://logs.guix.gnu.org/bootstrappable/2023-08-10.log#012737> looked promising. Yet it has been almost 5 months since then.
<mihi>snuik, seen samplet
<snuik>samplet was in #guix-risc-v one month and 19 days ago, saying: Hopefully not, but my first naive attempt at updating Mes there gave me errors, so I was checking if I could leapfrog having to debug them. :)
<mihi>snuik, and in #bootstrappable?
<snuik>Err...
<mihi>stikonas, for proper operator precedence for parsing C you probably want a <https://en.wikipedia.org/wiki/Recursive_descent_parser>, I don't think an AST is required for that.