Commit Graph

220 Commits

Author SHA1 Message Date
94ed28b4d1 Add better typechecking for Abort (and add Abort as a user-reachable
type) and check for unreachable code
2025-03-09 17:52:48 -04:00
6abd4e8024 Add fail_text() so there isn't a hacky/broken fail() with promotion to
CString
2025-03-09 17:30:22 -04:00
29358b9cd0 Add some missing modulus and conversion methods for floats/ints 2025-03-09 15:56:44 -04:00
2ebe7893fe Add text padding functions: :left_pad(), :right_pad(), :middle_pad() 2025-03-07 16:56:23 -05:00
7eb1fbf5d2 Add proper language support for case operations on text 2025-03-07 16:19:12 -05:00
d590b9d386 Fix number precision stuff 2025-03-07 15:30:26 -05:00
147e0f0269 Overhaul of constructors, making it more consistent and correct. Also
changed T(), T, T_t, T_s type names to T(), T$$info, T$$type, T$$struct
for unambiguity
2025-03-05 18:20:54 -05:00
2c4324670f Add print() as alias for say() 2025-03-05 11:35:53 -05:00
f330f06c21 Add recursive argument to text:each() and text:map(), plus update docs 2025-03-03 13:45:30 -05:00
b0483e8429 Check for null 2025-03-01 16:15:46 -05:00
fab0083129 Support post-hoc definitions of escaping rules for DSLs 2025-03-01 16:04:14 -05:00
9a62f8d6a6 Add $Shell.execute() 2025-02-25 00:59:31 -05:00
928f3250b3 Add $Shell:execute() 2025-02-24 18:23:18 -05:00
39295176a2 Automatic escaping for Path -> Shell 2025-02-24 17:08:03 -05:00
ee2b02d44d Integer range iteration over fixed width integers should iterate over
that type
2025-02-21 15:51:22 -05:00
91f66d80bb Support arbitrary argument constructors 2025-02-20 17:13:50 -05:00
43a2959be3 Add undef 2025-02-20 11:59:46 -05:00
058a028aef Switch to langs using constructors 2025-02-19 18:50:50 -05:00
c4479e4bd6 Add Int:onward() iterator 2025-02-13 15:21:00 -05:00
5be9559046 Deprecate Range datatype in favor of using iterator methods 2025-02-13 15:03:22 -05:00
66eca49d18 Tweak set_binding() API 2025-02-10 13:13:45 -05:00
be87d8169d Convert the logic for finding closed variables to a more pure functional
style with fewer side effects
2025-02-09 13:57:54 -05:00
32da3a3226 Add a _ prefix on variables so it's easier to debug in GDB 2025-02-04 14:16:06 -05:00
645d66e0de Change table syntax to {key=value} and {:K,V}/{K,V} 2025-01-12 16:49:58 -05:00
9e0017e86e Add Int:factorial() and n:choose(k) 2024-12-24 14:20:16 -05:00
46b61d3ed2 Add text:by_line()/:by_split()/:by_match() 2024-12-21 16:32:22 -05:00
478ddad9aa Add Text:reversed() 2024-12-19 15:32:19 -05:00
b0faa5adc2 Add Text:from()/to() and Array:slice() for symmetry 2024-12-19 13:50:35 -05:00
d3eb8b8339 Have ask() return an optional text 2024-12-15 16:53:18 -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
07dd1894b7 Bugfixes for moments mixing up microseconds/nanoseconds, plus adding
accessor fields for them
2024-11-30 17:25:36 -05:00
32532836b9 Add NaN documentation 2024-11-25 15:57:56 -05:00
d4b10514fb Clean up some more null->none renames and fix the documentation. Also
change the literal syntax to `NONE:T` instead of `!T`
2024-11-24 16:36:27 -05:00
0e10313d64 Switch NaN to be identical to the null value 2024-11-24 16:13:23 -05:00
4720ca7a5f Rename Text.utf8_bytes back to Text.bytes 2024-11-19 13:30:45 -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
0df908f55f Support iterating over pointers to collections again 2024-11-09 17:54:32 -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
aabc0a3cff Update text API to use optional returns when applicable 2024-11-04 01:17:47 -05:00
81a180eda0 RNG seed should be non-optional 2024-11-03 22:45:49 -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
39a58bc129 Clean up behavior and syntax for unsigned bit shifts (<<<, >>>) 2024-11-03 16:06:26 -05:00
792743dff3 Add Int64:unsigned_left_shift() and :unsigned_right_shift() 2024-11-03 15:27:44 -05:00