Top 1K Features Creators Events Podcasts Books Extensions Interviews Blog Explorer CSV

Lil

< >

Lil, aka Learning In Layers, is an open source programming language created in 2022 by John Earnest.

#281on PLDB 2Years Old
Download source code:
git clone https://github.com/JohnEarnest/Decker
Homepage ยท REPL ยท Source Code ยท Docs

Lil is part of the technology that powers Decker, a multimedia creative tool inspired by HyperCard. Decker uses Lil for adding custom behavior to decks and the widgets within. Lil is designed to be learned in layers, but it is a richly multi-paradigm language which incorporates ideas from imperative, functional, declarative, and vector-oriented languages.


Example from the web:
on mode a do # line comment r:() each x in a r[x]:1+r[x] end first extract key orderby value desc from r end
floor cos sin tan exp ln sqrt count first last sum min max raze prod range keys list rows cols table typeof flip mag unit heading split fuse dict take drop in join cross parse format unless limit like window each in while on do end if elseif else where by orderby asc desc select extract update from insert with into send local

Language features

Feature Supported Example Token
Standard Library โœ“ print["Hello, World!"]
Function Composition โœ“ on o f g do on _ x do f[g[x]] end end
Print() Debugging โœ“ show["Hi"]
Multiline Strings โœ“ lines:"one two"
Infix Notation โœ“ six: 2 + 2 + 2
Assignment โœ“ local name: "John" :
First-Class Functions โœ“ (on f x do x,x end)@11,22,33
Method Chaining โœ“ image[3,4].map[0 dict 1].encoded
Binary Operators โœ“ 1 + 1
Expressions โœ“ 1 + 1
Lists โœ“ myList:(1,2,3) end
Integers โœ“ 80766866
Conditionals โœ“ if 1 print["true"] end
Functions โœ“ on myFunction do print["hello"] end
While Loops โœ“ while 1 print["hello"] end
Strings โœ“ "Hello World" "
Line Comments โœ“ # A comment #
Case Sensitivity โœ“
Implicit Type Casting โœ“
Garbage Collection โœ“
hasDynamicTyping โœ“
Zero-based numbering โœ“
Comments โœ“
Constants X
Labels X
Classes X
Semantic Indentation X
Booleans X
Directives X
Operator Overloading X
Function Overloading X
Macros X
Anonymous Functions X
Case Insensitive Identifiers X
Multiple Inheritance X
Inheritance X
Switch Statements X
Ternary operators X
Increment and decrement operators X
Methods X
Default Parameters Pattern X
Destructuring X
Sets X
Octals X
Hexadecimals X
Scientific Notation X
View source
- Build the next great programming language ยท About ยท Keywords ยท Livestreams ยท Labs ยท Resources ยท Acknowledgements ยท Part of the World Wide Scroll