Skip to content

Releases: janet-lang/janet

Janet 1.14.1

19 Jan 00:01
Compare
Choose a tag to compare

This release brings lots of improvements to the ev/ module, as well as bug fixes.

  • Add doc-of for reverse documentation lookup.
  • Add ev/give-supervsior to send a message to the supervising channel.
  • Add ev/gather and chan argument to ev/go. This new argument allows "supervisor channels"
    for fibers to enable structured concurrency.
  • Make -k flag work on stdin if no files are given.
  • Add flycheck function to core.
  • Make backmatch and backref more expressive in pegs.
  • Fix buggy string/split.
  • Add fiber/last-value to get the value that was last yielded, errored, or signaled
    by a fiber.
  • Remove :generate verb from loop macros. Instead, use the :in verb
    which will now work on fibers as well as other data structures.
  • Define next, get, and in for fibers. This lets
    each, map, and similar iteration macros can now iterate over fibers.
  • Remove macro eachy, which can be replaced by each.
  • Add dflt argument to find-index.
  • Deprecate file/popen in favor of os/spawn.
  • Add :all keyword to ev/read and net/read to make them more like file/read. However, we
    do not provide any :line option as that requires buffering.
  • Change repl behavior to make Ctrl-C raise SIGINT on posix. The old behavior for Ctrl-C,
    to clear the current line buffer, has been moved to Ctrl-Q.
  • Importing modules that start with / is now the only way to import from project root.
    Before, this would import from / on disk. Previous imports that did not start with . or /
    are now unambiguously importing from the syspath, instead of checking both the syspath and
    the project root. This is backwards incompatible and dependencies should be updated for this.
  • Change hash function for numbers.
  • Improve error handling of dofile.
  • Bug fixes in networking and subprocess code.
  • Use markdown formatting in more places for docstrings.

Janet 1.13.1

14 Dec 01:37
Compare
Choose a tag to compare

This release brings lots of bug fixes, improvements, and new functions and macros. The largest change is the addition of the new ev/ module which brings evented IO to Janet's core. The evented IO can be used to interact with the net/ module, as well as with the native file system with os/open. The ev/ module is still in beta, so more functions may be added and interoperability with other parts of the system, including sub processes and threads, may come in future releases.

Besides the new ev/ module, 1.13.1 also brings improvements to pegs, module loading, and more.

Those embedding Janet or managing packages should also note that janetconf.h is also no longer needed to supplement janet.h when embedding or installing janet - it is inlined as part of the amalgamation process. janetconf.h is no longer part of the release files for Janet.

Changes:

  • Pretty printing a table with a prototype will look for :_name instead of :name
    in the prototype table to tag the output.
  • match macro implementation changed to be tail recursive.
  • Adds a :preload loader which allows one to manually put things into module/cache.
  • Add buffer/push function.
  • Backtick delimited strings and buffers are now reindented based on the column of the
    opening delimiter. Whitespace in columns to the left of the starting column is ignored unless
    there are non-space/non-newline characters in that region, in which case the old behavior is preserved.
  • Argument to (error) combinator in PEGs is now optional.
  • Add (line) and (column) combinators to PEGs to capture source line and column.
    This should make error reporting a bit easier.
  • Add merge-module to core.
  • During installation and release, merge janetconf.h into janet.h for easier install.
  • Add upscope special form.
  • os/execute and os/spawn can take streams for redirecting IO.
  • Add :parser and :read parameters to run-context.
  • Add os/open if ev is enabled.
  • Add os/pipe if ev is enabled.
  • Add janet_thread_current(void) to C API
  • Add integer parsing forms to pegs. This makes parsing many binary protocols easier.
  • Lots of updates to networking code - now can use epoll (or poll) on linux and IOCP on windows.
  • Add ev/ module. This exposes a fiber scheduler, queues, timeouts, and other functionality to users
    for single threaded cooperative scheduling and asynchronous IO.
  • Add net/accept-loop and net/listen. These functions break down net/server into it's essential parts
    and are more flexible. They also allow further improvements to these utility functions.
  • Various small bug fixes.

Janet 1.12.2

22 Sep 00:27
Compare
Choose a tag to compare

Small updates that includes a bugfix and the addition of :pipe to os/spawn.

  • Add janet_try and janet_restore to C API.
  • Fix os/execute regression on windows.
  • Add :pipe option to os/spawn.
  • Fix docstring typos.

Janet 1.12.1

07 Sep 21:23
Compare
Choose a tag to compare

This release brings several bug fixes, improvements to threading, os/execute, the getline implementation, and even C++ support with jpm. This means you can easily use C++ in native modules for Janet, as well as standalone mixed Janet and C++ executables.

  • Make zero?, one?, pos?, and neg? polymorphic.
  • Add C++ support to jpm and improve C++ interop in janet.h.
  • Add %t formatter to printf, string/format, and other formatter functions.
  • Expose janet_cfuns_prefix in C API.
  • Add os/proc-wait and os/proc-kill for interacting with processes.
  • Add janet_getjfile to C API.
  • Allow redirection of stdin, stdout, and stderr by passing keywords in the env table in os/spawn and os/execute.
  • Add os/spawn to get a core/process back instead of an exit code as in os/execute.
    When called like this, os/execute returns immediately.
  • Add :x flag to os/execute to raise error when exit code is non-zero.
  • Don't run main when flychecking.
  • Add :n flag to file/open to raise an error if file cannot be opened.
  • Fix import macro to not try and coerce everything to a string.
  • Allow passing a second argument to disasm.
  • Add cancel. Resumes a fiber but makes it immediately error at the yield point.
  • Allow multi-line paste into built in repl.
  • Add (curenv).
  • Change net/read, net/chunk, and net/write to raise errors in the case of failures.
  • Add janet_continue_signal to C API. This indirectly enables C functions that yield to the event loop
    to raise errors or other signals.
  • Update meson build script to fix bug on Debian's version of meson
  • Add xprint, xprin, xprintf, and xprinf.
  • net/write now raises an error message if write fails.
  • Fix issue with SIGPIPE on macOS and BSDs.

Janet 1.11.3

04 Aug 03:04
Compare
Choose a tag to compare

Changes to defaults to make Janet build better out of the box on more platforms.

  • Add JANET_HASHSEED environment variable when JANET_PRF is enabled.
  • Expose janet_cryptorand in C API.
  • Properly initialize PRF in default janet program
  • Add index-of to core library.
  • Add -fPIC back to core CFLAGS (non-optional when compiling default client with Makefile)
  • Fix defaults on Windows for ARM
  • Fix defaults on NetBSD.

Janet 1.11.1

25 Jul 19:04
Compare
Choose a tag to compare

Fixes a few bugs in 1.11.0, and disables the PRF hash function by default. This does the change the configuration API slightly, but it will not affect most users. If you were using the function janet_init_hash_key, you will need to add #define JANET_PRF to janetconf.h (or enable prf in meson). And if you explicitly adding #define JANET_NO_PRF janetconf.h, or disabling prf in meson, you can unset that configuration option as that behavior is now the default.

  • Fix jpm and git with multiple git installs on Windows
  • Fix importing a .so file in the current directory
  • Allow passing byte sequence types directly to typed-array constructors.
  • Fix bug sending files between threads.
  • Disable PRF by default.
  • Update the soname.

Janet 1.11.0

18 Jul 22:04
Compare
Choose a tag to compare

This release brings the usual bug fixes as well as improvements to the bytecode compiler, which should result in some small performance wins across the board.

  • Add forever macro.
  • Add any? predicate to core.
  • Add jpm list-pkgs subcommand to see which package aliases are in the listing.
  • Add jpm list-installed subcommand to see which packages are installed.
  • Add math/int-min, math/int-max, math/int32-min, and math/int32-max for getting integer limits.
  • The gc interval is now autotuned, to prevent very bad gc behavior.
  • Improvements to the bytecode compiler, Janet will now generate more efficient bytecode.
  • Add peg/find, peg/find-all, peg/replace, and peg/replace-all
  • Add math/nan
  • Add forv macro
  • Add symbol/slice
  • Add keyword/slice
  • Allow cross compilation with Makefile.
  • Change compare-primitve to cmp and make it more efficient.
  • Add reverse! for reversing an array or buffer in place.
  • janet_dobytes and janet_dostring return parse errors in *out
  • Add repeat macro for iterating something n times.
  • Add eachy (each yield) macro for iterating a fiber.
  • Fix :generate verb in loop macro to accept non symbols as bindings.
  • Add :h, :h+, and :h* in default-peg-grammar for hexidecimal digits.
  • Fix %j formatter to print numbers precisely (using the %.17g format string to printf).

Janet 1.10.1

19 Jun 01:10
Compare
Choose a tag to compare

Small patch to 1.10.0 release, mostly fixing a handful of installation and build issues.

  • Expose janet_table_clear in API.
  • Respect JANET_NO_PROCESSES define when building
  • Fix jpm rules having multiple copies of the same dependency.
  • Fix jpm install in some cases.
  • Add array/trim and buffer/trim to shrink the backing capacity of these types
    to their current length.

Janet 1.10.0

14 Jun 20:09
Compare
Choose a tag to compare

Mostly minor changes to the language and several bug fixes -- this release should be mostly backwards compatible. Some important additions include polymorphic comparison operators that will do the right thing when comparing different number types.

  • Hardcode default jpm paths on install so env variables are needed in fewer cases.
  • Add :no-compile to create-executable option for jpm.
  • Fix bug with the trace function.
  • Add :h, :a, and :c flags to thread/new for creating new kinds of threads.
    By default, threads will now consume much less memory per thread, but sending data between
    threads may cost more.
  • Fix flychecking when using the use macro.
  • CTRL-C no longer exits the repl, and instead cancels the current form.
  • Various small bug fixes
  • New MSI installer instead of NSIS based installer.
  • Make os/realpath work on windows.
  • Add polymorphic compare functions for comparing numbers.
  • Add to and thru peg combinators.
  • Add JANET_GIT environment variable to jpm to use a specific git binary (useful mainly on windows).
  • asm and disasm functions now use keywords instead of macros for keys. Also
    some slight changes to the way constants are encoded (remove wrapping quote in some cases).
  • Expose current macro form inside macros as (dyn :macro-form)
  • Add tracev macro.
  • Fix compiler bug that emitted incorrect code in some cases for while loops that create closures.
  • Add :fresh option to (import ...) to overwrite the module cache.
  • (range x y 0) will return an empty array instead of hanging forever.
  • Rename jpm repl to jpm debug-repl.

Janet 1.9.1

12 May 18:10
Compare
Choose a tag to compare

This releases fixes several issues with 1.9.0 that prevented it from running in certain configurations. Should be otherwise compatible with 1.9.0.

  • Add :prefix option to declare-source
  • Re-enable minimal builds with the debugger.
  • Add several flags for configuring Janet on different platforms.
  • Fix broken meson build from 1.9.0 and add meson to CI.
  • Fix compilation issue when nanboxing is disabled.