4 ms·
Lil' Fun Langs
- mlajtos 9mo agoFluent – 4K lines – including parser, interpreter, standard library, IDE, UI, docs, examples. Will grow though. https://github.com/mlajtos/fluent/blob/main/client.tsx https://github.com/mlajtos/fluent/blob/main/client.tsx
- surprisetalk 9mo agoI'll add it! Thanks. EDIT: Actually, it's not quite "ML-family" enough for this post. But it is a remarkably cool project! :)
- solomonb 9mo agoIf you're accepting additions here is a fun one some friends and I did as experiment at the Topos Institute: https://github.com/ToposInstitute/polytt https://github.com/ToposInstitute/polytt And here is a set of single file lambda calculus implementations with a variety of extensions: https://github.com/solomon-b/lambda-calculus-hs 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.
- mlajtos 9mo ago> Actually, it's not quite "ML-family" enough for this post. But it is a remarkably cool project! :) Fair. Thank you :)
- nimbus-hn-test 9mo ago[dead]
- dunham 9mo agoMy little language Newt is 7 kloc. Dunno if it's worth including, it's mostly an exercise to learn how these things work and is not as polished as I'd like. - 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 https://github.com/dunhamsteve/newt https://github.com/dunhamsteve/newt
- taolson 9mo agoEither newt was already in the list, or it got added. We talked a bit about using our languages for AoC 2024 -- looks like you've been keeping busy working on it!
- dunham 9mo agoYeah it has been fun. Lots of directions I can take it: 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, ...
- lachlan_gray 9mo agoAnother crazy one is SectorLISP, 223 lines of asm https://justine.lol/sectorlisp2/ https://justine.lol/sectorlisp2/
- ecto 9mo agoloon is a lisp! https://github.com/ecto/loon https://github.com/ecto/loon [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]]
- grimgrin 9mo agoidk how I haven't crossed a lisp with square brackets but dang I am sorta stunned at how I've never even envisioned it? thanks
- cpeterso 9mo agoNo shift key needed for square brackets! Curl was a proprietary Lisp that {curly brackets} and was designed in the 1990s to build web applications. https://en.wikipedia.org/wiki/Curl_(programming_language) https://en.wikipedia.org/wiki/Curl_(programming_language)
- dunham 9mo agoI've always found OCaml's (* ... *) comments annoying, because it needs shift for both characters. But I suspect it's easier to type on a french keyboard. 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 https://www-cs-faculty.stanford.edu/~knuth/programs.html )
- Andrex 9mo agoIn high school I tried spec'ing a lang that excluded shift key usage... fun times.
- shawn_w 9mo agoThere's a few lispy languages that support using square brackets as an alternative to parens. Racket even has curly braces too. The above really reminds me of tcl, though, which uses square brackets to force evaluation of the command they wrap.
- taolson 9mo agoDon't know if my language is considered Lil' enough for this, but it's a pure, lazy functional language based upon Miranda (progenitor language to Haskell) that compiles to x86-64 asm. ~6700 SLOC for the (self-hosted!) compiler, and ~3300 SLOC additional for the extensive library of functional data structures and functions. https://github.com/taolson/Admiran https://github.com/taolson/Admiran
- spragl 9mo agoI really loved Miranda back when I learned about it. I still have the book. I think it never took off because it was quite expensive for universities to use. Im sure David Turner regrets his price model today. Now he has made Miranda available here https://www.cs.kent.ac.uk/people/staff/dat/miranda/ https://www.cs.kent.ac.uk/people/staff/dat/miranda/
- taolson 9mo agoYes, the open-source release he did is what introduced me to Miranda. I rewrote a lot of my previous Haskell solutions to Advent of Code puzzles with it, and liked it so much I decided to try to improve on it ;-) 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 https://codeberg.org/DATurner/miranda
- Perenti 9mo agoI've been playing with my own Smalltalk implementation. I guess it qualifies as a tiny _language_, but the class library is huge! 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.
- hedayet 9mo agofun collection. would love your comment on roxlang(https://roxlang.com/ https://roxlang.com/) disclaimer: I'm the author
- deleted 9mo ago[deleted]
- haasisnoah 9mo ago[dead]
- kristianp 9mo agoReminds me of Ghuloum's "An Incremental Approach to Compiler Construction" [1]. The tutorial [2], takes you through making a scheme compiler. It starts by compiling an integer to x86 assembly, using the output of gcc's assembly as reference. Then it goes through to tail calls and heap allocation, with a working compiler at every step. Tests at [3]. Mentioned in [4,5]. Gholoum went on to write Ikarus scheme which continued that work [6], but it never moved to 64 bit and the last release was in 2008. [1] http://scheme2006.cs.uchicago.edu/11-ghuloum.pdf http://scheme2006.cs.uchicago.edu/11-ghuloum.pdf [2] https://web.archive.org/web/20061217101846/http://www.cs.indiana.edu/~aghuloum/compilers-tutorial-2006-09-16.pdf https://web.archive.org/web/20061217101846/http://www.cs.ind... [3] https://web.archive.org/web/20090618030856/http://www.cs.indiana.edu/~aghuloum/ https://web.archive.org/web/20090618030856/http://www.cs.ind... [4] http://lambda-the-ultimate.org/node/1752 http://lambda-the-ultimate.org/node/1752 [5] https://news.ycombinator.com/item?id=21627615 https://news.ycombinator.com/item?id=21627615 [6] https://web.archive.org/web/20090928074841/http://ikarus-scheme.org/r6rs-libraries/ https://web.archive.org/web/20090928074841/http://ikarus-sch...
- doctor_phil 9mo agoWow, this is so cool! Very overwhelming with so many interesting things at once. I wish I had a few months with nothing else so I could surround myself with only this. :)