Releases: janet-lang/janet
Releases · janet-lang/janet
Janet 1.29.1
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
- @tionis made their first contribution in #1142
- @primo-ppcg made their first contribution in #1160
- @chris-chambers made their first contribution in #1181
Full Changelog: v1.28.0...v1.29.1
Janet 1.28.0
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 tox
.
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
andkeep-syntax!
functions to make writing macros easier.
More detail
- Some basic fixes for DragonFly by @dressupgeekout in #1079
- remove quotes in math/log-gamma docstring by @ianthehenry in #1081
- Add
keep-syntax
andkeep-syntax!
functions by @ml-2 in #1095 - handle null-byte case in scanformat (fixes #1105) by @CosmicToast in #1106
- string and peg replacement functions can now take functions by @ianthehenry in #1112
- add catseq by @ianthehenry in #1113
- Remove double space in help message by @wackbyte in #1109
- README grammar and formatting changes by @wackbyte in #1108
- drop with a negative count now drops from the end by @ianthehenry in #1114
- Tweak long-string|bytes peg in test suite files by @sogaiu in #1116
- Add get/opt cbytes by @CosmicToast in #1122
- Tweak ev/select docstring by @sogaiu in #1124
- Make JANET_FN_S* sourceline const by @CosmicToast in #1134
- Added os.strftime() by @zevv in #1128
- Updated Makefile for better cross-compilation support. by @zevv in #1133
Janet 1.27.0
- Change semantics around bracket tuples to no longer be equal to regular tuples.
- Add
index
argument toffi/write
for symmetry withffi/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 onev/gather
will correctly
cancel the child fibers. - Add
(sandbox ...)
function to core for permission based security. Also addjanet_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
indebug/stack
anddisasm
. - 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
- Add
ffi/malloc
andffi/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
alength
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
andstring/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
- 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
- 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
- Fix FFI bug on Linux/Posix
- Improve parse error messages for bad delimiters.
- Add optional
name
parameter to theshort-fn
macro.
Janet 1.24.0
- 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
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 torun-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 theparse
function. - Add
os/cpu-count
to get the number of available processors on a machine
Janet 1.22.0
- Prohibit negative size argument to
table/new
. - Add
module/value
. - Remove
file/popen
. Useos/spawn
with the:pipe
options instead. - Fix bug in peg
thru
andto
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 withoutjpm
.