Commit Graph

105 Commits

Author SHA1 Message Date
b0faa5adc2 Add Text:from()/to() and Array:slice() for symmetry 2024-12-19 13:50:35 -05:00
aa26234471 Minor cleanups and fixes to RNG, chacha, and text 2024-12-17 14:24:37 -05:00
d3eb8b8339 Have ask() return an optional text 2024-12-15 16:53:18 -05:00
0caf96cfe7 Parse negative integers 2024-12-15 16:53:07 -05:00
10a0a16686 Tweaks to RNG code 2024-12-12 14:01:58 -05:00
cac894d39f Fixes for integer logic around big/small ints 2024-12-11 13:36:52 -05:00
1c261c33bd Respect $NO_COLOR for running programs 2024-12-08 15:18:26 -05:00
d65a0abba1 Add GCD function for integers (of all flavors) 2024-12-08 14:28:26 -05:00
37f3e91f6c Rename "NONE" to "none" 2024-12-07 16:04:25 -05:00
a201939a81 Use likely()/unlikely() macros and a few bugfixes for integers 2024-12-07 15:59:37 -05:00
3a5815d4bd Improvements and fixes for assigning to table keys 2024-12-06 15:18:25 -05:00
17e473a98a Bugfix for text memory allocations 2024-12-04 14:18:19 -05:00
c6bcb05a4e Further bugfix for array concatenation 2024-12-02 15:21:29 -05:00
44d8d553df Bugfix for array concatenation 2024-12-02 14:49:51 -05:00
5b661403e1 Support single-argument enums 2024-11-30 17:43:02 -05:00
eedfe7ca95 Support parsing enums as arguments as long as they have no members 2024-11-30 17:32:07 -05:00
07dd1894b7 Bugfixes for moments mixing up microseconds/nanoseconds, plus adding
accessor fields for them
2024-11-30 17:25:36 -05:00
fed63d8ea1 Tweak to how 'Type' appears as a type 2024-11-29 20:04:44 -05:00
bb57aeb744 Fix Type:as_text() 2024-11-29 20:03:20 -05:00
e5e9c8b46c Make Int serialization more compact 2024-11-29 19:32:47 -05:00
725bc9809f Bugfix for enum tags 2024-11-29 18:45:44 -05:00
f66f8ad711 Add serialization and deserialization 2024-11-29 18:09:12 -05:00
4b5e4cd1f2 Change how types handle metamethods 2024-11-29 12:55:14 -05:00
27da373754 Micro-optimizations for division and modulus 2024-11-25 14:11:06 -05:00
1e3fb8a2c0 Rename "NULL" to "NONE" 2024-11-24 16:18:21 -05:00
0e10313d64 Switch NaN to be identical to the null value 2024-11-24 16:13:23 -05:00
295487b627 Fix ordering of Nums that have NaNs 2024-11-23 13:25:16 -05:00
f868d02b08 Add NULL as a syntax for null values. 2024-11-21 13:00:53 -05:00
90573ba7a1 Tweak behavior for printing recursive structures 2024-11-19 15:45:33 -05:00
2c904ff173 Go back to stringifying integers/num32s/bytes without the type
constructor.
2024-11-19 13:41:52 -05:00
ccada385c4 Add Text.at(i) for getting a single cluster 2024-11-19 13:27:27 -05:00
4231789b71 Rename datetime -> moment 2024-11-17 14:49:03 -05:00
c1ae79ac3c Tweak hash function 2024-11-17 14:33:17 -05:00
3edbba7032 Fix up recursive pointer text representation 2024-11-12 00:09:47 -05:00
a4d11f51ff Fixes for 'if' blocks with nested 'else if' that declare variables 2024-11-12 00:04:56 -05:00
06d3ec1380 Bugfix for fixed-size integer ranges 2024-11-09 16:55:44 -05:00
898bee1581 Introduce a Match struct to represent pattern matching results, which
improves the usability of a lot of the APIs. Also bugfix some issues
with ranges.
2024-11-09 16:27:54 -05:00
7a4f2e73ad Rename from_text() to parse() 2024-11-09 15:11:11 -05:00
a8a35ea688 Add Byte.hex() 2024-11-05 15:33:08 -05:00
b8d7eabc02 Deprecate bit-width integer/num literals in favor of using type
constructors
2024-11-05 15:18:32 -05:00
da5bd87c13 Minor code cleanup 2024-11-04 13:06:11 -05:00
20096c8e81 Fix for blocking reads 2024-11-04 01:37:51 -05:00
aabc0a3cff Update text API to use optional returns when applicable 2024-11-04 01:17:47 -05:00
b69d14b894 Add some missing functionality for Bytes 2024-11-04 01:12:37 -05:00
fc9a6f1416 Add RNGs to the language 2024-11-03 22:37:48 -05:00
52e3d3fe6f Update Path:read_bytes() API to take a byte count 2024-11-03 16:58:12 -05:00
7ddb2ffb02 Fix per-thread RNG 2024-11-03 16:21:40 -05:00
5e767e1c38 Make Int.random() use thread-local state 2024-11-03 16:11:05 -05:00
7ccb7a8a9b Use an RNG parameter for array:random(), array:shuffle(),
array:shuffled()
2024-11-03 16:10:03 -05:00
39a58bc129 Clean up behavior and syntax for unsigned bit shifts (<<<, >>>) 2024-11-03 16:06:26 -05:00