quchen 2017-02-06 05:45:13
(\x y -> y) vs (\x y -> y) <$> A <*> B
thatguy 2017-02-06 05:45:20
ahhh A could have some other effects on my input and then evaluating A first is different then just evaluating B
quchen 2017-02-06 05:45:26
Right!
thatguy 2017-02-06 05:45:29
ah ok I think I am starting to get it
thatguy 2017-02-06 05:45:40
well that was harder than it should have been
thatguy 2017-02-06 05:45:45
I'll go play around a bit
thatguy 2017-02-06 05:45:50
thanks everyone for the kind help
quchen 2017-02-06 05:45:54
thatguy: If you know about IO, then try »putStrLn "hello" *> putStrLn "world"«.
quchen 2017-02-06 05:46:08
thatguy: If you ignored the left argument, that would only print »world«.
quchen 2017-02-06 05:46:23
But we only ignore its resulting value of type (), but still have its effects executed.
thatguy 2017-02-06 05:48:23
yes I understood it when I thought about the Parser I wrote on the last tutorial chapter
thatguy 2017-02-06 05:48:46
I actually even already implemented that function without knowing it was *>
lpaste 2017-02-06 05:51:09
qmm pasted "suggestions on how to keep this running? it exits immediately" at http://lpaste.net/352142
glguy 2017-02-06 05:53:40
qmm: You're forking a process and then your main thread is done, has nothing to do, and exits. What were you hoping it would do?
glguy 2017-02-06 05:55:38
qmm: Also note that returning a result from main doesn't do anything. The result is always necessarily ignored.
glguy 2017-02-06 05:58:46
qmm: Have you looked at the documentation for forkProcess yet? I'm guessing you want to use something else: https://hackage.haskell.org/package/distributed-process-0.6.6/docs/Control-Distributed-Process-Node.html#v:forkProcess
qmm 2017-02-06 06:02:02
glguy: i'm hoping that the process stays alive
qmm 2017-02-06 06:03:06
maybe i'm looking for https://hackage.haskell.org/package/distributed-process-simplelocalnet-0.2.3.3/docs/Control-Distributed-Process-Backend-SimpleLocalnet.html#v:startMaster
qmm 2017-02-06 06:03:29
yeah, i think that's the answer
glguy 2017-02-06 06:04:02
I'd have guessed runProcess, which was just below forkProcess in the documentation.
qmm 2017-02-06 06:06:03
glguy: ah
qmm 2017-02-06 06:06:08
glguy: that did it
qmm 2017-02-06 06:09:16
sorry for so many questions. how does this result in a process that doesn't stop? done <- newEmptyMVar ; void $ forkProcess node $ try proc >>= liftIO . putMVar done ; takeMVar done >>= either (throwIO :: SomeException -> IO a) return
thatguy 2017-02-06 06:29:33
I have a function f :: a -> b -> c and some h :: d -> a is there a shorthand for composing h in the first argument, getting g :: d -> b -> c ?
ongy 2017-02-06 06:32:17
:t (undefined :: a -> b -> c) . (undefined :: d -> a)
lambdabot 2017-02-06 06:32:19
d -> b -> c
thatguy 2017-02-06 06:33:42
oh thats easy
thatguy 2017-02-06 06:33:44
ongy: thanks