Releases: janet-lang/janet
Releases · janet-lang/janet
Janet 1.32.1
Small fix over v1.32.0 that fixes wasm build.
Janet 1.32.0
- Fix return value from C function
janet_dobytes
when called on Janet functions that yield to event loop. - Change C API for event loop interaction - get rid of JanetListener and instead use
janet_async_start
andjanet_async_end
. - Rework event loop to make fewer system calls on kqueue and epoll.
- Expose atomic refcount abstraction in janet.h
- Add
array/weak
for weak references in arrays - Add support for weak tables via
table/weak
,table/weak-keys
, andtable/weak-values
. - Fix compiler bug with using the result of
(break x)
expression in some contexts. - Rework internal event loop code to be better behaved on Windows
- Update meson build to work better on windows
Janet 1.31.0
What's Changed
- Rework
keys
,values
,pairs
by @primo-ppcg in #1241 - Rework
reverse
by @primo-ppcg in #1242 - Move
bytes?
,indexed?
,dictionary?
to corelib by @primo-ppcg in #1244 - Speed up
compare
functions by @primo-ppcg in #1249 - Rework
reverse
, again by @primo-ppcg in #1252 - Use typedefs for strings, symbols, keywords, tuples, structs, and abstracts. by @wooosh in #1246
- Special case common
sort
usages by @primo-ppcg in #1255 - Add
buffer/from-bytes
by @primo-ppcg in #1259 - Update
each
keys before body by @primo-ppcg in #1258 - Update
any?
,every?
by @primo-ppcg in #1257 - Speed up
min
,max
by @primo-ppcg in #1266 - Optimize nil conditions for while and if by @primo-ppcg in #1269
- Allow one-term
:range
and:down
forms by @primo-ppcg in #1278 - Add
lengthable?
by @primo-ppcg in #1280 - Update
interleave
,interpose
by @primo-ppcg in #1281 - Update
partition
,mean
by @primo-ppcg in #1283 - Document array/push variadic argument by @pepe in #1287
- Add
:unless
loop modifier by @primo-ppcg in #1289 - Report line and col more in janet_dobytes by @sogaiu in #1288
New Contributors
Full Changelog: v1.30.0...v1.31.0
Janet 1.30.0
What's Changed
- Use vm_commit by @sogaiu in #1200
- Avoid prematurely closing file descriptors when redirecting IO by @pyrmont in #1201
- Add C escape sequences by @czkz in #1203
- Avoid removing too many symbols with strip on macOS by @pyrmont in #1209
- floor div, variadic mod by @primo-ppcg in #1207
- Add bnot for int types by @primo-ppcg in #1210
- Update and ascii-sort string escapes in peg by @sogaiu in #1216
- Add source view to .ppasm output by @sogaiu in #1213
array/remove
: update final array index to be -1 by @primo-ppcg in #1224- Add fopen reference to file/open docstring by @sogaiu in #1231
- Move
range
to corelib by @primo-ppcg in #1236
New Contributors
Full Changelog: v1.29.1...v1.30.0
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