1
0
mirror of https://github.com/janet-lang/janet synced 2026-02-11 20:50:19 +00:00
Commit Graph

3236 Commits

Author SHA1 Message Date
Calvin Rose
e1897e1865 More documentation. 2026-01-29 07:50:23 -06:00
Calvin Rose
0c1585fdfe Preserve tuple type to fix #1709
Macro expansion as done by `macex1` was incorrectly losing the semantic
tuple information inside the `set` form. Since macro expansion is
usually done by the compiler, and `macex1` is mainly used for debugging
and deep transformations inside other macros, this only surfaced with
certain usage of short-fn macro.
2026-01-29 06:52:43 -06:00
Calvin Rose
a5c4e929e8 Merge pull request #1704 from amano-kenji/os/date
Document how to set local timezone for os/date and os/strftime.
2026-01-28 21:37:43 -06:00
sogaiu
d67b462023 Tweak some fiber-related docstrings 2026-01-29 11:39:05 +09:00
Calvin Rose
24ca108288 Add some extra checks for marshalling code. 2026-01-28 10:55:00 -06:00
Calvin Rose
7366fbed1f Disallow scheduling already modified fibers.
While not strictly needed for correctness, this discourages misuse of
fibers and mixing both coroutine, error handling, and scheduling
purposes.
2026-01-28 10:55:00 -06:00
Calvin Rose
797643716b Address #1707 - do not schedule non-task fibers. 2026-01-28 10:55:00 -06:00
Calvin Rose
eda2e11d31 MSVC and windows clib does not like fopen(NULL, ...)
We were exploiting this behavior on posix when adding shell history for
the built-in readline functionality.
2026-01-28 10:51:18 -06:00
Calvin Rose
ae0afe6198 Add janet_decref_abstract_maybe_free 2026-01-27 13:28:52 -06:00
Calvin Rose
3ecc9bc543 Small tweaks to boot.janet to improve stack traces. 2026-01-24 12:17:24 -06:00
Calvin Rose
339b0751c8 Address #1705 - ev/close affecting ev/select. 2026-01-24 12:17:02 -06:00
amano.kenji
87b1bf1a66 Document how to set local timezone for os/date and os/strftime 2026-01-24 14:21:33 +00:00
Calvin Rose
ee8d816738 Fix test case. 2026-01-23 08:30:15 -06:00
Calvin Rose
0f285855f0 Address #170 - strchr was not properly checking for 0 byte. 2026-01-23 08:13:15 -06:00
Calvin Rose
c43e06672c Address #1700 and move test cases to suite-compile.janet 2026-01-23 08:01:22 -06:00
Calvin Rose
2fabc80151 Address #1699 and improve test case for #1702 2026-01-23 07:46:31 -06:00
Calvin Rose
4dd08a4cde Address #1702 with extra bounds check.
The buffer overflow happened because we were creating many upvalue
slots in the compiler without using them, along with some faulty logic
that used the wrong length to check for the bitmap's bounds.
2026-01-23 07:33:05 -06:00
Calvin Rose
883dde4fa5 Remove xprintf reference. 2026-01-22 20:14:46 -06:00
Calvin Rose
6111291ede Revert a number of minor, unneeded changes for persistent REPL history. 2026-01-22 20:13:49 -06:00
Calvin Rose
53b8bf2684 Disable persistent REPL history without JANET_HISTFILE. 2026-01-22 19:17:16 -06:00
Calvin Rose
0c402cf3d6 Add persistent repl history. 2026-01-22 19:17:16 -06:00
Calvin Rose
606a1fc11a Merge pull request #1696 from amano-kenji/master
Document empty? more clearly.
2026-01-20 07:59:00 -06:00
amano.kenji
a2db57b9dc Document empty? more clearly. 2026-01-20 12:31:28 +00:00
Calvin Rose
f021bb2839 janet-format boot.janet 2026-01-18 13:05:55 -06:00
Calvin Rose
979233dee5 Update changelog and spelling 2026-01-18 11:09:01 -06:00
Calvin Rose
78a785175a Allow redirecting :err to :out with os/execute, no just os/spawn. 2026-01-17 22:37:35 -06:00
Calvin Rose
6549903c51 Add option to explicity inherit handles rather than implicitly. 2026-01-17 20:07:12 -06:00
Calvin Rose
c1dff351d9 Improve stacktraces for macros that use defer.
Previously, they would show up as `defer` in stack traces.
2026-01-17 19:59:28 -06:00
Calvin Rose
4aa5615a37 On windows, streams created with os/open improved.
We now set bInheritHandles to true when creating them, which makes it
possible to pass them to subprocesses. Before, it would fail silently
in strange ways often simply losing data. Also added flags to disable
OVERLAPPED_IO on windows and O_NONBLOCK on posix.
2026-01-17 18:19:17 -06:00
Calvin Rose
67932bbaed On windows, make sure to use FILE_ATTRIBUTE_NORMAL by default. 2026-01-17 17:04:56 -06:00
Calvin Rose
4575cefb7e Add shorthand for os test. 2026-01-17 10:11:56 -06:00
Calvin Rose
d5a014baff Fix reference. 2026-01-17 07:43:43 -06:00
Calvin Rose
eb825772bb Add more information to process creation failure on windows. 2026-01-17 07:29:45 -06:00
Nora Gruner
5819408715 Add omitted word "is" in docstrings. 2026-01-17 00:28:58 +01:00
Calvin Rose
8fe284b5eb Fix pathologically slow insertion pattern.
The correct resizing behavior for arrays and buffers was done for
`janet_putindex` but not for `janet_put`. This change copies the correct
behavior to `janet_put`.
2026-01-15 13:04:11 -06:00
Calvin Rose
19b5502f50 Simplify ev/gather and add ev/go-gather.
This allows using `ev/gather` semantics on a dynamic number of tasks and
not relying on the macro magic.
2026-01-14 17:33:10 -06:00
Calvin Rose
216c9799f5 Some more work on socket testing and allow setting ipv4 vs. ipv6 on raw
sockets.
2026-01-12 07:41:14 -06:00
Peter Rippe
5966017232 use u_char for IP_MULTICAST_TTL sockopt on BSD 2026-01-12 06:06:27 -06:00
Calvin Rose
f80690e4c9 Version bump for wip 1.41.x 2026-01-10 15:40:04 -06:00
Calvin Rose
9bc308532f Make varfn correctly handle verbose metadata.
The macro would previously choke on `(varfn abc {:abc 123} ...)` due
to mishandling of structs and tables as metadata. This caused issues
when running `janet -d` with spork.
2026-01-10 14:04:48 -06:00
Calvin Rose
7a8d8444fe Simplify dynamic binding setup in cli-main.
Instead of manually putting bindings into environment tables, just use
`setdyn` to set the bindings based on the command line flags. This
results in easier to understand behavior and prevents "swallowing" of
options. For example, linting and debug flags should be set in the
root-env by default so that they are used in all loaded modules.
2026-01-10 13:37:42 -06:00
Calvin Rose
15cea60589 Revert "Reworking coloring logic for repl and CLI interface."
This reverts commit 10954fe0d7.
2026-01-10 13:20:02 -06:00
Calvin Rose
10954fe0d7 Reworking coloring logic for repl and CLI interface. 2026-01-10 13:15:46 -06:00
Calvin Rose
70fb13eb48 Fix -w flag with repl. 2026-01-10 12:35:41 -06:00
Calvin Rose
cb355815ee Turn on strict linting in test suite. 2026-01-10 08:37:09 -06:00
Calvin Rose
ddc7cc5ae4 Warn on unused bindings (strict lint).
This does create a lot of warnings, especially in the test suite, but
should improve code and point out real issues.

To disable individual messages, either disable linting, add the metadata :unused to a
binding, or add the prefix "_" to a symbol.
2026-01-10 07:59:11 -06:00
Calvin Rose
7b0b9f57e8 Make os/realpath error on windows if path does not exist. 2026-01-09 08:04:07 -06:00
Calvin Rose
80da028aeb Add linting to address #1688
Warn when defining macros on inner scopes, and also point out unused
metadata as well.
2026-01-04 08:19:18 -06:00
Michael Camilleri
6e4b0b9259 Update year in copyright disclaimer to 2026 2026-01-02 14:14:53 +09:00
Calvin Rose
d5a56caa33 Add fix for issue #1687 - destrucutre + splice
An optimization to ellude creation of intermediate tuples was
erroneously flagging a splice as invalid, even though it was valid.
Instead, if we see splice on the rhs, bail out of the optimization.
2025-12-22 07:40:29 -06:00