News for hackers. Stuff that matters.
Re:What Is Good About Haskell? by tiew9Vii on Thursday October 03, 2019 @06:45AM (#21145526)
They do exist.

I use

http://hackage.haskell.org/package/optparse-applicative for small cli apps

http://hackage.haskell.org/package/envparse For any Docker microservice

http://hackage.haskell.org/package/aeson-1.4.5.0/docs/Data-A... For all JSON work. Sometimes I’ll use it with lenses which is massively powerful but a rabbit hole

I’ll use http://hackage.haskell.org/package/stm when dealing with parallel execution

https://github.com/brendanhay/amazonka For anything dealing with AWS

https://github.com/haskell-works?tab=repositories Projects for Kafka and avro

http://hackage.haskell.org/package/warp For trivial micro services or Scotty if more than a few endpoints

http://hackage.haskell.org/package/persistent For dealing with Postgres

http://hackage.haskell.org/package/parsec For dealing with any text parsing.

The tools are available, they can make things like cli apps and micro services trivial. However if you have never used a ML language before you will have a steep learning curve as very different to C style/based languages.

I was once of the opinion Haskell is academic, what can you use it for in the real world. Then I studied with it, played with it admittedly on and off over 1-2 years, hit hurdles where I had to think as so different to what I’ve learnt before. Eventually it clicked, it’s very hard and frustrating now in my day job using typical enterprise or popular languages. It’s not about convincing, it’s about having a open mind and wanting to learn something different

Re:What Is Good About Haskell? by pytester on Thursday October 03, 2019 @07:47AM (#21145883)
"Packages exist for doing this" isn't the same thing as "this is a good ecosystem for doing this kind of work" though.

I'm fairly convinced that Haskell is good at preventing the kinds of bugs which you might run into writing, say, a parser or other kinds of very complex logical code, but I'm less convinced that the nature of the language helps with the kinds of issues you get hooking together APIs, databases, etc.

Re:What Is Good About Haskell? by marcosdumay on Thursday October 03, 2019 @08:24AM (#21146162)
Nearly all of those packages are best in kind, and most actually in a different league from anything that you'll get in another language.
Re:What Is Good About Haskell? by coldtea on Thursday October 03, 2019 @09:18AM (#21146581)
You assert this, but the parent asked for it to be shown...
Re:What Is Good About Haskell? by marcosdumay on Thursday October 03, 2019 @09:34AM (#21146741)
> show me what I need to know to do what I do

That's the only one occurrence I can find. I think the GGP made a good job of answering that.

I'm not going to walk over the differences as each of those would be a many hours task just for explaining.

Re:What Is Good About Haskell? by misterdoubt on Thursday October 03, 2019 @09:44AM (#21146845)
Sure, they exist. But pointing out that they exist is not "show me what I need to know to do what I do."

Instead, the next high-profile HN Haskell link will be the thousandth demo/intro/tutorial that yet again implements some core data structure.

Rather than showing how Haskell is great for working with databases.

Or working with Kafka.

Or integrating with AWS.

Or parsing text.

Or running microservices.

Or any of the other hundred things that I'm going to do a dozen times before I need to reimplement binary trees.

Re:What Is Good About Haskell? by johnday on Thursday October 03, 2019 @10:27AM (#21147339)
Each of these things is well-explained by the documentation of the respective libraries. I'm not sure why you feel like you need someone to write you a long-form story in order to learn how to do these things; convince yourself of the merits that others already see.
Re:What Is Good About Haskell? by surt666 on Thursday October 03, 2019 @10:48AM (#21147624)
I disagree. Look at the difference in documentation for Haskells Amazonka versus Clojures Amazonica. There are no simple code examples to get you going. Took me forever as a Haskell newbie to get DynamoDb integration working. In Clojure I just copy an example and play with it
Re:What Is Good About Haskell? by johnday on Thursday October 03, 2019 @10:58AM (#21147772)
Are the code examples in eg. http://hackage.haskell.org/package/amazonka-1.6.1/docs/Netwo... not sufficient?
Re:What Is Good About Haskell? by surt666 on Friday October 04, 2019 @05:23AM (#21156068)
The situation seems to have improved a bit since last I looked, but I still think it needs a basic howto about how to do stuff. I know you can figure most things out by looking at the types, but that's exactly where newbies lack experience, and you have search quite a bit for the information here, but thanks for the link. It's definitely better than it was
Re:What Is Good About Haskell? by johnday on Friday October 04, 2019 @10:09AM (#21157843)
Yes, there is definitely no single through-line from "i know nothing" to "I can now program a microcontroller in Haskell" or whatever. It's a language which grew out of academia and still has a whiff of self-learning about it.
Re:What Is Good About Haskell? by lallysingh on Thursday October 03, 2019 @10:04AM (#21147043)
Because they're boring and nobody wants to vote them up.
Re:What Is Good About Haskell? by Beltiras on Thursday October 03, 2019 @07:01AM (#21145620)
Those look really promising. My boss is big on TDD and open to developing cutting edge technologies. I'm going to have a look and see if I can propose a project using these tools.
Re:What Is Good About Haskell? by polymatter on Thursday October 03, 2019 @08:37AM (#21146247)
In case you're serious https://tech.fpcomplete.com/haskell/promote may help.
Re:What Is Good About Haskell? by gowld on Thursday October 03, 2019 @09:58AM (#21146987)
FP Complete is a consulting company. They promote Haskell, and they boast about getting hired to help a company analyze their code base to fix a space leak. I wouldn't trust my business to a language that requires hiring a consulting firm to do fundamental debugging. I've written memory leaks, but never needed to hire consultants to debug them.
Re:What Is Good About Haskell? by lallysingh on Thursday October 03, 2019 @10:05AM (#21147069)
Consulting is rarely about helping problems that too hard to fix by a good developer. They're often about helping problems that the customer doesn't want to put (or hire) good developers on.
Re:What Is Good About Haskell? by erik_seaberg on Thursday October 03, 2019 @06:41PM (#21153019)
Haskell is lazy by default, and sometimes builds up large unevaluated expression trees that need to be forced. Other languages are eager, but litter the code with abstractions like Callables and Futures and channels just to not do something.
Re:What Is Good About Haskell? by tramav on Thursday October 03, 2019 @02:11PM (#21150040)
Does Data.Aeson parse JSON as UTF-8 and numbers as decimal? You know, in real world business applications we don't use float/double or ASCII.
Re:What Is Good About Haskell? by pwm on Thursday October 03, 2019 @04:04PM (#21151495)
Of course. It uses the Text [0] and Scientific [1] packages under the hood. The internal ADT representing JSON is actually very simple (as json is very simple itself):

  data Value
    = Object (HashMap Text Value)
    | Array (Vector Value)
    | String Text
    | Number Scientific
    | Bool Bool
    | Null

[0] http://hackage.haskell.org/package/text-1.2.3.1/docs/Data-Te...

[1] http://hackage.haskell.org/package/scientific-0.3.6.2/docs/D...

Re:What Is Good About Haskell? by gowld on Thursday October 03, 2019 @09:54AM (#21146945)
Haskell makes you hate your day job, but doesn't offer you a better day job, because it is a tease of something better.