Live data from Hacker News

The Haskell user experience

rickdzekman.com

31–40 of 50 posts

Re: The Haskell user experience

#31
post #26

Haskell has all the features of languages that become mainstream and mandated top-down on workplaces. I wouldn't be much surprised if in a decade people start complaining about Haskell-shops they way we complain about Java-shops now. (But then, no language could get there without a marketing budget...) Haskell lets big teams collaborate very well, makes it hard to bad coders to destroy an entire project, consist in a…

That package looks useful. Thanks for sharing!

Just keep in mind that it's not very mature. In particular, expect the TLS settings to change in the future.

Re: The Haskell user experience

#32

My experience with learning Haskell was: When it works, it's magical. Finally realising that monads allow little bubbles of cause-and-effect. STM, which is utterly magical. Realising that not having side effects is freeing, not restricting. Collapsing huge chunks of code into little bits of pattern matching. Finding myself casually using a higher-order type because it was the easiest way to solve a problem. When it's…

Personally, I've been spending a lot of my recent time trying to debug a Parsec parser (it seems to be going into loops of backtracking, but I can't figure out where and why ), and it's been a clusterfuck. * `trace` and `traceM` don't actually get evaluated, so I can't use printing to find my bugs. * Even putting `trace "..." True` as a guard to my parser combinators doesn't seem to actually print anything. * `seq` a…

Using the trace trick needs to guard on False:

  myfun a b | trace ("myfun " ++ show a ++ " " ++ show b) False = undefined
  myfun a b = ...
See here for some other helpful trace functions:

https://hackage.haskell.org/package/base-4.8.1.0/docs/Debug-...

There is even a traceStack which will print a call stack if available.

Re: The Haskell user experience

#33
post #18

My experience with learning Haskell was: When it works, it's magical. Finally realising that monads allow little bubbles of cause-and-effect. STM, which is utterly magical. Realising that not having side effects is freeing, not restricting. Collapsing huge chunks of code into little bits of pattern matching. Finding myself casually using a higher-order type because it was the easiest way to solve a problem. When it's…

And you haven't even mentioned Cabal, which is arguably the single worst thing about the Haskell ecosystem.

I loathe and detest user-mode packaging systems, so I actually installed my packages via Debian and then built my app using ghc --make. Which, BTW, works beautifully. So I never had to touch hackage or cabal. Luckily.

Re: The Haskell user experience

#34
post #18

My experience with learning Haskell was: When it works, it's magical. Finally realising that monads allow little bubbles of cause-and-effect. STM, which is utterly magical. Realising that not having side effects is freeing, not restricting. Collapsing huge chunks of code into little bits of pattern matching. Finding myself casually using a higher-order type because it was the easiest way to solve a problem. When it's…

And you haven't even mentioned Cabal, which is arguably the single worst thing about the Haskell ecosystem.

Cabal itself is fine. The problems are

(1) Haskell is a compiled language, so you need to compile everything locally

(2) Libraries are unstable, because they are young and authors are too creative, so dependencies are unstable.

Maven, and whatever Python and Ruby have, can ship you everything you need to run. (Except for things that depend on C bindings, where they become just as painful as Haskell libs, for the same reasons)

Re: The Haskell user experience

#35
post #18

My experience with learning Haskell was: When it works, it's magical. Finally realising that monads allow little bubbles of cause-and-effect. STM, which is utterly magical. Realising that not having side effects is freeing, not restricting. Collapsing huge chunks of code into little bits of pattern matching. Finding myself casually using a higher-order type because it was the easiest way to solve a problem. When it's…

And you haven't even mentioned Cabal, which is arguably the single worst thing about the Haskell ecosystem.

Cabal itself is fine. The problems are

(1) Haskell is a compiled language, so you need to compile everything locally

(2) Libraries are unstable, because they are young and authors are too creative, so dependencies are unstable.

Maven, and whatever Python and Ruby have, can ship you everything you need to run. (Except for things that depend on C bindings, where they become just as painful as Haskell libs, for the same reasons)

Re: The Haskell user experience

#36

The Haskell Platform obscuring Cabal's existence bit me. I didn't know how to use Cabal, so for a while I didn't install any packages, or know the correct way to build them.

That's intentional and good. Bleeding-edge packages are a headache to manage, due to complex dependencies. You should really wring everything you can out of Platform, and feel like an advanced Haskell programmer, before dealing with Cabal.

Re: The Haskell user experience

#37

My experience with learning Haskell was: When it works, it's magical. Finally realising that monads allow little bubbles of cause-and-effect. STM, which is utterly magical. Realising that not having side effects is freeing, not restricting. Collapsing huge chunks of code into little bits of pattern matching. Finding myself casually using a higher-order type because it was the easiest way to solve a problem. When it's…

> A billion little unmemorable functions with symbolic names Pretty much. If you though Common Lisp was bad, this is much worse. And that makes for a major (re-)learning curve every time you stop programming in Haskell for a couple of months.

It'd be nice to be able to search by type declaration

Re: The Haskell user experience

#38
post #8
post #6

What I'd really appreciate (as one of those people who's read LYAH and is struggling to get going with real code) is a Haskell equivalent of Effective Java or Effective C++.

Not sure if it's relevant, and unfortunately it's a bit outdated, but have you seen Real World Haskell? Also related is Beginning Haskell – A Project Based Approach.

Real World Haskell is obsolete and is about libraries, not the language.

The "Effective" stuff is language-level lessons like:

* http://dev.stephendiehl.com/hask/

* https://twitter.com/haskelltips (someone should organize the archive)

* http://www.slideshare.net/tibbe/highperformance-haskell

Re: The Haskell user experience

#39
post #37

Earlier quoted context omitted.

> A billion little unmemorable functions with symbolic names Pretty much. If you though Common Lisp was bad, this is much worse. And that makes for a major (re-)learning curve every time you stop programming in Haskell for a couple of months.

It'd be nice to be able to search by type declaration

Hoogle lets you do exactly that, with fuzzy matching:

https://www.haskell.org/hoogle/?hoogle=a+-%3E+[b]

It's as useful as you might hope!

Re: The Haskell user experience

#40
post #36

The Haskell Platform obscuring Cabal's existence bit me. I didn't know how to use Cabal, so for a while I didn't install any packages, or know the correct way to build them.

That's intentional and good. Bleeding-edge packages are a headache to manage, due to complex dependencies. You should really wring everything you can out of Platform, and feel like an advanced Haskell programmer, before dealing with Cabal.

I think that sentiment adds to the list of things that make it hard for someone to go from an intermediate level of skill to advanced level of skill.
Post reply on HN