Live data from Hacker News

I tried Haskell for 5 years

metarabbit.wordpress.com

81–90 of 273 posts

Re: I tried Haskell for 5 years

#81
post #76

The thing with enlightenment level ideas isn't that they aren't enlightening but that they attract hype. Individuals pretending to be enlightened if you will. A scientific mindset as well as liberalism are also ideas where new proponents often want to draw a line in the sand to stratify people into superior and inferior. The original proponents were chasing a higher level of quality for all, but the need for social s…

I'm confused. Can you tell me how your comment relates to the article?

The author of the article is sharing his experience with Haskell, explaining ups and downs. He concludes by

> Haskell is a great programming language. It requires some effort at the beginning, but you get to learn a very different way of thinking about your problems.

Are you interpreting the word "different" as "better"?

Re: I tried Haskell for 5 years

#82
post #16

Question to the Haskell experts here. Is Haskell more academic in nature or used heavily in Production environments? Is there an application sweet spot/domain (say Artificial Intelligence/Machine Learning, etc) where it shines over using other languages (I am not talking about software/language architectural issues like type systems or such)? I have no experience with Haskell but do use functional languages such as E…

Haskell works really well for things revolving around languages.

At SQream (www.sqream.com), Haskell is used for CLI, SQL parser, SQL language compiler, SQL optimizations and a variety of tools.

We also use Haskell to generate Python code for testing (think: describing a testing scenario and sets of queries, translating into a runnable, predictable Python script that's easy to debug)

Re: I tried Haskell for 5 years

#83
post #37
post #12

> very hard to understand why a function could be useful in the first place So true. https://hackage.haskell.org/package/base-4.9.1.0/docs/Contro... > mfix :: (a -> m a) -> m a > The fixed point of a monadic computation. mfix f executes the action f only once, with the eventual output fed back as the input. Hence f should not be strict, for then mfix f would diverge. But why tho?

Ubiquitous single-letter symbols mapping to who-knows-what possible things, pnflly abvted fncn nms, and unclear motivations for code are what I've bounced off of with Haskell every time I've tried to dig in. The community seems to have adopted all the worst parts of mathematics culture, along with whichever good parts they've brought in.

Serious question. In the following code, what would be better function / type names? (or you can pick another bit of Haskell code that you know and/or have particular trouble understanding).

    class Foldable t where
        foldl :: (b -> a -> b) -> b -> t a -> b

Re: I tried Haskell for 5 years

#84

> The same is not true of Haskell. If you have never looked at Haskell code, you may have difficulty following even simple functions. Why is it that people talk about this almost as if it's done virtue of the language? As if the fact that's it's so inscrutable proves that it's valuable, different, and on a higher plane of computing.

It's merely different. It's like using Prolog for the first time, you're likely to find it very unfamiliar.

Re: I tried Haskell for 5 years

#85
post #3

we should forbid click bait titles on HN, it's an insult to the audience's intelligence Clickbait title are so common we think they're normal titles.... Here's how he did it: you create a craving for an answer then you offer a solution for that craving. "here’s how it was" ==> that's the trick Also "here’s how" should never be used in a title, we all know that the title's subject IS what you're going to talk about. a…

Do you think this title is clickbait? I just read the thing it seems like a good title.

It's "baitish-feeling at first", just missing the tailing "and here's what happened" --- but --- at this point I think this style is just starting to become assimilated into general "unintended" blogging/writing style..

The other day, I saw some Medium post titled "Functional programming will make you happier". I was furious and about to blast some diatribe on the increasingly infantile-inanity-inflation-in-headlines but looking at the post, the author seemed genuine in taking the troubles to work out their thoughts to the reader, so I refrained.. tilting at windmills, increasingly people are simply growing up with these sorts of titles and develop a primal instinct for what gets attention and clicks --- aka, reads.

Re: I tried Haskell for 5 years

#86

Earlier quoted context omitted.

I just saw a haskell meetup where they're using haskell for devops. Basically static typing the underlying machine configurations. As usual, being an Haskell code, the abstraction is generalized and you can apply the logic on other domains.

https://propellor.branchable.com/ I would guess.

Good point, this was the first of the two libraries mentioned, the other has just been open sourced; it's called deptrack https://github.com/lucasdicioccio/deptrack

Re: I tried Haskell for 5 years

#87
post #69
post #12

> very hard to understand why a function could be useful in the first place So true. https://hackage.haskell.org/package/base-4.9.1.0/docs/Contro... > mfix :: (a -> m a) -> m a > The fixed point of a monadic computation. mfix f executes the action f only once, with the eventual output fed back as the input. Hence f should not be strict, for then mfix f would diverge. But why tho?

Here's a practical application of mfix: mfix $ \threadId -> forkIO $ do -- computation in forked thread forkIO creates a new thread and returns its thread id. However, in order to access the returned thread id inside the forked computation, normally one would have to store it in a variable and then read from it inside the thread. mfix, by nature of its laziness, captures the return value of the function passed to it,…

It's a very neat example, and I like it very much as an illustration of mfix, but wouldn't one just use Control.Concurrent.myThreadId for that? Seems a little overkill.

Re: I tried Haskell for 5 years

#88
post #48

Earlier quoted context omitted.

We use Haskell in production at lumi.com for our backend/API. We've found it very productive and easy to maintain.

React, HapiJS, RethinkDB, Node and Haskell. That might be the coolest stack ever. Do you have any FOSS project on Github?

been a nodejs dev for years but I've recently found react, typescript, elixir and rust more to my liking with python for ML stuff.

Good Type safety seems to be an acquired taste.

Re: I tried Haskell for 5 years

#89
post #53

Earlier quoted context omitted.

Production use cases pushed me towards Haskell. What elegance there is serves towards reasoning about the correctness of complex code, however the tradeoff is difficulty in reasoning about performance. You can still get great performance! And I use it for prototyping in the Type-Driven Development style. Strongly disagree with "if it compiles it is correct" but we have great tools like Doctest and QuickCheck for that…

> reasoning about the correctness of complex code, however the tradeoff is difficulty in reasoning about performance That's what drove me to languages like OCaml and Rust, which try to solve this tradeoff in a different way: Same thing about strictness and correctnes (despite slight differences in the type system), but lazy evaluation is only provided when explicitly asked for. The cool thing about OCaml is that you…

> The cool thing about OCaml is that you can actually reason about performance, as long as you ignore memory issues (memory usage, garbage collector runs, etc.).

If you ignore mem issues you can also reason about the performance of Haskell :)

If we want to reason about perf, I think Rust is currently leading in terms of a modern language that allows perf reasoning.

Re: I tried Haskell for 5 years

#90
post #46
post #28

Earlier quoted context omitted.

I think I can safely say it isn't used heavily in many production environments but it is used heavily in some. For example, one of Facebook's abuse systems, dealing with 1M requests per second is written in Haskell: https://code.facebook.com/posts/745068642270222/fighting-spa... As for particular places where it shines, I don't know of any in particular. I remember when taking my Declarative Programming course in uni…

> I can't find any details on this experiment though... Probably this one: http://www.cs.yale.edu/publications/techreports/tr1049.pdf But take it with some sacks of salt -- it's a single research paper. It should be replicated, peer reviewed, etc to have any merit. It's methodology could be totally crap for example...

It is really interesting. I do get the feeling that the researchers really wanted Haskell to win, though. It would be nice if researchers with other favorite languages also arrived at the same conclusion.
Post reply on HN