Post 9wKIxh3CPpyipBQ4A4 by akkartik@mastodon.social
(DIR) More posts by akkartik@mastodon.social
(DIR) Post #9sWEdQCDPY5gLlYqOW by akkartik@mastodon.social
2019-12-30T09:10:39Z
0 likes, 0 repeats
*Update on the Mu computer's memory-safe language*Progress has been slow over the holiday season because I've been working on a paper about Mu for https://2020.programming-conference.org/home/salon-2020But functions can now return outputs.```fn foo a: int -> result/eax: int { result <- copy a increment result}```Project page: https://github.com/akkartik/mu#readmeSources for the memory-safe language, now at 5kLoC: http://akkartik.github.io/mu/html/apps/mu.subx.htmlCaveats: no checking yet, only int types supported.
(DIR) Post #9sWEdQXU8T6XPjVpY0 by akkartik@mastodon.social
2020-01-02T00:14:22Z
0 likes, 0 repeats
*Update on the Mu computer's memory-safe language*Still no type-checking or memory-safety, but we can now write any programs with int variables.There's still no 'var' keyword, so we can't define local variables yet. But that's not insurmountable; just pass in extra arguments for any space you want on the stack 😀```result <- factorial n 0 0 0```
(DIR) Post #9sWEdRBXjX9BPyFozA by akkartik@mastodon.social
2020-01-30T08:31:10Z
0 likes, 0 repeats
*Update on the Mu computer's memory-safe language*Basic language is done! Here's factorial. (Compare https://mastodon.social/@akkartik/102749590808384215.)Still todo:- user-defined types- type checking and memory-safetyIn other words, I'm about a third of the way there 😂 More detailed todo list: https://lobste.rs/s/pv8jpr/what_are_you_doing_this_week#c_5ymbsa(More details on the Mu project: http://akkartik.name/post/mu-2019-1. Repo: https://github.com/akkartik/mu)
(DIR) Post #9sWEdRjDiK5N6Q0iTg by hirojin@dev.glitch.social
2020-01-30T12:10:51Z
0 likes, 0 repeats
"I'd like Mu to be a stack a single person can hold in their head all at once, and modify in radical ways." — @akkartik http://akkartik.name/post/mu-2019-1
(DIR) Post #9sWEdSPlAA75ELugme by codesections@fosstodon.org
2020-02-29T04:40:36Z
0 likes, 0 repeats
@hirojin @akkartik> "I'd like Mu to be a stack a single person can hold in their head all at once, and modify in radical ways."I clicked through to figure out if this was about mu, the email indexer/client I use every day, or about mu, the PDF viewer I use every week.Turns out it's about mu, the language I hadn't heard of before.Name collision sure is a thing
(DIR) Post #9soeLgXNeW0JHqu0n2 by akkartik@mastodon.social
2020-02-10T15:55:20Z
0 likes, 0 repeats
A brief timeline of the Mu computing stackJul 6, 2014: commit 0, tree-based interpreter for a statement-oriented language (https://github.com/akkartik/mu)Jul 19, 2017: commit 3930, start of SubX machine code (http://akkartik.name/post/mu-2019-1)Sep 20, 2018: started building SubX in SubX (https://mastodon.social/@akkartik/100779355103829305)Jul 24, 2019: SubX in SubX done, commit 5461 (https://mastodon.social/@akkartik/102495274992610155)Oct 2, 2019: started designing the Mu memory-safe language (http://akkartik.name/post/mu-2019-2)Oct 29: started http://akkartik.github.io/mu/html/apps/mu.subx.html
(DIR) Post #9soeLgoOdFcC8crbJQ by akkartik@mastodon.social
2020-02-15T17:27:10Z
0 likes, 0 repeats
I'll be in Porto, Portugal on Mar 24 to present a paper on Mu at the Convivial Computing Salon: https://2020.programming-conference.org/home/salon-2020#event-overviewHoping for some great conversation and disagreements.
(DIR) Post #9soeLhL0fzhdlm7e9A by akkartik@mastodon.social
2020-02-21T19:20:54Z
0 likes, 0 repeats
*Update on the Mu computer's memory-safe language*Mu just got its first couple of non-integer types: addresses and arrays. As a result, the factorial app can _finally_ run its tests based on command-line args.http://akkartik.github.io/mu/html/apps/factorial.mu.htmlAddresses are accessed using a '*' operator. Arrays are accessed using an 'index' instruction that takes an address (addr array T) and returns an address (addr T).Literal indexes aren't supported yet.Open q: indexing arrays of non-power-of-2 element sizes.
(DIR) Post #9soeLhuSYC3jXihxOy by akkartik@mastodon.social
2020-02-28T19:19:21Z
0 likes, 0 repeats
*Update on the Mu computer's memory-safe language*Still no type-checking or memory-safety, but we have partial support for arrays and product types. Still several sharp edges:- can't index an array with a literal- can't index an array with non-power-of-2-sized elements- can allocate but not use arrays/records on the stackMy todo list is growing. But work per item is shrinking. Hopefully there's an asymptote.(More details: http://akkartik.name/post/mu-2019-1. Repo: https://github.com/akkartik/mu)
(DIR) Post #9soeLiW2IU7JQGHxyK by akkartik@mastodon.social
2020-03-06T15:20:16Z
0 likes, 0 repeats
Lots of words in this commit message about liveness analysis, and it probably still makes no sense to anybody.https://github.com/akkartik/mu/commit/4032286f9bb231139b733e5444b862006d3b9119Hopefully it'll make sense to me at least in a month or two.
(DIR) Post #9soeLj9jursNPOrfrE by akkartik@mastodon.social
2020-03-09T01:39:57Z
0 likes, 0 repeats
New milestone: I just wrote 150 LoC of glorified machine code (utterly unsafe; lots of magic numbers) and had it work the first time.https://github.com/akkartik/mu/commit/c8784d1c0f0Though to be fair I'd been planning it for 16 hours, with lots of preliminary commits that nibbled away at the edges of the problem. Still, time spent thinking before rather than debugging after.Perhaps this is bad news. Perhaps my brain is getting so colonized by machine code that I'm losing my bearings on what is easy for others.
(DIR) Post #9t4EItgBiCLcLX25Im by akkartik@mastodon.social
2020-03-16T07:30:38Z
0 likes, 0 repeats
I'm hitting publish on my paper.Kartik Agaram, "Bicycles for the mind have to be see-through", Convivial Computing Salon, 2020.http://akkartik.name/akkartik-convivial-20200315.pdf [pdf; 25 pages]Get it? When I look over at my bicycle I can see right through its frame. I can take in at a glance how the mechanism works, how the pedals connect up with the wheels, and how the wheels connect up with the brakes. And yet, when we try to build bicycles for the mind, we resort to “hiding” and “abstraction”.
(DIR) Post #9t4EIwWN99HL9xSmv2 by nina@neenster.org
2020-03-16T14:17:08Z
0 likes, 0 repeats
@akkartik Favoriting this because I love bicycles.
(DIR) Post #9t4I8OIvuO5DxWOvtg by akkartik@mastodon.social
2020-03-16T15:00:03Z
0 likes, 0 repeats
@nina OMG, what...? How...? I'm honored.(I ended up at https://sedermasochism.com/wp-content/uploads/2019/07/Nina-In-Her-SF-Pentshack-sm.jpg as a result.)
(DIR) Post #9t4OC4Hss8wWlF2z0C by nina@neenster.org
2020-03-16T16:07:59Z
0 likes, 0 repeats
@akkartik That's an oooollllld photo.It's cool how the Fediverse makes connections, though.
(DIR) Post #9t4Oy4HQCerOdbidSC by akkartik@mastodon.social
2020-03-16T16:16:39Z
0 likes, 0 repeats
@nina Indeed! How did you even find my inside-baseball thing? Google alert on 'bicycles'?!
(DIR) Post #9t4Pfz7ejw0XNr5mmO by nina@neenster.org
2020-03-16T16:24:36Z
0 likes, 0 repeats
@akkartik I follow @mkwadee who shared it. I follow him because he follows me.
(DIR) Post #9vWxIXqgQFC2PDdMi8 by akkartik@mastodon.social
2020-03-12T08:30:11Z
0 likes, 0 repeats
*Update on the Mu computer's memory-safe language*Arrays and product types are now done. Any remaining rough edges are working as intended 😄 Only hex literals, for example.What's left? Actually making it safe.Complexity outlay so far: 16k lines of code, but only 6.5k if you exclude tests. Tests get _very_ repetitive in machine code. Hopefully we won't need another 15k LoC.Example program: http://akkartik.github.io/mu/html/apps/ex3.2.mu.html(More details: http://akkartik.name/post/mu-2019-2. Repo: https://github.com/akkartik/mu)
(DIR) Post #9vWxIYFqufKHfHPSwS by akkartik@mastodon.social
2020-03-24T04:05:42Z
0 likes, 0 repeats
The Mu compiler summarized in one page: http://akkartik.github.io/mu/html/mu_instructions.htmlMore details: http://akkartik.name/akkartik-convivial-20200315.pdfRepo: https://github.com/akkartik/mu(Brief update since there isn't much to report: I'm working on safe heap allocations as described in the paper. But it's slow going because of life and the need to unwind some past decisions.)
(DIR) Post #9vWxIYRYDAgSFYsoAy by akkartik@mastodon.social
2020-05-23T07:51:20Z
0 likes, 0 repeats
I'm back from a death march.Mu is a safe language built in machine code, translating almost 1:1 to machine code. A key check is for use-after-free errors, using a second address type (http://akkartik.name/akkartik-convivial-20200515.pdf, section 4.4)I spent the last 2 months switching all of Mu's implementation to this scheme. It was a tough time: https://lobste.rs/s/vcx5vu/what_are_you_working_on_this_week#c_pm4guj. But now I know it works (with 10-15% slowdown), and Mu functions calling low-level libraries should behave unsurprisingly.https://github.com/akkartik/mu
(DIR) Post #9vWxIYjz6dQfAjVWuO by akkartik@mastodon.social
2020-05-29T06:09:26Z
0 likes, 1 repeats
I'm starting to build some simple apps in Mu, my memory-safe language that translates 1:1 to machine code.Today I built a program to print a file to screen: http://akkartik.github.io/mu/html/apps/print-file.mu.htmlExperience report: https://github.com/akkartik/mu/commit/b22fa8afd8Also:- I fixed a bug in the process: https://github.com/akkartik/mu/commit/583a966d3e#diff-938a2cc4d3707f088f06fabfc140a9c6- I wished I already had clobbered-variable warnings.- I wished I had type checks.All in all, this language isn't ready for others yet. I'm constantly inspecting the code generated by the translator.
(DIR) Post #9vanV12c97WtWyYExE by akkartik@mastodon.social
2020-05-30T08:04:01Z
0 likes, 0 repeats
A new day, a new appA text-mode paginator for text files. Think `more`, but no ncurses, no termbox, no libc, just Linux syscalls.2-minute demo video: https://archive.org/details/akkartik-2min-2020-05-29App sources: http://akkartik.github.io/mu/html/apps/browse.mu.htmlRepo: https://github.com/akkartik/mu
(DIR) Post #9vanV1R4gB5ykpzm52 by akkartik@mastodon.social
2020-05-31T01:25:18Z
0 likes, 1 repeats
It's amazing how much you can do layout-wise with just plain text. Pictured in this toot:Alice in Wonderland by Lewis CarrollPoems by e e cummings (https://en.wikipedia.org/wiki/E._E._Cummings)
(DIR) Post #9wKIxgbC5xZpQKJhVg by akkartik@mastodon.social
2020-06-06T23:25:44Z
0 likes, 0 repeats
My text-mode paginator for text files implemented all the way up from machine code now supports a tiny subset of Markdown syntax. Screenshots below.The code is terribly ugly, and there are zero tests. But it did help flush out three bugs in Mu. Next steps:- Build out the compiler checks I missed the most.- Implement a fake screen and keyboard so I can write tests for this app.- Throw the app away and redo it right.(Background: http://akkartik.name/akkartik-convivial-20200606.pdf. Repo: https://github.com/akkartik/mu)
(DIR) Post #9wKIxh3CPpyipBQ4A4 by akkartik@mastodon.social
2020-06-07T22:45:56Z
0 likes, 0 repeats
Why do programming languages require us to specify what modules we use? I think that stuff is easy to deduce. Even in machine code.https://archive.org/details/akkartik-2min-2020-06-07cc @s_ol
(DIR) Post #9wKIxj2uzqwT0tIs08 by akkartik@mastodon.social
2020-06-16T07:31:51Z
0 likes, 0 repeats
I spent the last few days implementing a 'byte' type in Mu.For the most part, Mu is exclusively 32-bit. No long/short nonsense here. However, I do like strings. Eventually even UTF-8 strings. So, minimal byte support. Mostly they behave like 32-bit values. You can't store them on the stack. (Because x86 reasons.)As a test, I built a little calculator app: http://akkartik.github.io/mu/html/apps/arith.mu.html. This app also shows off multiple return values.Read more: https://github.com/akkartik/mucc @s_ol
(DIR) Post #9wKIxjN7mj6a1Yl0Uq by akkartik@mastodon.social
2020-06-18T17:43:52Z
0 likes, 0 repeats
*Update on the Mu computer's memory-safe language*Mu now checks all function calls.Pass in the wrong type = error.Save a result to the wrong type = error.Save a result to the wrong register = error.There are automated tests for error messages.I estimate this change protects against 60% of the most common mistakes. Checking the most recent variable in a register should provide another 20%. And I hopefully have TODOs for the remainder to gradually whack away.https://github.com/akkartik/mu
(DIR) Post #9wKIxjsJuk3haJLv7Y by akkartik@mastodon.social
2020-06-22T01:34:48Z
0 likes, 0 repeats
*Update on the Mu computer's memory-safe language*Mu now checks for most variable accesses if the variable is still live, and it's register hasn't been clobbered by some other variable. The extra-burdensome parts of programming in Mu are hopefully now not very burdensome.Next up: testable syscalls for screen and keyboard. But I might take a break first. My RSI has been acting up.https://github.com/akkartik/mu
(DIR) Post #9wKIxl09j5v94u1gyO by kragen@nerdculture.de
2020-06-22T02:00:59Z
0 likes, 0 repeats
@akkartik oh no! take care of yourself, RSI is priority #1
(DIR) Post #9z3dK0iV43aV72VpwW by akkartik@mastodon.social
2020-09-11T08:29:49Z
0 likes, 1 repeats
3 months ago I built a little prototype text-mode browser for a tiny subset of Markdown. Today it's a prototype no longer; it has fairly thorough tests. See how I write tests for the rendering in a language that maps 1:1 to machine code:http://akkartik.github.io/mu/html/apps/browse/main.mu.html#L81This one is for you, @yrabbit 🙂Old demo: https://archive.org/details/akkartik-2min-2020-05-29Repo: https://github.com/akkartik/mu