Skip to content

Releases

MiniScript 2.0.0

Choose a tag to compare

@JoeStrout JoeStrout released this 23 Oct 16:14

MiniScript 2 is a complete rewrite of MiniScript 1, focused on performance. See What's New in MiniScript 2 for the details, but here are the highlights:

  • Up to 45X faster
  • Better error handling
  • Frozen lists and maps
  • Computed lists
  • Mark-and-sweep garbage collection, even in C++

This is the biggest update to MiniScript since its first release in 2017. Today's release includes command-line builds for Windows, Mac, and Linux, as well as a C# version for any platform that has .NET. It also includes an updated MiniScript Manual, a new Command-Line MiniScript document, a library of generally helpful utility modules, and some example programs (including a Tetris game you can play right in your terminal!).

If you're embedding MiniScript in your own programs, the underpinnings and interfaces have changed a bit. Upgrading is not too difficult, but should be approached with patience. C/C++ users should see the C++ Host App Update Guide; a similar guide for C# is coming soon. You are also encouraged to join the Discord server and reach out for assistance.

Download the latest package for your platform at the Releases page.

MiniScript 2.0 FC7

MiniScript 2.0 FC7 Pre-release
Pre-release

Choose a tag to compare

@JoeStrout JoeStrout released this 17 Oct 17:41

Final candidate 7 of MiniScript 2.0. Changes since FC6:

  • Fixed a small typo in the NewInMS2 doc.
  • Fixed a tricky bug where an unused self argument could leak into the next call.
  • Fixed nested import bug on the web, or any time an import module called yield or wait.
  • Updated lib modules with the latest & greatest improvements from Soda and raylib-miniscript.

MiniScript 2.0 FC6

MiniScript 2.0 FC6 Pre-release
Pre-release

Choose a tag to compare

@JoeStrout JoeStrout released this 13 Oct 22:46

Final candidate 6 of MiniScript 2.0. Changes since FC5:

  • Fixed an issue with MS_EXE_DIR and MS_SCRIPT_DIR, resulting in the lib folder not being found for imports.
  • Changed shellArgs to include the script path as shellArgs[0], matching command-line MiniScript 1.x.
  • Added CommandLine documentation (in .md and .pdf formats).
  • Cleaned up the examples folder.
  • Changed release format to a zip file containing executable, docs, and examples.

MiniScript 2.0 FC5

MiniScript 2.0 FC5 Pre-release
Pre-release

Choose a tag to compare

@JoeStrout JoeStrout released this 07 Oct 16:32

Final candidate 5 of MiniScript 2.0. Changes since FC4:

  • The REPL no longer exits when you press Control-C; instead this only interrupts any running script or partial input.
  • Garbage collection now happens periodically even in a tight loop without wait or yield.
  • String replication (e.g. s * n) now operates in linear time rather than quadratic.
  • Assembler now properly handles non-ASCII string literals. (The assembler is an undocumented feature and may be removed in the future.)
  • key.available on POSIX platforms now returns false when stdin is closed.
  • Calls to intrinsic functions have been optimized (avoiding some unnecessary string creation/destruction).
  • input now flushes output to stdout to ensure the prompt appears before your input.
  • The release assets now include an updated MiniScript Manual PDF.

MiniScript 2.0 FC4

MiniScript 2.0 FC4 Pre-release
Pre-release

Choose a tag to compare

@JoeStrout JoeStrout released this 03 Oct 23:08

Final candidate 4 of MiniScript 2.0. Changes since FC3:

  • REPL no longer exits upon a blank input.
  • The lexer now treats U+200B (zero-width space) and U+FEFF (byte-order mark) as whitespace, rather than causing a compiler error.
  • Reworked exec to avoid running out of handles (resulting in a segfault after 64 exec calls).

MiniScript 2.0 FC3

MiniScript 2.0 FC3 Pre-release
Pre-release

Choose a tag to compare

@JoeStrout JoeStrout released this 29 Sep 17:19

Final candidate 3 of MiniScript 2.0. Changes since FC2:

  • Further fix for issue #16 (the fix for which was incomplete in FC2).
  • Improved performance in tight loops.
  • Changed the format of a funcRef when converted to string; now shows function name and parameters, similar to MS1.
  • Added a -i command-line option to drop into interactive mode after running a script (also like MS1).
  • Fixed the yield intrinsic in command-line apps, which was causing a hang in recent builds.

MiniScript 2.0 FC2

MiniScript 2.0 FC2 Pre-release
Pre-release

Choose a tag to compare

@JoeStrout JoeStrout released this 28 Sep 17:11

Final candidate 2 of MiniScript 2.0. Changes since FC1:

  • Fixed major performance regression (yielding on every store into a map).
  • Binaries are now named miniscript rather than miniscript2.
  • Fixed issue where a function's locals could leak into a calling frame's stack.
  • Math-assignment operators like += now evaluate the LHS expression only once.
  • Fixed a handful of edge cases, particularly with regard to handling of errors.

MiniScript 2.0 FC1

MiniScript 2.0 FC1 Pre-release
Pre-release

Choose a tag to compare

@JoeStrout JoeStrout released this 22 Sep 15:22

Final candidate 1 of MiniScript 2.0.

MiniScript 2.0 Preview 9

Pre-release

Choose a tag to compare

@JoeStrout JoeStrout released this 16 Sep 20:57

Preview build 9 of MiniScript 2.0. Changes since preview 8:

Language & semantics

  • new now requires a map; __isa cycles are rejected.
  • Fixed inconsistencies in how @ affects indexing.
  • Fixed off-by-one error in range under certain conditions (issue #14).
  • Fixed NaN == NaN comparison.
  • Fixed parsing of method calls where the first argument starts with parentheses, e.g. m.f (arg1), arg2.
  • Map inserts now store a frozen copy of a list or map key.
  • String indexing is now by Unicode code point in both C# and C++, with surrogate pairs handled identically.
  • info on a function reference now reports the source code location where it was defined.

Performance

  • String indexing is now O(1) instead of O(N) in the common case.
  • GC policy collects more aggressively after heavy allocation, plus new facilities for collecting at appropriate
    times automatically.
  • Removed unused opcodes (this is more of a clean-up task than performance.)

Fixes

  • Fixed iteration over locals in the C++ version.
  • Fixed string interning in C++, and C++ string processing where a char(0) is involved.
  • Fixed two register scoping issues.
  • Fixed invoking an intrinsic function through a funcRef, and an intrinsic-clearing issue.
  • Fixed failure to mark the intrinsics map as a GC root.
  • Class short names are now cleared before the invalidation callback.

Build & embedding

  • Fixed several build issues that appear on less common platforms.
  • C++ function pointer typedefs changed to std::function (thanks @Mo-Tx, PR #12).
  • Revised the C++ host update guide with better GC discipline guidance.

MiniScript 2.0 Preview 8

Pre-release

Choose a tag to compare

@JoeStrout JoeStrout released this 06 Aug 18:16

Preview build 8 of MiniScript 2.0.