Skip to content

Operator assignment, Formatting and more Documentation

Compare
Choose a tag to compare
@WeirdConstructor WeirdConstructor released this 20 Jul 13:57
· 342 commits to master since this release

In this release there have been some new operators added. Most importantly
assignment operators .x += 10. Also new operators for function application &@>
have been added and for collection appending/prepending +> and <+.
Another big addition is the string formatting $F"x={:8.2}" 10.32432, which finally
makes string formatting a lot easier than by using just std:str:cat.
Also check out the reference documentation, most functions now have at least
a short description and example.

  • Bugfix: Selectors for recursive $S(**/..) did not process node conditions
    right.
  • Bugfix: !@import wlambda did not work as expected, it should have the same
    meaning as !@wlambda.
  • Bugfix: $i(...) and $f(...) constructions were done in the wrong order
    if arguments were on the stack.
  • Bugfix: If a call in RPCHandle paniced, there was absolutely no error message.
  • Change: Give proper error if a numeric vector is mutated.
  • Change: Numerical vectors serialize to lists of numbers now instead some
    custom Rust data structure serialization.
  • Change: $code now parses blocks directly. This means $code { ... } will
    only contain the text inside the curly bracktes but not the brackets themself.
    This allows for more idiomatic std:thread:spawn $code { ... } syntax.
  • Feature: Added negative key match to recursive selectors $S(**!key=childs)
    to prohibit it to recurse into certain keys.
  • Feature: Added positive value condition to recursive selectors $S(**=:{x=10})
    to select only specific values to recurse into.
  • Feature: Added std:bytes:replace function.
  • Documentation: Color conversion functions std:v:rgb2hsv, std:v:hsv2rgb
    and others.
  • Documentation: Added documentation for std:values, std:thread:spawn,
  • Documentation: Completely documented the currently implemented threading support.
    fvec, ivec, is_ivec, is_fvec, is_nvec, std:str:find, std:ref_id
    and many more.
  • Feature: Added debug print function special value, that includes source position and
    dynamic type name: $DEBUG ....
  • Feature: Added std:time:now, std:srand and std:rand.
  • Feature: Introduced variable and field assignment
    operator syntax .x += 10 and o.x += 10.
  • Feature: Added apply operators &@> and <@&.
  • Feature: Added collection addition operators +> and <+.
  • Feature: std:values also returns the individual elements of a numerical vector.
  • Feature: std:keys also returns the keys of a numerical vector.
  • Feature: Implemented std:str:find.
  • Feature: Implemented std:write_str.
  • Feature: Implemented custom WLambda string formatting, that even supports
    writing numerical vectors, vectors or maps in a nicer formatted way.
    See also $F and std:formatter.