Nguyễn Gia Phong
1c372fbf32
Keep dobytes' error string
...
The reason for failure would be more useful
than the most recently evaluated value.
2025-11-05 17:00:04 +09:00
Ian Henry
f1ec0cc48b
fix try macro hygiene
...
Allow re-using the same symbol for the fiber and error. This allows you to
write code like (try (print "hi") ([_ _] (print "oh no"))), fixing a regression
introduced in #1605 .
2025-10-24 21:33:15 -07:00
sogaiu
1018cb9cca
Support :has-exe as well
...
This is a companion change to spork's issue
As implemented, :has-been-script didn't quite
mean what was intended. :has-exe should
be an improvement.
To prevent breakage, both :has-bin-script and
:has-exe should be supported for a while in
both spork and janet. Eventually
:has-bin-script can be retired.
2025-10-17 22:36:45 +09:00
jpaquim
511c1f4b0a
Refactor with image-only variable
2025-10-11 16:32:24 +01:00
jpaquim
c29195596e
Adapt generated file comments to build type
2025-10-11 16:29:14 +01:00
Calvin Rose
db7f741dad
Extend environment variable behavior to NO_COLOR and JANET_PROFILE
...
Env vars set to empty strings should behave the same as unset variables.
2025-10-04 13:12:29 -05:00
Calvin Rose
c901edbfb9
Interpret an empty JANET_PATH as unset
...
This is a common idiom with environment variables, where
a variable set to the empty string should behave the same as
an unset variable.
2025-10-04 10:43:55 -05:00
sogaiu
9b99fc44b9
Revert some bundle/install changes
2025-09-29 23:45:53 +09:00
Michael Camilleri
f393531335
Add bundle/add-manpage
2025-09-28 19:27:53 -05:00
Michael Camilleri
6b8e5249ca
Change :dependencies hook to :postdeps
2025-09-28 19:27:53 -05:00
Michael Camilleri
6a96b615f0
Tidy up bundle/ docstrings
2025-09-28 19:27:53 -05:00
J. Neuschäfer
07bfd34c2f
Recognise aarch64_be as big-endian
2025-09-26 02:07:09 +00:00
Joshua Krusell
aaf8ac2217
Tweak kvs docstring
2025-09-23 11:28:06 +02:00
sogaiu
dd59d84b51
Tweak some flycheck-related docstrings
2025-09-21 14:09:35 +09:00
Calvin Rose
06873fbf0b
Update CHANGELOG.md
2025-09-20 14:30:10 -05:00
Calvin Rose
1ff26d702a
Refactor flycheck to allow customization. Address #1638
...
Bindings can define their own flycheckers in a simple fashion.
2025-09-20 10:32:16 -05:00
Calvin Rose
4da568254a
Manually declare chroot on macos.
2025-09-19 21:17:02 -05:00
Calvin Rose
357f1f94ca
Add os/posix-chroot
...
Gated in a similar manner to os/posix-fork.
2025-09-19 16:32:45 -05:00
Calvin Rose
015e49c806
Merge pull request #1645 from pyrmont/bugfix.avoid-apc-use
...
Use `SetEvent` rather than `QueueUserAPC` on Windows
2025-09-19 16:31:13 -05:00
Michael Camilleri
6b06ab5f9c
Remove unused function on Windows
2025-09-17 15:51:53 +09:00
Michael Camilleri
fe6c6e15a6
Add workaround to timer resolution issue on Windows
2025-09-17 15:48:37 +09:00
Michael Camilleri
b4eb52ca45
Start worker thread in suspended state on Windows
2025-09-16 11:57:40 +09:00
Michael Camilleri
aca5428846
Use SetEvent rather than QueueUserAPC on Windows
2025-09-16 10:24:24 +09:00
Calvin Rose
3dab9737e2
Fix #1643 , but add features.h
2025-09-15 15:33:18 -05:00
Calvin Rose
8e7b1e9ce0
Don't try for backwards compat with compiled modules - Address #1639
...
This guarantee is difficult to maintain and shouldn't be needed.
2025-09-06 10:35:10 -05:00
Calvin Rose
355c514f0e
Minor version bump for linking.
2025-09-02 07:08:51 -05:00
Calvin Rose
148e108864
Remove strnlen and correctly address #1600
2025-09-01 14:04:30 -05:00
Calvin Rose
c90c737345
Revert reordering 2.
2025-09-01 13:46:09 -05:00
Calvin Rose
13b9976382
Revert reordering of janet_deinit
2025-09-01 13:44:55 -05:00
Calvin Rose
095a81286a
Add per-thread finalizer calls in missing places.
2025-09-01 12:38:11 -05:00
Calvin Rose
82416e4e4e
Address #1629 - janet_deinit called before threaded channel message sent
...
to thread.
If we take a reference to another thread inside channel code, make sure
that we increase the refcount to avoid a use after free.
2025-09-01 12:30:29 -05:00
Calvin Rose
ae51434a05
Fix #1604 - Add JANET_DO_ERROR_* defines for failure flags from janet_dobytes.
2025-09-01 09:43:27 -05:00
Joshua Krusell
c5ba3c0513
Small spelling fixes
2025-08-31 12:14:51 +02:00
Calvin Rose
e9c6678614
Update janet for 1.39.1
2025-08-30 08:11:18 -05:00
Calvin Rose
2a85781616
Merge pull request #1632 from jsks/jsks-channel
...
Export channel utilities
2025-08-30 08:08:55 -05:00
aeiouaeiouaeiouaeiouaeiouaeiou
896c28b0c8
os.c: use JANET_SPAWN_NO_CHDIR macros for macOS <10.15
...
Signed-off-by: aeiouaeiouaeiouaeiouaeiouaeiou <aeioudev@outlook.com >
2025-08-29 13:43:28 +03:00
Joshua Krusell
e7bb0dd58e
Export channel utilities
2025-08-29 12:19:53 +02:00
Calvin Rose
4e02f27eb9
Prepare for 1.39.0 release
2025-08-24 17:09:39 -05:00
Calvin Rose
fd234461d7
Merge pull request #1628 from snltd/illumos-support
...
illumos support
2025-08-24 16:18:09 -05:00
Calvin Rose
eabb215391
Use janet_gettime instead of clock_gettime in ev.c
...
We made the wrapper, let's use it. Also switch poll implementation to a
monotonic clock instead of realtime to be more inline with epoll and
kqueue.
2025-08-21 19:10:08 -05:00
snltd
deede6bae0
illumos support
2025-08-18 18:39:11 +00:00
Nicholas Rodrigues Lordello
ad8a5cb6c7
Read System Clock for Monotonic Time
...
This PR changes the `janet_gettime` implementation for OSX <10.12 to
read the system clock for `(os/clock :monotonic)`. As far as I was able
to find online this is _a_ monotonic clock, although it produces
different values from `clock_gettime(CLOCK_MONOTONIC, ...)` on the same
system. I can speculate that this is related to `SYSTEM_CLOCK` monotonic
time being implemented with `mach_absolute_time` which is documented to
_not advance during sleep_, and I suspect that
`clock_gettime(CLOCK_MONOTONIC, ...)` does.
**Resources**:
- `clock_get_time` implementation for the `SYSTEM_CLOCK`:
<https://github.com/apple-oss-distributions/xnu/blob/e3723e1f17661b24996789d8afc084c0c3303b26/osfmk/kern/clock_oldops.c#L284-L296 >
<https://github.com/apple/darwin-xnu/blob/2ff845c2e033bd0ff64b5b6aa6063a1f8f65aa32/osfmk/arm/rtclock.c#L248-L260 >
- `mach_absolute_time` and `mach_continuous_time` definitions:
<https://github.com/apple-oss-distributions/xnu/blob/e3723e1f17661b24996789d8afc084c0c3303b26/osfmk/mach/mach_time.h#L55-L68 >
- Stack overflow post for implementing `clock_gettime` on OS X before 10.12:
<https://stackoverflow.com/questions/11680461/monotonic-clock-on-osx >
2025-08-18 14:41:09 +02:00
Nicholas Rodrigues Lordello
0624936711
Use CLOCKS_PER_SEC
...
The POSIX standard defines that `clock(3)` returns a `clock_t` as a
number of clock ticks in `CLOCKS_PER_SEC` and not `CLOCKS_PER_SECOND`,
[source](https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_types.h.html ).
2025-08-18 09:15:30 +02:00
Calvin Rose
4701bc6543
Add test patch for #1625
2025-08-17 20:55:52 -05:00
Seungki Kim
20535e8626
Add net/socket for unbound socket creation #1622
2025-08-14 00:40:22 +09:00
Seungki Kim
3ad86108f2
Fix: Correctly flag UDP streams in net/connect #1620
2025-08-11 20:56:04 +09:00
Calvin Rose
0aee7765cf
Windows quirk fix
2025-08-02 20:04:55 -05:00
Calvin Rose
4894a4673a
Fix abstract unix sockets for issue #1618 - address #1618
2025-08-02 19:00:47 -05:00
Calvin Rose
f00d3199c3
Fix #1609 Remove sigaction if JANET_NO_EV defined.
2025-08-02 18:19:39 -05:00
Isaac Freund
f974c0667b
net/server: improve error for truthy handler and type :datagram
...
Since it is invalid to call accept on a datagram socket, net/server
always errors if handler is truthy and type is :datagram.
Add an assert to give a better error message in this case and clarify
the documentation.
References: https://github.com/janet-lang/janet/issues/1614
2025-07-18 09:57:17 +02:00