Skip to content

Releases: janet-lang/janet

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.

Janet 1.9.0

10 May 23:23
Compare
Choose a tag to compare

This release brings a lot of updates, mainly the beta net/ module that brings asynchronous, non-blocking socket networking to Janet's core. As per usual, check the changelog for updates and happy hacking!

  • Add :ldflags option to many jpm declare functions.
  • Add errorf to core.
  • Add lenprefix combinator to PEGs.
  • Add %M, %m, %N, and %n formatters to formatting functions. These are the
    same as %Q, %q, %P, and %p, but will not truncate long values.
  • Add fiber/root.
  • Add beta net/ module to core for socket based networking.
  • Add the parse function to parse strings of source code more conveniently.
  • Add jpm rule-tree subcommand.
  • Add --offline flag to jpm to force use of the cache.
  • Allow sending pointers and C functions across threads via thread/send.
  • Fix bug in getline.
  • Add sh-rule and sh-phony to jpm's dialect of Janet.
  • Change C api's janet_formatb -> janet_formatbv, and add new function janet_formatb to C api.
  • Add edefer macro to core.
  • A struct/table literal/constructor with duplicate keys will use the last value given.
    Previously, this was inconsistent between tables and structs, literals and constructor functions.
  • Add debugger to core. The debugger functions are only available
    in a debug repl, and are prefixed by a ..
  • Add sort-by and sorted-by to core.
  • Support UTF-8 escapes in strings via \uXXXX or \UXXXXXX.
  • Add math/erf
  • Add math/erfc
  • Add math/log1p
  • Add math/next
  • Add os/umask
  • Add os/perm-int
  • Add os/perm-string
  • Add :int-permissions option for os/stat.
  • Add jpm repl subcommand, as well as post-deps macro in project.janet files.
  • Various bug fixes.

Janet 1.8.1

01 Apr 02:01
Compare
Choose a tag to compare

Small patch on 1.8.0, fixing issues on big endian platforms and BSDs. Otherwise, more or less the same as 1.8.0.