Skip to content

Releases: WeirdConstructor/WLambda

Data Structure Access Speed optimizations and Prototype Inheritance for OOP

27 Feb 08:29
Compare
Choose a tag to compare

0.4.0 (2020-02-27)

  • Feature: Added std:to_no_arity for disabling arity checks for functions.
  • Feature: Added std:strengthen for weak refs and weakening refs.
  • Feature: Added std:num:int_to_open01, std:num:int_to_closed_open01
    and std:num:int_to_open_closed01.
  • Feature: Added std:rand:split_mix64_next_closed_open01 and
    std:rand:split_mix64_next_open_closed01.
  • Feature: Added basic prototyped object orientation.
  • Optimization: Unrolled argument processing for function calls.
  • Optimization: Unrolled GetKey operations.
  • Change: std:to_drop disables arity checks for drop functions.
  • Change: Optimized a few hot spots.
  • Change: While optimizing I made arithmetic operations compiler syntax and not
    functions anymore.
  • Change: Symbols are handled equally to strings internally now, also improves
    performance a bit when accessing maps.
  • Bugfix: Basic arithmetics are now wrapping and don't panic on overflow anymore.
  • Bugfix: Parser used unwrap() in some places where an EOF was not expected.
    These errors are now handled properly.
  • Bugfix: Protect against division by 0 and make a wlambda panic from it.

Improved !@import and new std lib functions

27 Feb 08:28
Compare
Choose a tag to compare

0.3.6 (2020-01-24)

  • Feature: Added std:shuffle implementing fisher yates shuffle.
  • Feature: Added std:sort, std:cmp:num and std:cmp:str.
  • Feature: Added std:copy for shallow copies.
  • Feature: Added std:unshift.
  • Feature: The LocalFileModuleResolver now also searches relative
    to the file where the !@import statement is evaluated. And custom
    resolvers are passed the file path.
  • Change: Made calling $none an invalid action that causes a panic.
  • Bugfix: Correctly handle modification of lists or maps that are being
    iterated over. They cause a WLambda panic now with a backtrace instead of
    panicing on borrow_mut() in the host application.
  • Bugfix: Fixed recursive module loading, as borrow_mut() prevented it.

Error handling stricter, serialization

27 Feb 08:27
Compare
Choose a tag to compare

0.3.5 (2019-12-06)

  • Feature: Added std:measure_time _unit_ _function_ for simple benchmarking.
  • Feature: Made optional '=' in !@export and !@import statements.
  • Incompatible Change: Error values are not directly assignable to data
    structure fields anymore. So that your data structures don't end up with
    errors in it, without knowing where they were actually assigned.
  • Change: VVal::s_raw() returns an empty string now for VVal::Nul instead of $n.
  • Bugfix: Assigning to lists and maps inside a std:to_drop marked value
    works now too.
  • Bugfix: The parser didn't handle quoted symbols (:"foo") not correct and
    just returned them as string.
  • Doc: Documented closures briefly, reference data types and how to do
    object oriented programming.
  • Doc: Documented more reference handling.
  • Feature: Added std:write\_str and added std:to_drop string representation.
  • Feature: Added std:deser:csv simple but working CSV parser that copes
    also with multiline Excel-CSV exports. It deserves it's own crate probably.
  • Feature: Added std:ser:csv which is a simple but working VVal table
    to CSV serializer that also handles quoting " in CSV files correctly.
  • Feature: Added splice syntax for splicing vectors and maps into literals:
    $[1,2,*$[3,4]] and ${a = 1, b = 2, *${c = 3}, d = 4}.

WLambda VVal API Improvements for Embedding

20 Nov 07:02
Compare
Choose a tag to compare

0.3.4 (2019-11-20)

  • Feature: Version of WLambda is printed to stderr in the executable
    and is available with the std:wlambda:version function at runtime.
  • Feature: EvalContext::eval_string() implemented.
  • Feature: Added set_vval_method! macro for providing an OO API more easily.
  • Feature: Expanded the VVal API with quick access methods, for
    example self.v_i(idx) or self.v_ik(key).
  • Feature: Added for function, to iterate over lists, maps, bytes and strings.
  • Feature: Added VVal::iter() for nicer iteration over VVal lists/maps from Rust.
  • Feature: Added std:str:to_char_vec to convert a string to/from a list of it's unicode code points.
  • Bugfix: The arguments passed on the stack weren't cleared properly
    after the call. This affected std:to_drop functions, which weren't
    called when expected.
  • Bugfix: Calling references (including VVal::DropVVal) now resolves
    to the inner values of them

Map and Byte Vector Enhancements

20 Nov 07:01
Compare
Choose a tag to compare

0.3.3 (2019-11-06)

  • Feature: If a string or byte vector is called with a function as first
    argument, the function is called for each character or byte.
  • Feature: You can iterate and map over a map now by calling it with a
    function as first argument.
  • Change: If a string is called with index/len, and it's outside the range,
    an empty string is returned and not $none.
  • Bugfix: Fixed std:displayln space placement and emitting empty lines with
    no parameters.

Reject Error Values in Arguments

20 Nov 06:59
Compare
Choose a tag to compare

0.3.2 (2019-11-05)

  • Incompatible Change: Error values are no longer allowed as function arguments.
    This greatly improves the situation where error values linger around in
    data structures or get written out unintentionally. With this the risk of
    unintentionally ignoring an error is mitigated.
  • Feature: Calling numbers with strings and byte vectors returns the
    character or byte substring at that index (based on 0). This is symmetrical,
    you can also call a string or a byte vector with an integer to get the
    same result.
  • Feature: Added std:io:file:read_text, std:io:file:read, std:io:file:write_safe
    and std:io:file:append.
  • Bugfix: VValUserData get_key() was never called.
  • Feature: Added VValUserData::call() to make VValUserData callable.
  • Bugfix: LocalFileModuleResolver now properly inherits the loaded modules from the
    parent GlobalEnv.
  • Feature: Added SymbolTable::set() for setting variables that are provided by a module
    from Rust.
  • Feature: Added many std:num:* functions (still undocumented)
  • Feature: Added std:hash:fnv1a, and std:rand:split_mix64_* functions.

Modularized Prelude And Improved Error Reporting

16 Sep 13:17
Compare
Choose a tag to compare

0.3.1 (2019-09-16)

  • Incompatible Change: Removed create_wlamba_prelude() and added proper
    module support instead. Splitted up the prelude into a core part and the
    standard library utility functions. With !@wlambda you can import the core
    language globals. With !@import std std you import the standard library.
  • Feature: re:match added.
  • Bugfix: Errors weren't properly propagated by the threads::MsgHandle.
  • Change: Error reporting for arity mismatch contains the position of the
    function definition and the position of the call site.
  • Feature: Added std:append and std:prepend.
  • Change: Enhanced stringified version of a function.
  • Feature: Added apply [[@]] syntax for applying a function to a vector of arguments directly.
  • Change: Defined equality with == for everything.
  • Doc: Documented bool data type.
  • Bugfix: Fixed evaluation order of function arguments.
  • Feature: Implemented VVal::ref_id and std:ref_id which returns a
    unique 64bit signed integer dependent on the memory ID of the value.
    This is only useful for reference types, where the storage location of a
    value doesn't depend on the stack.
  • Feature: Made stringifying of WLambda data cope properly with cyclic data
    structures, this makes printing objects with closures work without
    locking up your script.
  • Change: Greatly enhanced error message file position reporting and
    panics have better backtraces now.

Syntax Changes, Explicit References and JSON/smgpack serialization.

13 Sep 12:07
Compare
Choose a tag to compare

0.3.0 (2019-09-13)

  • Incompatible Change: Removed :wref and :ref definition labels in favor of
    proper $&&, $& and $* reference handling. Added wl:weaken and wl:set_ref and
    .*x = ... syntax for even more reference handling.
  • Incompatible Change: Replaced [] with () parenthesis. This means function calls
    are now having the [] brackets as argument list delimiters and
    regular arithmetics and expression grouping/delimiting is done with the more
    traditional () parenthesis. This is hopefully the last big incompatible syntax change
    before the 1.0 release.
  • Feature: ser:json got a non-pretty print argument.
  • Doc: Documented ser:json and deser:json, with additional examples.
  • Feature: ser:msgpack and deser:msgpack added.
  • Feature: Implemented wl:eval for evaluating wlambda code from inside
    wlambda code, so you can evaluate code while you are evaluating code.
  • Feature: Thread communication helpers implemented for connecting
    WLambda EvalContext instances accross threads and providing easy
    cross thread messaging and RPC.
  • Feature: Custom userdata can be implemented using the VValUserData trait.
  • Feature: Added more bytes related functions and call properties.
    bytes:to_vec, bytes:from_vec, bytes:to_hex, bytes:from_hex,
    str:to_utf8, str:from_utf8, str:from_utf8_lossy.
  • Feature: Added len function to get the length of vectors and other
    sequential data structures. str:len returns the length in unicode characters
    now.
  • Bugfix: Weak upvalue references were not properly handled and directly returned
    by variable accesses.

0.2.2 (2019-09-01)

  • - and + are not parsed as operator if a digit follows.
    fun :bar -2 2 was parsed as operator call for -.
    Sometime in the future we should change to a proper tokenizer.
  • Bugfix: Assigning to a local variable cleared it's :ref state.
  • Feature: Added optional serde/serde_json implementation and prelude
    function ser:json and deser:json.

0.2.1 (2019-07-18)

  • Removed unprefixed destructuring syntax for a more consistent syntax.
  • Assignments and definitions no longer return the stored value because
    it mixes badly with $error values.

REPL for WLambda

23 May 06:10
Compare
Choose a tag to compare

0.1.1 (2019-05-23)

  • Implemented EvalContext to keep a global and top-level local
    environment around for future eval() operations in it.
  • Implemented a basic REPL in main.rs.

Initial release

23 May 06:11
Compare
Choose a tag to compare

0.1.0 (2019-05-17)

Initial release on GitHub.
Initial release on crates.io.

  • Documented most things.
  • Finished most important functionality in WLambda.
  • This code is still proof of concept. And not even ready
    to be used as library.