HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
akkartik
mu
Assembly2015–2026
akkartik / mu

mu

Soul of a tiny new machine. More thorough tests → More comprehensible and rewrite-friendly software → More resilient society.

14Distinct people
102Mentions
3Explicit recommenders
1.4KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Soul of a tiny new machine. More thorough tests → More comprehensible and rewrite-friendly software → More resilient society.

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

> My favorite project along those lines is Kartik Agaram's Mu[3], which wraps emulation, tracing, and time-travel debugging around a subset of x86 assembly language. From…

mncharity used a recommendation phrase. 4 indexed comments match. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 9–Nov 16 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/16/2026, 10:50:02 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year102 dated mentions

Observed mentions: 2015-03-09 08:11:23 UTC to 2026-10-01 12:57:18 UTC.

051015202015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments20152016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 22 mentions; 1 submissions, 21 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 6 mentions; 0 submissions, 6 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 4 mentions; 1 submissions, 3 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 16 mentions; 1 submissions, 15 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 6 mentions; 0 submissions, 6 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 20 mentions; 2 submissions, 18 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 11 mentions; 0 submissions, 11 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 4 mentions; 1 submissions, 3 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC404
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC22121
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC606
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC413
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC16115
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC606
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC20218
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC11011
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC303
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC505
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC101
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC413

What Hacker News says

20 sources
Heh, I have another project that's recreating Basic and DOS on some level. Statement-oriented language, SVGA graphics. No networking, no virtual memory, no concurrency. Unlike its forebears, though, lots of RAM and disk, which changes many design choices. And memory-safe code as far as possible; no C anywhere in its dependencies. https://github.com/akkartik/mu Teliva is basically providing better networking and disk support by compromising on the memory safety. (I'm back to depending hugely on C.)
In Teliva – an environment for end-user programming
Author here. I assume you're referring to https://github.com/akkartik/mu/blob/main/shell/evaluate.mu? It's hard for me to tell, since there's 819k lines of code in Mu according to find . -type f | grep -v '\.git' | xargs wc -l. Does it have lambda and support metacircular evaluation? If not, then why do you think it's LISP-like? If you do nothing to reduce code size, then why do you call it Mu? (I assume by "Mu" you're referring to what UNICODE calls the MICRO SIGN.) 30kb is two orders of a magnitude larger. I don't see how it's relevant to SectorLISP.
In Show HN: SectorLISP now fits in one sector
Assuming you mean static code size, my Mu project currently supports an interpreted Lisp (macros, fewer parens, infix) implemented in a compiled memory-safe low-level language without _any_ C in 450KB. The "runtime library" (mostly in the safe low-level language) requires 120KB. Without unit tests, the binary sizes drop down to 200KB and 30KB respectively, which gives you some sense of the space devoted to tests in each case. As the tests hint, Mu doesn't do anything to try to reduce code size. It's small just by focusing on the essentials. What's left is written for ease of comprehension. (An example of "essentials": Mu still cannot free memory. I run my programs in Qemu with 2GB which seems to suffice.) More details: https://github.com/akkartik/mu
In Show HN: SectorLISP now fits in one sector
Short version: I'm close to figuring out how to encourage more prototyping of software by making tests super easy to write during the prototyping process, and so de-risking rewrites. But one problem I've been stymied by is how to represent expectations of screens when they contain graphics. Long version: My Mu project (https://github.com/akkartik/mu) is building a computing stack up from machine code. The goal is partly to figure out why people don't do real prototyping more often. We all know we should throw the first one away (https://wiki.c2.com/?PlanToThrowOneAway), but we rarely do so. The hypothesis is that we'd be better about throwing the first one away if rewriting was less risky. By the time the prototyping phase ends, a prototype often tacitly encodes lots of information that is risky to rewrite. To falsify this hypothesis, I w
Read the rest
ant to make it super easy to turn any manual run into a reproducible automated test. If all the tacit knowledge had tests (stuff you naturally did as you built features), rewriting would become a non-risky activity, even if it still requires some effort.Turning manual tests into automated ones requires carefully tracking dependencies and outlawing side-effects. For example, in Mu functions that modify the screen always take a screen object. That way I can start out with a manual test on the real screen, and easily swap in a fake screen to automate the test. Hence my problem: How do you represent screens in a test? Currently I represent screens as 2D arrays of characters. That is doable a lot of the time, but complicates many scenarios: * Text mode character attributes. If I want to check the foreground or background color, I currently use primitives like `check-screen-in-bg` which ignores spaces in a 2D array, but checks that non-spaces match the given background attribute. In practice this leads frequently to tests that first check the character content on a screen and then perform more passes to check colors and other attributes. * Non-text. Checking pixels scales poorly, either line at a time or pixel at a time. A good test should seem self-evident based on the name, but drawing ASCII art where each character is a pixel results in really long lines or stanzas. So far I maintain separate buffers for text vs pixels, so that at least text continues to test easily. * Proportional fonts. Treating the screen as a grid of characters works only when each character is the same width. If widths differ I end up having to go back to treating characters as collections of pixels. So Mu currently doesn't support arbitrary proportional fonts. * Unicode. Mu currently uses a single font, GNU Unifont (http://unifoundry.com/unifont/index.html). Unifont is mostly fixed-width, but lots of graphemes (e.g. Chinese, Japanese, Korean, Indian) require double-width to render. That takes us back to the problems of proportional fonts. Currently I permit just variable width in multiples of some underlying grid resolution, but it feels hacky. Can people think of solutions to any of these bullets in a text-based language? Or a more powerful non-text representation?
In Ask HN: What problem are you close to solving and how can we help?
I'm curious about the hardware it runs on, and didn't immediately find answers on Google. Could you talk about what hardware is on a usual system and what device drivers need to do for screen, serial port, disk drives, etc.? Does the CPU use floating point? The reason I ask: for the past six months I've been dipping my toes in OS development for x86 with BIOS, SVGA and ATA interfaces: https://github.com/akkartik/mu And I'm way out of my depth. I have this suspicion that x86 might be one of the more difficult environments for device drivers, so I'm curious to hear what other hardware looks like.
In I spent 5 years writing my own operating system
As a kind of extreme example, I've gone off and duplicated a whole computing stack because I think C is the wrong abstraction. For example, the way signed and unsigned numbers are defined in the C standard really over-complicates simple programs. We often don't care about portability in these days of instruction set monoculture. Here's how I render the silhouette of the Mandelbrot set using fixed-point math on my computer. Each statement translates to a single x86 instruction. To detect overflow in a computation I don't perform more computation. I just use the processor's overflow flag, which C "abstracts" from me. http://akkartik.github.io/mu/html/mandelbrot-fixed.mu.html Main project page: https://github.com/akkartik/mu
In The Wrong Abstraction (2016)
The title seems fine! > Was that latter copying your content from somewhere? It had occurred to me that it might be a Markdown editing service. Maybe somebody tried it out with just the closest Markdown they happened to have on hand? However, looking closer at the Mu history, this seems like the closest version: https://github.com/akkartik/mu/blob/61b8fe6b18c6314268ed24d7... The prose isn't identical. I think somebody was rearranging the prose as they made sense of it. So more like notes, maybe? I'm very flattered <3 I'd be ok with either the original link or my link above for precision. And the title could also have a "(2019)".
In SubX: A minimalist assembly language for a subset of the x86 ISA (2019)
Yeah, OP is probably not the best place to understand what the purpose of this project is. The list of opcodes is just a list for consulting. It's only about the opcodes, it says nothing about the expected arguments and so on. To understand how to invoke an opcode you'd have to read either the forbidding Intel manual or something terser like https://c9x.me/x86 as cited at the bottom of OP. The '/copy-to-ebx' after the slashes is just my way of helping the reader understand what the instruction does. I don't want the reader to have to consult the Intel manual for every instruction, even if I'm forcing the writer to do so. So why am I forcing the writer to do so? Mu's goal is to build a computer where compound things can be understood in terms of their constituent parts. Most assemblers are implemented in C, and if you wanted to understand
Read the rest
what a line of C does, in a specific context, you might imagine expanding the C into.. its generated Assembly. Now you're in a circular situation where you need to understand Assembly to understand Assembly. So I started out with the goal of implementing an assembler in machine code. And Assembly is surprisingly complex. There's a reason nobody builds it in C anymore. So I ended up on my current trajectory, of making the code writer do more work just so the code reader doesn't have to deal with cycles. With hindsight, it all feels quite inevitable and fore-ordained. You can read more in a 2-part blog post that starts at http://akkartik.name/post/mu-2019-1, and there's also an academic paper at http://akkartik.name/akkartik-convivial-20200607.pdf that goes into some of my sociopolitical goals (in a sentence: "everybody should spend some time auditing the software (and laws) that run their society". For a paragraph-length exposition see the top of https://github.com/akkartik/mu#readme.)
In SubX: A minimalist assembly language for a subset of the x86 ISA (2019)
Sorry, I find this quite confusing. I'm familiar with more than one assembly language and SubX -- to the extent I can follow the docs -- seems excessively complicated and inconsistent, compared to a conventional one. Actually this may just be bad documentation. Turning to the list of opcodes[1], which exactly are the opcodes in, 01: add r32 to rm32 (add) 03: add rm32 to r32 (add) 05: add imm32 to EAX (add) ....etc Is "01:" the opcode? Meaning we should memorize the hex values that it is the normal assembler's job to produce? And how does something like bb: copy imm32 to EBX (mov) relate to the example code bb/copy-to-ebx 1/imm32 If "bb" is the opcode, why does it need to be repeated as text (metadata?) saying the same thing, only in a different order to the table? If the way to write a "bb" instruction is the
Read the rest
above, what is the way to write an "0f" instruction? 0f 86: jump disp32 bytes away if lesser or equal (addr, float), if ZF is set or CF is set (jcc/jbe/jna) I mean I'm guessing it would start "0f/" but after that, how much gets repeated and with what metadata? [1] https://github.com/akkartik/mu/blob/main/subx_opcodes
In SubX: A minimalist assembly language for a subset of the x86 ISA (2019)

Showing the 15 most recent of 20 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.