IRC channel logs

2018-09-01.log

back to list of logs

<OriansJ>janneke: sponge allows one to do such forms as cat foo bar baz | sponge foo and get the complete contents of foo
<OriansJ>also cat foo bar baz | sponge baz and not lose the contents of baz like you normally would if you did cat foo bar baz | some processing > baz
<OriansJ>I needed it when I had to solve a bug in an IBM product for the State of Michigan. I've kept in my toolkit ever since
<rain1>if a language is self hosted it is defined not only by (source code), but by the pair (source code, compiled code)
<OriansJ>rain1: except when the self-hosted language is a subset or superset of another language capable of compiling the source code
<akkartik>The readme change looks good, OriansJ.
<akkartik>Another suggestion: add the description in https://bootstrapping.miraheze.org/wiki/Stage0 to the stage0 Readme. Or a pointer to it? I only found out about it from https://news.ycombinator.com/item?id=17851311#17851917
<OriansJ>akkartik: might tweak the verbage but sounds reasonable
<akkartik>+1. I found it super useful.
<OriansJ>good, right now I'm tweaking cc_x86.s so that it makes the --debug form of output to enable gdb and objdump to be able to read the files with ease
<akkartik>Oh nice. Does that involve getting into DWARF and whatnot?
<akkartik>Or just adding section headers? I noticed the ELF binaries seem corrupted to `file` (just like the ones I've been creating).
<OriansJ>akkartik: actually only needed to drop a label as blood-elf is able to generate those stubs without issue
<OriansJ>If you look at M2-Planet's current build script (hello.sh in test100)
<OriansJ>you'll see everything you need to make your binaries objdump and gdb friendly
<akkartik>Interesting! Is most of the work happening in the cc-footer.M1 file?
<OriansJ>that is actually completely generated by blood-elf from the cc.M1 file
<akkartik>Yes, I noticed.
<OriansJ>it is effectly the dwarf stub needed for objdump
<akkartik>Is it like a repository of debug information for later stages? Ah, got it.
<OriansJ>the part of the elf header that says there is an dwarf stub and where to find it is in the ELF-i386-debug.hex2
<akkartik>I'm looking at mescc-tools/blood-elf.cc. Insane that it takes just 250 LoC. I always through dwarf (and fstabs) were deep black magic..
<akkartik>*always thought
<OriansJ>akkartik: one thing you'll learn about me, is I like to bring magic into the light.
<OriansJ>if at anytime the code I have written is unclear please let me know; I wish for anyone with the desire to learn know everything they want to know about the software I write
<OriansJ>ok janneke your https://gitlab.com/janneke/stage0 is in the README, please make sure to update it periodically
<akkartik>Lovely, that's been my great dissatisfaction as well: that programmers often don't seem to care about allowing other programmers to appreciate their design decisions.I wish I'd found out about this channel sooner. I'd been vaguely aware of stage0 for a few months, and also the miraheze wiki. But I didn't realize there was a larger community beavering away here.
<OriansJ>akkartik: well, we figure if the only people who show up are passionate like we are. They'll fit right in and do amazing things with a little help.
<rain1>let me share something fun from my peg parser lib today
<rain1>the s-exp parser didn't support the ... symbol
<rain1>in one commit it was added in this way https://github.com/rain-1/racket-peg/commit/23dd199a417f5484cbf50f327fbed32571a3a780 (s-exp.rkt is produced by compiling s-exp.peg)
<rain1>then in a second commit the code can be refactored to use a metacircular definition of ... https://github.com/rain-1/racket-peg/commit/f7fc668b956cbdecc7112e00d8a2bc263a0f609d
<rain1> https://www.win.tue.nl/~aeb/linux/hh/thompson/trust.html it's like how thomson describes adding the \v vertical tab
<akkartik>I see what you mean, rain1. Very cool.
<OriansJ>rain1: literally exactly like thompson's description and warning
<akkartik>rain1 and I have debated before the value of metacircularity. I think it's fine/great as long as the bootstrap step isn't lost. racket-peg has peg.rkt. Does it make sense to add support for `...` in peg.rkt?
<OriansJ>typically a version change between the 2 is plenty for others to notice the step
<OriansJ>1.9.8 is needed to build 2.0.0 sort of thing; unless you wish for people to do the guessing game janneke has been playing with GCC, glibc and binutils; where even the GCC devs are saying he'll have to hunt on abandoned forums to find the information he needs...
<OriansJ>Hence why I did https://github.com/oriansj/M2-Planet/blob/master/cc_strings.c#L73
<akkartik>Exactly. That's awesome.
<OriansJ>It allows cc_x86.s to build newer versions of M2-Planet with support new escapes without having to know them itself
<akkartik>I didn't follow your comments about the version change. I noticed that you included a paragraph today in https://github.com/oriansj/M2-Planet/commit/42914441c3f about how different versions of M2-Planet will depend on previous versions. How do you protect against the Thompson attack inside the bootstrap stack?
<OriansJ>akkartik: because version 1.0.0 can be built by cc_x86.s
<OriansJ>also M2-Planet must always be buildable by GCC, Clang and any other c99 compiler
<OriansJ>but I probably should clarify that bit
<OriansJ>cc_x86.s can be built from M0, which can be built from hex2, which can be built from hex1, which can be built from hex0 and that is 250bytes in size
<akkartik>Cool. I _think_ I follow? Little hard to be sure with the bootstrap workflow spread out between 3 repos.
<OriansJ>No space to hide any attack, let alone a flag or marker for an attack and once I build the Knight ISA in TTL logic, no where for it to hide in hardware either...
<akkartik>Nice!
<OriansJ>akkartik: the bootstrap chain is as follows hex0 or hex0-monitor depending on if running on bare metal or on an operating system
<OriansJ>which builds hex1
<OriansJ>which builds hex2
<OriansJ>which builds M0/M1
<OriansJ>which builds cc_x86.s
<OriansJ>which builds M2-Planet's C source code
<akkartik>I noticed you also mentioned in http://git.savannah.nongnu.org/cgit/stage0.git/tree/README that "Additionally, all code must be able to be understood by 70% of the population of programmers." That is *really* speaking my language: http://akkartik.name/about
<OriansJ>which is self-hosting
<akkartik>That's good to see laid out.
<OriansJ>akkartik: If you want to see a really clean architecture checkout stage0's ISA_HEX_Map.org
<akkartik>Ah, thanks for the pointer.
<OriansJ>akkartik: Honestly, it looks like I could use your help clarifying things in my Documentation; such that the pieces would be more clear to new people.
<rain1> https://bootstrapping.miraheze.org/wiki/The_Semantics_Assignment_Problem here's the draft of my post