IRC channel logs

2020-12-14.log

back to list of logs

<pder>I just pushed a branch named assembly to blynn-compiler that gets the bootstrap to the "assembly" stage. I cheated a little because I have a temporary shell script that transforms the c output into a text file that is input to vm. You can try it out by running go.sh
<pder>This shell script that does the transform writes a text file with the first line containing the parameter that is passed to rts_reduce. The next line contains comma separated numbers that make up the prog array.
<pder>This script can be removed if the haskell output is modified, but I left it alone for now to keep the gcc build using the Makefile working the same as always
<pder>It looks like the generated output for assembly matches the gcc build, but the next step mutually hangs and I havent looked into it yet.
<OriansJ>pder: nice
<OriansJ>I guess my next priority is to fix M2-Planet's unsigned comparision but first I need to get my son to go to bed
<pder>I think I see why assembly is hanging. The implementation of foreign() adds a few more things compared to the earlier stages
<siraben>pder: could you diff the generated C code before and after your patch? I could make filter_haskell_output unnecessary by changing effectively.hs
<pder>siraben: would you be able to alter effectively.hs so that it outputs the argument to rts_reduce(), then a newline, then the prog array as a comma separated list. If you run go.sh, checkout generated/lonely_raw.txt
<pder>my script turns the generated c code into a simple text file with two lines
<siraben>ah ok, i'll take a look
<pder>thank you, i had some trouble understanding the last couple lines in that section of effectively.hs
<pder>I pushed some more changes, and now can bootstrap all the way to marginally.c which ends up identical to the gcc build. At this point the runtime C code is all emitted from the haskell, so the next thing will be generating M2-Planet compatible code from marginally.hs
<fossy>hey epic
<fossy>pder: this is very cool
<siraben>pder: exploring your changes now
<siraben>anyone here doing advent of code? heh
<fossy>nah
<fossy>this takes a while
<fossy>7 minutes, not bad
<siraben>fossy: what's taking 7 minutes?
<siraben>pder: please adjust the shebang in filter_haskell_output to #!/usr/bin/env bash for portability reasons
<siraben>pder: are you sure we want to discard root and root_size entirely?
<siraben>also the ffi stuff
<fossy>siraben: ./go.sh on pder's marginally branch
<fossy>well, we can't have it using bash really
<fossy>oh its just a temporary thing
<fossy>pder: so according to your comments filter_haskell_output will become unnessecary?
<fossy>because otherwise it will have to be reimplemented in C, as we don't have grep or sed in the bootstrpa
<siraben>fossy: i can adjust it in effectively.hs
<pder>fossy: yes, that bash script basically turns the generated c output into a text file with two lines. The script is no longer necessary once the haskell is modified to generate that output directly
<pder>siraben: I am not sure what root and root_size are for. I saw no places where it was used during the whole bootstrap. Regarding the ffi stuff, see the comment in one of my recent commits. There are basically two versions of the foreign() method- one that implements getchar and putchar, and another that implements, getchar, putchar, getargs, and getargchar- the last two which arent
<pder>necessary during the bootstrap
***yt_` is now known as yt_