5 ms·
I've toyed with Haskell before (enjoy toying with languages in my spare time). Its a nice language, that has a good community. But for some reason I could not s
by bliti 11y ago
I've toyed with Haskell before (enjoy toying with languages in my spare time). Its a nice language, that has a good community. But for some reason I could not see myself using it as one of my main goto (no pun intended) languages. Not due to any technical reason. Mostly because there is no easy introduction into it. No small projects to undertake showing what practical uses it might have. No twitter clone using SQLite (laugh all you want, this type of tutorial project helps understand how the language should be used and showcases libraries). Its just seems purely about doing math with it. But Im probably wrong. Last time I looked into it was about a year ago. I'll gladly look again if anyone can comment about it.
- Chlorus 11y agoHave you checked out Real World Haskell by Bryan Sullivan? It's different than most Haskell resources I've found in that it introduces you to monads & IO fairly quickly, so you're not trapped with toy math problems. That was an issue I had with Learn You a Haskell for Great Good - finding the sum of all odd squares that are smaller than 10,000 is good and all, but not exactly a programming problem I have often...
- bliti 11y agoI have not. Will do so now. Thank you for recommending it. For anyone interested, here is the direct link to the online version of the book: http://book.realworldhaskell.org/read/ http://book.realworldhaskell.org/read/
- danidiaz 11y agoI have found micro-web frameworks like Spock https://www.spock.li/ https://www.spock.li/ or Scotty are a good way to "get something started" in Haskell. With that, "aeson" for JSON, "sqlite-simple" for persistence and perhaps something like "lucid" for HTML, you are half-way to that twitter clone... :)
- radmuzom 11y agoNote that the book is a bit dated, though most chapters are still "valid". See this question from Stackoverflow [1] - Which parts of Real World Haskell are now obsolete or considered bad practice? [1] http://stackoverflow.com/questions/23727768/which-parts-of-real-world-haskell-are-now-obsolete-or-considered-bad-practice?rq=1 http://stackoverflow.com/questions/23727768/which-parts-of-r...
- bliti 11y agoAny alternatives available?
- radmuzom 11y agoThis looks good but I have not personally tried the courses mentioned at the top of the article - https://github.com/bitemyapp/learnhaskell https://github.com/bitemyapp/learnhaskell
- acconsta 11y agoI've had some success with this, published last year: http://www.amazon.com/Beginning-Haskell-A-Project-Based-Approach/dp/1430262508 http://www.amazon.com/Beginning-Haskell-A-Project-Based-Appr...
- evincarofautumn 11y agoI’ve been fortunate enough to use Haskell professionally at 2 jobs, and it’s been my go-to language for hobby projects for a few years. I find it useful for infrastructural-type projects where people would ordinarily reach for a managed imperative language such as Java or C#. The main advantage for me is in code reuse and refactoring, something that really shines for medium-to-large projects, and is unfortunately hard to showcase in tutorial style. Getting started wasn’t easy, but as you imply, not really due to the language—mainly because the learning materials didn’t suit me. I couldn’t bring myself to finish Learn You a Haskell or any other tutorial, so I just used the language to build stuff and figured things out. Been thinking about writing a book about my experiences, but it’s Yet Another Project I’ll have to make the time for…
- mateuszf 11y agoWhat do you mean by refactoring? Automated tools to do that? Why would manual refactoring be better than let's say in more dynamic languages?
- pjmlp 11y ago> Why would manual refactoring be better than let's say in more dynamic languages? The compiler won't let you generate an executable if you missed a code location. Whereas in dynamic languages you never know if you have covered all the code locations.
- mightybyte 11y ago> No twitter clone using SQLite How about a URL shortener instead of a Twitter clone? https://github.com/ryantrinkle/memoise https://github.com/ryantrinkle/memoise Video here: https://vimeo.com/59109358 https://vimeo.com/59109358
- kevin_thibedeau 11y ago> No small projects to undertake showing what practical uses it might have Pandoc (http://pandoc.org/ http://pandoc.org/) is written in Haskell and its modular design makes it easy to peruse without understanding everything.
- haxeny1 11y agoI would recommend Michael Snoyman's book on yesod (http://www.yesodweb.com/ http://www.yesodweb.com/) to get a practical understanding specially from a crud perspective. I found this book to be very helpful: http://chimera.labs.oreilly.com/books/1230000000929/pr01.html http://chimera.labs.oreilly.com/books/1230000000929/pr01.htm... For me, using yesod has been quite a revelation. All of the errors in db operations get caught during my cabal build. This link https://github.com/yesodweb/yesod/wiki/ghci https://github.com/yesodweb/yesod/wiki/ghci is something i used to test my db code all within the repl cycle after setting some pg env variables. All in all, its way smoother than many other environments i have worked with.
- dllthomas 11y agoI've reached for Haskell for a number of small, scripty projects and the experience has been good. Not much better or worse than a similarly small scripty thing would have been in any other language. Haskell shines the brightest when refactoring a moderately sized project (I have been yearning for this, working in a smallish Python codebase), but nothing prevents using it for small things.