C9 Lectures: Greg Meredith - Monadic Design Patterns for the Web - Introduction to Monads

Greg Meredith, a mathematician and computer scientist, has graciously agreed to do a C9 lecture series covering monadic design principles applied to web development. You've met Greg before in a Whiteboard jam session with Brian Beckman.
The fundamental concept here is the monad, and Greg has a novel and conceptually simplified explanation of what a monad is and why it matters. This is a very important and required first step in the series since the whole of it is about the application of monadic composition to real world web development.
In part 2, Greg continues to take us on a monadic journey, en route to the design a composable web system from client to database and back. Tune in. Learn.
Shape. Wrap. Roll.
See part 1 first, if you haven't already...
See part 3
ah.. a big fruit on the screen !
Wow, I tried to full screen this video with Chrome 8 and Silverlight 4, completely hosed my system. Pretty lame, not happy.
@intelman: Hosed your system? How?
C
PS: Do we have to have this conversation on this thread? Can you post your issue in the Feedback forum please?
@intelman: You could try the html5 "support" but to not waste your time i can tell you that it doesn't work, shocking ! right Only there so they can say that they have "support" for it. yeah right...
Silverlight was bad from the start and has only gotten worse by being adopted by naive developers
@Charles: "Feedback forum" nice one, are you sure you know what feedback really means ? perhaps you meant "Ignore forum". Yes, i do actually wonder if microsoft knows what the word feedback really means.
My experience have been and still is that you only waste your own personal precious time. "Like talking to a brick wall".
Oh, an intro to comonad, yeah. but IIRC Bart refers monad as 'get stuff out' and comonad 'put stuff in' while Greg used the terms in a different direction, kinda confusing.. Now looking forward to the technical stuff !
On the silverlight-fullscreen thing I have had same problems on my firefox, silverlight pops a dialog asking for permissions of fullscreen viewing but the dialog is not clickable somehow, then I can't switch to the video nor the browser, the process is blocked and can only be killed. then the video started play on is own ! magic ! OK maybe that's because plugin-container.exe is still running or something. but the thing can actually hose a system.
and ... where is the fruit now ??
@felix9: Nope. Bart ordered the concepts correctly -> Monad in. Comonad out. Watch it again
C
@Mr Crash: Whatever... There isn't a single ignored item in the Feedback forum. Duncan and team, between writing code, designing features, prioritizing bugs and feature requests, answer most if not all of the feddback posts (assuming they warrant a reply. Sometimes, Duncan et al just fix or add without responding).
C
With monads we can shape, wrap and roll computational complexity, making complexity composable. Monads are the ilk of complex categorical mathematics, but they mean something tangible (more than abstract) and most importantly they are fundamentally useful.
I love this series and sitting in the room when Greg delivers the monadic news is priceless.
Thank you, Greg. We're so fortunate to get to have you on Channel 9. You're always welcome here.
C
Sure I can make a thread there. Pretty much couldn't do anything anymore. Did ctrl-alt-del and clicked task manager,watched the screen redraw very slowly (Was on XP at work...).
Isn't the first time it happened. Not sure what is up with silverlight.
6 hours ago, Charles wrote
@intelman: Hosed your system? How?
C
PS: Do we have to have this conversation on this thread? Can you post your issue in the Feedback forum please?
Sure I can make a thread there. Pretty much couldn't do anything anymore. Did ctrl-alt-del and clicked task manager,watched the screen redraw very slowly (Was on XP at work...).
Isn't the first time it happened. Not sure what is up. Browsers or silverlight, either way it sucks.
@Charles: Absolutely - thanks to you and particularly Greg for posting this. Hopefully, after I have watched it several times over it will all become clear. Looking forward to the next installment.
I have been looking forward to this installment, and it's been worth the wait! Looking forward to the next one. Thanks Charles & Greg!
Just got home after a long day at the office and a dinner. But will watch this now - and again tomorrow!
As for Mr. Crash: your sour grapes are unwanted here.
And please folks: Put your money where your enthusiasm is: Support Greg's book!
https://channel9.msdn.com/Forums/Coffeehouse/Monadic-Web-Design-Book-Request-for-donations
It seems that Greg is a propnent of Scala and it is one of the languages on my list to learn.
The major issue with Scala is that the JVM does not support tailcall optimization (the CLR does).
Not having tailcall optimization is a serious limitation for functional languages. Scala does create loops out of simple recursive calls but in complex composition it can still run into stack overflow issues.
For an illustration of complex compostion involving tailcalls, see the monad implementation example in F# 2.0 language spec (https://research.microsoft.com/en-us/um/cambridge/projects/fsharp/manual/spec.pdf) page 60, definition of "catch".
Scala can't be a serious contender unless the JVM gets tailcalls - or it is ported to .Net.
I've got to be honest, I didn't really get any of this. And I do functional programming (although not in Haskell). Maybe these days I have my "how does this help me exactly" hat on a bit too often, but I didn't see anything helpful in this or the previous video.
@rhm: That's your right! Don't watch the series anymore then It's OK. Others find this quite educational. Not every one of the lectures on C9 will be 100% pertinent to everybody out there... I think that's fine. We have something for most all developers and technophiles out there, so I know you can find content that is pertinent to your wants and needs. As always, we welcome your suggestions and will do our best to act on them.
Thanks for your feedback!
C
@rhm:At first glance I didn't see practical application either. I've been viewing a few monad articles and find that I learn something from each one. If you're doing functional work my best guess is that monads are very applicable. For a different perspective that helped me tie this to "something useful" check out http://james-iry.blogspot.com/2007/09/monads-are-elephants-part-1.html.
As for this series, I think Greg is great! It's a bit mind bending and I think it will take multiple viewings to get my mind around much of what he is trying to communicate.
Monads are like drugs, you take some and everything feels really different, but is a bit blurry;)
my crazy thought is, maybe one day webservices like WCF can expose services not as a single layer of calls and callbacks but a whole network of of composable actions, and client can put a serie of calls into a monad and execute in the server, maybe acrosee many layers or services, then take the return value back from an async callback ... just random thoughts
For a practical example of monads (my first one!) see http://fwaris.wordpress.com/2010/11/08/a-monad-for-com-interop/
I think Greg's lectures are a wonderful education for us. Thanks to Greg and Charles. Please keep them coming!
@fwaris: Next installment will arrive in January!
C
January!?! How my brian works it might as well be January 2020. I learn at the speed of forgetting, so with such long intervals, time isn't my friend.
This is interesting, but I don't really understand why the lengthy explanations of monads are really necessary, with all the vague comparisons and such. We got this stuff in one lecture during functional programming classes (CS). It's not simple but not extremely difficult either. I personally am more interested in uniqueness typing, something not mentioned at all on this site. It is supported in concurrent clean: http://wiki.clean.cs.ru.nl/Clean
Concurrent Clean also has a library for web development which essentially uses a Task monad for workflows. In Clean, monads can be implemented using uniqueness typing. The library is called iTasks and utilizes the composition of the Task monad to create complex workflows.
as always, nice.
It would be nice if the language examples were in C#..I guess you could ask why I am asking to play to the audience in a language that they already know, but normally "general acceptance" is the best way to get the point across.
http://www.cs.utexas.edu/users/EWD/transcriptions/EWD04xx/EWD447.html
3 hours ago, tarlano wrote
It would be nice if the language examples were in C#..I guess you could ask why I am asking to play to the audience in a language that they already know, but normally "general acceptance" is the best way to get the point across.
http://www.cs.utexas.edu/users/EWD/transcriptions/EWD04xx/EWD447.html
This isn't really about languages or other dev tools. Think design patterns, not implementation details.
C
charles in the next video would it be possible to either do a split screen of the slides and greg or just make the slides a download and only show greg (id prefer the later). this popping back and forth between slides and greg is very confusing.
charles in the next video would it be possible to either do a split screen of the slides and greg or just make the slides a download and only show greg (id prefer the later). this popping back and forth between slides and greg is very confusing.
Noted (but the next one is already produced - sorry...). Are the slides out of sync or something? Can you elaborate on what's confusing you?
C