Lil' Fun Langs
taylor.town
taylor.town
That's what led to Admiran. I originally wrote Admiran in Miranda, then bootstrapped from that to self-hosting when it was stable enough to do so. The original Miranda combinator compiler / interpreter took 20 minutes to compile all of Admiran, while the self-hosted version now takes 20 seconds.
One of the grad students of David Turner has taken up maintenance on the original Miranda source; the repository is now at https://codeberg.org/DATurner/miranda
- Self-hosted
- Compiles to javascript
- Bidirectional typechecking with NbE (based on elaboration zoo)
- Dependent type checking
- type classes
- ADTs with dependent pattern matching
- TCO (trampoline for mutually tail recursive functions)
- Erasure of compile-time only values (0, ω quantities, but not linear)
- Web playground
- LSP (added this month)
- Syntax is similar to Agda / Idris / Haskell
Since I have an LSP, I've got faster turn around and can add editor functionality that requires poking at the compile state. That's my current thread.
I have a C backend on hold, while I think about how I want to represent data without boxing everything and about whether I want to do reference counting or GC. (Reference counting unlocks "counting immutable beans" if I decide to give that a go, but I'd also like to try implementing GC someday.)
I should do some browser interop stuff and write something other than a compiler in my language.
And there are language enhancements: implementing "Do unchained" from Lean, automatic handling of lazy and/or async modalities, deriving implementations of classes, ...
[1] http://scheme2006.cs.uchicago.edu/11-ghuloum.pdf
[2] https://web.archive.org/web/20061217101846/http://www.cs.ind...
[3] https://web.archive.org/web/20090618030856/http://www.cs.ind...
[4] http://lambda-the-ultimate.org/node/1752
[5] https://news.ycombinator.com/item?id=21627615
[6] https://web.archive.org/web/20090928074841/http://ikarus-sch...
Yes, I know that all who do not understand Smalltalk are doomed to re-implement it, poorly. I'm just cutting out the middleman - and this allows it to do things Smalltalk normally doesn't. It allows me to think so far outside the box it's not even visible anymore.
[type Shape
[Circle Float]
[Rect Float Float]]
[fn area [s]
[match s
[Circle r] => [* 3.14 r r]
[Rect w h] => [* w h]]]
[area [Circle 5.0]]Curl was a proprietary Lisp that {curly brackets} and was designed in the 1990s to build web applications.
Knuth solves the bracket issue by redefining his keymap to swap () with [] and + with = (macos keymap files found at the bottom of this page: https://www-cs-faculty.stanford.edu/~knuth/programs.html )
The above really reminds me of tcl, though, which uses square brackets to force evaluation of the command they wrap.
EDIT: Actually, it's not quite "ML-family" enough for this post. But it is a remarkably cool project! :)
And here is a set of single file lambda calculus implementations with a variety of extensions: https://github.com/solomon-b/lambda-calculus-hs
`polytt` is kind of an ended experiment but that lambda calculus repo i plan to extend in the near future.
Fair. Thank you :)
disclaimer: I'm the author