Releases: janet-lang/janet
Janet 1.8.1
Small patch on 1.8.0, fixing issues on big endian platforms and BSDs. Otherwise, more or less the same as 1.8.0.
Janet 1.8.0
Version 1.8.0! Mostly small fixes and a number of additions to the core library. Also exposes signals to Janet programs for custom control flow, which previously was only available from C.
- Add
reduce2
,accumulate
, andaccumulate2
. - Add lockfiles to
jpm
viajpm make-lockfile
andjpm load-lockfile
. - Add
os/realpath
(Not supported on windows). - Add
os/chmod
. - Add
chr
macro. - Allow
_
in thematch
macro to match anything without creating a binding
or doing unification. Also change behavior of matching nil. - Add
:range-to
and:down-to
verbs in theloop
macro. - Fix
and
andor
macros returning nil instead of false in some cases. - Allow matching successfully against nil values in the
match
macro. - Improve
janet_formatc
andjanet_panicf
formatters to be more likestring/format
.
This makes it easier to make nice error messages from C. - Add
signal
- Add
fiber/can-resume?
- Allow fiber functions to accept arguments that are passed in via
resume
. - Make flychecking slightly less strict but more useful
- Correct arity for
next
- Correct arity for
marshal
- Add
flush
andeflush
- Add
prompt
andreturn
on top of signal for user friendly delimited continuations. - Fix bug in buffer/blit when using the offset-src argument.
- Fix segfault with malformed pegs.
Janet 1.7.0
Many new functions and macros that should be generally useful, like assert
and eachk
. There is some backwards incompatibility in the Janet core with the removal of the numeric operators (==
, not==
, etc), removal of the emscripten build, removal of file/fileno
and file/fdopen
, and some changes to comparison functionality for abstract types. Many other small changes in the Changelog.
- Remove
file/fileno
andfile/fdopen
. - Remove
==
,not==
,order<
,order>
,order<=
, andorder>=
. Instead, use the normal
comparison and equality functions. - Let abstract types define a hash function and comparison/equality semantics. This lets
abstract types much better represent value types. This adds more fields to abstract types, which
will generate warnings when compiled against other versions. - Remove Emscripten build. Instead, use the amalgamated source code with a custom toolchain.
- Update documentation.
- Add
var-
- Add
module/add-paths
- Add
file/temp
- Add
mod
function to core. - Small bug fixes
- Allow signaling from C functions (yielding) via janet_signalv. This
makes it easy to write C functions that work with event loops, such as
in libuv or embedded in a game. - Add '%j' formatting option to the format family of functions.
- Add
defer
- Add
assert
- Add
when-with
- Add
if-with
- Add completion to the default repl based on currently defined bindings. Also generally improve
the repl keybindings. - Add
eachk
- Add
eachp
- Improve functionality of the
next
function.next
now works on many different
types, not just tables and structs. This allows for more generic data processing. - Fix thread module issue where sometimes decoding a message failed.
- Fix segfault regression when macros are called with bad arity.
Janet 1.6.0
Large release to Janet, with a few breaking changes to the C API. This will not be a major release, however, as the change is small enough and the language young enough. This release also includes the addition of threads, which work on bot posix systems with pthreads, and Windows with the win32 api. See the changelog for more details.
- Add
thread/
module to the core. - Allow seeding RNGs with any sequence of bytes. This provides
a wider key space for the RNG. Exposed in C asjanet_rng_longseed
. - Fix issue in
resume
and similar functions that could cause breakpoints to be skipped. - Add a number of new math functions.
- Improve debugger experience and capabilities. See examples/debugger.janet
for what an interactive debugger could look like. - Add
debug/step
(janet_step in the C API) for single stepping Janet bytecode. - The built in repl now can enter the debugger on any signal (errors, yields,
user signals, and debug signals). To enable this, type (setdyn :debug true)
in the repl environment. - When exiting the debugger, the fiber being debugged is resumed with the exit value
of the debug session (the value returned by(quit return-value)
, or nil if user typed Ctrl-D). (quit)
can take an optional argument that is the return value. If a module
contains(quit some-value)
, the value of that module returned to(require "somemod")
is the return value. This lets module writers completely customize a module without writing
a loader.- Add nested quasiquotation.
- Add
os/cryptorand
- Add
prinf
andeprinf
to be have likeprintf
andeprintf
. The latter two functions
now including a trailing newline, like the other print functions. - Add nan?
- Add
janet_in
to C API. - Add
truthy?
- Add
os/environ
- Add
buffer/fill
andarray/fill
- Add
array/new-filled
- Use
(doc)
with no arguments to see available bindings and dynamic bindings. jpm
will useCC
andAR
environment variables when compiling programs.- Add
comptime
macro for compile time evaluation. - Run
main
functions in scripts if they exist, just like jpm standalone binaries. - Add
protect
macro. - Add
root-env
to get the root environment table. - Change marshalling protocol with regard to abstract types.
- Add
show-paths
tojpm
. - Add several default patterns, like
:d
and:s+
, to PEGs. - Update
jpm
path settings to make usingjpm
easier on non-global module trees. - Numerous small bug fixes and usability improvements.
Janet 1.5.1
Patch on 1.5.0. Fixes a handful of bugs, but is otherwise backwards compatible.
Janet 1.5.0
This release brings a lot of updates to Janet, with some small, potentially backwards incompatible changes.
Changelog:
os/date
now defaults to UTC.- Add
--test
flag to jpm to test libraries on installation. - Add
math/rng
,math/rng-int
, andmath/rng-uniform
. - Add
in
function to index in a stricter manner. Conversely,get
will
now not throw errors on bad keys. - Indexed types and byte sequences will now error when indexed out of range or
with bad keys. - Add rng functions to Janet. This also replaces the RNG behind
math/random
andmath/seedrandom
with a consistent, platform independent RNG. - Add
with-vars
macro. - Add the
quickbin
command to jpm. - Create shell.c when making the amalgamated source. This can be compiled with
janet.c to make the janet interpreter. - Add
cli-main
function to the core, which invokes Janet's CLI interface.
This basically moves what was init.janet into boot.janet. - Improve flychecking, and fix flyching bugs introduced in 1.4.0.
- Add
prin
,eprint
,eprintf
andeprin
functions. The
functions prefix with e print to(dyn :err stderr)
- Print family of functions can now also print to buffers
(before, they could only print to files.) Output can also
be completely disabled with(setdyn :out false)
. printf
is now a c function for optimizations in the case
of printing to buffers.
Janet 1.4.0
This release brings fxes and updates to jpm and the core library. Stacktraces should now be easier to read as they use line and column information instead of byte offsets. Also added some simple compile time error checking to functions that are called with the the wrong arity.
Pckages can be installed via jpm install json
, where json is a package name in https://github.com/janet-lang/pkgs, or any other package registry that is set via the JANET_PKGLIST environment variable. A package registry is just a package that follows the format in https://github.com/janet-lang/pkgs.git.
Changelog
- Add
quit
function to exit from a repl, but not always exit the entire application. - Add
update-pkgs
to jpm. - Integrate jpm with https://github.com/janet-lang/pkgs.git. jpm can now install packages based on their short names in the package listing, which can be customized via an env variable.
- Add
varfn
macro - Add compile time arity checking when function in function call is known.
- Added
slice
to the core library. - The
*/slice
family of functions now can take nil as start or end to get the same behavior as the defaults (0 and -1) for those parameters. string/
functions that take a pattern to search for will throw an error when receiving the empty string.- Replace (start:end) style stacktrace source position information with line, column. This should be more readable for humans. Also, range information can be recovered by re-parsing source.
Janet 1.3.1
Mostly fixing bugs from 1.3.1, but also extends the length function and basic arithmetic and comparison functions to abstract types. This lets built in integer types behave more like normal numbers, and typed arrays behave more like normal arrays.
- Fix some linking issues when creating executables with native dependencies.
- jpm now runs each test script in a new interpreter.
- Fix an issue that prevent some valid programs from compiling.
- Add
mean
to core. - Abstract types that implement the
:+
,:-
,:*
,:/
,:>
,:==
,:<
,
:<=
, and:>=
methods will work with the corresponding built-in
arithmetic functions. This means built-in integer types can now be used as
normal number values in many contexts. - Allow (length x) on typed arrays an other abstract types that implement
the :length method.
Janet 1.3.0
The release deals mainly with jpm, as well as a few additions to the core. There is also a man page for jpm that should help with usage. The release removes the path.janet
and cook.janet
modules, which have been moved to https://github.com/janet-lang/path and merged into jpm respectively. See CHANGELIST.md for details.
- Add
get-in
,put-in
,update-in
, andfreeze
to core. - Add
jpm run rule
andjpm rules
to jpm to improve utility and discoverability of jpm. - Remove
cook
module and movepath
module to https://github.com/janet-lang/path.git.
The functionality incook
is now bundled directly in thejpm
script. - Add
buffer/format
andstring/format
format flagsQ
andq
to print colored and
non-colored single-line values, similar toP
andp
. - Change default repl to print long sequences on one line and color stacktraces if color is enabled.
- Add
backmatch
pattern for PEGs. - jpm detects if not in a Developer Command prompt on windows for a better error message.
- jpm install git submodules in dependencies
- Change default fiber stack limit to the maximum value of a 32 bit signed integer.
- Some bug fixes with
jpm
- Fix bugs with pegs.
- Add
os/arch
to get ISA that janet was compiled for - Add color to stacktraces via
(dyn :err-color)
Janet 1.2.0
This release brings a number of improvements to the language, including shorthand anonymous function literals, and new functions in the core library. You can also use jpm
to create binary executables from Janet code (provided you have a C compiler). Also comes with a handful of bug fixes.
- Add
take
anddrop
functions that are easier to use compared to the
existing slice functions. - Add optional default value to
get
. - Add function literal short-hand via
|
reader macro, which maps to the
short-fn
macro. - Add
int?
andnat?
functions to the core. - Add
(dyn :executable)
at top level to get what used to be
(process/args 0)
. - Add
:linux
to platforms returned by(os/which)
. - Update jpm to build standalone executables. Use
declare-executable
for this. - Add
use
macro. - Remove
process/args
in favor of(dyn :args)
. - Fix bug with Nanbox implementation allowing users to created
custom values of any type with typed array and marshal modules, which
was unsafe. - Add
janet_wrap_number_safe
to API, for converting numbers to Janets
where the number could be any 64 bit, user provided bit pattern. Certain
NaN values (which a machine will never generate as a result of a floating
point operation) are guarded against and converted to a default NaN value.