maru
flpc
maru | flpc | |
---|---|---|
6 | 2 | |
181 | 215 | |
- | - | |
2.7 | 0.0 | |
6 months ago | about 2 years ago | |
Common Lisp | Forth | |
GNU General Public License v3.0 or later | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
maru
-
C Is Not a Low-level Language – Your computer is not a fast PDP-11
Well Forth is possibly the most minimal VM over a platform, as evidenced by openfirmware.
It does have problems scaling though, in that if you've seen one Forth, you've seen one Forth ie. The variations required to fit a platform make them semi-incompatible.
That's not to say that a more lispy Forth wouldn't be useful though, in that a concatenative syntax allows us to pass custom datastructures around like APL, and CPS (delimited continuations with lexically scoped dynamic binding would come from the lisp side (see https://github.com/manuel/wat-js).
Memory management in Forth can handle multiple memory types eg. https://flashforth.com/ so adding something like ref counting (https://github.com/zigalenarcic/minilisp/blob/main/main.c) to handle the dynamic list side of things might mesh well.
In any case, if you're looking for a self hosting lisp that runs on bare metal, https://github.com/attila-lendvai/maru has been out for a few years.
- Maru - a tiny self-hosting lisp dialect. Developed as part of Alan Kay's Fundamentals of New Computing.
-
About making a self hosting programming language
Take a look at Maru. The github project has links to other similar projects.
-
Why can't there be a LISP dialect/system that directly translates to optimal machine code?
That's the idea behind the Maru Project. It's a really cool concept and more people should know about it.
- lisp but small and low level?Does it make sense?
-
SubX: A minimalist assembly language for a subset of the x86 ISA
Here's another interesting one I just noticed:
https://github.com/attila-lendvai/maru/blob/maru.10/source/a...
flpc
- Forth vs Lisp
-
SubX: A minimalist assembly language for a subset of the x86 ISA
> I've actually never considered putting the comment first! I'll have to think about that one.
I'm sure there are many competing constraints so definitely don't do it because I'm suggesting this on a whim. :) My reasoning is that as a human reader, the comment is the more readable part, so I'd want to see it first. And for a computer, it probably doesn't care if the op code appears first or not.
> You probably don't want to understand Haskell's loop fusion by comparing source and generated code.
Indeed. But even though C and Haskell are very different, I think they share a common philosophy about compilation where you can basically do whatever you want as long as it still produces the same result.
I vaguely remember looking at Python generate bytecode (with `dis.dis`) and seeing it wasn't too bad. I haven't tried it on a larger program though.
There's tcc (and more recently chibicc that I haven't had a chance to check out yet) that you're probably already aware of. Is the generated output still pretty bad.
I'll also throw my own attempt in the ring
- High level https://github.com/asrp/flpc/blob/master/lib/stage0.flpc
What are some alternatives?
Carp - A statically typed lisp, without a GC, for real-time applications.
forthlisp - A Small Lisp in Forth
clasp - clasp Common Lisp environment
ruby - The Ruby Programming Language [mirror]
femtolisp - a lightweight, robust, scheme-like lisp implementation
cosmopolitan - build-once run-anywhere c library
sectorlisp - Bootstrapping LISP in a Boot Sector
mu - Soul of a tiny new machine. More thorough tests → More comprehensible and rewrite-friendly software → More resilient society.
minilisp - A small lisp interpreter with reference counting memory management aimed at interactive game development
wekan-node20 - Database connect test with Node.js 20, Bun and Deno. Creating single executeables with Bun and Deno.