News for hackers. Stuff that matters.
Re:I tried Haskell for 5 years by choxi on Thursday May 04, 2017 @01:48PM (#14267016)
If anyone's curious to try out functional programming, I would highly recommend Elm. I haven't been so excited about a language since I went from C to Ruby ten years ago, and Pragmatic Studios has a great course on it (I have no affiliation): https://pragmaticstudio.com/courses/elm
Re:I tried Haskell for 5 years by pivotal on Thursday May 04, 2017 @04:35PM (#14268544)
I spent some time working through various Haskell books with varying success, then decided to do a code challenge (adventofcode.com) using Elm. I didn't finish, but after writing Elm for many days on end, suddenly Haskell clicked a lot more. The Elm compiler is far more friendly than Haskell's and will walk you through a lot of rookie mistakes and oversights.

I find Elm exciting, and with the prevalence of React/Redux these days, a lot of front end developers would be wise to familiarize themselves with the origin of many of the concepts borrowed from Elm.

Re:I tried Haskell for 5 years by nickpeterson on Thursday May 04, 2017 @07:04PM (#14269662)
I bought a few Haskell books but could never really grok it. In the last couple years I started learning f# and have found it's an incredible "intro to Haskell" language. I opened one of my Haskell books the other day and realized I understood everything much more quickly.
Re:I tried Haskell for 5 years by ode on Thursday May 04, 2017 @09:14PM (#14270406)
The same is true of OCaml.
Re:I tried Haskell for 5 years by insulanian on Friday May 05, 2017 @02:18PM (#14275599)
F# is a beautiful, pragmatic, functional programming language. It's a shame some people dismiss it due its Microsoft origins.
Re:I tried Haskell for 5 years by nickpeterson on Friday May 05, 2017 @09:08PM (#14278059)
Yeah, F# feels like Don Syme looked at ocaml and haskell and applied a bit of yagni and tossed in some other useful conventions (I'm sure many others were involved as well).

It drives me crazy that Microsoft doesn't push it harder from an investment perspective. They don't even write books about it :)

Re:I tried Haskell for 5 years by comp1927 on Tuesday May 09, 2017 @04:07AM (#14298436)
There are books out there. For new language adoption, F# do have new features like Type Providers. However, it's not the best language in X for X in ['data science', 'distributed system'] etc.
Re:I tried Haskell for 5 years by nickpeterson on Wednesday May 10, 2017 @09:02AM (#14307807)
Sorry, my language was vague. There are many F# books, but I find it telling that Microsoft Press doesn't really write books about it. Look at C#, VB.Net, Office, SQL Server, Sharepoint, etc. Almost everything has a new book (or 10) every new edition. F#? Nothing.
Re:I tried Haskell for 5 years by nijaru on Thursday May 04, 2017 @02:20PM (#14267310)
And Elm is implemented in Haskell ;]

I've been meaning to try Elm since I've been playing around with Haskell more and more. Purescript is relatively similar but allows you to build more than frontends. It seems Elm has grown quite a lot in popularity though.

Re:I tried Haskell for 5 years by dmix on Thursday May 04, 2017 @04:29PM (#14268498)
PureScript has great potential. I'm very excited for what it offers the future of Javascript and even Haskell. It's on a whole other level than Elm.

The only problem from my experience trying to use it in a project is that since it's alpha software a) it's changing so fast that APIs/libraries are very unstable to the point they are almost unusable if you try to follow newish releases (this was 6-8 months ago, I hope/expect stability has improved) and b) you have to be intimately familiar with Haskell.

As the OP's article describes about Haskell with PureScript the documentation situation is even worse, the documentation is 90% "hard" and 10% "soft". Which is fine if you know Haskell, or even a bit of Elm, but it's very tough coming in as a newbie of both Haskell and PS.

Re:I tried Haskell for 5 years by salimmadjd on Thursday May 04, 2017 @06:08PM (#14269301)
Elm is also my gateway drug into functional. And Pragmatic Studio was a great start.

Monads then seemed much easier to understand after Elm and reading this: http://adit.io/posts/2013-04-17-functors,_applicatives,_and_...

Re:I tried Haskell for 5 years by cbrewster on Thursday May 04, 2017 @01:52PM (#14267062)
I would also give a recommendation to elm. It is like a simpler version of Haskell and its relatively easy to build something quickly(no affiliation either).

I always had a hard time wrapping my head around functional programming, but elm was easy to understand and shows off the strengths of a functional approach.

Re:I tried Haskell for 5 years by tmountain on Thursday May 04, 2017 @04:39PM (#14268576)
I concur with your suggestion. As a longtime functional programmer (Lisp, Clojure, Erlang), Elm is one of my favorite languages of all time. I'm hoping to jump into Haskell next, and I feel like it's a great transition in that direction.
Re:I tried Haskell for 5 years by melling on Thursday May 04, 2017 @02:38PM (#14267488)
Elixir is mentioned on the page too. Does it complement Elm?
Re:I tried Haskell for 5 years by ShaneWilton on Thursday May 04, 2017 @02:52PM (#14267614)
Very much so. I'm increasingly seeing more and more projects that use Phoenix (Elixir) on the backend, and Elm on the frontend.

Here's an exciting example: https://github.com/dailydrip/firestorm

Re:I tried Haskell for 5 years by runeks on Friday May 05, 2017 @05:28AM (#14272156)
Side bonus to using Elm on the frontend: if your backend is written in Haskell, you can derive Elm types and functions to query your backend, giving you type safety from front to back.

https://hackage.haskell.org/package/elm-export

https://hackage.haskell.org/package/servant-elm

Re:I tried Haskell for 5 years by leshow on Thursday May 04, 2017 @04:30PM (#14268501)
I think a lot of Haskeller's will find Elm's type system to be limited and frustrating. Even for simple things the solution in Elm is that you have to write a bunch of boilerplate.
Re:I tried Haskell for 5 years by proaralyst on Thursday May 04, 2017 @04:37PM (#14268561)
I had this experience. However, starting out I think it'd be a much more gentle introduction.

For other haskellers, Purescript seems to solve this problem.

Re:I tried Haskell for 5 years by leshow on Saturday May 06, 2017 @11:59AM (#14280827)
I haven't gotten to give PS more than a cursory look but the row polymorphism and structural typing seems to really compliment JS semantics.