Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→
Page 1 .. 518 519 520 521 522 523 524 525 526 527 528 .. 5022
502,152 events total
2020-10-08 22:37:19 <proofofme> or less-trivial Haskell, I should say
2020-10-08 22:37:31 <dminuoso> proofofme: My personal recommendation, stay clear of Category Theory then.
2020-10-08 22:37:36 conal joins (~conal@64.71.133.70)
2020-10-08 22:37:45 <proofofme> why's that?
2020-10-08 22:37:50 × chaosmasttter quits (~chaosmast@p200300c4a70b40010854fe5f0255a133.dip0.t-ipconnect.de) (Quit: WeeChat 2.9)
2020-10-08 22:37:50 <koz_> maralorn: This. I especially feel that a lot of people (especially learners) fixate too much on what a monad _is_, and less on 'why we care in the first place'.
2020-10-08 22:37:55 _ashbreeze_ joins (~mark@184-157-33-36.dyn.centurytel.net)
2020-10-08 22:38:07 <dminuoso> Unless you do this out of personal enjoyment for CT itself, CT has very little bang for bucks in terms of programming.
2020-10-08 22:38:28 <proofofme> I want to learn CT, abstract algebra, and number theory for my own sake
2020-10-08 22:38:28 <maralorn> koz_: That also.
2020-10-08 22:38:41 <dminuoso> While some of the really advanced folks can use it in some particular situations, I dont think one can appreciate even half the stuff unless you happen to be well versed in multiple fields of maths already
2020-10-08 22:39:02 <dminuoso> proofofme: In that case, dont mind me!
2020-10-08 22:39:11 <dminuoso> Just wanted to make sure you didn't fall into the trap I (and many others) did. :)
2020-10-08 22:39:28 <maralorn> koz_: But unless someone can enlighten me in the error of my ways. It now feels like that is not even something a mathematician would say.
2020-10-08 22:39:42 <dminuoso> Because I learned category theory for the sake of having an easier entry into Haskell. Turned out, I understood the joke `a monad is just..`, went to Haskell, and didn't even understand how to use IO at all.
2020-10-08 22:39:45 <dminuoso> (True story)
2020-10-08 22:39:58 <dolio> What isn't?
2020-10-08 22:40:09 <proofofme> haha I feel that
2020-10-08 22:40:39 <maralorn> dolio: "Monads are Monoids in the category of Endofunctors"
2020-10-08 22:41:26 <dolio> maralorn: It's a one-off sentence in Categories for the Working Mathematician, I think.
2020-10-08 22:41:35 × Jesin quits (~Jesin@pool-72-66-101-18.washdc.fios.verizon.net) (Quit: Leaving)
2020-10-08 22:41:46 <maralorn> Hm
2020-10-08 22:41:53 <dolio> And for some reason gets quoted all over.
2020-10-08 22:42:17 <maralorn> But what does "A Monoid in the category C" even mean?
2020-10-08 22:42:37 <dolio> I think it's quoted somewhere by Wadler, maybe, and that's why it's popular amongst programmers.
2020-10-08 22:42:57 <dminuoso> maralorn: A monoid (or monoid object) (M, μ, η) in a monoidal category (C, ⊗, I) is an object M together with two morphisms
2020-10-08 22:43:09 <dminuoso> (I ruthlessly copy pasted it, but I would have said the same thing myself
2020-10-08 22:43:28 <dminuoso> (well followed by blahblablah(
2020-10-08 22:43:31 <maralorn> Ah, okay. Fair enough.
2020-10-08 22:43:40 <dolio> In MacLaine I think it comes at the end of explaining how it works.
2020-10-08 22:44:23 <dolio> And for Wadler it's a joke that doesn't actually explain anything.
2020-10-08 22:44:51 <monochrom> The real numbers are just the complete Archimedian ordered field. >:)
2020-10-08 22:44:52 <maralorn> Then the Wikipedia article is just exceptionally bad at making that point. It even has a [Citation needed] next to the claim …
2020-10-08 22:45:53 <maralorn> monochrom: Well that is how we defined them in my first semester, so I am okay with that.
2020-10-08 22:45:55 <dminuoso> maralorn, dolio: According to stackoverflow, the particular joking phrasing is actually from: http://james-iry.blogspot.com/2009/05/brief-incomplete-and-mostly-wrong.html
2020-10-08 22:46:07 <dminuoso> (With a fictional attribution to Wadler)
2020-10-08 22:46:45 <dolio> Oh, okay.
2020-10-08 22:46:45 <dminuoso> And I think that joke is what got it popular, but the joke is sometimes lost
2020-10-08 22:46:56 <monochrom> Any sufficiently insider joke is indistinguishable from sufficiently advanced knowledge.
2020-10-08 22:47:04 <dminuoso> monochrom: Haha true.
2020-10-08 22:48:23 <maralorn> That page doesn‘t load for me. :-(
2020-10-08 22:49:22 <monochrom> Learning monads is not easy. After successfully learning something challenging, people make jokes for relief. I'm sure this happens in every profession. I'm sure similar nerdy jokes are among accountants, lawyers, medical doctors, everything.
2020-10-08 22:50:17 <dolio> It seems like the irony of this discussion is that it's not really mathematicians saying it. It's programmers.
2020-10-08 22:50:24 <monochrom> But when such insider jokes leak out, they sound like words of deep wisdom to beginners, and beginners misbelieve that they must understand them rather than just go "haha" and take it easy.
2020-10-08 22:50:29 <maralorn> Yeah, there is an evolution of jokes about different math jokes which funnieness depends on your own skilllevel.
2020-10-08 22:50:43 <maralorn> First you don‘t even get it's a math joke and it's not funny.
2020-10-08 22:51:04 <dminuoso> I mean to be fair, the core essence of "a monad is just..." is very valuable and ever present in my head.
2020-10-08 22:51:14 <dminuoso> But it's not the category theory definition that I think about
2020-10-08 22:51:21 <maralorn> Later you know enough math, to understand it's a joke, but you don‘t know why, so you laugh with the others.
2020-10-08 22:51:36 <dminuoso> I rather have a visual/mental model of: https://gist.github.com/dminuoso/d5ab4ba5d8a5142dde9f4d4c736e3ecb
2020-10-08 22:51:55 <maralorn> Then you know barely enough math to understand the joke and you find it hilarious.
2020-10-08 22:52:14 <dminuoso> Just to address your comment about "this is not even something a mathematician would say"
2020-10-08 22:52:26 heebo joins (~user@cpc97956-croy24-2-0-cust20.19-2.cable.virginm.net)
2020-10-08 22:53:18 <maralorn> And some years later the knowledge required seems so basic, that you maybe laugh a little.
2020-10-08 22:54:10 <monochrom> So, like that one on smbc?
2020-10-08 22:54:13 × xsperry quits (~as@unaffiliated/xsperry) ()
2020-10-08 22:54:19 <maralorn> dminuoso: Well I was wrong about that. Apparently that sentence has a very precise meaning if you know monoidal categories and a generelized definition of monoid.
2020-10-08 22:54:39 <monochrom> "Did you know that every sum of two primes is greater than 2"
2020-10-08 22:54:43 <dolio> It's hard to believe I hadn't heard that quip before 2009, though.
2020-10-08 22:54:55 <dminuoso> maralorn: I like Saunders Mac Lanes definition more, but I'd rephrase it into:
2020-10-08 22:55:17 <dminuoso> A monad is a monoid in a monoidal category equipped with endofunctor composition as its tensor.
2020-10-08 22:55:26 <dminuoso> Err
2020-10-08 22:55:38 <dminuoso> A monad is a monoid in the monoidal category of endofunctors equipped with endofunctor composition as its tensor.
2020-10-08 22:55:54 <dolio> I'm going to guess it was only written down somewhere permanent in 2009.
2020-10-08 22:55:55 × ryansmccoy quits (~ryansmcco@193.37.254.27) (Ping timeout: 260 seconds)
2020-10-08 22:56:02 × cosimone quits (~cosimone@93-47-228-249.ip115.fastwebnet.it) (Quit: cosimone)
2020-10-08 22:56:04 <dminuoso> But really, this is neither the conclusion of some large chunk of text, nor is it a particularly funny joke
2020-10-08 22:56:12 <dminuoso> So it's pretty valueless
2020-10-08 22:56:27 ryansmccoy joins (~ryansmcco@193.37.254.27)
2020-10-08 22:56:54 <heebo> if im using ghcup , hie , haskell language server: whats the best build tool to use , stack or cabal?
2020-10-08 22:56:59 Jesin joins (~Jesin@pool-72-66-101-18.washdc.fios.verizon.net)
2020-10-08 22:57:00 <dminuoso> As programmers, I think the kleisli category route to think of programmers is a bit more natural to think of.
2020-10-08 22:57:05 <hpc> the slightly funnier version goes something like "a monad is a monad in the 2-category of categories"
2020-10-08 22:57:07 <monochrom> cabal
2020-10-08 22:57:35 <maralorn> dminuoso: Yeah, that gist makes it very clear. I also think for definition I prefer join over bind.
2020-10-08 22:58:08 × zacts quits (~zacts@dragora/developer/zacts) (Quit: leaving)
2020-10-08 22:58:12 × kreetx quits (~markus@228-90-235-80.dyn.estpak.ee) (Quit: leaving)
2020-10-08 22:58:28 <dminuoso> I think bind is better to think of.
2020-10-08 22:58:45 <dminuoso> Then you can think of (<=<) as the principle operation of monads
2020-10-08 22:58:52 <dminuoso> You get some pretty elegant laws with that
2020-10-08 22:59:09 <monochrom> I like them both. Both have helped me greatly.
2020-10-08 22:59:14 <dminuoso> Assoc: f <=< (g <=< h) = (f <=< g) <=< h
2020-10-08 22:59:25 <dminuoso> Identity: f <=< return = return <=< f = f
2020-10-08 22:59:34 <maralorn> heebo: Note a) hie is deprecated in favor of haskell-language-server and b) the choice of your build tool is largely orthogonal to the rest of the setup. But c) yeah, I'd also say, cabal.
2020-10-08 22:59:57 <dminuoso> (All these definitions are of course equivalent)
2020-10-08 23:00:16 <heebo> thanks, just getting back into things. ill remove my hie setup in favour of hie
2020-10-08 23:00:16 <monochrom> Oh, my consideration is simply "if you use stack, you would not be with ghcup in the first place"
2020-10-08 23:00:29 <heebo> er haskell -language server i mean
2020-10-08 23:00:41 <maralorn> Well that is the monoid Wikipedia claims makes a monad a monoid …
2020-10-08 23:01:05 conal_ joins (~conal@66.115.157.46)
2020-10-08 23:01:09 <heebo> monochrom: i only used ghcup because its the easiest way to install hls
2020-10-08 23:01:09 <dminuoso> maralorn: At the very core, monads and monoids are deeply related :)
2020-10-08 23:01:18 <dminuoso> nclatlab has a slightly different take again
2020-10-08 23:01:19 <monochrom> Ah
2020-10-08 23:01:44 <dminuoso> As a handwaving idea: A monad is a structure that is a lot like a monoid, but that lives in a bicategory rather than a monoidal category. In other words, the concept of a monad is a vertical categorification of that of a monoid.
2020-10-08 23:02:15 <dminuoso> Which connects to hpc's joke earlier
2020-10-08 23:02:18 <heebo> but i'll get back into cabal i always felt a little uncomfortable with the fact that stack sits on top of cabal and you end up having to maintain cabal files even with a stack setup
2020-10-08 23:02:39 heebo parts (~user@cpc97956-croy24-2-0-cust20.19-2.cable.virginm.net) ("ERC (IRC client for Emacs 26.2)")
2020-10-08 23:02:41 <phadej> cabal-install /= Cabal
2020-10-08 23:02:47 × conal quits (~conal@64.71.133.70) (Ping timeout: 240 seconds)

All times are in UTC.