Nathan Faubion

Results 282 comments of Nathan Faubion

> On a related note, it appears that the unicode Char generator includes the code point 65536 (chooseInt is inlcusive?). Shouldn't this be 65535? (FYI, I've verified that this is...

It's not really about mutation per se. It's more that it's tracking the token for observable effects. If IO/Effect is pseudo-semantically `RealWorld` token passing, then this is parameterizing the effect...

The main issue right now is needing STFn functions, which are provided for Effect, but not ST. Having MonadST does not help with that. It's not totally clear to me...

Note, I'm not saying that to advocate for the approach in this thread. If we want to support parallel implementations of everything, sure, that's fine. All I personally care about...

> To be completely honest I don't love the application of EffectFn as a solution for performance problems I'm not sure it's avoidable as long as these are packed behind...

*Pro:* Doesn't break the entire ecosystem *Con:* Must depend on purescript-lists (most do anyway, though). Feels somewhat redundant, since it's just an alternative formulation of `Foldable` with laziness.

I think that `toList` makes more sense than adding `foldrLazy` because by reifying it as a lazy data structure you can write a tail-recursive consumer to avoid stack issues.

To clarify, lets take `all` as an example. The naive implementation with `foldrLazy` would be ``` all = foldrLazy (\a b -> Lazy.defer \_ -> a && Lazy.force b) (Lazy.defer...

I would actually probably even prefer something like ``` data Producer a = Done | Next a (Unit -> Producer a) ``` As opposed to `Data.List.Lazy` because the extra allocations...

Just for comparison, here are some benches for `and` (I incorrectly called it `all` above) with 1000 `true`s, implemented as described above. ``` Array unsafeIndex: mean = 5.81 μs stddev...