Skip to content

Releases: janet-lang/janet

Janet 1.29.1

19 Jun 12:20
Compare
Choose a tag to compare

What's Changed

  • add net/setsockopt by @zevv in #1138
  • Enable debug symbols in janet binary; strip target at 'make install' by @zevv in #1140
  • Add CI test for mingw/wine on linux by @zevv in #1141
  • changed net/connect to be non-blocking / asynchronous by @zevv in #1139
  • added thaw to complement freeze by @tionis in #1142
  • Add clock sources to os/clock (:realtime, :monotonic, :cputime) by @zevv in #1146
  • improved error messages for special forms by @zevv in #1147
  • os/proc-kill now accepts an optional signal to send by @tionis in #1137
  • Fix warning in janet_gettime() by @zevv in #1153
  • Improved various error messages when handling unexpected types. by @zevv in #1152
  • Add docstring to string/format by @zevv in #1151
  • Allow mapcat et al to accept multiple iterable arguments by @primo-ppcg in #1160
  • Add file/lines iterator by @zevv in #1157
  • More portable method of installing janet.h -> janet/janet.h symlink by @dressupgeekout in #1164
  • Updated documentation for buffer/push-at by @zevv in #1169
  • Fix janet_formatbv() type when handling %d %u int specifiers by @zevv in #1167
  • Fixed net/connect binding address by @zevv in #1171
  • fix for crash on windows in src/core/ev.c: initialze state->fromlen by @zevv in #1172
  • Add contains? helper function to boot.janet by @Techcable in #1017
  • added os/isatty, do not enable colors if stdout is not a tty by @zevv in #1177
  • Reorganize tests by @sogaiu in #1162
  • Ensure ev/gather fibers are fully canceled on error by @chris-chambers in #1181
  • Added misc tests to increase test coverage by @zevv in #1179
  • Added JANET_NO_AMALG flag to Makefile by @zevv in #1175
  • Fix resumption values when closing a channel by @chris-chambers in #1182
  • Make take and drop more symmetric by @primo-ppcg in #1183
  • Simplify if-let logic by @primo-ppcg in #1188
  • update if-let by @primo-ppcg in #1190
  • Fix order in which macro-lints is set during expansion by @chris-chambers in #1185
  • peg: add support for "true" and "false" primitives to always/never match by @CosmicToast in #1187

New Contributors

Full Changelog: v1.28.0...v1.29.1

Janet 1.28.0

13 May 15:25
Compare
Choose a tag to compare

Overview

  • Various bug fixes
  • Make nested short-fn's behave a bit more predictably (it is still not recommended to nest short-fns).
  • Add os/strftime for date formatting.
  • Fix ev/select on threaded channels sometimes live-locking.
  • Support the NO_COLOR environment variable to turn off VT100 color codes in repl (and in scripts).
    See http://no-color.org/
  • Disallow using (splice x) in contexts where it doesn't make sense rather than silently coercing to x.
    Instead, raise a compiler error.
  • Change the names of :user8 and :user9 sigals to :interrupt and :await
  • Change the names of :user8 and :user9 fiber statuses to :interrupted and :suspended.
  • Add ev/all-tasks to see all currently suspended fibers.
  • Add keep-syntax and keep-syntax! functions to make writing macros easier.

More detail

Janet 1.27.0

05 Mar 16:36
Compare
Choose a tag to compare
  • Change semantics around bracket tuples to no longer be equal to regular tuples.
  • Add index argument to ffi/write for symmetry with ffi/read.
  • Add buffer/push-at
  • Add ffi/pointer-buffer to convert pointers to buffers the cannot be reallocated. This
    allows easier manipulation of FFI memory, memory mapped files, and buffer memory shared between threads.
  • Calling ev/cancel on a fiber waiting on ev/gather will correctly
    cancel the child fibers.
  • Add (sandbox ...) function to core for permission based security. Also add janet_sandbox to C API.
    The sandbox allows limiting access to the file system, network, ffi, and OS resources at runtime.
  • Add (.locals) function to debugger to see currently bound local symbols.
  • Track symbol -> slot mapping so debugger can get symbolic information. This exposes local bindings
    in debug/stack and disasm.
  • Add os/compiler to detect what host compiler was used to compile the interpreter
  • Add support for mingw and cygwin builds (mingw support also added in jpm).

Janet 1.26.0

07 Jan 21:23
Compare
Choose a tag to compare
  • Add ffi/malloc and ffi/free. Useful as tools of last resort.
  • Add ffi/jitfn to allow calling function pointers generated at runtime from machine code.
    Bring your own assembler, though.
  • Channels can now be marshalled. Pending state is not saved, only items in the channel.
  • Use the new .length function pointer on abstract types for lengths. Adding
    a length method will still work as well.
  • Support byte views on abstract types with the .bytes function pointer.
  • Add the u format specifier to printf family functions.
  • Allow printing 64 integer types in printf and string/format family functions.
  • Allow importing modules from custom directories more easily with the @ prefix
    to module paths. For example, if there is a dynamic binding :custom-modules that
    is a file system path to a directory of modules, import from that directory with
    (import @custom-modules/mymod).
  • Fix error message bug in FFI library.

Janet 1.25.1

29 Oct 20:05
Compare
Choose a tag to compare
  • Add memcmp function to core library.
  • Fix bug in os/open with :rw permissions not correct on Linux.
  • Support config.mk for more easily configuring the Makefile.

Janet 1.25.0

10 Oct 23:37
Compare
Choose a tag to compare
  • Windows FFI fixes
  • Fix PEG if-not combinator with captures in the condition
  • Fix bug with os/date with nil first argument
  • Fix bug with net/accept on Linux that could leak file descriptors to sub-processes
  • Reduce number of hash collisions from pointer hashing
  • Add optional parameter to marshal to skip cycle checking code

Janet 1.24.1

24 Aug 23:58
Compare
Choose a tag to compare
  • Fix FFI bug on Linux/Posix
  • Improve parse error messages for bad delimiters.
  • Add optional name parameter to the short-fn macro.

Janet 1.24.0

16 Aug 00:16
Compare
Choose a tag to compare
  • Add FFI support to 64-bit windows compiled with MSVC
  • Don't process shared object names passed to dlopen.
  • Add better support for windows console in the default shell.c for auto-completion and
    other shell-like input features.
  • Improve default error message from assert.
  • Add the tabseq macro for simpler table comprehensions.
  • Allow setting (dyn :task-id) in fibers to improve context in supervisor messages. Prior to
    this change, supervisor messages over threaded channels would be from ambiguous threads/fibers.

Janet 1.23.0

20 Jun 16:46
Compare
Choose a tag to compare

This release brings a number of new features that will make Janet useful in even more domains, including mutexes and reader-writer locks to the ev module to improve interactions with multi-threaded, native code, better named arguments support, and an experimental FFI module. Also a number of improvements and simplification to Janet's debugging capabilities have been made, and exposed with the new debugger function.

  • Add experimental ffi/ module for interfacing with dynamic libraries and raw function pointers. Only available
    on 64 bit linux, mac, and bsd systems.
  • Allow using &named in function prototypes for named arguments. This is a more ergonomic
    variant of &keys that isn't as redundant, more self documenting, and allows extension to
    things like default arguments.
  • Add delay macro for lazy evaluate-and-save thunks.
  • Remove pthread.h from janet.h for easier includes.
  • Add debugger - an easy to use debugger function that just takes a fiber.
  • dofile will now start a debugger on errors if the environment it is passed has :debug set.
  • Add debugger-on-status function, which can be passed to run-context to start a debugger on
    abnormal fiber signals.
  • Allow running scripts with the -d flag to use the built-in debugger on errors and breakpoints.
  • Add mutexes (locks) and reader-writer locks to ev module for thread coordination.
  • Add parse-all as a generalization of the parse function.
  • Add os/cpu-count to get the number of available processors on a machine

Janet 1.22.0

09 May 15:32
Compare
Choose a tag to compare
  • Prohibit negative size argument to table/new.
  • Add module/value.
  • Remove file/popen. Use os/spawn with the :pipe options instead.
  • Fix bug in peg thru and to combinators.
  • Fix printing issue in doc macro.
  • Numerous updates to function docstrings
  • Add defdyn aliases for various dynamic bindings used in core.
  • Install janet.h symlink to make Janet native libraries and applications
    easier to build without jpm.