Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→
Page 1 .. 406 407 408 409 410 411 412 413 414 415 416 .. 17997
1,799,644 events total
2021-06-11 22:04:14 <maerwald> you have to understand the operational semantics
2021-06-11 22:04:50 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
2021-06-11 22:05:16 <maerwald> ContT + ExceptT + StateT + IO -> gg
2021-06-11 22:05:24 <monochrom> No.
2021-06-11 22:06:13 <monochrom> Either you're mistaking transformer stacks for monadic class-constrained polymorphism, or you're mistaking implicitness for complexity.
2021-06-11 22:07:14 <monochrom> If I have "yikes :: (MonadA m, MonadB m) => m ()", it's >>= is unclear, yes.
2021-06-11 22:07:19 <dminuoso> Rembane_: You cant hand out swords but not hand out popcorn.
2021-06-11 22:07:36 <sshine> vim > emacs
2021-06-11 22:07:44 <Rembane_> dminuoso: Sorry, I was too busy eating them myselves, I'm gonna pop some more soon though.
2021-06-11 22:08:01 <dminuoso> monochrom: And welcome to the effect system game.
2021-06-11 22:08:18 <monochrom> But if I have "yo :: AT (BT IO) ()", it's >>= is very well understood, especially since for example we know it is not BT (AT IO).
2021-06-11 22:08:51 <dminuoso> Is that very well understood? If I put in three transformer layers, is it always instantly clear to all relevant users?
2021-06-11 22:09:03 <monochrom> What you can complain is that by the time I have AT (BT (CT (DT IO))) it is a lot to follow. But it's very explicit.
2021-06-11 22:09:10 <dminuoso> Note, Im not talking about you who may have pondered about it so often that it becomes second nature to you
2021-06-11 22:09:38 <sshine> dminuoso, maybe "well understood" means your lifts need to go in a specific order that enforces some clarity?
2021-06-11 22:09:50 <sshine> sorry, that was probably a question directed to monochrom.
2021-06-11 22:10:11 <monochrom> Yes.
2021-06-11 22:10:40 <maerwald> monochrom: no. "Implicit" doesn't mean "class-constrained"
2021-06-11 22:10:46 jaevanko joins (~jaevanko@2600:1700:1330:2bef:5548:773a:cf10:a3a1)
2021-06-11 22:11:19 HarveyPwca joins (~HarveyPwc@2601:246:c180:a570:29df:3b00:ad0e:3a06)
2021-06-11 22:12:13 <maerwald> But yes, mtl has a special kind of implicitness... or rather... it defers the order of effects to the call-site
2021-06-11 22:12:20 <maerwald> I don't consider that the implicitness problem
2021-06-11 22:12:28 <maerwald> it's just undefined if you look at the type sig
2021-06-11 22:12:52 <maerwald> implicit is how the transformers interact
2021-06-11 22:12:59 <dminuoso> monochrom: And to be fair, as long as AT/BT are just opaque type names, the effects and thus their ordering are not obvious/mentioned.
2021-06-11 22:13:27 <maerwald> you have to understand exactly what's happening to understand that some orders of stacks don't make sense, leak space or whatnot
2021-06-11 22:13:28 <dminuoso> It all relies on you knowing what AT/BT/... are, how they are defined, and how their layering order affects effects.
2021-06-11 22:13:35 <dminuoso> It's not very explicit I think.
2021-06-11 22:13:36 <maerwald> yep
2021-06-11 22:14:37 <dminuoso> If it was explicit, I wouldnt have to @unmtl every time I wonder "jeesh, should StateT go inside or outside". Or maybe I'm just dumb *shrugs*
2021-06-11 22:14:39 <monochrom> Have you ever complained the same of opague function names too?
2021-06-11 22:14:57 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Quit: FinnElija)
2021-06-11 22:14:59 <monochrom> For example "filter" is an opague function name.
2021-06-11 22:15:06 <dminuoso> Yes, and I hate it every time.
2021-06-11 22:15:14 <maerwald> dminuoso: yeah... I've used StateT exactly once :> (and just as a performance optimization over IORef)
2021-06-11 22:15:18 <dminuoso> I cant for my life remember whether the predicate selects items to be dropped or preserved.
2021-06-11 22:15:23 <dminuoso> Every time I use it.
2021-06-11 22:15:27 jakalx joins (~jakalx@base.jakalx.net)
2021-06-11 22:15:30 <monochrom> And empirically 50% of the people really believe that it means filter odd [1,2,3] = [2].
2021-06-11 22:15:42 <maerwald> yes
2021-06-11 22:15:49 <maerwald> I've hit this for 5 years
2021-06-11 22:15:56 <dminuoso> some/many are right in that department too.
2021-06-11 22:15:56 <maerwald> then I started to get it
2021-06-11 22:16:02 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
2021-06-11 22:16:17 <dminuoso> or `guard` with STM!
2021-06-11 22:16:45 <monochrom> If no one has done a good job explaining filter or AT, that's a documentation problem. That is not a criticism against AT (BT IO) or filter . map f
2021-06-11 22:16:57 <maerwald> right... and back to ContT... I know what it does if I read the implementation... and 2 days later I don't know anymore, because it's really void of intuition
2021-06-11 22:17:14 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2021-06-11 22:17:18 <dminuoso> maerwald: I guess the usage of ContT to get rid of just with is outside that confusion.
2021-06-11 22:17:33 <dminuoso> The crux of ContT is that it can be (ab)used to create all kinds of bizarre control flows
2021-06-11 22:17:39 <maerwald> yep
2021-06-11 22:17:58 <monochrom> The most you can complain is my imprecise wording.
2021-06-11 22:18:19 <dminuoso> monochrom: Im not sure this is a documentation problem.
2021-06-11 22:18:32 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
2021-06-11 22:18:37 <monochrom> I should have lawyerly worded: AT (BT IO) is no less explicit than AT, BT, IO. filter . map f is no less explicit than filter, map, f.
2021-06-11 22:19:04 <safinaskar> i just sent my proof to haskell-cafe
2021-06-11 22:19:23 <maerwald> I'm gonna mess up my release arguing here... I already forgot what I uploaded
2021-06-11 22:19:24 × MoC quits (~moc@user/moc) (Quit: Konversation terminated!)
2021-06-11 22:21:17 benin03 joins (~benin@183.82.205.218)
2021-06-11 22:21:48 × yoctocell quits (~yoctocell@h87-96-130-155.cust.a3fiber.se) (Ping timeout: 252 seconds)
2021-06-11 22:22:57 yoctocell joins (~yoctocell@h87-96-130-155.cust.a3fiber.se)
2021-06-11 22:24:12 × yoctocell quits (~yoctocell@h87-96-130-155.cust.a3fiber.se) (Client Quit)
2021-06-11 22:24:59 reumeth joins (~reumeth@user/reumeth)
2021-06-11 22:25:16 <monochrom> You should have focused on critiquing ContT alone rather than broadenly to all transformer stacks.
2021-06-11 22:25:23 <xerox> if only you had captured the continuation before
2021-06-11 22:25:44 <monochrom> :) I resisted making that joke.
2021-06-11 22:25:51 <xerox> sorry xD
2021-06-11 22:27:11 <maerwald> monochrom: ContT is just the worst... although I like this post https://www.schoolofhaskell.com/school/to-infinity-and-beyond/pick-of-the-week/the-mother-of-all-monads
2021-06-11 22:27:24 <maerwald> "Suppose someone stole all the monads but one, which monad would you want it to be?"
2021-06-11 22:27:27 <maerwald> :>
2021-06-11 22:28:08 <davean> I'd want it to be IO that I got to keep
2021-06-11 22:29:29 <monochrom> I might abuse the wording "one". ContT r IO is still one monad, especially if you don't let me decompose and use ContT or IO separately.
2021-06-11 22:29:52 <maerwald> In that case I'd pick `ExceptT e IO a`
2021-06-11 22:29:58 <maerwald> that's the only stack I ever use
2021-06-11 22:30:08 <Rembane_> Can you stack as many as you want to and still have one monad?
2021-06-11 22:30:17 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds)
2021-06-11 22:31:19 <monochrom> And ContT r IO would be close enough to Scheme's pervasive IO-plus-shift-reset environment such that everything said in the paper that inspired that blog post can be done.
2021-06-11 22:31:51 <monochrom> Rembane_: Yeah! But I pretend to be not so greedy.
2021-06-11 22:32:06 × reumeth quits (~reumeth@user/reumeth) (Ping timeout: 264 seconds)
2021-06-11 22:32:08 × alex3 quits (~alex3@BSN-77-82-41.static.siol.net) (Ping timeout: 272 seconds)
2021-06-11 22:32:27 <Rembane_> monochrom: That's very good.
2021-06-11 22:34:25 <xerox> I was thinking what was the thing that paired with reset and I could only think of something like push, shift it was
2021-06-11 22:36:12 <monochrom> I know of restaurants that have a menu item "salad bar". It means that, although the restaurant is not normally an all-you-can-eat-buffet kind, you do get to choose the "salad bar" thing as one of your items, and the price entitles you to go to the salad bar and fill one plate.
2021-06-11 22:36:34 <monochrom> Naturally, people would stack veggies on that plate as much as possible.
2021-06-11 22:37:08 <monochrom> If you are at a monad salad bar, what would you stack on your plate? >:)
2021-06-11 22:37:43 <Rembane_> An infinite stack of ExceptT! :D
2021-06-11 22:37:48 <DigitalKiwi> only one plate?
2021-06-11 22:37:53 <DigitalKiwi> oh no
2021-06-11 22:37:54 <monochrom> Only one plate.
2021-06-11 22:38:08 <jaevanko> Is the plate Identity or IO?
2021-06-11 22:38:08 <maerwald> Although, I switched to `Excepts`... ExceptT is boring
2021-06-11 22:38:27 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
2021-06-11 22:38:34 <monochrom> Would you like a game of monad stack Jenga?
2021-06-11 22:39:24 × dhil quits (~dhil@80.208.56.181) (Ping timeout: 252 seconds)
2021-06-11 22:39:33 <geekosaur> Chronicle?
2021-06-11 22:39:48 alex3 joins (~alex3@BSN-77-82-41.static.siol.net)
2021-06-11 22:40:30 <DigitalKiwi> no wonder they don't like me at spaghetti works ;_;
2021-06-11 22:41:14 <Rembane_> "Hi, I brought my infinite monad transformer plate, I hope that's cool with you."
2021-06-11 22:42:56 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 264 seconds)
2021-06-11 22:44:09 <maerwald> reminds me of the first weird scene of the facebook movie... could go likes this: "what's you favorite transformer?" ... and when your date answers with ContT, you know you have a great match

All times are in UTC.