Skip to content

v0.2.15

Compare
Choose a tag to compare
@ilyash-b ilyash-b released this 18 Mar 11:57
· 21 commits to master since this release

New features

  • Add assert(Fun, Type, Str) for asserting that the code throws the given exception. The type must be subtype of Exception.
  • Add namespace net
  • Add networking c_sockaddr, c_sockaddr_un, c_sockaddr_in
  • Add networking functions: socket(), bind(), listen(), accept(), recvfrom(), send()
  • Add networking constants: SOCK_STREAM, SOCK_DGRAM, SOCK_RAW, MSG_OOB, MSG_PEEK, MSG_WAITALL (all prefixed with C_)
  • Add Not type and support in pattern matching
  • Add env: option to pass environment when running external programs
  • Add ensure(Int, NumRange)
  • Add last(Eachable1, Any), the counterpart of first()
  • Add skip(Iter, Any) - skip elements matching the pattern
  • Add skip(Iter, Int) - skip given number of elements
  • When a function is called from CLI, the output is now displayed using experimental echo_cli()
  • Add AWS2::regions(CommandsPipeline, Arr)
  • Add IfExists pattern for optionally present fields
  • Add before_first(Str, Str) - get the piece before first occurrence of the delimiter
  • Add after_last(Str, Str) - get the piece after the last occurrence of the delimiter

Fixes and improvements

  • Add UndefinedUpVar exception, thrown when accessing undefined "upvar"
  • Following types now inherit from Error, not Exception: NotImplemented, ReadFail, RequireFail, MainFail
  • Experimental syntax - allow many additional elements x.HERE and x::HERE
  • Fix and improve documentation
  • Improve inspect()
  • Add regs parameter to AWS2::regions(Fun)
  • $(log: ...) can now take Str to prefix the message
  • Improve retry() logging
  • Improve Time(Str)

Deprecated

  • is_subtype(Type, Type) is now deprecated, use <= operator, example: T1 <= T2. Solves #391.
  • typeof(Any) is now deprecated, use Type(Any) instead.
  • x \ f syntax is now deprecated, use x.f() and x.{...} instead.

Misc

  • GCC 9 on macOS is not supported anymore - it's broken