4 guix environment -l guix.scm #64 bit + 32bit
5 guix environment --system=i686-linux -l guix.scm #32 bit only
8 *** release 0.x, unsorted
9 - discuss full source bootstrap strategy on guile-user with Jeremiah
10 Orians (stage0+) Luca Saiu (GNU Epsilon).
12 - produce intermediate annotated assembly-like mes.S
13 - and/or: connect to OriansJ's stage0...LISP bootstrapping tools
14 - and/or: connect to GNU Epsilon's VM
15 - and/or: translate Mes.c interpreter into VM
16 - and/or: compile Scheme to C, rewrite Mes.c into Mes.scm.
17 - real module support, bonus for supporting Guile's define-module/define-public syntax
18 - get full source syntax-case up (Andre van Tonder?) OR drop
19 psyntax/syntax-case and rewrite Nyacc without syntax-case+R7RS Ellipsis
20 - support regexp OR rewrite Nyacc without regexps
21 - split-off Guile C compiler as standalone Guile project, still
22 respecting no-syntax-case bootstrap requirement
23 *** Compile the [[https://en.wikipedia.org/wiki/Tiny_C_Compiler][Tiny C Compiler]]
26 - work to replace GuixSD's bootstrap binaries for x86
29 ** 0.5: Mutual self-hosting Scheme interpreter and C compiler: mes.c and mescc,
30 Support call-with-current-continuation, refactor catch/throw
31 ** 0.4: Support Nyacc, Gcc-compiled Mes compiles minimal main.c using nyacc
32 ** 0.3: Garbage collector
33 ** 0.2: Support psyntax
34 ** 0.1: Mes eval/apply feature complete; support syntax-rules, compile main.c using LALR, dump ELF
37 ** eval_apply/gc + Nyacc bug
38 scripts/messc.mes intermittently exposes a bug in eval_apply/gc when
39 Nyacc parses mes.c-sized source. Running
41 MES_MAX_ARENA=<another-size> scripts/mescc.mes
43 may [un]cover the bug. So there is probably some eval_apply-construct
44 that Nyacc uses, possiblby indirectly via with-fluid, like (call/cc,
45 call-with-current-continuation), that breaks when GC triggers at the
47 ** mescc can only compile itself, it cannot compile tcc, gcc or guile
48 ** mes.mes cannot read sexps, only --dump's, mes.mes cannot --dump
49 ** Bootstrap binary mes is too big and opaque to be considered source
50 68kB ELF binary which can be disassembled (objdump -d mes.mes).
51 ** Psyntax is too big and opaque to be considered source
52 And needs a patched Guile-1.8 to [re]generate.
53 ** test/match.test ("nyacc-simple"): hygiene problem in match
56 *** The Scheme reader is very slow.
58 **** compiling mes.c takes mescc.mes 2h30'
59 mescc.scm which runs on Guile takes 30"
60 ** Fluids are a hack for Nyacc.
61 *** Translate C-prototype mes.c into annotated hex?
62 One idea is to use OriansJ's amazing self-hosting [[https://github.com/oriansj/stage0][stage0]] hex assembler
63 and minimal bootstrap binaries and rewrite the mes.c core to directly
64 bootstrap into Scheme.
66 *** Rewrite mes.c in Schemy/Sexp-C and generate annotated hex?
67 Another idea (thanks Rutger!) is to rewrite the mes.c core in a s-exp
68 C/Assembly variant and thave mescc produce the simple, annotated
71 *** Compile the [[https://en.wikipedia.org/wiki/Tiny_C_Compiler][Tiny C Compiler]]
73 ** Build tools do not run on mes
74 *** configure needs Bash, Guile
75 *** GNUmakefile needs Bash, Guile
76 *** build-aux/mes-snarf.scm needs Guile
77 *** build-aux/git-changelog needs Perl
78 * OLD: Booting from LISP-1.5 into Mes
80 Mes started out experimenting with booting from a hex-coded minimal
81 LISP-1.5 (prototype in mes.c), into an almost-RRS Scheme.
83 When EOF is read, the LISP-1.5 machine calls loop2 from loop2.mes,
84 which reads the rest of stdin and takes over control. The functions
85 readenv, eval and apply-env in mes.mes introduced define, define-macro
86 quasiquote and macro expansion.
88 While this works, it's amazingly slow. We implemented a full reader
89 in mes.c, which makes running mes:apply-env mes:eval somewhat
90 bearable, still over 1000x slower than running mes.c.
92 Bootstrapping has been removed and mes.c implements enough of RRS to
93 run a macro-based define-syntax and syntax-rules.
95 loop.mes and mes.mes are unused and lagging behind. Probably it's not
96 worth considering this route without a VM. GNU Epsilon is taking the
97 more usual VM-route to provide multiple personas. While that sounds
98 neat, Lisp/Scheme, bootstrapping and trusted binaries are probably not
99 in scope as there is no mention of such things; only ML is mentioned
100 while Guile is used for bootstrapping.
102 * Assorted ideas and info
103 ** Using GDB on assembly/a.out
107 set disassemble-next-line
108 gdb-display-disassembly-buffer
110 ** Create memory dump with 32 bit Gcc compiled Mes
111 guix environment --ad-hoc --system=i686-linux gcc-toolchain -- bash -c 'make mes CC=i686-unknown-linux-gnu-gcc LIBRARY_PATH=${PATH%%/bin:*}/lib'
113 MES_TINY=1 ./mes-32 --dump < module/mes/tiny-0.mes > module/mes/tiny-0-32.mo
114 ./mes-32 --dump < module/mes/read-0.mes > module/mes/read-0-32.mo
116 *** [[https://savannah.gnu.org/projects/nyacc][nyacc]]
117 *** PEG: [[http://piumarta.com/software/peg/][parse C using PEG]]
118 *** [[https://en.wikipedia.org/wiki/Tiny_C_Compiler][Tiny C Compiler]]
119 *** [[http://www.t3x.org/subc/index.html][Sub C]]
120 *** [[https://groups.google.com/forum/#!topic/comp.lang.lisp/VPuX0VsjTTE][C intepreter in LISP/Scheme/Python]]
122 ** C assembler/linker
123 *** [[http://www.tldp.org/HOWTO/Assembly-HOWTO/linux.html][Assembly HOWTO]]
126 *** [[http://www.muppetlabs.com/~breadbox/software/tiny/][Small ELF programs]]
127 *** [[http://www.cirosantilli.com/elf-hello-world/][Elf hello world]]
128 ** SC - c as s-expressions
129 sc: http://sph.mn/content/3d3
131 *** [[http://www.scheme-reports.org/][Scheme Reports]]
132 *** [[ftp://publications.ai.mit.edu/ai-publications/pdf/AIM-349.pdf][Scheme - Report on Scheme]]
133 *** [[ftp://publications.ai.mit.edu/ai-publications/pdf/AIM-452.pdf][RRS - Revised Report on Scheme]]
136 http://forum.osdev.org/viewtopic.php?f=15&t=19937
138 http://www.stripedgazelle.org/joey/dreamos.html
139 http://armpit.sourceforge.net/
140 http://common-lisp.net/project/movitz/movitz.html
142 <civodul> janneke: https://github.com/namin/inc looks interesting [15:18]
144 <OriansJ> janneke: also, if you look at
145 https://github.com/oriansj/stage0/tree/master/stage2/High_level_prototypes
146 [the garbage collected lisp I implemented], if there are any pieces
147 I could add to finish off your mes lisp bootstrap just let me know
148 because I would be more than happy to do that :D
149 <janneke> OriansJ: that's what I'm hoping for, that our efforts can be
150 complementary and we can work together
151 *** lfam (~lfam@2601:47:4180:2ffb:7c05:17de:cf5f:23ef) has quit: Ping timeout:
153 <janneke> exciting times! [00:23]
154 <janneke> OriansJ: i looked a few times and saw 'LISP empty', so thanks for
156 <civodul> OriansJ, janneke: from that page, there's also:
157 https://web.archive.org/web/20160604035203fw_/http://homepage.ntlworld.com/edmund.grimley-evans/bcompiler.html
160 https://web.archive.org/web/20160604041431/http://homepage.ntlworld.com/edmund.grimley-evans/cc500/cc500.c
161 https://github.com/rswier/c4/blob/master/c4.c
162 ** Compilers for free
163 http://codon.com/compilers-for-free