6 ms·
CIS 194: Introduction to Haskell (Spring 2013)
- ilolu 13y agoAre there any good set of videos to learn Haskell ? Or which book should I start with. I don't have much experience in Functional Programming.
- magmadiver 13y agoyou can try this out, I thought it was cute http://learnyouahaskell.com/ http://learnyouahaskell.com/ also this http://lisperati.com/haskell/ http://lisperati.com/haskell/
- ekm2 13y agoStart with Learn you a Haskell [1]followed by Real World Haskell[2] [1]http://learnyouahaskell.com/ http://learnyouahaskell.com/ [2]http://book.realworldhaskell.org/ http://book.realworldhaskell.org/
- ludwigvan 13y agoYes, these videos by Eric Meijer are very good: http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/Lecture-Series-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-1 http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Func...
- agumonkey 13y agoI believe jumping right into Haskell, unless you're already fond of recursion, is a bit too stiff. Maybe try to read SICP, it will expose you to the functional programming principles that lead to Haskell (strict vs lazy evaluation) which he mostly makes more concise and expressive. Here's a playlist of a lecture session for HP employees by the authors of the book : http://www.youtube.com/playlist?list=PLB63C06FAF154F047 http://www.youtube.com/playlist?list=PLB63C06FAF154F047 Here's the book http://mitpress.mit.edu/sicp/ http://mitpress.mit.edu/sicp/ ( alternate formatting texinfo http://www.neilvandyke.org/sicp-texi/ http://www.neilvandyke.org/sicp-texi/ , pdf http://sicpebook.wordpress.com/ http://sicpebook.wordpress.com/ )
- nandemo 13y agoEr, no. If you're interested in Haskell, pick up one of the 2 mainstream Haskell books (listed in ekm2's comment) and GHC, then learn it. SICP might be a great book, but there's a long way road from it to Haskell. If you are to read theory, then Yorgey's (the instructor for the linked course) Typeclassopedia or Okasaki's Purely Functional Data Structures will give you more bang for the buck as far as Haskell is concerned.
- agumonkey 13y agoAlright, I can only say that in my case seeing simple recursive decomposition in scheme, macros, pattern matching (scheme, ml) then Haskell made much more sense than diving directly in Haskell very tight syntax/semantics. Without functional programming background, lazy languages with patterns can look like black magic, hence my suggestion.
- bestham 13y agoI find that this rather old video from OSCON 2007 by the incredible Simon Peyton Jones (of F# and GHC) is the most inspiring Haskell video there is. It uses the X window manager XMonad as the basis to explain many important concepts of Haskell and testing (QuickCheck). It is self contained and no previous knowledge of Haskell is needed: http://blip.tv/oreilly-open-source-convention/oscon-2007-simon-peyton-jones-a-taste-of-haskell-part-i-329701 http://blip.tv/oreilly-open-source-convention/oscon-2007-sim...
- bestham 13y agoThe slides are here: http://research.microsoft.com/en-us/um/people/simonpj/papers/haskell-tutorial/ http://research.microsoft.com/en-us/um/people/simonpj/papers...
- Watabou 13y agoWow, thanks for this, it's exactly what I needed. I started from LYAH and the only thing missing from it were some exercises so I could retain the information that was presented in each chapter. Otherwise, it's a fantastic book.
- WasimBhai 13y agoWhy should I learn Haskell? Will it help me professionally, or help me being a better programmer?
- dons 13y agoYes.
- Dewie 13y agoYou could Google that exact question. It has been answered a lot of times on StackOverflow and other sites.
- Peaker 13y agoBecause you will find it is the best tool for many programming jobs.
- gtani 13y agoHere's a few: http://failex.blogspot.com/ http://failex.blogspot.com/ http://www.haskell.org/haskellwiki/Introduction http://www.haskell.org/haskellwiki/Introduction http://fvisser.nl/post/2013/april/23/slide-cfams-talk.html http://fvisser.nl/post/2013/april/23/slide-cfams-talk.html https://news.ycombinator.com/item?id=5688803 https://news.ycombinator.com/item?id=5688803
- shoki 13y ago> Why should I learn Haskell? http://stackoverflow.com/questions/1604790/what-is-haskell-actually-useful-for http://stackoverflow.com/questions/1604790/what-is-haskell-a... For my own 2-cents, once I learned QuickCheck[1] and Parsec[2], I found myself slowly rewriting them for every language I program in. > Will it help me professionally? Speaking as another professional, probably not. I love Haskell, but my colleagues can't deal with it. They can't write it. They don't know functional programming. And to be entirely honest, they will never understand Monoids, Monads, or macro-hacking. > ...Help me being a better programmer? Maybe. If you like already like to think of software axiomatically, then yes, it will make you will make you think of software more conceptually. But honestly, getting javascript, ruby and go under your belt will also make you think differently about software, and those are more practical languages. [1] http://en.wikipedia.org/wiki/QuickCheck http://en.wikipedia.org/wiki/QuickCheck [2] http://www.haskell.org/haskellwiki/Parsec http://www.haskell.org/haskellwiki/Parsec
- dschiptsov 13y agoI really like the amount of nonsense.) It begins with head is a mistake! It should not be in the Prelude. Other partial Prelude functions you should almost never use include tail, init, last, and (!!). From this point on, using one of these functions on a homework assignment will lose style points! And here is a proposal: data NonEmptyList a = NEL a [a] nelToList :: NonEmptyList a -> [a] nelToList (NEL x xs) = x:xs listToNel :: [a] -> Maybe (NonEmptyList a) listToNel [] = Nothing listToNel (x:xs) = Just $ NEL x xs headNEL :: NonEmptyList a -> a headNEL (NEL a _) = a tailNEL :: NonEmptyList a -> [a] tailNEL (NEL _ as) = as Dear sirs, a List is a recursive data structure by definition. Non-recursive List is an unimaginable nonsense. What was made here with a name of safe(!) NonEmptyList is some ugly Pair with lots of syntactic noise. How could you get the last element from your NonEmptyList? How could you tell how many elements in it?) But, of course, never ever use these ugly unsafe lists - they might be empty! Use safe NonEmptyList because in Haskell everything is safe. And never try to think what the fuck you are reading.
- Peaker 13y agoA better solution is length-encoded lists (often called Vectors): data Vector length a where Empty :: Vector 0 a Cons :: a -> Vector n a -> Vector (1 + n) a But Haskell isn't very good at such encodings. Type-level computation is often not worth it. That said, even NonEmptyList is sometimes useful. For example, some Prelude functions could use it: group :: [a] -> [NonEmptyList a] Making common idioms like: map head . group ... Safe again. Not sure what you mean by: > How could you get the last element from your NonEmptyList? How could you tell how many elements in it?) Exactly two. import Data.Monoid import Data.Maybe lastNel :: NonEmptyList a -> a lastNel (NEL x xs) = fromMaybe x . getLast $ mconcat $ map (Last . Just) xs lengthNel :: NonEmptyList a -> Int lengthNel (NEL x xs) = 1 + length xs
- dschiptsov 13y agoBut these are solutions for some Array of unknown size or some abstract collection - why to call it a List? For a List the notion of the-empty-list is essential.
- Ashuu 13y agoIs it only for UPENN students?
- mcintyre1994 13y agoI really wanted to learn functional programming when my university offered it, but unfortunately it's crunched in a horribly busy term and I'm not willing to risk core modules for it if I end up struggling. That said, I really do want to learn it and find MOOCs a really useful tool, if anybody has any suggestions for any they've used (or the one linked, I'm unclear if that's for students at that university only) that'd be awesome!
- archarios 13y agoThe Wash U Programming Languages course on Coursera was pretty functional-programming oriented. I really enjoyed it and would recommend it to anyone.
- mcintyre1994 13y agoThanks, it's a shame the content is only available when it's running because again the timing isn't great. I'll definitely check it out though.
- croyd 13y agoI'm currently trying to learn functional programming through Haskell. Glad to have found another resource, plus this cheat sheet linked from the page looks handy: http://cheatsheet.codeslower.com/ http://cheatsheet.codeslower.com/
- JacobHenner 13y agoInteresting to see a Penn site here...
- MaxScheiber 13y agoThe author and teacher of this course, Brent Yorgey, is one of those rare guys who is both a fantastic lecturer and a fantastic researcher. For Penn's fuller version of this course, check out CIS 552[1]. Dr. Stephanie Weirich is also a fantastic lecturer, and a GHC contributor to boot (IIRC). [1] http://www.seas.upenn.edu/~cis552/12fa/ http://www.seas.upenn.edu/~cis552/12fa/
- xzel 13y agoI took this class last semester. Learned a lot. Brent was a great professor and is a great guy.