Skip to content

Commit

Permalink
1.9.0 Release.
Browse files Browse the repository at this point in the history
Fix up some documentation as well.
  • Loading branch information
bakpakin committed May 10, 2020
1 parent e8b3587 commit 235605b
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 27 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Changelog
All notable changes to this project will be documented in this file.

## Unreleased - ???
## 1.9.0 - 2020-05-10
- 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
Expand Down Expand Up @@ -29,7 +30,7 @@ All notable changes to this project will be documented in this file.
- Add os/umask
- Add os/perm-int
- Add os/perm-string
- Add :octal-permissions option for os/stat.
- Add :int-permissions option for os/stat.
- Add `jpm repl` subcommand, as well as `post-deps` macro in project.janet files.
- Various bug fixes.

Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

project('janet', 'c',
default_options : ['c_std=c99', 'b_lundef=false', 'default_library=both'],
version : '1.9.0-dev')
version : '1.9.0')

# Global settings
janet_path = join_paths(get_option('prefix'), get_option('libdir'), 'janet')
Expand Down
2 changes: 1 addition & 1 deletion src/conf/janetconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#define JANET_VERSION_MINOR 9
#define JANET_VERSION_PATCH 0
#define JANET_VERSION_EXTRA ""
#define JANET_VERSION "1.9.0-dev"
#define JANET_VERSION "1.9.0"

/* #define JANET_BUILD "local" */

Expand Down
2 changes: 1 addition & 1 deletion src/core/asm.c
Original file line number Diff line number Diff line change
Expand Up @@ -964,7 +964,7 @@ static const JanetReg asm_cfuns[] = {
"asm", cfun_asm,
JDOC("(asm assembly)\n\n"
"Returns a new function that is the compiled result of the assembly.\n"
"The syntax for the assembly can be found on the janet wiki. Will throw an\n"
"The syntax for the assembly can be found on the Janet website. Will throw an\n"
"error on invalid assembly.")
},
{
Expand Down
6 changes: 3 additions & 3 deletions src/core/compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -855,10 +855,10 @@ static const JanetReg compile_cfuns[] = {
{
"compile", cfun,
JDOC("(compile ast &opt env source)\n\n"
"Compiles an Abstract Syntax Tree (ast) into a janet function. "
"Compiles an Abstract Syntax Tree (ast) into a function. "
"Pair the compile function with parsing functionality to implement "
"eval. Returns a janet function and does not modify ast. Throws an "
"error if the ast cannot be compiled.")
"eval. Returns a new function and does not modify ast. Returns an error "
"struct with keys :line, :column, and :error if compilation fails.")
},
{NULL, NULL, NULL}
};
Expand Down
15 changes: 8 additions & 7 deletions src/core/corelib.c
Original file line number Diff line number Diff line change
Expand Up @@ -643,8 +643,8 @@ static const JanetReg corelib_cfuns[] = {
{
"hash", janet_core_hash,
JDOC("(hash value)\n\n"
"Gets a hash value for any janet value. The hash is an integer can be used "
"as a cheap hash function for all janet objects. If two values are strictly equal, "
"Gets a hash for any value. The hash is an integer can be used "
"as a cheap hash function for all values. If two values are strictly equal, "
"then they will have the same hash value.")
},
{
Expand Down Expand Up @@ -685,7 +685,7 @@ static const JanetReg corelib_cfuns[] = {
"\t:all:\tthe value of path verbatim\n"
"\t:cur:\tthe current file, or (dyn :current-file)\n"
"\t:dir:\tthe directory containing the current file\n"
"\t:name:\tthe filename component of path, with extension if given\n"
"\t:name:\tthe name component of path, with extension if given\n"
"\t:native:\tthe extension used to load natives, .so or .dll\n"
"\t:sys:\tthe system path, or (syn :syspath)")
},
Expand Down Expand Up @@ -742,7 +742,7 @@ static void janet_quick_asm(
janet_def(env, name, janet_wrap_function(janet_thunk(def)), doc);
}

/* Macros for easier inline janet assembly */
/* Macros for easier inline assembly */
#define SSS(op, a, b, c) ((op) | ((a) << 8) | ((b) << 16) | ((c) << 24))
#define SS(op, a, b) ((op) | ((a) << 8) | ((b) << 16))
#define SSI(op, a, b, I) ((op) | ((a) << 8) | ((b) << 16) | ((uint32_t)(I) << 24))
Expand Down Expand Up @@ -1024,7 +1024,7 @@ JanetTable *janet_core_env(JanetTable *replacements) {
janet_quick_asm(env, JANET_FUN_NEXT,
"next", 2, 1, 2, 2, next_asm, sizeof(next_asm),
JDOC("(next ds &opt key)\n\n"
"Gets the next key in a datastructure. Can be used to iterate through "
"Gets the next key in a data structure. Can be used to iterate through "
"the keys of a data structure in an unspecified order. Keys are guaranteed "
"to be seen only once per iteration if they data structure is not mutated "
"during iteration. If key is nil, next returns the first key. If next "
Expand All @@ -1035,7 +1035,8 @@ JanetTable *janet_core_env(JanetTable *replacements) {
"Propagate a signal from a fiber to the current fiber. The resulting "
"stack trace from the current fiber will include frames from fiber. If "
"fiber is in a state that can be resumed, resuming the current fiber will "
"first resume fiber."));
"first resume fiber. This function can be used to re-raise an error without "
"losing the original stack trace."));
janet_quick_asm(env, JANET_FUN_DEBUG,
"debug", 1, 0, 1, 1, debug_asm, sizeof(debug_asm),
JDOC("(debug &opt x)\n\n"
Expand Down Expand Up @@ -1107,7 +1108,7 @@ JanetTable *janet_core_env(JanetTable *replacements) {
JDOC("(/ & xs)\n\n"
"Returns the quotient of xs. If xs is empty, returns 1. If xs has one value x, returns "
"the reciprocal of x. Otherwise return the first value of xs repeatedly divided by the remaining "
"values. Division by two integers uses truncating division."));
"values."));
templatize_varop(env, JANET_FUN_BAND, "band", -1, -1, JOP_BAND,
JDOC("(band & xs)\n\n"
"Returns the bit-wise and of all values in xs. Each x in xs must be an integer."));
Expand Down
6 changes: 3 additions & 3 deletions src/core/marsh.c
Original file line number Diff line number Diff line change
Expand Up @@ -1417,17 +1417,17 @@ static const JanetReg marsh_cfuns[] = {
{
"marshal", cfun_marshal,
JDOC("(marshal x &opt reverse-lookup buffer)\n\n"
"Marshal a janet value into a buffer and return the buffer. The buffer "
"Marshal a value into a buffer and return the buffer. The buffer "
"can the later be unmarshalled to reconstruct the initial value. "
"Optionally, one can pass in a reverse lookup table to not marshal "
"aliased values that are found in the table. Then a forward"
"lookup table can be used to recover the original janet value when "
"lookup table can be used to recover the original value when "
"unmarshalling.")
},
{
"unmarshal", cfun_unmarshal,
JDOC("(unmarshal buffer &opt lookup)\n\n"
"Unmarshal a janet value from a buffer. An optional lookup table "
"Unmarshal a value from a buffer. An optional lookup table "
"can be provided to allow for aliases to be resolved. Returns the value "
"unmarshalled from the buffer.")
},
Expand Down
2 changes: 1 addition & 1 deletion src/core/math.c
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ static const JanetReg math_cfuns[] = {
},
{
"math/next", janet_nextafter,
JDOC("(math/next y)\n\n"
JDOC("(math/next x y)\n\n"
"Returns the next representable floating point value after x in the direction of y.")
},
{NULL, NULL, NULL}
Expand Down
7 changes: 4 additions & 3 deletions src/core/os.c
Original file line number Diff line number Diff line change
Expand Up @@ -1263,7 +1263,8 @@ static const JanetReg os_cfuns[] = {
"\t:freebsd\n"
"\t:openbsd\n"
"\t:netbsd\n"
"\t:posix - A POSIX compatible system (default)")
"\t:posix - A POSIX compatible system (default)\n\n"
"May also return a custom keyword specified at build time.")
},
{
"os/arch", os_arch,
Expand Down Expand Up @@ -1292,7 +1293,7 @@ static const JanetReg os_cfuns[] = {
"os/dir", os_dir,
JDOC("(os/dir dir &opt array)\n\n"
"Iterate over files and subdirectories in a directory. Returns an array of paths parts, "
"with only the filename or directory name and no prefix.")
"with only the file name or directory name and no prefix.")
},
{
"os/stat", os_stat,
Expand All @@ -1311,7 +1312,7 @@ static const JanetReg os_cfuns[] = {
"\t:blocks - number of blocks in file. 0 on windows\n"
"\t:blocksize - size of blocks in file. 0 on windows\n"
"\t:accessed - timestamp when file last accessed\n"
"\t:changed - timestamp when file last chnaged (permissions changed)\n"
"\t:changed - timestamp when file last changed (permissions changed)\n"
"\t:modified - timestamp when file last modified (content changed)\n")
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/core/parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -1139,7 +1139,7 @@ static const JanetReg parse_cfuns[] = {
"parser/new", cfun_parse_parser,
JDOC("(parser/new)\n\n"
"Creates and returns a new parser object. Parsers are state machines "
"that can receive bytes, and generate a stream of janet values.")
"that can receive bytes, and generate a stream of values.")
},
{
"parser/clone", cfun_parse_clone,
Expand Down
3 changes: 1 addition & 2 deletions src/core/peg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1320,8 +1320,7 @@ static const JanetReg peg_cfuns[] = {
"peg/match", cfun_peg_match,
JDOC("(peg/match peg text &opt start & args)\n\n"
"Match a Parsing Expression Grammar to a byte string and return an array of captured values. "
"Returns nil if text does not match the language defined by peg. The syntax of PEGs are very "
"similar to those defined by LPeg, and have similar capabilities.")
"Returns nil if text does not match the language defined by peg. The syntax of PEGs is documented on the Janet website.")
},
{NULL, NULL, NULL}
};
Expand Down
4 changes: 2 additions & 2 deletions src/core/string.c
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ static const JanetReg string_cfuns[] = {
{
"string/from-bytes", cfun_string_frombytes,
JDOC("(string/from-bytes & byte-vals)\n\n"
"Creates a string from integer params with byte values. All integers "
"Creates a string from integer parameters with byte values. All integers "
"will be coerced to the range of 1 byte 0-255.")
},
{
Expand Down Expand Up @@ -627,7 +627,7 @@ static const JanetReg string_cfuns[] = {
{
"string/format", cfun_string_format,
JDOC("(string/format format & values)\n\n"
"Similar to snprintf, but specialized for operating with janet. Returns "
"Similar to snprintf, but specialized for operating with Janet values. Returns "
"a new string.")
},
{
Expand Down

0 comments on commit 235605b

Please sign in to comment.