Skip to content

Janet 1.6.0

Compare
Choose a tag to compare
@bakpakin bakpakin released this 22 Dec 17:25

Large release to Janet, with a few breaking changes to the C API. This will not be a major release, however, as the change is small enough and the language young enough. This release also includes the addition of threads, which work on bot posix systems with pthreads, and Windows with the win32 api. See the changelog for more details.

  • Add thread/ module to the core.
  • Allow seeding RNGs with any sequence of bytes. This provides
    a wider key space for the RNG. Exposed in C as janet_rng_longseed.
  • Fix issue in resume and similar functions that could cause breakpoints to be skipped.
  • Add a number of new math functions.
  • Improve debugger experience and capabilities. See examples/debugger.janet
    for what an interactive debugger could look like.
  • Add debug/step (janet_step in the C API) for single stepping Janet bytecode.
  • The built in repl now can enter the debugger on any signal (errors, yields,
    user signals, and debug signals). To enable this, type (setdyn :debug true)
    in the repl environment.
  • When exiting the debugger, the fiber being debugged is resumed with the exit value
    of the debug session (the value returned by (quit return-value), or nil if user typed Ctrl-D).
  • (quit) can take an optional argument that is the return value. If a module
    contains (quit some-value), the value of that module returned to (require "somemod")
    is the return value. This lets module writers completely customize a module without writing
    a loader.
  • Add nested quasiquotation.
  • Add os/cryptorand
  • Add prinf and eprinf to be have like printf and eprintf. The latter two functions
    now including a trailing newline, like the other print functions.
  • Add nan?
  • Add janet_in to C API.
  • Add truthy?
  • Add os/environ
  • Add buffer/fill and array/fill
  • Add array/new-filled
  • Use (doc) with no arguments to see available bindings and dynamic bindings.
  • jpm will use CC and AR environment variables when compiling programs.
  • Add comptime macro for compile time evaluation.
  • Run main functions in scripts if they exist, just like jpm standalone binaries.
  • Add protect macro.
  • Add root-env to get the root environment table.
  • Change marshalling protocol with regard to abstract types.
  • Add show-paths to jpm.
  • Add several default patterns, like :d and :s+, to PEGs.
  • Update jpm path settings to make using jpm easier on non-global module trees.
  • Numerous small bug fixes and usability improvements.