about summary refs log tree commit diff stats
path: root/config
Commit message (Expand)AuthorAgeFilesLines
* Document message index format specifiersBen Burwell2019-07-041-1/+1
* Update binds.confDrew DeVault2019-07-041-2/+2
* Correct default filter order in aerc.conf.inDrew DeVault2019-07-021-1/+1
* Implement :search, :next-result, :prev-resultDrew DeVault2019-06-261-0/+4
* add DefaultSavePath configReto Brunner2019-06-251-0/+10
* Fix reply bindings in [view]Drew DeVault2019-06-191-4/+4
* Set empty message in dirlist if no folder exist.Reto Brunner2019-06-142-0/+7
* Make awk filters more portableDrew DeVault2019-06-131-2/+2
* Add :next/:prev binds for [viewer]Drew DeVault2019-06-111-4/+8
* Override $ex in compose viewYash Srivastav2019-06-091-0/+1
* Add archive commandRobert Günzler2019-06-092-0/+6
* Message list: implement index-format optionYash Srivastav2019-06-072-6/+6
* Rewrite Python filters in awkDrew DeVault2019-06-071-2/+2
* Add image/* filter, commented out by defaultDrew DeVault2019-06-071-0/+1
* Disable HTML filter by defaultDrew DeVault2019-06-071-1/+1
* Add binding to toggle headersDrew DeVault2019-06-071-0/+1
* implements ability to view headers in message viewYash Srivastav2019-06-072-0/+8
* config: sort account foldersChris Kinniburgh2019-06-051-1/+4
* Add delete to the default binds.confDrew DeVault2019-06-021-0/+1
* Add :save and :pipe commands to viewerGalen Abell2019-05-271-0/+1
* Implement :edit in compose screenDrew DeVault2019-05-261-0/+1
* Subsitute prefix in aerc.conf for installDrew DeVault2019-05-261-3/+3
* binds.conf: make reply -a easier to use than replyDrew DeVault2019-05-251-4/+4
* Change ex command to C-x when using terminalDrew DeVault2019-05-241-2/+2
* Bind :compose to C in binds.confFrancis Dinh2019-05-231-0/+2
* Install default configs to XDG config if not foundDrew DeVault2019-05-221-4/+34
* Show account wizard if no accounts configuredDrew DeVault2019-05-221-6/+3
* New account wizard, part oneDrew DeVault2019-05-211-0/+9
* Use kebab-case for cred-cmdsDrew DeVault2019-05-211-2/+2
* Implement :next-part, :prev-partDrew DeVault2019-05-201-0/+2
* Rename :delete-message et al to :delete et alDrew DeVault2019-05-191-14/+14
* Implement loading passwords from external commandsGalen Abell2019-05-181-8/+61
* Install filters to /usr/share/aerc/filtersDrew DeVault2019-05-171-3/+3
* Remove unimplemented color configurationDrew DeVault2019-05-171-42/+0
* Implement ui.empty-message config optionDrew DeVault2019-05-172-17/+0
* Abort if accounts.conf is world readableReto Brunner2019-05-161-1/+26
* Revert "Abort if accounts.conf is world readable"Drew DeVault2019-05-161-25/+1
* Revert "s/aerc.conf/address.conf/ in permission check"Drew DeVault2019-05-161-1/+1
* s/aerc.conf/address.conf/ in permission checkCole Helbling2019-05-161-1/+1
* Abort if accounts.conf is world readableReto Brunner2019-05-161-1/+25
* Change default bindings for repliesDrew DeVault2019-05-161-4/+4
* Change default reply keybindingsDrew DeVault2019-05-161-8/+8
* Copy sent emails to the Sent folderDrew DeVault2019-05-152-0/+4
* Fix default bindings for quit and editDrew DeVault2019-05-141-1/+4
* Move ! bind to [messages]Drew DeVault2019-05-141-1/+1
* Add (non-functional) reply commands to bindingsDrew DeVault2019-05-141-2/+9
* Add ! to default keybindingsDrew DeVault2019-05-141-0/+1
* Add $EDITOR, internal config for composeDrew DeVault2019-05-142-0/+17
* Add distinct keybindings for each compose viewDrew DeVault2019-05-143-11/+31
* Populate "From" header from config for new emailsDrew DeVault2019-05-132-0/+5
roviding this guarantee. It exposes testable interfaces for hardware using dependency injection so that tests can run on -- and make assertions against -- fake hardware. It also performs [automated white-box testing](http://akkartik.name/post/tracing-tests) which enables robust tests for performance, concurrency, fault-tolerance, etc. ## Non-goals - Speed. Staying close to machine code should naturally keep Mu fast enough. - Efficiency. Controlling the number of abstractions should naturally keep Mu using far less than the gigabytes of memory modern computers have. - Portability. Mu will run on any computer as long as it's x86. I will enthusiastically contribute to support for other processors -- in separate forks. Readers shouldn't have to think about processors they don't have. - Compatibility. The goal is to get off mainstream stacks, not to perpetuate them. Sometimes the right long-term solution is to [bump the major version number](http://akkartik.name/post/versioning). - Syntax. Mu code is meant to be comprehended by [running, not just reading](http://akkartik.name/post/comprehension). For now it's a thin memory-safe veneer over machine code. I'm working on a high-level "shell" for the Mu computer. ## Toolchain The Mu stack consists of: - the Mu type-safe and memory-safe language; - SubX, an unsafe notation for a subset of x86 machine code; and - _bare_ SubX, a more rudimentary form of SubX without certain syntax sugar. All Mu programs get translated through these layers into tiny zero-dependency binaries that run natively. The translators for most levels are built out of lower levels. The translator from Mu to SubX is written in SubX, and the translator from SubX to bare SubX is built in bare SubX. There is also an emulator for Mu's supported subset of x86, that's useful for [debugging SubX programs](linux/subx_debugging.md). Mu programs build natively either on Linux or on Windows using [WSL 2](https://docs.microsoft.com/en-us/windows/wsl/install-win10). For Macs and other Unix-like systems, use the (much slower) emulator: ```sh $ ./translate_emulated ex2.mu # ~2 mins to emit code.img ``` Mu programs can be written for two very different environments: * At the top-level, Mu programs emit a bootable image that runs without an OS (under emulation; I haven't tested on native hardware yet). There's rudimentary support for some core peripherals: a 1024x768 screen, a keyboard with some key-combinations, a PS/2 mouse that must be polled, a slow ATA disk drive. No hardware acceleration, no virtual memory, no process separation, no multi-tasking, no network. Boot always runs all tests, and only gets to `main` if all tests pass. * The top-level is built using tools created under the `linux/` sub-directory. This sub-directory contains an entirely separate set of libraries intended for building programs that run with just a Linux kernel, reading from stdin and writing to stdout. The Mu compiler is such a program, at `linux/mu.subx`. Individual programs typically run tests if given a command-line argument called `test`. While I currently focus on programs without an OS, the `linux/` sub-directory is fairly ergonomic. There's a couple of dozen example programs to try out there. It is likely to be the option for a network stack in the foreseeable future; I have no idea how to interact on the network without Linux. ## Syntax The entire stack shares certain properties and conventions. Programs consist of functions and functions consist of statements, each performing a single operation. Operands to statements are always variables or constants. You can't perform `a + b*c` in a single statement; you have to break it up into two. Variables can live in memory or in registers. Registers must be explicitly specified. There are some shared lexical rules. Comments always start with '#'. Numbers are always written in hex. Many terms can have context-dependent _metadata_ attached after '/'. Here's an example program in Mu: <img alt='ex2.mu' src='html/ex2.mu.png' width='400px'> More resources on Mu: * [Mu Syntax reference](mu.md) * [Library reference.](vocabulary.md) Mu programs can transparently call low-level functions written in SubX. Here's an example program in SubX: ```sh == code Entry: # ebx = 1 bb/copy-to-ebx 1/imm32 # increment ebx 43/increment-ebx # exit(ebx) e8/call syscall_exit/disp32 ``` More resources on SubX: * [SubX syntax reference](subx.md) * [Some starter exercises for learning SubX](https://github.com/akkartik/mu/pulls) (labelled `hello`). Feel free to [ping me](mailto:ak@akkartik.com) with any questions. * The [list of x86 opcodes](subx_opcodes) supported in SubX: `linux/bootstrap/bootstrap help opcodes`. * [Some tips for debugging SubX programs.](linux/subx_debugging.md) ## Forks Forks of Mu are encouraged. If you don't like something about this repo, feel free to make a fork. If you show it to me, I'll link to it here. I might even pull features upstream! - [mu-normie](https://git.sr.ht/~akkartik/mu-normie): with a more standard build system that organizes the repo by header files and compilation units. Stays in sync with this repo. - [mu-x86\_64](https://git.sr.ht/~akkartik/mu-x86_64): experimental fork for 64-bit x86 in collaboration with [Max Bernstein](https://bernsteinbear.com). It's brought up a few concrete open problems that I don't have good solutions for yet. - [uCISC](https://github.com/grokthis/ucisc): a 16-bit processor being designed from scratch by [Robert Butler](https://www.youtube.com/channel/UCh4OpfF7T7UtezGejRTLxCw) and programmed with a SubX-like syntax. - [subv](https://git.s-ol.nu/subv): experimental SubX-like syntax by [s-ol bekic](https://mmm.s-ol.nu) for the RISC-V instruction set. ## Desiderata If you're still reading, here are some more things to check out: - [How to get your text editor set up for Mu and SubX programs.](editor/editor.md) - [Some 2-minute videos demonstrating Mu programs](https://archive.org/details/@kartik_agaram). Many of them involve this prototype live-updating programming environment for a postfix language that I might work on again one day: ```sh $ cd linux $ ./translate tile/*.mu $ ./a.elf screen ``` - [A summary](mu_instructions) of how the Mu compiler translates statements to SubX. Most Mu statements map to a single x86 instruction. ([colorized version](http://akkartik.github.io/mu/html/mu_instructions.html)) - [Some details on the unconventional organization of this project.](http://akkartik.name/post/four-repos) - Previous prototypes: [mu0](https://github.com/akkartik/mu0), [mu1](https://github.com/akkartik/mu1). ## Credits Mu builds on many ideas that have come before, especially: - [Peter Naur](http://akkartik.name/naur.pdf) for articulating the paramount problem of programming: communicating a codebase to others; - [Christopher Alexander](http://www.amazon.com/Notes-Synthesis-Form-Harvard-Paperbacks/dp/0674627512) and [Richard Gabriel](https://www.dreamsongs.com/Files/PatternsOfSoftware.pdf) for the intellectual tools for reasoning about the higher order design of a codebase; - [David Parnas](http://www.cs.umd.edu/class/spring2003/cmsc838p/Design/criteria.pdf) and others for highlighting the value of separating concerns and stepwise refinement; - The folklore of debugging by print and the trace facility in many Lisp systems; - Automated tests for showing the value of developing programs inside an elaborate harness; On a more tactical level, this project has made progress in a series of bursts as I discovered the following resources. In autobiographical order, with no claims of completeness: - [&ldquo;Bootstrapping a compiler from nothing&rdquo;](http://web.archive.org/web/20061108010907/http://www.rano.org/bcompiler.html) by Edmund Grumley-Evans. - [StoneKnifeForth](https://github.com/kragen/stoneknifeforth) by [Kragen Sitaker](http://canonical.org/~kragen), including [a tiny sketch of an ELF loader](https://github.com/kragen/stoneknifeforth/blob/master/386.c). - [&ldquo;Creating tiny ELF executables&rdquo;](https://www.muppetlabs.com/~breadbox/software/tiny/teensy.html) by Brian Raiter. - [Single-page cheatsheet for the x86 ISA](https://net.cs.uni-bonn.de/fileadmin/user_upload/plohmann/x86_opcode_structure_and_instruction_overview.pdf) by Daniel Plohmann ([cached local copy](https://github.com/akkartik/mu/blob/main/cheatsheet.pdf)) - [Minimal Linux Live](http://minimal.linux-bg.org) for teaching how to create a bootable disk image using the syslinux bootloader. - [&ldquo;Writing a bootloader from scratch&rdquo;](https://www.cs.bham.ac.uk/~exr/lectures/opsys/10_11/lectures/os-dev.pdf) by Nick Blundell. - Wikipedia on BIOS interfaces: [Int 10h](https://en.wikipedia.org/wiki/INT_10H), [Int 13h](https://en.wikipedia.org/wiki/INT_13H). - [Some tips on programming bootloaders](https://stackoverflow.com/questions/43786251/int-13h-42h-doesnt-load-anything-in-bochs/43787939#43787939) by Michael Petch. - [xv6, the port of Unix Version 6 to x86 processors](https://github.com/mit-pdos/xv6-public) - Some tips on handling keyboard interrupts by [Alex Dzyoba](https://alex.dzyoba.com/blog/os-interrupts) and [Michael Petch](https://stackoverflow.com/questions/37618111/keyboard-irq-within-an-x86-kernel).