IRC channel logs

2021-09-28.log

back to list of logs

<oriansj>xentrac: some problems map better to certain languages. However when it comes down to what language to learn, it depends entirely on the goal.
***Server sets mode: +cnt
<stikonas>oriansj: not sure if you saw my 3 messages above ^^ (since you disconnected)
<stikonas>anyway M2-Planet would produce just the same issues...
<oriansj>M2-Planet would produce far easier to debug issues.
<xentrac>oriansj: yeah, that's true. and some problems become much easier, sometimes going from intractable to tractable, with a particular mode of thinking — and sometimes that mode of thinking is best embodied as a language
<stikonas>oriansj: yes, it might be easier to debug, but I already found the problem...
<stikonas>it's just that the fix is not obvious
<stikonas>I was actually using GAS version of M0 for debugging
<stikonas>that one has proper debug symbols
<stikonas>so was alright for debugging purposes
<jackhill>Irvise: oh, you're interested in Ada bootstapping too, neat!
<Irvise>oriansj: I saw the Wiki link. I had forgotten about AdaEd. New versions may not work, but maybe GCC 4.9 could... Also, AdaCore is more or less killing GNAT GPLv3 and they are making the FSF builds the standard. How soon will they be done with the transition? I do not know, but I think they are aiming at next year.
<Irvise>fossy: yup I got that far. Issue is that Chicken comes with some pregenerated files (generated by itself). So that is a clear no for a "simple" bootstrappable build. My goal was to see it being accepted as soon as possible. Just because I can build it, does not mean that it would be accepted as fully bootstrappable...
<Irvise>And I wanted to try out Chicken because I belive (believed) that it could be bootstrapped much earlier. It just needs GNU Make, a C library and a C compiler. TCC is already know to work, also Musl C. That would mean that if it can be compiled with GNU Make 3.80, it could be bootstrapped incredibly early!
<Irvise>It is not "better" than say Guile, but it is just as capable and much smaller. And it is a decently fast Scheme implementation.
<Irvise>jackhill: yup :)
<fossy>i see
<fossy>that is good and all, however, what value does it add to the bootstrap that early? i think you may find it easier to bootstrap later
<Irvise>Having a fully capable Scheme early on could allow for some bootstrapping toolchains to be closer to the seed. Also, some complexity in the chain could be solve by "reprogramming" some tools in scheme (see gash).
<fossy>gash would be useful tbh
<Irvise>Also, Chicken is R5RS, but with an "egg" (chicken jargon for extention) it becomes R7RS (probably the most portable Scheme) and it can directly expose-consume C code.
<Irvise>I recently did a POC of Ada - Scheme: https://github.com/Irvise/Ada_Scheme_Example
<stikonas>fossy: well, it might let us use .helpers.sh easier but my main hope is to build musl before bash (and hence yacc)
<stikonas>s/easier/earlier/
<stikonas>that said, I should at some point try to move the first version of flex after musl
<stikonas>that will reduce "gap" between yacc and musl
<stikonas[m]>but if Chicken scheme needs musl, then we can't use it to run gash...
<stikonas[m]>musl build system depends a bit on bash, then if gash depends on Chicken and Chicken depends on musl we are back in the loop
<Irvise>Chicken needs a capable enough C lib.
<stikonas>maybe mes libc can do...
<stikonas>but mes libc is quite minimal
<Irvise>I would like to try chicken after 13
<stikonas>yes, that would be nice if you can get it there
<stikonas>but like you said, pre-gen files might be a problem
<Irvise>Yes... I honestly think that is the most difficult part...
<stikonas>sometimes you can rewrite those scripts in some other language, but it might not be feasible in chicken
<stikonas>I did that with e.g. perl 5.000
<stikonas>it used perl to generate some .h include files
<stikonas>but it was a small script, so I rewrote it in awk
<Irvise>I read that.
<Irvise>But chicken's are not simple ones...
<stikonas>yeah, it might be more similar to guile...
<stikonas>which is not trivial either
<stikonas>but luckily it is now done
<oriansj>Irvise: eliminating pre-gen files in schemes tends to be a serious project in its own right. So be warned it may take several months (to a couple years) of effort to eliminate pre-gen files from a scheme. We certainly greatly appreciate developers when they do that work for us but it certainly isn't something one can do quickly but it will certainly be an achievement worth remembering. As for the libc issue, we certainly can always
<oriansj>create a custom libc if needed for any program. But I don't know if chicken actually has been shown to be able to run gash or guix correctly.
<Irvise>If the pregen files are generated in another way, porting gash would (i suppose) be simple. Guix... not quite.
<Irvise>I have already been warned about the tremendous task... I came here without being aware of the pregen issue however...
<Irvise>I know that there is enough things that can be done, the isse now its workforce... I am now with another project however... :/ (updating GNAT on NetBSD)
<oriansj>Irvise: there are only two valid solutions for pre-gen files: hand write replacements or use guile to generate them from their human written sources. But then it would have to go after guile in the bootstrap.
<Irvise>Yeah... That is what feared...
<Irvise>I*
<oriansj>understandable but we do no want blobs that aren't human written and human auditable able to alter the resulting binaries in subtle ways.
<oriansj>hence the efforts of hunting down and eliminating bootstrap loops, pre-gen files and pulling apart some extremely hairy bootstrap issues.
<oriansj>that being said your goal of bootstrapping Ada properly is certainly quite achievable using AdaEd (which was used to bootstrap the first Gnu GCC Ada compiler) and a chain of Gnu GCC Ada compiler versions.
<oriansj>now it may take some experiementation to find the fewest number of steps to full bootstrap but it should be something you could achieve in a couple days/weeks of effort depending on what issues you discover (like we did with Bison's missing bootstrap step)
<Irvise>Yup, the no pregen requisite is very understandable :)
<Irvise>I have been searching for Ada/Ed's license and the closest I have gotten was a mention of it using GPLv2, but no actual true file... :/
<oriansj>well it was an United States Air Force awarded contract which required the use of the GNU GPL for all development, and assigned the copyright to the Free Software Foundation.
<stikonas>oriansj: so yesterday I was able to fix M0 (GAS prototype). In the evening I'll port the fix to M0 (hex2 source)
<oriansj>stikonas: nice work
<stikonas>it doesn't crash anymore on M2.M1 file
<stikonas>just one short function and memory usage is drastically reduced
<stikonas>well, two functions but one is stolen from hex2
<fossy>stikonas: well yes, that would be good, we can eliminate heirloom then right?
<stikonas>fossy: not eliminate but build it against LGPLed libc
<stikonas>so it becomes a non-issue
<fossy>oh yeah the first flex uses heirloom
<fossy>but yeah that does eliminate the licensing issue which is my main concern
<jackhill>reguarding bootstrapping chicken, it would be great to see more schemes properly buildt from source, but I think I'm missing why it is needed early in the bootstrap. What does it offer that mes scheme and guile do not?
<Irvise>May be interesting to someone: https://www.phoronix.com/scan.php?page=news_item&px=Picolibc-2021
<stikonas>not useful for bootstrap as it is...
<stikonas>meson is non-trivial to build
<stikonas>it might be useful for something else though...
<stikonas>so far the only libc that I saw that is easy to build is musl
<Irvise>jackhill: chicken needed for bootstrap? No. That it could theoretically be built after step 13 or 22? Yes. That would bring one of the more powerful schemes, ala Guile, about 100 steps earlier. But that was just me asking. I did not want to turn this into a full blown discussion. Unless of course, it is benefitial to all of you :)
<stikonas>jackhill: well, right now gash is not usable in no-pregen file bootstrap (it does not run on mes)
<stikonas>that said, it might be harder to bootstrap chicken than port gash to mes
<stikonas>but Irvise is very welcome to investigate this
<stikonas>oriansj: https://github.com/oriansj/stage0-posix/pull/48
<stikonas>M0 now produces good output, but I need to fix some bug in hex2 first (before M2 is ready)
<stikonas>there is something wrong in I-type calculation