Skip to content

Releases: ArkScript-lang/Ark

ArkScript v4.5.2

06 May 17:05
Immutable release. Only release title and notes can be modified.

Choose a tag to compare

Changed

  • fix compiler segfault when there is no variable to mark as unreachable

ArkScript v4.5.1

05 May 20:35
Immutable release. Only release title and notes can be modified.

Choose a tag to compare

Added

  • special error message when trying to use a hidden symbol due to importing

Changed

  • avoid generating LOAD_FAST_BY_INDEX instructions when trying to fetch a potentially unreachable variable

ArkScript v4.5.0

14 Apr 18:04
Immutable release. Only release title and notes can be modified.
1f54076

Choose a tag to compare

Breaking changes

  • removed list:permutationsWithReplacement (deprecated in 4.4.0)
  • list:permutations now produces real permutations and not combinations (deprecated in 4.4.0)

Added

  • added new macro $gensym, to generate a unique symbol identifier to use in macros
  • append, concat, and pop can be used as values
  • new ptr command for the debugger, printing the VM pointers (ip, pp, sp)
  • compile time arity check when performing a tail call
  • string:utf8len to compute the number of codepoints in a string
  • new trace command for the debugger, printing the last executed instructions
  • ability to build ArkScript statically via CMake using -DARK_STATIC=On

Changed

  • all paths inside if should return a value, when used as an expression. If an else branch is missing, nil will be returned
  • new compile time error when trying to use append!, concat!, pop!, @= and @@= as values
  • arguments in tail calls are loaded by value and not by reference
  • string:ord checks that it get only 1 utf8 character

ArkScript v4.5.0-1

01 Apr 06:48
Immutable release. Only release title and notes can be modified.
1741eee

Choose a tag to compare

ArkScript v4.5.0-1 Pre-release
Pre-release

Breaking changes

  • removed list:permutationsWithReplacement (deprecated in 4.4.0)
  • list:permutations now produces real permutations and not combinations (deprecated in 4.4.0)

Added

  • added new macro $gensym, to generate a unique symbol identifier to use in macros
  • append, concat, and pop can be used as values
  • new ptr command for the debugger, printing the VM pointers (ip, pp, sp)
  • compile time arity check when performing a tail call
  • string:utf8len to compute the number of codepoints in a string

Changed

  • all paths inside if should return a value, when used as an expression. If an else branch is missing, nil will be returned
  • new compile time error when trying to use append!, concat!, pop!, @= and @@= as values
  • arguments in tail calls are loaded by value and not by reference
  • string:ord checks that it get only 1 utf8 character

ArkScript v4.4.1

19 Mar 06:09
Immutable release. Only release title and notes can be modified.
cabf9c8

Choose a tag to compare

Breaking changes

  • in function calls, the function to call is now always evaluated first
  • in function calls, the arguments are now evaluated from left to right

Added

  • the bytecode reader can print the argument of a PUSH_RETURN_ADDRESS instruction as a hex number
  • new super instruction CALL_SYMBOL_BY_INDEX to optimise a LOAD_FAST_BY_INDEX followed by a CALL

Changed

  • instruction counter in the bytecode reader are displayed in hex, and count each instruction instead of each byte
  • let / mut / set push a copy of their value when used as expression (instead of an internal reference)

Removed

  • removed a nearly never emitted GET_CURRENT_PAGE_ADDR instruction, since it's now always optimised with CALL into a CALL_CURRENT_PAGE instruction
  • removed list:size, dict:size, dict:contains, math:even and math:odd since they were deprecated since ArkScript 4.2.0

ArkScript v4.4.0

13 Mar 13:20
Immutable release. Only release title and notes can be modified.
704d407

Choose a tag to compare

Deprecations

  • list:permutations is deprecated in favor of list:combinations
  • list:permutationsWithReplacement is deprecated in favor of list:combinationsWithReplacement

Added

  • new debugger commands: stack <n> and locals <n> to print the values on the stack and in the current locals scope
  • custom format specifiers for lists:
    • :n to remove surrounding brackets,
    • :c / :nc to use , as a separator instead of ,
    • :l / :nl to use \n as a separator,
    • :?s to format as an escaped quoted string,
    • :s to format as a quoted string
  • format can use format specifiers for integers: b, #b, B, #B, c, d, o, x, #x, X, and #X if the argument is an integer
  • display a warning to stderr when using a deprecated function/value (checks for @deprecated inside the attached comment of functions / values)

Changed

  • pop! can return the removed value
  • @= and @@= return the inserted value
  • append! and concat! return the modified list
  • let, mut and set can return the assigned value
  • fix formatter: when the condition of a while loop is on multiple lines, add the right amount of indentation before it

ArkScript v4.3.3

01 Mar 11:29
Immutable release. Only release title and notes can be modified.
946d9b0

Choose a tag to compare

Changed

  • runtime type checking errors are on stderr instead of stdout
  • runtime exceptions are on stderr instead of stdout

ArkScript v4.3.2

28 Feb 17:33
Immutable release. Only release title and notes can be modified.
763d663

Choose a tag to compare

Changed

  • VM error outputs are on stderr instead of stdout

ArkScript v4.3.1

28 Feb 16:32
Immutable release. Only release title and notes can be modified.
v4.3.1

Choose a tag to compare

Added

  • new TAIL_CALL_SELF instruction to take care of tail calls in functions: jumps to address 0 in the current page, and reset the scope

Changed

  • error outputs are on stderr instead of stdout

ArkScript v4.3.0

26 Feb 16:56
Immutable release. Only release title and notes can be modified.
v4.3.0
3654654

Choose a tag to compare

Breaking change

  • in macros, len, empty?, head, tail, @ have been renamed to $len, $empty?, $head, $tail and $at. Those versions only work inside macros too, inside of having a weird dichotomy where they sometimes got applied and sometimes not

Added

  • apply function: (apply func [args...]), to call a function with a set of arguments stored in a list. Works with functions, closures and builtins
  • +, -, *, / and many other operators can now be passed around, like builtins. This now works: (list:reduce [1 2 3] +), where before we would get a compile time error about a "freestanding operator '+'"
  • builtin__slice builtin, for strings and lists: (builtin__slice data start end [step=1]) ; this is an experimentation and may be removed in future versions
  • arguments of builtin macros are properly type-checked and will now raise runtime errors if the type is incorrect
  • -fno-cache cli option to disable the creation of the bytecode cache folder __arkscript__
  • in the CLI, file can be - to read code from stdin

Changed

  • when using the cli flag -fdump-ir, the IR is dumped in the cache folder