Skip to content

Releases

0.1.0

Choose a tag to compare

@phosxd phosxd released this 06 Aug 21:42

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 & break instructions, which are used to exit a loop iteration early or stop the loop entirely.
  • af5a10d Added for loop instruction. This can be used to iterate over the items inside of a STR, ARR, or INT. The performance & functionality is the same as the while instruction, but it's a lot easier to write out for iterating on a set of variants.
  • 33ff6b8 Added REF & PTR data types, both for seamlessly pointing back to another variant, but only REF can safely do it.
  • 586cf76 Added built-in function system, which can execute system commands & return the exit code.
  • 072e4cd Added IO.signal function, which calls the given function whenever the specified system signal is passed to the program. Also added IO.SIGNAL constant containing every supported system signal code accessible by key.
  • 586cf76 Added IO.key_in function, which waits for then returns a single character input, instead of waiting for a new-line.
  • d514157 Added rand built-in function, which returns a random number in the range of the given minimum & maximum integer.
  • 842bed5 Added set_seed built-in function, which sets the seed for all subsequent rand calls 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).bind type methods.

  • a7dafec Added safe mode interpreter flag. Enabling safe mode prevents the importing of unsafe modules or use of potentially unsafe functions.
  • 685a992 Added -step interpreter flag which lets you execute instructions one by one, for more intricate inspection.
  • 685a992 Added -srd or -strip-runtime-debug build 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 \e in a string literal. Useful for putting in custom ANSI sequences.
  • 016ae46 Added ability to use a STR variable as a module name in the import instruction via the @ prefix.
  • 016ae46 Added ability to add two MAP variants together to merge them, the right operand overwrites existing keys in the left operand if needed.
  • 016ae46 Added ability to use negative indices in ARR accessor.
  • 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 none type being ignored.
  • 06e998b Fixed negative number declarations often requiring grouping.
  • 016ae46 Fixed BOOL to STR type 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_now to Time.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.

0.0.1

Choose a tag to compare

@phosxd phosxd released this 19 Jul 17:54

First demo release.