1 Subject: Mes 0.4 released
3 I am pleased to announce the release of Mes 0.4, representing 115
4 commits over barely two weeks. It now runs Nyacc and PEG and has much
9 Mes aims to create an entirely source-based bootstrapping path. The
10 target is to [have GuixSD] boostrap from a minimal, easily inspectable
11 binary --that should be readable as source-- into something close to
14 As bootstrapping is presumably easiest and probably most fun with
15 Scheme, the next step for Mes is mescc: a C compiler/linker to
16 boostrap into GNU Gcc and GNU Guile, possibly via Tiny-CC.
18 It currently has an interpreter written in C (mes) with Garbage
19 Collector (Jam Scraper), a library of loadable Scheme modules--
20 notably Dominique Boucher's LALR[1], Pre-R6RS portable
21 syntax-case[2] with R7RS ellipsis, Nyacc[3] and Guile's PEG[4]
22 --and test suite just barely enough to support a simple REPL
23 (repl.mes) and a proof-of-concept C-compiler (mescc.mes) that
24 produces an elf from the simplest of C files.
26 Mes is inspired by The Maxwell Equations of Software: LISP-1.5[5]
27 -- John McCarthy page 13
31 git clone https://gitlab.com/janneke/mes
33 wget https://gitlab.com/janneke/mes/repository/archive.tar.gz?ref=v0.4 -O mes-0.4.tar.gz
35 Mes runs from the source tree and can also be built, packaged and
36 installed in Guix[SD] by the usual
38 guix package -f guix.scm
40 * Changes in 0.4 since 0.3
42 *** Improved performance.
43 Macros are now memoized; after expansion and before eval'ing the
44 expanded form, their input s-expression is replaced by the expansion.
45 This yields a nice performance improvement which finally allowed
46 moving all non-essential bits from the C-core into Scheme...including
47 the reader. The Scheme reader is much, much slower than the previous
48 C version, making Mes--again-- feel slow. Think of that as a feature.
49 *** Bootstrap with minimal reader in C.
50 The C-reader needs only support reading of words and lists
51 (s-expressions), line-comments to read the initial Scheme reader which
52 then takes over and handles reading of quoting, characters, strings,
55 Total C size: ~1500LOC. The main Mes evaluator is now ~1000LOC
56 including cell creation and garbage collector. This code is able to
57 execute a Scheme program that has been loaded into memory. Another
58 ~500LOC is spent to load a minimal Scheme program and to dump it, to
59 provide a small posix interface, math functions and do some error
61 *** Programs can be dumped and loaded using --dump and --load.
63 *** Minimal syntactic exception support for Nyacc.
64 *** Minimal syntactic fluids support for Nyacc.
65 *** Keywords are now supported.
66 *** Cond now supports =>.
67 *** Guile's optargs: lambda* and define* are now supported.
68 *** #;-comments are now supported.
69 *** Non-nested #| |#-comments are now supported.
70 *** Quasisyntax is now supported.
71 *** R7RS syntax-rules with custom ellipsis, with-ellipsis are now supported.
72 *** 9 new [partial] modules
73 (mes fluids), (mes nyacc), (mes optargs), (mes pmatch), (mes peg),
74 (srfi srfi-13), (srfi srfi-9-psyntax), (srfi srfi-26), (srfi srfi-43),
75 (rnrs arithmetic bitwise), (sxml xpath)
77 1+, 1-, abs, and=>, append-reverse, ash, char<=?, char<?, char>=?,
78 char>?, even?, filter, delete, delq, vector-copy, fold, fold-right,
79 getenv, iota, keyword->symbol list-head, list-tail, negative?, odd?,
80 positive?, remove!, remove, string->number, string-copy,
81 string-prefix?, string=, string=?, symbol->keyword symbol-append,
82 symbol-prefix?, unless, write, zero?.
83 ** Noteworthy bug fixes
84 *** Macros are now memoized.
85 *** An error is reported when using a wrong number of arguments with a call.
86 *** Cond now evaluates its test clauses only once.
87 *** Append can also handle one argument.
88 *** For-each now supports 2 list arguments.
89 *** Map now supports 3 list arguments.
90 *** Backslash in string is supported.
91 *** Closure is not a pair.
92 *** All standard characters are supported.
93 *** Mescc now also runs in Guile.
99 [1] https://github.com/schemeway/lalr-scm
100 [2] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
101 [3] https://www.nongnu.org/nyacc/
102 [4] https://www.gnu.org/software/guile/docs/master/guile.html/PEG-Parsing.html
103 [5] http://www.softwarepreservation.org/projects/LISP/book/LISP%25201.5%2520Programmers%2520Manual.pdf