IRC channel logs

2023-12-31.log

back to list of logs

<stikonas>well, some progress on posix-runner: https://stikonas.eu/files/bootstrap/Screenshot_20231230_234904.png
<stikonas>successfully managed to run 2 trivial hello world programs using fork/execve...
<oriansj>Googulator: ARM assembly had more in common with 6502 than it did with any of the other RISC processors; as the lead developer worked on the BBC micro which was 6502 based. And you are probably thinking of DEC's strong ARM which completely fixed ARM's instruction encoding but is not compatible with any of the other ARM chips beyound the assembly level
<pabs3>anyone know if FreePascal is bootstrappable?
<pabs3>ACTION finds https://bootstrapping.miraheze.org/wiki/Aesop
<oriansj>pabs3: yeah, basically very few languages have been properly bootstrapped and have a maintained bootstrappable build path.
<oriansj>So, there are many places where one can break new ground and become *the* expert on bootstrapping that language
<stikonas>bootstrapping new languages should in principle be easier than hex0->GCC bootstrap...
<stikonas>one can already use lots of different tools to bootstrap other languages
<AwesomeAdam54321>pabs3: I was planning on porting GNU Pascal to GCC 4.9, but I'm unfamiliar with GCC so the project stalled
<oriansj>AwesomeAdam54321: it is sometimes easier to just write your own compiler
<stikonas>yeah, it doesn't have to be an optimal or fast...
<stikonas>just pushed qutie a few fixes/features to posix-runner
<stikonas>fork/execve seems to be working now (though probably not bare execve without fork yet)
<stikonas>also plenty of other syscalls added
<stikonas>even get_machine program now works
<stikonas>though there are some issues with posix paths in M2libc/UEFI... I think it doesn't know that . is current directory...
<stikonas>yeah, I think stage0-posix stuff should be mostly working now (except for kaem-optional for a couple of reasons)
<stikonas>at least M2-Planet seems to run fine
<stikonas>hmm, mes probaby has the same problem as kaem-optional...
<stikonas>and instead of checking for file descriptor to be -1, it checks fd < 0 ...
<stikonas>I guess proper fix in the kernel would be to add per process file descriptors and map UEFI fs to those per process fds...
<oriansj>stikonas: sounds like a good start
<stikonas>oriansj: yeah, just need to debug some bugs and we should be good to go...
<stikonas>well, I have some changes to M2libc that should be helpful, but probably need more...
<stikonas>anyway, I've pushed my M2libc fixes to https://github.com/oriansj/M2libc/pull/50
<stikonas>I think these should be helpful in any case
<stikonas>fixes constructing full path in current working directory does not end in / and another fix for stuff like /path/./a
<oriansj>today I played with the fact you can have 3 virtual page addresses pointing to the exact same physical address in memory; to create a ring buffer which can never exceed the bounds and loops perfectly with the performance of block writes such as if it didn't loop.
<oriansj> https://paste.debian.net/1302642/
<oriansj>odd that higher level languages like scheme, haskell or the like don't have it; despite how easy it is to implement in scheme. but i am guessing it is because Windows didn't support it until Windows 11 but Linux and the BSDs appear to have supported it for a while.
<oriansj>^in scheme^in C/asm^
<stikonas>hmm, I think some of my problems with posix-runner is due to memory allocation failures... Something weird is there. I.e. malloc can return 0 on my VM or even worse, returns 4 on baremetal
<stikonas>so even if (ptr == NULL) check is not doing its job
<stikonas>oriansj: can we merge https://github.com/oriansj/M2libc/pull/50/files in the meantime?
<stikonas>I think that does help with posix compatibility on UEFI...