Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2020-11-03 16:52:07 × nyaomi quits (~naomi@cpe-74-75-6-125.maine.res.rr.com) (Excess Flood)
2020-11-03 16:52:35 nyaomi joins (~naomi@cpe-74-75-6-125.maine.res.rr.com)
2020-11-03 16:53:37 hnOsmium0001 joins (uid453710@gateway/web/irccloud.com/x-abxtjqjdzzifrxcr)
2020-11-03 16:57:25 darjeeling_ joins (~darjeelin@115.215.43.51)
2020-11-03 16:57:55 × nyaomi quits (~naomi@cpe-74-75-6-125.maine.res.rr.com) (Excess Flood)
2020-11-03 16:58:19 nyaomi joins (~naomi@cpe-74-75-6-125.maine.res.rr.com)
2020-11-03 16:59:01 cole-h joins (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net)
2020-11-03 16:59:34 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2020-11-03 17:01:08 Chi1thangoo joins (~Chi1thang@87.112.60.168)
2020-11-03 17:02:06 × nbloomf quits (~nbloomf@2600:1700:ad14:3020:2543:65c:876:3dae) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-11-03 17:02:24 × ahmr88 quits (~ahmr88@cpc85006-haye22-2-0-cust131.17-4.cable.virginm.net) (Ping timeout: 260 seconds)
2020-11-03 17:03:54 <ulidtko> what was the deal again with the mtl variation of lazy-IO problem?..
2020-11-03 17:05:20 <ulidtko> i have this crappy piece of code built around an ExceptT-ReaderT-StateT-IO stack
2020-11-03 17:05:24 <dolio> Huh?
2020-11-03 17:05:26 × jlamothe quits (~jlamothe@198.251.55.207) (Quit: leaving)
2020-11-03 17:05:32 <ulidtko> ... and in it, one action with liftIO's doesn't run any of the side effects
2020-11-03 17:05:55 × whatisRT quits (~whatisRT@2002:5b41:6a33:0:dea6:32ff:fe5b:d45f) (Ping timeout: 240 seconds)
2020-11-03 17:06:25 <ulidtko> https://files.slack.com/files-pri/T7F1A4ZHB-F01DGL8QAPR/image.png if you can see that
2020-11-03 17:06:32 × gehmehgeh quits (~ircuser1@gateway/tor-sasl/gehmehgeh) (Remote host closed the connection)
2020-11-03 17:07:19 <ulidtko> I do see the `trace` around the invocation of reportSubstepTimings
2020-11-03 17:07:33 <ulidtko> I also see the invocation happening in ghci debugger (duh)
2020-11-03 17:07:52 <ulidtko> but I don't the any output from the body of it
2020-11-03 17:07:52 gehmehgeh joins (~ircuser1@gateway/tor-sasl/gehmehgeh)
2020-11-03 17:08:08 <ulidtko> could this be caused by laziness somehow?..
2020-11-03 17:08:19 nbloomf joins (~nbloomf@2600:1700:ad14:3020:fc37:ff3f:9c12:2922)
2020-11-03 17:10:31 Ariakenom joins (~Ariakenom@h-82-196-111-76.NA.cust.bahnhof.se)
2020-11-03 17:10:34 <ulidtko> I've read the Michael Snoyman's stance on this, pretty agreeable https://www.fpcomplete.com/blog/2017/06/readert-design-pattern/
2020-11-03 17:11:44 <dolio> Well, your image of (presumably) code is hidden behind a login screen.
2020-11-03 17:11:53 wroathe joins (~wroathe@c-73-24-27-54.hsd1.mn.comcast.net)
2020-11-03 17:11:54 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2020-11-03 17:11:57 <ulidtko> sorry about that, one second
2020-11-03 17:12:23 <dolio> trace is also not what people are usually talking about when they say lazy IO.
2020-11-03 17:12:28 u0_a298 joins (~user@47.206.148.226)
2020-11-03 17:12:37 <ulidtko> http://deaddrop.ftp.sh/il6g41Ic9QJg.png this should be publicly visible
2020-11-03 17:13:02 <ulidtko> yeah, please see the code
2020-11-03 17:13:43 acidjnk_new2 joins (~acidjnk@p200300d0c718f623213d210801ac68e4.dip0.t-ipconnect.de)
2020-11-03 17:13:47 × ubert quits (~Thunderbi@2a02:8109:9880:303c:e6b3:18ff:fe83:8f33) (Remote host closed the connection)
2020-11-03 17:13:54 <ulidtko> I've all of: liftIO . putText; traceIO; unsafePerformIO -- none of them run
2020-11-03 17:14:30 <davean> why would they run?
2020-11-03 17:14:36 <davean> Nothing there seems to want them to run
2020-11-03 17:14:43 <ulidtko> haha
2020-11-03 17:14:49 <ulidtko> I want the to run ;)
2020-11-03 17:14:54 <ulidtko> pretty desperately in fact
2020-11-03 17:15:00 <ulidtko> *them
2020-11-03 17:15:32 <davean> so A) wow thats a lot of seperate ways to do unsafePerformIO, why not pick one? B) make it so that moving on at all is dependent on them being run, force them.
2020-11-03 17:15:42 <davean> seq, bang, whatever
2020-11-03 17:15:50 <dolio> Just don't use unsafePerformIO.
2020-11-03 17:16:10 <davean> yah, I mean yes, its not a good thing to use
2020-11-03 17:16:14 <davean> and you're using it wrong,
2020-11-03 17:16:21 <merijn> @quote not.a.bug
2020-11-03 17:16:22 <lambdabot> Lemmih says: "I don't understand why my code acts weird when I use unsafePerformIO" is not a bug.
2020-11-03 17:16:29 <ulidtko> yes, I know -- I won't -- those are just for you to see how frustrated I got
2020-11-03 17:16:30 <davean> but even if you were using it right, none of what your doign there depends on the result of the computation
2020-11-03 17:16:53 <davean> yah, but I'm confused why you thought these would run - theres no demand.
2020-11-03 17:17:05 <ulidtko> you can see the callsite
2020-11-03 17:17:23 <ulidtko> maybeReportTimings <$!> zipWithM step [1 ..] execs
2020-11-03 17:17:28 <davean> Yah
2020-11-03 17:17:33 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-11-03 17:17:35 <davean> That doesn't ask for it to run
2020-11-03 17:17:54 <davean> Bangs on the wrong side.
2020-11-03 17:17:55 × avdb quits (~avdb@ip-83-134-109-138.dsl.scarlet.be) (Quit: WeeChat 2.9)
2020-11-03 17:18:20 avdb joins (~avdb@ip-83-134-109-138.dsl.scarlet.be)
2020-11-03 17:18:32 <davean> ulidtko: >> won't inspect the ()
2020-11-03 17:18:41 <davean> ulidtko: it knows its (), why would it look?
2020-11-03 17:18:53 <ulidtko> well it's a pattern match
2020-11-03 17:19:00 <ulidtko> right?
2020-11-03 17:19:22 <ulidtko> should force the thing at whnf if I'm not mistaken
2020-11-03 17:19:23 Amras joins (~Amras@unaffiliated/amras0000)
2020-11-03 17:19:32 <davean> ok, so whats whnf
2020-11-03 17:19:33 × kritzefitz quits (~kritzefit@212.86.56.80) (Remote host closed the connection)
2020-11-03 17:19:37 <ulidtko> *to whnf
2020-11-03 17:19:43 <ulidtko> weak-head-normal-form
2020-11-03 17:19:43 <davean> whnf of the monad sure
2020-11-03 17:19:50 <davean> yes, I'm asking you to think about whnf
2020-11-03 17:19:58 <davean> and why it specificly is the one that *doesn't* force this
2020-11-03 17:20:20 <ulidtko> ahhhhhhhh
2020-11-03 17:20:27 <ulidtko> okay
2020-11-03 17:20:48 <ulidtko> so it forces only the toplevel constructor
2020-11-03 17:21:12 <davean> Thats what whnf is
2020-11-03 17:21:14 <davean> yep
2020-11-03 17:21:20 kritzefitz joins (~kritzefit@212.86.56.80)
2020-11-03 17:21:29 <davean> and now you have your answer
2020-11-03 17:21:56 <ulidtko> that actually just improved my understanding, thanks for the questions!
2020-11-03 17:22:05 <davean> Thats why I did it :)
2020-11-03 17:22:13 <ulidtko> appreciated
2020-11-03 17:24:02 <davean> Now, for ethical reasons I'm required to tell you again you shouldn't use unsafePerformIO, the IRB gets on me if I don't.
2020-11-03 17:24:23 <ulidtko> I seriously won't, pinky-promise ;)
2020-11-03 17:24:40 <ulidtko> just temporary (tm) for debug
2020-11-03 17:25:14 <davean> I believe that like drugs, theres a minimum age on unsafePerformIO usage, and its somewhere over 3 years contributing to GHC :)
2020-11-03 17:25:45 roconnor joins (~roconnor@host-192.252-162-14.dyn.295.ca)
2020-11-03 17:26:40 dbmikus_ joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com)
2020-11-03 17:27:37 o1lo01ol1o joins (~o1lo01ol1@bl8-213-81.dsl.telepac.pt)
2020-11-03 17:28:19 <Cheery> https://github.com/cheery/haskell-rady
2020-11-03 17:28:32 <Cheery> is this enough for a published library, or do you think it'd need something else?
2020-11-03 17:28:38 × hvr quits (~hvr@haskell/developer/hvr) (Remote host closed the connection)
2020-11-03 17:28:50 hvr_ joins (~hvr@haskell/developer/hvr)
2020-11-03 17:29:22 × obihann quits (~jhann@156.34.160.69) (Quit: Lost terminal)
2020-11-03 17:29:23 hvr_ is now known as hvr
2020-11-03 17:29:41 <monochrom> (>>) does not do pattern matching on ().
2020-11-03 17:29:57 <davean> right, I think we got that with the whnf discussion?

All times are in UTC.