IRC channel logs
2024-02-03.log
back to list of logs
<oriansj>well it isn't clean code but it is running code <oriansj>pder: thanks, it appears to be a guix package so I will give it a go <pder>oriansj: that's very exciting. having xz decompression so early is great <oriansj>and with untar, ungz and unbz2 already in mescc-tools-extra it'll be a universal get started toolset <oriansj>tempting to see how much we could improve kaem or if we could do a readline like library and do a dash port. <stikonas>readline itself is not used even for bash in live-bootstrap <stikonas>but with kaem we should be careful not to required too many syscalls <stikonas>it's already the trickiest program for bootstrap kernels <oriansj>boy there are a boatload of constants <oriansj>every sin ever expressed about reader macros; apply to C macros when abused. <oriansj>and boy is there a good bit of abuse here <oriansj>my code is going to be completely unrecognizable in comparison to the source <oriansj>319 insertions(+), 280 deletions(-) just expanding a single macro <oriansj>I think I am done for the night and will pick up tomorrow; slowly digging out of the macro hell they made. <matrix_bridge><Christoph> oriansj: Will you test your re-implementation with the original as an oracle? <oriansj>Christoph: I'll be testing as I do a rewrite; while ensuring several test files continue to unpack to the same checksums <oriansj>as a collection of .xz files and what the resulting checksums should be will be a more direct map to what we care about. <matrix_bridge><Christoph> The program compiles and is usable during the rewrite? Why is the original so complicated? I thought you have to do major refactoring! <oriansj>well yes, but it is just taking a bit of work to slowly unwind everything <oriansj>ok, finally done unwinding the macros <oriansj>so from 1626 lines of macro'd insanity to 2445 lines of just normal messy c <oriansj>now to slowly work it into M2-Planet form <oriansj>and once I get it into fighting shape, I'll just hit it with a freaking boatload of fuzzing to clear out most surprising failures. <stikonas>fossy: what's the status of your PRs now? <oriansj>and it appears only minimal changes are needed to support writing out to a file; and those have been done. <oriansj>it literally only had a single write call in a "Flush" function which ended up having incorrect logic for output; which I have since simplified. <matrix_bridge><Christoph> If you had written it from scratch, would you have ended up in a similar spot? <oriansj>Christoph: well, once I clean up the questionables; it appears that lzma2 is just a simple state machine. <oriansj>so unxz bootstrapping appears to be far simpler than previously thought. <stikonas_>I don't think why some people thought that xz bootstrapping is hard... <stikonas_>even normal xz program ships source in other formats <sam_>i do not get it either stikonas <sam_>plus upstream are extremely nice and supportive