Richard Feldman
93677001ba
Merge pull request #2888 from rtfeldman/divTrunc
...
rename divFloor to divTrunc
2022-04-19 21:57:49 -04:00
Kevin Gillette
6a3fd3a607
rename divFloor to divTrunc
2022-04-18 02:33:31 -06:00
Folkert
e112f6ad2c
Merge remote-tracking branch 'origin/trunk' into builtins-in-roc
2022-04-16 21:01:51 +02:00
Folkert
2b07b8c78d
Merge remote-tracking branch 'origin/trunk' into builtins-in-roc
2022-04-13 21:45:40 +02:00
Kevin Gillette
2c4a83788c
Rename internal NUM_DIV_INT references to NUM_DIV_FLOOR.
...
This balances with NUM_DIV_CEIL
(which is another form of integer division).
2022-04-13 02:48:57 -06:00
Richard Feldman
d81228df80
cargo fmt
2022-04-11 13:17:46 -04:00
Nikita Mounier
8206f345c7
Merge remote-tracking branch 'origin/trunk' into div-no-result
2022-04-11 11:45:06 +00:00
Nikita Mounier
4ecf2a8c24
Modify division behaviour to panic when dividing by 0, and add divChecked
, divFloorChecked and
divCeilingChecked` for safe alternatives which return a Result, mimicking the previous behaviour.
2022-04-11 11:23:33 +00:00
Folkert
1d0f9e9192
Merge remote-tracking branch 'origin/trunk' into builtins-in-roc
2022-04-08 15:47:11 +02:00
Richard Feldman
cd00a98636
Add toF32/64 and checked versions
2022-04-07 16:13:57 -04:00
Folkert
4e1197165b
Merge remote-tracking branch 'origin/trunk' into builtins-in-roc-delayed-alias
2022-03-18 21:25:52 +01:00
Folkert
e3e9215578
Merge remote-tracking branch 'origin/trunk' into type-checking-storage-subs
2022-03-12 14:10:43 +01:00
Folkert
28ce49c273
use lazy_static
2022-03-12 00:18:06 +01:00
Folkert
5006b2afa3
playing with atomics to get the global stdlib to work
2022-03-11 23:39:55 +01:00
Folkert
11da96b286
make borrow_stdlib threadsafe
2022-03-11 22:49:29 +01:00
Brendan Hansknecht
d681062c63
add Num.toNat
2022-03-11 11:17:42 -08:00
Folkert
3510bad1d5
add scaffolding
2022-03-07 20:55:40 +01:00
Folkert
adf4ad22a5
Merge remote-tracking branch 'origin/trunk' into builtins-in-roc
2022-03-05 20:55:15 +01:00
Folkert
db6b5bfd38
get Num to fully work again
2022-02-28 19:40:18 +01:00
Brendan Hansknecht
2ca1ebdd2d
appease the paperclip
2022-02-27 15:50:19 -08:00
Folkert
78fe734113
change the return type of List.replace
2022-02-27 22:47:08 +01:00
Folkert
db1669154e
WIP
2022-02-27 21:53:56 +01:00
Brendan Hansknecht
dddf8ff785
switch from pair to record and change name to ListReplaceUnsafe
2022-02-24 20:41:26 -08:00
Brendan Hansknecht
ba2e8cd32b
Add base piping for list.Replace
2022-02-24 17:58:56 -08:00
ayazhafiz
aa8b6e3393
Clippy
2022-02-19 16:28:36 -05:00
Jan Van Bruggen
e12d98af98
WIP: Start adding new Int.toInt builtins
2022-02-19 11:28:12 -05:00
Jan Van Bruggen
f47dbb5171
Swap List.mapWithIndex arg1 args order to put the element first
2022-02-11 16:10:29 -07:00
Jan Van Bruggen
92e0f8714f
Swap List.repeat args order to put the list first
2022-02-11 16:10:29 -07:00
Jan Van Bruggen
9a8a4c6ed7
Add Num.(min/max)(I/U)(8/16)
builtins
2022-01-22 00:19:17 -07:00
Eric Newbury
a96d5e6abf
Merge branch 'trunk' into enewbury/list-sort-desc
2022-01-21 17:06:52 -05:00
Eric Newbury
7e7104d9ba
WIP
2022-01-21 16:46:47 -05:00
Eric Newbury
05c01a81f5
adding List.sortAsc builtin
2022-01-21 15:34:24 -05:00
Jan Van Bruggen
8e4b6f0cab
Remove Num.(min/max)Int
...
Replace all uses with `Num.(min/max)I64`,
since all uses expect an `I64`.
2022-01-19 09:55:06 -07:00
Jan Van Bruggen
591477e77b
Add most remaining Num.min/max*
builtins
...
This skips `min/maxU128`, as they require a subtle change
to the `I128`-centric implementation of `Int`s.
2022-01-17 15:26:23 -07:00
Jan Van Bruggen
d7e2be306f
WIP: Add Num.minI128
builtin (TODOs remain)
2022-01-15 17:49:15 -07:00
ayazhafiz
2c41c43aea
Implement saturated add/subtract
2022-01-10 22:37:08 -05:00
ayazhafiz
ed64ff912a
Implement List.dropIf
...
This was referenced in the `List` documentation and in the
[tutorial](./TUTORIAL.md), but wasn't actually implemented prior to this
commit!
Part of #2227
2021-12-22 12:34:48 -06:00
rvcas
b7d48b2fe1
feat: add the rest of the num types for Str conversion
2021-12-06 23:24:02 -05:00
rvcas
e587e20de2
feat: switch to using a builtin per num type to convert from a string
2021-12-06 22:24:00 -05:00
rvcas
ba9d01773b
fix: result holds a num_type
2021-12-01 16:25:00 -05:00
rvcas
3104406956
feat: add the type def for Str.toNum
2021-12-01 16:12:55 -05:00
Anton-4
e63701c5d1
trying to make Str.toNum work for Ints
2021-12-01 20:37:21 +01:00
Anton-4
eaf4e57759
started on Str.toNum
2021-12-01 15:15:30 +01:00
rvcas
f995a07029
feat: Num.toStr
...
* add type for Num.toStr
* create new lowlevel
* delete types and Symbol for fromInt and fromFloat
* leave LowLevel::{StrFromFloat,StrFromInt}
* match on LowLevel::NumToStr and figure out the layout to decide
which build function to delegate to
2021-11-30 14:52:06 -05:00
Michael Downey
d11bb93539
Merge branch 'trunk' into add_list_all
2021-11-18 16:09:24 -05:00
Michael Downey
9d587d37b4
Merge branch 'trunk' into add_list_all
2021-11-18 06:41:08 -05:00
satotake
ce8a88416d
Merge branch 'trunk' into builtins-list-intersperse
2021-11-18 11:16:27 +00:00
satotake
16fb04b4fa
Add builtin List.intersperse
2021-11-17 15:18:45 +00:00
Michael Downey
d946b84e63
adding initial List.all
2021-11-16 16:34:36 -05:00
satotake
73dda714de
Add builtin List.split
2021-11-15 13:50:11 +00:00