Logs: freenode/#haskell
| 2020-10-02 15:01:22 | <ski> | (btw, neither semigroups, monoids, nor groups, need to have a commutative combination/composition operator) |
| 2020-10-02 15:01:40 | × | caasih quits (sid13241@gateway/web/irccloud.com/x-teuwvboxinwdshpz) (Ping timeout: 244 seconds) |
| 2020-10-02 15:01:46 | <Guest18> | I see |
| 2020-10-02 15:02:08 | <Guest18> | Interesting, I wish I remembered more group theory then.. |
| 2020-10-02 15:02:20 | <Guest18> | I need to relearn it |
| 2020-10-02 15:02:30 | → | cpressey joins (~cpressey@88.144.95.167) |
| 2020-10-02 15:02:38 | <ski> | well, natural numbers form a rig ("a ring that doen't need to have an additive inverse, negation") |
| 2020-10-02 15:03:25 | <ski> | (sometimes aka "semiring") |
| 2020-10-02 15:03:29 | → | caasih joins (sid13241@gateway/web/irccloud.com/x-hlizsalbvmrkznfg) |
| 2020-10-02 15:03:30 | → | st8less joins (~st8less@2603:a060:11fd:0:f15a:c857:2711:378c) |
| 2020-10-02 15:04:38 | × | snakemasterflex quits (~snakemast@213.100.206.23) (Ping timeout: 258 seconds) |
| 2020-10-02 15:06:43 | × | ft quits (~ft@shell.chaostreff-dortmund.de) (Ping timeout: 246 seconds) |
| 2020-10-02 15:06:52 | <ski> | Guest18 : if you want a quick and short tutorial on monads, i'd suggest "What the hell are Monads?" by Noel Winstanley in 1999 (one of the first monad tutorials) at <http://www-users.mat.uni.torun.pl/~fly/materialy/fp/haskell-doc/Monads.html> |
| 2020-10-02 15:07:14 | <ski> | Guest18 : it's by no means complete, but could give you an idea of what they're about |
| 2020-10-02 15:07:35 | → | ft joins (~ft@shell.chaostreff-dortmund.de) |
| 2020-10-02 15:08:28 | × | Lord_of_Life quits (~Lord@unaffiliated/lord-of-life/x-0885362) (Ping timeout: 258 seconds) |
| 2020-10-02 15:12:46 | × | FreeBirdLjj quits (~freebirdl@240e:388:4f41:dc00:6980:7e19:3f7b:9844) () |
| 2020-10-02 15:13:02 | → | cr3 joins (~cr3@192-222-143-195.qc.cable.ebox.net) |
| 2020-10-02 15:13:41 | <dolio> | Monads are one of the ways mathematicians talk about algebra, too. And it's actually similar to what Haskell programmers use them for. |
| 2020-10-02 15:14:14 | <dolio> | There is a monad that characterises the 'extra operations' on top of sets that an algebra (group, ring, etc.) has. |
| 2020-10-02 15:14:39 | → | spew joins (uid195861@gateway/web/irccloud.com/x-nmkiijbefgbkmaqa) |
| 2020-10-02 15:15:43 | × | toorevitimirp quits (~tooreviti@117.182.181.38) (Remote host closed the connection) |
| 2020-10-02 15:15:50 | <dolio> | And Haskell programmers often find it convenient to work in an 'extended language' that has operations (throw/catch, get/put, etc.) that don't exist in the 'pure' language (because it would be confusing for them to exist there). |
| 2020-10-02 15:16:10 | ski | . o O ( Let's use `do'-notation to talk about algebra. ) |
| 2020-10-02 15:18:38 | <dolio> | You could. There's at least one exact correspondence with monoids. |
| 2020-10-02 15:19:41 | <ski> | mhm ? |
| 2020-10-02 15:19:53 | <Guest18> | ski: so.. many.. things.. to bookmark |
| 2020-10-02 15:20:12 | × | borne quits (~fritjof@200116b86454500007933c164a08810c.dip.versatel-1u1.de) (Ping timeout: 260 seconds) |
| 2020-10-02 15:20:13 | <dolio> | Although I guess monoids are too plain for traditional algebra. Only category theorists care about those. |
| 2020-10-02 15:20:27 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 2020-10-02 15:21:24 | → | solonarv joins (~solonarv@astrasbourg-653-1-252-112.w92-161.abo.wanadoo.fr) |
| 2020-10-02 15:21:41 | → | yost3d joins (~yost3d@193.56.252.210) |
| 2020-10-02 15:22:04 | <dolio> | Monoids are what you get by having `zero :: Void` and `bit :: Bool` effects. |
| 2020-10-02 15:22:21 | × | cheater quits (~user@unaffiliated/cheater) (Quit: BitchX Official WWW Site -- http://www.bitchx.org/) |
| 2020-10-02 15:22:30 | <TMA> | I remember from my algebra course that monoids were glossed over in one of the lectures. They are merely a stepping stone to groups from that vantage point |
| 2020-10-02 15:22:47 | → | cheater joins (~user@unaffiliated/cheater) |
| 2020-10-02 15:23:40 | → | constR joins (uid58205@gateway/web/irccloud.com/x-ljcnzijchvmxodjj) |
| 2020-10-02 15:23:49 | <ski> | dolio : <https://en.wikipedia.org/wiki/Associative_algebra> ? |
| 2020-10-02 15:24:29 | <dolio> | Oh yeah, they need to satisfy some equations, of course. |
| 2020-10-02 15:24:44 | → | Tuplanolla joins (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) |
| 2020-10-02 15:25:48 | <ski> | these are just monoid objects in the monoidal category of vector spaces (with tensor), aiui |
| 2020-10-02 15:26:13 | → | p-core joins (~Thunderbi@2001:718:1e03:5128:2ab7:7f35:48a1:8515) |
| 2020-10-02 15:26:25 | × | justanotheruser quits (~justanoth@unaffiliated/justanotheruser) (Ping timeout: 240 seconds) |
| 2020-10-02 15:26:38 | <dolio> | Well, there's probably a lot of examples like that. |
| 2020-10-02 15:26:50 | <dolio> | I meant specifically monoids in Set. |
| 2020-10-02 15:27:32 | <ski> | TMA : endomorphisms over a structure naturally form a monoid, i suppose. for an abelian group, you even get a ring |
| 2020-10-02 15:27:37 | <ski> | ok |
| 2020-10-02 15:27:52 | → | fresheyeball joins (~isaac@c-71-237-105-37.hsd1.co.comcast.net) |
| 2020-10-02 15:29:22 | <dolio> | I think traditional algebraists thought that monoids in set were too boring to be studied, but there are actually interesting things to say about them. |
| 2020-10-02 15:29:54 | × | Franciman quits (~francesco@host-212-171-42-250.retail.telecomitalia.it) (Quit: Leaving) |
| 2020-10-02 15:29:59 | <ski> | what about more restricted classes, that might not be as wild ? |
| 2020-10-02 15:30:21 | <ski> | like cancellative monoids, idempotent monoids, .. |
| 2020-10-02 15:30:24 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-10-02 15:30:40 | <dolio> | But, like, rings are monoid objects in Ab. And I think abelian groups are monoid objects in Grp. |
| 2020-10-02 15:30:58 | → | snakemasterflex joins (~snakemast@213.100.206.23) |
| 2020-10-02 15:31:22 | × | Saukk quits (~Saukk@2001:998:f1:3966:96a6:dee2:2e9:fdf3) (Remote host closed the connection) |
| 2020-10-02 15:32:23 | → | bitmapper joins (uid464869@gateway/web/irccloud.com/x-tarhbdjsvwboswmi) |
| 2020-10-02 15:32:38 | × | madjestic quits (~madjestic@86-88-72-244.fixed.kpn.net) (Ping timeout: 256 seconds) |
| 2020-10-02 15:33:03 | <dolio> | Oh, maybe it needs to be a group object for the latter. |
| 2020-10-02 15:33:26 | ← | coot parts (~coot@37.30.49.34.nat.umts.dynamic.t-mobile.pl) () |
| 2020-10-02 15:33:27 | <ski> | hm, perhaps it had something to do with the Erlangen program focusing on automorphisms and isomorphisms, rather than on more general endomorphisms and homomorphisms ? |
| 2020-10-02 15:34:15 | <dolio> | I'm not clear on the details. I just know there's someone on the category zulip whose work is about monoids. |
| 2020-10-02 15:34:35 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds) |
| 2020-10-02 15:35:18 | <dolio> | I think at least some of that is that monoids are a special case of categories, so a lot of things you can do with categories have special properties when you look at just doing them with monoids. |
| 2020-10-02 15:35:24 | → | coot joins (~coot@37.30.49.34.nat.umts.dynamic.t-mobile.pl) |
| 2020-10-02 15:35:40 | × | GyroW quits (~GyroW@unaffiliated/gyrow) (Quit: Someone ate my pie) |
| 2020-10-02 15:35:41 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 258 seconds) |
| 2020-10-02 15:36:02 | <dolio> | Like, "what special properties do presheaves on monoids have"? |
| 2020-10-02 15:36:25 | <ski> | hm, `mempty = case zero of' and `x <> y = if bit then y else x' ? |
| 2020-10-02 15:36:36 | × | dhil quits (~dhil@11.29.39.217.dyn.plus.net) (Ping timeout: 256 seconds) |
| 2020-10-02 15:36:42 | <dolio> | Right. |
| 2020-10-02 15:36:48 | → | GyroW joins (~GyroW@d54c03e98.access.telenet.be) |
| 2020-10-02 15:36:48 | × | GyroW quits (~GyroW@d54c03e98.access.telenet.be) (Changing host) |
| 2020-10-02 15:36:48 | → | GyroW joins (~GyroW@unaffiliated/gyrow) |
| 2020-10-02 15:36:59 | × | mananamenos quits (~mananamen@84.122.202.215.dyn.user.ono.com) (Read error: Connection reset by peer) |
| 2020-10-02 15:37:59 | → | madjestic joins (~madjestic@86-88-72-244.fixed.kpn.net) |
| 2020-10-02 15:38:09 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-10-02 15:38:32 | <ski> | and then `x = if bit then case zero of else x',`if bit then x else case zero of = x',`if bit then if bit then x else y else z = if bit then x else if bit then y else z' |
| 2020-10-02 15:38:33 | <dolio> | MonadPlus is basically the theory of monoids. |
| 2020-10-02 15:38:55 | <ski> | "theory", in a Lawvere sense ? |
| 2020-10-02 15:39:45 | <dolio> | Yeah. Probably only if you pick the right choice of the laws people have for it. |
| 2020-10-02 15:39:56 | × | chappi quits (~swaroop@157.45.23.171) (Ping timeout: 256 seconds) |
| 2020-10-02 15:40:32 | <dolio> | Like left/right cancellation. |
| 2020-10-02 15:40:42 | <Guest18> | Say I want to make a safeDiv function that returns a string if the divider is 0, the result otherwise. Is this the way to do it? safeDiv :: (Num a, Fractional a, Eq a) => a -> a -> Either a String |
| 2020-10-02 15:40:42 | <Guest18> | safeDiv _ 0 = Right "Ooops!" |
| 2020-10-02 15:40:43 | <Guest18> | safeDiv x y = Left $ x/y |
| 2020-10-02 15:40:50 | <Guest18> | Like, is there a better way here? |
| 2020-10-02 15:40:57 | → | dan64- joins (~dan64@dannyadam.com) |
| 2020-10-02 15:41:17 | <Guest18> | I don't want to use Maybe, but I want to learn how Either functions |
| 2020-10-02 15:41:28 | <ski> | i'd flip the order of the alternatives (and not use `$') |
| 2020-10-02 15:42:03 | <ski> | also .. `"Ooops!"' is not a that informative failure condition |
| 2020-10-02 15:42:09 | <Guest18> | Why flip the order? |
| 2020-10-02 15:42:28 | <ski> | because then one can use `fmap' (from `Functor') on the `a' in the result (if present) |
| 2020-10-02 15:42:41 | <Guest18> | I know it isn't, just wrote it as an exercise, and wanted it to be a string |
| 2020-10-02 15:42:45 | × | dan64 quits (~dan64@dannyadam.com) (Ping timeout: 240 seconds) |
| 2020-10-02 15:42:51 | <cpressey> | Guest18: by convention, Left contains an error value and Right contains the "right answer". |
| 2020-10-02 15:42:54 | <ski> | @quote stark |
| 2020-10-02 15:42:54 | <lambdabot> | AlanPerlis says: The string is a stark data structure and everywhere it is passed there is much duplication of process. It is a perfect vehicle for hiding information. |
| 2020-10-02 15:43:19 | <cpressey> | (when Either is used this way) |
| 2020-10-02 15:43:46 | <ski> | (i'd generally try to avoid using `String's to represent failure conditions) |
All times are in UTC.