aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorCalvin Rose <calsrose@gmail.com>2020-05-10 16:44:16 -0500
committerCalvin Rose <calsrose@gmail.com>2020-05-10 16:45:33 -0500
commit235605bfa40e456d7a4dd6f1720a2d03521c2c92 (patch)
treef1b69245ea476dbc9dee6ab3e54c042e830b9df9
parentSilence clang warnings about missing initializers. (diff)
1.9.0 Release.v1.9.0
Fix up some documentation as well.
-rw-r--r--CHANGELOG.md5
-rw-r--r--meson.build2
-rw-r--r--src/conf/janetconf.h2
-rw-r--r--src/core/asm.c2
-rw-r--r--src/core/compile.c6
-rw-r--r--src/core/corelib.c15
-rw-r--r--src/core/marsh.c6
-rw-r--r--src/core/math.c2
-rw-r--r--src/core/os.c7
-rw-r--r--src/core/parse.c2
-rw-r--r--src/core/peg.c3
-rw-r--r--src/core/string.c4
12 files changed, 29 insertions, 27 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 03964e93..526949a6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -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
@@ -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.
diff --git a/meson.build b/meson.build
index c1bde931..c9d7d475 100644
--- a/meson.build
+++ b/meson.build
@@ -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')
diff --git a/src/conf/janetconf.h b/src/conf/janetconf.h
index 92f880ee..c4e68c17 100644
--- a/src/conf/janetconf.h
+++ b/src/conf/janetconf.h
@@ -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" */
diff --git a/src/core/asm.c b/src/core/asm.c
index d2099d83..2b5fc95c 100644
--- a/src/core/asm.c
+++ b/src/core/asm.c
@@ -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.")
},
{
diff --git a/src/core/compile.c b/src/core/compile.c
index 5d74536c..fb51c074 100644
--- a/src/core/compile.c
+++ b/src/core/compile.c
@@ -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}
};
diff --git a/src/core/corelib.c b/src/core/corelib.c
index 0bbc7d2b..19c70ffd 100644
--- a/src/core/corelib.c
+++ b/src/core/corelib.c
@@ -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.")
},
{
@@ -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)")
},
@@ -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))
@@ -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 "
@@ -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"
@@ -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."));
diff --git a/src/core/marsh.c b/src/core/marsh.c
index 8468fe3a..534f1869 100644
--- a/src/core/marsh.c
+++ b/src/core/marsh.c
@@ -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.")
},
diff --git a/src/core/math.c b/src/core/math.c
index c2b575ef..a99e012a 100644
--- a/src/core/math.c
+++ b/src/core/math.c
@@ -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}
diff --git a/src/core/os.c b/src/core/os.c
index 57b555f0..2d2db062 100644
--- a/src/core/os.c
+++ b/src/core/os.c
@@ -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,
@@ -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,
@@ -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")
},
{
diff --git a/src/core/parse.c b/src/core/parse.c
index 52b23483..a49f27ec 100644
--- a/src/core/parse.c
+++ b/src/core/parse.c
@@ -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,
diff --git a/src/core/peg.c b/src/core/peg.c
index d732d157..257736d4 100644
--- a/src/core/peg.c
+++ b/src/core/peg.c
@@ -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}
};
diff --git a/src/core/string.c b/src/core/string.c
index 3b8b9ba4..b397a0f1 100644
--- a/src/core/string.c
+++ b/src/core/string.c
@@ -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.")
},
{
@@ -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.")
},
{