5 ms·
Conrad Barski's Haskell Tutorial
- apgwoz 13y agoPicnicmob was a really clever idea. I think I remember that it got cancelled though, which was unfortunate. I like the tutorial though. I'd be willing to bet it's his style and work that inspired the "Learn you a..." books. The Haskell one is great, and so is the Erlang one.
- seako 13y agodon't forget _why's (poignant) guide to ruby http://mislav.uniqpath.com/poignant-guide/ http://mislav.uniqpath.com/poignant-guide/
- victorf 13y agoI hated that book, the signal to goofy joke ratio was awful. Compare with, say, "Learn you an Erlang", which was goofy while still informative.
- apgwoz 13y agoI've never read all of the poignant guide, though I probably should for entertainment value. But, yeah, I'd imagine that was also an inspiration.
- drcode 13y agoWow, how did my Haskell tutorial get to the HN front page out of nowhere? :-) If you like my stuff, keep an eye out for my new Bitcoin book, which will be coming out this fall. I've been slaving over the artwork for months, it should be a beautiful book! The working title is "Bitcoins for the Befuddled".
- icey 13y agoIf you're genuinely curious, I found it on the Haskell subreddit today!
- binarycrusader 13y agoThanks for the wonderful Land of Lisp book! I only wish someone would do a similar "Land of C" book some day :-)
- victorf 13y agoI haven't read that one, and I am looking for an into to Lisp book. What did you like about it? (and I think it would be a missed opportunity to not title it "Sea of C")
- binarycrusader 13y agoTo be clear, I haven't finished the book yet, but I made it through the first eleven chapters (~230 pages) so I think I've gone through enough material to render a reasonable opinion. With that disclaimer out of the way... I love that the author chose to expose readers to core, foundational concepts through example programs that were continually improved instead of using lots of throwaway one-off examples. Put differently, the author managed to ensure that readers that diligently followed through from beginning to end would gain a real sense of progression as they went through the material. The only complaint I really have so far is Chapter 11 -- but that's not really the author's fault; that's just the terrifyingly mind-numbing formatting functionality (Common?) Lisp offers.
- gcv 13y agoSeconding the recommendation for Land of Lisp. It's fun, well-written, and thorough. And has the most fun art I've seen in a programming manual. I read five great books on Common Lisp. Intro level: ANSI Common Lisp (by our very own PG), Practical Common Lisp, and Land of Lisp. Can't go wrong with any of them, but LoL has art and humor. Advanced level: On Lisp (again, PG), and Let Over Lambda (a bit rougher around the edges, opinionated, but full of clever programming tricks).
- lelf 13y agoRead it. How can you not read a book with such a front cover? And it has examples you really want to play with (literally), not 10000 kinds of "hello fibonacci".
- jaekwon 13y agodrcode, do you know of a Haskell implementation of bitcoind?
- drcode 13y agoNo, I have never heard of Haskell and bitcoin in the same sentence. I think you'd have to use an FFI.
- doublec 13y agoroconnor was working on one. There are git mirrors of the darcs repository on github. For example: https://github.com/laanwj/Purecoin https://github.com/laanwj/Purecoin I don't know the current status of it.
- dons 13y ago* http://hackage.haskell.org/package/network-bitcoin http://hackage.haskell.org/package/network-bitcoin * Pure coin , https://github.com/laanwj/Purecoin https://github.com/laanwj/Purecoin * haskoin, https://github.com/bitcoin-spec/haskoin https://github.com/bitcoin-spec/haskoin
- drcode 13y agoHi Don... Wow, lot's going on... I should have done a Google search before responding :-)
- frou_dh 13y agoghc 7.6.3 (brew) installed on OS X doesn't like the first code presented (System.Random, Text.Regex and StdGen aren't found).
- mietek 13y ago`brew install haskell-platform` should help.
- deleted 13y ago[deleted]
- sigzero 13y agoNope. I just did it. Worked fine for me. If you are talking about that very first exercise, you did put it in a file and run it? Right? I got the expected output no issues.
- lelf 13y agoDid you respect indentation? Tutorial is really failing here with this “just paste this to the bottom”.
- chm 13y agoI did respect indentation, and here's what I get as an error: > tutorial.hs:21:23: Illegal type signature: `[Person] people' Perhaps you intended to use -XScopedTypeVariables In a pattern type-signature
- lelf 13y ago> In Haskell, this type of integer can't get bigger than 2^31... It's platform-dependent h> finiteBitSize (0 :: Int) 64 > We could have used the type Integer instead- This type of integer grows "magically" and can hold any sized integer, no matter how big... but it's slower, so we used Int instead, since our numbers will never get that big. Premature optimisation at its best.
- pogden 13y agoIn Haskell you can also use the Integral typeclass to make functions polymorphic to Int and Integer.
- lelf 13y agoAnd why would you do this in simple tutorial program? Anyway, you'd need Num.
- dfeltey 13y agoI don't know why anyone would use the Integral typeclass over just Int or Integer in a simple program like this, but you wouldn't need Num in addition to Integral, every instance of Integral must also be an instance of Real, and instances of Real must be instances of Num.
- deleted 13y ago[deleted]
- deleted 13y ago[deleted]
- monokrome 13y agoThis website was written on a planet where 244 lines of Haskell is less than 100 lines of Haskell.
- drcode 13y agoThat's why there's a footnote on the front page: [1] - Lines of active code only, not counting optional function signatures. Intermediate debug output lines excluded. May cause eye irritation if viewed for prolonged periods of time. Speak to your physician to find out if this tutorial is the best treatment option for you.
- gps408 13y agoSimple and refined, guaranteed to blow your mind... The tao of regular expressions link is broken in the first chapter. Does anyone have a link?
- izietto 13y agoI'm unsure which regex package flavor to use... regex-base? regex-compat? regex-pcre? regex-???
- lelf 13y agoText.Regex is provided by regex-comp. (Better install haskell platform).
- blaenk 13y agoThis confused me when I was learning Haskell as well. The way I understand it is that regex-base defines a base-line interface -- such as the context-aware =~ function -- that all of the other packages implement, which is why they're known as 'backends' (e.g. regex-tdfa, regex-pcre, etc.). In newer versions of GHC (> 6.6), the backends re-export this interface so that you just need to import the backend. regex-tdfa is the backend that I've used myself, mainly because I saw it used in other packages (Hakyll). http://www.haskell.org/haskellwiki/Regular_expressions#regex-base http://www.haskell.org/haskellwiki/Regular_expressions#regex...
- gtani 13y agoMy local Barnes and Noble has this book next to Felleisen et al's "Realm of Racket". These will be hours and cups of coffee well spent! http://realmofracket.com/ http://realmofracket.com/
- reirob 13y agoI like the tutorial very much! Thank you! And I like the final words, which I think brings to the point the whole discussion about Haskell vs. Imperative languages: [..] Because the physical world changes only slightly from moment to moment, it means that languages that can comfortably mutate large data structures in targeted ways will always have a role to play in real-world software- The "real world" usually just doesn't work the way Haskell, and other functional languages would prefer it did: Haskell preferred that at every moment in time, a "new universe" would look at the "old universe" and would rebuild itself, from scratch, from what it saw in the past, with radical changes happening all the time. Despite its many advantages, I humbly suggest, therefore, that in the future there will continue to be a rift between the "imperative" and "functional" camps of programming, until someone comes up with a truly robust way of uniting these two camps- And I think that some profound programming discoveries still need to be made in the future before this problem is really resolved- I get the feeling it's just not good enough to wave at the problem and say "Monads".