Commit Graph
3203 Commits
Author SHA1 Message Date
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
Michael Camilleri 9b1194b08a Use double-NULL byte for empty process environments on Windows 2025-12-15 10:00:03 +09:00
Calvin Rose d3f5b541ee Merge pull request #1683 from llmII/fix-unix-sockets
Fix unix sockets issue on FreeBSD
2025-12-14 13:23:33 -06:00
Calvin Rose 3a3c0dec7a Merge pull request #1685 from sogaiu/tweak-int-max-min-docstrings
Fix math/int-{max,min} docstrings
2025-12-14 13:21:39 -06:00
Calvin Rose bb3cf7d83b Add missing uinteger janet_opt* funcitons. 2025-12-14 11:46:57 -06:00
sogaiu 9bc47e766e Fix math/int-{max,min} docstrings 2025-12-14 13:41:00 +09:00
llmII 978c4e8b69 Fix unix sockets issue on FreeBSD
Sometimes a unix socket has a 0 status return which indicates the connection
immediately succeeded, at which point entering the event loop waiting on the
connection to complete actually breaks things.

It seems on FreeBSD with events being edge triggered, we're awaiting a
connection to signal it's writeable (to complete the connection) but that
never occurs (the event already took place before we registered for the
event). Going by status alone to determine if we should enter into the event
loop to await the complete connection seems sensible here.
2025-12-13 16:56:56 -06:00
Calvin Rose 2544c4ae1a Add os/cpu-count get defaults. 2025-12-13 06:20:50 -06:00
Calvin Rose 7f9d92a73b Formatting 2025-12-13 06:00:16 -06:00
Calvin Rose 898e93bc4a Merge pull request #1679 from pixelherodev/master
Take 2: 9front port, using 9front's Native Porting/Posix Environment
2025-12-13 05:57:17 -06:00
Noam Preil 715dd413cc plan9: support %r format to read errstr 2025-12-12 10:32:43 +00:00
Noam Preil 1971d7df0a plan9: use _Exit 2025-12-12 09:52:30 +00:00
Noam Preil 0d7afc9419 clean up headers 2025-12-12 09:45:39 +00:00
Noam Preil 7e2a57687a clean test 2025-12-12 09:42:55 +00:00
Noam Preil 2de6d26a46 plan9: restore CLOCK_PROCESS_CPUTIME_ID support 2025-12-12 09:35:37 +00:00
Noam Preil 4a9c9ebefc plan9: restore sys/wait usage (patched in NPE) 2025-12-12 09:29:23 +00:00
Noam Preil 8887075a8c plan9: working process support 2025-12-12 09:21:19 +00:00
Noam Preil 7d06faca66 9front: expanded OS support 2025-12-11 21:36:29 -06:00
Noam Preil 352935596a 9front: support (os/cpu-count) 2025-12-11 21:36:13 -06:00
Noam Preil dde1a67b77 plan9: 32-bit support 2025-12-12 07:41:05 +00:00
Noam Preil 7c31110195 9front: allow file/open of directories 2025-12-12 04:32:19 +00:00
Noam Preil d41eeaf7fa 9front: detect compiler as kencc 2025-12-12 04:14:46 +00:00
Noam Preil 04c96296b5 drop fixme, can worry about it later 2025-12-12 02:54:07 +00:00
Tw d8a074731e Apply :flycheck on def as well
Signed-off-by: Tw <tw19881113@gmail.com>
Change-Id: I7bd10cbaa838b44794f8a881b0deedd06a6a6964
2025-12-12 08:40:18 +08:00
Noam Preil 98bbe9f474 expose os/isatty, fix floating point math 2025-12-10 23:35:24 +00:00
Noam Preil 2f69678f2f 9front port 2025-12-10 12:18:17 +00:00
Calvin Rose efe66f207f Merge pull request #1678 from tw4452852/push-swmvxuxkrvsx
shell: Prevent buggy moving zero column behavior
2025-12-07 08:02:32 -06:00
Calvin Rose d6803f7a17 Formatting. 2025-12-04 08:48:12 -06:00
Tw 6e883b8972 shell: Prevent buggy moving zero column behavior
According to https://unix.stackexchange.com/a/559331,
moving zero column is implemented inconsistently between
different terminal emulators.

In order to fix this inconsistency,
we avoid using this escape sequence entirely.

Signed-off-by: Tw <tw19881113@gmail.com>
Change-Id: I73d4252f8472c769f0cf98b6bbdf2b3d6a6a6964
2025-12-04 08:51:15 +08:00
Calvin Rose c2cbfa4d5d Merge pull request #1676 from tsujamin/msvc-runtime-stack-check-ffi-crash
Disable MSVC runtime stack checks in janet_ffi_win64
2025-12-02 09:10:50 -06:00
Benjamin Roberts a85689312a Disable MSVC runtime stack checks in janet_ffi_win64
The MSVC /RTCs argument instrument alloca() to prepend stack allocations
with metadata used to check for memory corruption during the function
prologue. This causes stack-based FFI arguments in janet_ffi_win64 to
become mis-aligned, and also for the alloca()-prepended header to be
corrupted leading to a fatal exception.
2025-12-01 15:37:09 -05:00
Calvin Rose b9bc89a38c Fix very old typo in janet.h 2025-11-30 14:22:17 -06:00
Calvin Rose f79e4d6249 Address #1674 - Add cms combinator to peg.
It behaves like `cmt`, but flattens the result and can collect
multiple captures if an indexed data structure is returned.
2025-11-30 14:19:51 -06:00
Calvin Rose 238d6c2e13 Remove type constraint on doc for +.
This constraint is no longer true in all cases.
2025-11-30 14:19:51 -06:00