Earl Grey is a programming language created in 2014 by Olivier Breuleux.
#642on PLDB | 10Years Old |
git clone https://github.com/breuleux/earl-grey
Programming language compiling to JavaScript
count-words(text) =
counts = new Map()
words = text.split(R"\W+")
words each word ->
current-count = counts.get(word) or 0
counts.set(word, current-count + 1)
consume(counts.entries()).sort(compare) where
compare({w1, c1}, {w2, c2}) = c2 - c1
Feature | Supported | Example | Token |
---|---|---|---|
Binary Literals | ✓ | ||
Integers | ✓ | ||
Floats | ✓ | ||
Hexadecimals | ✓ | ||
Octals | ✓ |
title | date | score | comments |
---|---|---|---|
Show HN: The Earl Grey language – pattern matching, macros, compiles to JS | 08/07/2014 | 5 | 1 |