Skip to content
Git snapshot of the official mercurial repo containing further work (http://piumarta.com/hg/maru/ cloned at 2013-11-12).
Common Lisp C GAP Makefile Lex
Latest commit 9ce183f Jan 17, 2016 @attila-lendvai Create README.md
Failed to load latest commit information.
bootstrap/c Fix most targets in the Makefile, using stage-1 when needed. Jan 29, 2014
doc add new bugs and reformat old ones Aug 13, 2012
net add TCP example Sep 10, 2012
old initial import Oct 30, 2010
.gitignore Added .gitignore Jan 27, 2014
.hgtags Added tag parse-ok for changeset 5af3db5d091e Dec 17, 2010
Makefile Fix most targets in the Makefile, using stage-1 when needed. Jan 29, 2014
README.examples pass args as options to eval Jul 3, 2012
README.md Create README.md Jan 17, 2016
TODO do not generate main if no main function defined Oct 25, 2012
ansiterm.l fix BOLD-OFF Jul 19, 2012
asm-common.k initial import Oct 28, 2011
asm-x86.k move emitter arg from last to first; add PUSHLil to force 32-bit operand Jul 27, 2012
assembler.k initial version Aug 13, 2012
boot.l fix string-begins-with not to address out of bounds Mar 6, 2014
buffer.k rename buffer.l -> buffer.k Jul 27, 2012
compile-dc.l Fix most targets in the Makefile, using stage-1 when needed. Jan 29, 2014
compile-grammar.l simplify to use parse-file Feb 1, 2012
compile-irgol.l copied irl -> irgol Sep 5, 2012
compile-irl.l add irl compiler scaffold Aug 13, 2012
compile-osdefs.l add osdefs DSL Sep 10, 2012
compile-peg.l match-string on a single object produces a string not a character Aug 13, 2012
compile-recursion2.l add recursion example Apr 27, 2012
compile-tpeg.l Fix most targets in the Makefile, using stage-1 when needed. Jan 29, 2014
compile.l begin compile-set Nov 18, 2010
data-stream.k cosmetic Apr 27, 2012
define-class.l initial import Oct 29, 2011
define-data.k add explicitly-sized integer types Aug 26, 2013
dlopen.k first arg of dlsym is "p" not "i" Sep 11, 2012
dsm-x86.k remove assumptions about underlying buffer; client supplies getD[14] Oct 28, 2011
emit.l initial commit of eval2, IR2, and maru-in-maru compiler Oct 22, 2012
eval.l fix various let -> let*; Aug 20, 2012
fonts.k add SDL example Aug 26, 2013
gc.l move gc.l to eval.l and begin evaluator Dec 16, 2010
gen-asm-x86.k fix argument order in conditional jumps Oct 28, 2011
gl-texbuf.k use int-at instead of long-at to access pixels Sep 11, 2012
ir-gen-c.k mangle label names Mar 29, 2013
ir-gen-x86.k mangle label names Mar 29, 2013
ir.k final changes before rewrite Oct 22, 2012
ir2.k print source position for errors Apr 4, 2013
irgol.g ir-call takes two arguments, second of which is list of call args Sep 20, 2012
irl.g final changes Oct 22, 2012
libgezira.k use dlextern instead of dlopen+subr Sep 6, 2012
libgl.k glViewport takes for int args, not two Sep 11, 2012
libglfw.k use dlextern instead of dlopen+subr Sep 6, 2012
libglu.k use dlextern instead of dlopen+subr Sep 6, 2012
libnile.k nile_Process_pipe is varargs Sep 11, 2012
libsdl2.k add SDL example Aug 26, 2013
libsdl2.osdefs add SDL example Aug 26, 2013
libsdl2.osdefs.k add SDL example Aug 26, 2013
main.c cosmetic Sep 17, 2011
maru-check.k test FP negation Mar 8, 2013
maru-gc.k add missing casts Oct 25, 2012
maru-label.k add label example Mar 29, 2013
maru-test.k add missing casts Oct 25, 2012
maru.k print source position for errors Apr 4, 2013
matrix.k add support files for gezira demos Sep 5, 2012
model.l move generic/multimethod from model to boot Nov 10, 2010
nfibs.c take arguments from the command line Dec 4, 2012
osdefs.g add osdefs DSL Sep 10, 2012
osdefs.system add osdefs DSL Sep 10, 2012
parser.l provide parser-context method in <parser> Sep 10, 2012
peg-boot.l expect definition to place list of arguments at end of rule spec Aug 13, 2012
peg-compile.l parser provides source ranges within actions Jun 13, 2012
peg-compiler.l peg can match structures and literal symbols Feb 17, 2011
peg.g support negative integer constants Sep 10, 2012
peg.l support negative integer constants Sep 10, 2012
port.l add long->string and double->string Mar 8, 2013
pretty-print.l remove refs to <variable>, <context> and <env> Oct 22, 2012
print-structure.l use let* where required Apr 3, 2012
random.k fix for 64 bits, breaking 32 bits very slightly Sep 11, 2012
record-case.l rename record -> get-record Aug 13, 2012
repl.l recursive load comes back to the peg-based REPL Sep 10, 2012
save.k new files Aug 26, 2012
scope.k add scope.k Jul 27, 2012
snowflake.k add gezira snow demo Sep 5, 2012
test-call.k move x param to first; rename call->native-call; rename loop->loop1 Jul 27, 2012
test-dc.g desk calculator example Feb 13, 2012
test-earley.k add right-recursive example Oct 21, 2011
test-elf.l move emitter arg to first Jul 27, 2012
test-emit.l remove stale test code Feb 27, 2011
test-gezira-snow.k reintroduce sync; increase threads to 2 Sep 6, 2012
test-gezira.k use texbuf stride to init gezira image stride Sep 11, 2012
test-gl-5.k use dlextern instead of dlopen+subr Sep 6, 2012
test-gl-texbuf.k use dlextern instead of dlopen+subr Sep 6, 2012
test-ir.k final changes Oct 22, 2012
test-mach-o.l move emitter arg to first; predefine labels before assembling Jul 27, 2012
test-main.k new files Aug 26, 2012
test-message.l add more syntax Mar 3, 2011
test-peg.l add missing path argument to input-stream Oct 28, 2011
test-pegen.k define function *main* to run tests Aug 26, 2012
test-pepsi.l remove noise Oct 27, 2011
test-recursion.l use peg-enable-recursion Apr 27, 2012
test-recursion2.g add recursion example Apr 27, 2012
test-recursion2.txt add recursion example Apr 27, 2012
test-repl.l parser provides source ranges within actions Jun 13, 2012
test.dc desk calculator example Feb 13, 2012
test.irgol copied irl -> irgol Sep 5, 2012
test.irl fix intentional error Aug 13, 2012
test.l announce the file when run Nov 20, 2011
text-parser.l memoise on rule selector, not name, to avoid memoisation of for-effec… Nov 14, 2012
tpeg.g add text-only parser grammar Aug 13, 2012
trie.k add trie.k Jul 27, 2012

README.md

What

This is a small language called Maru, written by Ian Piumarta (http://piumarta.com/software/maru/).

This repository is a clone of his work (the hg repo http://piumarta.com/hg/maru/ cloned at 2013-11-12) and an attempt to make it more approachable for the uninitiated.

Maru is a proof of concept of a rather small, yet fully bootstrapped language.

Why

Ian stopped working on this project and I wanted to keep it alive, and also wanted to understand it better myself.

Who

attila@lendvai.name

Status

I have isolated the C bootstrap code, clarified how it is built, and wrote another bootstrap interpreter in Common Lisp that is about 90% functional... but I ran out of steam when I got stuck at a bug, and stopped working on this project.

Chances are low that I will jump on it again, because the code is more of an experiment than something crystallized, and I couldn't get any feedback from anyone when I was lost. Decyphering it all is too much effort for an unclear amount of gain, so I put this on hold.

The branches:

  • official holds Ian's work
  • master holds a general cleanup of official
  • lisp-bootstrap holds my work on a bootstrap interpreter based off of Common Lisp

How

There's a bootstrap eval written in C (and now in Common Lisp) for a Lisp like language (Maru). Let's call the executable it produces stage 1. Then there's a compiler written in Maru that can emit x86 asm code. To produce stage 2 this compiler is interpreted using stage 1 to compile a Maru eval written in Maru. The executable gained from the generated and compiled asm code is stage 2. Afterwards this executable is used to again generate the asm output (stage 3) and make sure that it's the same as when it was generated with the stage 1 (bootstrap) eval.

Something went wrong with that request. Please try again.