Wi Programming Language
Try
Download
Wiki
Source code
All versions
New features
- Add std::call
- Add wi_abi_version and wi_check_version/WI_CHECK_VERSION
- Include the main script path as the first item in os::args
- Add find to array, map and string
- Add io::stdin, io::stdout, and io::stderr
Changes
- std::real now rejects blank strings and skips trailing spaces
- std::isfunction now returns true for foreign (C) functions too
- Overflowing hex/octal/binary literals are now an error
- std::assert now validates the message before checking the condition
- io::writebytes now appends a NUL byte
- Libraries now live as long as the state does
- Speed up new a, b merging and array->insertat
Bugs fixed
- Fix import crashes with foreign libraries (NULL module, missing exe path)
- Fix C stack overflow not being detected through foreign calls
- Fix off-by-one in the global and constant limits
- Fix missing write barriers in variable definition
- Fix function fields recursing into themselves
- Fix implicit returns not getting TCO
- Fix switch not requiring its closing brace
- Fix wi_pcall leaving the callee's upvalues open on failure
- Fix the REPL returning EXIT_SUCCESS instead of the real exit code
- Fix std::equals missing the C stack overflow check
- Fix io::writebytes error messages
- Fix wi_read_stream failing on pipes
- Fix array->slice with an empty slice
- Fix off-by-one in stack accounting in returns
- Fix interrupts being ignored after foreign calls
- Fix string->select/where leaking on error
- Fix string->each not returning the string
- Fix lexer errors pointing at the wrong character
- Fix std::try hanging forever on stack overflow
- Fix std::real ignoring the sign in hex/octal/binary strings