News for hackers. Stuff that matters.
Re:Roc – A fast, friendly, functional language by yashrk on Monday November 20, 2023 @11:18AM (#38349976)
First of all — way faster machine code.

Many other things are features or bugs depending of your preferences. For me, for example, eager evaluation is a big improvement, but YMMV.

Re:Roc – A fast, friendly, functional language by satvikpendem on Monday November 20, 2023 @12:12PM (#38350761)
How does it compare to HVM [0]? It is an alternative to GHC that in some cases is orders of magnitudes faster, at least from their benchmarks.

[0] https://github.com/HigherOrderCO/hvm

Re:Roc – A fast, friendly, functional language by weatherlight on Monday November 20, 2023 @12:43PM (#38351343)
i thought the orders of magnitudes faster benchmarks were around lazy evaluation, and probably wouldn't apply here.
Re:Roc – A fast, friendly, functional language by tkz1312 on Monday November 20, 2023 @02:01PM (#38352734)
Roc uses perceus, which is a reference counting model that allows for opportunistic in place mutation if it is safe to do so. HVM is more like a fundamentally new evaluation model that is parallel by default. They are both very exciting, but HVM is much more radical and probably needs at least a few more years until it starts to be seriously practical.
Re:Roc – A fast, friendly, functional language by tromp on Monday November 20, 2023 @11:45AM (#38350313)
> eager evaluation is a big improvement

Does it have any support for laziness? E.g. could one define the list of all fibonacci numbers similarly to Haskell's

    fib = let f a b = a : f b (a+b) in f 0 1