Hacker News new | past | comments | ask | show | jobs | submit login
School of Haskell 2.0 (fpcomplete.com)
174 points by irickt on May 4, 2015 | hide | past | favorite | 14 comments



Wow. I'm unfamiliar with the project, but their planned features would be amazing in any language. I'll give it a try, for sure.

Detecting HTTP servers and interacting with them in an iframe is especially brilliant.


They're asking for input from the community regarding license, markdown version, and other issues.


I've just started learning Haskell using the online "Real World Haskell" book, which seems very good so far. But I'd love to hear how that book compares to this site from any experienced Haskell programmers who have used both.


Not anywhere near experienced, but I was using this "curriculum":

https://github.com/bitemyapp/learnhaskell

I have a general question about Haskell though: I've read in more than one place that writing high-performance Haskell code is not easy for a non-expert to do, and to at times you have to sacrifice conciseness.

While I love the aesthetics of Haskell syntax and higher order functions, I have this paranoia that beautiful code may be slow code.


From my experience:

* The vast majority of code doesn't need to be fast, and it's trivial to write code that's within a factor of 5 of optimized C. I can write Haskell at least 10x faster than I can write optimized C for the same problem.

* If you want code that's within a factor of 2 of C then you'll need to understand quite a bit about the internal details of the compiler, but your code won't get too ugly. I'd say it's about the same amount of work in both C and Haskell to get this level of performance.

* If you want code that's just as fast as optimized C then you'll need great understanding of both the compiler and the underlying hardware. At this point, you can expect your code will get hideously ugly. Also your code will break a lot when GHC versions change. I can write optimized C about 10x faster than I can write optimized Haskell.

Of course every problem is different, and this is only a rough average of my experience.


Very helpful reply, thanks. If it's not too much to ask, do you have any examples (that you are free to share) of taking some Haskell code, then optimizing it bit by bit?



That's interesting, what does "break" mean exactly? Does it stop compiling after GHC being upgraded? Or does it suffer from performance regression due to the changes of the optimizing strategy in GHC?


GHC progresses fast and the internal types change subtly, so after upgrading GHC, some libraries fail to compile. Fixing it is usually trivial, and it's a nice way to keep in touch with your compiler.


Note that this answer[1] documents parts of the book which has become outdated. That being said, it is a good book. I learned Haskell through it. A much more modern book on Haskell is Beginning Haskell by Alejandro which covers modern library although the book has some typos and publishing errors. I personally like Simon Thompson's Haskell book which focuses more on the fundamentals. The SOH site has various tutorials ranging from beginning to advanced. Although I would say that learning from book at the initial stages is a much better approach.

[1] http://stackoverflow.com/questions/23727768/which-part-of-re...


I haven't gone through all of the SoH materials, but FPComplete articles tend to be pretty good. Some articles are better than others, none left me feeling like I wasted my time, and some are excellent. I'm really glad to see FPComplete spinning up. I hope they come out with a conference or two (like Cognitect with Clojure/conj).

Real World Haskell is solid and was pretty comprehensive for system programming at the time (2008) but it desperately needs an update. Some of the libraries (e.g. persistent) have moved pretty far from it, web programming in Haskell has come a long way over the past few years, and applicative functors weren't even on the map yet.

Real World Haskell is a good resource but it shouldn't be your only resource. Then again, part of the fun and challenge of learning Haskell is that there's so much depth to the language that no single resource suffices.

Stephen Diehl's "What I Wish I Knew When Learning Haskell" ( http://dev.stephendiehl.com/hask/ ) is comprehensive and modern, but not really a beginner resource.


Possibly a bit off-topic, but I find the Haskell teaching materials on FP Complete great but I've always been a bit confused about their IDE.

It's web-only right? Could I use it to develop something that uses local graphics (like SDL or such), or play around with the Haskell School of Music lessons with actual audio output? What do people generally use for a local IDE? Is Leksah any good?

I'm on Windows, FWIW.


Their IDE is web only, though they just open sourced a good portion of it. I have found that most people use vim or emacs. If you are trying to decide, I'd pick emacs, as Chris Done has written some nice scripts (https://github.com/chrisdone/structured-haskell-mode). Personally I use vim. Also check out ghc-mod and hdevtools.


Great news. Their educational materials and Web IDE helped me to learn Haskell.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: