Fixed imports, exec, and library improvements
This release contains an accumulation of bugfixes to the standard library and some interpreter improvements since the last release. There is one breaking change, which concerns the newly introduced feature of de-duplicated imports added to load('module')
.
Features
exec(command, []args, stdin, outputCallback)
is a new builtin function that allows Ink programs to spawn child processes in the operating system and is the primary method of communicating with other software for Ink programs. Access to this API is gated behind the--no-exec
andPermissionsConfig.Exec
flags.- Imports loaded with the
load()
builtin are now de-duplicated, so only one copy of the imported file is created in one running Context, on first import, which saves memory and allows for multiple files to import the same single single instance of a value. - Ink is now available as a Go package, at
github.com/thesephist/ink/pkg/ink
aspackage ink
. - Ink is now continuously tested with Travis CI on
master
branch and all pull requests.
Fixes
- Improvements and bugfixes to
std
andstr
standard library functions. In particular, more documentation is added andstd.writeFile
fixes a bug related to truncating files on save. - Ink used to crash when there was an error evaluating the left side of an assignment, or when there were certain syntax errors in composite literals. Both of these now result in an Ink runtime error instead.