Logs: freenode/#haskell
| 2021-05-07 11:30:54 | → | ddellacosta joins (~ddellacos@ool-44c73afa.dyn.optonline.net) |
| 2021-05-07 11:32:07 | × | Pickchea quits (~private@unaffiliated/pickchea) (Ping timeout: 252 seconds) |
| 2021-05-07 11:34:09 | <cub3s_> | dminuoso, i will read this, thank you |
| 2021-05-07 11:34:18 | <cub3s_> | (although it seems they never got around to part 3) |
| 2021-05-07 11:34:30 | → | indomitable joins (~indomitab@gateway/tor-sasl/indomitable) |
| 2021-05-07 11:34:41 | <cub3s_> | part 2 covers the nix-style stuff. this will be good to know |
| 2021-05-07 11:35:15 | → | _xft0 joins (~jaroslawj@185.234.208.208.r.toneticgroup.pl) |
| 2021-05-07 11:35:17 | × | ddellacosta quits (~ddellacos@ool-44c73afa.dyn.optonline.net) (Ping timeout: 260 seconds) |
| 2021-05-07 11:38:30 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
| 2021-05-07 11:39:38 | <indomitable> | is there a common sense explanation for a monad i might actually remember the next time i try to do functional things |
| 2021-05-07 11:39:47 | <indomitable> | and yes i know the joke |
| 2021-05-07 11:40:13 | <merijn> | Depending on your definition of "common sense": no |
| 2021-05-07 11:40:31 | <merijn> | The laws *are* the explanation, but understanding that is the tricky part |
| 2021-05-07 11:41:08 | <merijn> | indomitable: It's like trying to explain math abstractions (well it *is* explaining abstractions) |
| 2021-05-07 11:41:18 | <indomitable> | yes, i do that all the time |
| 2021-05-07 11:41:45 | <indomitable> | i don't see why monads are some magical exception to this rule, there has to be a better way of remembering what it is than memorizing it |
| 2021-05-07 11:42:00 | <merijn> | indomitable: You can't "explain" "an associative operation", because the definition *is* the explanation "a + (b + c) = (a + b) + c" |
| 2021-05-07 11:42:01 | <indomitable> | is it less intuitive than quantum theory? i mean come on |
| 2021-05-07 11:42:07 | <indomitable> | you definitely can |
| 2021-05-07 11:42:14 | <indomitable> | but not without a pedagogical background i guess |
| 2021-05-07 11:42:26 | <indomitable> | dumbing things down is an art unto itself |
| 2021-05-07 11:42:34 | <merijn> | indomitable: You can't, but you don't teach things from the abstraction |
| 2021-05-07 11:42:48 | <merijn> | you instead show examples and then show how those represent the abstraction |
| 2021-05-07 11:43:02 | <merijn> | The abstraction can, by definition, not be made less abstract |
| 2021-05-07 11:43:15 | <indomitable> | depending on your definition of abstract |
| 2021-05-07 11:43:16 | <indomitable> | :P |
| 2021-05-07 11:43:18 | <merijn> | The way you explain monads is "show a bunch of things, then show that they're monads" |
| 2021-05-07 11:43:24 | <merijn> | indomitable: The math definition |
| 2021-05-07 11:43:29 | <indomitable> | that that seems futile |
| 2021-05-07 11:43:35 | × | wonko7 quits (~wonko7@62.115.229.50) (Ping timeout: 265 seconds) |
| 2021-05-07 11:43:40 | <merijn> | indomitable: Any specific example is necessarily more specific than the actual thing |
| 2021-05-07 11:44:01 | <indomitable> | an example doesn't have to be specific, and often an abstract example can show how things relate better than a specific one |
| 2021-05-07 11:44:05 | → | nut joins (~nut@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
| 2021-05-07 11:44:11 | <indomitable> | human brains do not necessarily act logically in their learning process |
| 2021-05-07 11:44:18 | <merijn> | indomitable: See my favourite quote: |
| 2021-05-07 11:44:20 | <merijn> | Suppose that you want to teach the 'cat' concept to a very young child. Do you explain that a cat is a relatively small, primarily carnivorous mammal with retractible claws, a distinctive sonic output, etc.? I'll bet not. You probably show the kid a lot of different cats, saying 'kitty' each time, until it gets the idea. To put it more generally, generalizations are best made by abstraction from |
| 2021-05-07 11:44:26 | <merijn> | experience. |
| 2021-05-07 11:44:26 | → | frozenErebus joins (~frozenEre@37.231.244.249) |
| 2021-05-07 11:44:28 | <merijn> | - R. P. Boas (Can we make mathematics intelligible?, American Mathematical Monthly 88 (1981), pp. 727-731) |
| 2021-05-07 11:44:39 | <indomitable> | i'm going to assume his end-answer was "no" |
| 2021-05-07 11:44:41 | × | mrchampion quits (~mrchampio@38.18.109.23) (Ping timeout: 240 seconds) |
| 2021-05-07 11:45:29 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:3c82:1c53:1e38:e2d9) |
| 2021-05-07 11:45:53 | <merijn> | indomitable: You ask "is there a common sense explanation", I say no, because even absolutely confusing, nonsensical things can be monads (see the Tardis monad). Anything that is more concrete/specific than the laws hides those parts of the definition. |
| 2021-05-07 11:45:57 | → | Xraell joins (~xraell@45.157.15.145) |
| 2021-05-07 11:46:24 | <indomitable> | i'm going to interpret that as "I don't know a way to do so" and leave the assumptions out of it |
| 2021-05-07 11:46:27 | <merijn> | indomitable: You can certainly study more specific examples first and then form your own intuitions from there. But any specific example will not be the thing |
| 2021-05-07 11:46:32 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:3c82:1c53:1e38:e2d9) (Client Quit) |
| 2021-05-07 11:46:57 | <indomitable> | i've explained more complicated things (and had them explained to me) in nice abstract but still relatable ways, i find it hard to believe that this is an exception to the rule |
| 2021-05-07 11:47:00 | <merijn> | indomitable: It's not "I don't know a way to do so" this is a matter of "the map is not the territory" |
| 2021-05-07 11:47:13 | <indomitable> | no one said the map is the territory |
| 2021-05-07 11:47:43 | <indomitable> | this is a straw-man. it's ok not to know a way to do a thing. it's not a criticism of you or your skills that you can't solve this and as a result have taken a rather aggressive stance on its... doability |
| 2021-05-07 11:48:05 | × | kritzefitz quits (~kritzefit@2003:5b:203b:200::10:49) (Ping timeout: 250 seconds) |
| 2021-05-07 11:48:22 | <indomitable> | i will endeavour to find ways of easily explaining it and perhaps eliminating the word from my vocabulary entirely to better encourage its usage |
| 2021-05-07 11:48:31 | <indomitable> | (except in cases of reference) |
| 2021-05-07 11:49:01 | <lortabac> | indomitable: are you asking because you want to learn monads or because you are looking for a good way of teaching them? |
| 2021-05-07 11:49:07 | <indomitable> | lortabac, yes |
| 2021-05-07 11:49:19 | <indomitable> | two sides of the same coin as it were |
| 2021-05-07 11:49:28 | <indomitable> | my brain does not like super-abstract concepts it can't link to other concepts |
| 2021-05-07 11:49:44 | <indomitable> | i can memorize things but that's not a good thing to do, because my brain is not a hard drive, it is a neural network |
| 2021-05-07 11:49:51 | <indomitable> | and neural networks do not excel at memorizing definitions |
| 2021-05-07 11:49:58 | <lortabac> | ok so IIUC you don't know what monads are and you want to learn them |
| 2021-05-07 11:50:13 | <indomitable> | yes, but i only learn things properly when i can link them to other similar concepts |
| 2021-05-07 11:50:29 | <indomitable> | i find it hard to believe monads are as difficult to grasp as quantum theory |
| 2021-05-07 11:50:58 | <lortabac> | it's not that they are difficult |
| 2021-05-07 11:51:16 | <lortabac> | it's that the explanation is indeed the definition |
| 2021-05-07 11:51:20 | <indomitable> | i'm sure i've looked up and known the definition about 90 times |
| 2021-05-07 11:51:23 | <indomitable> | and none of those times has it stuck |
| 2021-05-07 11:51:25 | <indomitable> | it clearly isn't wrking |
| 2021-05-07 11:51:29 | × | justsomeguy quits (~justsomeg@unaffiliated/--/x-3805311) (Ping timeout: 246 seconds) |
| 2021-05-07 11:51:46 | <indomitable> | pattern recognition is failing because there's no other pattern in any aspect of my day to day life to link it to and enhance the signal for those neurons |
| 2021-05-07 11:51:52 | <lortabac> | Monad in Haskell is a type-class with a bunch of methods and some laws |
| 2021-05-07 11:52:18 | <lortabac> | if a type is an instance of the Monad class and respects the monad laws, it is a monad |
| 2021-05-07 11:52:38 | <indomitable> | yes, i am familiar with ducks and their many ways of identification |
| 2021-05-07 11:52:47 | <lortabac> | I guess what you are looking for is an intuition for when they are useful |
| 2021-05-07 11:52:58 | <indomitable> | hmm, that would be a more advanced point, but yes, part of the journey |
| 2021-05-07 11:53:07 | <indomitable> | first i want to be able to identify them |
| 2021-05-07 11:53:22 | <indomitable> | and i want to be able to easily explain to someone how to identify them |
| 2021-05-07 11:53:26 | → | Stanley00 joins (~stanley00@unaffiliated/stanley00) |
| 2021-05-07 11:53:27 | <indomitable> | if i can't teach it to a 6 year old i probably don't know it well |
| 2021-05-07 11:54:08 | <boxscape> | indomitable one concept you can link them to is function composition - with regular function composition, you can combine (b -> c) and (a -> b) to get (a -> c), but if m is a monad, you can take (b -> m c) and (a -> m b) and get (a -> m c), so it allows you to compose functions of the form (a -> m b) |
| 2021-05-07 11:54:58 | × | Stanley00 quits (~stanley00@unaffiliated/stanley00) (Read error: Connection reset by peer) |
| 2021-05-07 11:54:59 | → | Stanley|00 joins (~stanley00@unaffiliated/stanley00) |
| 2021-05-07 11:55:04 | <boxscape> | % :t (<=<) |
| 2021-05-07 11:55:04 | <yahb> | boxscape: Monad m => (b -> m c) -> (a -> m b) -> a -> m c |
| 2021-05-07 11:55:13 | <_xft0> | indomitable: have you seen a video where Graham Hutton is explaining this concept? it's available on YT (computerphile), maybe it will make things easier... |
| 2021-05-07 11:57:10 | <lortabac> | also, IMHO part of the confusion comes from the fact that monad is also a thing in category theory |
| 2021-05-07 11:57:31 | <lortabac> | but, unless you are specifically interested in maths, I would not bother with the mathematical definition for the moment |
| 2021-05-07 11:58:13 | × | cub3s_ quits (bifunc2@gateway/vpn/protonvpn/bifunc2) (Quit: Leaving) |
| 2021-05-07 11:59:02 | <indomitable> | xff0x, doesn't ring a bell, i'll go check it out later, thanks, might be instructive |
| 2021-05-07 11:59:12 | × | Stanley|00 quits (~stanley00@unaffiliated/stanley00) (Ping timeout: 240 seconds) |
| 2021-05-07 11:59:55 | <indomitable> | i don't have a strong math background, so some of the concepts take a long time to grasp well |
| 2021-05-07 11:59:59 | → | kritzefitz joins (~kritzefit@2003:5b:203b:200::10:49) |
| 2021-05-07 12:00:16 | <indomitable> | imagine if those 2500 hours of dota i played (terribly) were spent on reading maths or literally anything productive... oh how foolish the young are |
| 2021-05-07 12:00:25 | <lortabac> | personally the way I got an intuition for monads was by playing with the different instances (Maybe is probably the best one to start) |
| 2021-05-07 12:00:45 | <indomitable> | my motivation for figuring out monads better is to get started with railway oriented programming |
| 2021-05-07 12:00:48 | <indomitable> | and various other functional concepts |
| 2021-05-07 12:00:52 | <indomitable> | because now that i am old i recognize their value |
| 2021-05-07 12:00:59 | × | frozenErebus quits (~frozenEre@37.231.244.249) (Ping timeout: 265 seconds) |
| 2021-05-07 12:01:34 | <indomitable> | even javascript is an ok language if you apply (reasonably simple) functional principles to it |
| 2021-05-07 12:02:11 | <lortabac> | also, in practice you almost never write your own monads in application code, so in practice all you need to learn is what each monad instance does |
All times are in UTC.