72e371d77f
* include/mes/mes.h (g_datadir, g_debug, g_buf, g_continuations, g_symbols, g_symbol_max, g_mini, R0, R1, R2, R3, M0, g_macros, g_ports, ARENA_SIZE, MAX_ARENA_SIZE, STACK_SIZE, JAM_SIZE, GC_SAFETY, MAX_STRING, g_arena, cell_arena, cell_zero, g_free, g_symbol, g_stack_array, g_cells, g_news, g_stack, gc_count, gc_start_time, gc_end_time, gc_time, __execl_c_argv, __open_boot_buf, __open_boot_file_name, __setenv_buf, __reader_read_char_buf, g_start_time, __gettimeofday_time, __get_internal_run_time_ts): Declare extern. * include/mes/symbols.h ( cell_nil, cell_f, cell_t, cell_dot, cell_arrow, cell_undefined, cell_unspecified, cell_closure, cell_circular, cell_vm_apply, cell_vm_apply2, cell_vm_begin, cell_vm_begin_eval, cell_vm_begin_expand, cell_vm_begin_expand_eval, cell_vm_begin_expand_macro, cell_vm_begin_expand_primitive_load, cell_vm_begin_primitive_load, cell_vm_begin_read_input_file, cell_vm_call_with_current_continuation2, cell_vm_call_with_values2, cell_vm_eval, cell_vm_eval2, cell_vm_eval_check_func, cell_vm_eval_define, cell_vm_eval_macro_expand_eval, cell_vm_eval_macro_expand_expand, cell_vm_eval_pmatch_car, cell_vm_eval_pmatch_cdr, cell_vm_eval_set_x, cell_vm_evlis, cell_vm_evlis2, cell_vm_evlis3, cell_vm_if, cell_vm_if_expr, cell_vm_macro_expand, cell_vm_macro_expand_car, cell_vm_macro_expand_cdr, cell_vm_macro_expand_define, cell_vm_macro_expand_define_macro, cell_vm_macro_expand_lambda, cell_vm_macro_expand_set_x, cell_vm_return, cell_symbol_lambda, cell_symbol_begin, cell_symbol_if, cell_symbol_quote, cell_symbol_define, cell_symbol_define_macro, cell_symbol_quasiquote, cell_symbol_unquote, cell_symbol_unquote_splicing, cell_symbol_syntax, cell_symbol_quasisyntax, cell_symbol_unsyntax, cell_symbol_unsyntax_splicing, cell_symbol_set_x, cell_symbol_sc_expand, cell_symbol_macro_expand, cell_symbol_portable_macro_expand, cell_symbol_sc_expander_alist, cell_symbol_call_with_values, cell_symbol_call_with_current_continuation, cell_symbol_boot_module, cell_symbol_current_module, cell_symbol_primitive_load, cell_symbol_car, cell_symbol_cdr, cell_symbol_not_a_number, cell_symbol_not_a_pair, cell_symbol_system_error, cell_symbol_throw, cell_symbol_unbound_variable, cell_symbol_wrong_number_of_args, cell_symbol_wrong_type_arg, cell_symbol_buckets, cell_symbol_builtin, cell_symbol_frame, cell_symbol_hashq_table, cell_symbol_module, cell_symbol_procedure, cell_symbol_record_type, cell_symbol_size, cell_symbol_stack, cell_symbol_argv, cell_symbol_mes_datadir, cell_symbol_mes_version, cell_symbol_internal_time_units_per_second, cell_symbol_compiler, cell_symbol_arch, cell_symbol_pmatch_car, cell_symbol_pmatch_cdr, cell_type_bytes, cell_type_char, cell_type_closure, cell_type_continuation, cell_type_function, cell_type_keyword, cell_type_macro, cell_type_number, cell_type_pair, cell_type_port, cell_type_ref, cell_type_special, cell_type_string, cell_type_struct, cell_type_symbol, cell_type_values, cell_type_variable, cell_type_vector, cell_type_broken_heart, cell_symbol_program, cell_symbol_test): Likewise. * src/globals.c: New file. * build-aux/configure-lib.sh (mes_SOURCES): Add it. |
||
---|---|---|
build-aux | ||
doc | ||
guix/git | ||
include | ||
lib | ||
mes/module | ||
module | ||
scaffold | ||
scripts | ||
src | ||
tests | ||
.dir-locals.el | ||
.gitignore | ||
AUTHORS | ||
BLURB | ||
BOOTSTRAP | ||
ChangeLog | ||
configure | ||
configure.sh | ||
COPYING | ||
guix.scm | ||
HACKING | ||
INSTALL | ||
kaem.run | ||
NEWS | ||
PORTING | ||
README | ||
ROADMAP | ||
simple.make | ||
simple.sh |
#+COMMENT: -*- org -*- #+TITLE: About GNU Mes #+SUBTITLE: Maxwell Equations of Software [[https://www.gnu.org/software/mes][GNU Mes]] is a Scheme interpreter and C compiler for bootstrapping the GNU System. Since version 0.22 it has again helped to halve the size of opaque, uninspectable binary seeds that are currently being used in the [[https://guix.gnu.org/blog/2019/guix-reduces-bootstrap-seed-by-50/][Reduced Binary Seed bootstrap]] of [[https://www.gnu.org/software/guix][GNU Guix]]. The final goal is to help create a full source bootstrap as part of the [[http://bootstrappable.org][bootstrappable builds]] effort for UNIX-like operating systems. The Scheme interpreter is written in ~5,000 LOC of simple C, and the C compiler written in Scheme and these are mutual self-hosting. This mes.c is now being simplified to be transpiled by [[https://github.com/oriansj/m2-planet][M2-Planet]]. Mes has a Garbage Collector, a library of loadable Scheme modules-- notably Dominique Boucher's [[https://github.com/schemeway/lalr-scm][LALR]], Pre-R6RS [[https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html][portable syntax-case]] with R7RS ellipsis, Matt Wette's [[https://www.nongnu.org/nyacc][Nyacc]] --and test suite, just enough to support a REPL and a C99 compiler: mescc. Mes + MesCC + Mes C Library can build a [[https://gitlab.com/janneke/tinycc][bootstrappable 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-2.95.3. This is enough to bootstrap Guix for i686-linux, x86_64-linux, armhf-linux and aarch64-linux. Mes is inspired by The Maxwell Equations of Software: [[http://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf][LISP-1.5]] -- John McCarthy page 13, GNU Guix's source/binary packaging transparency and Jeremiah Orians's [[https://github.com/oriansj/stage0][stage0]] ~500 byte self-hosting hex assembler. We are very grateful to NLNet for sponsoring the [[https://nlnet.nl/project/GNUMes][Reduced Binary Seed bootstrap]] and the [[https://nlnet.nl/project/GNUMes-arm][ARM port]]. GNU Mes is free software, it is distributed under the terms of the GNU General Public Licence version 3 or later. See the file [[file:COPYING][COPYING]]. * Get it #+BEGIN_SRC bash git clone git://git.savannah.gnu.org/mes.git #+END_SRC * Build it (see [[file:INSTALL][INSTALL]] for full instructions) #+BEGIN_SRC bash ./configure make all make check #+END_SRC * REPL it #+BEGIN_SRC bash ./pre-inst-env mes #+END_SRC * MesCC compiler #+BEGIN_SRC bash ./pre-inst-env mescc -c scaffold/main.c #+END_SRC * Bugs Please send Mes bug reports to [[mailto:bug-mes@gnu.org][bug-mes@gnu.org]]. * Links [0] https://www.gnu.org/software/mes [1] https://guix.gnu.org/blog/2020/guix-further-reduces-bootstrap-seed-to-25 [2] https://www.gnu.org/software/guix [3] https://bootstrappable.org [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://gitlab.com/janneke/tinycc [9] [[http://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf]] [10] https://github.com/oriansj/stage0 [11] https://nlnet.nl/project/GNUMes [12] https://nlnet.nl/project/GNUMes-arm * Legalese Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <[[mailto:janneke@gnu.org][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.