Luke Boswell
a983ab8341
use CalledVia::BangSuffix
2024-03-21 15:51:21 +11:00
Luke Boswell
406ffdffab
WIP partial implementation for desugar_defs_node_suffixed
2024-03-19 12:57:30 +11:00
Richard Feldman
739565e836
Revert "Remove obsolete ListLenUsize"
...
This reverts commit ad1bca4ac9c40d336522f944df60d61a814435dd.
2024-02-17 13:20:34 -05:00
Richard Feldman
87d4760356
Remove obsolete ListLenUsize
2024-02-17 13:20:34 -05:00
Richard Feldman
37b154df4f
Remove Str.fromUtf8Range
...
Seamless slices make this obsolete!
2024-02-17 13:20:33 -05:00
Richard Feldman
ada83561e5
Split ListLen into ListLenU64 and ListLenUsize
...
The usize one gets used internally for things like
pattern matches. This is both more efficient (means
they don't have to do unnecessary casts) and also
less error-prone due to e.g. comparing length to
capacity, which is usize.
2024-02-14 21:00:49 -05:00
Richard Feldman
24a38c4a26
Merge remote-tracking branch 'origin/main' into remove-nat
2024-02-11 12:26:36 -05:00
Folkert de Vries
0e7fee4e7f
Merge pull request #6486 from roc-lang/remove-unused-lowlevel
...
Remove unused lowlevel StrGetCapacity
2024-02-04 13:57:46 +01:00
Anton-4
3c7a834da1
update to new interpolation syntax
2024-02-02 13:39:10 +01:00
Richard Feldman
f79ff6d496
Remove unused lowlevel StrGetCapacity
2024-02-01 21:37:16 -05:00
Richard Feldman
aabd95404f
Merge remote-tracking branch 'origin/main' into remove-nat
2024-01-30 21:42:45 -05:00
Kiryl Dziamura
b3dfdb562b
crash on rem div by zero
2024-01-30 11:12:02 +01:00
Folkert
979128cf32
make division by zero (integer) not trap
2024-01-29 01:38:32 +01:00
Richard Feldman
87ec602b1e
Fix gap in symbols
2024-01-26 16:23:21 -05:00
Richard Feldman
9518d76cd8
Remove Num.bytesTo___ functions
...
These may be reintroduced in some form later,
but they don't handle endianness and it's not
clear builtins are the right place for them.
2024-01-26 16:23:19 -05:00
Richard Feldman
c4497f2c1c
Remove Nat from Num
2024-01-26 16:19:51 -05:00
Richard Feldman
502b0fddf2
Remove Nat from Hash, Inspect, Encode, Decode
2024-01-26 16:17:05 -05:00
Brian Teague
4499f8c6f4
isApproxEq function
2024-01-23 21:06:35 -05:00
Richard Feldman
2970fc4384
Merge remote-tracking branch 'origin/main' into str-unicode
2024-01-21 12:30:16 -05:00
Folkert
f1ffc36efe
add List.clone
2024-01-20 20:29:07 +01:00
Richard Feldman
b48fa0698a
Remove scalars and graphemes from Str
2024-01-17 21:30:34 -05:00
Bryce Miller
89febf52bc
Merge branch 'main' into list-walk-with-index-until
2023-12-11 23:13:21 -05:00
Bryce Miller
59eb28ef58
Add builtin List.walkWithIndexUntil
2023-12-11 23:04:40 -05:00
Brendan Hansknecht
b39d604745
Dict follow up and addition of releaseExcessCapacity
2023-12-10 00:06:58 -08:00
Brendan Hansknecht
65c5a490b8
fix Dict.listGetUnsafe to map to low level without wrapping
2023-12-09 18:11:22 -08:00
Brendan Hansknecht
51ec4311b5
Swap Dict implementation to ankerl dense unordered
...
ankerl::dense_unordered is a very fast hash map that is built to be an index map.
This enables extra optimizations compared to just wrapping a regular hash map.
As such, I think this map is very well suited for our index map impl in Roc.
I also think this dictionary implementation is simpler overall.
On top of that, this removes the need for SIMD instructions for peak performance.
Benchmarks of the C++ version and other C++ hash maps are here: https://martin.ankerl.com/2022/08/27/hashmap-bench-01/
Though this has clear bias of being written by the author of ankerl::dense_unordered,
the results all look correct and the benchmarks thorough.
2023-12-09 18:11:22 -08:00
LoipesMas
83ac8209ae
Add Dict.keepIf, Dict.dropIf, Set.keepIf, Set.dropIf
2023-12-04 23:38:51 +01:00
Brendan Hansknecht
e5a0af5699
make DbgFormatter an unexposed implementation detail
2023-12-03 12:41:04 -08:00
Brendan Hansknecht
82cda1965c
use INSPECT_INSPECT_ABILITY instead of INSPECT_INSPECT
2023-11-28 16:40:41 -08:00
Brendan Hansknecht
b8e644a1e3
add DbgFormatter to inspect
2023-11-28 16:40:40 -08:00
Ayaz Hafiz
5c805ce80f
Get first inspect for non-Inspect-implementing opaques specialized
2023-11-28 16:40:39 -08:00
Richard Feldman
34148645ae
wip
2023-11-28 16:40:39 -08:00
Richard Feldman
d0841fb018
Add derive key for Inspect
2023-11-28 16:40:39 -08:00
Richard Feldman
5a872a1bdd
Add Nat to Inspect ability
2023-11-28 16:40:39 -08:00
jecaro
c858031f74
Show the right fct name in type error messages
2023-11-16 16:44:55 +01:00
Richard Feldman
e59d4e57c5
Add List.appendIfOk and List.prependIfOk
2023-11-06 18:13:15 +01:00
Isaac Van Doren
139d3c6f89
make dropFirst and dropLast drop n elements
2023-10-29 13:23:33 -05:00
Isaac Van Doren
886b855594
add Str.contains to builtins
2023-10-14 14:56:51 -05:00
Elias Mulhall
b7923ac542
builtin(list): add List.chunksOf
2023-10-07 11:54:34 -04:00
Brendan Hansknecht
108d9a54e3
Switch Num.tan to a zig builtin
...
It should be able to share some work between sine and cosine to run faster.
2023-09-16 21:27:51 -07:00
Richard Feldman
b54a37e4b0
Merge remote-tracking branch 'origin/main' into walk-with-index
2023-08-17 11:54:34 -04:00
Richard Feldman
c3b556ffbc
Add List.walkWithIndex
2023-08-15 02:29:25 -04:00
Richard Feldman
83ead6b2b2
Special-case TotallyNotJson types for now
2023-08-14 18:58:50 -04:00
Richard Feldman
700776fad7
Make Inspect a builtin
2023-08-10 21:47:42 -04:00
Folkert
44d03eebfa
switch over to alloca expr
2023-07-30 18:48:35 +02:00
Folkert
cdd2aab217
add alloca as an expression
2023-07-30 18:46:00 +02:00
Ayaz Hafiz
6e5a308557
Content variant ErasedLambda
2023-07-12 13:57:17 -05:00
Ayaz Hafiz
fb4c550a29
Erased symbol
2023-07-12 13:53:51 -05:00
Folkert
ef39bad7c6
auto clippy fixes
2023-07-10 18:27:08 +02:00
Anton-4
c4b0a2ec29
Merge pull request #5620 from roc-lang/dict-set
...
Add some missing Dict and Set functions
2023-06-29 12:06:49 +02:00