Releases: PlutoLang/Pluto
Releases · PlutoLang/Pluto
0.12.2
- Deprecated try/catch statement
Compiler/Type System:
- Fixed uninitialised variables not being propagated as nil
Runtime:
- Fixed further instances of
dumpvarandexportvar'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_FILESYSTEMnow also disables $include- Fixed
noexceptbeing present in lua.h
0.12.1
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
- Added postfix ++ operator
- Added ** as an integer exponentiation operator (this previously was a deprecated alias for ^)
- Added
protectedclass fields - Added
$objectsyntax for table creation - Added
$include - Added
$haltcompiler - Trailing commas are now allowed for arguments, parameters, and destructuring
- String interpolation now implicitly calls
tostringon 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
anyandniltype hints - Added type hinting for multiple return values
- Added complex type hinting for tables to specify fields
- Type hints for
functiontype can now also specify the parameters and returns - Added
$typesyntax for named types (this replaces the constexpr call$type(x)) - Added
$declareto set the type of a global - Added
$getproptypeto query the parser's idea of a variable's type
Standard Library:
- Global & Base
dumpvar's output now includes metatable__namewhere 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.infas an alias formath.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_openselectedlibsfrom Lua 5.5 so you can now define which Lua and Pluto libraries to load globally + preloaded via bitflags.luaL_openlibsis now a macro using this function to the same effect as before.
0.11.3
0.11.2
Compiler:
- Fixed
extendsnot inheriting__index,__mindex,__newindex - Fixed lexer looping infinitely on a self-referencing alias
Runtime:
- Fixed
infor 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
- 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
extendsnot 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:runyielding after the final tick - Fixed
dumpvarandexportvar'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
- Added preprocessor aliases (
$alias) - Added compile-time evaluated statement
$assert - Added warning for unused local variables
- Added octal numerals
- Added
__mindexmetamethod- 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
_PSOUPconstant
0.10.5
- Improved error message when
newis 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
- Compile-Time Evaluation: Fixed
$elseifnot 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
- Compile-Time Evaluation:
io.contentsandtypeare 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_DETECTIONto make this more aggressive
- For Integrators: Added
- Fixed infinite loop when switch control value contains
ororand - Fixed base32.decode not working correctly on some ARM systems