7 ms·
Oh my, another tutorial. I've looked at many of them, trying to learn something from the Haskell way. And I think I get the fundamental advantages of the type s
by cnvogel 12y ago
Oh my, another tutorial. I've looked at many of them, trying to learn something from the Haskell way. And I think I get the fundamental advantages of the type systems, the lazy evaluation enabled by the languages purity, I think I can somehow make sense of the Monads even. I have the "learn you a haskell for good" on a pile of books where I have a glimpse from time to time.
Most tutorials and books are very enthusiastic in how they can detect that I try to zip two lists of different cardinality during compile time, or how they can lazily calculate the Fibbonacci sequence. And that's really nice and fine...
But nevertheless, I use C all of the time, and I learnt how to make use of a myriad of libraries, combine connections to a SQL database, embedd a webserver, talk to USB,... Must have been 20 years ago that I wrote code to calculate the Fibbonacci sequence.
So, where are tutorials that showcase all the wonderful "high-level" functionality that has already been written for Haskell, so that I, after reading through the text, will be thrilled how much work I can avoid, or how much security I can gain when switching over from my "almost bare-matel not-much-more-like-an-assembler C" to Haskell? Not in calculating the Fibunacci sequency, but in writing a backend for my web-app, or talk to a USB peripheral? Do 3D graphics?...
- Dewie 12y agoThese kinds of questions feels like they're treading the fine line between being honest inquiries, and dares.
- cnvogel 12y agoOf course you don't have to believe me, but I'm genuinely puzzled why apparently most tutorials spend such an disproportionate amount on these more theoretical explanations. One explanation of course might be that a lot of the crowd looking into this are coming from a computer-science background where they are more enthusiastic about the basics. And to them, the fact that (after a lot of coding chores, writing up libraries) it eventually will make sql-injection harder, or parallel handling of web-service faster will be seen just as a logical consequence not worth making a lot of fuzz about. But for attracting a larger community one has to make the gains for the average programmer more visible.
- kisstheblade 12y agoWhy isn't there ever any discussion in hacker news (yes some great comments but really no general discussion other than that). I posted about the same comment as the parent hours ago. I don't know if anybody even sees my posts, never gotten a response, and my "karma" or something has always been 15. And posting and reading the forum is very slow. What gives? Sorry about the off topic rant, it's just hard to feel part of the discussion here...
- 3rd3 12y agoI know your comment is more targeted at tutorials, but in case you don't know the book Real World Haskell explores, as the name implies, some real world problems: http://book.realworldhaskell.org/read/ http://book.realworldhaskell.org/read/
- virtualwhys 12y agoAgreed compared to RWH, LYAH was next to useless for me. RWH could use a refresh though (published in 2008), hopefully a 2nd edition will be in the works at some point.
- wraithm112 12y agoThere are helpful tutorials for all of the things you've mentioned. I think that part of the problem is that people don't go looking for these things. If you want to write a backend for a web-app, there are three frameworks that are all mature: Snap, Yesod, and Happstack. There are tutorials, books, and documentation for all of these frameworks. If you want to do 3D graphics, there are some pretty straightforward bindings to OpenGL, again with tutorials and documentation. If you want to talk to a USB peripheral, there's the usb-safe. For databases, there are a myriad of options and tutorials for those. The tutorials are all out there, but one is going to have to have a pretty solid grasp on Haskell before one can understand them, just like with any other language.
- virtualwhys 12y ago> For databases, there are a myriad of options and tutorials for those Where? The only half appealing type safe query DSL that I've found for Haskell is Esqueleto, and that features a blank github readme[1] o_O [1] https://github.com/meteficha/esqueleto https://github.com/meteficha/esqueleto
- wraithm112 12y agoGroundhog is pretty awesome[1]. Persistent also works, but it does some wonky stuff on SQL databases. Acid-state is really neat! Of course, there's stuff like postgresql-simple, but that's not very type safe. [1]https://www.fpcomplete.com/school/to-infinity-and-beyond/pick-of-the-week/groundhog https://www.fpcomplete.com/school/to-infinity-and-beyond/pic... Edit: Also, esqueleto has a pretty okay looking hackage page[2], but I've never used esqueleto, so I don't really know. [2]http://hackage.haskell.org/package/esqueleto http://hackage.haskell.org/package/esqueleto
- carabolic 12y agoDo you have any experience with Database Supported Haskell (DSH) [1]? I've just recently found it and it seems very nice. I didn't have the time to test it though. [1] https://hackage.haskell.org/package/DSH https://hackage.haskell.org/package/DSH
- nbouscal 12y agoIf all you've done is looked at tutorials and glimpsed at a book, I think it's very unlikely that you actually get the advantages or really understand any of the patterns like Monads. Write some code. The only way that you'll actually grok the language and get any of the benefits from learning it is if you actually write code in it.
- deleted 12y ago[deleted]
- nutate 12y agoI feel like the defunct PLEAC site page on Haskell sums up most autodidactic folks experience with Haskell: http://pleac.sourceforge.net/pleac_haskell/index.html http://pleac.sourceforge.net/pleac_haskell/index.html Oh cool, you can do everything, right up to something useful. At which point you should use this library for side effects, no wait, this new library, oh wait, have you tried this new feature that's only in the latest GHCi and w/ the right Data import? ... eh, maybe I'll pass. Still doesn't stop me from playing around now and thien. Right now the resources here: http://www.seas.upenn.edu/~cis194/ http://www.seas.upenn.edu/~cis194/ and the new book Beginning Haskell, seem to be alright.
- yiransheng 12y agoThis tutorial itself has a zip file of non-trivial examples, if you scroll down to the last section.