No video

Why Do Monads Matter?

  Рет қаралды 30,603

London Haskell

London Haskell

Күн бұрын

Пікірлер: 20
@TheRayhaller
@TheRayhaller 8 жыл бұрын
After a good amount of blog posts and other reads which failed it has been that video what has made me finally understand monads. Thanks!
@Paranoidifyable
@Paranoidifyable 11 жыл бұрын
Indeed! Just because you *can* record the audio with a potato, doesn't mean you *should*.
@eNSWE
@eNSWE 8 жыл бұрын
obviously some hiccups with the sound and so on, but I think this was a great talk and it sent me a bit further along my way. I'm haven't had the epiphany yet, but monads don't feel all that arcane any more. I just need some more practical experience!
@5outhSix
@5outhSix 11 жыл бұрын
Great talk. Please keep posting them -- they've all been good so far! Thanks for sharing!
@Ketannabis
@Ketannabis 6 жыл бұрын
Yes I believe I do matter.
@mobby1982
@mobby1982 10 жыл бұрын
Amazing talk but with few audio issues.
@bocckoka
@bocckoka 3 жыл бұрын
oh, the happy days before the widespread singular they
@Hjtrne
@Hjtrne 7 жыл бұрын
I think this video is well worth its time, in spite of the errors in it. I have seen more knowledgable presentations, but they all went much too quickly into generalisations. Like the title suggests, here it is made clear why understanding the topic is worthwhile (in terms of some specific cases contained in those generalisations). In my own novice observations though, beyond the first two examples the code doesn't actually make use of the theory of monads (if that's the right word). Compose and id are defined, but don't ever contribute to code that is executed. AddP of the third example and runIO of the fourth implement the parts of compose they need for themselves, with direct reference to the structure of the monad - which misses the point entirely. Without promising that this is the standard, correct way of doing things, I can at least say that it would be an improvement to e g implement addP as addP ns ms = ns >>= ( -> ms >>= (\m -> return (n+m))) In order to get that to work, P should either be defined as a monad along with the functions (>>=) and return, or just be replaced with [Integer] (since list is a monad already). I wouldn't call it elegant, but at least the interaction with the structure of the monad is now kept out of this function.
@paulika2012
@paulika2012 8 жыл бұрын
You should take the mike and shove / bind it to the range of whomever gave it to you, regarded as a function.
@TreacleMary
@TreacleMary 11 жыл бұрын
I think I'm going to read the article, this was very hard to follow. Obviously the audio, but the flow and continuity of the lecture and slides wasn't so great :/
@aMulliganStew
@aMulliganStew 7 жыл бұрын
the sporadic volume cuts make listening difficult.
@peterostertag8699
@peterostertag8699 7 жыл бұрын
That's good! I think, I got the point - for the first time!
@furfurylmercaptan
@furfurylmercaptan 11 жыл бұрын
Probably a great lecture, but impossible to comprehend. This was not merely bad audio from the mic. Some incompetent "sound engineer" was trying to process it... using a noise gate?
@joergbrueggmann
@joergbrueggmann 9 жыл бұрын
I have got it - but not because of this video! For me, this video was helpful - but it was also a VERY terrible waste of time. I have got thru this lengthy talk by at least 4 hours and tried to understand. Now, I understand why monads matter - even though I am NOT an english native. Now, I even understand how to implement a monad is haskell - but if you want to do it properly: Forget this video! I am writing this to save your time... 1) The code of Err.hs does implement a haskell monad - but the monad has NOT been used in the rest of the code. And if you dare to use the operator ">>=" and the function "return" the program will fail with "out of memory". Bye the way joinErr has not been used, as well. Hence, the example code is completly crap if you want to understand how implement monads in haskel. The corrected version is here: ----------------------------------------------------------------------------------------------------------------- -- Err Kleisli arrow example, -- derived and corrected from "Why Do Monads Matter?" London Haskell user group 24-Oct-2012 talk given by Derek Wright import Control.Applicative main = do print ((divBy 2 `composeErr` divBy 5) 2310) -- (2310 / 5) / 2 print ((divBy 0 `composeErr` divBy 7) 2310) -- (2310 / 7) / 0 => Divide By Zero Error!!! print ((divBy 5 `composeErr` divBy 11) 2310) -- (2310 / 11) / 5 -- Use division (by zero) as a function that -- could produce an error. -- (divBy 2) applied to 6 equals 3. divBy :: Integer -> Integer -> Err Integer divBy 0 y = Error divBy x y = OK (div y x) -- Add an Err data-type that can record Success / Failure data Err a = OK a | Error -- only 1 type of error but there could be more deriving Show -- Kleisli composition -- Use a type like (f . g) x :: (b -> c) -> (a -> b) -> (a -> c) -- but it is for Kleisli arrows (a -> Err b) composeErr :: (b -> Err c) -> (a -> Err b) -> (a -> Err c) composeErr f g x = do t1 (a -> Err b) -> Err b bindErr (OK x) f = f x bindErr Error _ = Error -- Prove we have implemented a monad by defining an instance of the type-class instance Monad Err where return = idErr (>>=) = bindErr {- If you want to avoid the following warning than you may implement the code below: divby.hs:31:10: Warning: `Err' is an instance of Monad but not Applicative - this will become an error in GHC 7.10, under the Applicative-Monad Proposal. -} instance Applicative Err where pure = OK Error _ = Error (OK f) something = fmap f something instance Functor Err where fmap f (OK x) = OK (f x) fmap _ Error = Error ----------------------------------------------------------------------------------------------------------------- Original confusing code here: github.com/londonhaskell/londonhaskell-2012-10-24-why-do-monads-matter/blob/master/Err.hs 2) There are better resources to understand monads in haskell. adit.io/posts/2013-04-17-functors,_applicatives,_and_monads_in_pictures.html#monads
@214F7Iic0ybZraC
@214F7Iic0ybZraC 6 жыл бұрын
This comment and the link save my life! Thank you!!
@bheklilr
@bheklilr 11 жыл бұрын
Even as a native English speaker, parts of this video's audio are hard to decipher.
@hectorrecabal4590
@hectorrecabal4590 4 жыл бұрын
Horrible sound
@thomasray5288
@thomasray5288 7 жыл бұрын
such a bad presentation. do not waste your time with that crap. This guy is not only very poor prepaired, he seems not to know what he is talking about
In Haskell, less is more
57:51
London Haskell
Рет қаралды 22 М.
Brian Beckman: The Zen of Stateless State - The State Monad
1:06:59
jasonofthel33t
Рет қаралды 47 М.
Get 10 Mega Boxes OR 60 Starr Drops!!
01:39
Brawl Stars
Рет қаралды 19 МЛН
Вы чего бл….🤣🤣🙏🏽🙏🏽🙏🏽
00:18
Underwater Challenge 😱
00:37
Topper Guild
Рет қаралды 31 МЛН
What the Heck Are Monads?!
21:08
ArjanCodes
Рет қаралды 71 М.
Running a startup on Haskell
50:23
jasonofthel33t
Рет қаралды 111 М.
Adventure with Types in Haskell - Simon Peyton Jones (Lecture 1)
1:33:37
Pipes
45:54
London Haskell
Рет қаралды 6 М.
Building Pragmatic User Interfaces in Haskell with HsQML
54:14
London Haskell
Рет қаралды 4,4 М.
What is a Monad? - Computerphile
21:50
Computerphile
Рет қаралды 600 М.
A Crash Course in Category Theory - Bartosz Milewski
1:15:14
ScalaIO FR
Рет қаралды 90 М.
Crust of Rust: async/await
2:34:01
Jon Gjengset
Рет қаралды 190 М.
Monads and Gonads
49:47
Google TechTalks
Рет қаралды 146 М.
Idris: General Purpose Programming with Dependent Types
1:19:05
London Haskell
Рет қаралды 11 М.
Get 10 Mega Boxes OR 60 Starr Drops!!
01:39
Brawl Stars
Рет қаралды 19 МЛН