1. 16
  1.  

  2. 13

    When I’m talking to people who are evaluating Haskell and trying to determine its risks, these things never come up. It’s always the same thing which can essentially be summed up as “library support”

    • Can I do MVC web dev?
    • How do I keep the code in sync with the database (migrations)?
    • How do I do performance (response time) monitoring?
    • Can I still use papertrail (or similar logging aggregation/search service)?
    • What’s the equivalent to getsentry.com for haskell?
    • How do I do continuous deployments from <my favorite CI service>?

    The flaws Mitchell is addressing here real flaws that affect people that are already pretty deep in Haskell-land. All of the above still have unsatisfactory answers IMO, even though it certainly can be done.

    1. 14

      Can I do MVC web dev?

      Yes. Most of the Yesod apps I work on have models, controllers, and views. I used Clojure and Python (Django) before Haskell, so I know what people expect here and it’s fine.

      How do I keep the code in sync with the database (migrations)?

      http://hackage.haskell.org/package/persistent ( I streamed some of this and web dev last night: https://www.youtube.com/watch?v=uYXX1t3GrsE )

      How do I do performance (response time) monitoring?

      http://hackage.haskell.org/package/datadog

      http://hackage.haskell.org/package/statsd-datadog

      Can I still use papertrail (or similar logging aggregation/search service)?

      http://hackage.haskell.org/package/katip-elasticsearch + treasure or whatever you want really.

      What’s the equivalent to getsentry.com for haskell?

      Sentry. http://hackage.haskell.org/package/raven-haskell Might could use some fixing up, but I’ve used this in prod and it was fine.

      How do I do continuous deployments from <my favorite CI service>?

      rsync a binary from your CI build/run ansible, bounce the upstart daemon. Our deployment stuff is in Ansible.

      Also see: http://haskelliseasy.com for other questions like this.

      1. 3
        1. Can I do MVC web dev? yes with Yesod, Snap and Happstack web framework (but there are other paradigms that really are worth at least an exploration)
        2. DB sync, using Yesod and more generally persistent will handle naive case automatically forces you to write the right db migration. So at least with yesod and persistent you can’t run code on a non compatible DB.
        3. papertrail (never heard about this service), but I imagine this is a service similar to grayling and yes there is a package to support it
        4. getsentry support: yes (https://hackage.haskell.org/package/raven-haskell-0.1.0.1/docs/System-Log-Raven.html)
        5. CI: http://yannesposito.com/Scratch/en/blog/Haskell-Tutorials--a-tutorial/#continuous-integration

        In my opinion, Haskell is a language completely suitable for production if you want to use traditional paradigms.

        But Haskell has a lot more to offer. There are many paradigms shift done in Haskell. For example, you can take a look at transient (see this recent thread for example):

        https://www.reddit.com/r/elm/comments/4wq3ko/playing_with_websockets_in_haskell_and_elm/d69o11p

        You might dislike the syntax, and believe that the example is quite minimalist. But it show that while MVC has its virtues, it is not the alpha and omega of web development and there can be another way of thinking about a web application as we are used to.

      2. 2

        TLDR: Package Management, IDE, Space leaks, Array/String libraries

        I’d have to say, for me after rough package management and missing libraries, you’ve already lost my interest. It’s a neat toy until either package management gets fixed or the community finds a better way to share libraries.While I’ll miss the stricter enforcement of functional style I can always use F# with a linter, at least nuget/paket consistently works.

        1. 5

          Cabal is similar to raco pkg or easy_install. Stack is definitely better than pip. And you get to know when upstream screwed up and broken their API instead of learning it that hard way as in dynamically typed languages.

          1. 1

            Yeah package management imo is pretty much as good as any other language. Better in some ways as things actually break due to the types if things change. You notice pretty fast.

            IDE, I use emacs, so eh. Space leaks are annoying, but if you start using strict everywhere its not too bad I find. And Array/String nonsense is legitimate, though the upcoming backpack work should mitigate this not?

            I’m not saying haskell is without warts, but for a language as old as python its doing pretty good.

          2. 4

            If you read the post, you’d know that he said some of those things weren’t problems or have been attenuated, or have good solutions coming together.

            For day to day work, nothing is a blocking issue and never has been for me. People were building successful startups on Haskell many years before I started and back then things were worse across the board despite the language itself being a substantial advantage.

            Why do people do this slanted tl;dr thing? Is this a real attempt on your part at being constructive? (Sincere question)

            1. 0

              It is short for “too long, I didn’t read” - how can you be constructive after that?

              1. 2

                no it’s not - in this usage it’s short for “if you’re inclined to tl;dr the article, here’s a quick summary”. the “dr” is on the reader’s part, not the commenter’s.