* ChangeLog: Add copyright header.
* build-aux/GNUmakefile.in (generate-ChangeLog): Append it as copyright footer.
* BOOTSTRAP: Add copyright header.
* scaffold/boot/2f-define-second-lambda.scm: Likewise.
* scaffold/boot/39-global-define-override.scm: Likewise.
* scaffold/boot/3a-global-define-lambda-override.scm: Likewise.
* scaffold/boot/4f-string-split.scm: Likewise.
* scaffold/boot/numbers.scm: Likewise.
* scaffold/gc.scm: Likewise.
* scaffold/b-0.mes: Remove.
* doc/GNU-EVAL-APPLY: Remove.
* doc/announce/README: New file.
* doc/announce/ANNOUNCE: Move from doc/ANNOUNCE.
* doc/announce/ANNOUNCE-0.10: Likewise.
* doc/announce/ANNOUNCE-0.11: Likewise.
* doc/announce/ANNOUNCE-0.12: Likewise.
* doc/announce/ANNOUNCE-0.13: Likewise.
* doc/announce/ANNOUNCE-0.14: Likewise.
* doc/announce/ANNOUNCE-0.15: Likewise.
* doc/announce/ANNOUNCE-0.16: Likewise.
* doc/announce/ANNOUNCE-0.3: Likewise.
* doc/announce/ANNOUNCE-0.4: Likewise.
* doc/announce/ANNOUNCE-0.5: Likewise.
* doc/announce/ANNOUNCE-0.6: Likewise.
* doc/announce/ANNOUNCE-0.7: Likewise.
* doc/announce/ANNOUNCE-0.8: Likewise.
* doc/announce/ANNOUNCE-0.9: Likewise.
* doc/announce/ANNOUNCE-2: Likewise.
* doc/announce/UPDATE-0.13: Likewise.
* doc/fosdem/README: New file.
* doc/fosdem/fosdem.org: Add legalese.
* doc/fosdem/fosdem.pdf: Regenerate.
* doc/images/README: New file.
* mes/module/mes/psyntax.pp.header: New file.
* mes/module/mes/psyntax.pp: Add it to generated file.
-bootstrappable.org project -*- org -*-
+ -*- org -*-
+#+TITLE: bootstrappable.org project
+
+Copyright © 2016, 2017, 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+
+ Copying and distribution of this file, with or without modification,
+ are permitted in any medium without royalty provided the copyright
+ notice and this notice are preserved.
* What?
** Full source bootstrapping for GuixSD
* TODO
** upstream mes-boot to GuixSD.
-** add full source gcc-4.7 package build.
** replace GuixSD bootstrap for x86.
** remove or upstream patches from tcc-boot
** prepare src/mes.c for M2-Planet transpiler.
** x86_64, arm, the Hurd
* DONE
+** add full source gcc-4.7 package build.
** bootstrap gcc+glibc-built binutils-20.1, gcc-4.1.0.
** have tcc-boot compile gnutools triplet: binutils-2.14, gcc-2.95.3, glibc-2.2.5.
** have tcc-boot's mes-tcc compile a fully functional tcc
+ -*- org -*-
+
+#+TITLE: ChangeLog
+
+Copyright © 2016,2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+
+ Copying and distribution of this file, with or without modification,
+ are permitted in any medium without royalty provided the copyright
+ notice and this notice are preserved.
+
Normally a ChangeLog is generated at "make dist" time and available in
source tarballs.
-
-If not, see the Git commit log at <http://git.savannah.gnu.org/cgit/mes.git/>
@echo commit:$(COMMIT)
generate-ChangeLog:
- $(PERL) ${srcdest}build-aux/gitlog-to-changelog --srcdir=${srcdir} > ChangeLog
+ $(PERL) ${srcdest}build-aux/gitlog-to-changelog --srcdir=${srcdir} > $@
+ cat ChangeLog >> generate-ChangeLog
+ mv generate-ChangeLog ChangeLog
$(TARBALL): .tarball-version | generate-ChangeLog
($(GIT_LS_FILES)\
4c-quasiquote.scm
4d-let-map.scm
4e-let-global.scm
+4f-string-split.scm
50-primitive-load.scm
51-module.scm
+++ /dev/null
-Subject: on bootstrapping: introducing Mes
-Date: Sun, 19 Jun 2016 13:08:02 +0200
-
-Hi,
-
-I have a minimal LISP-1.5-resembling interpreter in C that now can
-also interpret itself
-
- https://gitlab.com/janneke/mes
-
-It was inspired by the seemingly often ignored bootstrapping question
-made so painfully visible by GuixSD and by OriansJ with their self
-hosting hex assembler project.
-
-As a next step after a hex assembler I was thinking of getting Scheme up
-and running and use that to create a tiny C compiler, probably using
-PEG. For that I think we need define-syntax, which I had a peek at and
-still scares the all-sorts-of-things out of me :-)
-
-I searched for minimal Lisp/Scheme to get that going and found an
-article called the Maxwell Equations of Software 1) with a pointer to
-the 1962 LISP 1.5 paper by John McCarthy 2).
-
-First I `implemented' Mes/LISP-1.5: the bottom half of page 13 and the
-necessary helper procedures defined on pages 8-12 using Guile, removing
-all but the primitives needed to run LISP-1.5/Mes (I think): car, cdr,
-cond, cons, define, eq?, '()/nil, null?, pair? and quote. I cheated
-with read, and with display and newline for debugging.
-
-Then I translated the program into C and got rid of read by using
-getchar/ungetchar.
-
-It's been great fun and now I'm kind of stuck a bit at the point of
-implementing macros. I have a simplistic version in C but want to
-remove that again --I like the idea of having the absolute minimal LISP
-interpreter in C-- and only introduce macros after having bootstrapped
-into the LISP/Mes domain.
-
-Greetings,
-Jan
-
-1) http://www.michaelnielsen.org/ddi/lisp-as-the-maxwells-equations-of-software/
-2)
-http://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf
-
+++ /dev/null
-Subject: Mes 0.10 released
-
-I am pleased to announce the release of Mes 0.10, representing 82
-commits over 6 weeks. Mescc now compiles a bootstrappable-modified
-TinyCC into a mes-tcc that in turn can successfully compile a trivial
-C program.
-
-* About
-
- Mes[0] aims to create full source bootstrapping for GuixSD[1] as
- part of the bootstrappable builds[2] project.
-
- It currently consists of a mutual self-hosting [close to Guile-]
- Scheme interpreter prototype in C and a Nyacc-based C compiler in
- [Guile] Scheme. This C prototype will be rewritten in stage0[3]
- M1 assembly (or possibly stage2 slow-LISP, or ...).
-
- The Scheme interpreter prototype (mes.c) has a Garbage Collector,
- a library of loadable Scheme modules-- notably Dominique Boucher's
- LALR[4], Pre-R6RS portable syntax-case[5] with R7RS ellipsis, Matt
- Wette's Nyacc[6], Guile's PEG[7] --and test suite just barely
- enough to support a simple REPL (repl.mes) and simple C-compiler
- (mescc.mes).
-
- The simple C compiler can compile a modified TinyCC[8] that is
- starting to work! A gcc-compiled tcc is known[9] to compile GCC.
-
- Mes is inspired by The Maxwell Equations of Software: LISP-1.5[10]
- -- John McCarthy page 13, GNU Guix's source/binary packaging
- transparency and Jeremiah Orians's stage0 ~300 byte self-hosting
- hex assembler.
-
-* Download
-
- git clone https://gitlab.com/janneke/mes
-
- wget https://gitlab.com/janneke/mes/repository/archive.tar.gz?ref=v0.10 -O mes-0.10.tar.gz
-
-Mes runs from the source tree and can also be built, packaged and
-installed in Guix[SD] by the usual
-
- guix package -f guix.scm
-
-* Changes in 0.10 since 0.9
- ** Core
- *** 2 new functions
- logand, lognot.
- ** Mescc
- *** Mes now includes M1 sources for full source bootstrapping up to tcc.
- *** Mescc now depends on Nyacc 0.81.0.
- *** Mescc now compiles a mes-tcc that compiles a trivial C to a running a.out.
- *** Mescc now supports several (as used my tinycc) struct by value assignments.
- *** Mescc now has _start in a separate crt1.c.
- *** Mescc now supports initializer arithmetic.
- *** Mescc now supports arrays of struct of arbitrary size.
- *** Mescc now supports pointer arithmetic.
- *** Mescc now defines __i386__, __linux__.
- *** Mescc now supports --*p, ++*p.
- *** Mescc now supports int foo[bar] = {baz,...}.
- *** Mescc now supports \x00 in strings in M1.
- *** Mescc now supports complex enum expressions. Thanks, rain1!
- *** Mescc now supports short.
- *** Mescc now supports foo.bar = foo.baz = bla.
- *** Mescc now supports foo = bar < baz and comparison permutations.
- *** Mescc now supports (anonymous) structs in unions.
- *** Mescc now writes M1 strings if possible.
- **** 2 improved mlibc functions
- malloc, realloc.
- **** 13 new mlibc functions
- fclose, fgetc, fprintf, fwrite, memcpy, memmove, memset, snprintf, strcat,
- strchr, strrchr, strtoull, vnsprintf.
- **** 15 new tinycc-support tests
- 76-pointer-arithmetic.c, 77-pointer-assign.c, 78-union-struct.c,
- 79-int-array.c, 7a-struct-char-array.c, 7b-struct-int-array.c,
- 7c-dynarray.c, 7d-cast-char.c, 7e-struct-array-access.c,
- 7f-struct-pointer-arithmetic.c, 7g-struct-byte-word-field.c,
- 7h-struct-assign.c, 7i-struct-struct.c, 7j-strtoull.c,
- 7k-for-each-elem.c.
- ** Noteworthy bug fixes
- *** Mescc has many fixes for foo.bar[baz], foo[bar].baz with ./-> permutations.
- *** Many bugs and limitations in mescc have been fixed and removed.
-
-Greetings,
-janneke
-
-[0] https://gitlab.com/janneke/mes
-[1] https://www.gnu.org/software/guix
-[2] http://bootstrappable.org
-[3] https://github.com/oriansj/stage0
-[4] https://github.com/schemeway/lalr-scm
-[5] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
-[6] https://www.nongnu.org/nyacc/
-[7] https://www.gnu.org/software/guile/docs/master/guile.html/PEG-Parsing.html
-[8] https://gitlab.com/janneke/tinycc
-[9] https://lists.gnu.org/archive/html/tinycc-devel/2017-05/msg00103.html
-[10] http://www.softwarepreservation.org/projects/LISP/book/LISP%25201.5%2520Programmers%2520Manual.pdf
+++ /dev/null
-Subject: Mes 0.11 released
-
-I am pleased to announce the release of Mes 0.11, representing 16
-commits over 10 weeks. MesCC now compiles a less heavily patched
-TinyCC into a mes-tcc that in turn passes 41/69 of mescc's C tests.
-
-When mes-tcc passes all 69 tests, this almost-full-source-bootstrapped
-version of TinyCC should be able to compile itself. An unpatched, GNU
-Gcc-compiled tcc is known to compile GNU Gcc.
-
-* About
-
- Mes[0] aims to create full source bootstrapping for GuixSD[1] as
- part of the bootstrappable builds[2] project.
-
- It currently consists of a mutual self-hosting [close to Guile-]
- Scheme interpreter prototype in C and a Nyacc-based C compiler in
- [Guile] Scheme. This C prototype will be rewritten in stage0[3]
- M1 assembly (or compiled by M2-Planet or stage2 slow-LISP, or ...).
-
- The Scheme interpreter prototype (mes.c) has a Garbage Collector,
- a library of loadable Scheme modules-- notably Dominique Boucher's
- LALR[4], Pre-R6RS portable syntax-case[5] with R7RS ellipsis, Matt
- Wette's Nyacc[6], Guile's PEG[7] --and test suite just barely
- enough to support a simple REPL (repl.mes) and simple C-compiler
- MesCC (mescc.mes).
-
- MesCC can compile a modified TinyCC[8] that is close to being
- self-hosting. A GNU Ccc-compiled tcc is known[9] to compile GCC.
-
- Mes is inspired by The Maxwell Equations of Software: LISP-1.5[10]
- -- John McCarthy page 13, GNU Guix's source/binary packaging
- transparency and Jeremiah Orians's stage0 ~300 byte self-hosting
- hex assembler.
-
-* Download
-
- git clone https://gitlab.com/janneke/mes
-
- wget https://gitlab.com/janneke/mes/repository/archive.tar.gz?ref=v0.11 -O mes-0.11.tar.gz
-
-Mes runs from the source tree and can also be built, packaged and
-installed in Guix[SD] by the usual
-
- guix package -f guix.scm
-
-* Changes in 0.11 since 0.10
- ** MesCC
- *** MesCC now compiles a mes-tcc that passes 41/69 of mescc's C tests.
- *** MesCC's libc can now be compiled with tcc (syscall support: write).
- *** MesCC now compiles a less-patched tcc: -214/+458 lines [WAS: -333/+747].
- *** MesCC now supports empty for.
- *** MesCC has been greatly refactored, 500/3000 lines have been removed.
- *** MesCC now supports complex [struct] by value assign foo.bar, foo->bar, foo[bar].
- *** MesCC now depends on Nyacc 0.82.4.
-
-Greetings,
-janneke
-
-[0] https://gitlab.com/janneke/mes
-[1] https://www.gnu.org/software/guix
-[2] http://bootstrappable.org
-[3] https://github.com/oriansj/stage0
-[4] https://github.com/schemeway/lalr-scm
-[5] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
-[6] https://www.nongnu.org/nyacc/
-[7] https://www.gnu.org/software/guile/docs/master/guile.html/PEG-Parsing.html
-[8] https://gitlab.com/janneke/tinycc
-[9] https://lists.gnu.org/archive/html/tinycc-devel/2017-05/msg00103.html
-[10] http://www.softwarepreservation.org/projects/LISP/book/LISP%25201.5%2520Programmers%2520Manual.pdf
+++ /dev/null
-Subject: Mes 0.12 released
-
-I am pleased to announce the release of Mes 0.12, representing 120
-commits over 20 weeks. MesCC is prototyped running on Guile and can
-now run on Mes. Performance of Mes running MesCC has been improved by
-a factor of 100; mes.c (~3000 LOC) now compiles in ~4min. Many fixes
-and enhancements make that now also TinyCC parses (~1.5h) and compiles
-(~20min) with Mes+MesCC (Guile+MesCC takes ~2min).
-
-Special thanks go to Ricardo Wurmus for sharing the recursive macro
-expand perspective and starting work on that, to Han-Wen Nienhuys for
-his sharp `Ah, so you skipped SICP chapter 3' remark and to rain1 for
-their continuous help on #bootstrapping and their `let's only expand
-global variables' insight.
-
-* About
-
- Mes[0] aims to create full source bootstrapping for GuixSD[1] as
- part of the bootstrappable builds[2] project.
-
- It currently consists of a mutual self-hosting [close to Guile-]
- Scheme interpreter prototype in C and a Nyacc-based C compiler in
- [Guile] Scheme. This C prototype will be simplified to be
- transpiled by M2-Planet[3].
-
- The Scheme interpreter prototype (mes.c) has a Garbage Collector,
- a library of loadable Scheme modules-- notably Dominique Boucher's
- LALR[4], pre-R6RS portable syntax-case[5] with R7RS ellipsis, Matt
- Wette's Nyacc[6], Guile's PEG[7] --and test suite just barely
- enough to support a simple REPL (repl.mes) and simple C-compiler
- MesCC (mescc.mes).
-
- MesCC can compile a modified TinyCC[8] that is close to being
- self-hosting. A GNU Ccc-compiled tcc is known[9] to compile GCC.
-
- Mes is inspired by The Maxwell Equations of Software: LISP-1.5[10]
- -- John McCarthy page 13, GNU Guix's source/binary packaging
- transparency and Jeremiah Orians's stage0[11] ~300 byte self-hosting
- hex assembler.
-
-* Download
-
- git clone https://gitlab.com/janneke/mes
-
- wget https://gitlab.com/janneke/mes/repository/archive.tar.gz?ref=v0.12 -O mes-0.12.tar.gz
-
-Mes runs from the source tree and can also be built, packaged and
-installed in Guix[SD] by the usual
-
- guix package -f guix.scm
-
-* Changes in 0.12 since 0.11
- ** Core
- *** Mes can now run Nyacc (0.80.42) to compile itself in ~4min (~3000 LOC).
- *** Mes now recursively expands global variables per top level statement.
- *** Mes now recursively expands macros per top level statement.
- *** Mes now boots from MES_BOOT (default: module/mes/boot-0.scm).
- *** Mes now has a full Scheme reader in C again.
- This gives a 10x-20x performance improvement and increases the
- bootstrap footprint by 160 LOC.
- *** Mes reader now supports older abbreviated character forms
- #\bel, #\bs, #\ht and #\vt.
- *** 3 new functions
- equal2?, memq, core:write.
- ** Language
- *** Mes now has an incremental Scheme semantics test suite with 71 small tests.
- *** Variable names can now have ticks.
- *** Mes now evaluates expresions of COND only once.
- *** srfi-9 records have been reimplemented.
- *** #\page is now whitespace.
- *** #<eof> is no longer a character.
- *** 2 new macros
- define-macro*, with-fluids.
- *** 9 new functions
- dirname, last, reverse-list->string, setenv, string-drop-right,
- string-fold, string-fold-right, string-null?, write.
- ** MesCC
- **** 9 new functions
- chmod, getopt_long, ferror, itoab, longjmp, qsort, setenv, setjmp, strtol.
- **** 2 new header files
- endian.h, sys/signal.h.
-
-Greetings,
-janneke
-
-[0] https://gitlab.com/janneke/mes
-[1] https://www.gnu.org/software/guix
-[2] http://bootstrappable.org
-[3] https://github.com/oriansj/m2-planet
-[4] https://github.com/schemeway/lalr-scm
-[5] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
-[6] https://www.nongnu.org/nyacc/
-[7] https://www.gnu.org/software/guile/docs/master/guile.html/PEG-Parsing.html
-[8] https://gitlab.com/janneke/tinycc
-[9] https://lists.gnu.org/archive/html/tinycc-devel/2017-05/msg00103.html
-[10] http://www.softwarepreservation.org/projects/LISP/book/LISP%25201.5%2520Programmers%2520Manual.pdf
-[11] https://github.com/oriansj/stage0
+++ /dev/null
-Subject: Mes 0.13 released
-
-I am pleased to announce the release of Mes 0.13, representing 45
-commits over 3 weeks. MesCC can now compile a functional tcc when
-running on Mes (in ~1h45') or on Guile (in ~3min).
-
-This means that we are getting very close to a full source bootstrap
-of tcc: it is now built without gcc, glibc or guile; using only
-MesCC-tools and Mes sources and corresponding ascii/binary seeds.
-
-* About
-
- Mes[0] aims to help create full source bootstrapping for GuixSD[1]
- as part of the bootstrappable builds[2] project.
-
- It currently consists of a mutual self-hosting Scheme interpreter
- prototype in C and a Nyacc-based C compiler in Scheme. This C
- prototype is being simplified to be transpiled by M2-Planet[3].
-
- The Scheme interpreter prototype (mes.c) has a Garbage Collector,
- a library of loadable Scheme modules-- notably Dominique Boucher's
- LALR[4], pre-R6RS portable syntax-case[5] with R7RS ellipsis, Matt
- Wette's Nyacc[6], Guile's PEG[7] --and test suite just barely
- enough to support a simple REPL (repl.mes) and simple C-compiler
- MesCC.
-
- Mes+MesCC can compile a modified TinyCC[8] that is close to being
- self-hosting. A GNU Ccc-compiled tcc is known[9] to compile GCC.
-
- Mes is inspired by The Maxwell Equations of Software: LISP-1.5[10]
- -- John McCarthy page 13, GNU Guix's source/binary packaging
- transparency and Jeremiah Orians's stage0[11] ~300 byte self-hosting
- hex assembler.
-
-* Download
-
- git clone https://gitlab.com/janneke/mes
-
- wget https://gitlab.com/janneke/mes/-/archive/v0.13/mes-0.13.tar.gz
-
-Mes runs from the source tree and can also be built, packaged and
-installed in Guix[SD] by the usual
-
- guix package -f guix.scm
-
-* Changes in 0.13 since 0.12
- ** Core
- *** Bootstrapped Mes+MesCC can now compile a patched tcc in ~2h30' (~25,000 LOC).
- *** MesCC scripts for Mes and Guile are now merged; executable is: `mescc'.
- *** Mes now uses only one arena for stop-and-copy; doubles available size.
- *** Mes now has a Guile-like command-line interface (mes.repl has been removed).
- *** Mes now boots into a full Scheme by default.
- *** Mes can now be compiled (MES_MINI=1) to boot into a minimal Scheme (~2000 cells).
- *** Mes now creates less garbage in the reader and in
- append2, append_reverse, reverse, reverse!, vector-for-each, vector-to-list, vector-map.
- *** 5 new functions
- append-reverse, chmod, ioctl, isatty, isspace, last_pair, reverse!.
- ** Language
- *** 3 new functions
- char-whitespace?, chmod, isatty?
- ** Noteworthy bug fixes
- *** Two bugs in the jam scraper/garbage collector have been fixed.
- *** equal2_p now uses tail call elimination.
- *** Escaped characters in strings are now read and write'd correctly.
- *** The repl now expands macros again.
-
-Greetings,
-janneke
-
-[0] https://gitlab.com/janneke/mes
-[1] https://www.gnu.org/software/guix
-[2] http://bootstrappable.org
-[3] https://github.com/oriansj/m2-planet
-[4] https://github.com/schemeway/lalr-scm
-[5] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
-[6] https://www.nongnu.org/nyacc/
-[7] https://www.gnu.org/software/guile/docs/master/guile.html/PEG-Parsing.html
-[8] https://gitlab.com/janneke/tinycc
-[9] https://lists.gnu.org/archive/html/tinycc-devel/2017-05/msg00103.html
-[10] http://www.softwarepreservation.org/projects/LISP/book/LISP%25201.5%2520Programmers%2520Manual.pdf
-[11] https://github.com/oriansj/stage0
+++ /dev/null
-Subject: Mes 0.14 released
-
-I am pleased to announce the release of Mes 0.14, representing 98
-commits over 4 weeks. Mes+MesCC now compiles a self-hosting TinyCC
-that has only been slightly patched.
-
-This means that we can now build a tcc that depends only on a 1MB
-ASCII M1 seed. GuixSD currently uses a ~250MB binary seed to build
-gcc.
-
-Next targets are: build gcc using this almost full-source bootstrapped
-tcc, and reduce the 1MB ASCII M1 seed to ~100KB of M2 source, which is
-a restricted subset of C.
-
-Packages are available from Guix's wip-bootstrap branch.
-
-* About
-
- Mes[0] aims to help create full source bootstrapping for GuixSD[1]
- as part of the bootstrappable builds[2] project.
-
- It currently consists of a mutual self-hosting Scheme interpreter
- prototype in C and a Nyacc-based C compiler in Scheme. This C
- prototype is being simplified to be transpiled by M2-Planet[3].
-
- The Scheme interpreter prototype (mes.c) has a Garbage Collector,
- a library of loadable Scheme modules-- notably Dominique Boucher's
- LALR[4], pre-R6RS portable syntax-case[5] with R7RS ellipsis, Matt
- Wette's Nyacc[6], Guile's PEG[7] --and test suite just barely
- enough to support a simple REPL (repl.mes) and simple C-compiler
- MesCC.
-
- Mes+MesCC can compile an only slightly patched TinyCC[8] that is
- self-hosting. A GNU Ccc-compiled tcc is known[9] to compile GCC.
-
- Mes is inspired by The Maxwell Equations of Software: LISP-1.5[10]
- -- John McCarthy page 13, GNU Guix's source/binary packaging
- transparency and Jeremiah Orians's stage0[11] ~300 byte self-hosting
- hex assembler.
-
-* Download
-
- git clone https://gitlab.com/janneke/mes
-
- wget https://gitlab.com/janneke/mes/-/archive/v0.14/mes-0.14.tar.gz
-
-Mes runs from the source tree and can also be built, packaged and
-installed in Guix[SD] by the usual
-
- guix package -f guix.scm
-
-* Changes in 0.14 since 0.13
- ** Core
- *** Bootstrapped Mes+MesCC now compiles a tcc that is self-hosting and only slightly patched.
- *** The reader now supports binary numbers (previously: read as decimal).
- *** String port support has been moved to C.
- *** The build has been simplified, the Make-in-Scheme experiment has been removed.
- *** 2 new functions
- chmod, logxor.
- ** Language
- *** Mes now supports define-immutable-record-type and single set-field from srfi-9 gnu.
- *** 12 new functions
- basename, chmod, const, delete-duplicates, logxor, string-contains,
- string-map, string-replace, string-trim, string-trim-both,
- string-trim-right, unfold.
- ** MesCC
- *** MesCC now supports standalone usage of nestedly defined enums, structs and unions.
- *** MesCC now supports comparison of unsigned and promotion of signed/unsigned -> unsigned.
- *** MesCC now supports sign extension for char, short.
- *** MesCC now has stubbing for floats; compiling works, data is fu.
- *** MesCC now has full suport for switch case, e.g. with default as first clause.
- *** MesCC now supports destruction of casted expressions: ((struct foo*)p)->bar.
- *** MesCC now has full support for pre/post, e.g.: (foo--)->bar and permutations.
- *** MesCC now supports sizeof any expression or type.
- *** MesCC now supports initialization of anonymous unions.
- *** MesCC now supports bit fields.
- *** MesCC now supports valued functions in expressions: destruction and dereferencing.
- *** MesCC now supports function-static variables.
- *** MesCC now supports initializer lists in structs and unions.
- *** MesCC now has full support for heterogeneous variable declarations, e.g.: char p, *x = "foo", buf[3];
- **** 4 new functions
- __lshrdi3, __ashldi3, __ashrdi3, strncpy.
- **** 9 new mlibc stubs
- __fixdfdi, __fixsfdi, __fixunsxfdi, __fixxfdi, __floatundixf, ldexp,
- strtod, strtof, strtold.
-
-Greetings,
-janneke
-
-[0] https://gitlab.com/janneke/mes
-[1] https://www.gnu.org/software/guix
-[2] http://bootstrappable.org
-[3] https://github.com/oriansj/m2-planet
-[4] https://github.com/schemeway/lalr-scm
-[5] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
-[6] https://www.nongnu.org/nyacc/
-[7] https://www.gnu.org/software/guile/docs/master/guile.html/PEG-Parsing.html
-[8] https://gitlab.com/janneke/tinycc
-[9] https://lists.gnu.org/archive/html/tinycc-devel/2017-05/msg00103.html
-[10] http://www.softwarepreservation.org/projects/LISP/book/LISP%25201.5%2520Programmers%2520Manual.pdf
-[11] https://github.com/oriansj/stage0
+++ /dev/null
-Subject: Mes 0.15 released
-
-I am pleased to announce the release of Mes 0.15, representing 45
-commits over 3 weeks. The GNU toolchain is getting bootstrapped!
-
-As of 0.14, Mes+MesCC compiles a self-hosting TinyCC. Using the 0.15
-Mes C library, this TinyCC can build the GNU tools triplet:
-binutils-2.14, gcc-2.95.3, glibc-2.2.5.
-
-This means that we can build a GNU toolchain that depends only on a
-critical 1MB ASCII M1 seed. GuixSD currently uses a ~250MB binary
-seed to build gcc.
-
-Next targets are: upstream the Mes bootstrap to GuixSD, build a
-Gcc-4.7 and Glibc-2.23, bootstrap utilities like bison, flex, grep,
-sed..., replace GuixSD's bootstrap for x86 and reduce the 1MB ASCII M1
-seed to ~5000 LOC/~100KB of M2 source, which is a restricted subset of
-C.
-
-Packages are available from Guix's wip-bootstrap branch.
-
-* About
-
- Mes[0] aims to help create full source bootstrapping for GuixSD[1]
- as part of the bootstrappable builds[2] project.
-
- It currently consists of a mutual self-hosting Scheme interpreter
- prototype in C and a Nyacc-based C compiler in Scheme. This C
- prototype is being simplified to be transpiled by M2-Planet[3].
-
- The Scheme interpreter prototype (mes.c) has a Garbage Collector,
- a library of loadable Scheme modules-- notably Dominique Boucher's
- LALR[4], pre-R6RS portable syntax-case[5] with R7RS ellipsis, Matt
- Wette's Nyacc[6], Guile's PEG[7] --and test suite just barely
- enough to support a simple REPL (repl.mes) and simple C-compiler
- MesCC.
-
- Mes+MesCC can compile an only slightly patched TinyCC[8] that is
- self-hosting. Using the Mes C library, this tcc can now build the
- GNU tools triplet: binutils-2.14, gcc-2.95.3, glibc-2.2.5.
-
- Mes is inspired by The Maxwell Equations of Software: LISP-1.5[9]
- -- John McCarthy page 13, GNU Guix's source/binary packaging
- transparency and Jeremiah Orians's stage0[10] ~300 byte self-hosting
- hex assembler.
-
-* Download
-
- git clone https://gitlab.com/janneke/mes
-
- wget https://gitlab.com/janneke/mes/-/archive/v0.15/mes-0.15.tar.gz
-
-Mes runs from the source tree and can also be built, packaged and
-installed in Guix[SD] by the usual
-
- guix package -f guix.scm
-
-* Changes in 0.15 since 0.14
- ** Core
- *** Support fork, exec, waitpid.
- *** Boot-0 loading has been refactored.
- *** MesCC now has out of the box Geiser support.
- ** Language
- *** 2 new functions
- drop, drop-right.
- ** MesCC
- *** MesCC and Mes Lib C can now build binutils-2.30, gcc-2.95.3 and glibc-2.2.5.
- *** MesCC now provides dummy crti.o, crtn.o so that tcc needs not be patched for those.
- *** Mes Lib C now supports compiling glibc-2.2.25.
- *** Mes Lib C now supports compiling gcc-2.95.3
- *** Mes Lib C now supports compiling binutils-2.30.
- *** Mes Lib C now supports compiling m4-1.4.
- *** Mes Lib C has been split into archs: gcc, x86-mes-gcc and x86-mes.
- *** MesCC now has a posixy command line interface.
- **** 70 new functions
- abs, access, alarm, alloca, atexit, atol, bcmp, bcopy, brk, bzero,
- chmod, clearerr, close, dup, dup2, execve, fabs, fcntl, fdgets, feof,
- fgets, fileno, fork, freopen, fscanf, fstat, fsync, getcwd, getgid,
- getpid, getrusage, getuid, index, ioctl, isalnum, isalpha, isascii,
- iscntrl, isprint, ispunct, kill, link, lseek, lstat, mkdir, mktemp,
- nanosleep, open, perror, pipe, raise, read, rename, rindex, rmdir,
- sbrk, sbrk, setitimer, signal, sleep, stat, strcspn, strdup, strerror,
- strncat, strpbrk, strspn, unlink, unsetenv, waitpid.
- **** 23 new stubs
- abort, atof, bsearch, bsearch, chown, ctime, fpurge, freadahead,
- frexp, getpwnam, gmtime, mbstowcs, pclose, popen, rewind, setbuf,
- sigsetmask, strftime, sys_siglist, system, times, umask, utime.
- **** 10 new C tests
- 51-strcmp.c, 70-printf.c, 87-sscanf.c, 90-strpbrk.c, 91-fseek.c,
- 92-stat.c, 93-fread-fwrite.c, 94-unsetenv.c, 95-signal.c, 96-strto.c.
-
-
-Greetings,
-janneke
-
-[0] https://gitlab.com/janneke/mes
-[1] https://www.gnu.org/software/guix
-[2] http://bootstrappable.org
-[3] https://github.com/oriansj/m2-planet
-[4] https://github.com/schemeway/lalr-scm
-[5] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
-[6] https://www.nongnu.org/nyacc/
-[7] https://www.gnu.org/software/guile/docs/master/guile.html/PEG-Parsing.html
-[8] https://gitlab.com/janneke/tinycc
-[9] http://www.softwarepreservation.org/projects/LISP/book/LISP%25201.5%2520Programmers%2520Manual.pdf
-[10] https://github.com/oriansj/stage0
+++ /dev/null
-Subject: Mes 0.16 released
-
-I am pleased to announce the release of Mes 0.16, representing 27
-commits over 2 weeks.
-
-A most annoying ELF header bug was fixed that suddenly had all Mes
-binaries segfault before entering `_start' on Linux 4.17 and later.
-
-We now have binutils-2.20.1 and gcc-4.1.0, both compiled with
-gcc-2.95.3 and glibc-2.2.5.
-
-This reduced-binary-seed bootstrap still depends on these bootstrap
-binaries: BOOTSTRAP-GUILE, flex, bash, bzip2, coreutils, diffutils,
-gawk, grep, gzip, make, sed, tar, on the small binary seeds:
-tinycc-seed, mescc-seed and on the mes.M1 ASCII seed.
-
-Next targets:
-
- - build a Gcc 4.7 and Glibc 2.23
- - upstream the x86 Mes bootstrap to GuixSD
- - reduce the 1MB ASCII M1 seed to ~5000 LOC/~100KB of M2 source
- - revive Gash: a posix shell for Guile to reduce the bootstrap binary
- dependencies
- - and/or otherwise reduce the bootstrap binary dependencies
-
-Packages are available from Guix's wip-bootstrap branch.
-
-* About
-
-Mes[0] aims to help create full source bootstrapping for GuixSD[1] as
-part of the bootstrappable builds[2] effort.
-
-It currently consists of a mutual self-hosting Scheme interpreter
-prototype written in C and a Nyacc-based C compiler written in Scheme.
-This C prototype is being simplified[3] to be transpiled by M2-Planet[4].
-
-The Scheme interpreter prototype (mes.c) has a Garbage Collector, a
-library of loadable Scheme modules-- notably Dominique Boucher's LALR[5],
-Pre-R6RS portable syntax-case[6] with R7RS ellipsis, Matt Wette's Nyacc[7],
-Guile's PEG[8] --and test suite just barely enough to support a simple
-REPL and simple C-compiler: MesCC.
-
-Mes+MesCC can compile an only lighty patched TinyCC[9] that is
-self-hosting. Using this tcc and the Mes C library we now have a
-reduced-binary-seed bootstrap for the gnutools triplet: glibc-2.2.5,
-binutils-2.20.1, gcc-4.1.0.
-
-Mes is inspired by The Maxwell Equations of Software: LISP-1.5[10] --
-John McCarthy page 13, GNU Guix's source/binary packaging transparency
-and Jeremiah Orians's stage0[11] ~500 byte self-hosting hex assembler.
-
-* Download
-
- git clone https://gitlab.com/janneke/mes
-
- wget https://gitlab.com/janneke/mes/-/archive/v0.16/mes-0.16.tar.gz
-
-Mes runs from the source tree and can also be built, packaged and
-installed in Guix[SD] by the usual
-
- guix package -f guix.scm
-
-* Get informed, get involved
-
- Join #bootstrappable on irc.freenode.net.
-
-* Changes in 0.16 since 0.15
- ** Core
- *** Support building with tcc, including Mes Lib C in-line assembly.
- *** core:execl now supports 1000 arguments.
- ** MesCC
- *** Mes Lib C now bootstraps glibc-2.2.5, binutils-2.20.1, gcc-4.1.0.
- *** MesCC binaries now run on Linux 4.17 too, i.e. survive Linus' new `sane mmap limits.'
- *** MesCC now runs with mescc-tools 0.5 (no = in long options).
- **** 3 new C test
- 88-strrchrc, 97-fopen.c, 98-fopen.c.
- ** Noteworthy bug fixes
- *** strrchr now stops when it reaches start of string.
- *** fopen now return 0 upon failure. Supports binutils' hack: fd=-2 means `cached'.
- *** vfprintf, vsprintf now support precision and width on integers strings better.
- *** fread now produces ungetc'd chars too.
- *** memcmp now supports comparing 0 bytes, supporting binutils.
-
- *** The unused ELF header data section, identical to the text section, has been removed.
-
-Greetings,
-janneke
-
-[0] https://gitlab.com/janneke/mes
-[1] https://www.gnu.org/software/guix
-[2] http://bootstrappable.org
-[3] https://github.com/oriansj/mes-m2
-[4] https://github.com/oriansj/m2-planet
-[5] https://github.com/schemeway/lalr-scm
-[6] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
-[7] https://www.nongnu.org/nyacc
-[8] https://www.gnu.org/software/guile/docs/master/guile.html/PEG-Parsing.html
-[9] https://gitlab.com/janneke/tinycc
-[10] http://www.softwarepreservation.org/projects/LISP/book/LISP%25201.5%2520Programmers%2520Manual.pdf
-[11] https://github.com/oriansj/stage0
+++ /dev/null
-Subject: on bootstrapping: first Mes 0.3 released
-
-I am pleased to announce the first release of Mes: 0.3, representing
-152 commits over 3 months since the second status report[1].
-
-* About
-
- Mes aims to create an entirely source-based bootstrapping path. The
- target is to [have GuixSD] boostrap from a minimal, easily inspectable
- binary --that should be readable as source-- into something close to
- R6RS Scheme.
-
- As bootstrapping is presumably easiest and probably most fun with
- Scheme, the next step for Mes is mescc: a C compiler/linker to
- boostrap into GNU Gcc and GNU Guile, possibly via Tiny-CC.
-
- It currently has an interpreter written in C (mes) with Garbage
- Collector (Jam Scraper), a library of loadable Scheme modules with
- test suite just barely enough to support a simple REPL (repl.mes)
- and a proof-of-concept c-compiler (mescc.mes) that produces an elf
- from the simplest of C files.
-
- Mes is inspired by The Maxwell Equations of Software: LISP-1.5[2]
- -- John McCarthy page 13
-
-* Download
-
- git clone https://gitlab.com/janneke/mes
-
- wget https://gitlab.com/janneke/mes/repository/archive.tar.gz?ref=v0.3 -O mes-0.3.tar.gz
-
-Mes runs from the source tree and can also be built, packaged and
-installed in Guix[SD] by the usual
-
- guix package -f guix.scm
-
-
-* Changes in 0.3 since 0.2
- ** Core
- *** Number-based rather than pointer-based cells.
- *** Garbage collector aka Jam scraper.
- A variant on SICP's stop and copy Garbage Collector (Jam Scraper?)
- algorithm has been implemented.
- *** The reader has been moved to Scheme.
- ** Language
- *** Simple loadable modules.
- *** Srfi-9 and match use handwritten syntax-rules (mes-use-module (mes syntax)).
- *** Optional syntax-case using psyntax (mes-use-module (mes psyntax)).
- ** Noteworthy bug fixes
- *** Srfi-0 has been fixed.
-
-* Changes in 0.2 since 0.1
- ** Core
- *** Names of symbols and strings are list of characters [WAS: c-string].
- *** Sc-expand from pre-R6RS's psyntax has been integrated.
- *** Undefined variable error now shows the name of the undefined variable.
- *** There is now only one SCM type for builtin functions.
- *** Macro expansion has been cleaned-up.
- ** Language
- *** Mes now provides a subset of R6RS.
- *** Mes now provides syntax-case.
- *** Mes now provides `load'.
- ** Noteworthy bug fixes
- *** Using values as second parameter of builtin function yields first value.
- *** Quoted internals (e.g. 'if 'lambda) are now symbols.
- *** Syntax error now exits.
- *** Make+Bash voodoo has been replaced by build-aux/mes-snarf.scm.
- *** Apply now accepts multiple list arguments.
- *** Apply of character, inernal, number, string is an error.
- *** Quasisyntax reading
-
-* Changes in 0.1 (since progress report #2)
- ** Core
- *** expand_macro is now a separate function.
- *** A smaller core can now compiled using BOOT=1.
- The smaller core does not provide define, define-macro, or quasiquote;
- these are provided from a Scheme version of implemented eval/apply.
- ** Language
- *** Mes now provides a subset of R5RS.
- *** Mes now provides let-syntax.
- *** Mes now provides match.
- *** Mes now provides quasisyntax, unsyntax and unsyntax-splicing.
- ** User interface
- *** Mes now provides a REPL, run:
- scripts/repl.mes
- *** Mes compiler can be run as a script:
- scripts/mescc.mes doc/examples/main.c
- *** Macro expansion can be inspected in the REPL, e.g.:
- ,expand (and 0 1)
- ** Noteworthy bug fixes
- *** Performance: scripts/mescc.mes now takes 2s to compile main.c (was 1'20").
- *** Symbols are now truly unique.
- * '(), #t, #f are no longer symbols.
-
-Greetings,
-Jan
-
-[1] https://lists.nongnu.org/archive/html/guile-user/2016-09/msg00061.html
-[2] http://www.softwarepreservation.org/projects/LISP/book/LISP%25201.5%2520Programmers%2520Manual.pdf
+++ /dev/null
-Subject: Mes 0.4 released
-
-I am pleased to announce the release of Mes 0.4, representing 115
-commits over barely two weeks. It now runs Nyacc and PEG and has much
-reduced core.
-
-* About
-
- Mes aims to create an entirely source-based bootstrapping path. The
- target is to [have GuixSD] boostrap from a minimal, easily inspectable
- binary --that should be readable as source-- into something close to
- R6RS Scheme.
-
- As bootstrapping is presumably easiest and probably most fun with
- Scheme, the next step for Mes is mescc: a C compiler/linker to
- boostrap into GNU Gcc and GNU Guile, possibly via Tiny-CC.
-
- It currently has an interpreter written in C (mes) with Garbage
- Collector (Jam Scraper), a library of loadable Scheme modules--
- notably Dominique Boucher's LALR[1], Pre-R6RS portable
- syntax-case[2] with R7RS ellipsis, Nyacc[3] and Guile's PEG[4]
- --and test suite just barely enough to support a simple REPL
- (repl.mes) and a proof-of-concept C-compiler (mescc.mes) that
- produces an elf from the simplest of C files.
-
- Mes is inspired by The Maxwell Equations of Software: LISP-1.5[5]
- -- John McCarthy page 13
-
-* Download
-
- git clone https://gitlab.com/janneke/mes
-
- wget https://gitlab.com/janneke/mes/repository/archive.tar.gz?ref=v0.4 -O mes-0.4.tar.gz
-
-Mes runs from the source tree and can also be built, packaged and
-installed in Guix[SD] by the usual
-
- guix package -f guix.scm
-
-* Changes in 0.4 since 0.3
- ** Core
- *** Improved performance.
- Macros are now memoized; after expansion and before eval'ing the
- expanded form, their input s-expression is replaced by the expansion.
- This yields a nice performance improvement which finally allowed
- moving all non-essential bits from the C-core into Scheme...including
- the reader. The Scheme reader is much, much slower than the previous
- C version, making Mes--again-- feel slow. Think of that as a feature.
- *** Bootstrap with minimal reader in C.
- The C-reader needs only support reading of words and lists
- (s-expressions), line-comments to read the initial Scheme reader which
- then takes over and handles reading of quoting, characters, strings,
- block-comments.
- *** Reduced size.
- Total C size: ~1500LOC. The main Mes evaluator is now ~1000LOC
- including cell creation and garbage collector. This code is able to
- execute a Scheme program that has been loaded into memory. Another
- ~500LOC is spent to load a minimal Scheme program and to dump it, to
- provide a small posix interface, math functions and do some error
- reporting.
- *** Programs can be dumped and loaded using --dump and --load.
- ** Language
- *** Minimal syntactic exception support for Nyacc.
- *** Minimal syntactic fluids support for Nyacc.
- *** Keywords are now supported.
- *** Cond now supports =>.
- *** Guile's optargs: lambda* and define* are now supported.
- *** #;-comments are now supported.
- *** Non-nested #| |#-comments are now supported.
- *** Quasisyntax is now supported.
- *** R7RS syntax-rules with custom ellipsis, with-ellipsis are now supported.
- *** 9 new [partial] modules
- (mes fluids), (mes nyacc), (mes optargs), (mes pmatch), (mes peg),
- (srfi srfi-13), (srfi srfi-9-psyntax), (srfi srfi-26), (srfi srfi-43),
- (rnrs arithmetic bitwise), (sxml xpath)
- *** 36 new functions
- 1+, 1-, abs, and=>, append-reverse, ash, char<=?, char<?, char>=?,
- char>?, even?, filter, delete, delq, vector-copy, fold, fold-right,
- getenv, iota, keyword->symbol list-head, list-tail, negative?, odd?,
- positive?, remove!, remove, string->number, string-copy,
- string-prefix?, string=, string=?, symbol->keyword symbol-append,
- symbol-prefix?, unless, write, zero?.
- ** Noteworthy bug fixes
- *** Macros are now memoized.
- *** An error is reported when using a wrong number of arguments with a call.
- *** Cond now evaluates its test clauses only once.
- *** Append can also handle one argument.
- *** For-each now supports 2 list arguments.
- *** Map now supports 3 list arguments.
- *** Backslash in string is supported.
- *** Closure is not a pair.
- *** All standard characters are supported.
- *** Mescc now also runs in Guile.
-
-
-Greetings,
-Jan
-
-[1] https://github.com/schemeway/lalr-scm
-[2] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
-[3] https://www.nongnu.org/nyacc/
-[4] https://www.gnu.org/software/guile/docs/master/guile.html/PEG-Parsing.html
-[5] http://www.softwarepreservation.org/projects/LISP/book/LISP%25201.5%2520Programmers%2520Manual.pdf
+++ /dev/null
-Subject: Mes 0.5 released
-
-I am pleased to announce the release of Mes 0.5, representing 250
-commits over 4 months. Mes is now self-hosting, or rather it features
-a mutual self-hosting Scheme interpreter and C compiler: mes.c and
-mescc; a Nyacc-based C compiler backend that also works separately
-with Guile.
-
-* About
-
- Mes aims to create full source bootstrapping for GuixSD: an
- entirely source-based bootstrap path. The target is to [have
- GuixSD] boostrap from a minimal, easily inspectable binary --that
- should be readable as source-- into something close to R6RS
- Scheme.
-
- It currently consists of a mutual self-hosting [close to Guile-]
- Scheme interpreter prototype in C and a Nyacc-based C compiler in
- [Guile] Scheme.
-
- The Scheme interpreter prototype (mes.c) has a Garbage Collector,
- a library of loadable Scheme modules-- notably Dominique Boucher's
- LALR[1], Pre-R6RS portable syntax-case[2] with R7RS ellipsis, Matt
- Wette's Nyacc[3] Guile's PEG[4] --and test suite just barely
- enough to support a simple REPL (repl.mes) and simple C-compiler
- (mescc.mes) that can produce the second initial ELF binary from
- binary from mes.c, in only about 2h30'.
-
- Mes was inspired by The Maxwell Equations of Software: LISP-1.5[5]
- -- John McCarthy page 13, GNU Guix's[6] source/binary packaging
- transparency and Jeremiah Orians's stage0[7] bootstrap project.
-
-* Download
-
- git clone https://gitlab.com/janneke/mes
-
- wget https://gitlab.com/janneke/mes/repository/archive.tar.gz?ref=v0.5 -O mes-0.5.tar.gz
-
-Mes runs from the source tree and can also be built, packaged and
-installed in Guix[SD] by the usual
-
- guix package -f guix.scm
-
-* Changes in 0.5 since 0.4
- ** Core
- *** Support compilation with Mescc.
- *** Support compilation with -nostdinc, -nostdlib using mlibc.
- *** Support call-with-current-continuation.
- *** Support exception handling, catch/throw.
- *** Give sensible error message when a macro is missing.
- ** Language
- *** Map now supports 4 lists.
- *** The reader supports negative hex numbers.
- *** 24 new functions
- access?, assoc-set! c????r, compose, list->char-set,
- open-input-string, read-string, string-delete, with-throw-handler.
- ** Mescc
- *** Mescc can be used separately as a Nyacc-based C compiler backend for Guile.
- *** Switch to Nyacc frontend, update Nyacc to 0.76.5.
- *** Mescc now has a test suite, scaffold/t.c.
- *** Mescc now includes a minimal C library: libc/mlib.c libc/mstart.c.
- *** Mescc can now compile mes.c.
- ** Noteworthy bug fixes
- *** The build system (configure, make) has been refactored.
- *** Support map-4.
- *** Evaluate arguments of OR only once.
- *** Fix assq-set!
- *** Fix ,expand in the REPL.
-
-Greetings,
-janneke
-
-[1] https://github.com/schemeway/lalr-scm
-[2] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
-[3] https://www.nongnu.org/nyacc/
-[4] https://www.gnu.org/software/guile/docs/master/guile.html/PEG-Parsing.html
-[5] http://www.softwarepreservation.org/projects/LISP/book/LISP%25201.5%2520Programmers%2520Manual.pdf
-[6] https://www.gnu.org/software/guix/
-[7] https://github.com/oriansj/stage0
+++ /dev/null
-Subject: Mes 0.6 released
-
-I am pleased to announce the release of Mes 0.6, representing 32
-commits over 24 days. Mescc now works with vanilla Nyacc 0.78.3
-(thanks Matt!), Nyacc has been unbundled and Mescc compiles 33/55
-of tinycc test2 tests.
-
-* About
-
- Mes aims to create full source bootstrapping for GuixSD: an
- entirely source-based bootstrap path. The target is to [have
- GuixSD] boostrap from a minimal, easily inspectable binary --that
- should be readable as source-- into something close to R6RS
- Scheme.
-
- It currently consists of a mutual self-hosting [close to Guile-]
- Scheme interpreter prototype in C and a Nyacc-based C compiler in
- [Guile] Scheme.
-
- The Scheme interpreter prototype (mes.c) has a Garbage Collector,
- a library of loadable Scheme modules-- notably Dominique Boucher's
- LALR[1], Pre-R6RS portable syntax-case[2] with R7RS ellipsis, Matt
- Wette's Nyacc[3] Guile's PEG[4] --and test suite just barely
- enough to support a simple REPL (repl.mes) and simple C-compiler
- (mescc.mes) that can produce the second initial ELF binary from
- binary from mes.c, in only about 2h30'.
-
- Mes was inspired by The Maxwell Equations of Software: LISP-1.5[5]
- -- John McCarthy page 13, GNU Guix's[6] source/binary packaging
- transparency and Jeremiah Orians's stage0[7] bootstrap project.
-
-* Download
-
- git clone https://gitlab.com/janneke/mes
-
- wget https://gitlab.com/janneke/mes/repository/archive.tar.gz?ref=v0.6 -O mes-0.6.tar.gz
-
-Mes runs from the source tree and can also be built, packaged and
-installed in Guix[SD] by the usual
-
- guix package -f guix.scm
-
-* Changes in 0.6 since 0.5
- ** Core
- *** configure, build now supports x86 and development for arm with-courage.
- ** Language
- *** Nyacc has been unbundled and is now a dependency.
- *** Mes now supports case-lambda.
- *** Mes reader now supports abbreviated form for return character #\cr.
- *** 1 new function
- string-index.
- ** Mescc
- *** Mescc can be used on regular C sources, like tinycc's tests/test2 suite.
- *** make check passes 33/55 of tinycc's test suite etest/test2 tests.
- *** Mescc now recognizes `short' as a type.
- *** Mescc now supports sizeof (<identifier>), sizeof(<expression>).
- *** Mescc now respects enum field initializers and supports enum variables.
- *** Mescc now supports binary constants .
- *** Mescc now supports assignments from ==, != boolean expressions .
- *** Mescc now supports &, ^.
- *** Mescc now supports struct pointers.
- *** Mescc now supports struct definition with immediatete variable declaration.
- *** Mescc now supports calling (returning correctly from) void functions.
- *** Mescc now handles case statements breaks without compound correctly.
- *** Mescc now has better [int/pointer] array support.
- *** Mescc now has better support for simple (non-array-)structs.
- *** Mescc now supports multiple declarations in one statement like: int a,b;
- **** 2 new mlibc functions
- printf, strcpy.
- ** Noteworthy bug fixes
- *** Installed mes and mes.repl now also run outside of source tree again.
-
-Greetings,
-janneke
-
-[1] https://github.com/schemeway/lalr-scm
-[2] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
-[3] https://www.nongnu.org/nyacc/
-[4] https://www.gnu.org/software/guile/docs/master/guile.html/PEG-Parsing.html
-[5] http://www.softwarepreservation.org/projects/LISP/book/LISP%25201.5%2520Programmers%2520Manual.pdf
-[6] https://www.gnu.org/software/guix/
-[7] https://github.com/oriansj/stage0
+++ /dev/null
-Subject: Mes 0.7 released
-
-I am pleased to announce the release of Mes 0.7, representing 32
-commits over 4 weeks. Mescc now behaves more like a regular C
-compiler: supporting -E, -c, -o options and with a more complete set
-of header files [stubs]; enough to work on compiling tinycc's tcc.c
-albeit a somewhat modified version[8].
-
-* About
-
- Mes aims to create full source bootstrapping for GuixSD: an
- entirely source-based bootstrap path. The target is to [have
- GuixSD] boostrap from a minimal, easily inspectable binary --that
- should be readable as source-- into something close to R6RS
- Scheme.
-
- It currently consists of a mutual self-hosting [close to Guile-]
- Scheme interpreter prototype in C and a Nyacc-based C compiler in
- [Guile] Scheme.
-
- The Scheme interpreter prototype (mes.c) has a Garbage Collector,
- a library of loadable Scheme modules-- notably Dominique Boucher's
- LALR[1], Pre-R6RS portable syntax-case[2] with R7RS ellipsis, Matt
- Wette's Nyacc[3] Guile's PEG[4] --and test suite just barely
- enough to support a simple REPL (repl.mes) and simple C-compiler
- (mescc.mes) that can produce the second initial ELF binary from
- binary from mes.c, in only about 2h30'.
-
- Mes was inspired by The Maxwell Equations of Software: LISP-1.5[5]
- -- John McCarthy page 13, GNU Guix's[6] source/binary packaging
- transparency and Jeremiah Orians's stage0[7] bootstrap project.
-
-* Download
-
- git clone https://gitlab.com/janneke/mes
-
- wget https://gitlab.com/janneke/mes/repository/archive.tar.gz?ref=v0.7 -O mes-0.7.tar.gz
-
-Mes runs from the source tree and can also be built, packaged and
-installed in Guix[SD] by the usual
-
- guix package -f guix.scm
-
-* Changes in 0.7 since 0.6
- ** Core
- *** The minimal C reader is now always included; dependencies
- on i686-unknown-linux-gnu-gcc and binary read-0-32.mo have been
- dropped, these are now optional.
- ** Language
- *** Mes reader now supports octal numbers #oXXX.
- *** 10 new functions
- current-output-port, getopt-long, negate, open-output-file,
- option-ref, set-current-output-port, string-rindex, string-suffix?,
- with-ouwith-output-to-file, with-output-to-port.
- ** Mescc
- *** Mescc can now be installed and used alongside a gcc installation.
- *** Mescc can now handle const anywhere.
- *** Mescc now supports array fields in structs.
- *** Mescc now supports forward declarations and typedef.
- *** Mescc can now handle comments anywhere.
- *** Mescc now supports addition and substraction for enum field values.
- *** Mescc now supports anonymous enums.
- *** Mescc now supports all C99 header files needed to compile tcc.c.
- *** build: C sources are now preprocessed separately, then compiled and linked.
- *** build: mlibc and C sources are now compiled separately and then linked.
- *** mlibc has been moved from Scheme snippets into C.
- *** Mescc now supports -c, -D, -E, -I and -o options.
- **** open now supports optional third mode parameter.
- ** Noteworthy bug fixes
- *** string-index now supports function predicate.
- *** number->string for radix > 10 now produces `a' instead of `:'.
-
-Greetings,
-janneke
-
-[1] https://github.com/schemeway/lalr-scm
-[2] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
-[3] https://www.nongnu.org/nyacc/
-[4] https://www.gnu.org/software/guile/docs/master/guile.html/PEG-Parsing.html
-[5] http://www.softwarepreservation.org/projects/LISP/book/LISP%25201.5%2520Programmers%2520Manual.pdf
-[6] https://www.gnu.org/software/guix/
-[7] https://github.com/oriansj/stage0
-[8] https://gitlab.com/janneke/tinycc
+++ /dev/null
-Subject: Mes 0.8 released
-
-I am pleased to announce the release of Mes 0.8, representing 34
-commits over 3 weeks. Mescc now produces object files in the hex2
-ascii output format compatible with the stage0 linker.
-
-Special thanks to Jeremiah Orians for support with MESCC_Tools and
-hex2, more goodness to follow soon!
-
-* About
-
- Mes aims to create full source bootstrapping for GuixSD: an
- entirely source-based bootstrap path. The target is to [have
- GuixSD] boostrap from a minimal, easily inspectable binary --that
- should be readable as source-- into something close to R6RS
- Scheme.
-
- It currently consists of a mutual self-hosting [close to Guile-]
- Scheme interpreter prototype in C and a Nyacc-based C compiler in
- [Guile] Scheme.
-
- The Scheme interpreter prototype (mes.c) has a Garbage Collector,
- a library of loadable Scheme modules-- notably Dominique Boucher's
- LALR[1], Pre-R6RS portable syntax-case[2] with R7RS ellipsis, Matt
- Wette's Nyacc[3] Guile's PEG[4] --and test suite just barely
- enough to support a simple REPL (repl.mes) and simple C-compiler
- (mescc.mes) that can produce the second initial ELF binary from
- binary from mes.c, in only about 2h30'.
-
- Mes was inspired by The Maxwell Equations of Software: LISP-1.5[5]
- -- John McCarthy page 13, GNU Guix's[6] source/binary packaging
- transparency and Jeremiah Orians's stage0[7] bootstrap project.
-
-* Download
-
- git clone https://gitlab.com/janneke/mes
-
- wget https://gitlab.com/janneke/mes/repository/archive.tar.gz?ref=v0.8 -O mes-0.8.tar.gz
-
-Mes runs from the source tree and can also be built, packaged and
-installed in Guix[SD] by the usual
-
- guix package -f guix.scm
-
-* Changes in 0.8 since 0.7
- ** Mescc
- *** Mescc now depends on the hex2 linker from MESCC_Tools[9].
- Direct ELF output support has been removed.
- ELF symbol and string table creation has been removed.
- *** Mescc now has experimental annotation support for hex2.
- *** Mescc has experimental annotation support for hex2.
- *** Mescc has been simplified by leveraging use labels in hex2 output.
- *** Mescc now supports continue in loops.
- *** Mescc now compiles to hex2 object files.
- ** Language
- *** 1 new function
- list-index.
-
-Greetings,
-janneke
-
-[1] https://github.com/schemeway/lalr-scm
-[2] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
-[3] https://www.nongnu.org/nyacc/
-[4] https://www.gnu.org/software/guile/docs/master/guile.html/PEG-Parsing.html
-[5] http://www.softwarepreservation.org/projects/LISP/book/LISP%25201.5%2520Programmers%2520Manual.pdf
-[6] https://www.gnu.org/software/guix/
-[7] https://github.com/oriansj/stage0
-[8] https://gitlab.com/janneke/tinycc
-[9] https://github.com/oriansj/MESCC_Tools
+++ /dev/null
-Subject: Mes 0.9 released
-
-I am pleased to announce the release of Mes 0.9, representing 107
-commits over 5 weeks. Mescc now compiles to a surprisingly readable
-stage0 M1 macro assembler output format. Mescc now compiles a
-modified TinyCC into a running [mostly segfaulting] executable. This
-is a major milestone as tcc can compile GCC.
-
-
-* About
-
- Mes[0] aims to create full source bootstrapping for GuixSD[1] as
- part of the bootstrappable builds[2] project.
-
- It currently consists of a mutual self-hosting [close to Guile-]
- Scheme interpreter prototype in C and a Nyacc-based C compiler in
- [Guile] Scheme. This C prototype will be rewritten in stage0[3]
- M1 assembly (or possibly stage2 slow-LISP, or ...).
-
- The Scheme interpreter prototype (mes.c) has a Garbage Collector,
- a library of loadable Scheme modules-- notably Dominique Boucher's
- LALR[4], Pre-R6RS portable syntax-case[5] with R7RS ellipsis, Matt
- Wette's Nyacc[6], Guile's PEG[7] --and test suite just barely
- enough to support a simple REPL (repl.mes) and simple C-compiler
- (mescc.mes).
-
- The simple C compiler can compile a modified TinyCC[8]. This
- needs more work. A gcc-compiled tcc is known[9] to compile GCC.
-
- Mes is inspired by The Maxwell Equations of Software: LISP-1.5[10]
- -- John McCarthy page 13, GNU Guix's source/binary packaging
- transparency and Jeremiah Orians's stage0 ~300 byte self-hosting
- hex assembler.
-
-* Download
-
- git clone https://gitlab.com/janneke/mes
-
- wget https://gitlab.com/janneke/mes/repository/archive.tar.gz?ref=v0.9 -O mes-0.9.tar.gz
-
-Mes runs from the source tree and can also be built, packaged and
-installed in Guix[SD] by the usual
-
- guix package -f guix.scm
-
-* Changes in 0.9 since 0.8
- ** Core
- *** Mes now builds better in non-Guix[SD] legacy distros/environments. Thanks, rain1!
- ** Mescc
- *** Mescc now compiles a modified tinycc into a running [mostly segfaulting] tcc.mes.
- https://gitlab.com/janneke/tinycc branch wip-mescc.
- *** Mescc now supports locals stack frame larger than 1 byte offset.
- *** Mescc now supports incomplete struct initializers {0}.
- *** Mescc now supports >>=, <<=, ^=, ~.
- *** Mescc now supports the comma operator.
- *** Mescc now supports mullti-line string initializers.
- *** Mescc now supports unions.
- *** Mescc now supports arrays in structs.
- *** Mescc now supports structs in structs.
- *** Mescc has been refactored to use records.
- *** Mescc now builds and runs with Guile-2.0 (legacy distro support, not recommended).
- *** Mescc now bundles tinycc's test2 test suite, passes one more test [34/55 pass].
- *** Mescc now has an incremental test suite consisting of 56 tests.
- *** Mescc now supports stdarg variable argument lists.
- *** Mescc now has __GNUC__ unset, #f (WAS: 0).
- *** Mescc now depends on Nyacc 0.80.3.
- *** Mescc now depends on M1 from MESCC_Tools v0.2.
- *** Mescc now compiles to M1 object files.
- **** 7 new mlibc functions
- calloc, close, getcwd, lseek, sprintf, unlink, vprintf.
- **** 31 new mlibc stubs
- execvp, fclose, fdopen, fflush, fopen, fprintf, fread, free, fseek,
- ftell, fwrite, localtime, longjmp, memcpy, memmove, memmove, memset,
- qsort, remove, setjump, snprintf, sscanf, strchr, strrchr, strstr,
- strtol, strtoll, strtoul, strtoull, time, vnsprintf.
- **** 10 new header files
- alloca.h, float.h, libgen.h, locale.h, stdbool.h, stddef.h, stdint.h,
- stdnoreturn.h, sys/select.h, sys/wait.h.
-
-Greetings,
-janneke
-
-[0] https://gitlab.com/janneke/mes
-[1] https://www.gnu.org/software/guix
-[2] http://bootstrappable.org
-[3] https://github.com/oriansj/stage0
-[4] https://github.com/schemeway/lalr-scm
-[5] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
-[6] https://www.nongnu.org/nyacc/
-[7] https://www.gnu.org/software/guile/docs/master/guile.html/PEG-Parsing.html
-[8] https://gitlab.com/janneke/tinycc
-[9] https://lists.gnu.org/archive/html/tinycc-devel/2017-05/msg00103.html
-[10] http://www.softwarepreservation.org/projects/LISP/book/LISP%25201.5%2520Programmers%2520Manual.pdf
+++ /dev/null
-Subject: on bootstrapping: 2nd status report on Mes
-Date: Sun, 25 Sep 2016 13:52:11 +0200
-
-Hi!
-
-In June I announced[0] Mes as a project that seeks to reduce the size of/
-dependency on bootstrap binaries, esp. for a system like GuixSD
-
-The strategy was to create a minimal trusted binary (prototyped in C but
-eventually to be hand-crafted in assembly/hex) that interpets a minimal
-LISP. Then using this minimal but already convenient LISP, extend it
-into Scheme and write a tiny C compiler/linker.
-
-Last time I had a minimal LISP-1.5-resembling interpreter in 900 lines
-of C that could interpret itself and an extension layer written in LISP
-providing a minimal Scheme environment. I was stuck on adding macros in
-LISP and had a broken macro implentation in C that I wanted to remove.
-Also I hoped to greatly reduce the size of the C part.
-
-New status[1]
-
- * Provide Scheme primitives directly in 1400 lines of C
- * Remove LISP-1.5 staging
- * closures clue-bat, fixing bugs in begin, lambda, lexical
- scoping etc. ... learned a lot!
- * quasiquote, unquote, unquote-splicing (in C, too slow in Scheme)
- * define-macro (in C)
- * define-syntax, syntax-rules (in Scheme, using define-macro)
- * all primitives needed to run LALR (strings, vectors, records,
- some srfi bits; mostly in Scheme)
- * test suite with 97 tests that run with Mes and also with Guile
- * minimal and partial ANSI C parser for hello world
- * minimal and simplistic 32 bit elf c-ast->elf generator
-
- Mes can now create a running 32-bit elf binary from this hello
- world C source with a simplistic for loop
-
- int main ()
- {
- int i;
- puts ("Hi Mes!\n");
- for (i = 0; i < 4; ++i)
- puts (" Hello, world!\n");
- return 1;
- }
-
- It takes Mes 1'20" to compile this program, Guile takes 0.5 seconds.
-
- * cannot get psyntax.pp hooked-up or running
- * do not understand syntax stuff [well enough] to implement in C
- -> no let-syntax, no MATCH
- -> no syntax-case, no PEG parser
-
-In theory the bootstrapping problem I set out to solve seems to be
-cracked. The remaining problem is reduced to `just work':
-implementing a minimal C compiler in Scheme. Questions here: I'm not
-convinced yet that this is a meaningful project...aaand I really not
-want to tackle this without having MATCH, which Mes does not have yet.
-
-Of the possible directions that I see
-
- 0 write the C compiler in Scheme without match
- 1 rewrite match without let-syntax
- 2 grok+write let-syntax/syntax-case using define-macro, some bits in C
- 3 run and hook-up psyntax.pp...BUT that would probably require:
- 4 address performance problem, possibly by
- 5 rewrite Mes into a VM-based solution
-
-none I find really attractive. Option 5, a VM is proven to work but
-that's quite a change of direction. Looking at other VM-based projects
-(e.g. GNU Epsilon[2]) I fear that this must result in a much larger code
-base in C, throwing out the minimal trusted binary idea. The other
-puzzles and work 0, 2 or 3 still need to be done.
-
-However, diving into syntax-macro or eval work (2 or 3) most probably
-needs the performance issue addressed. And if it turns out that a big
-VM solution is needed, that may still invalidate this project after
-having done even more work.
-
-Help! :-) Ideas?
-
-Greetings,
-Jan
-
-[0] https://lists.gnu.org/archive/html/guile-user/2016-06/msg00061.html
-[1] https://gitlab.com/janneke/mes
-[2] http://git.savannah.gnu.org/cgit/epsilon.git
+++ /dev/null
-* General Information
-** Do you agree to follow GNU policies?
-
-Yes, of course.
-
-** Package name and version:
-
-Mes 0.16
-
-** Author Full Name <Email>:
-
-Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
-
-** URL to package home page (if any): https://gitlab.com/janneke/mes
-
-I'm happy to move to savannah when Mes becomes a GNU package.
-
-** URL to source tarball:
-
-https://gitlab.com/janneke/mes/-/archive/v0.16/mes-0.16.tar.gz
-
-or: git clone https://gitlab.com/janneke/mes
-
-** Brief description of the package:
-
-Mes aims to help create full source bootstrapping for GuixSD as part of
-the bootstrappable builds effort (See https://bootstrappable.org/).
-
-It currently consists of a mutual self-hosting Scheme interpreter
-prototype written in C and a Nyacc-based C compiler written in Scheme.
-This C prototype is being simplified to be transpiled by M2-Planet.
-
-Mes+MesCC can compile an only lighty patched TinyCC that is
-self-hosting. Using this tcc and the Mes C library we now have a
-reduced-binary-seed bootstrap for the gnutools triplet: glibc-2.2.5,
-binutils-2.20.1, gcc-4.1.0.
-
-* Code
-** Dependencies:
-
-Mes can be built as a regular package, or as part of the full source
-(currently: reduced binary seed) bootstrap process.
-
-*** Regular build
-
- - https://github.com/mescc-tools, 0.5 is known to work.
- - https://savannah.gnu.org/projects/nyacc, 0.80.42 is known to work.
- - GNU Gcc, 4.9.3 is known to work.
- - GNU Guile, version 2.0.12 or is know to work.
- - SH, /bin/sh, GNU Bash 4.3 is known to work.
- - GNU coreutils
- - sed, GNU sed 4.2 is known to work.
- - git, 2.10 is known to work.
- - Perl, 5.22 is known to work.
-
-*** Bootstrap build
-
- - https://github.com/oriansj/mescc-tools, 0.5 is known to work.
- - https://savannah.gnu.org/projects/nyacc, 0.80.42 is known to work.
- - https://gitlab.com/janneke/mes-seed, 0.16 is known to work.
-
-** Configuration, building, installation:
-
-*** Guix build, install
-
- guix build mes, guix package --install mes
-
-*** Regular build
-
- ./configure; make; make check; make install
-
-*** Bootstrap build
-
- <set env vars>
- sh build.sh
- sh check.sh
- sh install.sh
-
-** Documentation:
-
-Mes does not yet have any documentation other than AUTHORS, HACKING,
-INSTALL, NEWS, README. When it does, it will be in Texinfo: I live in
-Emacs. I have initiated the GNU LilyPond documentation and website,
-which are written in texinfo.
-
-** Internationalization:
-
-Mes does not have Internationalization. As it's an early bootstrap
-package, it's unsure if it will ever get that. I do have experience
-with adding Internationalization to GNU LilyPond.
-
-** Accessibility:
-
-None.
-
-** Security:
-
-Mes will be used as a critical link in our GNU bootstrapping chain.
-It is essential for Mes to get a proper review before it is put in
-place.
-
-* Licensing:
-
-GNU GPL 3, or later.
-
-* Similar free software projects:
-
-There are similarities with GNU Guile and to a lesser extent also with
-MIT/GNU Scheme and SCM; in fact Mes' scheme tries to be compatible with
-Guile Scheme. GNU Guile is about 30x faster than Mes.
-
-The main difference is that mes.c is ~5,000LOC of very simple C and can
-can be bootstrapped almost entirely from source, without any binary
-seed. Currently, it needs a ~1MB ASSCI seed.
-
-Guile is ~100,000LOC of full-blown C, not counting its dependencies
-such as libgc.
-
-Another difference with regular Scheme implementations, is that Mes does
-not strive for RXRS compliance, instead it strives for minimalism and
-Guile compatibility.
-
-If in doubt, please contact the GuixSD or Guile maintainers.
-
-* Any other information, comments, or questions:
-
-I am an original author of GNU LilyPond and current GuixSD developer. I
-have regular discussions about Mes and GuixSD with GuixSD and Guile
-maintainers.
-
-Mes currently targets only x86-linux, I would like some help to look at
-other architectures and esp. at targeting the Hurd.
-
-Greetings,
-janneke
+++ /dev/null
-Subject: wip-bootstrap updated
-
-I've updated the wip-bootstrap branch[0] for Mes[1] 0.13. It has new
-mes-boot and tcc-boot packages. mes-boot is a bootstrap version of
-Mes; it only depends on mescc-tools and a previously compiled mes.M1
-seed. Likewise, tcc-boot depends on a precompiled tcc-seed. Also,
-tcc-boot uses a heavily patched version of the tcc sources.
-
-Mes 0.13 is the first release that can bootstrap a fairly functional
-tcc-boot. This bootstrapped tcc passes 67/68 C tests that were created
-for MesCC. It can compile a version if itself where float, long long
-and bitfield are patched out...but linking fails. This amazing
-compiler can now be played with by doing something like
-
---8<---------------cut here---------------start------------->8---
-git checkout wip-bootstrap
-make
-./pre-inst-env guix build tcc-boot # may take ~2h
-./pre-inst-env guix environment --ad-hoc tcc-boot
-mes-tcc --help #duck and run
---8<---------------cut here---------------end--------------->8---
-
-The next big effort will be to make this mes-tcc fully functional and
-integrate this with GuixSD. To give you a taste of that,
-here's latest bug I'm currently looking at (pretty printed comments
-are only added when Guile runs MesCC, the problem is in LEA)
-
---8<---------------cut here---------------start------------->8---
-$ diff -u ../mes-seed/mes.M1 src/mes.M1
---- ../mes-seed/mes.M1 2018-05-01 18:49:37.312162270 +0200
-+++ src/mes.M1 2018-05-01 19:49:40.774770406 +0200
-@@ -35805,12 +33091,11 @@
- call32 %strcpy
- add____$i8,%esp !0x8
- test___%eax,%eax
-- # strcpy(buf + strlen(buf), "/mes/");
-- push___$i32 &_string_reader_read_list_266
-+ push___$i32 &_string_reader_read_list_265
- mov____%ebp,%eax
-- add____$i32,%eax %0x-200
-+ add____$i32,%eax %0x-800
- push___%eax
-- lea____0x32(%ebp),%eax %0x-200
-+ lea____0x32(%ebp),%eax %0x-800
- push___%eax
- call32 %strlen
- add____$i8,%esp !0x4
---8<---------------cut here---------------end--------------->8---
-
-We also need to remove some shortcuts that we took, most notably:
-mes-seed[3]. This seed consists of 1MB of M1 code. mes.M1 is
-produced by compiling mes.c using MesCC, the C compiler written in
-(Guile) Scheme that comes with Mes. Although that's really terrible,
-it's probably a big step forward: currently GuixSD uses ~250MB of
-binary seed: the bootstrap binaries.
-
-The plan is to replace the mes.M1 seed with mes.M2 and compile this
-new mes.M2 seed using the brand new M2-Planet[2]. M2 is basically
-simple C with structs, without preprocessor. This will reduce the
-seed size by a factor of 10 while making it much more readable.
-
-An excerpt of the TODO I keep in Mes' BOOTSTRAP document
-
---8<---------------cut here---------------start------------->8---
-* TODO
-** have tcc-boot's mes-tcc compile a fully functional tcc
-*** mescc: fix unknown bug.
-*** mescc: support function-static.
-*** mescc: support/grok global static.
-*** mescc: support unsigned comparison, arithmetic.
-*** mescc: support long long (do we need long long to get long long in tcc)?
-*** mescc: support bitfield (do we need bitfield to get bitfield in tcc)?
-*** mescc: support float (do we need float to get float in tcc)?
-** have bootstrapped tcc compile gcc-4.7
-** remove or upstream patches from tcc-boot
-** prepare src/mes.c for M2-Planet[2] transpiler
-** integrate with GuixSD
-** x86_64, arm, the Hurd
---8<---------------cut here---------------end--------------->8---
-
-Greetings,
-janneke
-
-[0] http://git.savannah.gnu.org/cgit/guix.git/log/?h=wip-bootstrap
-[1] https://gitlab.com/janneke/mes
-[2] https://github.com/oriansj/m2-planet
-[3] https://gitlab.com/janneke/mes-seed
--- /dev/null
+Subject: on bootstrapping: introducing Mes
+Date: Sun, 19 Jun 2016 13:08:02 +0200
+
+Hi,
+
+I have a minimal LISP-1.5-resembling interpreter in C that now can
+also interpret itself
+
+ https://gitlab.com/janneke/mes
+
+It was inspired by the seemingly often ignored bootstrapping question
+made so painfully visible by GuixSD and by OriansJ with their self
+hosting hex assembler project.
+
+As a next step after a hex assembler I was thinking of getting Scheme up
+and running and use that to create a tiny C compiler, probably using
+PEG. For that I think we need define-syntax, which I had a peek at and
+still scares the all-sorts-of-things out of me :-)
+
+I searched for minimal Lisp/Scheme to get that going and found an
+article called the Maxwell Equations of Software 1) with a pointer to
+the 1962 LISP 1.5 paper by John McCarthy 2).
+
+First I `implemented' Mes/LISP-1.5: the bottom half of page 13 and the
+necessary helper procedures defined on pages 8-12 using Guile, removing
+all but the primitives needed to run LISP-1.5/Mes (I think): car, cdr,
+cond, cons, define, eq?, '()/nil, null?, pair? and quote. I cheated
+with read, and with display and newline for debugging.
+
+Then I translated the program into C and got rid of read by using
+getchar/ungetchar.
+
+It's been great fun and now I'm kind of stuck a bit at the point of
+implementing macros. I have a simplistic version in C but want to
+remove that again --I like the idea of having the absolute minimal LISP
+interpreter in C-- and only introduce macros after having bootstrapped
+into the LISP/Mes domain.
+
+Greetings,
+Jan
+
+1) http://www.michaelnielsen.org/ddi/lisp-as-the-maxwells-equations-of-software/
+2)
+http://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf
+
--- /dev/null
+Subject: Mes 0.10 released
+
+I am pleased to announce the release of Mes 0.10, representing 82
+commits over 6 weeks. Mescc now compiles a bootstrappable-modified
+TinyCC into a mes-tcc that in turn can successfully compile a trivial
+C program.
+
+* About
+
+ Mes[0] aims to create full source bootstrapping for GuixSD[1] as
+ part of the bootstrappable builds[2] project.
+
+ It currently consists of a mutual self-hosting [close to Guile-]
+ Scheme interpreter prototype in C and a Nyacc-based C compiler in
+ [Guile] Scheme. This C prototype will be rewritten in stage0[3]
+ M1 assembly (or possibly stage2 slow-LISP, or ...).
+
+ The Scheme interpreter prototype (mes.c) has a Garbage Collector,
+ a library of loadable Scheme modules-- notably Dominique Boucher's
+ LALR[4], Pre-R6RS portable syntax-case[5] with R7RS ellipsis, Matt
+ Wette's Nyacc[6], Guile's PEG[7] --and test suite just barely
+ enough to support a simple REPL (repl.mes) and simple C-compiler
+ (mescc.mes).
+
+ The simple C compiler can compile a modified TinyCC[8] that is
+ starting to work! A gcc-compiled tcc is known[9] to compile GCC.
+
+ Mes is inspired by The Maxwell Equations of Software: LISP-1.5[10]
+ -- John McCarthy page 13, GNU Guix's source/binary packaging
+ transparency and Jeremiah Orians's stage0 ~300 byte self-hosting
+ hex assembler.
+
+* Download
+
+ git clone https://gitlab.com/janneke/mes
+
+ wget https://gitlab.com/janneke/mes/repository/archive.tar.gz?ref=v0.10 -O mes-0.10.tar.gz
+
+Mes runs from the source tree and can also be built, packaged and
+installed in Guix[SD] by the usual
+
+ guix package -f guix.scm
+
+* Changes in 0.10 since 0.9
+ ** Core
+ *** 2 new functions
+ logand, lognot.
+ ** Mescc
+ *** Mes now includes M1 sources for full source bootstrapping up to tcc.
+ *** Mescc now depends on Nyacc 0.81.0.
+ *** Mescc now compiles a mes-tcc that compiles a trivial C to a running a.out.
+ *** Mescc now supports several (as used my tinycc) struct by value assignments.
+ *** Mescc now has _start in a separate crt1.c.
+ *** Mescc now supports initializer arithmetic.
+ *** Mescc now supports arrays of struct of arbitrary size.
+ *** Mescc now supports pointer arithmetic.
+ *** Mescc now defines __i386__, __linux__.
+ *** Mescc now supports --*p, ++*p.
+ *** Mescc now supports int foo[bar] = {baz,...}.
+ *** Mescc now supports \x00 in strings in M1.
+ *** Mescc now supports complex enum expressions. Thanks, rain1!
+ *** Mescc now supports short.
+ *** Mescc now supports foo.bar = foo.baz = bla.
+ *** Mescc now supports foo = bar < baz and comparison permutations.
+ *** Mescc now supports (anonymous) structs in unions.
+ *** Mescc now writes M1 strings if possible.
+ **** 2 improved mlibc functions
+ malloc, realloc.
+ **** 13 new mlibc functions
+ fclose, fgetc, fprintf, fwrite, memcpy, memmove, memset, snprintf, strcat,
+ strchr, strrchr, strtoull, vnsprintf.
+ **** 15 new tinycc-support tests
+ 76-pointer-arithmetic.c, 77-pointer-assign.c, 78-union-struct.c,
+ 79-int-array.c, 7a-struct-char-array.c, 7b-struct-int-array.c,
+ 7c-dynarray.c, 7d-cast-char.c, 7e-struct-array-access.c,
+ 7f-struct-pointer-arithmetic.c, 7g-struct-byte-word-field.c,
+ 7h-struct-assign.c, 7i-struct-struct.c, 7j-strtoull.c,
+ 7k-for-each-elem.c.
+ ** Noteworthy bug fixes
+ *** Mescc has many fixes for foo.bar[baz], foo[bar].baz with ./-> permutations.
+ *** Many bugs and limitations in mescc have been fixed and removed.
+
+Greetings,
+janneke
+
+[0] https://gitlab.com/janneke/mes
+[1] https://www.gnu.org/software/guix
+[2] http://bootstrappable.org
+[3] https://github.com/oriansj/stage0
+[4] https://github.com/schemeway/lalr-scm
+[5] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
+[6] https://www.nongnu.org/nyacc/
+[7] https://www.gnu.org/software/guile/docs/master/guile.html/PEG-Parsing.html
+[8] https://gitlab.com/janneke/tinycc
+[9] https://lists.gnu.org/archive/html/tinycc-devel/2017-05/msg00103.html
+[10] http://www.softwarepreservation.org/projects/LISP/book/LISP%25201.5%2520Programmers%2520Manual.pdf
--- /dev/null
+Subject: Mes 0.11 released
+
+I am pleased to announce the release of Mes 0.11, representing 16
+commits over 10 weeks. MesCC now compiles a less heavily patched
+TinyCC into a mes-tcc that in turn passes 41/69 of mescc's C tests.
+
+When mes-tcc passes all 69 tests, this almost-full-source-bootstrapped
+version of TinyCC should be able to compile itself. An unpatched, GNU
+Gcc-compiled tcc is known to compile GNU Gcc.
+
+* About
+
+ Mes[0] aims to create full source bootstrapping for GuixSD[1] as
+ part of the bootstrappable builds[2] project.
+
+ It currently consists of a mutual self-hosting [close to Guile-]
+ Scheme interpreter prototype in C and a Nyacc-based C compiler in
+ [Guile] Scheme. This C prototype will be rewritten in stage0[3]
+ M1 assembly (or compiled by M2-Planet or stage2 slow-LISP, or ...).
+
+ The Scheme interpreter prototype (mes.c) has a Garbage Collector,
+ a library of loadable Scheme modules-- notably Dominique Boucher's
+ LALR[4], Pre-R6RS portable syntax-case[5] with R7RS ellipsis, Matt
+ Wette's Nyacc[6], Guile's PEG[7] --and test suite just barely
+ enough to support a simple REPL (repl.mes) and simple C-compiler
+ MesCC (mescc.mes).
+
+ MesCC can compile a modified TinyCC[8] that is close to being
+ self-hosting. A GNU Ccc-compiled tcc is known[9] to compile GCC.
+
+ Mes is inspired by The Maxwell Equations of Software: LISP-1.5[10]
+ -- John McCarthy page 13, GNU Guix's source/binary packaging
+ transparency and Jeremiah Orians's stage0 ~300 byte self-hosting
+ hex assembler.
+
+* Download
+
+ git clone https://gitlab.com/janneke/mes
+
+ wget https://gitlab.com/janneke/mes/repository/archive.tar.gz?ref=v0.11 -O mes-0.11.tar.gz
+
+Mes runs from the source tree and can also be built, packaged and
+installed in Guix[SD] by the usual
+
+ guix package -f guix.scm
+
+* Changes in 0.11 since 0.10
+ ** MesCC
+ *** MesCC now compiles a mes-tcc that passes 41/69 of mescc's C tests.
+ *** MesCC's libc can now be compiled with tcc (syscall support: write).
+ *** MesCC now compiles a less-patched tcc: -214/+458 lines [WAS: -333/+747].
+ *** MesCC now supports empty for.
+ *** MesCC has been greatly refactored, 500/3000 lines have been removed.
+ *** MesCC now supports complex [struct] by value assign foo.bar, foo->bar, foo[bar].
+ *** MesCC now depends on Nyacc 0.82.4.
+
+Greetings,
+janneke
+
+[0] https://gitlab.com/janneke/mes
+[1] https://www.gnu.org/software/guix
+[2] http://bootstrappable.org
+[3] https://github.com/oriansj/stage0
+[4] https://github.com/schemeway/lalr-scm
+[5] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
+[6] https://www.nongnu.org/nyacc/
+[7] https://www.gnu.org/software/guile/docs/master/guile.html/PEG-Parsing.html
+[8] https://gitlab.com/janneke/tinycc
+[9] https://lists.gnu.org/archive/html/tinycc-devel/2017-05/msg00103.html
+[10] http://www.softwarepreservation.org/projects/LISP/book/LISP%25201.5%2520Programmers%2520Manual.pdf
--- /dev/null
+Subject: Mes 0.12 released
+
+I am pleased to announce the release of Mes 0.12, representing 120
+commits over 20 weeks. MesCC is prototyped running on Guile and can
+now run on Mes. Performance of Mes running MesCC has been improved by
+a factor of 100; mes.c (~3000 LOC) now compiles in ~4min. Many fixes
+and enhancements make that now also TinyCC parses (~1.5h) and compiles
+(~20min) with Mes+MesCC (Guile+MesCC takes ~2min).
+
+Special thanks go to Ricardo Wurmus for sharing the recursive macro
+expand perspective and starting work on that, to Han-Wen Nienhuys for
+his sharp `Ah, so you skipped SICP chapter 3' remark and to rain1 for
+their continuous help on #bootstrapping and their `let's only expand
+global variables' insight.
+
+* About
+
+ Mes[0] aims to create full source bootstrapping for GuixSD[1] as
+ part of the bootstrappable builds[2] project.
+
+ It currently consists of a mutual self-hosting [close to Guile-]
+ Scheme interpreter prototype in C and a Nyacc-based C compiler in
+ [Guile] Scheme. This C prototype will be simplified to be
+ transpiled by M2-Planet[3].
+
+ The Scheme interpreter prototype (mes.c) has a Garbage Collector,
+ a library of loadable Scheme modules-- notably Dominique Boucher's
+ LALR[4], pre-R6RS portable syntax-case[5] with R7RS ellipsis, Matt
+ Wette's Nyacc[6], Guile's PEG[7] --and test suite just barely
+ enough to support a simple REPL (repl.mes) and simple C-compiler
+ MesCC (mescc.mes).
+
+ MesCC can compile a modified TinyCC[8] that is close to being
+ self-hosting. A GNU Ccc-compiled tcc is known[9] to compile GCC.
+
+ Mes is inspired by The Maxwell Equations of Software: LISP-1.5[10]
+ -- John McCarthy page 13, GNU Guix's source/binary packaging
+ transparency and Jeremiah Orians's stage0[11] ~300 byte self-hosting
+ hex assembler.
+
+* Download
+
+ git clone https://gitlab.com/janneke/mes
+
+ wget https://gitlab.com/janneke/mes/repository/archive.tar.gz?ref=v0.12 -O mes-0.12.tar.gz
+
+Mes runs from the source tree and can also be built, packaged and
+installed in Guix[SD] by the usual
+
+ guix package -f guix.scm
+
+* Changes in 0.12 since 0.11
+ ** Core
+ *** Mes can now run Nyacc (0.80.42) to compile itself in ~4min (~3000 LOC).
+ *** Mes now recursively expands global variables per top level statement.
+ *** Mes now recursively expands macros per top level statement.
+ *** Mes now boots from MES_BOOT (default: module/mes/boot-0.scm).
+ *** Mes now has a full Scheme reader in C again.
+ This gives a 10x-20x performance improvement and increases the
+ bootstrap footprint by 160 LOC.
+ *** Mes reader now supports older abbreviated character forms
+ #\bel, #\bs, #\ht and #\vt.
+ *** 3 new functions
+ equal2?, memq, core:write.
+ ** Language
+ *** Mes now has an incremental Scheme semantics test suite with 71 small tests.
+ *** Variable names can now have ticks.
+ *** Mes now evaluates expresions of COND only once.
+ *** srfi-9 records have been reimplemented.
+ *** #\page is now whitespace.
+ *** #<eof> is no longer a character.
+ *** 2 new macros
+ define-macro*, with-fluids.
+ *** 9 new functions
+ dirname, last, reverse-list->string, setenv, string-drop-right,
+ string-fold, string-fold-right, string-null?, write.
+ ** MesCC
+ **** 9 new functions
+ chmod, getopt_long, ferror, itoab, longjmp, qsort, setenv, setjmp, strtol.
+ **** 2 new header files
+ endian.h, sys/signal.h.
+
+Greetings,
+janneke
+
+[0] https://gitlab.com/janneke/mes
+[1] https://www.gnu.org/software/guix
+[2] http://bootstrappable.org
+[3] https://github.com/oriansj/m2-planet
+[4] https://github.com/schemeway/lalr-scm
+[5] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
+[6] https://www.nongnu.org/nyacc/
+[7] https://www.gnu.org/software/guile/docs/master/guile.html/PEG-Parsing.html
+[8] https://gitlab.com/janneke/tinycc
+[9] https://lists.gnu.org/archive/html/tinycc-devel/2017-05/msg00103.html
+[10] http://www.softwarepreservation.org/projects/LISP/book/LISP%25201.5%2520Programmers%2520Manual.pdf
+[11] https://github.com/oriansj/stage0
--- /dev/null
+Subject: Mes 0.13 released
+
+I am pleased to announce the release of Mes 0.13, representing 45
+commits over 3 weeks. MesCC can now compile a functional tcc when
+running on Mes (in ~1h45') or on Guile (in ~3min).
+
+This means that we are getting very close to a full source bootstrap
+of tcc: it is now built without gcc, glibc or guile; using only
+MesCC-tools and Mes sources and corresponding ascii/binary seeds.
+
+* About
+
+ Mes[0] aims to help create full source bootstrapping for GuixSD[1]
+ as part of the bootstrappable builds[2] project.
+
+ It currently consists of a mutual self-hosting Scheme interpreter
+ prototype in C and a Nyacc-based C compiler in Scheme. This C
+ prototype is being simplified to be transpiled by M2-Planet[3].
+
+ The Scheme interpreter prototype (mes.c) has a Garbage Collector,
+ a library of loadable Scheme modules-- notably Dominique Boucher's
+ LALR[4], pre-R6RS portable syntax-case[5] with R7RS ellipsis, Matt
+ Wette's Nyacc[6], Guile's PEG[7] --and test suite just barely
+ enough to support a simple REPL (repl.mes) and simple C-compiler
+ MesCC.
+
+ Mes+MesCC can compile a modified TinyCC[8] that is close to being
+ self-hosting. A GNU Ccc-compiled tcc is known[9] to compile GCC.
+
+ Mes is inspired by The Maxwell Equations of Software: LISP-1.5[10]
+ -- John McCarthy page 13, GNU Guix's source/binary packaging
+ transparency and Jeremiah Orians's stage0[11] ~300 byte self-hosting
+ hex assembler.
+
+* Download
+
+ git clone https://gitlab.com/janneke/mes
+
+ wget https://gitlab.com/janneke/mes/-/archive/v0.13/mes-0.13.tar.gz
+
+Mes runs from the source tree and can also be built, packaged and
+installed in Guix[SD] by the usual
+
+ guix package -f guix.scm
+
+* Changes in 0.13 since 0.12
+ ** Core
+ *** Bootstrapped Mes+MesCC can now compile a patched tcc in ~2h30' (~25,000 LOC).
+ *** MesCC scripts for Mes and Guile are now merged; executable is: `mescc'.
+ *** Mes now uses only one arena for stop-and-copy; doubles available size.
+ *** Mes now has a Guile-like command-line interface (mes.repl has been removed).
+ *** Mes now boots into a full Scheme by default.
+ *** Mes can now be compiled (MES_MINI=1) to boot into a minimal Scheme (~2000 cells).
+ *** Mes now creates less garbage in the reader and in
+ append2, append_reverse, reverse, reverse!, vector-for-each, vector-to-list, vector-map.
+ *** 5 new functions
+ append-reverse, chmod, ioctl, isatty, isspace, last_pair, reverse!.
+ ** Language
+ *** 3 new functions
+ char-whitespace?, chmod, isatty?
+ ** Noteworthy bug fixes
+ *** Two bugs in the jam scraper/garbage collector have been fixed.
+ *** equal2_p now uses tail call elimination.
+ *** Escaped characters in strings are now read and write'd correctly.
+ *** The repl now expands macros again.
+
+Greetings,
+janneke
+
+[0] https://gitlab.com/janneke/mes
+[1] https://www.gnu.org/software/guix
+[2] http://bootstrappable.org
+[3] https://github.com/oriansj/m2-planet
+[4] https://github.com/schemeway/lalr-scm
+[5] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
+[6] https://www.nongnu.org/nyacc/
+[7] https://www.gnu.org/software/guile/docs/master/guile.html/PEG-Parsing.html
+[8] https://gitlab.com/janneke/tinycc
+[9] https://lists.gnu.org/archive/html/tinycc-devel/2017-05/msg00103.html
+[10] http://www.softwarepreservation.org/projects/LISP/book/LISP%25201.5%2520Programmers%2520Manual.pdf
+[11] https://github.com/oriansj/stage0
--- /dev/null
+Subject: Mes 0.14 released
+
+I am pleased to announce the release of Mes 0.14, representing 98
+commits over 4 weeks. Mes+MesCC now compiles a self-hosting TinyCC
+that has only been slightly patched.
+
+This means that we can now build a tcc that depends only on a 1MB
+ASCII M1 seed. GuixSD currently uses a ~250MB binary seed to build
+gcc.
+
+Next targets are: build gcc using this almost full-source bootstrapped
+tcc, and reduce the 1MB ASCII M1 seed to ~100KB of M2 source, which is
+a restricted subset of C.
+
+Packages are available from Guix's wip-bootstrap branch.
+
+* About
+
+ Mes[0] aims to help create full source bootstrapping for GuixSD[1]
+ as part of the bootstrappable builds[2] project.
+
+ It currently consists of a mutual self-hosting Scheme interpreter
+ prototype in C and a Nyacc-based C compiler in Scheme. This C
+ prototype is being simplified to be transpiled by M2-Planet[3].
+
+ The Scheme interpreter prototype (mes.c) has a Garbage Collector,
+ a library of loadable Scheme modules-- notably Dominique Boucher's
+ LALR[4], pre-R6RS portable syntax-case[5] with R7RS ellipsis, Matt
+ Wette's Nyacc[6], Guile's PEG[7] --and test suite just barely
+ enough to support a simple REPL (repl.mes) and simple C-compiler
+ MesCC.
+
+ Mes+MesCC can compile an only slightly patched TinyCC[8] that is
+ self-hosting. A GNU Ccc-compiled tcc is known[9] to compile GCC.
+
+ Mes is inspired by The Maxwell Equations of Software: LISP-1.5[10]
+ -- John McCarthy page 13, GNU Guix's source/binary packaging
+ transparency and Jeremiah Orians's stage0[11] ~300 byte self-hosting
+ hex assembler.
+
+* Download
+
+ git clone https://gitlab.com/janneke/mes
+
+ wget https://gitlab.com/janneke/mes/-/archive/v0.14/mes-0.14.tar.gz
+
+Mes runs from the source tree and can also be built, packaged and
+installed in Guix[SD] by the usual
+
+ guix package -f guix.scm
+
+* Changes in 0.14 since 0.13
+ ** Core
+ *** Bootstrapped Mes+MesCC now compiles a tcc that is self-hosting and only slightly patched.
+ *** The reader now supports binary numbers (previously: read as decimal).
+ *** String port support has been moved to C.
+ *** The build has been simplified, the Make-in-Scheme experiment has been removed.
+ *** 2 new functions
+ chmod, logxor.
+ ** Language
+ *** Mes now supports define-immutable-record-type and single set-field from srfi-9 gnu.
+ *** 12 new functions
+ basename, chmod, const, delete-duplicates, logxor, string-contains,
+ string-map, string-replace, string-trim, string-trim-both,
+ string-trim-right, unfold.
+ ** MesCC
+ *** MesCC now supports standalone usage of nestedly defined enums, structs and unions.
+ *** MesCC now supports comparison of unsigned and promotion of signed/unsigned -> unsigned.
+ *** MesCC now supports sign extension for char, short.
+ *** MesCC now has stubbing for floats; compiling works, data is fu.
+ *** MesCC now has full suport for switch case, e.g. with default as first clause.
+ *** MesCC now supports destruction of casted expressions: ((struct foo*)p)->bar.
+ *** MesCC now has full support for pre/post, e.g.: (foo--)->bar and permutations.
+ *** MesCC now supports sizeof any expression or type.
+ *** MesCC now supports initialization of anonymous unions.
+ *** MesCC now supports bit fields.
+ *** MesCC now supports valued functions in expressions: destruction and dereferencing.
+ *** MesCC now supports function-static variables.
+ *** MesCC now supports initializer lists in structs and unions.
+ *** MesCC now has full support for heterogeneous variable declarations, e.g.: char p, *x = "foo", buf[3];
+ **** 4 new functions
+ __lshrdi3, __ashldi3, __ashrdi3, strncpy.
+ **** 9 new mlibc stubs
+ __fixdfdi, __fixsfdi, __fixunsxfdi, __fixxfdi, __floatundixf, ldexp,
+ strtod, strtof, strtold.
+
+Greetings,
+janneke
+
+[0] https://gitlab.com/janneke/mes
+[1] https://www.gnu.org/software/guix
+[2] http://bootstrappable.org
+[3] https://github.com/oriansj/m2-planet
+[4] https://github.com/schemeway/lalr-scm
+[5] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
+[6] https://www.nongnu.org/nyacc/
+[7] https://www.gnu.org/software/guile/docs/master/guile.html/PEG-Parsing.html
+[8] https://gitlab.com/janneke/tinycc
+[9] https://lists.gnu.org/archive/html/tinycc-devel/2017-05/msg00103.html
+[10] http://www.softwarepreservation.org/projects/LISP/book/LISP%25201.5%2520Programmers%2520Manual.pdf
+[11] https://github.com/oriansj/stage0
--- /dev/null
+Subject: Mes 0.15 released
+
+I am pleased to announce the release of Mes 0.15, representing 45
+commits over 3 weeks. The GNU toolchain is getting bootstrapped!
+
+As of 0.14, Mes+MesCC compiles a self-hosting TinyCC. Using the 0.15
+Mes C library, this TinyCC can build the GNU tools triplet:
+binutils-2.14, gcc-2.95.3, glibc-2.2.5.
+
+This means that we can build a GNU toolchain that depends only on a
+critical 1MB ASCII M1 seed. GuixSD currently uses a ~250MB binary
+seed to build gcc.
+
+Next targets are: upstream the Mes bootstrap to GuixSD, build a
+Gcc-4.7 and Glibc-2.23, bootstrap utilities like bison, flex, grep,
+sed..., replace GuixSD's bootstrap for x86 and reduce the 1MB ASCII M1
+seed to ~5000 LOC/~100KB of M2 source, which is a restricted subset of
+C.
+
+Packages are available from Guix's wip-bootstrap branch.
+
+* About
+
+ Mes[0] aims to help create full source bootstrapping for GuixSD[1]
+ as part of the bootstrappable builds[2] project.
+
+ It currently consists of a mutual self-hosting Scheme interpreter
+ prototype in C and a Nyacc-based C compiler in Scheme. This C
+ prototype is being simplified to be transpiled by M2-Planet[3].
+
+ The Scheme interpreter prototype (mes.c) has a Garbage Collector,
+ a library of loadable Scheme modules-- notably Dominique Boucher's
+ LALR[4], pre-R6RS portable syntax-case[5] with R7RS ellipsis, Matt
+ Wette's Nyacc[6], Guile's PEG[7] --and test suite just barely
+ enough to support a simple REPL (repl.mes) and simple C-compiler
+ MesCC.
+
+ Mes+MesCC can compile an only slightly patched TinyCC[8] that is
+ self-hosting. Using the Mes C library, this tcc can now build the
+ GNU tools triplet: binutils-2.14, gcc-2.95.3, glibc-2.2.5.
+
+ Mes is inspired by The Maxwell Equations of Software: LISP-1.5[9]
+ -- John McCarthy page 13, GNU Guix's source/binary packaging
+ transparency and Jeremiah Orians's stage0[10] ~300 byte self-hosting
+ hex assembler.
+
+* Download
+
+ git clone https://gitlab.com/janneke/mes
+
+ wget https://gitlab.com/janneke/mes/-/archive/v0.15/mes-0.15.tar.gz
+
+Mes runs from the source tree and can also be built, packaged and
+installed in Guix[SD] by the usual
+
+ guix package -f guix.scm
+
+* Changes in 0.15 since 0.14
+ ** Core
+ *** Support fork, exec, waitpid.
+ *** Boot-0 loading has been refactored.
+ *** MesCC now has out of the box Geiser support.
+ ** Language
+ *** 2 new functions
+ drop, drop-right.
+ ** MesCC
+ *** MesCC and Mes Lib C can now build binutils-2.30, gcc-2.95.3 and glibc-2.2.5.
+ *** MesCC now provides dummy crti.o, crtn.o so that tcc needs not be patched for those.
+ *** Mes Lib C now supports compiling glibc-2.2.25.
+ *** Mes Lib C now supports compiling gcc-2.95.3
+ *** Mes Lib C now supports compiling binutils-2.30.
+ *** Mes Lib C now supports compiling m4-1.4.
+ *** Mes Lib C has been split into archs: gcc, x86-mes-gcc and x86-mes.
+ *** MesCC now has a posixy command line interface.
+ **** 70 new functions
+ abs, access, alarm, alloca, atexit, atol, bcmp, bcopy, brk, bzero,
+ chmod, clearerr, close, dup, dup2, execve, fabs, fcntl, fdgets, feof,
+ fgets, fileno, fork, freopen, fscanf, fstat, fsync, getcwd, getgid,
+ getpid, getrusage, getuid, index, ioctl, isalnum, isalpha, isascii,
+ iscntrl, isprint, ispunct, kill, link, lseek, lstat, mkdir, mktemp,
+ nanosleep, open, perror, pipe, raise, read, rename, rindex, rmdir,
+ sbrk, sbrk, setitimer, signal, sleep, stat, strcspn, strdup, strerror,
+ strncat, strpbrk, strspn, unlink, unsetenv, waitpid.
+ **** 23 new stubs
+ abort, atof, bsearch, bsearch, chown, ctime, fpurge, freadahead,
+ frexp, getpwnam, gmtime, mbstowcs, pclose, popen, rewind, setbuf,
+ sigsetmask, strftime, sys_siglist, system, times, umask, utime.
+ **** 10 new C tests
+ 51-strcmp.c, 70-printf.c, 87-sscanf.c, 90-strpbrk.c, 91-fseek.c,
+ 92-stat.c, 93-fread-fwrite.c, 94-unsetenv.c, 95-signal.c, 96-strto.c.
+
+
+Greetings,
+janneke
+
+[0] https://gitlab.com/janneke/mes
+[1] https://www.gnu.org/software/guix
+[2] http://bootstrappable.org
+[3] https://github.com/oriansj/m2-planet
+[4] https://github.com/schemeway/lalr-scm
+[5] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
+[6] https://www.nongnu.org/nyacc/
+[7] https://www.gnu.org/software/guile/docs/master/guile.html/PEG-Parsing.html
+[8] https://gitlab.com/janneke/tinycc
+[9] http://www.softwarepreservation.org/projects/LISP/book/LISP%25201.5%2520Programmers%2520Manual.pdf
+[10] https://github.com/oriansj/stage0
--- /dev/null
+Subject: Mes 0.16 released
+
+I am pleased to announce the release of Mes 0.16, representing 27
+commits over 2 weeks.
+
+A most annoying ELF header bug was fixed that suddenly had all Mes
+binaries segfault before entering `_start' on Linux 4.17 and later.
+
+We now have binutils-2.20.1 and gcc-4.1.0, both compiled with
+gcc-2.95.3 and glibc-2.2.5.
+
+This reduced-binary-seed bootstrap still depends on these bootstrap
+binaries: BOOTSTRAP-GUILE, flex, bash, bzip2, coreutils, diffutils,
+gawk, grep, gzip, make, sed, tar, on the small binary seeds:
+tinycc-seed, mescc-seed and on the mes.M1 ASCII seed.
+
+Next targets:
+
+ - build a Gcc 4.7 and Glibc 2.23
+ - upstream the x86 Mes bootstrap to GuixSD
+ - reduce the 1MB ASCII M1 seed to ~5000 LOC/~100KB of M2 source
+ - revive Gash: a posix shell for Guile to reduce the bootstrap binary
+ dependencies
+ - and/or otherwise reduce the bootstrap binary dependencies
+
+Packages are available from Guix's wip-bootstrap branch.
+
+* About
+
+Mes[0] aims to help create full source bootstrapping for GuixSD[1] as
+part of the bootstrappable builds[2] effort.
+
+It currently consists of a mutual self-hosting Scheme interpreter
+prototype written in C and a Nyacc-based C compiler written in Scheme.
+This C prototype is being simplified[3] to be transpiled by M2-Planet[4].
+
+The Scheme interpreter prototype (mes.c) has a Garbage Collector, a
+library of loadable Scheme modules-- notably Dominique Boucher's LALR[5],
+Pre-R6RS portable syntax-case[6] with R7RS ellipsis, Matt Wette's Nyacc[7],
+Guile's PEG[8] --and test suite just barely enough to support a simple
+REPL and simple C-compiler: MesCC.
+
+Mes+MesCC can compile an only lighty patched TinyCC[9] that is
+self-hosting. Using this tcc and the Mes C library we now have a
+reduced-binary-seed bootstrap for the gnutools triplet: glibc-2.2.5,
+binutils-2.20.1, gcc-4.1.0.
+
+Mes is inspired by The Maxwell Equations of Software: LISP-1.5[10] --
+John McCarthy page 13, GNU Guix's source/binary packaging transparency
+and Jeremiah Orians's stage0[11] ~500 byte self-hosting hex assembler.
+
+* Download
+
+ git clone https://gitlab.com/janneke/mes
+
+ wget https://gitlab.com/janneke/mes/-/archive/v0.16/mes-0.16.tar.gz
+
+Mes runs from the source tree and can also be built, packaged and
+installed in Guix[SD] by the usual
+
+ guix package -f guix.scm
+
+* Get informed, get involved
+
+ Join #bootstrappable on irc.freenode.net.
+
+* Changes in 0.16 since 0.15
+ ** Core
+ *** Support building with tcc, including Mes Lib C in-line assembly.
+ *** core:execl now supports 1000 arguments.
+ ** MesCC
+ *** Mes Lib C now bootstraps glibc-2.2.5, binutils-2.20.1, gcc-4.1.0.
+ *** MesCC binaries now run on Linux 4.17 too, i.e. survive Linus' new `sane mmap limits.'
+ *** MesCC now runs with mescc-tools 0.5 (no = in long options).
+ **** 3 new C test
+ 88-strrchrc, 97-fopen.c, 98-fopen.c.
+ ** Noteworthy bug fixes
+ *** strrchr now stops when it reaches start of string.
+ *** fopen now return 0 upon failure. Supports binutils' hack: fd=-2 means `cached'.
+ *** vfprintf, vsprintf now support precision and width on integers strings better.
+ *** fread now produces ungetc'd chars too.
+ *** memcmp now supports comparing 0 bytes, supporting binutils.
+
+ *** The unused ELF header data section, identical to the text section, has been removed.
+
+Greetings,
+janneke
+
+[0] https://gitlab.com/janneke/mes
+[1] https://www.gnu.org/software/guix
+[2] http://bootstrappable.org
+[3] https://github.com/oriansj/mes-m2
+[4] https://github.com/oriansj/m2-planet
+[5] https://github.com/schemeway/lalr-scm
+[6] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
+[7] https://www.nongnu.org/nyacc
+[8] https://www.gnu.org/software/guile/docs/master/guile.html/PEG-Parsing.html
+[9] https://gitlab.com/janneke/tinycc
+[10] http://www.softwarepreservation.org/projects/LISP/book/LISP%25201.5%2520Programmers%2520Manual.pdf
+[11] https://github.com/oriansj/stage0
--- /dev/null
+Subject: on bootstrapping: first Mes 0.3 released
+
+I am pleased to announce the first release of Mes: 0.3, representing
+152 commits over 3 months since the second status report[1].
+
+* About
+
+ Mes aims to create an entirely source-based bootstrapping path. The
+ target is to [have GuixSD] boostrap from a minimal, easily inspectable
+ binary --that should be readable as source-- into something close to
+ R6RS Scheme.
+
+ As bootstrapping is presumably easiest and probably most fun with
+ Scheme, the next step for Mes is mescc: a C compiler/linker to
+ boostrap into GNU Gcc and GNU Guile, possibly via Tiny-CC.
+
+ It currently has an interpreter written in C (mes) with Garbage
+ Collector (Jam Scraper), a library of loadable Scheme modules with
+ test suite just barely enough to support a simple REPL (repl.mes)
+ and a proof-of-concept c-compiler (mescc.mes) that produces an elf
+ from the simplest of C files.
+
+ Mes is inspired by The Maxwell Equations of Software: LISP-1.5[2]
+ -- John McCarthy page 13
+
+* Download
+
+ git clone https://gitlab.com/janneke/mes
+
+ wget https://gitlab.com/janneke/mes/repository/archive.tar.gz?ref=v0.3 -O mes-0.3.tar.gz
+
+Mes runs from the source tree and can also be built, packaged and
+installed in Guix[SD] by the usual
+
+ guix package -f guix.scm
+
+
+* Changes in 0.3 since 0.2
+ ** Core
+ *** Number-based rather than pointer-based cells.
+ *** Garbage collector aka Jam scraper.
+ A variant on SICP's stop and copy Garbage Collector (Jam Scraper?)
+ algorithm has been implemented.
+ *** The reader has been moved to Scheme.
+ ** Language
+ *** Simple loadable modules.
+ *** Srfi-9 and match use handwritten syntax-rules (mes-use-module (mes syntax)).
+ *** Optional syntax-case using psyntax (mes-use-module (mes psyntax)).
+ ** Noteworthy bug fixes
+ *** Srfi-0 has been fixed.
+
+* Changes in 0.2 since 0.1
+ ** Core
+ *** Names of symbols and strings are list of characters [WAS: c-string].
+ *** Sc-expand from pre-R6RS's psyntax has been integrated.
+ *** Undefined variable error now shows the name of the undefined variable.
+ *** There is now only one SCM type for builtin functions.
+ *** Macro expansion has been cleaned-up.
+ ** Language
+ *** Mes now provides a subset of R6RS.
+ *** Mes now provides syntax-case.
+ *** Mes now provides `load'.
+ ** Noteworthy bug fixes
+ *** Using values as second parameter of builtin function yields first value.
+ *** Quoted internals (e.g. 'if 'lambda) are now symbols.
+ *** Syntax error now exits.
+ *** Make+Bash voodoo has been replaced by build-aux/mes-snarf.scm.
+ *** Apply now accepts multiple list arguments.
+ *** Apply of character, inernal, number, string is an error.
+ *** Quasisyntax reading
+
+* Changes in 0.1 (since progress report #2)
+ ** Core
+ *** expand_macro is now a separate function.
+ *** A smaller core can now compiled using BOOT=1.
+ The smaller core does not provide define, define-macro, or quasiquote;
+ these are provided from a Scheme version of implemented eval/apply.
+ ** Language
+ *** Mes now provides a subset of R5RS.
+ *** Mes now provides let-syntax.
+ *** Mes now provides match.
+ *** Mes now provides quasisyntax, unsyntax and unsyntax-splicing.
+ ** User interface
+ *** Mes now provides a REPL, run:
+ scripts/repl.mes
+ *** Mes compiler can be run as a script:
+ scripts/mescc.mes doc/examples/main.c
+ *** Macro expansion can be inspected in the REPL, e.g.:
+ ,expand (and 0 1)
+ ** Noteworthy bug fixes
+ *** Performance: scripts/mescc.mes now takes 2s to compile main.c (was 1'20").
+ *** Symbols are now truly unique.
+ * '(), #t, #f are no longer symbols.
+
+Greetings,
+Jan
+
+[1] https://lists.nongnu.org/archive/html/guile-user/2016-09/msg00061.html
+[2] http://www.softwarepreservation.org/projects/LISP/book/LISP%25201.5%2520Programmers%2520Manual.pdf
--- /dev/null
+Subject: Mes 0.4 released
+
+I am pleased to announce the release of Mes 0.4, representing 115
+commits over barely two weeks. It now runs Nyacc and PEG and has much
+reduced core.
+
+* About
+
+ Mes aims to create an entirely source-based bootstrapping path. The
+ target is to [have GuixSD] boostrap from a minimal, easily inspectable
+ binary --that should be readable as source-- into something close to
+ R6RS Scheme.
+
+ As bootstrapping is presumably easiest and probably most fun with
+ Scheme, the next step for Mes is mescc: a C compiler/linker to
+ boostrap into GNU Gcc and GNU Guile, possibly via Tiny-CC.
+
+ It currently has an interpreter written in C (mes) with Garbage
+ Collector (Jam Scraper), a library of loadable Scheme modules--
+ notably Dominique Boucher's LALR[1], Pre-R6RS portable
+ syntax-case[2] with R7RS ellipsis, Nyacc[3] and Guile's PEG[4]
+ --and test suite just barely enough to support a simple REPL
+ (repl.mes) and a proof-of-concept C-compiler (mescc.mes) that
+ produces an elf from the simplest of C files.
+
+ Mes is inspired by The Maxwell Equations of Software: LISP-1.5[5]
+ -- John McCarthy page 13
+
+* Download
+
+ git clone https://gitlab.com/janneke/mes
+
+ wget https://gitlab.com/janneke/mes/repository/archive.tar.gz?ref=v0.4 -O mes-0.4.tar.gz
+
+Mes runs from the source tree and can also be built, packaged and
+installed in Guix[SD] by the usual
+
+ guix package -f guix.scm
+
+* Changes in 0.4 since 0.3
+ ** Core
+ *** Improved performance.
+ Macros are now memoized; after expansion and before eval'ing the
+ expanded form, their input s-expression is replaced by the expansion.
+ This yields a nice performance improvement which finally allowed
+ moving all non-essential bits from the C-core into Scheme...including
+ the reader. The Scheme reader is much, much slower than the previous
+ C version, making Mes--again-- feel slow. Think of that as a feature.
+ *** Bootstrap with minimal reader in C.
+ The C-reader needs only support reading of words and lists
+ (s-expressions), line-comments to read the initial Scheme reader which
+ then takes over and handles reading of quoting, characters, strings,
+ block-comments.
+ *** Reduced size.
+ Total C size: ~1500LOC. The main Mes evaluator is now ~1000LOC
+ including cell creation and garbage collector. This code is able to
+ execute a Scheme program that has been loaded into memory. Another
+ ~500LOC is spent to load a minimal Scheme program and to dump it, to
+ provide a small posix interface, math functions and do some error
+ reporting.
+ *** Programs can be dumped and loaded using --dump and --load.
+ ** Language
+ *** Minimal syntactic exception support for Nyacc.
+ *** Minimal syntactic fluids support for Nyacc.
+ *** Keywords are now supported.
+ *** Cond now supports =>.
+ *** Guile's optargs: lambda* and define* are now supported.
+ *** #;-comments are now supported.
+ *** Non-nested #| |#-comments are now supported.
+ *** Quasisyntax is now supported.
+ *** R7RS syntax-rules with custom ellipsis, with-ellipsis are now supported.
+ *** 9 new [partial] modules
+ (mes fluids), (mes nyacc), (mes optargs), (mes pmatch), (mes peg),
+ (srfi srfi-13), (srfi srfi-9-psyntax), (srfi srfi-26), (srfi srfi-43),
+ (rnrs arithmetic bitwise), (sxml xpath)
+ *** 36 new functions
+ 1+, 1-, abs, and=>, append-reverse, ash, char<=?, char<?, char>=?,
+ char>?, even?, filter, delete, delq, vector-copy, fold, fold-right,
+ getenv, iota, keyword->symbol list-head, list-tail, negative?, odd?,
+ positive?, remove!, remove, string->number, string-copy,
+ string-prefix?, string=, string=?, symbol->keyword symbol-append,
+ symbol-prefix?, unless, write, zero?.
+ ** Noteworthy bug fixes
+ *** Macros are now memoized.
+ *** An error is reported when using a wrong number of arguments with a call.
+ *** Cond now evaluates its test clauses only once.
+ *** Append can also handle one argument.
+ *** For-each now supports 2 list arguments.
+ *** Map now supports 3 list arguments.
+ *** Backslash in string is supported.
+ *** Closure is not a pair.
+ *** All standard characters are supported.
+ *** Mescc now also runs in Guile.
+
+
+Greetings,
+Jan
+
+[1] https://github.com/schemeway/lalr-scm
+[2] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
+[3] https://www.nongnu.org/nyacc/
+[4] https://www.gnu.org/software/guile/docs/master/guile.html/PEG-Parsing.html
+[5] http://www.softwarepreservation.org/projects/LISP/book/LISP%25201.5%2520Programmers%2520Manual.pdf
--- /dev/null
+Subject: Mes 0.5 released
+
+I am pleased to announce the release of Mes 0.5, representing 250
+commits over 4 months. Mes is now self-hosting, or rather it features
+a mutual self-hosting Scheme interpreter and C compiler: mes.c and
+mescc; a Nyacc-based C compiler backend that also works separately
+with Guile.
+
+* About
+
+ Mes aims to create full source bootstrapping for GuixSD: an
+ entirely source-based bootstrap path. The target is to [have
+ GuixSD] boostrap from a minimal, easily inspectable binary --that
+ should be readable as source-- into something close to R6RS
+ Scheme.
+
+ It currently consists of a mutual self-hosting [close to Guile-]
+ Scheme interpreter prototype in C and a Nyacc-based C compiler in
+ [Guile] Scheme.
+
+ The Scheme interpreter prototype (mes.c) has a Garbage Collector,
+ a library of loadable Scheme modules-- notably Dominique Boucher's
+ LALR[1], Pre-R6RS portable syntax-case[2] with R7RS ellipsis, Matt
+ Wette's Nyacc[3] Guile's PEG[4] --and test suite just barely
+ enough to support a simple REPL (repl.mes) and simple C-compiler
+ (mescc.mes) that can produce the second initial ELF binary from
+ binary from mes.c, in only about 2h30'.
+
+ Mes was inspired by The Maxwell Equations of Software: LISP-1.5[5]
+ -- John McCarthy page 13, GNU Guix's[6] source/binary packaging
+ transparency and Jeremiah Orians's stage0[7] bootstrap project.
+
+* Download
+
+ git clone https://gitlab.com/janneke/mes
+
+ wget https://gitlab.com/janneke/mes/repository/archive.tar.gz?ref=v0.5 -O mes-0.5.tar.gz
+
+Mes runs from the source tree and can also be built, packaged and
+installed in Guix[SD] by the usual
+
+ guix package -f guix.scm
+
+* Changes in 0.5 since 0.4
+ ** Core
+ *** Support compilation with Mescc.
+ *** Support compilation with -nostdinc, -nostdlib using mlibc.
+ *** Support call-with-current-continuation.
+ *** Support exception handling, catch/throw.
+ *** Give sensible error message when a macro is missing.
+ ** Language
+ *** Map now supports 4 lists.
+ *** The reader supports negative hex numbers.
+ *** 24 new functions
+ access?, assoc-set! c????r, compose, list->char-set,
+ open-input-string, read-string, string-delete, with-throw-handler.
+ ** Mescc
+ *** Mescc can be used separately as a Nyacc-based C compiler backend for Guile.
+ *** Switch to Nyacc frontend, update Nyacc to 0.76.5.
+ *** Mescc now has a test suite, scaffold/t.c.
+ *** Mescc now includes a minimal C library: libc/mlib.c libc/mstart.c.
+ *** Mescc can now compile mes.c.
+ ** Noteworthy bug fixes
+ *** The build system (configure, make) has been refactored.
+ *** Support map-4.
+ *** Evaluate arguments of OR only once.
+ *** Fix assq-set!
+ *** Fix ,expand in the REPL.
+
+Greetings,
+janneke
+
+[1] https://github.com/schemeway/lalr-scm
+[2] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
+[3] https://www.nongnu.org/nyacc/
+[4] https://www.gnu.org/software/guile/docs/master/guile.html/PEG-Parsing.html
+[5] http://www.softwarepreservation.org/projects/LISP/book/LISP%25201.5%2520Programmers%2520Manual.pdf
+[6] https://www.gnu.org/software/guix/
+[7] https://github.com/oriansj/stage0
--- /dev/null
+Subject: Mes 0.6 released
+
+I am pleased to announce the release of Mes 0.6, representing 32
+commits over 24 days. Mescc now works with vanilla Nyacc 0.78.3
+(thanks Matt!), Nyacc has been unbundled and Mescc compiles 33/55
+of tinycc test2 tests.
+
+* About
+
+ Mes aims to create full source bootstrapping for GuixSD: an
+ entirely source-based bootstrap path. The target is to [have
+ GuixSD] boostrap from a minimal, easily inspectable binary --that
+ should be readable as source-- into something close to R6RS
+ Scheme.
+
+ It currently consists of a mutual self-hosting [close to Guile-]
+ Scheme interpreter prototype in C and a Nyacc-based C compiler in
+ [Guile] Scheme.
+
+ The Scheme interpreter prototype (mes.c) has a Garbage Collector,
+ a library of loadable Scheme modules-- notably Dominique Boucher's
+ LALR[1], Pre-R6RS portable syntax-case[2] with R7RS ellipsis, Matt
+ Wette's Nyacc[3] Guile's PEG[4] --and test suite just barely
+ enough to support a simple REPL (repl.mes) and simple C-compiler
+ (mescc.mes) that can produce the second initial ELF binary from
+ binary from mes.c, in only about 2h30'.
+
+ Mes was inspired by The Maxwell Equations of Software: LISP-1.5[5]
+ -- John McCarthy page 13, GNU Guix's[6] source/binary packaging
+ transparency and Jeremiah Orians's stage0[7] bootstrap project.
+
+* Download
+
+ git clone https://gitlab.com/janneke/mes
+
+ wget https://gitlab.com/janneke/mes/repository/archive.tar.gz?ref=v0.6 -O mes-0.6.tar.gz
+
+Mes runs from the source tree and can also be built, packaged and
+installed in Guix[SD] by the usual
+
+ guix package -f guix.scm
+
+* Changes in 0.6 since 0.5
+ ** Core
+ *** configure, build now supports x86 and development for arm with-courage.
+ ** Language
+ *** Nyacc has been unbundled and is now a dependency.
+ *** Mes now supports case-lambda.
+ *** Mes reader now supports abbreviated form for return character #\cr.
+ *** 1 new function
+ string-index.
+ ** Mescc
+ *** Mescc can be used on regular C sources, like tinycc's tests/test2 suite.
+ *** make check passes 33/55 of tinycc's test suite etest/test2 tests.
+ *** Mescc now recognizes `short' as a type.
+ *** Mescc now supports sizeof (<identifier>), sizeof(<expression>).
+ *** Mescc now respects enum field initializers and supports enum variables.
+ *** Mescc now supports binary constants .
+ *** Mescc now supports assignments from ==, != boolean expressions .
+ *** Mescc now supports &, ^.
+ *** Mescc now supports struct pointers.
+ *** Mescc now supports struct definition with immediatete variable declaration.
+ *** Mescc now supports calling (returning correctly from) void functions.
+ *** Mescc now handles case statements breaks without compound correctly.
+ *** Mescc now has better [int/pointer] array support.
+ *** Mescc now has better support for simple (non-array-)structs.
+ *** Mescc now supports multiple declarations in one statement like: int a,b;
+ **** 2 new mlibc functions
+ printf, strcpy.
+ ** Noteworthy bug fixes
+ *** Installed mes and mes.repl now also run outside of source tree again.
+
+Greetings,
+janneke
+
+[1] https://github.com/schemeway/lalr-scm
+[2] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
+[3] https://www.nongnu.org/nyacc/
+[4] https://www.gnu.org/software/guile/docs/master/guile.html/PEG-Parsing.html
+[5] http://www.softwarepreservation.org/projects/LISP/book/LISP%25201.5%2520Programmers%2520Manual.pdf
+[6] https://www.gnu.org/software/guix/
+[7] https://github.com/oriansj/stage0
--- /dev/null
+Subject: Mes 0.7 released
+
+I am pleased to announce the release of Mes 0.7, representing 32
+commits over 4 weeks. Mescc now behaves more like a regular C
+compiler: supporting -E, -c, -o options and with a more complete set
+of header files [stubs]; enough to work on compiling tinycc's tcc.c
+albeit a somewhat modified version[8].
+
+* About
+
+ Mes aims to create full source bootstrapping for GuixSD: an
+ entirely source-based bootstrap path. The target is to [have
+ GuixSD] boostrap from a minimal, easily inspectable binary --that
+ should be readable as source-- into something close to R6RS
+ Scheme.
+
+ It currently consists of a mutual self-hosting [close to Guile-]
+ Scheme interpreter prototype in C and a Nyacc-based C compiler in
+ [Guile] Scheme.
+
+ The Scheme interpreter prototype (mes.c) has a Garbage Collector,
+ a library of loadable Scheme modules-- notably Dominique Boucher's
+ LALR[1], Pre-R6RS portable syntax-case[2] with R7RS ellipsis, Matt
+ Wette's Nyacc[3] Guile's PEG[4] --and test suite just barely
+ enough to support a simple REPL (repl.mes) and simple C-compiler
+ (mescc.mes) that can produce the second initial ELF binary from
+ binary from mes.c, in only about 2h30'.
+
+ Mes was inspired by The Maxwell Equations of Software: LISP-1.5[5]
+ -- John McCarthy page 13, GNU Guix's[6] source/binary packaging
+ transparency and Jeremiah Orians's stage0[7] bootstrap project.
+
+* Download
+
+ git clone https://gitlab.com/janneke/mes
+
+ wget https://gitlab.com/janneke/mes/repository/archive.tar.gz?ref=v0.7 -O mes-0.7.tar.gz
+
+Mes runs from the source tree and can also be built, packaged and
+installed in Guix[SD] by the usual
+
+ guix package -f guix.scm
+
+* Changes in 0.7 since 0.6
+ ** Core
+ *** The minimal C reader is now always included; dependencies
+ on i686-unknown-linux-gnu-gcc and binary read-0-32.mo have been
+ dropped, these are now optional.
+ ** Language
+ *** Mes reader now supports octal numbers #oXXX.
+ *** 10 new functions
+ current-output-port, getopt-long, negate, open-output-file,
+ option-ref, set-current-output-port, string-rindex, string-suffix?,
+ with-ouwith-output-to-file, with-output-to-port.
+ ** Mescc
+ *** Mescc can now be installed and used alongside a gcc installation.
+ *** Mescc can now handle const anywhere.
+ *** Mescc now supports array fields in structs.
+ *** Mescc now supports forward declarations and typedef.
+ *** Mescc can now handle comments anywhere.
+ *** Mescc now supports addition and substraction for enum field values.
+ *** Mescc now supports anonymous enums.
+ *** Mescc now supports all C99 header files needed to compile tcc.c.
+ *** build: C sources are now preprocessed separately, then compiled and linked.
+ *** build: mlibc and C sources are now compiled separately and then linked.
+ *** mlibc has been moved from Scheme snippets into C.
+ *** Mescc now supports -c, -D, -E, -I and -o options.
+ **** open now supports optional third mode parameter.
+ ** Noteworthy bug fixes
+ *** string-index now supports function predicate.
+ *** number->string for radix > 10 now produces `a' instead of `:'.
+
+Greetings,
+janneke
+
+[1] https://github.com/schemeway/lalr-scm
+[2] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
+[3] https://www.nongnu.org/nyacc/
+[4] https://www.gnu.org/software/guile/docs/master/guile.html/PEG-Parsing.html
+[5] http://www.softwarepreservation.org/projects/LISP/book/LISP%25201.5%2520Programmers%2520Manual.pdf
+[6] https://www.gnu.org/software/guix/
+[7] https://github.com/oriansj/stage0
+[8] https://gitlab.com/janneke/tinycc
--- /dev/null
+Subject: Mes 0.8 released
+
+I am pleased to announce the release of Mes 0.8, representing 34
+commits over 3 weeks. Mescc now produces object files in the hex2
+ascii output format compatible with the stage0 linker.
+
+Special thanks to Jeremiah Orians for support with MESCC_Tools and
+hex2, more goodness to follow soon!
+
+* About
+
+ Mes aims to create full source bootstrapping for GuixSD: an
+ entirely source-based bootstrap path. The target is to [have
+ GuixSD] boostrap from a minimal, easily inspectable binary --that
+ should be readable as source-- into something close to R6RS
+ Scheme.
+
+ It currently consists of a mutual self-hosting [close to Guile-]
+ Scheme interpreter prototype in C and a Nyacc-based C compiler in
+ [Guile] Scheme.
+
+ The Scheme interpreter prototype (mes.c) has a Garbage Collector,
+ a library of loadable Scheme modules-- notably Dominique Boucher's
+ LALR[1], Pre-R6RS portable syntax-case[2] with R7RS ellipsis, Matt
+ Wette's Nyacc[3] Guile's PEG[4] --and test suite just barely
+ enough to support a simple REPL (repl.mes) and simple C-compiler
+ (mescc.mes) that can produce the second initial ELF binary from
+ binary from mes.c, in only about 2h30'.
+
+ Mes was inspired by The Maxwell Equations of Software: LISP-1.5[5]
+ -- John McCarthy page 13, GNU Guix's[6] source/binary packaging
+ transparency and Jeremiah Orians's stage0[7] bootstrap project.
+
+* Download
+
+ git clone https://gitlab.com/janneke/mes
+
+ wget https://gitlab.com/janneke/mes/repository/archive.tar.gz?ref=v0.8 -O mes-0.8.tar.gz
+
+Mes runs from the source tree and can also be built, packaged and
+installed in Guix[SD] by the usual
+
+ guix package -f guix.scm
+
+* Changes in 0.8 since 0.7
+ ** Mescc
+ *** Mescc now depends on the hex2 linker from MESCC_Tools[9].
+ Direct ELF output support has been removed.
+ ELF symbol and string table creation has been removed.
+ *** Mescc now has experimental annotation support for hex2.
+ *** Mescc has experimental annotation support for hex2.
+ *** Mescc has been simplified by leveraging use labels in hex2 output.
+ *** Mescc now supports continue in loops.
+ *** Mescc now compiles to hex2 object files.
+ ** Language
+ *** 1 new function
+ list-index.
+
+Greetings,
+janneke
+
+[1] https://github.com/schemeway/lalr-scm
+[2] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
+[3] https://www.nongnu.org/nyacc/
+[4] https://www.gnu.org/software/guile/docs/master/guile.html/PEG-Parsing.html
+[5] http://www.softwarepreservation.org/projects/LISP/book/LISP%25201.5%2520Programmers%2520Manual.pdf
+[6] https://www.gnu.org/software/guix/
+[7] https://github.com/oriansj/stage0
+[8] https://gitlab.com/janneke/tinycc
+[9] https://github.com/oriansj/MESCC_Tools
--- /dev/null
+Subject: Mes 0.9 released
+
+I am pleased to announce the release of Mes 0.9, representing 107
+commits over 5 weeks. Mescc now compiles to a surprisingly readable
+stage0 M1 macro assembler output format. Mescc now compiles a
+modified TinyCC into a running [mostly segfaulting] executable. This
+is a major milestone as tcc can compile GCC.
+
+
+* About
+
+ Mes[0] aims to create full source bootstrapping for GuixSD[1] as
+ part of the bootstrappable builds[2] project.
+
+ It currently consists of a mutual self-hosting [close to Guile-]
+ Scheme interpreter prototype in C and a Nyacc-based C compiler in
+ [Guile] Scheme. This C prototype will be rewritten in stage0[3]
+ M1 assembly (or possibly stage2 slow-LISP, or ...).
+
+ The Scheme interpreter prototype (mes.c) has a Garbage Collector,
+ a library of loadable Scheme modules-- notably Dominique Boucher's
+ LALR[4], Pre-R6RS portable syntax-case[5] with R7RS ellipsis, Matt
+ Wette's Nyacc[6], Guile's PEG[7] --and test suite just barely
+ enough to support a simple REPL (repl.mes) and simple C-compiler
+ (mescc.mes).
+
+ The simple C compiler can compile a modified TinyCC[8]. This
+ needs more work. A gcc-compiled tcc is known[9] to compile GCC.
+
+ Mes is inspired by The Maxwell Equations of Software: LISP-1.5[10]
+ -- John McCarthy page 13, GNU Guix's source/binary packaging
+ transparency and Jeremiah Orians's stage0 ~300 byte self-hosting
+ hex assembler.
+
+* Download
+
+ git clone https://gitlab.com/janneke/mes
+
+ wget https://gitlab.com/janneke/mes/repository/archive.tar.gz?ref=v0.9 -O mes-0.9.tar.gz
+
+Mes runs from the source tree and can also be built, packaged and
+installed in Guix[SD] by the usual
+
+ guix package -f guix.scm
+
+* Changes in 0.9 since 0.8
+ ** Core
+ *** Mes now builds better in non-Guix[SD] legacy distros/environments. Thanks, rain1!
+ ** Mescc
+ *** Mescc now compiles a modified tinycc into a running [mostly segfaulting] tcc.mes.
+ https://gitlab.com/janneke/tinycc branch wip-mescc.
+ *** Mescc now supports locals stack frame larger than 1 byte offset.
+ *** Mescc now supports incomplete struct initializers {0}.
+ *** Mescc now supports >>=, <<=, ^=, ~.
+ *** Mescc now supports the comma operator.
+ *** Mescc now supports mullti-line string initializers.
+ *** Mescc now supports unions.
+ *** Mescc now supports arrays in structs.
+ *** Mescc now supports structs in structs.
+ *** Mescc has been refactored to use records.
+ *** Mescc now builds and runs with Guile-2.0 (legacy distro support, not recommended).
+ *** Mescc now bundles tinycc's test2 test suite, passes one more test [34/55 pass].
+ *** Mescc now has an incremental test suite consisting of 56 tests.
+ *** Mescc now supports stdarg variable argument lists.
+ *** Mescc now has __GNUC__ unset, #f (WAS: 0).
+ *** Mescc now depends on Nyacc 0.80.3.
+ *** Mescc now depends on M1 from MESCC_Tools v0.2.
+ *** Mescc now compiles to M1 object files.
+ **** 7 new mlibc functions
+ calloc, close, getcwd, lseek, sprintf, unlink, vprintf.
+ **** 31 new mlibc stubs
+ execvp, fclose, fdopen, fflush, fopen, fprintf, fread, free, fseek,
+ ftell, fwrite, localtime, longjmp, memcpy, memmove, memmove, memset,
+ qsort, remove, setjump, snprintf, sscanf, strchr, strrchr, strstr,
+ strtol, strtoll, strtoul, strtoull, time, vnsprintf.
+ **** 10 new header files
+ alloca.h, float.h, libgen.h, locale.h, stdbool.h, stddef.h, stdint.h,
+ stdnoreturn.h, sys/select.h, sys/wait.h.
+
+Greetings,
+janneke
+
+[0] https://gitlab.com/janneke/mes
+[1] https://www.gnu.org/software/guix
+[2] http://bootstrappable.org
+[3] https://github.com/oriansj/stage0
+[4] https://github.com/schemeway/lalr-scm
+[5] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
+[6] https://www.nongnu.org/nyacc/
+[7] https://www.gnu.org/software/guile/docs/master/guile.html/PEG-Parsing.html
+[8] https://gitlab.com/janneke/tinycc
+[9] https://lists.gnu.org/archive/html/tinycc-devel/2017-05/msg00103.html
+[10] http://www.softwarepreservation.org/projects/LISP/book/LISP%25201.5%2520Programmers%2520Manual.pdf
--- /dev/null
+Subject: on bootstrapping: 2nd status report on Mes
+Date: Sun, 25 Sep 2016 13:52:11 +0200
+
+Hi!
+
+In June I announced[0] Mes as a project that seeks to reduce the size of/
+dependency on bootstrap binaries, esp. for a system like GuixSD
+
+The strategy was to create a minimal trusted binary (prototyped in C but
+eventually to be hand-crafted in assembly/hex) that interpets a minimal
+LISP. Then using this minimal but already convenient LISP, extend it
+into Scheme and write a tiny C compiler/linker.
+
+Last time I had a minimal LISP-1.5-resembling interpreter in 900 lines
+of C that could interpret itself and an extension layer written in LISP
+providing a minimal Scheme environment. I was stuck on adding macros in
+LISP and had a broken macro implentation in C that I wanted to remove.
+Also I hoped to greatly reduce the size of the C part.
+
+New status[1]
+
+ * Provide Scheme primitives directly in 1400 lines of C
+ * Remove LISP-1.5 staging
+ * closures clue-bat, fixing bugs in begin, lambda, lexical
+ scoping etc. ... learned a lot!
+ * quasiquote, unquote, unquote-splicing (in C, too slow in Scheme)
+ * define-macro (in C)
+ * define-syntax, syntax-rules (in Scheme, using define-macro)
+ * all primitives needed to run LALR (strings, vectors, records,
+ some srfi bits; mostly in Scheme)
+ * test suite with 97 tests that run with Mes and also with Guile
+ * minimal and partial ANSI C parser for hello world
+ * minimal and simplistic 32 bit elf c-ast->elf generator
+
+ Mes can now create a running 32-bit elf binary from this hello
+ world C source with a simplistic for loop
+
+ int main ()
+ {
+ int i;
+ puts ("Hi Mes!\n");
+ for (i = 0; i < 4; ++i)
+ puts (" Hello, world!\n");
+ return 1;
+ }
+
+ It takes Mes 1'20" to compile this program, Guile takes 0.5 seconds.
+
+ * cannot get psyntax.pp hooked-up or running
+ * do not understand syntax stuff [well enough] to implement in C
+ -> no let-syntax, no MATCH
+ -> no syntax-case, no PEG parser
+
+In theory the bootstrapping problem I set out to solve seems to be
+cracked. The remaining problem is reduced to `just work':
+implementing a minimal C compiler in Scheme. Questions here: I'm not
+convinced yet that this is a meaningful project...aaand I really not
+want to tackle this without having MATCH, which Mes does not have yet.
+
+Of the possible directions that I see
+
+ 0 write the C compiler in Scheme without match
+ 1 rewrite match without let-syntax
+ 2 grok+write let-syntax/syntax-case using define-macro, some bits in C
+ 3 run and hook-up psyntax.pp...BUT that would probably require:
+ 4 address performance problem, possibly by
+ 5 rewrite Mes into a VM-based solution
+
+none I find really attractive. Option 5, a VM is proven to work but
+that's quite a change of direction. Looking at other VM-based projects
+(e.g. GNU Epsilon[2]) I fear that this must result in a much larger code
+base in C, throwing out the minimal trusted binary idea. The other
+puzzles and work 0, 2 or 3 still need to be done.
+
+However, diving into syntax-macro or eval work (2 or 3) most probably
+needs the performance issue addressed. And if it turns out that a big
+VM solution is needed, that may still invalidate this project after
+having done even more work.
+
+Help! :-) Ideas?
+
+Greetings,
+Jan
+
+[0] https://lists.gnu.org/archive/html/guile-user/2016-06/msg00061.html
+[1] https://gitlab.com/janneke/mes
+[2] http://git.savannah.gnu.org/cgit/epsilon.git
--- /dev/null
+ -*- org -*-
+#+TITLE: GNU Mes Announcements
+
+Copyright © 2016, 2017, 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+
+ Copying and distribution of this file, with or without modification,
+ are permitted in any medium without royalty provided the copyright
+ notice and this notice are preserved.
+
+Files are emails sent to public mailing lists. The notice above
+applies to these files too.
\ No newline at end of file
--- /dev/null
+Subject: wip-bootstrap updated
+
+I've updated the wip-bootstrap branch[0] for Mes[1] 0.13. It has new
+mes-boot and tcc-boot packages. mes-boot is a bootstrap version of
+Mes; it only depends on mescc-tools and a previously compiled mes.M1
+seed. Likewise, tcc-boot depends on a precompiled tcc-seed. Also,
+tcc-boot uses a heavily patched version of the tcc sources.
+
+Mes 0.13 is the first release that can bootstrap a fairly functional
+tcc-boot. This bootstrapped tcc passes 67/68 C tests that were created
+for MesCC. It can compile a version if itself where float, long long
+and bitfield are patched out...but linking fails. This amazing
+compiler can now be played with by doing something like
+
+--8<---------------cut here---------------start------------->8---
+git checkout wip-bootstrap
+make
+./pre-inst-env guix build tcc-boot # may take ~2h
+./pre-inst-env guix environment --ad-hoc tcc-boot
+mes-tcc --help #duck and run
+--8<---------------cut here---------------end--------------->8---
+
+The next big effort will be to make this mes-tcc fully functional and
+integrate this with GuixSD. To give you a taste of that,
+here's latest bug I'm currently looking at (pretty printed comments
+are only added when Guile runs MesCC, the problem is in LEA)
+
+--8<---------------cut here---------------start------------->8---
+$ diff -u ../mes-seed/mes.M1 src/mes.M1
+--- ../mes-seed/mes.M1 2018-05-01 18:49:37.312162270 +0200
++++ src/mes.M1 2018-05-01 19:49:40.774770406 +0200
+@@ -35805,12 +33091,11 @@
+ call32 %strcpy
+ add____$i8,%esp !0x8
+ test___%eax,%eax
+- # strcpy(buf + strlen(buf), "/mes/");
+- push___$i32 &_string_reader_read_list_266
++ push___$i32 &_string_reader_read_list_265
+ mov____%ebp,%eax
+- add____$i32,%eax %0x-200
++ add____$i32,%eax %0x-800
+ push___%eax
+- lea____0x32(%ebp),%eax %0x-200
++ lea____0x32(%ebp),%eax %0x-800
+ push___%eax
+ call32 %strlen
+ add____$i8,%esp !0x4
+--8<---------------cut here---------------end--------------->8---
+
+We also need to remove some shortcuts that we took, most notably:
+mes-seed[3]. This seed consists of 1MB of M1 code. mes.M1 is
+produced by compiling mes.c using MesCC, the C compiler written in
+(Guile) Scheme that comes with Mes. Although that's really terrible,
+it's probably a big step forward: currently GuixSD uses ~250MB of
+binary seed: the bootstrap binaries.
+
+The plan is to replace the mes.M1 seed with mes.M2 and compile this
+new mes.M2 seed using the brand new M2-Planet[2]. M2 is basically
+simple C with structs, without preprocessor. This will reduce the
+seed size by a factor of 10 while making it much more readable.
+
+An excerpt of the TODO I keep in Mes' BOOTSTRAP document
+
+--8<---------------cut here---------------start------------->8---
+* TODO
+** have tcc-boot's mes-tcc compile a fully functional tcc
+*** mescc: fix unknown bug.
+*** mescc: support function-static.
+*** mescc: support/grok global static.
+*** mescc: support unsigned comparison, arithmetic.
+*** mescc: support long long (do we need long long to get long long in tcc)?
+*** mescc: support bitfield (do we need bitfield to get bitfield in tcc)?
+*** mescc: support float (do we need float to get float in tcc)?
+** have bootstrapped tcc compile gcc-4.7
+** remove or upstream patches from tcc-boot
+** prepare src/mes.c for M2-Planet[2] transpiler
+** integrate with GuixSD
+** x86_64, arm, the Hurd
+--8<---------------cut here---------------end--------------->8---
+
+Greetings,
+janneke
+
+[0] http://git.savannah.gnu.org/cgit/guix.git/log/?h=wip-bootstrap
+[1] https://gitlab.com/janneke/mes
+[2] https://github.com/oriansj/m2-planet
+[3] https://gitlab.com/janneke/mes-seed
-All files except the files listed below
+ -*- org -*-
+#+TITLE: Talk @Fosdem 2017
+
+Copyright © 2017 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+
+ Copying and distribution of this file, with or without modification,
+ are permitted in any medium without royalty provided the copyright
+ notice and this notice are preserved.
+
+This talk is
Copyright © 2017 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
-Images imported from GNU Guix
+Permission is granted to copy, distribute and/or modify this talk
+under the terms of the GNU Free Documentation License, Version 1.3 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
+copy of the license is included in doc/fdl-1.3.texi, included in the
+manual in the section entitled ``GNU Free Documentation License''.
+
+beamercolorthemeX.sty
+beamerthemeX.sty
+bootstrap-graph.png
+egg.jpeg
+egg.png
+egg.xcf
+fosdem.org
+fosdem.pdf
+fsb-logo-guile-guix-gnu.png
+fsb-logo-guile-guix-gnu.xcf
+fsb-logo-guile-guix-mes.png
+fsb-logo-guile-guix-mes.xcf
+fsb-logo.png
+guix-build-bootstrap-tarballs.log
+mes.png
+mes.xcf
bootstrap-graph.png
+
GuixSD.png
+Copyright © 2015 Luis Felipe López Acevedo
+Permission is granted to copy, distribute and/or modify
+this work under the terms of the Creative Commons
+Attribution-ShareAlike 4.0 International License.
One page from
http://www.softwarepreservation.org/projects/LISP/book/LISP%25201.5%2520Programmers%2520Manual.pdf
LISP-1.5-page-13.png
LISP-1.5-page-13-bottom.png
-LISP-1.5-page-13.pdf
\ No newline at end of file
+LISP-1.5-page-13.pdf
-#+TITLE: Mes
+#+TITLE: GNU Mes
#+TITLE: \\\smaller[2]{Maxwell Equations of Software}
#+DATE:2017-02-05
#+EMAIL: janneke@gnu.org
#+AUTHOR: janneke@gnu.org
+#+COPYRIGHT: Jan (janneke) Nieuwenhuizen <janneke@gn.org>
+#+LICENSE: GNU Free Documentation License, version 1.3 or later.
#+LATEX_HEADER:\institute{FOSDEM'17}
#+LATEX_HEADER:\def\ahref#1#2{\htmladdnormallink{#2}{#1}}
#+OPTIONS: H:2
* NOT an alternative for Guile -- reuse Guile modules
* Mes, WHY?
-
+
** Inspiration: what do you want?
*** Meaning, Autonomy, Co-Creation, Self-Realization
*** December 25: \ahref{https://lists.gnu.org/archive/html/guile-user/2016-12/msg00041.html}{Mes 0.4 released}
# https://gnunet.org/bot/log/guile/2016-12-25
* run Nyacc, PEG, reduced core
-
+
** Status
*** core C prototype: 1150 lines
-*** non-essential C sources:
+*** non-essential C sources:
#+BEGIN_SRC bash
210 lib.c
157 math.c
** Status
-***
+***
#+BEGIN_SRC bash
-01:16:51 janneke@dundal:~/src/mes
+01:16:51 janneke@dundal:~/src/mes
$ guix package -f guix.scm
The following package will be upgraded:
mes 0.4.f84e97fc -> 0.4.f84e97fc /gnu/store/2fsy1cd24pnwkv7a1zd0anzk3zz8ysdn-mes-0.4.f84e97fc
# C-c C-e l b (org-beamer-export-to-latex)
# C-c C-e l P (org-beamer-export-to-pdf)
+
+* Legalese
+ :PROPERTIES:
+ :COPYING: t
+ :END:
+
+ Copyright \copy 2017 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+
+ #+BEGIN_QUOTE
+ Permission is granted to copy, distribute and/or modify this
+ document under the terms of the GNU Free Documentation License,
+ Version 1.3 or any later version published by the Free Software
+ Foundation; with no Invariant Sections, with no Front-Cover Texts,
+ and with no Back-Cover Texts.
+ #+END_QUOTE
+ -*- org -*-
+#+TITLE: GNU Mes images
+
+Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+
+ Copying and distribution of this file, with or without modification,
+ are permitted in any medium without royalty provided the copyright
+ notice and this notice are preserved.
+
+gcc-mesboot-graph.dot
+This graph is generated from Guix wip-bootstrap, doing:
+sed -i s,package-with-bootstrap-guile,identity, gnu/packages/{commencement,mes}.scm
+~/src/guix-bootstrap/pre-inst-env guix graph gcc-mesboot > doc/images/gcc-mesboot-graph.dot
+dot -T png doc/images/gcc-mesboot-graph.dot > doc/images/gcc-mesboot-graph.png
+;;; -*-scheme-*-
+;;; GNU Mes --- Maxwell Equations of Software
+;;; Copyright (C) 2016, 2017, 2018 Free Software Foundation, Inc.
+;;;
+;;; This file is part of GNU Mes.
+;;;
+;;; GNU Mes is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Mes is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;;; This file is generated from psyntax.ss.
+
+;;; Code:
(letrec ((syntmp-lambda-var-list-167
(lambda (syntmp-vars-552)
(let syntmp-lvl-553 ((syntmp-vars-554 syntmp-vars-552)
syntmp-tmp-2044
'(any any))))
syntmp-x-2043)))
-
--- /dev/null
+;;; -*-scheme-*-
+;;; GNU Mes --- Maxwell Equations of Software
+;;; Copyright (C) 2016, 2017, 2018 Free Software Foundation, Inc.
+;;;
+;;; This file is part of GNU Mes.
+;;;
+;;; GNU Mes is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Mes is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;;; This file is generated from psyntax.ss.
+
+;;; Code:
+++ /dev/null
-;;; -*-scheme-*-
-(define (newline) (core:display "\n"))
-(core:display "b-00\n")
-(define save (current-input-port))
-(core:display "save=")(core:display save)(newline)
-(core:display "b-0111\n")
-(set-current-input-port (open-input-file "scaffold/t-0.mes"))
-;;(set-current-input-port (open-input-file "mes/t-0.mes"))
-(core:display "ipp=")(core:display (current-input-port))(newline)
-(core:display "b-02\n")
-(primitive-load)
-(core:display "b-03\n")
-(set-current-input-port save)
-(core:display "b-04\n")
-"42\n"
+;;; GNU Mes --- Maxwell Equations of Software
+;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;;
+;;; This file is part of GNU Mes.
+;;;
+;;; GNU Mes is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Mes is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
+
(define display core:display)
(define write core:write)
+;;; GNU Mes --- Maxwell Equations of Software
+;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;;
+;;; This file is part of GNU Mes.
+;;;
+;;; GNU Mes is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Mes is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
+
(define (read) 1)
(define read (lambda () 0))
(exit (read))
+;;; GNU Mes --- Maxwell Equations of Software
+;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;;
+;;; This file is part of GNU Mes.
+;;;
+;;; GNU Mes is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Mes is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
+
(define (read) 1)
(exit
((lambda ()
+++ /dev/null
-
-(define (cons* . rest)
- (if (null? (cdr rest)) (car rest)
- (cons (car rest) (core:apply cons* (cdr rest) (current-module)))))
-
-(define (caar x) (car (car x)))
-(define (cadr x) (car (cdr x)))
-(define (cdar x) (cdr (car x)))
-(define (cddr x) (cdr (cdr x)))
-
-(define (symbol? x)
- (eq? (core:type x) <cell:symbol>))
-
-(define (map f lst)
- (if (null? lst) (list)
- (cons (f (car lst)) (map f (cdr lst)))))
-
-(define-macro (simple-let bindings . rest)
- (cons (cons 'lambda (cons (map car bindings) rest))
- (map cadr bindings)))
-
-;; (define-macro (xsimple-let bindings rest)
-;; `(,`(lambda ,(map car bindings) ,@rest)
-;; ,@(map cadr bindings)))
-
-(define-macro (xsimple-let bindings rest)
- (cons* (cons* (quote lambda)
- (map car bindings) (append2 rest (quote ())))
- (append2 (map cadr bindings) (quote ()))))
-
-;; (define-macro (xnamed-let name bindings rest)
-;; `(simple-let ((,name *unspecified*))
-;; (set! ,name (lambda ,(map car bindings) ,@rest))
-;; (,name ,@(map cadr bindings))))
-
-(define-macro (xnamed-let name bindings rest)
- (list (quote simple-let)
- (list (cons* name (quote (*unspecified*))))
- (list (quote set!)
- name
- (cons* (quote lambda)
- (map car bindings)
- (append2 rest (quote ()))))
- (cons* name (append2 (map cadr bindings) (quote ())))))
-
-;; (define-macro (let bindings-or-name . rest)
-;; (if (symbol? bindings-or-name)
-;; `(xnamed-let ,bindings-or-name ,(car rest) ,(cdr rest))
-;; `(xsimple-let ,bindings-or-name ,rest)))
-
-(define-macro (let bindings-or-name . rest)
- (if (symbol? bindings-or-name) (list (quote xnamed-let) bindings-or-name (car rest) (cdr rest))
- (list (quote xsimple-let) bindings-or-name rest)))
-
-(define ss-memq-inner #f)
-(define (ss-memq x lst)
- (if (null? lst) #f ;; IF
- (if (eq? x (car lst)) lst
- (ss-memq-inner x (cdr lst)))))
-
-(define (ss-memq-inner x lst)
- (if (null? lst) #f ;; IF
- (if (eq? x (car lst)) lst
- (ss-memq-inner x (cdr lst)))))
-
-(define (ss-list-head x n)
- (if (= 0 n) '()
- (cons (car x) (ss-list-head (cdr x) (- n 1)))))
-
-;; (define (foo x y)
-;; (cons x y))
-
-;; (define (ss-list-head x n)
-;; (if (= 0 n) '()
-;; (foo (car x) (ss-list-head (cdr x) (- n 1)))))
-
-(define (string->list s)
- (core:car s))
-
-(define (list->string lst)
- (core:make-cell <cell:string> lst 0))
-
-(define (not x) (if x #f #t))
-
-(define (string-split s c)
- (let loop ((lst (string->list s)) (result '()))
- (let ((rest (ss-memq c lst)))
- (if (not rest) (append2 result (list (list->string lst)))
- (loop (cdr rest)
- (append2 result
- (list (list->string (ss-list-head lst (- (length lst) (length rest)))))))))))
-
-(core:display-error "*START*\n")
-(string-split "foo bar" #\space)
-(string-split "baz bla" #\space)
--- /dev/null
+;;; GNU Mes --- Maxwell Equations of Software
+;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;;
+;;; This file is part of GNU Mes.
+;;;
+;;; GNU Mes is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Mes is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
+
+(define (cons* . rest)
+ (if (null? (cdr rest)) (car rest)
+ (cons (car rest) (core:apply cons* (cdr rest) (current-module)))))
+
+(define (caar x) (car (car x)))
+(define (cadr x) (car (cdr x)))
+(define (cdar x) (cdr (car x)))
+(define (cddr x) (cdr (cdr x)))
+
+(define (symbol? x)
+ (eq? (core:type x) <cell:symbol>))
+
+(define (map f lst)
+ (if (null? lst) (list)
+ (cons (f (car lst)) (map f (cdr lst)))))
+
+(define-macro (simple-let bindings . rest)
+ (cons (cons 'lambda (cons (map car bindings) rest))
+ (map cadr bindings)))
+
+;; (define-macro (xsimple-let bindings rest)
+;; `(,`(lambda ,(map car bindings) ,@rest)
+;; ,@(map cadr bindings)))
+
+(define-macro (xsimple-let bindings rest)
+ (cons* (cons* (quote lambda)
+ (map car bindings) (append2 rest (quote ())))
+ (append2 (map cadr bindings) (quote ()))))
+
+;; (define-macro (xnamed-let name bindings rest)
+;; `(simple-let ((,name *unspecified*))
+;; (set! ,name (lambda ,(map car bindings) ,@rest))
+;; (,name ,@(map cadr bindings))))
+
+(define-macro (xnamed-let name bindings rest)
+ (list (quote simple-let)
+ (list (cons* name (quote (*unspecified*))))
+ (list (quote set!)
+ name
+ (cons* (quote lambda)
+ (map car bindings)
+ (append2 rest (quote ()))))
+ (cons* name (append2 (map cadr bindings) (quote ())))))
+
+;; (define-macro (let bindings-or-name . rest)
+;; (if (symbol? bindings-or-name)
+;; `(xnamed-let ,bindings-or-name ,(car rest) ,(cdr rest))
+;; `(xsimple-let ,bindings-or-name ,rest)))
+
+(define-macro (let bindings-or-name . rest)
+ (if (symbol? bindings-or-name) (list (quote xnamed-let) bindings-or-name (car rest) (cdr rest))
+ (list (quote xsimple-let) bindings-or-name rest)))
+
+(define ss-memq-inner #f)
+(define (ss-memq x lst)
+ (if (null? lst) #f ;; IF
+ (if (eq? x (car lst)) lst
+ (ss-memq-inner x (cdr lst)))))
+
+(define (ss-memq-inner x lst)
+ (if (null? lst) #f ;; IF
+ (if (eq? x (car lst)) lst
+ (ss-memq-inner x (cdr lst)))))
+
+(define (ss-list-head x n)
+ (if (= 0 n) '()
+ (cons (car x) (ss-list-head (cdr x) (- n 1)))))
+
+;; (define (foo x y)
+;; (cons x y))
+
+;; (define (ss-list-head x n)
+;; (if (= 0 n) '()
+;; (foo (car x) (ss-list-head (cdr x) (- n 1)))))
+
+(define (string->list s)
+ (core:car s))
+
+(define (list->string lst)
+ (core:make-cell <cell:string> lst 0))
+
+(define (not x) (if x #f #t))
+
+(define (string-split s c)
+ (let loop ((lst (string->list s)) (result '()))
+ (let ((rest (ss-memq c lst)))
+ (if (not rest) (append2 result (list (list->string lst)))
+ (loop (cdr rest)
+ (append2 result
+ (list (list->string (ss-list-head lst (- (length lst) (length rest)))))))))))
+
+(core:display-error "*START*\n")
+(string-split "foo bar" #\space)
+(string-split "baz bla" #\space)
+;;; GNU Mes --- Maxwell Equations of Software
+;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;;
+;;; This file is part of GNU Mes.
+;;;
+;;; GNU Mes is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Mes is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
+
(cdr '(0 . 1))
+;;; GNU Mes --- Maxwell Equations of Software
+;;; Copyright © 2016,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;;
+;;; This file is part of GNU Mes.
+;;;
+;;; GNU Mes is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Mes is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
(define-module (guile gc))
(if (eq? scan gc-free) (gc-flip)
(let ((old (vector-ref new-cars scan)))
(let ((new (gc-relocate old)))
- (let ((old (gc-update-car scan new)))
+ (let ((old (gc-update-car scan new)))
(let ((new (gc-relocate old)))
(let ((scan (gc-update-cdr scan new)))
(gc-loop scan))))))))
(define (gc-relocate old) ; old -> new
(display "gc-relocate old=") (display old) (newline)
(display "gc-relocate old is pair?=") (display (gc-pair? old)) (newline)
-
+
(if (not (gc-pair? old)) old
(let ((oldcr (vector-ref the-cars (cell-index old))))
(display "gc-relocate oldcr=") (display oldcr) (newline)