12 comments

[ 5.0 ms ] story [ 43.7 ms ] thread
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-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

loon is a lisp! 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]]
Don'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

I'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.

(comment deleted)
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...

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. :)