Repository navigation
Releases
Releases · phosxd/Ity
0.1.0
This beta release introduces an absolute ton of new features, fixes, & performance upgrades!
Below is a list of the most important additions & changes, for a full list see the repo's commit history.
What's new:
- 7045361 Added
continue&breakinstructions, which are used to exit a loop iteration early or stop the loop entirely. - af5a10d Added
forloop instruction. This can be used to iterate over the items inside of aSTR,ARR, orINT. The performance & functionality is the same as thewhileinstruction, but it's a lot easier to write out for iterating on a set of variants. - 33ff6b8 Added
REF&PTRdata types, both for seamlessly pointing back to another variant, but onlyREFcan safely do it. - 586cf76 Added built-in function
system, which can execute system commands & return the exit code. - 072e4cd Added
IO.signalfunction, which calls the given function whenever the specified system signal is passed to the program. Also addedIO.SIGNALconstant containing every supported system signal code accessible by key. - 586cf76 Added
IO.key_infunction, which waits for then returns a single character input, instead of waiting for a new-line. - d514157 Added
randbuilt-in function, which returns a random number in the range of the given minimum & maximum integer. - 842bed5 Added
set_seedbuilt-in function, which sets the seed for all subsequentrandcalls in case you need some determinism. - 98ba86f Added type methods system. This allows modules to define functions that can be called on a variable of the specified type. (E.g.
var ARR array = [1,2,3]; array.erase:[0];). - 98ba86f / 062dc14 / 23b362f Added
STR.raw,ARR.erase,MAP.erase,MAP.keys,MAP.has, &MAP(f).bindtype methods.
- a7dafec Added safe mode interpreter flag. Enabling safe mode prevents the importing of unsafe modules or use of potentially unsafe functions.
- 685a992 Added
-stepinterpreter flag which lets you execute instructions one by one, for more intricate inspection. - 685a992 Added
-srdor-strip-runtime-debugbuild flag, which removes error strings & debug branches from the final binary for an even smaller size. - 0e3ede3 Added ability to optionally compile the interpreter with specific modules included or excluded.
- 472b0fb Added ability to easily input the escape character using
\ein a string literal. Useful for putting in custom ANSI sequences. - 016ae46 Added ability to use a
STRvariable as a module name in theimportinstruction via the@prefix. - 016ae46 Added ability to add two
MAPvariants together to merge them, the right operand overwrites existing keys in the left operand if needed. - 016ae46 Added ability to use negative indices in
ARRaccessor. - a0d2d40 Added ability to define a custom iterator function in map objects which will be used by for loops.
What's changed:
- 1c32af5 You can now omit an explicit type in variable declarations to automatically infer the type.
- 06e998b Fixed
nonetype being ignored. - 06e998b Fixed negative number declarations often requiring grouping.
- 016ae46 Fixed
BOOLtoSTRtype cast returning "0"/"1" instead of "true"/"false". - 016ae46 Fixed importing from a child scope not putting the module in the correct scope.
- 7045361 Now flushes output immediately after calling
IO.out. - 016ae46 Changed
Time.system_nowtoTime.snow. - 4fb1e04 Use sane defaults for variable declarations for each data type, instead of forcing you to set a value.
- 90a9613 Fix seg-fault crash when trying to run an operator without a first operand, now safely throws an error.
Moving forward:
I will try to put more focus on trying to make the source code more read-able, with a better layout, & with less ambiguous functionality.
But apart form that, the priority is implementing a file access API & to add support for importing other Ity scripts as modules (which requires reworking how functions & scopes are preserved).
After those 2 main goals have been completed, I absolutely need to implement function traced errors & show the actual code it failed on, not just the line/column numbers.