2 #+TITLE: GNU Mes NEWS – history of user-visible changes
3 #+STARTUP: content hidestars
5 Copyright © 2016,2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
7 Copying and distribution of this file, with or without modification,
8 are permitted in any medium without royalty provided the copyright
9 notice and this notice are preserved.
11 Please send Mes bug reports to bug-mes@gnu.org.
13 * Changes in 0.16.1 since 0.16
15 *** Mes now builds out of the box on Debian buster/testing.
16 *** Mes now comes with a generic build recipe: build-aux/setup-mes.sh.
17 *** Mes now comes with INFO documentation.
19 *** MesCC now exits if spawning BLOOD_ELF, M1, or HEX2 fails.
20 * Changes in 0.16 since 0.15
22 *** Support building with tcc, including Mes Lib C in-line assembly.
23 *** core:execl now supports 1000 arguments.
25 *** Mes Lib C now bootstraps glibc-2.2.5, binutils-2.20.1, gcc-4.1.0.
26 *** MesCC binaries now run on Linux 4.17 too, i.e. survive Linus' new `sane mmap limits.'
27 *** MesCC now runs with mescc-tools 0.5 (no = in long options).
29 88-strrchrc, 97-fopen.c, 98-fopen.c.
30 ** Noteworthy bug fixes
31 *** strrchr now stops when it reaches start of string.
32 *** fopen now return 0 upon failure. Supports binutils' hack: fd=-2 means `cached'.
33 *** vfprintf, vsprintf now support precision and width on integers strings better.
34 *** fread now produces ungetc'd chars too.
35 *** memcmp now supports comparing 0 bytes, supporting binutils.
37 *** The unused ELF header data section, identical to the text section, has been removed.
38 * Changes in 0.15 since 0.14
40 *** Support fork, exec, waitpid.
41 *** Boot-0 loading has been refactored.
42 *** MesCC now has out of the box Geiser support.
47 *** MesCC and Mes Lib C can now build binutils-2.30, gcc-2.95.3 and glibc-2.2.5.
48 *** MesCC now provides dummy crti.o, crtn.o so that tcc needs not be patched for those.
49 *** Mes Lib C now supports compiling glibc-2.2.25.
50 *** Mes Lib C now supports compiling gcc-2.95.3
51 *** Mes Lib C now supports compiling binutils-2.30.
52 *** Mes Lib C now supports compiling m4-1.4.
53 *** Mes Lib C has been split into archs: gcc, x86-mes-gcc and x86-mes.
54 *** MesCC now has a posixy command line interface.
56 abs, access, alarm, alloca, atexit, atol, bcmp, bcopy, brk, bzero,
57 chmod, clearerr, close, dup, dup2, execve, fabs, fcntl, fdgets, feof,
58 fgets, fileno, fork, freopen, fscanf, fstat, fsync, getcwd, getgid,
59 getpid, getrusage, getuid, index, ioctl, isalnum, isalpha, isascii,
60 iscntrl, isprint, ispunct, kill, link, lseek, lstat, mkdir, mktemp,
61 nanosleep, open, perror, pipe, raise, read, rename, rindex, rmdir,
62 sbrk, sbrk, setitimer, signal, sleep, stat, strcspn, strdup, strerror,
63 strncat, strpbrk, strspn, unlink, unsetenv, waitpid.
65 abort, atof, bsearch, bsearch, chown, ctime, fpurge, freadahead,
66 frexp, getpwnam, gmtime, mbstowcs, pclose, popen, rewind, setbuf,
67 sigsetmask, strftime, sys_siglist, system, times, umask, utime.
69 51-strcmp.c, 70-printf.c, 87-sscanf.c, 90-strpbrk.c, 91-fseek.c,
70 92-stat.c, 93-fread-fwrite.c, 94-unsetenv.c, 95-signal.c, 96-strto.c.
72 * Changes in 0.14 since 0.13
74 *** Bootstrapped Mes+MesCC now compiles a tcc that is self-hosting and only slightly patched.
75 *** The reader now supports binary numbers (previously: read as decimal).
76 *** String port support has been moved to C.
77 *** The build has been simplified, the Make-in-Scheme experiment has been removed.
81 *** Mes now supports define-immutable-record-type and single set-field from srfi-9 gnu.
83 basename, chmod, const, delete-duplicates, logxor, string-contains,
84 string-map, string-replace, string-trim, string-trim-both,
85 string-trim-right, unfold.
87 *** MesCC now supports standalone usage of nestedly defined enums, structs and unions.
88 *** MesCC now supports comparison of unsigned and promotion of signed/unsigned -> unsigned.
89 *** MesCC now supports sign extension for char, short.
90 *** MesCC now has stubbing for floats; compiling works, data is fu.
91 *** MesCC now has full suport for switch case, e.g. with default as first clause.
92 *** MesCC now supports destruction of casted expressions: ((struct foo*)p)->bar.
93 *** MesCC now has full support for pre/post, e.g.: (foo--)->bar and permutations.
94 *** MesCC now supports sizeof any expression or type.
95 *** MesCC now supports initialization of anonymous unions.
96 *** MesCC now supports bit fields.
97 *** MesCC now supports valued functions in expressions: destruction and dereferencing.
98 *** MesCC now supports function-static variables.
99 *** MesCC now supports initializer lists in structs and unions.
100 *** MesCC now has full support for heterogeneous variable declarations, e.g.: char p, *x = "foo", buf[3];
102 __lshrdi3, __ashldi3, __ashrdi3, strncpy.
103 **** 9 new mlibc stubs
104 __fixdfdi, __fixsfdi, __fixunsxfdi, __fixxfdi, __floatundixf, ldexp,
105 strtod, strtof, strtold.
106 * Changes in 0.13 since 0.12
108 *** Bootstrapped Mes+MesCC can now compile a patched tcc in ~1h45' (~25,000 LOC).
109 *** MesCC scripts for Mes and Guile are now merged; executable is: `mescc'.
110 *** Mes now uses only one arena for stop-and-copy; doubles available size.
111 *** Mes now has a Guile-like command-line interface (mes.repl has been removed).
112 *** Mes now boots into a full Scheme by default.
113 *** Mes can now be compiled (MES_MINI=1) to boot into a minimal Scheme (~2000 cells).
114 *** Mes now creates less garbage in the reader and in
115 append2, append_reverse, reverse, reverse!, vector-for-each, vector-to-list, vector-map.
117 append-reverse, chmod, ioctl, isatty, isspace, last_pair, reverse!.
120 char-whitespace?, chmod, isatty?
121 ** Noteworthy bug fixes
122 *** Two bugs in the jam scraper/garbage collector have been fixed.
123 *** equal2_p now uses tail call elimination.
124 *** Escaped characters in strings are now read and write'd correctly.
125 *** The repl now expands macros again.
126 * Changes in 0.12 since 0.11
128 *** Mes can now run Nyacc (0.80.42) to compile itself in ~4min (~3000 LOC).
129 *** Mes now recursively expands global variables per top level statement.
130 *** Mes now recursively expands macros per top level statement.
131 *** Mes now boots from MES_BOOT (default: module/mes/boot-0.scm).
132 *** Mes now has a full Scheme reader in C again.
133 This gives a 10x-20x performance improvement and increases the
134 bootstrap footprint by 160 LOC.
135 *** Mes reader now supports older abbreviated character forms
136 #\bel, #\bs, #\ht and #\vt.
138 equal2?, memq, core:write.
140 *** Mes now has an incremental Scheme semantics test suite with 71 small tests.
141 *** Variable names can now have ticks.
142 *** Mes now evaluates expresions of COND only once.
143 *** srfi-9 records have been reimplemented.
144 *** #\page is now whitespace.
145 *** #<eof> is no longer a character.
147 define-macro*, with-fluids.
149 dirname, last, reverse-list->string, setenv, string-drop-right,
150 string-fold, string-fold-right, string-null?, write.
153 chmod, getopt_long, ferror, itoab, longjmp, qsort, setenv, setjmp, strtol.
154 **** 2 new header files
155 endian.h, sys/signal.h.
157 * Changes in 0.11 since 0.10
159 *** MesCC now compiles a mes-tcc that fails 41/69 of mescc's C tests.
160 *** MesCC's libc can now be compiled with tcc (syscall support: write).
161 *** MesCC now compiles a less-patched tcc: -214/+458 lines [WAS: -333/+747].
162 *** MesCC now supports empty for.
163 *** MesCC has been greatly refactored, 500/3000 lines have been removed.
164 *** MesCC now supports complex [struct] by value assign foo.bar, foo->bar, foo[bar].
165 *** MesCC now depends on Nyacc 0.82.4.
166 * Changes in 0.10 since 0.9
170 *** Mes now includes M1 sources for full source bootstrapping up to tcc.
172 *** Mescc now depends on Nyacc 0.81.0.
173 *** Mescc now compiles a mes-tcc that compiles a trivial C to a running a.out.
174 *** Mescc now supports several (as used my tinycc) struct by value assignments.
175 *** Mescc now has _start in a separate crt1.c.
176 *** Mescc now supports initializer arithmetic.
177 *** Mescc now supports arrays of struct of arbitrary size.
178 *** Mescc now supports pointer arithmetic.
179 *** Mescc now defines __i386__, __linux__.
180 *** Mescc now supports --*p, ++*p.
181 *** Mescc now supports int foo[bar] = {baz,...}.
182 *** Mescc now supports \x00 in strings in M1.
183 *** Mescc now supports complex enum expressions. Thanks, rain1!
184 *** Mescc now supports short.
185 *** Mescc now supports foo.bar = foo.baz = bla.
186 *** Mescc now supports foo = bar < baz and comparison permutations.
187 *** Mescc now supports (anonymous) structs in unions.
188 *** Mescc now writes M1 strings if possible.
189 **** 2 improved mlibc functions
191 **** 13 new mlibc functions
192 fclose, fgetc, fprintf, fwrite, memcpy, memmove, memset, snprintf, strcat,
193 strchr, strrchr, strtoull, vnsprintf.
194 **** 15 new tinycc-support tests
195 76-pointer-arithmetic.c, 77-pointer-assign.c, 78-union-struct.c,
196 79-int-array.c, 7a-struct-char-array.c, 7b-struct-int-array.c,
197 7c-dynarray.c, 7d-cast-char.c, 7e-struct-array-access.c,
198 7f-struct-pointer-arithmetic.c, 7g-struct-byte-word-field.c,
199 7h-struct-assign.c, 7i-struct-struct.c, 7j-strtoull.c,
201 ** Noteworthy bug fixes
202 *** Mescc has many fixes for foo.bar[baz], foo[bar].baz with ./-> permutations.
203 *** Many bugs and limitations in mescc have been fixed and removed.
204 * Changes in 0.9 since 0.8
206 *** Mes now builds better in non-Guix[SD] legacy distros/environments. Thanks, rain1!
208 *** Mescc now compiles a modified tinycc into a running [mostly segfaulting] mes-tcc.
209 https://gitlab.com/janneke/tinycc branch wip-mescc.
210 *** Mescc now supports locals stack frame larger than 1 byte offset.
211 *** Mescc now supports incomplete struct initializers {0}.
212 *** Mescc now supports >>=, <<=, ^=, ~.
213 *** Mescc now supports the comma operator.
214 *** Mescc now supports mullti-line string initializers.
215 *** Mescc now supports unions.
216 *** Mescc now supports arrays in structs.
217 *** Mescc now supports structs in structs.
218 *** Mescc now builds and runs with Guile-2.0 (legacy distro support, Guile-2.2 recommended).
219 *** Mescc has been refactored to use records.
220 *** Mescc now bundles tinycc's test2 test suite, passes one more test [34/55 pass].
221 *** Mescc now has an incremental test suite consisting of 56 tests.
222 *** Mescc now supports stdarg variable argument lists.
223 *** Mescc now has __GNUC__ unset, #f (WAS: 0).
224 *** Mescc now depends on Nyacc 0.80.3.
225 *** Mescc now depends on M1 from [[https://github.com/oriansj/mescc-tools][mescc-tools]] v0.2.
226 *** Mescc now compiles to M1 object files.
227 **** 7 new mlibc functions
228 calloc, close, getcwd, lseek, sprintf, unlink, vprintf.
229 **** 31 new mlibc stubs
230 execvp, fclose, fdopen, fflush, fopen, fprintf, fread, free, fseek,
231 ftell, fwrite, localtime, longjmp, memcpy, memmove, memmove, memset,
232 qsort, remove, setjump, snprintf, sscanf, strchr, strrchr, strstr,
233 strtol, strtoll, strtoul, strtoull, time, vnsprintf.
234 **** 10 new header files
235 alloca.h, float.h, libgen.h, locale.h, stdbool.h, stddef.h, stdint.h,
236 stdnoreturn.h, sys/select.h, sys/wait.h.
237 ** Noteworthy bug fixes
238 *** Many bugs and limitations in mescc have been fixed and removed.
239 * Changes in 0.8 since 0.7
241 *** Mescc now has experimental annotation support for hex2.
242 *** Mescc now depends on the hex2 linker from [[https://github.com/oriansj/mescc-tools][mescc-tools]].
243 Direct ELF output support has been removed.
244 ELF symbol and string table creation has been removed.
245 *** Mescc has been simplified by leveraging use labels in hex2 output.
246 *** Mescc now supports continue in loops.
247 *** Mescc now compiles to hex2 object files.
251 * Changes in 0.7 since 0.6
253 *** The minimal C reader is now always included; dependencies
254 on i686-unknown-linux-gnu-gcc and binary read-0-32.mo have been
255 dropped, these are now optional.
257 *** Mes reader now supports octal numbers #oXXX.
259 current-output-port, getopt-long, negate, open-output-file,
260 option-ref, set-current-output-port, string-rindex, string-suffix?,
261 with-ouwith-output-to-file, with-output-to-port.
263 *** Mescc can now be installed and used alongside a gcc installation.
264 *** Mescc can now handle const anywhere.
265 *** Mescc now supports array fields in structs.
266 *** Mescc now supports forward declarations and typedef.
267 *** Mescc can now handle comments anywhere.
268 *** Mescc now supports addition and substraction for enum field values.
269 *** Mescc now supports anonymous enums.
270 *** Mescc now supports all C99 header files needed to compile tcc.c.
271 *** build: C sources are now preprocessed separately, then compiled and linked.
272 *** build: mlibc and C sources are now compiled separately and then linked.
273 *** mlibc has been moved from Scheme snippets into C.
274 *** Mescc now supports -c, -D, -E, -I and -o options.
275 **** open now supports optional third mode parameter.
276 ** Noteworthy bug fixes
277 *** string-index now supports function predicate.
278 *** number->string for radix > 10 now produces `a' instead of `:'.
279 * Changes in 0.6 since 0.5
281 *** configure, build now supports x86 and development for arm with-courage.
283 *** Nyacc has been unbundled and is now a dependency.
284 *** Mes now supports case-lambda.
285 *** Mes reader now supports abbreviated form for return character #\cr.
289 *** Mescc can be used on regular C sources, like tinycc's tests/test2 suite.
290 *** make check passes 33/55 of tinycc's test suite etest/test2 tests.
291 *** Mescc now recognizes `short' as a type.
292 *** Mescc now supports sizeof (<identifier>), sizeof(<expression>).
293 *** Mescc now respects enum field initializers and supports enum variables.
294 *** Mescc now supports binary constants .
295 *** Mescc now supports assignments from ==, != boolean expressions .
296 *** Mescc now supports &, ^.
297 *** Mescc now supports struct pointers.
298 *** Mescc now supports struct definition with immediatete variable declaration.
299 *** Mescc now supports calling (returning correctly from) void functions.
300 *** Mescc now handles case statements breaks without compound correctly.
301 *** Mescc now has better [int/pointer] array support.
302 *** Mescc now has better support for simple (non-array-)structs.
303 *** Mescc now supports multiple declarations in one statement like: int a,b;
304 **** 2 new mlibc functions
306 ** Noteworthy bug fixes
307 *** Installed mes and mes.repl now also run outside of source tree again.
308 * Changes in 0.5 since 0.4
310 *** Support compilation with Mescc.
311 *** Support compilation with -nostdinc, -nostdlib using mlibc.
312 *** Support call-with-current-continuation.
313 *** Support exception handling, catch/throw.
314 *** Give sensible error message when a macro is missing.
316 *** Map now supports 4 lists.
317 *** The reader supports negative hex numbers.
319 access?, assoc-set! c????r, compose, list->char-set,
320 open-input-string, read-string, string-delete, with-throw-handler.
322 *** Mescc can be used separately as a Nyacc-based C compiler backend for Guile.
323 *** Switch to Nyacc frontend, update Nyacc to 0.76.5.
324 *** Mescc now has a test suite, scaffold/t.c.
325 *** Mescc now includes a minimal C library libc/mlib.c libc/mstart.c.
326 *** Mescc can now compile mes.c.
327 ** Noteworthy bug fixes
328 *** The build system (configure, make) has been refactored.
330 *** Evaluate arguments of OR only once.
332 *** Fix ,expand in the REPL.
334 * Changes in 0.4 since 0.3
336 *** Improved performance.
337 Macros are now memoized; after expansion and before eval'ing the
338 expanded form, their input s-expression is replaced by the expansion.
339 This yields a nice performance improvement which finally allowed
340 moving all non-essential bits from the C-core into Scheme...including
341 the reader. The Scheme reader is much, much slower than the previous
342 C version, making Mes--again-- feel slow. Think of that as a feature.
343 *** Bootstrap with minimal reader in C.
344 The C-reader needs only support reading of words and lists
345 (s-expressions), line-comments to read the initial [[file:module/mes/read-0.mes][Scheme reader]] which
346 then takes over and handles reading of quoting, characters, strings,
349 Total C size: ~1500LOC. The main Mes evaluator is now ~1000LOC
350 including cell creation and garbage collector. This code is able to
351 execute a Scheme program that has been loaded into memory. Another
352 ~500LOC is spent to load a minimal Scheme program and to dump it, to
353 provide a small posix interface, math functions and do some error
355 *** Programs can be dumped and loaded using --dump and --load.
357 *** Minimal syntactic exception support for Nyacc.
358 *** Minimal syntactic fluids support for Nyacc.
359 *** Keywords are now supported.
360 *** Cond now supports =>.
361 *** Guile's optargs: lambda* and define* are now supported.
362 *** #;-comments are now supported.
363 *** Non-nested #| |#-comments are now supported.
364 *** Quasisyntax is now supported.
365 *** R7RS syntax-rules with custom ellipsis, with-ellipsis are now supported.
366 *** 9 new [partial] modules
367 (mes fluids), (mes nyacc), (mes optargs), (mes pmatch), (mes peg),
368 (srfi srfi-13), (srfi srfi-9-psyntax), (srfi srfi-26), (srfi srfi-43),
369 (rnrs arithmetic bitwise), (sxml xpath)
371 1+, 1-, abs, and=>, append-reverse, ash, char<=?, char<?, char>=?,
372 char>?, even?, filter, delete, delq, vector-copy, fold, fold-right,
373 getenv, iota, keyword->symbol list-head, list-tail, negative?, odd?,
374 positive?, remove!, remove, string->number, string-copy,
375 string-prefix?, string=, string=?, symbol->keyword symbol-append,
376 symbol-prefix?, unless, write, zero?.
377 ** Noteworthy bug fixes
378 *** Macros are now memoized.
379 *** An error is reported when using a wrong number of arguments with a call.
380 *** Cond now evaluates its test clauses only once.
381 *** Append can also handle one argument.
382 *** For-each now supports 2 list arguments.
383 *** Map now supports 3 list arguments.
384 *** Backslash in string is supported.
385 *** Closure is not a pair.
386 *** All standard characters are supported.
387 *** Mescc now also runs in Guile.
388 * Changes in 0.3 since 0.2
390 *** Number-based rather than pointer-based cells.
391 *** Garbage collector aka Jam scraper.
392 A variant on SICP's stop and copy Garbage Colletor (Jam Scraper?)
393 algorithm has been implemented.
394 *** The reader has been moved to Scheme.
396 *** Simple loadable modules.
397 *** Srfi-9 and match use handwritten syntax-rules (mes-use-module (mes syntax)).
398 *** Optional syntax-case using psyntax (mes-use-module (mes psyntax)).
399 ** Noteworthy bug fixes
400 *** Srfi-0 has been fixed.
401 * Changes in 0.2 since 0.1
403 *** Names of symbols and strings are list of characters [WAS: c-string].
404 *** Sc-expand from pre-R6RS's psyntax has been integrated.
405 *** Undefined variable error now shows the name of the undefined variable.
406 *** There is now only one SCM type for builtin functions.
407 *** Macro expansion has been cleaned-up.
409 *** Mes now provides a subset of R6RS.
410 *** Mes now provides syntax-case.
411 *** Mes now provides `load'.
412 ** Noteworthy bug fixes
413 *** Using values as second parameter of builtin function yields first value.
414 *** Quoted internals (e.g. 'if 'lambda) are now symbols.
415 *** Syntax error now exits.
416 *** Make+Bash voodoo has been replaced by build-aux/mes-snarf.scm.
417 *** Apply now accepts multiple list arguments.
418 *** Apply of character, inernal, number, string is an error.
419 *** Quasisyntax reading
421 * Changes in 0.1 (since progress report #2)
423 *** expand_macro is now a separate function.
424 *** A smaller core can now compiled using BOOT=1.
425 The smaller core does not provide define, define-macro, or quasiquote;
426 these are provided from a Scheme version of implemented eval/apply.
428 *** Mes now provides a subset of R5RS.
429 *** Mes now provides let-syntax.
430 *** Mes now provides match.
431 *** Mes now provides quasisyntax, unsyntax and unsyntax-splicing.
433 *** Mes now provides a REPL, run:
435 *** Mes compiler can be run as a script:
436 scripts/mescc.mes doc/examples/main.c
437 *** Macro expansion can be inspected in the REPL, e.g.:
439 ** Noteworthy bug fixes
440 *** Performance: scripts/mescc.mes now takes 2s to compile main.c (was 1'20").
441 *** Symbols are now truly unique.
442 * '(), #t, #f are no longer symbols.