Skip to content

Regex changes, Char/Byte Data Type, Networking

Compare
Choose a tag to compare
@WeirdConstructor WeirdConstructor released this 18 Jan 18:53
· 258 commits to master since this release

0.7.0 (2021-01-18)

This release comes with a huge load of new features. Most importantly: a new data type for
Unicode characters and bytes. Basic TCP networking, more regex features, binary utilities like std:bytes:pack
and many other small things. Also a few bug fixes.

See also the detailed changelog:

  • Feature: Implemented std:sys:os and std:process:run.
  • Change: Regexes/Patterns allow more characters like / and ! to be used directly now. But only in the context of a single regex pattern like $r(foo/bar). This makes it easier to process text.
  • Change: Decided it's more idiomatic to use if instead of ?
    after all. ? will of course remain.
  • Optimization: Boxed debugging information, which made some benchmarks faster by 15%.
  • Feature: Character and Byte literals 'c' and $b'c' were added.
    With functions: is_byte, is_char.
  • Feature: Global regex matches with $rg/.../.
  • Feature: Global regex substitutions with $rs/.../.
  • Feature: Implemented &or and $and for structure patterns (match and $M).
  • Feature: Commandline scripts with -e and file based evaluation get command line arguments via global variable @@ now.
  • Feature: Added std:bytes:pack and std:bytes:unpack for handling binary data formats.
  • Feature: Added std:fs:read_dir, std:chrono:format_utc and std:chrono:format_local.
  • Feature: Added XML parsing and writing functionality std:xml:read_sax and std:xml:create_sax_writer.
  • Feature: You can customize the DefaultThreadCreator easily with a DefaultGlobalEnvCreator trait implementation which is conveniently provided by FunctionGlobalEnvCreator. This makes embedding WLambda with threading easier.
  • Feature: Implemented std:bytes:find.
  • Feature: Extended syntax for string escapes by ASCII character names like $b"\<STX>" or $b"\<DEL>".
  • Feature: Added std:str:from_latin1 and std:str:to_bytes_latin1 to be able to convert bytes to/from ISO-8859-1 encoding in a more or less clean way. It allows better parsing of text protocols by converting them to strings directly.
  • Feature: Added std:num:fract.
  • Feature: Added basic TCP networking and sockets: std:net:tcp:connect, std:net:tcp:listen, std:io:write, std:io:write_some and std:io:read_some.
  • Bugfix: v.0 => v.1 did not parse correctly.
  • Bugfix: Calling $i(...) and $p() without any arguments did not yield the called value itself.