Changelog
All notable changes to IlluLang are documented in this file.
[1.3.0] - 2026-03-19
Added
Core Language
- Literal-constrained custom types (
maketype):maketypenow supports value constraints, not only base aliases. - Literal unions:
maketype Mode {0|1|2} - Array element constraints:
maketype Tokens {[string, 5]} - Dict shape constraints:
maketype Cfg {{key: 5, key2: [string]}} - Tuple shape constraints:
maketype Pair {(5, 5)} char(code)builtin: Converts Unicode code points (0..1114111) into one-character UTF-8 strings.ord(str)builtin: Returns the Unicode code point of the first character in a string (0for empty strings).get_args([index])builtin: Access CLI arguments passed after script path.get_args()returnsarray[string]get_args(i)returns one argument ornoneif out of range- Custom-type inferred defaults:
let/typedvardeclarations without an initializer now infer defaults frommaketypeconstraints for literals, arrays, dicts, tuples, and matrices. - Inline tuple constraint annotations: Direct tuple-style constraints in declarations are supported (for example
let v: (C, int, 5) = (...)). - Angle-bracket internal module imports: Runtime-provided modules can be imported with IDs like
"<time>","<windows>","<net>", and"<http>"(global and named import forms). - Postfix member chaining parity in AST parser: Postfix chains now support mixed index/member access (
x[idx].field,x.a.b) consistently.
Internal Libraries
- New internal library runtime registry/dispatcher: Added centralized load/call routing for runtime-provided modules.
- New internal modules (baseline + platform-backed where available):
<windows>,<time>,<thread>,<fs>,<net>,<http>,<process>,<sync>,<crypto>,<json>,<sqlite>,<regex>,<os>,<ui>,<audio>,<image>,<zip>,<ffi>,<testing>,<metrics>.- HTTP internal API expansion:
http.get(url, headers?, timeout_ms?)http.post(url, body, headers?, timeout_ms?)http.request(method, url, body?, headers?, timeout_ms?)- Windows implementation uses WinHTTP with header dictionary support and timeout wiring.
- NET internal API expansion:
- Added
net.tcp_set_timeout(socket_id, timeout_ms). - Added basic server APIs
net.tcp_listen(host?, port, backlog?)andnet.tcp_accept(listen_socket_id, timeout_ms?). - Extended
net.tcp_connectwith optional timeout argument. - Regex internal API expansion:
- Added
regex.captures_full(pattern, text)returning{ matched, full, groups, named }. - Added named-group support for
(?<name>...)and(?P<name>...). - UI/Windows callback bridge:
poll_eventnow bridges click callback labels into runtime function dispatch.- Event dictionaries can include
callback_invokedandcallback_result.
Fixed
- Range step robustness:
start->end:stepno longer crashes on problematic step values. - Negative-step range behavior:
start->end:-know returns the reverse ofstart->end:k. - Example:
1->10:-2->9, 7, 5, 3, 1 - REPL/executor statement splitting with bracket awareness: Multi-statement splitting now respects
[]nesting (including edge cases around inline comments/blocks). - Custom-type assignment enforcement: Assignment/update paths now validate against stored custom-type constraints more consistently, including nested custom types.
- Tuple typed declaration behavior: Typed tuple declarations now normalize single values into tuple form where required by the new constraint flow.
- LSP diagnostics side-effect safety: Live diagnostics no longer execute user source while editing, preventing runtime side effects during analysis.
Tooling
- LSP parity: Added
char,ord, andget_argsto builtin completions and hover docs. Updated range hover docs for negative-step semantics. - VS Code extension parity: Added
char,ord, andget_argsto builtin metadata used by completion, hover, and semantic token classification. - REPL highlighting parity: Added
char,ord, andget_argsto REPL builtin highlighter. - CLI argument plumbing: Runtime now receives and exposes script arguments passed after the script path (for
get_args). - CMake integration for internal libraries: Build/test targets now compile and link internal library sources and Windows networking/HTTP dependencies (
ws2_32,winhttp,gnurx) when applicable. - Release metadata updates: Version metadata was advanced across release artifacts as part of 1.3.0 preparation (core
VERSION, Windows resource version fields, and VS Code extension package metadata).
Tests
- Expanded module coverage: Added/expanded tests for internal module imports (global and named), module export baselines, and VM named-import execution paths.
- Expanded internal API coverage: Added assertions for HTTP (
post,request), NET (tcp_set_timeout,tcp_listen,tcp_accept), regexcaptures_full, thread channels/pool helpers, and sqlite availability-path behavior. - Expanded type-system regression coverage: Added tests for inferred defaults from literal constraints, nested constraint enforcement, multi-union array element constraints, and valid custom-assignment no-regression paths.
- Expanded builtin/range coverage: Added dedicated tests for
char/ord/get_argsand negative-step range reverse behavior.
Documentation
- New internal-library docs suite: Added comprehensive docs under
docs/INTERNALS/for all new internal modules and shared internal import conventions. - Syntax and stdlib docs updated: Added/updated docs for internal imports, custom-type constraints/defaults,
char/ord/get_args, and revised range-step behavior. - New example: Added
examples/win32gui.iludemonstrating<windows>and<time>integration.
[1.2.5] - 2026-03-15
Added
Core Language
makenumkeyword: Define custom enum categories with typed key-value pairs. Syntax:makenum Category[type] { Key: value, ... }. Access values viaEnum.Category.Member. Supportsint,float,string, and other value types. Works in both tree-walker and VM/bytecode modes.delkeyword: Delete user-defined variables/types/enums withdel name, and delete array/dict entries withdel name[index]. Deleting internals of named imports is blocked, while deleting the alias variable itself is allowed.- Single-quoted strings: Added
'...'string literal support (including escapes), alongside existing"..."and`...`forms.
REPL
- Multi-line history: The REPL now correctly saves and restores multi-line entries in the history file.
makenumsyntax highlighting:makenumkeyword is highlighted and its category name is displayed in type color.delkeyword highlighting:delis recognized as a keyword in REPL colorization.
Tooling
- LSP parity: Added
delto keyword completion lists and hover documentation. Updated declaration-style handling/docs to includemakenumalongsidemaketype. - VS Code extension parity: Added
delto keyword metadata, semantic token keyword set, and TextMate grammar keyword patterns.
Fixed
delenum path support:del Enum.Categorynow deletes user-defined enum categories (same asdel Category). Built-inEnum.Errorsremains protected and cannot be deleted.- Enum evolution support:
makenumnow appends only missing members when the category already exists.del Enum.Category.Membernow removes user-defined enum members, including user-added singleton members on built-in enums. Built-in enum members remain protected. - Dot member access for dictionaries/modules: Dot notation now resolves dictionary keys and named-import exports (
m.key,m.fn()), with bracket notation (m["key"]) retained for compatibility. - Dot mutation parity + import safety: Dictionary dot assignment now mutates the same storage as bracket assignment (
d.k = v,d.k += x). Mutation through named import aliases is now blocked for both dot and bracket assignment forms. - Dot deletion parity:
del d.k(including nested paths likedel d.a.b) now deletes dictionary members the same way as bracket form (del d["k"]). Named import internals remain protected. - Custom matrix type aliases:
type()now correctly returns themaketypealias name even when the alias base ismatrix[...], and matrix defaults now honor the declared matrix element type instead of defaulting toint. - Large integer precision: Arithmetic operations (
**,*,+,-) on integers exceeding 2^53 now correctly fall back to bigint string arithmetic instead of losing precision through IEEE-754 double truncation. Fixed across all three execution paths: tree-walker, VM/bytecode, and AST constant folding. - Dict literal ambiguity in control flow:
if {} { body },while {} { body }, andfor i,v in {} { body }now correctly distinguish between dict literal expressions and body blocks by using a brace-aware scanner (find_body_brace) that skips balanced(),[],{}pairs, strings, and comments. - REPL multi-statement parsing: Multiple statements on one line without semicolons (e.g.,
display(5) display(7)) now correctly execute both statements. Also fixes block comment boundaries between statements. - REPL history: Multi-line entries are no longer silently dropped. History save/load now encodes newlines for safe single-line-per-entry file storage.
[1.2.0] - 2026-03-04
Added
Core Language
assert(condition, message?)function: Verifies a condition is truthy at runtime. On failure, raiseserror[assert]with an optional message hint. ReferencesEnum.Errors.AssertionError.Enum.Errorsmodule: Built-in error constant namespace accessed via dot notation. Constants includeDivisionByZero,TypeError,IndexOutOfBounds,ReferenceError,SyntaxError,ThrowError,AssertionError,InterruptError. Each evaluates to its fully-qualified string name (e.g.,"Enum.Errors.DivisionByZero").- Error messages with Enum references: All error output now includes a dimmed
= Enum.Errors.Xreference line mapping the error to its corresponding Enum constant. error[throw]category:throwstatements now use a dedicatederror[throw]category instead oferror[syntax].- Typed
input()function:input(prompt, type)accepts an optional type parameter for automatic conversion. Supports bare type identifiers (input(">> ", int)) and string type names (input(">> ", "float")). Supported types:int,float,bool. type()returns custom type name: For variables declared with amaketypecustom type,type(v)now returns the custom type name (e.g.,"score") instead of the underlying base type.
REPL
clearcommand: Clears the terminal screen.- Ctrl+C behaviour: Now cancels the current line input instead of exiting the REPL.
- Ctrl+D to exit: Ctrl+D now exits the REPL (previously Ctrl+C).
Tooling
- LSP updates: Added
assertto keyword completions,assertandEnumto builtin completions, and hover documentation forassert,Enum, updatedthrowandmaketype. - VS Code extension updates: Added
assertandcleartosupport.functionpattern, addedEnum.Errors.*syntax highlighting pattern. - VM/Bytecode updates:
assert(),input()with type parameter,Enum.Errors.X,throw, and custom-typeletdeclarations correctly route throughOP_EXEC_SOURCEhybrid execution in--vmmode. - Benchmarks: 8 benchmark categories (arithmetic, loops, strings, arrays, dicts, functions, math, builtins) comparing IlluLang and Python, with an automated runner script.
Tests
- Expanded unit coverage: Test suite now runs 806 tests in the current 1.2.0 branch validation run.
- New regression suites: Added dedicated coverage for bitwise behavior, indexing paths, compound assignments, and string-builder flows.
- BigInt + VM parity checks: Added/expanded bigint operation coverage across both tree-walker and VM execution paths.
Fixed
- VM
display()bool output: In VM mode,display(true)anddisplay(false)printed the wrong value because the inline handler readargs[0].i(integer field) instead ofargs[0].b(boolean field). - VM
OP_STORE_VARmemory leak: The cached fast-path for variable assignment leaked heap-allocated values (strings, arrays, dicts, functions) when overwriting them with scalar types (int, float, bool, none). Addedfree_value()guard for heap types before scalar overwrites. dict_get()clone leak: The default-value fallback path performed an unnecessaryclone_value(&(Value){0})that was immediately overwritten by the real default, leaking the first clone.- Sanitizer leak regressions (bigint/scalar text ownership): Fixed leaks in scalar numeric value string ownership paths by tightening clone/free behavior for
T_INT/T_FLOATtext payloads, includingget_varcopy semantics and VM variable/index fast-path handling. - JSON parser missing escapes:
json_parse()did not handle\b(backspace),\f(form feed), or\uXXXX(Unicode escape) sequences. Added support for all three, with proper UTF-8 encoding for Unicode code points. random()deterministic output:random()andrandom_int()never calledsrand(), producing the same sequence on every run. Now seeds the PRNG withsrand((unsigned int)time(NULL))on first use.
Performance
sort()algorithm upgrade: Replaced O(n²) selection sort with O(n log n) bottom-up merge sort for both default (numeric) and custom comparator paths. Significant improvement for large arrays.- VM
push()— O(n²) → O(1) amortized: NewOP_MUT_PUSHopcode performs in-place array push with geometric capacity doubling (arr_cap). Eliminates deep-clone of the entire array on every push. 50k pushes: 46.7s → 0.052s (900× speedup). - VM
dict_set()— O(n²) → O(1) amortized: NewOP_MUT_DICT_SETopcode performs in-place dict mutation viaget_var_ref(). Eliminates full dict clone on every set. 50k dict_set: 50s+ → 0.095s (500×+ speedup). - VM
slice()— O(n) clone eliminated: NewOP_SLICE_VARopcode reads array by reference and clones only the slice elements, not the entire source array. 50k slice(arr, 0, 10): 99s → ~0.0s. - VM
contains()— O(n) clone eliminated: NewOP_CONTAINS_VARopcode scans array by reference without cloning. 10k contains checks: 2s → ~0.0s. - VM string concatenation — O(n²) → O(n):
OP_ADD_TO_VARnow usesstr_len/str_capfor amortized geometric growth, avoidingstrlen()and repeatedrealloccopies. 5k string concatenations: ~15s → ~0.0s. - ~60 VM inline builtins: String, math, type, array, dict, and higher-order functions now execute directly in the VM dispatch loop, bypassing the treewalker fallback.
- Treewalker
push()steal-buffer: Avoids O(n) element-by-element clone by stealing the argument's array buffer.
Memory Safety
OP_MUT_PUSHrealloc NULL check: Guards against allocation failure during in-place array growth.- String append realloc NULL check: Guards against allocation failure during
OP_ADD_TO_VARstring amortized growth. - String repetition overflow guard: Caps string repetition at 100M characters; checks malloc result.
- Array repetition overflow guard: Caps array repetition at 10M elements; checks malloc result.
vm_value_to_stringallocation checks: Allmalloc/realloccalls in array, tuple, and dict string rendering now check for NULL.dict_keysmalloc check: Guards against allocation failure when building keys array.system_execrealloc check: Guards against allocation failure when reading command output.
[1.1.0] - 2026-03-03
Added
Core Language
- Full tuple support: Tuples are immutable, heterogeneous ordered sequences created with parenthesised syntax:
(1, "hello", true). let-declared tuples require at least 2 elements and enforce element-type annotations viatuple[int|string].var-declared tuples follow dynamic semantics: 0 elements →none, 1 element → unwrapped to its type, 2+ → tuple.- Read-only indexing:
t[0],t[-1](negative wraps). Index assignment is a compile-time error. - Element-wise arithmetic between tuples of equal length:
(1, 2) + (3, 4)→(4, 6). len()returns the number of elements.type()returns"tuple(int|string)"format with unique element types.- Custom type definitions (
maketype):maketype name {type_annotation}registers a user-defined type alias. - Example:
maketype point {tuple[int|int]}thenlet p: point = (3, 4). - Custom types are validated in type annotations and participate in
lettype checking. - Named module imports:
import name "file.ilu"imports all exports from a module as a dictionary bound toname. - Access exports with
name["export_name"]. - Multiple imports supported:
import a "a.ilu", b "b.ilu". throwstatement/expression:throw("message")raises a runtime error caught bytry/insteadblocks.- Non-string arguments are auto-converted via
to_string(). - Works as both statement and expression form.
Tooling
--bytecodeCLI flag:illulang --bytecode file.iludumps the compiled bytecode listing without executing.- Shows each instruction with opcode name, operands, and jump targets.
- LSP server updates: Full support for v1.1.0 features and previously missing builtins.
- Added
throw,maketype,tupleto keyword completions and hover docs. - Added 23 missing builtins to completions and hover:
is_tuple,to_bool,random_int,format,sprintf,insert,remove_at,find_index,any,all,dict_merge/merge,dict_items/entries/items,is_dir,is_file,read_lines,trim_left/ltrim,trim_right/rtrim,throw. maketypedeclarations recognised as user-defined types with Struct symbol kind, semantic highlighting, and document outline support.- Document links updated from
usetoimport; supports named import syntax (import name "path"). - VS Code extension updates: Comprehensive v1.1.0 support and gap-fill.
- TextMate grammar:
throwadded to control keywords,maketypeto declarations withentity.name.typescope, 28 builtins added tosupport.function. - Semantic tokens:
maketypedeclarations highlighted as type declarations. - Document symbols/outline:
maketypeblocks appear as Struct entries. - Completions: user-defined types from
maketypeoffered with Struct kind. - Go-to-definition:
maketypedeclarations navigable. - Added 10 missing keywords to provider data:
match,case,default,switch,none,yield,async,await,throw,maketype. - 5 new snippets: named import, tuple, maketype, throw, try-throw.
Fixed
- Nested type annotations:
array[array[int]],dict[string, array[float]], and other nested collection annotations now parse correctly instead of producing a spurious syntax error. - Variable type metadata for globals: Fixed a pre-existing bug where
let-declared global variables had uninitialiseddeclaredfield, causingtype()to return incorrect type names for strict globals.
[1.0.0] - 2026-03-02
Added
Core Language
- 64-bit integers:
inttype useslong longinternally, supporting values up to ±9.2×10¹⁸. - Number bases: Binary (
0b1010), octal (0o17), hexadecimal (0xFF), and explicit decimal (0d42) literals. - Scientific notation:
1e9,2.5e-3,6.022e23parsed as float literals. - Base arithmetic propagation: Same-base arithmetic preserves the base (e.g.
0xFF + 0x01→0x100). base()builtin:base(value, target)converts to base 2/8/10/16;base(value)queries current base.- Full number display: Numbers print in Python-style full-digit format (no
%gtruncation). - Power operator (
^):2 ^ 10→1024. O(log n) exponentiation by squaring. Compound^=supported. - Euclidean division (
//):17 // 3→5. Compound//=also supported. - Modulo operator (
%):17 % 3→2. Compound%=also supported. - Pipe token (
|): Used for type unions in annotations (e.g.int|float). Not a pipeline operator. anytype: Wildcard type annotation that accepts any value.nonetype: First-classnoneliteral withT_NONEtype.is_none(value)for checking.- Switch/Case statement:
switchas an alias formatch- fully interchangeable syntax. - Pattern matching destructuring:
case [a, b]for arrays,case [head, ...tail]for rest-pattern. - Default parameter values:
fn greet(name, greeting = "Hello") { ... }. - Multi-line strings: Triple-quoted
"""..."""literals preserving newlines. - String indexing:
str[i]returns char at indexi; negative indices count from end. - Dictionary iteration:
for k in dict { }for keys;for k, v in dict { }for key-value pairs. - Custom increment/decrement step:
++3x/x++2(prefix/postfix, arbitrary step). Same for--. - Tuple unpacking:
let [a, b] = [1, 2]. - Error handling:
try/insteadblocks. - Module system:
import/exportfor code reuse.
Matrix Type
- Matrix type: 2D grid declared with
let m: matrix[int] = R*Cor literal[[1,2]:[3,4]]. - Matrix builtins:
is_matrix(),mat_rows(),mat_cols(),mat_get(),mat_set(),mat_transpose(),mat_flatten(). - Matrix double-indexing:
m[row][col]for element access and assignment. - Array arithmetic:
[5] + 2(extend),[5, 8] - 1(shrink),[7] * 2(repeat),[5, 6] ^ 2(to matrix).
Intent-Oriented Programming
- Intent system:
intent,achieve,otherwisewith priority andwhenguards. - Generator intent handlers: Intent bodies can
yield- yielded values collected as an array. - Generators with
yield: Functions containingyieldautomatically become generators.
Functions and Closures
- Closures with variable capture: Lambdas (
lm) capture variables from enclosing scope viafunction_capture_closure(). - Reference cells:
ref(value),deref(cell_id),ref_set(cell_id, value)for shared mutable state. - Function references: Named functions (including builtins) assignable to variables:
var f = display; f("hello"). - Function type annotations:
let f: function[int, int] -> int = add.
Async/Await
- Async/Await:
async(fn),await(task_id),await_all(t1, t2, ...)for cooperative async execution. achieve_async()builtin:achieve_async("name", args...)creates deferred intent tasks.is_pending()builtin: Check whether a task is still pending.task_count()builtin: Return the number of async tasks created in the current session.
Builtins
- String builtins:
len(),upper(),lower(),trim(),trim_left()/ltrim(),trim_right()/rtrim(),substr(),split(),join(),replace(),starts_with(),ends_with(),index_of(),repeat(),char_at(). - Array builtins:
push(),pop(),slice(),insert(),remove_at(),contains()/includes(),find(),find_index(),any(),all(),reverse(),sort(),unique(),flatten(),max(),min(),range(). - Dict builtins:
dict(),dict_get(),dict_set(),dict_has(),dict_remove(),dict_keys(),dict_values(),keys(),values(). - Dict helpers:
dict_merge()/merge(),dict_items()/entries()/items(). - Functional builtins:
map(),filter(),reduce(),foreach(),enumerate(),zip(),sum(). - Trigonometry builtins:
sin(),cos(),tan(),asin(),acos(),atan(),atan2(). - Math builtins:
abs(),sqrt(),pow(),floor(),ceil(),round(),log(),log10(),exp(),random(),random_int(). - File I/O builtins:
read_file(),write_file(),append_file(),exists(),list_dir(),read_lines(),file_delete(),file_copy(),file_move(),is_dir(),is_file(). - System builtins:
clock(),exit(),env_get(),env_set(),env_list(),getcwd(),chdir(),system_exec(),input(). - Path builtins:
path_join(),path_dir(),path_base(),path_ext(). - Type/Conversion builtins:
type(),is_int(),is_float(),is_bool(),is_string(),is_array(),is_dict(),is_function(),is_matrix(),is_empty(),is_strict(),to_int(),to_float(),to_string(),to_bool(). - Formatting builtins:
format()/sprintf()for printf-style string formatting. - String builder:
sb_new(),sb_append(),sb_to_string(),sb_len(),sb_count(),sb_clear(). - Typed array constructors:
int_array(),float_array(),bool_array(),string_array(). json_parse()/json_stringify(): JSON serialisation/deserialisation.- I/O builtins:
display(),input(). - Intent introspection builtins:
intents(),handlers().
VM (Bytecode Compiler)
- VM index/subscript read:
OP_INDEXfor reading array elements, string chars, and dict values. - VM indexed assignment:
OP_SET_INDEXfor writingarr[i] = valandd["key"] = valin-place. - VM compound assignment: All 9 compound operators desugared at AST level.
- VM increment/decrement: Prefix/postfix operators desugared to assignments.
- VM function definition:
OP_DEF_FUNCcompilesfndeclarations to bytecode. - VM intent definition:
OP_DEF_INTENTcompilesintent/otherwisehandlers to bytecode. - VM runtime diagnostics: Explicit errors for invalid operands, undefined variables, invalid calls, invalid jumps, and division by zero.
- VM fail-fast: Execution aborts on runtime errors instead of continuing with fallback values.
- VM error context: Error messages include bytecode PC and opcode for debugging.
LSP Server
- Diagnostics: Real-time error reporting on open/change.
- Hover docs: Documentation for 60+ builtins on hover.
- Completions: Keywords, builtins, and user-defined symbols.
- Semantic tokens: Variables and functions highlighted with declaration/readonly modifiers.
- Document symbols: Outline view with functions, variables, and intents.
- Go-to-definition: Jump to
fn/var/let/intentdeclarations. - Find references: All occurrences of a symbol in the current document.
- Rename: Rename symbols across the document with prepare-rename support.
- Folding ranges: Brace-delimited collapsible regions.
- Signature help: Parameter hints for builtin and user functions.
- Document formatting: Normalize indentation based on brace depth.
- Range formatting: Format a selected range of lines.
- Declaration: Jump to declaration (aliases definition - in IlluLang, declaration = definition).
- Document highlight: Highlight all occurrences of the word under cursor.
VS Code Extension
- Syntax highlighting: TextMate grammar for all language constructs.
- Snippets: Code snippets for common patterns.
- Client-side diagnostics: Error detection without LSP.
- Hover provider: Builtin docs on hover.
- Completion provider: Keyword, builtin, and symbol completions.
- Semantic tokens provider: Client-side semantic highlighting for keywords, builtins, types, variables, strings, numbers, and comments.
- Document symbol provider: Outline view for
.ilufiles. - Go-to-definition provider: Jump to declarations without LSP.
- Find references provider: Find all occurrences of a symbol.
- Rename provider: Rename symbols across the document.
- Folding range provider: Brace-based and comment-based folding.
- Signature help provider: Parameter hints for builtins and user functions.
- Formatting provider: Auto-indent based on brace depth.
- Stop/restart commands:
IlluLang: Stop Language ServerandIlluLang: Restart Language Server. - Markdown syntax injection: Fenced
ilu/illulangcode blocks get highlighting.
Tooling
- CMake install target:
cmake --installcopies binary, docs, and examples. - CMake presets: Debug, sanitizer, and coverage configure/build/test presets.
- Windows installer: NSIS-based installer with PATH, file associations, Start Menu shortcuts.
- Automatic version sync:
VERSIONfile synced to resource file,package.json, and NSIS installer. - CLI
--stop-extension: Uninstall the VS Code extension from the command line. - Bat scripts:
-v/--install-extto install.vsix;--stop-extto uninstall. - Unix update script:
scripts/sh/update.shfor pull-build-test workflow. - Fuzzer harness:
tests/fuzz/fuzz_target.cwithFuzzerTestOneInput. - CI/CD: GitHub Actions for build, test, sanitizer, and release.
- Sanitizer CI: Linux AddressSanitizer + UndefinedBehaviorSanitizer job.
.gitattributes:.ilu→ IlluLang on GitHub (#7500B0);.inc→ C.
Tests and Examples
- 756 tests: Comprehensive coverage of syntax, runtime, VM, builtins, and edge cases.
- Example files:
arithmetic.ilu,arrays.ilu,control_flow.ilu,dictionaries.ilu,error_handling.ilu,file_io.ilu,functional.ilu,functions.ilu,hello_world.ilu,intents.ilu,math.ilu,matrices.ilu,strings.ilu,system.ilu,two_sum.ilu,unpacking.ilu,variables_and_types.ilu, and more.
Changed
- Range operator
->is exclusive-end:1->5produces[1, 2, 3, 4], matching Pythonrange()semantics. for i in arrayiterates values: Usefor i, v in arr { }for index + value.for i in stringiterates characters: Usefor i, ch in str { }for index + character.range()supports single-arg:range(n)equivalent torange(0, n).- Division semantics:
/returns int when evenly divisible, float otherwise.//for floor division. while/ifoptional parentheses: Conditions no longer require parentheses.- Logical/bitwise dual-purpose:
and,or,xor,notare logical on booleans, bitwise on integers. type()output expanded: Returns"array[int, float]","dict[string, int]","matrix[int]".len()expanded: Works on dicts (key count) and matrices (rows × cols).is_empty()expanded: Works on dicts and matrices in addition to strings and arrays.- Error output colourised: Bold red labels, yellow categories, blue line numbers, cyan hints.
- Runtime source preprocessing: Comments (
##) stripped before execution while preserving strings and line structure.
Fixed
- Dict arithmetic:
{} + 1produces a clear error instead of undefined behavior. - VM value ownership: Consistently frees temporaries and stack leftovers on all exit paths.
- Compound
/=: Now correctly returns float (consistent with/semantics). - Closure deep clone:
function_capture_closure()deep-clones captured values (fixes use-after-free). - Closure capture invocation:
function_capture_closure()was never called for lambdas - now invoked properly. - Closure captures on clone:
duplicate_function_value()now deep-copies capture data. value_to_stringbuffer overflow: Array/matrix strings use dynamicmalloc/realloc.max()/min()shallow copy: Both clone the result value and free arguments properly.split()capacity: Dynamicreallocgrowth instead of hardcoded 64-element limit.substr()/trim()stack buffers: Heap-allocated instead of fixedchar[1024].mat_setmutation: Now mutates the variable directly.clone_valuebase lost: Base field now properly copied when cloning.var...lmchunker: Extended to consume trailing)after lambda body.- Ghost builtins: Removed duplicate
file_read/file_write/file_appendentries. - Hot-loop cache safety: Cached refs invalidated on
push_frame/pop_frame. - Comment stripping parity: Execution and import paths apply the same preprocessing.
- LineNoise history: Fallback linenoise writes to disk and frees history properly.
- Sanitizer CI test path: Fixed sanitizer workflow to run tests from the sanitizer build output path.
- REPL cursor drift on arrows: Fixed ANSI cursor restore when visual column is 0 (avoids prompt shifting/replacing while editing).
Removed
- C-style
forloops:for (init; cond; step)removed in favour offor i in start->end { }range loops. Attempting C-style syntax produces a helpful error.
Performance
++/--fast-path: Dedicated cached dispatch (PD_INC) with direct variable pointer for O(1) hot loops.- Compound assignment fast-path:
+=,-=,*=,/=,%=use compiled integer fast-path. - Loop hot-path: Tight loops use cached statement plans and compiled integer fast-paths.
^optimised: O(log n) exponentiation by squaring.
Notes
- This CHANGELOG starts at
1.0.0for the new repository baseline. - Pre-1.0 development history is intentionally omitted.