ilusm.dev
FAQ

Frequently Asked Questions

Common questions about ilusm - what it is, how it works, and where it fits.

What is ilusm?

ilusm is a programming language where every keyword, builtin, and standard library module name is five characters or fewer. It ships with 345 stdlib modules covering networking, crypto, file I/O, databases, hardware, security tooling, and more - all included, no package manager needed.

The name stands for i love you so much.

What is the five-character rule?

Every name that ships with ilusm - keywords, builtins, stdlib module names and their methods - is five characters or fewer. So while becomes whl, print becomes prn, true becomes tru.

Your own code has no restriction. You can name your variables and functions whatever you like.

# language surface - five chars max
whl i < 10:
    prn i
    i = i + 1

# your code - no limit
my_long_variable_name = "whatever you want"

What is ilusm good for?

  • Backend scripts and small daemons
  • HTTP clients and servers
  • Automation and system glue
  • Security tooling (authorized use only)
  • Data transformation and config processing
  • CLI tools
  • IoT and hardware (GPIO, BLE, LoRa, CAN bus)

What are the types in ilusm?

There are eight types. Use typ(x) to get the type name as a string:

NameWhat it isExample
numNumber (integer or float)42, 3.14
strString"hello"
lstList[1, 2, 3]
objObject / record{x: 1, y: 2}
bolBooleantru, fls
nilNullnil
funUser-defined functionadd(a, b) = a + b
bifBuilt-in functionprn, len

What is falsy?

These values are falsy: fls, nil, 0, "", []. Everything else is truthy.

if [] : prn "never"
if [0]: prn "this runs - non-empty list is truthy"

How do I handle errors?

Use try(f) where f is a zero-argument function. It returns {val, err} - err is nil on success, or an error string on failure. Raise errors with err("message").

load() =
    err("file not found")

r = try(load)
if r.err: prn $"failed: {r.err}"
| prn r.val

How do I import modules?

Use use name for stdlib modules, or use "path.ilu" for your own files.

use fs
use jsn
use "mylib.ilu"

data = jsn.dec(fs.rd("config.json"))

Core builtins (prn, len, str, int, typ, try, err) need no use.

Does ilusm have classes or objects?

No classes. ilusm uses plain objects - {key: value} records. You can store functions in them, but there is no class keyword, no inheritance, and no self/this.

point = {x: 3, y: 4}
prn point.x   # 3
point.z = 0   # add a field

How does concurrency work?

ilusm uses message-passing concurrency via the syn module. Spawn tasks with syn.run(f) and pass data between them through channels (syn.chan()). Shared mutable state across tasks is a data race - use channels instead.

use syn
ch = syn.chan()
t  = syn.run(\() ch.snd("hello"))
prn ch.rcv()   # "hello"

Is ilusm statically typed?

No. ilusm is dynamically typed. Use typ(x) to check types at runtime.

prn typ(42)        # num
prn typ("hello")   # str
prn typ([1,2,3])   # lst

What license is ilusm?

MIT. Free to use, modify, and distribute.

Where do I download ilusm?

Download ilusm

Available for Linux, macOS, and Windows. ilusm.dev is the canonical source - treat other mirrors as untrusted.