2026/03/11

Newest at the top

2026-03-11 09:14:08 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-03-11 09:13:45 +0100humasect(~humasect@184.151.37.182) humasect
2026-03-11 09:09:13 +0100 <probie> A monad is like a burrito, if you're a weirdo who uses smaller burritos as a filling for bigger burritos
2026-03-11 09:07:24 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
2026-03-11 09:03:55 +0100sord937(~sord937@gateway/tor-sasl/sord937) sord937
2026-03-11 09:02:45 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-03-11 08:59:39 +0100humasect(~humasect@184.151.37.182) (Quit: Leaving...)
2026-03-11 08:55:41 +0100 <[exa]> who said that thing with "abstract complex are elucidated by throwing examples at them"
2026-03-11 08:55:20 +0100 <[exa]> +1000 ^
2026-03-11 08:55:19 +0100poscat(~poscat@user/poscat) (Ping timeout: 245 seconds)
2026-03-11 08:54:43 +0100 <ski> mesaoptimizer : do note that most "monad tutorials" out there are bad (unhelpful, hinders comprehension)
2026-03-11 08:53:56 +0100poscat0x04(~poscat@user/poscat) poscat
2026-03-11 08:53:38 +0100CiaoSen(~Jura@2a02:8071:64e1:da0:5a47:caff:fe78:33db) CiaoSen
2026-03-11 08:51:50 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
2026-03-11 08:49:37 +0100oskarw(~user@user/oskarw) oskarw
2026-03-11 08:49:34 +0100Digitteknohippie(~user@user/digit) Digit
2026-03-11 08:49:24 +0100Digit(~user@user/digit) (Ping timeout: 256 seconds)
2026-03-11 08:46:59 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-03-11 08:46:48 +0100 <Axman6> It's basically how we taught things in the NICTA/Data61/System F FP course - here's a type, here's a function which uses that typew, implement the function that matches that type (hint there is 1/2/infinite ways to do that). Here's another type, here's a function's type: implement the function with that type... Hey, their types look really similar, can we do something with that?
2026-03-11 08:44:57 +0100 <opqdonut> yes, agreed
2026-03-11 08:44:44 +0100 <Axman6> There's a lot of external pressure to explain monads, because they're the big boogie man of Haskell people struggle to understand - but they'd be much better off starting to use things which are monads first, and then see that there's a common interface for them
2026-03-11 08:44:19 +0100 <mesaoptimizer> nor that the laws necessarily hold if you define an instance of the classes
2026-03-11 08:44:07 +0100 <mesaoptimizer> I see. Sure, perhaps I figure it out via learning to be comfortable with actual instances of these type classes. I'll try that. I didn't have the misconception that it was directly related to the category theoretic concepts, of course
2026-03-11 08:43:53 +0100 <humasect> depends where one starts after all
2026-03-11 08:42:46 +0100 <dminuoso> The biggest pedagogic mistake of Haskell.
2026-03-11 08:42:01 +0100 <dminuoso> mesaoptimizer: I mean most individual instances of Applicative/Monad are trivial enough to figure out in a minute or two as long as you have more than a week of programming experience - and that knowledge is likely enough to become competent in Haskell..
2026-03-11 08:40:26 +0100ski. o O ( "How to Replace Failure by a List of Successes: A method for exception handling, backtracking, and pattern matching in lazy functional languages" by Philip Wadler in 1985 at <http://www.rkrishnan.org/files/wadler-1985.pdf> )
2026-03-11 08:40:09 +0100 <humasect> yea; it clicks when it clicks
2026-03-11 08:39:25 +0100 <dminuoso> I'd be willing to bet you can learn Haskell just fine without understanding what Applicative or Monad "are"
2026-03-11 08:38:59 +0100 <dminuoso> irrelevant for learning haskell.
2026-03-11 08:38:57 +0100 <dminuoso> mesaoptimizer: Some of the reasons that Applicative/Monad are difficult to understand are an obscure name and the fact that the pattern they abstract over something that has no "purpose" or "intent", just an observation that there's some things that just follow the same form and laws... I personally think that too much time is lost trying to focus around what they mean because it's almost entirely
2026-03-11 08:38:13 +0100arandombit(~arandombi@user/arandombit) (Ping timeout: 244 seconds)
2026-03-11 08:36:12 +0100 <mesaoptimizer> dminuoso: I see, that's useful to know
2026-03-11 08:36:03 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 246 seconds)
2026-03-11 08:35:57 +0100 <dminuoso> Forget what I said, then.
2026-03-11 08:35:56 +0100 <mesaoptimizer> Functors are easy to wrap one's head around via just the type signature. Applicatives and Monad type signatures seem a bit harder to understand just by looking at it though
2026-03-11 08:35:51 +0100 <dminuoso> mesaoptimizer: But you're on a right track as far as coerce goes. If you're using it with TypeApplications it's as good as manual unpacking/repacking - albeit more unusual
2026-03-11 08:35:21 +0100 <[exa]> nothing explains that you don't want to use X better than using X
2026-03-11 08:35:03 +0100 <[exa]> +1 for coercefield experience
2026-03-11 08:34:38 +0100 <humasect> eh well. learn on the battlefield
2026-03-11 08:34:17 +0100 <dminuoso> This is how you know you're in #haskell
2026-03-11 08:34:10 +0100 <dminuoso> Beginner trying to grasp Functor and Maybe already dabbling with TypeApplication :-)
2026-03-11 08:33:31 +0100 <mesaoptimizer> `coerce` without enabling the `TypeApplication` extension seems almost unusable at least in my experience
2026-03-11 08:33:06 +0100 <mesaoptimizer> I see. I was using type applications with it
2026-03-11 08:32:15 +0100 <dminuoso> Explicit unpacking/repacking is just better most of the time.
2026-03-11 08:31:56 +0100 <dminuoso> Oh it's not dangerous, but I'd be willing to say that almost any use of `coerce` in your first year is probably a smell
2026-03-11 08:31:27 +0100 <dminuoso> mesaoptimizer: It's not really about "understanding" coercions, just that they dont fit into *any* idiomatic code for when you bootstrap yourself into the language.
2026-03-11 08:31:23 +0100 <mesaoptimizer> dminuoso: hmm, perhaps you have a better idea than I do of how footgunny `Data.Coerce` is. I do know that I can't use it if I enable `Safe` language pragma
2026-03-11 08:31:11 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-03-11 08:30:25 +0100 <[exa]> :)