News for hackers. Stuff that matters.
Re:Functionally Solving Problems With Haskell by bsamuels on Saturday April 05, 2014 @02:10PM (#7537877)
As a side-note, if you want to get into functional programming but don't want to make the full leap into "PURE EVERYTHING MUST STAY CLEAN DONT BREAK THE RULES" world of Haskell, F# is another excellent choice for a beginner functional lang. You can program in either OOP or functional style, letting you take your time with the transition.

I also toot F#'s horn because it has an amazing resource for learning how to use functional style in your programs: http://fsharpforfunandprofit.com/site-contents/

A few pages on that site did more for me regarding functional programming than the entirety of LYAH did, and it also has a very nice monad tutorial: http://fsharpforfunandprofit.com/posts/computation-expressio...

Re:Functionally Solving Problems With Haskell by anon_d on Saturday April 05, 2014 @05:09PM (#7538461)
Also, if you don't want to make the full leap into "PURE EVERYTHING MUST STAY CLEAN DONT BREAK THE RULES" style code, try Haskell. Imperative programming in Haskell is great! The language evaluation rules may be purely function, but your code doesn't need to be.
Re:Functionally Solving Problems With Haskell by coolsunglasses on Saturday April 05, 2014 @10:01PM (#7539353)
To provide an example of why this is complete and utter nonsense, BEHOLD, an example of imperative AND mutable programming in Haskell:

http://bitemyapp.com/posts/2014-03-25-when-nested-io-actions...

Re:Functionally Solving Problems With Haskell by JadeNB on Sunday April 06, 2014 @12:53AM (#7539813)
> To provide an example of why this is complete and utter nonsense, BEHOLD, an example of imperative AND mutable programming in Haskell:

It seems that 'this' here must not refer to the parent post (https://news.ycombinator.com/item?id=7538461):

> Also, if you don't want to make the full leap into "PURE EVERYTHING MUST STAY CLEAN DONT BREAK THE RULES" style code, try Haskell. Imperative programming in Haskell is great! The language evaluation rules may be purely function, but your code doesn't need to be.

with which you seem to be agreeing. Perhaps it refers to the grandparent post (https://news.ycombinator.com/item?id=7537877), specifically to its implicit claim that Haskell programming involves "PURE EVERYTHING MUST STAY CLEAN DONT BREAK THE RULES"?

Re:Functionally Solving Problems With Haskell by coolsunglasses on Sunday April 06, 2014 @03:18PM (#7542309)
Correct, I agree with anon_b and it's very obvious bsamuels hasn't built anything in Haskell.
Re:Functionally Solving Problems With Haskell by krick on Saturday April 05, 2014 @02:17PM (#7537908)
> don't want to make the full leap into "PURE EVERYTHING MUST STAY CLEAN DONT BREAK THE RULES"

I really like Standard ML in that sense. Unfortunately, seems to be fading away in sense of popularity.

Re:Functionally Solving Problems With Haskell by JadeNB on Sunday April 06, 2014 @12:57AM (#7539821)
Do you know any good guides to getting started with SML, as LYAH and similar allow one to do with Haskell? Also, can you recommend any particular implementation?
Re:Functionally Solving Problems With Haskell by stesch on Saturday April 05, 2014 @02:13PM (#7537892)
Not everybody uses Windows.

F# is a .NET language.

Re:Functionally Solving Problems With Haskell by Tehnix on Saturday April 05, 2014 @02:31PM (#7537953)
Re:Functionally Solving Problems With Haskell by levosmetalo on Saturday April 05, 2014 @04:26PM (#7538317)
Are you serious?
Re:Functionally Solving Problems With Haskell by Tehnix on Saturday April 05, 2014 @05:08PM (#7538459)
Care to elaborate on that?
Re:Functionally Solving Problems With Haskell by JadeNB on Sunday April 06, 2014 @12:56AM (#7539818)
I suspect that levosmetalo (https://news.ycombinator.com/item?id=7538317) is referring to the common perception (on whose correctness I cannot comment) that Mono has considerable drawbacks, a perception to whose existence a quick Google search will attest (https://www.google.com/search?q=Mono+drawback).
Re:Functionally Solving Problems With Haskell by a-nikolaev on Saturday April 05, 2014 @05:52PM (#7538598)
Use OCaml, it is open source, free and unux friendly. In fact, F# is an adaptation of OCaml for .NET platform.
Re:Functionally Solving Problems With Haskell by bsamuels on Saturday April 05, 2014 @02:14PM (#7537898)
F#'s compiler is open source.

The language can compile into CIL, javascript, and a handful of other build targets.

Re:Functionally Solving Problems With Haskell by liammclennan on Saturday April 05, 2014 @11:00PM (#7539516)
"can compile into ... javascript"

I don't believe this is true, at least not easily.

Re:Functionally Solving Problems With Haskell by MichaelGG on Sunday April 06, 2014 @12:05AM (#7539669)
Pit and WebSharper are two examples that can turn F# into JS.
Re:Functionally Solving Problems With Haskell by kleisli on Saturday April 05, 2014 @02:53PM (#7538025)
Have you ever noticed that in every post about fp languages there is always a mention about using f#. I've never seen any language-advertisements at this level.
Re:Functionally Solving Problems With Haskell by wwwwwwwwww on Saturday April 05, 2014 @02:55PM (#7538031)
Have you ever noticed that in every post about fp languages there is always a mention about using Haskell. I've never seen any language-advertisements at this level.
Re:Functionally Solving Problems With Haskell by raphaelj on Saturday April 05, 2014 @02:28PM (#7537946)
Since I learned Haskell and it became my first language years ago, I was used to not be surprised by other language features. The "Haskell does it better" syndrome.

Anyway, I needed to do a small .NET work two years ago. I choose to try F#. It was the first and only time I got highly please by another language features. Actually, I've to admit that I was pissed of : F# may well be a better language than Haskell.

Re:Functionally Solving Problems With Haskell by Dewie on Saturday April 05, 2014 @02:51PM (#7538021)
So what features sets F# apart?
Re:Functionally Solving Problems With Haskell by tel on Saturday April 05, 2014 @02:55PM (#7538032)
The ones I've been envious of (as a Haskell developer) include .Net library integration, type providers, and active patterns.
Re:Functionally Solving Problems With Haskell by raphaelj on Saturday April 05, 2014 @04:33PM (#7538341)
Type providers when using a remote API blown my mind.
Re:Functionally Solving Problems With Haskell by manilafolder on Saturday April 05, 2014 @08:53PM (#7539135)
I'm sorry for my ignorance, but there's something about type providers I just can't wrap my head around.

It seems like the primary purpose of using a typed provider is so that the types (classes) can dynamically change during runtime (for example, you get different table objects for the different connection strings you pass in). But how do you program a client against an API that can change at will? Is your client code just basically doing runtime reflection on the data the type provider returns?

Re:Functionally Solving Problems With Haskell by liammclennan on Saturday April 05, 2014 @11:01PM (#7539519)
My understanding is that type providers define the types at compile time.
Re:Functionally Solving Problems With Haskell by MichaelGG on Sunday April 06, 2014 @12:07AM (#7539679)
As far as I can tell, Type Providers are just a slicker way of having external codegen tools. So instead of "SoapToVBCode.exe" you have it wrapped up in a type provider and can just do "type MySoap = SoapProvider<http://wsdl>".

It seems like a useful feature but far from the power of having full macros.

Re:Functionally Solving Problems With Haskell by mtct on Saturday April 05, 2014 @02:22PM (#7537926)