Live data from Hacker News

Lil' Fun Langs

taylor.town

21–26 of 26 posts

Re: Lil' Fun Langs

#22
post #10
post #5

My 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-t…

Either 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!

Yeah 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, ...

Re: Lil' Fun Langs

#24
Reminds 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

[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...

Re: Lil' Fun Langs

#25
Wow, 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. :)

Re: Lil' Fun Langs

#26
post #2

Fluent – 4K lines – including parser, interpreter, standard library, IDE, UI, docs, examples. Will grow though. https://github.com/mlajtos/fluent/blob/main/client.tsx

I'll add it! Thanks. EDIT: Actually, it's not quite "ML-family" enough for this post. But it is a remarkably cool project! :)

> Actually, it's not quite "ML-family" enough for this post. But it is a remarkably cool project! :)

Fair. Thank you :)

Post reply on HN