Skip to content

release-0.9.4

Compare
Choose a tag to compare
@skx skx released this 28 Jul 11:45
· 67 commits to master since this release
9fab472

release-0.9.4

This release features the addition of a new approach for iterating over the contents of arrays, hashes, and string-values with the foreach keyword. The new support is documented in the README.md, as well as being demonstrated in our sample code.

Our literal regular expressions were enhanced to allow access to capture groups. For example the following works as you might expect:

ip = "192.168.1.1";

if ( ip ~= /([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/  ) {
   printf("Matched! %s.%s.%s.%s\n", $1, $2, $3, $4 );
}

Here we see the capture groups are accessable in $1, $2, etc. as they would be in Perl scripts.

The example above also demonstrates a new enhancement to the built-in facilities, we now support outputting via format strings with either printf, and the use of sprintf to generate such strings.

Finally the range-operator allows creation of arrays containing contiguous integers, for example 1..10 creates and returns an array with the value [1,2,3,4,5,6,7,8,9,10].

In addition to these new features our internal codebase continued to improve, several linter warnings were resolved, and our internal implementation cleaned up a little more.