A really dumb idea put into an even dumber spec.
Notes: Grammar is probably ambiguous. Too lazy to actually implement right now, but was playing with syntactic ideas to stay true to the Meme AND to lambda calculus.
Any whitespace acts as a token delimiter.
type-declr := SUCH <type>*
arg-list := SO <id>*
let-expr := WOW <id> <type-declr>? <arg-list>? (<application-expr>)
application-expr := (MANY | VERY | MUCH) <application> !
expr := (<let-expr> | <application-expr> | <literal> | <id>)
Examples:
WOW
Big
SUCH Int
SO numbers
MUCH Plus numbers 1 !
WOW
Doge
MUCH 5 !
WOW
main
MUCH PrintLn
VERY Big Doge !!
Semantics:
let Big(numbers: Int) = (<Plus> <numbers> 1)
let Doge() = <5>
let main() = (<PrintLn> (<Big> <Doge>))
Expected output:
6
The entirety of the program is evaluating the main
expression definition.
TODO - Waste more of your life
TODO - Waste a ton of your life.
Wow, macros would be amazing, @FranklinChen. A fun idea.