miriam is:
- a hobby project; likely indefinitely undone
- a kinda scheme, kinda clojure, kinda common lisp
- a self-hosted bytecode compiler, runtime, and armv7 assembler
- a bare-metal, language-based operating system
- a userland that can be used to make one-off games and demos
miriam
is in no way ready for others to play with, but ./devlog.org will help get you up to speed.
$ guile --r7rs -L ./scm ./tests/assembler-tests.scm $ qemu-system-arm -machine raspi2b -device loader,file=a.bin,addr=0x20 -Ss # in another term, connect gdb and single-step through $ arm-none-eabi-gdb > layout asm > layout reg > target remote localhost:1234 > si ; to single step (code starts at 0x20)
- [-] an ARMv7 assembler (r7rs, run on host)
- [ ] a bytecode vm and garbage collector, written in our assembler
- which can be booted on an rpi, or devterm, or rg35xx, or something
- multiprocessor?
- the vm should be able to run independently on all cores
- study more in-depth BEAM
- [ ] a compiler for scheme to our bytecode vm
- “scheme” - this doesn’t actually have to be a scheme
- if it’s not 100%, it means writing a bunch of library code
- but rewriting srfis is probably good for my personal growth
- [ ] a rewrite of the assembler and compiler to run on the bytecode compiler
- self-hosting is necessary for full user-space support, because we need to support
eval
- self-hosting is necessary for full user-space support, because we need to support
- [ ] a multi-core capable operating system, written in scheme
- virtual memory and user-mode
- preemptive thread scheduler; thread and ipc io via async channels
- a network stack, PHY+MAC should come from the hardware
- kernel interface via lexical closures and capability passing
- [ ] a minimal user-space!
- a text adventure game (zork)
- a graphical shell for the os
- a tetris game
- a web browser? gopher maybe?
I have read prose, read code, and re-read prose from all over, and the following people and projects stand out. They have all have my deepest and most sincere gratitude for writing, building, thinking and working in the open, where I could learn from them.
As such, a reading list, in no particular order:
- sassy, an x86 assembler written in scheme; by Jonathan Kraut
- loko scheme, an optimizing scheme compiler with a bare-metal output; by G. Weinholt
- the larceny project, a “simple and efficient” implementation of Scheme
- spritely goblins, a really cool distributed objects system, pushing capabilities
- Let over Lambda, by Doug Hoyte
- the blog of Peter Bex, a core developer on chicken scheme
- their articles on chicken internals are great:
- more-magic.net: garbage collection
- more-magic.net: data representation
- The Reasoned Schemer, by Daniel Friedman, et. al
- the archive of H. Baker, an ACM distinguised scientist and co-founder of Symbolics;
- Jonathan A. Rees: A Security Kernel Based on the Lambda Calculus
- disasm-web, by CzBiX, a really useful, very simple web-based arm disassembler
- oaksim, by Wunkolo, a web-based arm assembler+simulator
Copyright (c) 2023 Jonathan Raphaelson
This program 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.
See ./LICENSE
Third party code is identified here, and with a copyright line in the file itself.
See ./COPYRIGHT
/scm/miriam/langs/minimeta.scm
based on the
mini-meta
macro from sassy/opcodes.scm, which is in turn an implementation of the idea from H. Baker’s article, Pragmatic Parsing in Common Lisp.