diff options
Diffstat (limited to 'index.html')
-rw-r--r-- | index.html | 205 |
1 files changed, 131 insertions, 74 deletions
diff --git a/index.html b/index.html index 7476757b..9a1fa2b6 100644 --- a/index.html +++ b/index.html @@ -1,81 +1,138 @@ <title>Mu</title> -<h3>Mu - A whitebox software stack</h3> -<em>or</em> -<h3>Building software without gradually slowing down</h3> -<em>or</em> -<h3>Writing programs to be understandable in an afternoon</h3> - +With apologies to <a href='http://en.wikipedia.org/wiki/Mu_%28negative%29#In_popular_culture'>Robert Pirsig</a>: <p> -<a href='http://akkartik.name/about'>The problem</a><br/> - +<div style='font-style: italic; margin-left:2em'> +Is it a language, or an operating system, or a virtual machine? <p> -<a href='http://github.com/akkartik/mu#readme'>Overview of the solution</a>. -The zen of mu: -<ul> -<li>traces, not interfaces</li> -<li>be rewrite-friendly, not backwards-compatible</li> -<li>be easy to port rather than portable</li> -<li>global structure matters more than local hygiene</li> -</ul> +Mu. +</div> <p> -I've tried to make this codebase beneficial to skim. Try skimming the files in -order, and <a href='mailto:mu@akkartik.com'>tell me how I did</a>! +Mu's code is structured in an unconventional manner, requiring editors to be +specially configured to colorize it in a sane manner. Here's how it currently +looks in my <a href='https://github.com/akkartik/mu/blob/master/mu.vim'>custom setup</a>. -<p> -<a href='html/000organization.cc.html'>000organization.cc</a><br/> -<a href='html/001help.cc.html'>001help.cc</a><br/> -<a href='html/002test.cc.html'>002test.cc</a><br/> -<a href='html/003trace.cc.html'>003trace.cc</a><br/> -<a href='html/003trace.test.cc.html'>003trace.test.cc</a><br/> -<a href='html/010vm.cc.html'>010vm.cc</a><br/> -<a href='html/011load.cc.html'>011load.cc</a><br/> -<a href='html/012transform.cc.html'>012transform.cc</a><br/> -<a href='html/013literal_string.cc.html'>013literal_string.cc</a><br/> -<a href='html/014literal_noninteger.cc.html'>014literal_noninteger.cc</a><br/> -<a href='html/020run.cc.html'>020run.cc</a><br/> -<a href='html/021arithmetic.cc.html'>021arithmetic.cc</a><br/> -<a href='html/022boolean.cc.html'>022boolean.cc</a><br/> -<a href='html/023jump.cc.html'>023jump.cc</a><br/> -<a href='html/024compare.cc.html'>024compare.cc</a><br/> -<a href='html/025trace.cc.html'>025trace.cc</a><br/> -<a href='html/026assert.cc.html'>026assert.cc</a><br/> -<a href='html/027debug.cc.html'>027debug.cc</a><br/> -<a href='html/030container.cc.html'>030container.cc</a><br/> -<a href='html/031address.cc.html'>031address.cc</a><br/> -<a href='html/032array.cc.html'>032array.cc</a><br/> -<a href='html/033length.cc.html'>033length.cc</a><br/> -<a href='html/034exclusive_container.cc.html'>034exclusive_container.cc</a><br/> -<a href='html/035call.cc.html'>035call.cc</a><br/> -<a href='html/036call_ingredient.cc.html'>036call_ingredient.cc</a><br/> -<a href='html/037call_reply.cc.html'>037call_reply.cc</a><br/> -<a href='html/038scheduler.cc.html'>038scheduler.cc</a><br/> -<a href='html/039wait.cc.html'>039wait.cc</a><br/> -<a href='html/040brace.cc.html'>040brace.cc</a><br/> -<a href='html/041name.cc.html'>041name.cc</a><br/> -<a href='html/042new.cc.html'>042new.cc</a><br/> -<a href='html/043space.cc.html'>043space.cc</a><br/> -<a href='html/044space_surround.cc.html'>044space_surround.cc</a><br/> -<a href='html/045closure_name.cc.html'>045closure_name.cc</a><br/> -<a href='html/046tangle.cc.html'>046tangle.cc</a><br/> -<a href='html/047jump_label.cc.html'>047jump_label.cc</a><br/> -<a href='html/048call_variable.cc.html'>048call_variable.cc</a><br/> -<a href='html/049continuation.cc.html'>049continuation.cc</a><br/> -<a href='html/050scenario.cc.html'>050scenario.cc</a><br/> -<a href='html/051scenario_test.mu.html'>051scenario_test.mu</a><br/> -<a href='html/060string.mu.html'>060string.mu</a><br/> -<a href='html/061channel.mu.html'>061channel.mu</a><br/> -<a href='html/062array.mu.html'>062array.mu</a><br/> -<a href='html/063list.mu.html'>063list.mu</a><br/> -<a href='html/064random.cc.html'>064random.cc</a><br/> -<a href='html/069binary_tree.mu.html'>069binary_tree.mu</a><br/> -<a href='html/070display.cc.html'>070display.cc</a><br/> -<a href='html/071print.mu.html'>071print.mu</a><br/> -<a href='html/072scenario_screen.cc.html'>072scenario_screen.cc</a><br/> -<a href='html/073scenario_screen_test.mu.html'>073scenario_screen_test.mu</a><br/> -<a href='html/074keyboard.mu.html'>074keyboard.mu</a><br/> -<a href='html/075scenario_keyboard.cc.html'>075scenario_keyboard.cc</a><br/> -<a href='html/076scenario_keyboard_test.mu.html'>076scenario_keyboard_test.mu</a><br/> -<a href='html/077trace_browser.cc.html'>077trace_browser.cc</a><br/> -<a href='html/999spaces.cc.html'>999spaces.cc</a><br/> +<p><b>Part I</b>: basic infrastructure +<p/><a href='html/000organization.cc.html'>000organization.cc</a>: the basic +skeleton program. Compiles and runs but doesn't do much. Later <em>layers</em> +hook into this skeleton to add functionality. Mu's guarantee: you can <a href='http://youtube.com/watch?v=c8N72t7aScY'>load +features</a> up until any layer, and it will compile and pass all tests until +that point. +<br/><a href='html/001help.cc.html'>001help.cc</a>: just a simple test layer +to show how to hook into the skeleton. Also summarizes how to invoke mu, +behaviors that later layers will be providing. +<br/><a href='html/002test.cc.html'>002test.cc</a>: mu's minimalist test +harness, relying on a couple of one-liners in the makefile to autogenerate +lists of tests to run. +<br/><a href='html/003trace.cc.html'>003trace.cc</a>: support for logging +facts about our program, and for <a href='http://akkartik.name/post/tracing-tests'>checking the facts logged in tests</a>. +(<a href='html/003trace.test.cc.html'>tests for the test harness</a>) + +<p><b>Part II</b>: the mu virtual machine, designed to compile easily to +machine language. +<p/><a href='html/010vm.cc.html'>010vm.cc</a>: core data structures: recipes +(functions), instructions and reagents (operands). +<br/><a href='html/011load.cc.html'>011load.cc</a>: the textual representation +of recipes and how it's turned into the data structures. +<br/><a href='html/012transform.cc.html'>012transform.cc</a>: after mu +programs are loaded but before they are run they can be transformed in an +extensible manner akin to lisp macros. Think of this as the core of mu's +‘compiler’ for providing high-level features atop the core. +<br/><a href='html/013literal_string.cc.html'>013literal_string.cc</a>: extend +the loader to support literal strings in various instructions. +<br/><a href='html/014literal_noninteger.cc.html'>014literal_noninteger.cc</a>: +extend the loader to support non-integer numbers. +<br/><a href='html/020run.cc.html'>020run.cc</a>: executing mu recipes by +executing the list of instructions they contain. +<br/>Various primitive operations: on <a href='html/021arithmetic.cc.html'>numbers</a>, +<a href='html/022boolean.cc.html'>booleans</a>, for <a href='html/023jump.cc.html'>control flow</a>, +and <a href='html/024compare.cc.html'>comparing values</a>. +<br/>Primitive operations to help with testing: <a href='html/025trace.cc.html'>tracing/logging</a>, +<a href='html/026assert.cc.html'>assert</a> and +<a href='html/027debug.cc.html'>debug by print</a>. + +<br/><a href='html/030container.cc.html'>030container.cc</a>: compound types +akin to records, structs or classes. +<br/><a href='html/031address.cc.html'>031address.cc</a>: adding and removing +layers of indirection to mu data. +<br/><a href='html/032array.cc.html'>032array.cc</a>: all mu data structures +are <a href='html/033length.cc.html'>bounds-checked</a>. +<br/><a href='html/034exclusive_container.cc.html'>034exclusive_container.cc</a>: tagged unions or sum types. +<br/><a href='html/035call.cc.html'>035call.cc</a>: calls to recipes look +just like primitive operations. +<br/><a href='html/036call_ingredient.cc.html'>036call_ingredient.cc</a>: how +recipes pass arguments or 'ingredients' without introducing any syntax and +breaking the metaphor of recipes as lists of instructions. +<br/><a href='html/037call_reply.cc.html'>037call_reply.cc</a>: recipes can +return arbitrary numbers of values to their callers. +<br/><a href='html/038scheduler.cc.html'>038scheduler.cc</a>: running multiple +recipes concurrently using <em>routines</em> that might execute in interleaved +fashion. +<br/><a href='html/039wait.cc.html'>039wait.cc</a>: primitives for +synchronization between routines. + +<p><b>Part III</b>: transforms to provide 80% of the benefits of high-level +languages. +<br/><a href='html/040brace.cc.html'>040brace.cc</a>: how mu provides +structured goto-less programming without introducing the syntax of +conditionals and loops other languages require. +<br/><a href='html/041name.cc.html'>041name.cc</a>: how mu transforms variable +names to raw memory addresses. +<br/><a href='html/042new.cc.html'>042new.cc</a>: rudimentary memory +allocator that is aware of all global types in any mu program. +<br/><a href='html/043space.cc.html'>043space.cc</a>: how variables in +different routines are isolated from each other using <em>spaces</em>. Mu +‘local variables’ are allocated on the heap. +<br/><a href='html/044space_surround.cc.html'>044space_surround.cc</a>: +Chaining spaces together to accomodate variables with varying lifetimes and +ownership properties. +<br/><a href='html/045closure_name.cc.html'>045closure_name.cc</a>: how spaces +can implement lexical scope. +<br/><a href='html/046tangle.cc.html'>046tangle.cc</a>: support for layers in +mu programs. They've been so good to us. +<br/><a href='html/047jump_label.cc.html'>047jump_label.cc</a>: since we have +<br/><a href='html/048call_variable.cc.html'>048call_variable.cc</a>: +higher-order functions. +<br/><a href='html/049continuation.cc.html'>049continuation.cc</a>: +first-class and delimited continuations, primitives for yield, exceptions and +much else besides. +<br/><a href='html/050scenario.cc.html'>050scenario.cc</a>: mu's first syntax +— not for code but for tests. (<a href='html/051scenario_test.mu.html'>example</a>) + +<p><b>Part IV</b>: beginnings of a standard library +<p/><a href='html/060string.mu.html'>060string.mu</a>: bounds-checked rather +than null-terminated. Unicode-aware. +<br/><a href='html/061channel.mu.html'>061channel.mu</a>: channels are mu's +only synchronization primitive, queues that can cause the routine reading or +writing from them to stall without taking up CPU resources. +<br/><a href='html/062array.mu.html'>062array.mu</a> +<br/><a href='html/063list.mu.html'>063list.mu</a> +<br/><a href='html/064random.cc.html'>064random.cc</a> + +<p><b>Part V</b>: Nascent tools for browsing mu codebases, for teaching programming +to non-programmers by getting them hooked on the value of tests. The eventual +goal is an environment that watches the programmers try out the code they +write, and turns the interactive sessions into reproducible test scenarios. + +<p/><a href='html/070display.cc.html'>070display.cc</a>: primitives for using +the keyboard and screen. +<br/><a href='html/071print.mu.html'>071print.mu</a>: helpers that can swap +the real screen with fake ones for testing. +<br/><a href='html/072scenario_screen.cc.html'>072scenario_screen.cc</a>: +writing tests that check what is printed to screen. +(<a href='html/073scenario_screen_test.mu.html'>examples</a>) +<br/><a href='html/074keyboard.mu.html'>074keyboard.mu</a>: helpers that can +swap the real keyboard with fake ones for testing. +<br/><a href='html/075scenario_keyboard.cc.html'>075scenario_keyboard.cc</a>: +writing tests using a fake keyboard. +(<a href='html/076scenario_keyboard_test.mu.html'>examples</a>) +<br/><a href='html/077trace_browser.cc.html'>077trace_browser.cc</a>: a +zoomable UI for inspecting traces generated by mu programs. Allows both +scanning a high-level view and drilling down into selective details. + +<p/><a href='html/999spaces.cc.html'>Epilogue</a>: maps summarizing various +address spaces, and the conventions that regulate their use in previous +layers. + +<p style='margin-bottom: 2em'/> |