4 ms·
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
by akkartik 5y ago
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 https://github.com/akkartik/mu
- agumonkey 5y agothe variable/register idea is neat, I always wanted some veneer on top of raw registries.. almost like a cpu monad
- jart 5y agoAuthor here. I assume you're referring to https://github.com/akkartik/mu/blob/main/shell/evaluate.mu 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.
- akkartik 5y agoSorry to tramp over your thread! Mu isn't too related to SectorLISP, I was just responding to the side-discussion about what we can build in under 1MB. To answer your question, evaluate.mu does support lambda (I call it `fn`). My estimates of size were based on `ls -l a.bin` after `./translate shell/*.mu`. I actually didn't really think of the micro interpretation of 'mu' until years after I started the project. The interpretation I had in mind was https://en.wikipedia.org/wiki/Mu_(negative)#%22Unasking%22_the_question https://en.wikipedia.org/wiki/Mu_(negative)#%22Unasking%22_t...
- jart 5y agoIt that case it'd be really cool if you implemented John McCarthy's metacircular evaluator in Mu LISP syntax to demonstrate it's a LISP. Sort of like how when John McCarthy shared the idea for LISP one of the first things he had to do was show that it's able to do the same things as a Turing machine.
- akkartik 5y agoNo upvote needed :) but sure I'll post it here. (I haven't done this so far because I find metacircularity to not be very interesting. It was interesting when JMC proved it could be done. Mu's whole reason for existence is linear rather than circular bootstrapping. We can disagree over whether I get to call it a Lisp or not, but if it has the full power of macros I'm happy.)
- tekknolagi 5y agoAnd Justine, if you want to join our ever continuing argument about bootstrapping processes and trust in programming language toolchains, Kartik is the right person to talk to :p
- blorpleblap 5y agoAre you really going after someone who shared a similar project to yours in what you seem to believe is your thread? What, do you think you’re headed for a raise on a $100m valuation for this and any discussion of alternative small lisps weakens your hand for YC? Come on. It’s pretty ironic you’re here seeking validation for your hobby project and then tearing down someone who shared their own hobby project with someone else and didn’t even pit it as related to yours in any way. The person they were replying to was seeking context on the sizes involved and you leaned in on dissecting that person’s entire hobby architecture and even its bloody name out of what, offense? It’s not a competition for attention and multiple ideas can exist independently. I realize you left some plausible deniability in how you worded it so you can step back and say “oh, gosh, I never,” but the wording right now is fairly transparent in its dagger-like nature and clear contempt that this person would dare to sully your work with something else. Completely unnecessary, toxic, and a real shame because I respect your work. Even the condescension in your downthread reply is glaringly obvious and huge props to the other user for not rising to it.
- agumonkey 5y agoHe probably was just responding to my 1MB limit. Don't be too harsh.
- pmarreck 5y agomajor points for having a thorough test suite, it has saved my a** on my own projects countless times, and I still encounter projects too often IMHO that have barely any test suite if any at all