Skip to content

Releases: PlutoLang/Pluto

0.12.2

29 Dec 08:35

Choose a tag to compare

  • Deprecated try/catch statement

Compiler/Type System:

  • Fixed uninitialised variables not being propagated as nil

Runtime:

  • Fixed further instances of dumpvar and exportvar's quoted strings not escaping invalid UTF-8
  • Fixed io library functions throwing a C++ exception when provided with invalid UTF-8
  • Fixed bigint.gcd infinitely looping or crashing with some inputs
  • Fixed cat.encode asserting or crashing when provided with non-table value

For Integrators:

  • PLUTO_NO_FILESYSTEM now also disables $include
  • Fixed noexcept being present in lua.h

0.12.1

26 Sep 12:12

Choose a tag to compare

Compiler:

  • Fixed pipe operator method call when used on result of call
  • Fixed function type hint parameter list erroring at the 4th type
  • Fixed function type hint parameter list not allowing trailing commas

Runtime:

  • Fixed sometimes not erroring on missing arguments to bigint functions
  • Fixed bigint comparisons for all-negative operands and between positive zero and negative zero
  • Fixed bigint.gcd for zero and negative operands
  • Fixed json.encode rarely misidentifying array-ish tables as object-ish
  • Fixed stack corruption when 'in' expression has to run Lua for comparisons

0.12.0

10 Sep 10:36

Choose a tag to compare

  • Added postfix ++ operator
  • Added ** as an integer exponentiation operator (this previously was a deprecated alias for ^)
  • Added protected class fields
  • Added $object syntax for table creation
  • Added $include
  • Added $haltcompiler
  • Trailing commas are now allowed for arguments, parameters, and destructuring
  • String interpolation now implicitly calls tostring on each interpolation value
  • Deprecated the optional 'global' keyword
  • Deprecated reassignment of for loop control variables in preparation for Lua 5.5
  • Removed the deprecated <constexpr> attribute

Type System:

  • Added any and nil type hints
  • Added type hinting for multiple return values
  • Added complex type hinting for tables to specify fields
  • Type hints for function type can now also specify the parameters and returns
  • Added $type syntax for named types (this replaces the constexpr call $type(x))
  • Added $declare to set the type of a global
  • Added $getproptype to query the parser's idea of a variable's type

Standard Library:

  • Global & Base
    • dumpvar's output now includes metatable __name where applicable
  • Bigint
    • Added bigint.abs, bigint.gcd, bigint.isprobableprime, bigint.export, bigint.import
    • Added __unm metamethod to bigints
    • Bigint operations now accept plain Lua ints as operands
  • Crypto
    • Added curve25519 to crypto.generatekeypair
    • Added crypto.hmac, crypto.fnv1a32, crypto.x25519, crypto.derive
    • Added RSA OAEP modes to crypto.encrypt & crypto.decrypt (rsa-sha1, rsa-sha256, rsa-sha384, rsa-sha512)
    • Added optional offset parameter to crypto.decompress
    • Removed previously-deprecated crypto.hexstream
  • FFI
    • Added ffi.callback
  • IO
    • Added io.unique, io.symlink
    • Removed previously-deprecated io.copyto
  • JSON
    • Added MessagePack support to json.encode and json.decode
  • Math
    • Added math.trunc, math.cbrt, math.hypot
    • Added math.inf as an alias for math.huge
  • OS
    • Added os.dnsresolve
  • Socket
    • Added alpn option to socket.starttls
    • Added early_data option to client-side socket.starttls
  • String
    • Added string.span
    • Removed previously-deprecated string.find_first_of, string.find_first_not_of, string.find_last_of, string.find_last_not_of, string.lfind
  • Table
    • Added table.create
    • Added table.clone
  • UTF8
    • utf8.offset now also returns the final position of the codepoint

For Integrators:

  • Pulled luaL_openselectedlibs from Lua 5.5 so you can now define which Lua and Pluto libraries to load globally + preloaded via bitflags. luaL_openlibs is now a macro using this function to the same effect as before.

0.11.3

13 Aug 21:23

Choose a tag to compare

Fixed some regressions from 0.11.2:

  • io.isfile and io.isdir erroring on non-existent paths
  • io.copy erroring when the destination doesn't exist

0.11.2

11 Aug 13:50

Choose a tag to compare

Compiler:

  • Fixed extends not inheriting __index, __mindex, __newindex
  • Fixed lexer looping infinitely on a self-referencing alias

Runtime:

  • Fixed in for substring checking not being binary safe
  • Fixed table.slice crashing when producing a big slice
  • Fixed exportvar's handling of non-finite numbers
  • Fixed bigint addition when operands are a mix of positive and negative
  • Fixed memory leaks under some rare conditions

You can view the full commit log here.

0.11.1

11 Jun 11:16

Choose a tag to compare

  • Improved implicit-global coverage for multiple assignments within the same statement
  • Fixed preprocessor aliases not taking multi-token arguments (e.g. function calls)
  • Fixed compile-time concatenation shadowing optional parentheses
  • Fixed extends not inheriting __pairs

Standard Library:

  • socket.bind now returns the created coroutine and errors are raised to the caller instead of the scheduler
  • Fixed socket.listen/socket.bind not failing for bound TCP ports on Windows
  • Fixed os.sleep(1) taking considerably longer than 1ms on Windows
  • Fixed scheduler:run yielding after the final tick
  • Fixed dumpvar and exportvar's quoted strings not escaping bytes that would make it invalid UTF-8
  • Fixed filesystem errors on Windows not being UTF-8 encoded when the user has a non-English locale

You can view the full commit log here.

0.11.0

24 May 08:28

Choose a tag to compare

  • Added preprocessor aliases ($alias)
  • Added compile-time evaluated statement $assert
  • Added warning for unused local variables
  • Added octal numerals
  • Added __mindex metamethod
    • This is now used by default table metatable, elimiting the compatibility concerns it previously had.
  • Export is no longer deprecated but now implies constness
  • Walrus operator can now initialize multiple variables
  • Compile-time conditionals can now be equality checks
  • Table freezing is now an optional feature, enabled via PLUTO_ENABLE_TABLE_FREEZING
  • Fixed implicit conversion of booleans to strings outside of concats
  • Removed table length cache
  • Removed let & const

Standard library:

  • Added buffer library
  • Added table.invert, table.dedup/deduplicate, table.deduped/deduplicated, table.values
  • Added crypto.crc32c
  • crypto.random now treats 1-2 arguments like math.random
  • Added optional 'binary' parameter to crypto.md5
  • Added ffi.alloc, ffi.write, & ffi.read
  • Added UDP support to socket.connect
  • Added socket.isudp, socket.udpserver
  • Added io.chmod
  • Added os.arch constant
  • Added callonce function
  • Added sdiv, udiv, smod, & umod functions
  • string.split's needle parameter is now required (previously defaulted to ",")
  • socket.listen & socket.bind can now be bound to a specific IP address
  • io.part now returns 'parent, name' if part argument is omitted
  • Optimized json.encode & json.decode
  • Removed _PSOUP constant

0.10.5

08 May 03:44

Choose a tag to compare

  • Improved error message when new is provided with a nil value
  • Fixed ternary expression sometimes picking a bad register
  • Fixed possible buffer overflow when processing comments

Standard Library:

  • json.encode now errors when provided with a non-finite number such as NaN or infinity
  • Fixed a rare crash with json.encode

0.10.4

15 Feb 14:18

Choose a tag to compare

  • Compile-Time Evaluation: Fixed $elseif not working
  • Fixed derived classes having their __index overwritten

Standard Library:

  • Improved scheduler's handling of errorfunc so debug.traceback is more useful
  • Optimized base64 decode operations
  • FFI: Fixed unloading library if it's out of scope but its functions are not
  • FFI: Fixed incorrectly writing f32 & f64 values for struct members
  • Fixed various issues with big inputs on dumpvar, exportvar, json.encode, json.decode, xml.encode, & xml.decode

0.10.3

02 Dec 06:00

Choose a tag to compare

  • Compile-Time Evaluation: io.contents and type are now also available
  • Compile-Time Evaluation: Table return type is now supported (for functions like url.parse)
  • Improved handling when a C++ exception is thrown during ffi.call
  • Fixed not inferring that a keyword should be disabled when used as a global variable
    • For Integrators: Added PLUTO_PARANOID_KEYWORD_DETECTION to make this more aggressive
  • Fixed infinite loop when switch control value contains or or and
  • Fixed base32.decode not working correctly on some ARM systems