Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→ 1,804,202 events total
2021-08-21 00:28:12 <lechner> keep the ones you like
2021-08-21 00:28:20 silver_ joins (~silver@37.214.31.4)
2021-08-21 00:28:36 <monochrom> I used to think, the book's purpose is to be slow-paced, step-by-step, so it may warrant 1000 pages, maybe it's a benefit. I haven't really checked myself.
2021-08-21 00:29:23 <monochrom> By now, seeing someone who had struggled during learning Haskell, now reporting what worked and what didn't, and the 1000-page book was one of the didn'ts and is roasted like this, well, that changes my mind.
2021-08-21 00:29:26 × lbseale quits (~lbseale@user/ep1ctetus) (Read error: Connection reset by peer)
2021-08-21 00:29:53 × retroid_ quits (~retro@5ec19a54.skybroadband.com) (Ping timeout: 258 seconds)
2021-08-21 00:30:03 × Gurkenglas quits (~Gurkengla@dslb-002-203-144-156.002.203.pools.vodafone-ip.de) (Ping timeout: 268 seconds)
2021-08-21 00:30:07 <Lycurgus> i was gonna give away my great books my dad gave me in 6th grade and the 15th edition of brittanica but then i found their value was about $2K
2021-08-21 00:31:06 <Lycurgus> i don't think you can learn something like haskell any other way than doing
2021-08-21 00:31:28 <lechner> i am not sure even that works
2021-08-21 00:31:38 <Lycurgus> langs in general except for the super simple immersion is the way
2021-08-21 00:32:01 <Lycurgus> well yeah hs and cl have that in common
2021-08-21 00:32:11 <Lycurgus> haskell more than lisp
2021-08-21 00:32:46 <Lycurgus> most langs don't dare not have fixed largely unchanging baselines
2021-08-21 00:33:19 <monochrom> It is a human nature to assume that every need is to be resolved by more consumption.
2021-08-21 00:33:51 <monochrom> If someone doesn't understand monads, they think "what more should I read/watch", not "what more should I practice".
2021-08-21 00:34:16 <monochrom> If someone feels sick, they think "what should I eat to cure it", not "what should I stop eating to cure it".
2021-08-21 00:35:00 <lechner> one night with Haskell will make a strong man humble
2021-08-21 00:35:07 <Lycurgus> that seems to be an idee fix with you, but I think in general there's a greater diversity
2021-08-21 00:35:13 <monochrom> Cease the means of consumption.
2021-08-21 00:35:27 <Lycurgus> there will be people who's first lang is hs
2021-08-21 00:35:52 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 252 seconds)
2021-08-21 00:35:59 <Lycurgus> under the right circumstances it will seem natural and easy to them
2021-08-21 00:36:46 <lechner> to those who do not drop out?
2021-08-21 00:36:53 <Lycurgus> also people with a really wide experience rather than the usual algol-like suspects are not gonna try to force haskell into earlier experiences
2021-08-21 00:37:48 <Lycurgus> for example say a strong music theory major
2021-08-21 00:37:56 <Lycurgus> have seen that
2021-08-21 00:38:17 <lechner> but a haskell army?
2021-08-21 00:39:17 <Lycurgus> needs to some other kinda collective
2021-08-21 00:39:36 <Lycurgus> vanguard oder
2021-08-21 00:39:54 <lechner> or a secret cabal?
2021-08-21 00:40:21 <Lycurgus> :)
2021-08-21 00:40:52 <Cajun> monochrom: it may be difficult for someone who doesnt understand monads to think of a way to use it that doesnt involve what the book has already given them. i found reading from more sources that offered other views to quaint my understanding until it finally clicked. you need to know enough about them before you can use them to learn more about
2021-08-21 00:40:53 <Cajun> them, essentially. at least this is my experience
2021-08-21 00:42:15 <monochrom> But I was not criticizing that.
2021-08-21 00:43:02 <Cajun> ah it was just a statement not a point of discussion, this is what happens when i stumble into a convo :P
2021-08-21 00:43:16 × gianfranco quits (~gianfranc@181.28.82.192) (Quit: Client closed)
2021-08-21 00:43:27 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
2021-08-21 00:46:26 <monochrom> Either question you ask, you will have to find someone to answer, or Google for an answer. You can't answer either question yourself. I grant that.
2021-08-21 00:46:58 <monochrom> But there is still a difference between googling for more "intuition, analogies" and googling for more examples.
2021-08-21 00:48:01 × tommd quits (~tommd@75-164-130-101.ptld.qwest.net) (Ping timeout: 248 seconds)
2021-08-21 00:48:13 <monochrom> Especially if, after seeing the beginning of an example, you go "hold on, don't show my all your code yet, let me try to write some of it myself, then compare with yours". Now that's respectable practicing.
2021-08-21 00:48:37 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-08-21 00:49:15 <Cajun> i like to predict whats next/predict the result of a function before seeing it, its quick enough never to be a pain because it doesnt require writing/rewriting lines of code
2021-08-21 00:49:28 <monochrom> Yes that too.
2021-08-21 00:50:38 <Cajun> although i do entirely agree that googling the "right" and "wrong" thing is an inconvenience. its also doesnt help many sources use the same examples (Maybe monad, Identity monad) which doesnt always help too much
2021-08-21 00:50:56 <Cajun> (seeing the same example multiple times doesnt help too much, to clarify)
2021-08-21 00:58:36 Lycurgus thinks the most cogent explanation of what a hs monad is "a mechanism haskell uses to effect referential transparency"
2021-08-21 01:01:27 <Lycurgus> s/is/is is/
2021-08-21 01:02:08 <lechner> i am not sure i would use the words transparency and monad in the same sentence
2021-08-21 01:02:31 <Lycurgus> sounds like a criticism
2021-08-21 01:02:46 <lechner> of monads, maybe
2021-08-21 01:03:05 <lechner> or just a case of cynical friday
2021-08-21 01:03:16 tommd joins (~tommd@75-164-130-101.ptld.qwest.net)
2021-08-21 01:03:23 <Cajun> i liked the explanation given on that one stack overflow page <https://stackoverflow.com/questions/44965/what-is-a-monad>
2021-08-21 01:04:00 <Cajun> lechner: why not cynical sunday, rolls off the tongue better :P
2021-08-21 01:04:49 <monochrom> You know what, "monad" is also vacuous for mathematicians. You have to have seen the definition, or else you couldn't even start to guess.
2021-08-21 01:05:30 <lechner> Cajun: based on some primitive stastistics, cases pile up on fridays
2021-08-21 01:05:41 <monochrom> whereas for example "Minkowski transfrom" is somewhat guessable, "ah, a function defined by Minkowski in some paper"
2021-08-21 01:05:51 <Lycurgus> it's like 'functor' except more so, monads are ancient
2021-08-21 01:06:07 <Lycurgus> functors are 20th century
2021-08-21 01:06:15 <lechner> Cajun: also, which one of the 46 (!) answers?
2021-08-21 01:06:18 <monochrom> And you know what, "computation builder" is just as vacuous.
2021-08-21 01:06:44 <Cajun> lechner: the top one
2021-08-21 01:07:08 <monochrom> "chain" is a good word though. I wouldn't object "computation chainer" if you're pressed for a 5-second elevator pitch.
2021-08-21 01:07:30 <Cajun> monochom: yeah it still doesnt mean much, but at least you know it does something (some kind of computation in some way by "building" the chain of binds) rather than just "monad"
2021-08-21 01:07:47 <Cajun> yeah i like computation chainer better, makes more sense
2021-08-21 01:08:29 <monochrom> But only for a 5-second pitch.
2021-08-21 01:09:03 <monochrom> For 30 seconds, "chain" is still suboptimal. It's just a whee bit better than "build".
2021-08-21 01:09:06 <lechner> to me, a monad sequences operations. is that right?
2021-08-21 01:09:46 <Cajun> i like thinking of it as a chain but sequence is probably more in line with how it looks (feeds from top to bottom in sequence)
2021-08-21 01:10:03 <Lycurgus> a less pretentious term would have been more fortunate in retrospect but I guess it was already set out by saunders maclane et al
2021-08-21 01:10:08 <monochrom> In "f . g", f and g are computations too, "." "builds" and "chains" too. Yet "." only gives you an arrow, not a monad. It is "$" who gives you a monad (the Identity monad).
2021-08-21 01:10:40 <monochrom> But "chain" is a whee bit better than "build" because <|> also builds, but not chains.
2021-08-21 01:10:51 <lechner> i meant: impose an order of evaluation
2021-08-21 01:11:23 <lechner> or is that wrong?
2021-08-21 01:11:33 <Cajun> Lycurgus: i recall simon peyton jones mentioning that the biggest regret is the scary name they gave monads rather than something more warm and cozy. its in some talk somewhere
2021-08-21 01:11:46 <monochrom> The 30-second pitch I now use is "callback-style programming".
2021-08-21 01:12:17 <Lycurgus> Cajun, yeah i think i know the one you mean
2021-08-21 01:12:34 <lechner> monads are asynchronous?
2021-08-21 01:13:14 <monochrom> Generally whatever story you come up with, you need to fight the confirmation bias. Programmers have proved to be undesirably susceptible to the confirmation bias.
2021-08-21 01:13:49 × Lycurgus quits (~juan@cpe-45-46-140-49.buffalo.res.rr.com) (Quit: Exeunt)
2021-08-21 01:14:05 <monochrom> Don't just ask yourself "do all monad examples fit my story?". Also ask yourself "how about examples of non-monads? if they also fit my story, then my story is bunk".
2021-08-21 01:14:42 <c_wraith> monads are joining-precisely-the-way-I'm-thinking things
2021-08-21 01:18:12 <monochrom> This is why 99.9% of wordings I've seen are all bunk. "monad as computation" - there are parser types (clearly computations, no?) that are not monads, only arrows or alternatives. "monad as container" - ZipList is a non-monad container, again only applicative. "builds" - <|> also builds. "chains" - >>> also chains.
2021-08-21 01:18:40 × Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 240 seconds)
2021-08-21 01:18:52 × tommd quits (~tommd@75-164-130-101.ptld.qwest.net) (Ping timeout: 250 seconds)
2021-08-21 01:19:08 <c_wraith> my first intuition for monads was actually "makes do blocks work how you'd expect"
2021-08-21 01:19:56 <c_wraith> which is... very circular.
2021-08-21 01:21:07 Erutuon joins (~Erutuon@user/erutuon)
2021-08-21 01:21:30 <monochrom> I think it is on the right track, under the following condition...
2021-08-21 01:21:49 <Cajun> the thing that really put my head through a loop was functions like "get" that dont take parameters (in do notation at least. doesnt it effectively take the rest of the computation as the parameter?)
2021-08-21 01:22:14 <monochrom> Have you seen https://wiki.haskell.org/Monad_laws ? Especially the do-notation versions of the laws?
2021-08-21 01:22:16 <c_wraith> Yeah, there's a post on Dan Piponi's blog about how you can look at monads as doing that.
2021-08-21 01:22:46 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 250 seconds)
2021-08-21 01:23:10 <monochrom> If your "how do blocks works" includes expecting the equivalence of those various ways of writing do-blocks, then you already know monads.
2021-08-21 01:23:33 <c_wraith> yeah, those were part of my mental model of do blocks.
2021-08-21 01:24:28 × Teacup quits (~teacup@user/teacup) (Quit: Teacup)
2021-08-21 01:26:51 Teacup joins (~teacup@user/teacup)
2021-08-21 01:30:52 × t0zy quits (~t0zy@49.207.220.61) (Ping timeout: 252 seconds)

All times are in UTC.