1
0
mirror of https://github.com/janet-lang/janet synced 2025-01-07 06:10:25 +00:00
Commit Graph

602 Commits

Author SHA1 Message Date
Calvin Rose
746ced5501 Revert behavior of deep= on mutable keys.
Mutable keys are a minefield for comparisons, as resolving
equality require re-implementing a lot of the internal structures, as
well as dealing with multiple mutable keys that are in the same
equivalency class by deep=.

Simplifying the implementation to not resole mutable keys is much
simpler, faster, and has the benefit that deep= and deep-not= do not
need to allocate.
2024-12-21 09:03:01 -06:00
Calvin Rose
682f0f584f freeze with mutable keys should be determinsic help address #1535 2024-12-19 19:31:01 -06:00
Calvin Rose
611b2a6c3a Add more test cases for #1535 2024-12-19 18:37:51 -06:00
Calvin Rose
b2d2690eb9
Merge pull request #1534 from pyrmont/bugfix.windows-longstrings
Support dedenting long-strings with Windows EOLs
2024-12-19 16:24:21 -08:00
Calvin Rose
7f745a34c3 Allow for mutable keys correctly in deep= 2024-12-19 18:20:05 -06:00
Michael Camilleri
67e8518ba6
Support dedenting longstrings with Windows EOLs 2024-12-17 05:14:59 +09:00
Michael Camilleri
1a24d4fc86
Raise error if using ev/to-file on MinGW 2024-12-15 21:00:52 +09:00
Michael Camilleri
6ee05785d1
Disable buffering for files created with ev/to-file 2024-12-15 20:37:58 +09:00
Michael Camilleri
687b987f7e
Add ev/to-file for synchronous resource operations 2024-12-15 17:38:01 +09:00
Calvin Rose
4daecc9a41 Prevent await inside janet_call - address #1531
This was partially implemented before, but not in the case where the
await or other signal itself was created by a C function. We have to
separate code paths for generating signals - one via normal returns in
janet_vm_continue, and the other via longjump. This adds handling for
the longjump case, as well as improved messaging.
2024-12-14 10:34:36 -06:00
Calvin Rose
2bceba4a7a Assertf with no arguments does not make sense. 2024-11-24 19:14:18 -06:00
sogaiu
10994cbc6a Add some tests for assertf 2024-10-30 23:41:31 +09:00
Calvin Rose
2b84fb14b4 Fix Issue #1512 2024-10-18 18:17:06 -05:00
Calvin Rose
07155ce657 Don't error on empty struct. 2024-10-18 17:53:21 -05:00
Calvin Rose
3d93028088 Test bundle 2024-10-05 12:37:23 -05:00
Calvin Rose
3894f4021a Update copyright date. 2024-09-29 16:07:24 -05:00
Calvin Rose
9694aee819 Add rules for nth and only-tags. Address #1503
These rules allow selecting from a number of sub-captures
while dropping the rest. `nth` is more succinct in many cases, but `only-tags` is
more general and corresponds to an internal mechanism already present.
2024-09-12 17:23:34 -05:00
Calvin Rose
e4f4a42751 Add regression test for chat server issues. Address #1496 2024-09-06 08:05:56 -05:00
Calvin Rose
90018b35c0 Begin standardizing of event properties for filewatch.
- `:file-name` for the name of the file that triggered the event.
- `:dir-name` for the containing directory of the file
- `:type` for the event type.
2024-08-31 14:26:08 -05:00
Calvin Rose
5a199716cb Save :source-form in environment when debugging is enabled. 2024-08-29 21:12:53 -05:00
Calvin Rose
43ecd4f2d8 Add fixes for marshalling weak containers - Fix #1488
Weak containers did not preserve their weakness when marshalled. This
fixes that for tables and arrays, as well as adds some tests for this.
Also exposes functions for creating weak tables in janet.h
2024-08-22 19:37:41 -05:00
Calvin Rose
c5a9602be9 Better handle extra filewatch events on wine. 2024-08-20 18:30:56 -05:00
Calvin Rose
e88aab6d68 Fix mingw build warnings. 2024-08-20 18:24:54 -05:00
Calvin Rose
9e334da2d6 Exit early when filewatch is not supported.
Currently we have no poll implementation.
2024-08-18 16:25:47 -05:00
Calvin Rose
c0e508e334 filewatch on mingw has same semantics as windows 2024-08-18 16:18:09 -05:00
Calvin Rose
b63b3bef74 Add testing for Linux. 2024-08-18 15:44:59 -05:00
Calvin Rose
05d0b5ac05 Add mostly stubbed filewatch test suite. 2024-08-18 14:42:44 -05:00
Calvin Rose
c56d6e8fc1 Add suite for testing filewatch.
Currently expects windows events.
2024-08-18 10:12:33 -07:00
Calvin Rose
85028967d8 Add aliases for bundle/module - issue #1486
info.jdn -> bundle/info.jdn
bundle.janet -> bundle/init.janet
2024-08-17 09:58:40 -05:00
Calvin Rose
ab70524d85 Add array/join and tuple/join
Utilities for combining indexed types more efficiently. `array/join`
also solves some interface issues with array/concat
2024-08-10 15:16:28 -05:00
Calvin Rose
ce36c4c0d6 Only raise IOCP error on readable, writable, or acceptable streams.
We may create streams whose sole purpose is to wrap a file descriptor
and therefor don't need to be IOCP enabled / nonblocking.
2024-08-06 07:08:16 -05:00
Calvin Rose
872b39cc32 Add syntax literals for signed and unsigned 64 bit integers.
Number literals can now take an optional "representation" suffix

- Use `:n` for normal numbers (IEEE-754 doubles)
- Use `:s` for signed 64 bit integers
- Use `:u` for unsigned 64 bit integers
- Other suffix will fallthrough the usual parseing logic. This means
  that they will only possibly resolve to symbols if they start with -,
  +, or .

The syntax does not collide with any existing valid Janet and is only
enabled with JANET_INTTYPES. This also leaves open a syntax for other
number types such as bignums, ratios, decimals, etc.
2024-07-21 09:45:44 -05:00
Calvin Rose
342a29c7be Fix formatting. 2024-07-12 15:22:46 -05:00
Valentin Anger
4af187d0ca Add support for the AAPCS64 calling convention 2024-06-23 18:22:25 +02:00
Philip Nelson
0b51ab157d Fix typos 2024-06-16 06:59:27 -07:00
Calvin Rose
75710ccabd Error on buffer/push-uint16 with non 16 bit unsigned integer. 2024-06-15 06:47:47 -05:00
Calvin Rose
0f60115f27
Merge pull request #1457 from pnelson/buffer-push-uint
Fix buffer push uint max
2024-06-15 06:31:46 -05:00
Philip Nelson
16a3c85baa Fix buffer push uint max 2024-06-14 18:15:31 -07:00
Calvin Rose
600e822933 Change interface for bundle/install
Name argument should be inferred in most cases. Also use :name
instead of :bundle-name in most places to be terser and simpler.
2024-05-26 16:26:08 -05:00
Calvin Rose
7bae7d9efd Merge changes from bundle-tools branch:
- Update file IO to explicitly use 64bit ftell/fseek
- Add env argument to eval
- Allow naming function literals with keywords.
2024-05-26 12:04:35 -05:00
Calvin Rose
cb54fb02c1 Whitespace. 2024-05-26 12:01:27 -05:00
Calvin Rose
fe348187cc Be explicit about 64 bit offset on windows. 2024-05-26 11:26:12 -05:00
Calvin Rose
fd5315793c Test feature flag 2024-05-26 11:16:31 -05:00
Calvin Rose
b8aec50763 Something is up with code. 2024-05-26 10:35:53 -05:00
Calvin Rose
7efb39d608 Check bundle listing before reinstall. 2024-05-26 10:28:19 -05:00
Calvin Rose
f7c90bc1ff Add testing for making and removing directory. 2024-05-26 10:21:52 -05:00
Calvin Rose
6cd35ed9c8 Try and be OS sensitive when using path separators. 2024-05-26 09:28:56 -05:00
Calvin Rose
de977819ce Add some tracing. 2024-05-26 09:03:01 -05:00
Calvin Rose
4fbc71c70d Just don't do backslashes. 2024-05-25 16:43:51 -05:00
Calvin Rose
6d5fc1d743 Even more verbose 2024-05-25 16:15:58 -05:00