1
0
mirror of https://github.com/janet-lang/janet synced 2024-06-30 17:13:15 +00:00
Commit Graph

34 Commits

Author SHA1 Message Date
Calvin Rose
7478ad115f Add any? predicate to core.
This is the contrapositive to `every?`, and is analagous to `or` as
`every?` is to `and`.
2020-07-06 09:19:10 -05:00
Calvin Rose
ac5de1f96e Change compare-primitive to cmp.
cmp is implemented as a VM instruction rather than
a function.
2020-06-24 16:00:00 -05:00
Mike Beller
9824a34d76 Remove dead code. 2020-06-06 08:55:20 -04:00
Mike Beller
a4178d4b3c All tests pass for compare. 2020-06-05 10:51:35 -04:00
Mike Beller
3e423722c6 Actually got the comparisons working for s64 (still need to fix u64) 2020-06-04 18:27:48 -04:00
Mike Beller
01837f2bb6 All tests pass. 2020-06-04 15:27:36 -04:00
Mike Beller
411c5da6d3 compare functions now work for built ins and 'objects' 2020-06-04 13:49:09 -04:00
Mike Beller
7658ea8335 primitive tests working. issues remain with polymorphic. 2020-06-04 12:46:58 -04:00
Mike Beller
81d301a42b Initial commit of base functionality for compare 2020-06-04 12:23:54 -04:00
Calvin Rose
8bc2987a71 (struct ...) with duped keys will use last value. 2020-04-11 13:42:25 -05:00
Calvin Rose
02f17bd4e4 Add sort-by and sorted-by. 2020-04-09 20:43:51 -05:00
Calvin Rose
87ecdb8112 Change \UXXXXXXXX -> \UXXXXXX and check codepoint max.
No need to add two extra leading zeros, as the max unicode
codepoint is 0x10FFFF.
2020-04-05 07:09:53 -05:00
Calvin Rose
ae70a03383 Address #306 - Add unicode escapes.
Unicode escapes have the same syntax as go - \uXXXX or \UXXXXXXXX.
2020-04-04 21:46:08 -05:00
Calvin Rose
a68ee7aac6 Update Copyright 2020. 2020-01-12 10:50:37 -06:00
Calvin Rose
022be217a2 Remove ==, not==, and order[<,<=,>,>=].
This unifies equality and comparison checking. Before, we had
separate functions and vm opcodes for comparing general values vs.
for comparing numbers, where the numberic functions were polymorphic and
had special cases for handling NaNs. By unfiying them, abstract types
can now better integrate with other number types and behave as keys.

For now, the old functions are aliased but will eventually be removed.
2019-12-28 16:04:15 -05:00
Andrew Chambers
9911c90b1d Handle missing get case. 2019-12-04 13:58:21 +13:00
Andrew Chambers
ded08b6e1e Add truthy? to core. 2019-12-01 14:34:41 +13:00
Calvin Rose
0dcae6c3d6 Update regression test. 2019-07-07 23:23:45 -05:00
Calvin Rose
affcb5b459 Address #137
Fix compiler bug when compiling desturctured bindings in a top-level
def or var. Also introduce janet_table_clone API call to make this
easier.
2019-07-07 23:18:39 -05:00
Calvin Rose
9ba8728176 Update module system.
Add relative imports and path normalization. This should
help towards a more composable build/dependency system.
2019-06-18 22:10:13 -04:00
Calvin Rose
0378ba78cc Add regression test. 2019-05-20 09:20:50 -04:00
Calvin Rose
38a7e4faf1 Disallow NaN as table/struct key.
Fix bugs and add tests for denormalized tables
and structs.
2019-01-28 11:50:33 -05:00
Calvin Rose
6f3bc3d577 Update copyright date, fix types, remove trailing whitespace. 2019-01-06 03:23:03 -05:00
Calvin Rose
e9c94598e6 Add native keyword type to replace symbols with leading ':'
character.
2019-01-02 19:41:07 -05:00
Calvin Rose
d724c5b959 Update number representation so that wrapping numbers isn't
doesn't need to check for NaNs. Change ordering of types.
2018-12-30 12:37:50 -05:00
Calvin Rose
6b95326d7c First commit removing the integer number type. This should
remove some complexity and unexpected behavior around numbers in
general as all numbers are the same number type, IEEE 754 double
precision numbers. Also update examples and tests, some of which were
out of date.

Some more testing may be needed for new changes to numbers.
2018-12-27 13:05:29 -05:00
Calvin Rose
99e14a9b70 Rename bitwise operators. 2018-12-16 22:13:48 -05:00
Calvin Rose
03dbd79165 Rename the := special form to set so it does not look like a keyword. 2018-12-16 21:57:32 -05:00
Calvin Rose
4e4dd31164 Change syntax for namespaces.
Add quasiquote, unquote, and unquote-splicing
as specials rather than a macro.
2018-11-30 22:49:21 -05:00
Calvin Rose
7dbad20150 Update core and some examples to use the new
syntax.
2018-11-29 14:03:45 -05:00
Calvin Rose
8bfea73ee7 Fix web build again, simplify fibers and fiber
implementation code.
2018-11-26 09:03:26 -05:00
Calvin Rose
d4ee760b3e Change format for declaring flexible arity functions. 2018-11-25 14:03:00 -05:00
Calvin Rose
f41dab8f6c Fix error in string.replace-all 2018-09-29 20:01:57 -04:00
Calvin Rose
c8ef2a0d88 Rename to janet 2018-09-05 22:18:42 -04:00