Skip to content

Rewrite to VM evaluator, Numeric Vectors, Selectors and Patterns

Compare
Choose a tag to compare
@WeirdConstructor WeirdConstructor released this 21 May 18:09
· 521 commits to master since this release

This has been the most significant update so far. The highlight is the new
evaluator based on a VM. And many other things, such as builtin patterns and
data structure selectors. And most notably: a contributed numeric vector implementation!

  • Incompatible Change: VVal::Nul was renamed to VVal::None because it
    was called $none in WLambda anyways.
  • Incompatible Change: Renamed padl and padr to pad_start and pad_end
    to make it more consistent naming to trim_start and trim_end.
  • Incompatible Change: Renamed neg to neg_i64, uneg to neg_u32.
  • Incompatible Change: Rewrote the complete threading implementation
    of WLambda.
  • Incompatible Change: Replaced while statement in prelude with while <cond> <block>.
  • Incompatible Change: zip and enumerate push their arguments
    to the end of the argument list now.
  • Incompatible Change: VVal::set_map_key() has been removed and replaced by
    VVal::set_key_mv().
  • Incompatible Change: Strings and byte vectors are immutable data types now.
  • Incompatible Change: VValUserData::call takes an Env now instead of the
    argument vector directly.
  • Incompatible Change: Replaced MsgHandle by wlambda::rpc_helper::RPCHandle.
  • Potentially Incompatible Change: The compiler and evaluator was completely replaced
    by a VM and code generator for it.
  • Change: Function arguments are stored in right order (function, arg1, arg2, ...) on the
    stack now. This changes some of the argument handling and semantics of functions
    that did depend on the other order. (zip, enumerate, ...).
  • Change: Added proper error location to errors generated from
    prelude or other pure Rust functions.
  • Change: Added recently defined variable name or key to syntax positions
    for functions. This might help finding the actual function where
    the error occurred easier.
  • Change: $q and $Q recognizes nested parenthesis now:
    $q{parses { nested } stuff now! Also [}] is fine}.
  • Optimization: Removed many unnecessary String allocations.
  • Feature: Numerical integer and float vectors for 2D, 3D and 4D by Cedric Hutchings.
  • Feature: VValUserData can now define a call_method(...) trait function,
    that will be called when a method call is invoked on the object: obj.method[...].
  • Feature: Added not_i64 and not_u32.
  • Feature: Added compile time constant values: !:const X = ....
  • Feature: Added if statement ? <cond> <then> <else>.
  • Feature: Added iter <var> <list-expr> <block> statement.
  • Feature: Added std:delete added for removing elements from maps or vectors.
  • Feature: Added std:num:lerp and std:num:smoothstep added.
  • Feature: Added pair values $p(a, b).
  • Feature: Added $code <expr> string literals for creating literal strings
    from (syntax checked) code snippets in WLambda.
  • Feature: Implemented optional values $o(...) and $o() for representing
    function return values that need a better distinction
    between $none and really no value.
  • Feature: Implemented iterator values $iter ... that can either be called
    directly of passed to iter.
  • Feature: Symbols are now fully interned strings (per thread).
  • Feature: Added color functions std:v:hex2rgba_*.
  • Feature: Implemented built in regex pattern matching using the $r(...) syntax.
  • Feature: Implemented built in data structure selector using the $S(...) syntax.
  • Feature: The result vector of a regex pattern or data selector can be
    accessed conveniently with the variable $\.
  • Documentation: More!