zipper 2017-01-29 22:02:46
raichoo: Hello
cocreature 2017-01-29 22:03:58
xplat: afaik you need to use pipes-parse for that. then you can use https://hackage.haskell.org/package/pipes-parse-3.0.8/docs/Pipes-Parse.html#v:peek
cocreature 2017-01-29 22:04:15
oh xpika is already gone, that's why autocomplete failed
bollu 2017-01-29 22:11:48
what is the relationship between JS promises and actors?
bollu 2017-01-29 22:11:52
and continuations as well
bollu 2017-01-29 22:12:13
I'm not sure where to ask this question, I thought #haskell has enough of "CS theory" to entertain this question
bollu 2017-01-29 22:12:21
wow
athan 2017-01-29 22:12:55
continuations are very generic, but I don't know enough about them to give the best answer :x
athan 2017-01-29 22:13:23
I think a promise is something like a continuation
athan 2017-01-29 22:14:12
you can imagine the continuation monad as "given that I have some method to fulfill the computation that sparked my thread, do something then call it", very similar to JS's `next()` concept
athan 2017-01-29 22:14:44
but, this can be pushed further to delimited continuations, which I know nothing about :)
athan 2017-01-29 22:15:56
:S
reactormonk 2017-01-29 22:22:28
Why is refraining from using typeclasses considered good practice in API design?
t7 2017-01-29 22:23:04
where did you read that?
reactormonk 2017-01-29 22:25:13
https://www.reddit.com/r/haskell/comments/5qxh1e/deni_bertovic_haskell_and_docker_down_the_rabbit/dd399dx/
Rembane 2017-01-29 22:25:25
There's more than one way to do it
athan 2017-01-29 22:26:29
@type show . read -- shouldn't this throw an ambiguity error?
lambdabot 2017-01-29 22:26:31
String -> String
reactormonk 2017-01-29 22:27:55
> (show . read) "foobar"
lambdabot 2017-01-29 22:27:57
"*Exception: Prelude.read: no parse
reactormonk 2017-01-29 22:28:31
huh?
athan 2017-01-29 22:29:57
I would think it would throw an ambiguity error before being capable of running :s
athan 2017-01-29 22:30:06
due to deciding the `a` in between
cocreature 2017-01-29 22:30:57
athan: GHC defaults the constraint to (). if you enable -Wtype-defaults you'll get a warning
athan 2017-01-29 22:31:20
oh! That makes perfect sense :)
athan 2017-01-29 22:31:23
thank you cocreature
cocreature 2017-01-29 22:31:52
athan: if you enable ExtendedDefaultRules you'll also get an error
cocreature 2017-01-29 22:31:59
ExtendedDefaultRules is enabled by default in GHCi
athan 2017-01-29 22:33:15
What does that extension do, cocreature? I've seen it around a few times
athan 2017-01-29 22:33:56
or is that what facilitates the "default-ness"
cocreature 2017-01-29 22:34:33
athan: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/ghci.html#type-defaulting-in-ghci