Brendan Hansknecht
5d87ba3441
remove outdated performance comments
2023-03-13 14:08:24 -07:00
Brendan Hansknecht
dfb748fb03
misc cleanup + change refcount pointer to avoid branching
2023-03-13 14:08:24 -07:00
Brendan Hansknecht
216fd3f9f6
Update typo in comment
...
Co-authored-by: Richard Feldman <oss@rtfeldman.com>
Signed-off-by: Brendan Hansknecht <Brendan.Hansknecht@gmail.com>
2023-03-13 14:08:24 -07:00
Brendan Hansknecht
5f6910f747
add todo about upgrading to bit manipulation
2023-03-13 14:08:24 -07:00
Brendan Hansknecht
f96a63c1d4
correct case for zig naming
2023-03-13 14:08:23 -07:00
Brendan Hansknecht
146dff5446
add llvm refcounting and fix memory leak
2023-03-13 14:08:23 -07:00
Brendan Hansknecht
7a927b6192
Port fromUtf8 to fromUtf8Range
...
All roc file calls already use fromUtf8Range.
Removed the duplicate function for simplicity.
Inlining should lead to generating the same code.
2023-03-13 14:08:23 -07:00
Brendan Hansknecht
cda37a5d1b
use seamless slices for List.dropAt when possible
2023-03-13 14:08:23 -07:00
Brendan Hansknecht
4ced1bcfdd
add baseline of seamless slices
2023-03-13 14:08:23 -07:00
Brendan Hansknecht
e32c5f6514
standardize on decref instead of deinit for name
2023-03-13 14:08:23 -07:00
Brendan Hansknecht
440c0518f1
Change list.deinit to take alignment directly
...
In doing so remove the many class directly to utils.decref
2023-03-13 14:08:22 -07:00
Brendan Hansknecht
1c0b001897
run roc format
2023-03-12 08:53:11 -07:00
Brendan Hansknecht
e6964536b2
add more Num.bytesTo* functions
2023-03-12 08:41:05 -07:00
Brendan Hansknecht
785da377c8
add Num.count*Bits functions
2023-03-12 08:41:04 -07:00
Anton-4
fbaa257cef
Merge pull request #5118 from roc-lang/mess-with-build
...
Make building and CI faster
2023-03-12 14:35:34 +01:00
Richard Feldman
512b9361bf
Merge pull request #5077 from lukewilliamboswell/builtin-json
...
JSON decoder improvements
2023-03-11 15:28:07 -05:00
Brendan Hansknecht
df8cc231eb
rustfmt
2023-03-10 13:57:11 -08:00
Brendan Hansknecht
cb191d3788
Split utils into error and command utils
...
Error utils pulls in snafu which requires procedural macros.
This means it can't start compiling until syn and macro related crates are compiled.
This deals compiling all crates that depend on commands like running zig for the bitcode.
The split enables those crates to run sooner.
2023-03-10 09:39:43 -08:00
Brendan Hansknecht
d5e191d083
split up bitcode building to reduce dependency chains
2023-03-10 09:39:43 -08:00
Anton-4
e2bd3cfc8b
forgotten code fence
...
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2023-03-10 11:32:12 +01:00
Luke Boswell
14085c71a3
remove commented out builtin code
2023-03-10 10:15:05 +11:00
Anton-4
38ed9339b1
Merge branch 'main' into docs-highlight
...
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2023-03-08 15:51:03 +01:00
Anton-4
c1082686f8
Merge pull request #5108 from agu-z/fix-list-split-first-last-docs
...
Fix `List.splitFirst` and `List.splitLast` docs
2023-03-08 15:47:21 +01:00
Anton-4
3431d46573
adjust indent
...
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2023-03-08 14:50:10 +01:00
Anton-4
5bc4881c05
Merge remote-tracking branch 'upstream/main' into docs-highlight
2023-03-08 14:35:55 +01:00
Agus Zubiaga
7eedd62844
Fix List.splitFirst
and List.splitLast
docs
...
The examples in the docs appear to expect `List.splitFirst` to exclude occurrences of the delimiter in the `after` list:
```
List.splitFirst [Foo, Z, Bar, Z, Baz] Z == Ok { before: [Foo], after: [Bar, Baz] }
```
However, only the first occurrence of the delimiter in the `before` list. The `after` list contains everything after the first occurrence of the delimiter.
```
List.splitFirst [Foo, Z, Bar, Z, Baz] Z == Ok { before: [Foo], after: [Bar, Z, Baz] }
```
The same applies to `List.splitLast`
Signed-off-by: Agus Zubiaga <hi@aguz.me>
2023-03-08 10:18:42 -03:00
Luke Boswell
ae6f9067b6
fix Roc formatting
2023-03-08 18:11:49 +11:00
Luke Boswell
890f3db10a
update to support fenced code
2023-03-08 17:30:30 +11:00
Brendan Hansknecht
f42f61e271
run a toml formatter and then clean it up a bit
2023-03-06 19:47:57 -08:00
Brendan Hansknecht
4a89bee0a5
centralize package versions except for vendor and excluded
2023-03-06 19:29:09 -08:00
Brendan Hansknecht
5485c8a5b0
update to using workspace package spec
2023-03-06 16:36:18 -08:00
Luke Boswell
5ead576976
fix indentation for code blocks
2023-03-06 22:32:25 +11:00
Luke Boswell
5933d6b7e7
improve Json test coverage and fix decoding bugs
2023-03-05 17:00:10 +11:00
Luke Boswell
91adf0f411
Merge remote-tracking branch 'origin/main' into builtin-json
2023-03-05 15:58:58 +11:00
Brendan Hansknecht
0aa932d014
fix mem leak in Str.trim and make all Str.trim* functions consistent
2023-03-02 22:18:26 -08:00
Richard Feldman
82663fd30d
Merge pull request #5076 from roc-lang/fix-list-range
...
Fix List.range crashing
2023-03-01 19:29:24 -05:00
Luke Boswell
58d4faa0da
handle escapes in JSON string decoder
2023-02-28 20:53:57 +11:00
Brendan Hansknecht
c4d56f1dc9
update formatting
2023-02-27 16:43:35 -08:00
Brendan Hansknecht
f77d1dcd6b
fix List.range so that it will only crash when Length is too large
2023-02-27 16:01:05 -08:00
Folkert
44f08f9e47
implement sqrt and log in the dev backend
2023-02-26 21:41:25 +01:00
Luca Cervello
a4410fe052
fix: add spaces around ? in optional record field
2023-02-08 18:41:22 +01:00
David Dunn
550b22c633
Fix unicode escape sequences in Str docs
...
Unicode characters are escaped like \u(00) instead of \{0x00}. Tested
that this is the same for the repl and the hello world example
`Stdout.line "Hello,\u(0A)World!"`.
Found the correct syntax here:
304768569
2023-01-31 21:39:57 +04:00
Richard Feldman
b5caddcb77
Merge pull request #4973 from roc-lang/fix-string-split
...
fix string split on overlapping delimiters
2023-01-27 19:34:07 -05:00
Folkert
d52c037cba
fix string split on overlapping delimiters
2023-01-27 17:35:10 +01:00
Ayaz
99050956d3
Merge pull request #4971 from roc-lang/str-trim-null-byte
...
fix bug in Str.trim
2023-01-27 09:29:01 -06:00
Folkert
a77f137a9d
fix bug in Str.trim
2023-01-26 22:52:14 +01:00
Folkert
0af11c210e
fix memory leak in List.concat
2023-01-26 20:31:33 +01:00
Brian Carroll
a249e14ee5
builtins: restore nicer hash code for Dict
2023-01-23 22:39:24 +00:00
Folkert
4e5b106f98
use capacity instead of length in list deinit
2023-01-20 21:44:41 +01:00
Folkert
165d4b3450
fix memory leak in string trimming
2023-01-19 14:35:38 +01:00