Re:Reimplementing “git clone” in Haskell from the bottom up ...
by eru on Sunday December 07, 2014 @09:25PM
(#8714596)
They probably are already. (In Haskell, they would be by default. I don't know enough about Agda.)
[ Parent
| on HN ]
Re:Reimplementing “git clone” in Haskell from the bottom up ...
by andolanra on Sunday December 07, 2014 @10:11PM
(#8714719)
That is indeed the case. In Agda, the default is call-by-name, which means that functions are applied before arguments are evaluated. This does not, however, include sharing, so evaluating
(λ x → x + x) (fib 2000)
will evaluate `fib 2000` twice. Agda programs can also be compiled to Haskell, in which case they would have Haskell's evaluation strategy, which is generally call-by-need (and so would share the result of fib 2000 above.)
Re:Reimplementing “git clone” in Haskell from the bottom up ...
by tel on Sunday December 07, 2014 @11:55PM
(#8714981)
I've never been aware of whether Agda is CBN or CBV because it actually doesn't matter (!).
In a pure, terminating language like Agda evaluation is "confluent" which means that CBV and CBN evaluations are identical.
Re:Reimplementing “git clone” in Haskell from the bottom up ...
by Peaker on Monday December 08, 2014 @02:30AM
(#8715387)
Identical up to one algorithm taking a few seconds, and another taking as long as the universe has been alive :)
Re:Reimplementing “git clone” in Haskell from the bottom up ...
by tel on Monday December 08, 2014 @07:27AM
(#8716077)
Who runs Agda code anyway? :)