Live data from Hacker News

Becoming Productive in Haskell

mechanical-elephant.com

71–80 of 213 posts

Re: Becoming Productive in Haskell

#71

Scripting languages try to seduce you to just fiddle around until the output looks like something you want. While that quickly gives you some results, I think it's a huge roadblock in the mid- to longterm. Especially when programmers are only familiar with "easy" scripting languages, there are rarely insights about the general approach to the problem until the project already grew to become an abomination. While fidd…

>While fiddling around is still somewhat possible in Haskell, the language itself makes it quite difficult. Haskell kind of forces you right at the beginning to pause and think "Well, what is it that I'm actually trying to do here?"... Wouldn't Scripting languages allows one to gradually build that understanding. Suppose you end up with a lot of complex code? Ditch it and build it from scratch. Usually takes around 1…

I think that's an interesting point, _if_ people actually do that. That said, I'm wary of the claim of 1/10th time and being able to iterate 3 or 4 times per every one iteration with Haskell. Sure, maybe when you're starting out, but once you become proficient I don't think that would be the case anymore. And, there's no guarantee that 3rd or 4th iteration will be as good as the well thought out Haskell code, since the first iterations may be prohibitively complex.

Re: Becoming Productive in Haskell

#72
post #4

> So, I started calling it Mappable. Mappable was easy for me to remember and was descriptive of what it did. A list is a Functor. A list is Mappable. I wish there was a language or library that was willing to take the Haskell functionality and just give it all names like this.

That would be wrong. Functors also describe things that aren't necessarily "mappable". The actual definition of functor is more general than that.

Re: Becoming Productive in Haskell

#73

The author's comments on noise chime true with me: every time I give Haskell a try I end up struggling with frustrating and opaque vocabulary, sometimes completely at odds with the way other languages use them: e.g. C++ also has functors, and they're completely unrelated to Haskell functors. I really like the author's suggestion of mentally translating Functor to Mappable. Are there any other synonyms for other Haske…

Functors and monads are somewhat not going to change their names, partly because Haskell derives from math and those are what they're called over there. But foldl' is horrible, I agree.

[deleted]

Re: Becoming Productive in Haskell

#74
Got sidetracked by this:

> "We store memories by attaching them to previously made memories, so there is going to be a tendency for your brain to just shut off if too many of these new, heavy words show up in a sentence or paragraph."

That has always been my belief. I don't have anything else to back it up, only that my own speed of learning seems to increase for new subjects with time. The more I know, the easier new concepts seem. Very few things are completely new, unless I start delving into subjects I'm completely unfamiliar with. Say, Quantum Mechanics.

With most programming languages, I (and probably many here) can learn enough to start creating something useful in a weekend. Haskell always gave me trouble because it seems to take longer than that.

Then again, so does Prolog. I'll try yet again.

Re: Becoming Productive in Haskell

#75

Nice article, i've been learning Haskell for about a month solving kata on http://www.codeswars.com/ using https://www.fpcomplete.com/ as my IDE. I'm finding it quite a learning curve understanding what library functions there are and how to use them. The code I write often ends up being quite different to the other solutions on codewars. I'm missing Visual Studio, are there any realy good Haskell IDEs out there? for…

Unfortunately, the state of debugging in Haskell, last time I checked, was pretty dismal.

Vim + ghcmod + syntastic has a useful subset of the functionalities of an IDE.

Re: Becoming Productive in Haskell

#76

Nice article, i've been learning Haskell for about a month solving kata on http://www.codeswars.com/ using https://www.fpcomplete.com/ as my IDE. I'm finding it quite a learning curve understanding what library functions there are and how to use them. The code I write often ends up being quite different to the other solutions on codewars. I'm missing Visual Studio, are there any realy good Haskell IDEs out there? for…

Unfortunately, the state of debugging in Haskell, last time I checked, was pretty dismal. Vim + ghcmod + syntastic has a useful subset of the functionalities of an IDE.

HI GUYS! PLEASE HELP ME! IS GOOGLE DNS DOWN?

Re: Becoming Productive in Haskell

#77
post #71

Earlier quoted context omitted.

>While fiddling around is still somewhat possible in Haskell, the language itself makes it quite difficult. Haskell kind of forces you right at the beginning to pause and think "Well, what is it that I'm actually trying to do here?"... Wouldn't Scripting languages allows one to gradually build that understanding. Suppose you end up with a lot of complex code? Ditch it and build it from scratch. Usually takes around 1…

I think that's an interesting point, _if_ people actually do that. That said, I'm wary of the claim of 1/10th time and being able to iterate 3 or 4 times per every one iteration with Haskell. Sure, maybe when you're starting out, but once you become proficient I don't think that would be the case anymore. And, there's no guarantee that 3rd or 4th iteration will be as good as the well thought out Haskell code, since t…

The point is that a scripting language is a "program to think" language, while haskell is often seen as a "think to program" language (at least when described as in the top level post). That you have to do more thinking and planning when using haskell (supposedly) doesn't help when the problem you are working on is not well understood and requires exploration (where you are forced to do exploration in your head...or on a whiteboard, rather than in code).

Re: Becoming Productive in Haskell

#78
post #4

> So, I started calling it Mappable. Mappable was easy for me to remember and was descriptive of what it did. A list is a Functor. A list is Mappable. I wish there was a language or library that was willing to take the Haskell functionality and just give it all names like this.

This is actually possible with the ConstraintKinds extension in GHC. type Mappable = Functor type NotScaryFluffyThing = Monad This makes Mappable a synonym for Functor and likewise for Monad. (This is not necessarily a good idea; it goes against the principle of least surprise, but it'll work).

Isn't aliasing types a core language feature?

Re: Becoming Productive in Haskell

#79
post #9

I don't think I have ever used a haskell program written by someone else that wasn't ghc. Is that usual? Are there now a bunch of .debs for useful things other than writing haskell that are actually written in Haskell? I'm not trolling, it's just a good test of what something is useful for when it's been around a while is to ask "Well, what has it actually been used for?"

The Haskell wiki has a page called "Haskell in industry" [0] which lists all the people using Haskell in the real-world. Some notable ones include: * Facebook Haxl, an abstraction around remote data access [1] * Microsoft Bond, a cross-platform framework for working with schematized data [2] * Google Ganeti, a cluster virtual server management tool [3] * Intel Haskell research compiler, a custom Haskell compiler used…

Anytime a technology needs to publish a list of "who's actually using this in the real world" the answer is not all that many (relative to other peer technologies). Most projects in those lists fall into the following categories:

1. It is just a small team or even one person using it and they're doing it because they really want to use that technology badly.

2. The project is some side research thing or trivially small that it could have been done using any technology.

3. It is actually just a tool or sub-system of the main system that was low risk enough.

4. The project is no longer operational, if it ever made it to that stage.

Re: Becoming Productive in Haskell

#80

The author's comments on noise chime true with me: every time I give Haskell a try I end up struggling with frustrating and opaque vocabulary, sometimes completely at odds with the way other languages use them: e.g. C++ also has functors, and they're completely unrelated to Haskell functors. I really like the author's suggestion of mentally translating Functor to Mappable. Are there any other synonyms for other Haske…

[deleted]
Post reply on HN