Calvin Rose
5de889419f
Rename contains? and contains-key? to has-value? and has-key?
...
Shorten docstrings to be less like a tutorial. They get put into RAM
and memory ain't free.
2023-05-31 22:35:57 -05:00
Calvin Rose
0fcbda2da7
Merge pull request #1017 from Techcable/feature/helper-func-contains
...
Add `contains?` helper function to boot.janet
2023-05-31 22:28:41 -05:00
Calvin Rose
644ac8caf8
Add compiler optimizations for #1163 - eachp
...
Should result in much better bytecode in the simple case.
2023-05-31 12:26:27 -05:00
Calvin Rose
70f13f1b62
Merge pull request #1157 from zevv/file-lines
...
Add file/lines iterator
2023-05-26 18:16:14 -05:00
Ico Doornekamp
09345ec786
file/linex now only acceps a file, not a path name
2023-05-26 17:50:26 +02:00
primo-ppcg
3602f5aa5d
Update boot.janet
...
`kvs` is not yet defined at this point.
2023-05-25 18:27:31 +07:00
primo-ppcg
672b705faf
Allow mapcat et al to accept multiple iterable arguments
...
#1159
2023-05-25 18:12:38 +07:00
Ico Doornekamp
64e3cdeb2b
Add file/lines iterator
2023-05-24 16:54:04 +02:00
Calvin Rose
41943746e4
Fix #1149 - deep-not= should only return true/false.
...
Also improve perf at same time.
2023-05-22 20:40:30 -05:00
Calvin Rose
c3fd71d643
Merge pull request #1142 from tionis/thaw
...
added thaw to complement freeze
2023-05-21 08:09:47 -05:00
tionis
9cc0645a1e
added test for thaw and freeze
2023-05-20 17:35:25 +02:00
Calvin Rose
fc8c6a429e
Modulo should not be variadic.
2023-05-20 07:45:18 -05:00
Calvin Rose
2f966883d9
Fix #1145 - variadic imperative arith. macros.
...
Also update CHANGELOG
2023-05-20 07:42:50 -05:00
tionis
320ba80ca1
added support for tables/structs with prototypes in thaw
2023-05-20 14:00:33 +02:00
tionis
56d927c72d
added thaw to complement freeze
2023-05-19 21:18:54 +02:00
Calvin Rose
fba1fdabe4
Update short-fn to fix #1123
...
Symbols are renamed on expansion to avoid the issue.
2023-05-13 09:44:30 -05:00
Calvin Rose
cabbaded68
Add support for the NO_COLOR environment variable.
2023-05-06 16:33:45 -05:00
Calvin Rose
4cc4a9d38b
(and ... <truthy-value> true) will return true
as per docs.
2023-05-06 10:16:05 -05:00
Calvin Rose
440af9fd64
Remove extra allocation in drop.
2023-04-24 09:41:33 -05:00
Calvin Rose
4ed3f2c662
Merge pull request #1114 from ianthehenry/drop-from-end
...
drop with a negative count now drops from the end
2023-04-24 09:16:10 -05:00
Calvin Rose
e4b68cd940
Merge pull request #1109 from wackbyte/remove-double-space
...
Remove double space in help message
2023-04-24 09:11:45 -05:00
Ian Henry
54b54f85f3
drop with a negative count now drops from the end
2023-04-23 21:39:14 -07:00
Ian Henry
ccd874fe4e
add catseq
2023-04-23 21:20:01 -07:00
wackbyte
d359c6b43e
Remove double space in help message
2023-04-22 21:46:24 -04:00
ML
b6175e4296
Add keep-syntax
and keep-syntax!
functions
...
These functions are designed to make it easier to properly preserve the
sourcemap and tuple type in macros. This commit also modifies the threading
macros to make use of these functions.
2023-04-07 21:09:52 -04:00
Calvin Rose
01aab66667
Prepare for 1.27.0 release.
2023-03-05 09:48:25 -06:00
Calvin Rose
7a1c9c7798
Add support for debugging upvalues.
...
Upvalues are stored in the symbol slots structure as well, but
since they are always live, we repurpose the death_pc field to
refer to the environment index that we want to look at at runtime.
2023-02-05 15:30:01 -06:00
Calvin Rose
c7fb7b4451
Merge branch 'master' into localbindings
2023-02-05 11:36:57 -06:00
Calvin Rose
67c474fc7a
More fixes to ev/gather (tested on httpf server).
2023-02-05 10:21:37 -06:00
Calvin Rose
4e8154cf8a
Fix ev/gather to cancel children on cancellation.
...
Otherwise, we would be leaving zombie fibers around.
2023-02-05 09:43:16 -06:00
Calvin Rose
f4bc89d1c0
Progress.
2023-02-02 21:08:48 -06:00
Jona Ekenberg
624a6cf619
symbolslots nil when there are no symbols, changed debugger to not have special case
2023-02-01 11:25:52 +01:00
Jona Ekenberg
587aa87d28
symbolslots now use janet_v vectors, flat structure
2023-02-01 11:06:33 +01:00
Jona Ekenberg
88813c4f87
initial slotsyms implementation
2023-02-01 09:39:24 +01:00
Calvin Rose
05e7f974e3
Add os/compiler to the core.
...
Allows querying what compiler was used to compile Janet.
2023-01-28 14:00:02 -06:00
Calvin Rose
b73855b193
Merge branch 'master' of github.com:janet-lang/janet
2023-01-07 15:05:16 -06:00
Calvin Rose
a0f40042cb
Update copyright year.
2023-01-07 15:03:35 -06:00
Calvin Rose
57e6ee963d
Merge pull request #1046 from dressupgeekout/charlotte_sort_doc
...
Explicitly mention that `sort-by` sorts a list in place.
2022-12-16 11:11:07 -06:00
harryvederci
846123ecab
Improve documentation for the all
function.
2022-12-09 11:16:42 +00:00
Charlotte Koch
4debe3446c
Explicitly mention that sort-by
sorts a list in place.
2022-11-20 20:51:49 -08:00
Calvin Rose
6a557a73f5
Simplify eval.
...
Also add more conventional handling of nil to the `compile` function.
2022-11-11 11:25:06 -06:00
Calvin Rose
8d1cfe0c56
Simplify eval-string implementation.
2022-11-11 11:15:53 -06:00
Calvin Rose
b75fb8dc9e
Add :@all: to module/expand-path
...
Allow more easily importing modules from custom directories
without jumping through too many hoops. Technically, this was
possible before but required circumventing the built-in module/paths
and was just a hassle.
Also add entries to module/path (and module/add-path) to allow code
like the following.
(setdyn :my-libs "/home/me/janet-stuff/")
(import @my-libs/toolbox)
Intended for things like test harnesses where code might not
be installed to the usual directories.
2022-11-04 11:15:48 -05:00
Locria Cyber
e4c9dafc9a
Fix typo in ev/spawn doc
2022-09-13 23:49:42 +00:00
Autumn!
fe5f661d15
Removed unnecessary backslashes from documentation
2022-09-08 13:21:17 +01:00
Techcable
c099ec05ee
Remove documentation on type error from index-of
...
Three reasons:
1. This same behavior is not documented on the `next` function
2. This function does not throw the error directly,
it only throws an error because `next` does.
3. Following the same idea as the previous commit, this behavior is
more or less implementation-defined for nonsensical types
> In dynamic languages, the usual idea is garbage in, garbage out.
Various other documentation cleanup.
2022-08-26 21:46:58 -07:00
Techcable
a20612478e
Remove try from contains?, allowing type errors
...
> Remove the try. In dynamic languages, the usual idea is garbage in, garbage out. You misunderstood my point about the type error. “Test” functions are not special in that regard.
> - @bakpakin
2022-08-26 20:36:17 -07:00
Techcable
f778e8bbd1
Fix incorrect usage of the test macro
...
I need unit tests....
2022-08-26 15:35:26 -07:00
Techcable
7203c046f9
Remove collection? type test
...
No longer used to guard the type tests.
2022-08-26 15:23:52 -07:00
Techcable
754b61c593
Clarify documentation of contains?
...
Also contains-value?
2022-08-26 15:19:39 -07:00