Lil

From Esolang
Jump to navigation Jump to search

Lil is a synchronous esolang discovered by User:Orby in June of 2024.

Language Overview

A Lil machine has an unbounded number of 1-bit registers. A Lil program is made up of rules which are executed simultaneously each logical tick. Lil rules are of the form

a, b, c

which in C syntax means

a = !(b && c);

where a, b, and c are registers. The left hand side of each rule must be unique. Consider the example

a, b, b
b, d, d

On the first logical tick, a is set to ~b and b is set to ~d. On the second tick, a is set to ~b again, which is now d. Also, b is set to ~d again. Register a will not be equal to d until 2 logical ticks have passed because each rule is executed simultaneously (rather than sequentially).

Examples

Multiplexer

Inputs a, b, s and output q. If s is 0, then q is equal to a otherwise q is equal to b.

t1, s, s
t2, a, t1
t3, s, b
q, t2, t3

notice this requires 3 logical ticks to compute.