Languages as text, parsed and run, written from scratch for teaching: one library per language, each interface with its grammar, a worked example and its references. None of them knows the Elm Playground: what a program can touch outside itself is a host, a record of functions its caller gives (a sheet's cells, a page's elements). They stand on tiny_libs.
Each is a library of its own, named tiny_languages.<name> outside this repository, for example in a dune file:
(executable (name main) (libraries tiny_languages.scheme tiny_languages.lang_html))
The libraries are unwrapped: their modules are used by their own names, Scheme_eval, Html_tree.
tiny_languages.formula: arithmetic over numbers and cells, SUM and its kin over ranges; recursive descent, the parser to know first.
tiny_languages.basic: Tiny BASIC, Integer BASIC and Applesoft; a program run as a Talk conversation.
s-expressions, the syntax they share (tiny_languages.sexpr), a small Emacs Lisp (tiny_languages.lisp), a small Scheme and HtDP's Beginning Student, run by a CESK machine, with its stepper (tiny_languages.scheme):
Sexpr Sexpr_read Lisp Lisp_read Lisp_eval Lisp_prelude Scheme Scheme_image Scheme_syntax Scheme_prims Scheme_prelude Scheme_eval Scheme_step tiny_languages.pascal: compiled in one pass to P-code and run on a P-machine, with its debugger.
tiny_languages.hypertalk: HyperCard's language, the cards the host's.
tiny_languages.smalltalk: from the Blue Book, compiled to its bytecodes and run by its interpreter over an object table, its kernel classes in Smalltalk bootstrapped from their text.
St_lexer St_ast St_parse St_chunk St_memory St_class St_bytecode St_compile St_interp St_primitives St_kernel St_boot St_debug St_image St_bitblt tiny_languages.scratch: the blocks as one table of specs, their text, a project run as green threads.
tiny_languages.postscript: a page described as a program; the letters are the host's.
A small JavaScript (tiny_languages.javascript), HTML read (tiny_languages.lang_html), what a page's elements look like, the cascade and computed styles (tiny_languages.lang_css):
Js_lexer Js_ast Js_parse Js_value Js_eval Js_builtins Js_regexp Charset Entities Html_lexer Dom Dtd Html_tree Line_mode Forms Looks Css_syntax Selectors Css Css_values Cascade Computed Ua_sheet tiny_languages.lang_json (over JavaScript's lexer) and tiny_languages.lang_jsonnet, for configuration files:
OCaml (tiny_languages.lang_ocaml), C (tiny_languages.lang_c) and assembly (tiny_languages.lang_asm), read for a code visualizer, their tokens coloured by Highlight_code's categories: