Calvin Rose
c5da87b860
Fix broken doc format.
...
Many assumptions in the parsing code that could cause infinite
loops, as well as assuming things were non-nil.
2021-01-17 11:36:48 -06:00
Andrew Owen
c6aa536590
Clean up env dance
2021-01-16 12:47:50 -07:00
Andrew Owen
7f74ff3dd7
Restore :source property to keep import* working at REPL
2021-01-15 02:59:17 -07:00
Andrew Owen
c4a95e9a1e
Update error handling, kill a bikeshed argument
2021-01-15 01:53:14 -07:00
Andrew Owen
71f9e2b1d7
Add support for a profile.janet
...
Add support for a profile.janet, along with a flag for disabling it's use.
2021-01-15 01:31:23 -07:00
sogaiu
c56b876bfe
Tweak update docs
2021-01-13 23:04:06 +09:00
Calvin Rose
4f2d1cdc00
Go back to a single supervisor channel per fiber.
...
We now also use the fiber mask to figure out which flags to wait for.
2021-01-12 21:35:28 -06:00
Calvin Rose
dfbdd17dce
Add doc-of
function to core for reverse documentation lookup.
2021-01-11 20:32:26 -06:00
Calvin Rose
3883460202
Remove length checks to a number of core functions.
...
This lets them be more generic and implemented over a wider range of
data types, such as fibers.
2021-01-11 15:01:41 -06:00
Calvin Rose
11067d7a56
Update module and rem operator for int types.
2021-01-09 14:47:43 -06:00
Calvin Rose
32e8ac912d
Merge branch 'master' of github.com:janet-lang/janet
2021-01-07 18:08:08 -06:00
Calvin Rose
e403fb4652
Do not try and preload imports that are relative.
2021-01-07 18:07:47 -06:00
Josef Pospíšil
5a2a134c95
Remove redundant do
2021-01-07 14:38:58 +01:00
Calvin Rose
4e7ad3c7ce
Add initial implementation for supervisor channels.
...
Supervisor channels are a simple concept to more efficiently
enable dynamic, structure concurrency. When a top-level fiber
completes (or errors), it will push itself to it's supervisor
channel if it has one (instead of printing a stacktrace). This
let's another fiber poll a channel and "supervise" a set of fibers.
2021-01-06 23:19:22 -06:00
Calvin Rose
f206b476d1
Fix #550 - add varfn to safe forms for flycheck.
2021-01-06 17:31:08 -06:00
Calvin Rose
dd2595c53f
Merge branch 'master' of github.com:janet-lang/janet
2021-01-06 17:27:50 -06:00
Calvin Rose
545df28d71
Add flycheck function to core.
...
Also make flychecking work with stdin out of the box.
2021-01-06 17:27:17 -06:00
Josef Pospíšil
c7f382add6
Update doc for thread/new and remove ws in loop's
2021-01-04 18:29:00 +01:00
Calvin Rose
81f62b246c
Merge pull request #545 from felixr/master
...
Revert my buggy hybrid sort
2021-01-03 16:39:23 -06:00
Calvin Rose
87badc71d2
Remove :generate verb from loop.
...
Instead, one case use `:in` as with otehr data structures.
2021-01-03 16:38:38 -06:00
Calvin Rose
e5242c67ff
Update changelog and documentation.
2021-01-03 16:30:43 -06:00
Calvin Rose
4355420994
Remove function eachy
.
...
Instead use `each`.
2021-01-03 16:19:23 -06:00
Felix Riedel
19576effbe
Revert "Tweak sort: use insertion sort for small arrays"
...
This reverts commit 0ea77cabfb
.
2021-01-03 20:09:50 +00:00
Calvin Rose
6b268c5df4
find-index
now takes optional default.
2021-01-03 09:33:52 -06:00
Calvin Rose
62f783f1dc
Merge branch 'master' of github.com:janet-lang/janet
2021-01-03 09:26:31 -06:00
Calvin Rose
8655530b19
Rename predicates in module/paths
2020-12-29 19:52:26 -06:00
Calvin Rose
cc2cc4db43
Merge pull request #541 from sogaiu/match-doc-formatting
...
Tweak match docstring
2020-12-29 13:10:35 -06:00
Calvin Rose
20bcd95279
Merge commit '0ea77cabfb30afc15433581f5888171c1f65aafd'
2020-12-28 12:20:21 -06:00
Felix Riedel
0ea77cabfb
Tweak sort: use insertion sort for small arrays
2020-12-28 16:06:48 +00:00
sogaiu
ffa0d5fe45
Tweak match docstring
2020-12-27 13:42:22 +09:00
Calvin Rose
b4f242193d
Improve hash function for numbers.
2020-12-26 15:38:04 -06:00
Felix Riedel
3e742ffc4c
Improve quicksort to avoid worst case performance.
...
The current implementation will have quadratic behaviour for already
sorted arrays because it picks the last element as pivot. In an sorted
array this splits the array repeatedly into the biggest value and all
other values.
The implementation in this commit uses the *median of three* as pivot.
`janet -e "(sort (range 10000))"` to reproduce quadratic behaviour.
2020-12-26 19:18:17 +00:00
Calvin Rose
25ded775ad
Add array/clear.
...
Also improve map, find-index, and find to work on data structures
which do not defined length.
2020-12-18 12:37:58 -06:00
Calvin Rose
a55354357c
Make dofile error if source file errors.
...
This should make dofile a bit easier to use.
It also means that import properly raises errors when
things go bad.
2020-12-14 08:23:06 -06:00
Calvin Rose
6020106000
Address #529
2020-12-11 19:21:54 -06:00
Calvin Rose
945cbcfad6
Tail recursive match implementation.
...
This implementation uses multiple passes on patterns
to remove the need for a sentinel value to check if there was a match.
This also re-uses extracted subpatterns for complicated patterns.
2020-12-10 08:35:34 -06:00
Calvin Rose
cd09b696b5
Add :preload loader.
2020-12-06 21:06:17 -06:00
Calvin Rose
0f16f21677
Make builds deterministic again.
...
Also prevent marshal from creating multiple copies of
a function - (marshal function pointer before function def pointer).
2020-12-06 16:32:23 -06:00
Calvin Rose
7e1d095996
Merge pull request #522 from pyrmont/docs.keep-docstring
...
Clarify description of keep
2020-12-05 14:31:58 -06:00
Calvin Rose
9d23192614
Add ev/deadline and ev/with-deadline.
...
This should be more useful than timeouts in real-world
use cases. The deadline system is based on fibers and is target
to much more coarse-grained (and therfor reliable) timeouts than things
like ev/sleep and timeout arguments.
2020-12-05 10:32:34 -06:00
Michael Camilleri
7c1a52ae65
Use 'different from' in preference to 'different to'
2020-12-05 16:43:44 +09:00
Michael Camilleri
9aa1b9c740
Clarify description of keep
2020-12-05 16:02:36 +09:00
Calvin Rose
b402e0671a
Merge pull request #514 from uvtc/patch-2
...
boot.janet, fix possible typo
2020-12-04 17:40:46 -06:00
Calvin Rose
8144f83b66
Merge pull request #516 from uvtc/patch-4
...
doc for identity
2020-12-04 17:40:31 -06:00
Calvin Rose
cd2a55e268
Merge pull request #513 from uvtc/patch-1
...
boot.janet, cond doc
2020-12-04 17:38:02 -06:00
Calvin Rose
f92b5d69c8
Merge pull request #515 from uvtc/patch-3
...
C-style (hyphenate)
2020-12-04 17:37:24 -06:00
John Gabriele
51d6a13510
Update src/boot/boot.janet
...
Co-authored-by: Michael Camilleri <mike@inqk.net>
2020-11-29 14:31:01 -05:00
John Gabriele
7b4eeecd9f
Update src/boot/boot.janet
...
Co-authored-by: Michael Camilleri <mike@inqk.net>
2020-11-29 14:30:48 -05:00
John Gabriele
82eff7e082
Update src/boot/boot.janet
...
Agreed. That's more clear.
Co-authored-by: Michael Camilleri <mike@inqk.net>
2020-11-29 14:30:26 -05:00
John Gabriele
b922e36071
Update src/boot/boot.janet
...
Co-authored-by: Michael Camilleri <mike@inqk.net>
2020-11-29 14:18:19 -05:00