Calvin Rose
0b14e913da
Merge branch 'master' of github.com:janet-lang/janet
2021-01-23 13:54:36 -06:00
Calvin Rose
85155bb2b4
Reference #478 Update peg/compile to use dyn for default grammar.
2021-01-23 13:54:02 -06:00
Calvin Rose
dd8de1e9ac
Merge pull request #609 from yumaikas/master
...
Change tracev to upscope instead of using let
2021-01-22 19:02:27 -06:00
Calvin Rose
317ab6df6b
Add ev/thread and ev/do-thread.
...
- Also fix setting supervisor with net/accept-loop.
2021-01-22 12:52:45 -06:00
Andrew Owen
1fcaffe6b0
Change tracev to upscope, add test
2021-01-21 23:40:28 -07:00
Calvin Rose
0acf167e84
Merge pull request #602 from pyrmont/feature.module-docstrings
...
Display module-level docstrings with (doc)
2021-01-20 22:11:38 -06:00
Josef Pospíšil
251486e4aa
Fix ev/call doc
2021-01-20 20:31:41 +01:00
Michael Camilleri
c6467be60d
Conform display of path with existing display of source map info
2021-01-20 10:47:55 +09:00
Michael Camilleri
4dd512ad28
Use print-module-entry function to display docstring
2021-01-20 10:16:59 +09:00
Michael Camilleri
28076b9385
Display module-level docstrings with (doc)
2021-01-20 10:01:31 +09:00
Calvin Rose
49dcc816ae
Update os/shell to be non-blocking as well.
2021-01-18 16:44:22 -06:00
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