Skip to content

Commit 235605b

Browse files
committed
1.9.0 Release.
Fix up some documentation as well.
1 parent e8b3587 commit 235605b

File tree

12 files changed

+29
-27
lines changed

12 files changed

+29
-27
lines changed

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
33

4-
## Unreleased - ???
4+
## 1.9.0 - 2020-05-10
5+
- Add `:ldflags` option to many jpm declare functions.
56
- Add `errorf` to core.
67
- Add `lenprefix` combinator to PEGs.
78
- 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.
2930
- Add os/umask
3031
- Add os/perm-int
3132
- Add os/perm-string
32-
- Add :octal-permissions option for os/stat.
33+
- Add :int-permissions option for os/stat.
3334
- Add `jpm repl` subcommand, as well as `post-deps` macro in project.janet files.
3435
- Various bug fixes.
3536

meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

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

2525
# Global settings
2626
janet_path = join_paths(get_option('prefix'), get_option('libdir'), 'janet')

src/conf/janetconf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#define JANET_VERSION_MINOR 9
3131
#define JANET_VERSION_PATCH 0
3232
#define JANET_VERSION_EXTRA ""
33-
#define JANET_VERSION "1.9.0-dev"
33+
#define JANET_VERSION "1.9.0"
3434

3535
/* #define JANET_BUILD "local" */
3636

src/core/asm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -964,7 +964,7 @@ static const JanetReg asm_cfuns[] = {
964964
"asm", cfun_asm,
965965
JDOC("(asm assembly)\n\n"
966966
"Returns a new function that is the compiled result of the assembly.\n"
967-
"The syntax for the assembly can be found on the janet wiki. Will throw an\n"
967+
"The syntax for the assembly can be found on the Janet website. Will throw an\n"
968968
"error on invalid assembly.")
969969
},
970970
{

src/core/compile.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -855,10 +855,10 @@ static const JanetReg compile_cfuns[] = {
855855
{
856856
"compile", cfun,
857857
JDOC("(compile ast &opt env source)\n\n"
858-
"Compiles an Abstract Syntax Tree (ast) into a janet function. "
858+
"Compiles an Abstract Syntax Tree (ast) into a function. "
859859
"Pair the compile function with parsing functionality to implement "
860-
"eval. Returns a janet function and does not modify ast. Throws an "
861-
"error if the ast cannot be compiled.")
860+
"eval. Returns a new function and does not modify ast. Returns an error "
861+
"struct with keys :line, :column, and :error if compilation fails.")
862862
},
863863
{NULL, NULL, NULL}
864864
};

src/core/corelib.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -643,8 +643,8 @@ static const JanetReg corelib_cfuns[] = {
643643
{
644644
"hash", janet_core_hash,
645645
JDOC("(hash value)\n\n"
646-
"Gets a hash value for any janet value. The hash is an integer can be used "
647-
"as a cheap hash function for all janet objects. If two values are strictly equal, "
646+
"Gets a hash for any value. The hash is an integer can be used "
647+
"as a cheap hash function for all values. If two values are strictly equal, "
648648
"then they will have the same hash value.")
649649
},
650650
{
@@ -685,7 +685,7 @@ static const JanetReg corelib_cfuns[] = {
685685
"\t:all:\tthe value of path verbatim\n"
686686
"\t:cur:\tthe current file, or (dyn :current-file)\n"
687687
"\t:dir:\tthe directory containing the current file\n"
688-
"\t:name:\tthe filename component of path, with extension if given\n"
688+
"\t:name:\tthe name component of path, with extension if given\n"
689689
"\t:native:\tthe extension used to load natives, .so or .dll\n"
690690
"\t:sys:\tthe system path, or (syn :syspath)")
691691
},
@@ -742,7 +742,7 @@ static void janet_quick_asm(
742742
janet_def(env, name, janet_wrap_function(janet_thunk(def)), doc);
743743
}
744744

745-
/* Macros for easier inline janet assembly */
745+
/* Macros for easier inline assembly */
746746
#define SSS(op, a, b, c) ((op) | ((a) << 8) | ((b) << 16) | ((c) << 24))
747747
#define SS(op, a, b) ((op) | ((a) << 8) | ((b) << 16))
748748
#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) {
10241024
janet_quick_asm(env, JANET_FUN_NEXT,
10251025
"next", 2, 1, 2, 2, next_asm, sizeof(next_asm),
10261026
JDOC("(next ds &opt key)\n\n"
1027-
"Gets the next key in a datastructure. Can be used to iterate through "
1027+
"Gets the next key in a data structure. Can be used to iterate through "
10281028
"the keys of a data structure in an unspecified order. Keys are guaranteed "
10291029
"to be seen only once per iteration if they data structure is not mutated "
10301030
"during iteration. If key is nil, next returns the first key. If next "
@@ -1035,7 +1035,8 @@ JanetTable *janet_core_env(JanetTable *replacements) {
10351035
"Propagate a signal from a fiber to the current fiber. The resulting "
10361036
"stack trace from the current fiber will include frames from fiber. If "
10371037
"fiber is in a state that can be resumed, resuming the current fiber will "
1038-
"first resume fiber."));
1038+
"first resume fiber. This function can be used to re-raise an error without "
1039+
"losing the original stack trace."));
10391040
janet_quick_asm(env, JANET_FUN_DEBUG,
10401041
"debug", 1, 0, 1, 1, debug_asm, sizeof(debug_asm),
10411042
JDOC("(debug &opt x)\n\n"
@@ -1107,7 +1108,7 @@ JanetTable *janet_core_env(JanetTable *replacements) {
11071108
JDOC("(/ & xs)\n\n"
11081109
"Returns the quotient of xs. If xs is empty, returns 1. If xs has one value x, returns "
11091110
"the reciprocal of x. Otherwise return the first value of xs repeatedly divided by the remaining "
1110-
"values. Division by two integers uses truncating division."));
1111+
"values."));
11111112
templatize_varop(env, JANET_FUN_BAND, "band", -1, -1, JOP_BAND,
11121113
JDOC("(band & xs)\n\n"
11131114
"Returns the bit-wise and of all values in xs. Each x in xs must be an integer."));

src/core/marsh.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1417,17 +1417,17 @@ static const JanetReg marsh_cfuns[] = {
14171417
{
14181418
"marshal", cfun_marshal,
14191419
JDOC("(marshal x &opt reverse-lookup buffer)\n\n"
1420-
"Marshal a janet value into a buffer and return the buffer. The buffer "
1420+
"Marshal a value into a buffer and return the buffer. The buffer "
14211421
"can the later be unmarshalled to reconstruct the initial value. "
14221422
"Optionally, one can pass in a reverse lookup table to not marshal "
14231423
"aliased values that are found in the table. Then a forward"
1424-
"lookup table can be used to recover the original janet value when "
1424+
"lookup table can be used to recover the original value when "
14251425
"unmarshalling.")
14261426
},
14271427
{
14281428
"unmarshal", cfun_unmarshal,
14291429
JDOC("(unmarshal buffer &opt lookup)\n\n"
1430-
"Unmarshal a janet value from a buffer. An optional lookup table "
1430+
"Unmarshal a value from a buffer. An optional lookup table "
14311431
"can be provided to allow for aliases to be resolved. Returns the value "
14321432
"unmarshalled from the buffer.")
14331433
},

src/core/math.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ static const JanetReg math_cfuns[] = {
480480
},
481481
{
482482
"math/next", janet_nextafter,
483-
JDOC("(math/next y)\n\n"
483+
JDOC("(math/next x y)\n\n"
484484
"Returns the next representable floating point value after x in the direction of y.")
485485
},
486486
{NULL, NULL, NULL}

src/core/os.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1263,7 +1263,8 @@ static const JanetReg os_cfuns[] = {
12631263
"\t:freebsd\n"
12641264
"\t:openbsd\n"
12651265
"\t:netbsd\n"
1266-
"\t:posix - A POSIX compatible system (default)")
1266+
"\t:posix - A POSIX compatible system (default)\n\n"
1267+
"May also return a custom keyword specified at build time.")
12671268
},
12681269
{
12691270
"os/arch", os_arch,
@@ -1292,7 +1293,7 @@ static const JanetReg os_cfuns[] = {
12921293
"os/dir", os_dir,
12931294
JDOC("(os/dir dir &opt array)\n\n"
12941295
"Iterate over files and subdirectories in a directory. Returns an array of paths parts, "
1295-
"with only the filename or directory name and no prefix.")
1296+
"with only the file name or directory name and no prefix.")
12961297
},
12971298
{
12981299
"os/stat", os_stat,
@@ -1311,7 +1312,7 @@ static const JanetReg os_cfuns[] = {
13111312
"\t:blocks - number of blocks in file. 0 on windows\n"
13121313
"\t:blocksize - size of blocks in file. 0 on windows\n"
13131314
"\t:accessed - timestamp when file last accessed\n"
1314-
"\t:changed - timestamp when file last chnaged (permissions changed)\n"
1315+
"\t:changed - timestamp when file last changed (permissions changed)\n"
13151316
"\t:modified - timestamp when file last modified (content changed)\n")
13161317
},
13171318
{

src/core/parse.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1139,7 +1139,7 @@ static const JanetReg parse_cfuns[] = {
11391139
"parser/new", cfun_parse_parser,
11401140
JDOC("(parser/new)\n\n"
11411141
"Creates and returns a new parser object. Parsers are state machines "
1142-
"that can receive bytes, and generate a stream of janet values.")
1142+
"that can receive bytes, and generate a stream of values.")
11431143
},
11441144
{
11451145
"parser/clone", cfun_parse_clone,

src/core/peg.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1320,8 +1320,7 @@ static const JanetReg peg_cfuns[] = {
13201320
"peg/match", cfun_peg_match,
13211321
JDOC("(peg/match peg text &opt start & args)\n\n"
13221322
"Match a Parsing Expression Grammar to a byte string and return an array of captured values. "
1323-
"Returns nil if text does not match the language defined by peg. The syntax of PEGs are very "
1324-
"similar to those defined by LPeg, and have similar capabilities.")
1323+
"Returns nil if text does not match the language defined by peg. The syntax of PEGs is documented on the Janet website.")
13251324
},
13261325
{NULL, NULL, NULL}
13271326
};

src/core/string.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ static const JanetReg string_cfuns[] = {
542542
{
543543
"string/from-bytes", cfun_string_frombytes,
544544
JDOC("(string/from-bytes & byte-vals)\n\n"
545-
"Creates a string from integer params with byte values. All integers "
545+
"Creates a string from integer parameters with byte values. All integers "
546546
"will be coerced to the range of 1 byte 0-255.")
547547
},
548548
{
@@ -627,7 +627,7 @@ static const JanetReg string_cfuns[] = {
627627
{
628628
"string/format", cfun_string_format,
629629
JDOC("(string/format format & values)\n\n"
630-
"Similar to snprintf, but specialized for operating with janet. Returns "
630+
"Similar to snprintf, but specialized for operating with Janet values. Returns "
631631
"a new string.")
632632
},
633633
{

0 commit comments

Comments
 (0)