We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.
Lingua Lucis
Lingua Lucis is designed by Stephen Ignatius Abel. It is a Golfing-language(in debate since this uses WORD instead of BYTE).
Overview
Lingua Lucis uses characters instead of bytes as units, ditching the traditional 'playing golf' idea, aiming to express a complete piece of code with a uniform character unit and as few symbols as possible (though it might be related to Polynomix, this language is independent and not based on any other language).
Command Set
This language includes the following writing systems: Latin, Greek, Cyrillic, Armenian, Mkhedruli (modern Georgian script), Devanagari, Thai, Tibetan, Burmese, Ethiopian, Hangul (Korean script), Kana (Japanese script), Chinese characters, and special symbols (including geometric shapes and mathematical symbols).
Basic Latin (0x0020 ~ 0x007F)
Spaces have no real meaning; they're just used to 'format' your code.
Basic Latin letters (A~Z, a~z) are used for identifiers.
Numbers are just the most basic numeric literals.
The following symbols have special meanings:
- +
- Addition
- -
- Subtraction
- *
- Multiplication
- /
- Division
- ^
- Exponentiation
- %
- Modulo
- ()
- Parentheses
- []
- List container or subscript
- {}
- Code container
- &
- Bitwise AND
- |
- Bitwise OR
- ~
- Bitwise NOT
- `
- Bitwise XOR
- .
- Decimal point
- ,
- Comma
- : Colon
- ;
- Semicolon
- "
- Followed by a character to return its Unicode code. Characters with Unicode codes greater than 0x10000 are not supported.
- \
- Escaping
- <
- Less than
- >
- Greater than
- <? something here ?>
- Comment block
- [: k@v, k@v, ... :]
- Dictionary
- '
- Apostrophe
Latin-1 Supplement (0x0080 ~ 0x00FF)
× and ÷ correspond to * and / in the basic section, respectively. ² is a shorthand for ^2, and ³ is a shorthand for ^3. ¬ is logical NOT. ¼, ½, and ¾ are all fraction constants. ±x will return a pair of numbers «x¦-x». «1st¦2nd» is a pair of numbers, and if you replace the middle with ¤, it becomes a complex number. In the new syntax, real¤imag can be used to construct a complex number.
· is a synonym for ⋅.
Latin Extensions (0x0100 ~ 0x02AF)
Ł is used to get the length of a list (or a string, or anything else that can be iterated over).
ƒ (hooked f) accepts a number and returns , where phi = and psi = .
Ĺ is the logarithm notation, which takes two arguments: a number and a base. If the base is omitted, it defaults to e.
Greek (0x0370 ~ 0x03FF)
η, σ, and ε represent sine, cosine, and tangent respectively. Why aren't there symbols for secant, cosecant, and cotangent? Because cot(x) = 1/tan(x), sec(x) = 1/cos(x), and csc(x) = 1/sin(x).
λarg_list@{code_block} is used to define a lambda function. You can assign it to a variable to define a real function. It supports closures. As for how the closure works... we'll talk about that later.
The four letters ι, ρ, α, ω work exactly the same as ⍳, ⍴, ⍺, ⍵ in APL (even though they're not real Greek letters, just APL-specific symbols, but at least they look like this).
ΣX is used to sum up the elements in a list, where X is the list you want to sum. ΠX is used to multiply the elements in a list. To get the average value of a list, you can write ΣX÷ŁX.
π is still the pi. ϕ and ψ are and , respectively. The real alphabet φ is a synonym for the symbol ϕ.
Γ is gamma function so you don't need factorial anymore.
Cyrillic Letters (0x0400 ~ 0x052F)
c is used to match a list of starting positions in a string that meet a certain regular expression. If none match, it returns an empty list. з is used to replace all substrings in a string that match a certain regular expression with a specific string. Л is used to calculate the shortest Levenshtein distance from one string to another.
Armenian Letters (0x0530 ~ 0x058F)
ե, կ, ո, and հ represent logical AND, logical OR, logical NOT, and logical XOR, respectively. մ and պ represent left shift and right shift, respectively. Թ, Ա, Լ, Ց, Զ, Բ, Ծ, Ֆ, and Ք represent numbers, strings, booleans, lists, tuples, complex numbers, null values, functions, and dictionaries, respectively.
Devanāgarī (0x0900 ~ 0x097F)
प (the first letter of the Hindi word पवित्र, which means 'sacred', because PSTF considers prime numbers a kind of sacred and pure numbers) is used to check if a number is prime. If it encounters a decimal, it rounds down to 0. If it encounters a string, it takes the integer parsed from it. If it encounters a list, it takes its length.
म is used to get the gcd of two numbers, and ए is used to get the lcm. ब is used to convert number bases (it takes two numbers, the first is the number to convert, and the second is the base). व is used to convert a number back to decimal (takes a string and a number, where the string is the non-decimal number to be converted, and the number is the base of the string).
य is used to get a random integer. च accepts a list and returns a random element of it. फ takes a list and then shuffles it randomly.
०१२३४५६७८९ is yet another digit set.
Thai Script (0x0E00 ~ 0x0E7F)
ร, น, ป, ว, and ม represent wait, current time (formatted), current date (formatted), UNIX timestamp (the number of seconds since 00:00 on January 1, 1970, GMT), and PRNG random seed, respectively.
Tibetan (0x0F00 ~ 0x0FFF)
༄ is a Tibetan header mark. It takes a function, runs it as a new process in a background thread, and returns its future handle.
༅ is a variant of the above mark. It takes a list of future handles, blocks them until they are resolved, and then returns their results.
༆ is also a header mark. It takes a list of future handles and makes them "race," then returns the result from the first resolved handle and immediately terminates the others.
༌ is a Tibetan syllable separation mark. It takes a future handle f and an integer x, then executes f after x milliseconds. If f isn't ready to run, it returns the full lyrics of Rick Astley's "Never Gonna Give You Up." Note: when writing the interpreter, if there are copyright issues, you can replace it with something else, like "This handle isn't ready to run yet."
Other Tibetan letters currently have no meaning. If you have any ideas, feel free to join the Lingua Lucis development team!
Burmese Script (0x1000 ~ 0x109F)
၀၁၂၃၄၅၆၇၈၉႐႑႒႓႔႕႖႗႘႙ is a set of base-20 numbers, consisting of standard Burmese digits and Shan digits. The standard Burmese digits correspond to 0 to 9, while the Shan digits correspond to 10 to 19.
က takes two parameters, a list and a condition expression. It sorts the list according to the order specified by the condition expression. If the condition expression is omitted, it defaults to sorting from smallest to largest.
ခ works similarly to က, but while က uses unstable quicksort, ခ uses a less efficient stable sorting algorithm.
ဃ only takes a list to sort. The sorting algorithm it uses is adaptive Timsort.
င is used to check whether a list contains a certain element. If it does, it returns the indices of every occurrence (as a list); otherwise, it returns an empty list.
Georgian Script (0x10A0 ~ 0x10FF)
To save characters, Asomtavruli and Nuskhuri are automatically parsed into Mkhedruli.
ა and ჶ return the first half of a list (including the middle element if the list has an odd length) and the second half of the list (excluding the middle element), respectively.
შ is used to return a range. You might say it's a command that's redundant with ι, but actually it takes five parameters: start number, end number, step size, whether to include the start number, and whether to include the end number.
ნ is used to get a slice of a list (it takes four arguments: a list (placed before this command) and three numbers (representing the start value (inclusive), the end value (exclusive), and the step)). The meaning of გ is opposite to ნ; it's the list after excluding the corresponding slice.
Ethiopian Script (0x1200 ~ 0x137F)
ማ and ገ receive a string. ማ interprets it directly as code, while ገ treats it as an expression.
ል Return the source code of the program.
The other Ethiopian letters currently have no assigned meaning.
Latin Supplementary Extension (0x1E00 ~ 0x1EFF)
ḟ is a FizzBuzz function.
Common Punctuations (0x2000 ~ 0x206F)
Strings can also be enclosed with regular double quotes (“”), but these quotes come in upper and lower forms—you have to start with the upper quote and end with the lower quote.
Letter-like Symbols (0x2120 ~ 0x213F)
℮ is the Euler's constant.
ℕ, ℤ, and ℚ represents natural numbers, integers, and rational numbers, respectively.
Mathematical Symbols (0x2200 ~ 0x22FF)
∀ takes two parameters, a list and a conditional expression. If every element in the list meets the condition, it returns true; otherwise, it returns false. ∃ works similarly to ∀, but it will 'short-circuit' as soon as it finds any element that meets the condition, then return true.
∈ takes two parameters, a list and any other value. Checks if the value belongs to the list. Format: x∈A.
The function of ∉ is exactly the opposite of ∈; it returns true only if an element does not belong to a list.
∋ and ∌ work the same way, but they check whether a list contains an element.
⊂ ⊃ ⊄ ⊅ ⊆ ⊇ ⊈ ⊉ are also set theory symbols. ⊂ is used to check if one list is a subset of another, and ⊃ is used to check if a list contains all the elements of another list. ⊄ and ⊅ are the exact opposites of ⊂ and ⊃. Adding a line underneath them indicates "equal".
∅ is an empty list.
(f ∘ g)(x) equals f(g(x)).
Both ∪ and ∩ take two lists. ∪ returns their union, while ∩ returns their intersection.
∫ (this is not the IPA ʃ) takes three parameters: a lower limit, an upper limit, and a lambda. It returns the adaptive Simpson's integral of the function.
∂ is the partial derivative symbol. For a function with n parameters, ∂ returns a list containing all of its partial derivatives.
∇ (nabla) takes a 2D or 3D list and calculates its Jacobian matrix.
∑ (this is not the Greek capital letter Σ) takes two lists, one with the original elements and the other with their weights. It returns the weighted sum of the first list. If there's no second list, it returns the sum of squares of the first list.
∏ (this is also not the Greek capital letter Π) takes not only a list but also a number, and returns the remainder of the product of the list divided by that number.
√ (square root) takes one argument. If this argument is a value, it returns its square root. If the argument is a one-dimensional list, it returns its Euclidean norm. If it's a two-dimensional list, it performs a Cholesky decomposition on it.
∞ is used to generate a lazy infinite stream (it can be seen as an infinite constant, but it's quite different from the infinity in most programming languages). It can be used as the upper and lower limits of an integral, for calculating improper integrals.
⊗ and ⊕ represent the Kronecker tensor product and vector XOR, respectively. They both take two matrices (for simplicity, we'll just call 2D lists matrices from now on).
⋅ (not the punctuation middle dot) is used to do a dot product of two 3D lists. The × mentioned earlier is used for the cross product.
≠, ≤, ≥, ≮ and ≯ are self-explanatory.
CJKV Punctuations (0x3000 ~ 0x303F)
Strings are enclosed in 「」.
々 is used to repeat a kana operator.
〘〘〘〙〙〙 is used to include a multi-line string.
Hiragana (0x3040 ~ 0x309F)
し takes four parameters, three of which are functions (f, which must take two parameters, g, and h), and the fourth can be any value (x). It returns (f (g x) (h x)).
つ takes three parameters, f, g, and x. It returns (f x (g x)).
て also takes three parameters, f, g, and x, but it returns (f (g x)).
く is similar to て, but it returns (g (f x)).
す is an S-combinator, returning f x (g x). (Its effect is totally different from つ!)
な takes one parameter, f (a two-parameter function). If f is defined as f(x, y), it returns a new definition f(y, x).
Katakana (0x30A0 ~ 0x30FF)
ア takes a constant and transforms it via η-expansion into a single-argument function that always returns that constant (C → λx.C x).
イ is used to keep all the arguments of a function. It looks useless, but it's actually helpful when branching processes.
ウ is used to flip the arguments of a binary function.
エ is a W-combinator.
オ is a Y-combinator.
Note that katakana bindings take precedence over hiragana.
CJKV Unified Ideographs (0x3400 ~ 0x4DBF and 0x4E00 ~ 0x9FFF)
"说" is used to output a specific value.
"听" is used to get user input and directly return the input string.
"转" is used to parse a value into another type.
"若……{……}否{……}" is a conditional branch statement.
"真" and "假" are Boolean constants.
"循……{……}" is a conditional loop statement.
"对i之x{……}" is an iterative loop statement. It's similar to Python's for x in i: code.
"试{……}错ExceptionName{……}否{……}终{……}" is an error handling statement.
"丢ExceptionName" directly raises an error.
"退" and "越" are the break and continue statements, respectively.
"停" directly pauses the program.
"核" takes a string and then parses it as an operating system kernel command (Bash, CMD, Powershell, etc.).
"读" is used to read the contents of a file.
"写" is used to overwrite file contents.
"缀" is used to append content to the end of a file.
"联" is used to send a specific request to a specified URL and return the result obtained.
"寰" is used to get environment variables.
"〇一二三四五六七八九甲乙丙丁戊己庚辛壬癸子丑寅卯辰巳午未申酉戌亥" is the character set for base-32 numbers. For example, "三己午壬" corresponds to 114514. "十" is used to parse Chinese numerals into decimal as well.
"嘟" is undefined behaviour.
"返" is return.
"颠" takes an array and return its reversal.
Hangul (0xAC00 ~ 0xD7AF)
The characters 얻, 제, 이, 정, 합, 추, 삽, 연 correspond respectively to extract (take an integer and a list, return the element at that index and all elements before it), exclude (take an integer and a list, return all elements after that index), keys (take a dictionary, return all its keys), values (take a dictionary, return all its values), merge (take two dictionaries, deeply merge them), append (take an element and a list, add the element to the end of the list), insert (take an element, an index, and a list, insert the element at that index), and prepend (take an element and a list, insert the element at the beginning of the list).
변 (Rename) takes two dictionaries (where the values of the first dictionary must all be strings), and then replaces all keys in the second dictionary that appear in the first dictionary with their corresponding new names.
참 (Decapitate) takes an integer n and a list X, and returns a pair of sets, where the first element is the set of items in X with indices less than or equal to n, and the second element is the set of the remaining items.
투 (Project) takes a list and a function, and returns a list where each element has been processed by the function.
필 (filter) takes a list and a condition expression, and returns a new list where each element is one that meets the condition from the original list.
재 (reject) works similarly to 필, but the returned list contains elements from the original list that do not meet the condition.
페 (pair) receives two lists (where all elements in the first list must be strings) and returns a dictionary, with the keys being the elements from the first list and the values being the elements from the second list.
Example
Below 20 glyphs
Cheating Quine
说ል
Sum from 1 to 100
Σι1१००
FizzBuzz
对ι1१००之a{说ḟa}
Average Number
(し÷ΣŁ)听
Derivative of Sine
(て∂η)x
Where x is a certain value.