Limitations
Luma is young. This page lists what is not available yet, so you don’t have to discover it by trial and error.
Language
| Missing | Workaround for now |
|---|---|
Ranges with steps ((0..100) every 5) | count with a while |
Named arguments (find("ann", exact: true)) | give the arguments in order; for many options, pass an obj whose fields have defaults |
| Leaving an outer walk from an inner one | set a bool and stop the outer walk when it is true |
| Functions that use the program’s variables | pass them as arguments; lists and maps are shared |
Destructors for objects, comparing objects with == | a method, called with defer; compare fields |
| Converting lists, maps and sets element by element | convert each element in a walk |
+ for strings, s[i] for one character | interpolation "${a}${b}" or join; s.part(i, i + 1) |
Comparing lists, maps or sets with == | compare elements one by one; for sets, len(a.diff(b)) == 0 && len(b.diff(a)) == 0 |
print with several values | one interpolated string: print("${a} ${b}") |
or fallback and formatting options in ${...} | an if before the print |
Command-line arguments that aren’t flags (file names), short flags (-p), --help | flags with a default: --file=notes.txt |
A default, time limit or check function for prompt | try and if around it |
Time zones other than the local one, reading phrases like “next monday”, dates in prompt and flag (see Dates and times) | a datetime on the local clock; read a str and convert it |
Bytes at a given place in a buffer (b[i]) | skip/reset, or convert it to a [byte] |
| TLS 1.2, UDP and IPv6 (see Network connections); web servers using several processor cores | none yet |
| Encryption and signatures (AES, RSA, Ed25519), hashing data in parts (see crypto) | none yet |
luma get with a mod’s short name (luma get sqlite) and pinned versions (a lock file) | the full URL; keep the files you got in version control |
Behavior to be aware of
- Objects that refer to each other in a circle are never freed (a node in its own list of children, two objects in each other’s lists). Reference counting can’t see that nobody else uses them. Break the circle (
node.children = []) before letting go of them. See Memory. - Strings inside printed lists, maps and sets are not escaped. A string containing
"prints that quote as it is:["say "hi""].
Platforms
- Executables are built for x86-64 (64-bit Intel and AMD processors) only.
- Linux executables are tested.
- Windows executables are tested on a real Windows computer, with the tests in
windows_tests/: files and folders, the console, input, commands, the network, https, servers, SQLite, zip and more. - The
lumacommand itself runs anywhere Go runs, soluma runworks on any system, including macOS and ARM computers. Onlyluma buildis limited to the targets above.