Commit graph

1253 commits

Author SHA1 Message Date
Travis Staloch
c2dbed2ff5
str-graphemes: rework and add some zig tests
- rework strGraphemes() to use a mutable slice and keep track of just
`last_codepoint_len`.
- add zig tests for empty string, ascii, utf8, ascii+utf8+emoji
2022-10-22 19:29:49 -07:00
Prajwal S N
df7e4eea7e
builtin(str): implement Str.graphemes
Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2022-10-22 19:29:49 -07:00
Folkert
ebac056814
Merge remote-tracking branch 'origin/main' into roc-dev-inline-expects 2022-10-21 23:05:34 +02:00
Ayaz Hafiz
f826ff1a71
Remove addI* variants from Hash
These are trivially fulfilled by converting a signed int to its unsigned
repr and hashing that.
2022-10-19 14:24:21 -05:00
Brendan Hansknecht
62c9a2a8b6
Merge pull request #4355 from roc-lang/concat-memleak
Fix memory leak in List.concat
2022-10-18 19:07:52 +00:00
Anton-4
6b294bed81
Merge branch 'main' into benchmarks-to-nix
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2022-10-18 13:43:09 +02:00
Brendan Hansknecht
9f09bebdca
run 2022-10-17 21:50:25 -07:00
Brendan Hansknecht
1225cb54fc
Fix memory leak in List.concat 2022-10-17 21:45:46 -07:00
Anton-4
54ad5d3416
moved benchmarks to nix 2022-10-17 17:40:35 +02:00
Prajwal S N
07224e9086
builtin(list): add List.walkFrom, List.walkFromUntil
Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2022-10-17 20:51:03 +05:30
Folkert
323210c547
Merge remote-tracking branch 'origin/main' into roc-dev-inline-expects 2022-10-16 13:56:30 +02:00
Anton-4
78e66c6c26
format Str.roc 2022-10-15 11:19:54 +02:00
Anton-4
762bd43e5f
minor improvements
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2022-10-15 09:46:41 +02:00
Luke Boswell
a99fe32bff
Merge branch 'roc-lang:main' into updating-docs 2022-10-15 18:32:37 +11:00
Anton-4
789586f545
add link with explanation of grapheme
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2022-10-15 09:17:08 +02:00
Luke Boswell
e1e084a68d
remove >>> from comments 2022-10-15 16:29:42 +11:00
Luke Boswell
1b4e89203d
updated Str builtin documentation 2022-10-15 16:15:43 +11:00
Ayaz Hafiz
12ecdab4c5
Add listGetUnsafe to Dict.roc rather than exposing from list 2022-10-14 13:43:31 -05:00
Brendan Hansknecht
5a86f611fa
add some TODOs 2022-10-14 07:55:07 -07:00
Brendan Hansknecht
d87a750f7c
misc cleanup 2022-10-14 07:45:50 -07:00
Brendan Hansknecht
bb26844cf1
add tests for Hash.hashStrBytes and Hash.hashUnordered 2022-10-14 07:45:50 -07:00
Brendan Hansknecht
382eaf88c2
add a bunch of tests 2022-10-14 07:45:50 -07:00
Brendan Hansknecht
e937a9078c
add Hasher.reset and Hash.hashUnordered 2022-10-14 07:45:50 -07:00
Brendan Hansknecht
ab16effa00
correct lengths 2022-10-14 07:45:50 -07:00
Brendan Hansknecht
0a31173029
expose List.getUnsafe for use in Dict 2022-10-14 07:45:50 -07:00
Brendan Hansknecht
6445f26529
remove hashUnordered for now, needs more methods 2022-10-14 07:45:50 -07:00
Brendan Hansknecht
7a8dee888d
add hashUnordered that uses a walk method and hashes all elements 2022-10-14 07:45:50 -07:00
Brendan Hansknecht
f398bb1eff
switch hashStr to use addBytes 2022-10-14 07:45:49 -07:00
Brendan Hansknecht
49c3fe1643
add version of wyhash to roc lib 2022-10-14 07:45:49 -07:00
Luke Boswell
0b1365e0a3
adding expect and documentation for Str builtin 2022-10-14 19:58:07 +11:00
Ayaz Hafiz
c5a025f853
s/Eq/Bool 2022-10-12 16:38:37 -05:00
Ayaz Hafiz
fe9b848686
Mark structuralEq as not exposed on the surface 2022-10-12 16:38:36 -05:00
Ayaz Hafiz
b04d7a9471
Bind types passed to isNotEq to Eq 2022-10-12 16:38:36 -05:00
Ayaz Hafiz
0f96a1231e
Fromat Bool.roc 2022-10-12 16:38:36 -05:00
Ayaz Hafiz
a256947a9f
Move Eq to Bool 2022-10-12 16:37:51 -05:00
Ayaz Hafiz
7298705db7
Fix parse error 2022-10-12 16:37:50 -05:00
Ayaz Hafiz
c618ced743
Replace Bool.isEq with Eq.isEq 2022-10-12 16:37:49 -05:00
Ayaz Hafiz
3674f6861e
Compile derived structural equality 2022-10-12 16:37:49 -05:00
Ayaz Hafiz
16d12a51c2
Add Eq to the standard library 2022-10-12 16:37:48 -05:00
Folkert
d9f9183009
fix zig tests by providing new libc functions 2022-10-12 21:15:48 +02:00
Prajwal S N
a3e6345257
builtin(list): add List.countIf
Closes #4174

Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2022-10-13 00:45:13 +05:30
Folkert
2b60cb1dcd
include process id in expect buffer name 2022-10-12 21:06:44 +02:00
Folkert
19ea3489cb
provide more libc functions for the expect implementation 2022-10-12 20:59:18 +02:00
Brendan Hansknecht
e551e59c1c
refactor string reallocation 2022-10-11 07:56:34 -07:00
Brendan Hansknecht
96b5d365b2
Add capacity growth to RocStr
Also, cleans up the alloc and realloc api for both list and str.
Updates Str.reserve to match List.reserve
2022-10-10 22:24:55 -07:00
Brendan Hansknecht
fdafac4323
Remove RocResult from utils.zig
It is implemented wrong and not used anywhere
2022-10-10 08:25:59 -07:00
Richard Feldman
860d8b41f1
Merge pull request #4273 from cjduncana/dict-update
Add the `update` function to the `Dict` module
2022-10-10 02:37:42 -07:00
Christopher Duncan
96e12aa790
Add the update function to the Dict module
This resolves #4239
2022-10-09 20:21:21 -04:00
Folkert
e62ab00c65
Merge remote-tracking branch 'origin/main' into roc-dev-inline-expects 2022-10-09 18:46:57 +02:00
Prajwal S N
aef15ac1e8
Merge branch 'main' into str-withprefix 2022-10-09 15:53:16 +05:30