Live data from Hacker News

How we secretly introduced Haskell and got away with it

tech.channable.com

61–70 of 188 posts

Re: How we secretly introduced Haskell and got away with it

#61
post #59
post #49

Earlier quoted context omitted.

Given the awfulness of so many OOP-based frameworks that I encountered in the 90s, I began to seriously consider that OOP wasn't a better paradigm for most things and that instead it was worse , and simply caused people to rewrite code to the point that it overcame the procrustean bed of inheritance and whatever other tools the language of choice was providing.

My personal suspicion is that the problem there wasn't OOP, it was frameworks.

… and dogma. There was a lot of blather about hour Everyone Serious needed this complex structure and a lot of people superstitiously followed it without asking whether e.g. advice from a 2k engineer megaproject in a different industry was applicable to their 3 person in-house app.

The modern counterpart is probably scalability — I see a lot of parallels in all of the Google/Facebook-envy applied to “big data” problems which can fit on an iPad.

Re: How we secretly introduced Haskell and got away with it

#62

Nice article. Out of curiosity, what does your write with? Vim/ghc-mod? Emacs/Intero? IntelliJ IDEA/plugins? Atom/VSCode etc.?

I tried spacemacs once but I found it too magic. I decided I should learn proper emacs instead of running a random playbox of plugins ontop of plugin. But haven't had the time to properly learn emacs yet. I have tried various haskell plugins for vim in the past, but they always tended to break so I gave up fixing my config and threw them all away. Now it's just plain vim (with some non-haskell related plugins) Next t…

Have you tried running tests from stack repl --test? Its so much faster. Id love if i could use file-watch and the repl together.

Re: How we secretly introduced Haskell and got away with it

#63
post #57
post #32

Earlier quoted context omitted.

Maturity comes from: * Millions of person-hours being poured into a language... * ...Over a long enough time period that the language can go through several develop-eval-improve cycles - that take real world use cases (And not one-liner bubble sort implementations) into account. In this sense, it doesn't matter whether or not Haskell was invented in 1890, or 1990. #2 is required for maturity, but so is #1. (I am not…

You can't get 9 women together and produce a baby in 1 month. A lot of developments within a programming language ecosystem originate from new ideas discovered outside of it. It doesn't matter how many people you have working on a project if the crucial piece of tech they need hasn't been discovered yet.

No, but you also can't study 1 woman having 9 babies, and conclude yourself an expert on pregnancy. I'll prefer to get my advice from the doctor who studied 9 women, having one baby each. Note what I said about a mature language having to go through several write-eval-improve cycles.

Diversity matters. A language that one person tinkered on for thirty years is far less likely to be useful, then one that ten people tinkered on for three years. Or, in the case of Python vs Haskell, a hundred people who tinkered on it for twenty-five years.

Re: How we secretly introduced Haskell and got away with it

#64
post #28

I'm the author of the post. I'll be happy to answer any of your questions :)

Thanks for the write up! In the beginning you mention that you ran into some bugs in the Python version that would have been caught by the Haskell type checker. Can you go into more detail about what those bugs were?

I'm wondering if integrating MyPy into the build, or even using Cython for performance, could have helped.

Re: How we secretly introduced Haskell and got away with it

#65
post #42

While it's an interesting look at a change you introduced, that blog title might not come across quite as intended. If you're having to "secretly introduce" tech, and "get away with it", that suggests there are unnecessary and unproductive constraints on your work; maybe even suggesting that you'd get in trouble for actually daring to make things better.

The "secretly" part refers to part of the story where we had 1 hour to build up quick prototype to pitch to our boss. The title is a bit tongue-in-cheek. It's not that we built this thing in secret for months and then just deployed it. That's also not what the article says :)

We had been planning on replacing Scheduler for a while now, and had already written down some mumblings about what the new design should look like. We were also already discussing whether we would switch away from python back then.

I think the exact opposite of what you are saying is true. We got the freedom to experiment with something new, and to actually make things better along the way.

Re: How we secretly introduced Haskell and got away with it

#66
> No messing around with virtualenvs and requirement files. Everybody builds with the same dependency versions. No more “works on my machine” and “did you install the latest requirements?”.

While this is nice, of course, I'm not sure that is outcome is unique to Haskell/Stack. It seems like you could accomplish a similar level of reproducibility by building a Docker image or bundling dependencies in some other way.

Re: How we secretly introduced Haskell and got away with it

#67
post #48

Earlier quoted context omitted.

I guess this is true if you don't need to interact with any system libraries.

Could you give an example of what "system libraries" would pose a problem in my example of using Rust with cargo? Also note that by "no runtime installed" I mean no runtime as in "no Python runtime", "no JVM" etc. not necessarily "no libc" EDIT: formatting

>Could you give an example of what "system libraries" would pose a problem in my example of using Rust with cargo?

Specifically things like xorg libs, libmpeg, libsdl, and such. Not that Rust would have a problem interfacing with them, just that they would need to be present regardless of whether or not someone was just trying to run a distributed binary.

Agreed that you wouldn't need a VM like CPython or the JVM. However, Rust isn't unique in that department. Almost all languages that compile to binary executables have this advantage.

Re: How we secretly introduced Haskell and got away with it

#68
post #38

I'm just starting with Haskell and PureScript. So far I'm liking the latter better. It solves a few of their gripes with respect to strings, laziness and records, plus has a more granular/extendable effects system and cleans up the standard typeclass hierarchy. Also `head []` doesn't crash. Of course Haskell is more mature, has support for multithreading and STM, compiles to native, so it's more performant. But PureS…

I can't imagine using a haskell-like language without laziness. It's what makes it possible to actually write small reusable functions.

Tell me, have you ever used foldr in Purescript? It just doesn't lead to reusable logic there, so I have no idea why you would.

But in Haskell, foldr is used everywhere. Laziness means that logic built with it is actually reusable.

Re: How we secretly introduced Haskell and got away with it

#69
post #42

While it's an interesting look at a change you introduced, that blog title might not come across quite as intended. If you're having to "secretly introduce" tech, and "get away with it", that suggests there are unnecessary and unproductive constraints on your work; maybe even suggesting that you'd get in trouble for actually daring to make things better.

The "secretly" part refers to part of the story where we had 1 hour to build up quick prototype to pitch to our boss. The title is a bit tongue-in-cheek. It's not that we built this thing in secret for months and then just deployed it. That's also not what the article says :) We had been planning on replacing Scheduler for a while now, and had already written down some mumblings about what the new design should look…

>I think the exact opposite of what you are saying is true. We got the freedom to experiment with something new, and to actually make things better along the way.

Sure, and from what I read I mostly took it that way. My original point was just that maybe a bit of caution would be good in the choice of title. If I was just skimming through the titles on HN, or skimming the article, it could be easy to get the wrong impression of channable.

Re: How we secretly introduced Haskell and got away with it

#70
post #6

In the 1990s I did research on the efficacy claims of object oriented programming versus procedural programming. This article bares a striking resemblance in the claims. Case study after case study showed that object oriented code had less bugs due to compilers catching bugs, etc. However, almost every study was similar to this report: it was a re-write from procedural to object-oriented. There exists strong evidence…

s/bares/bears/
Post reply on HN