Live data from Hacker News

How I Start: Haskell

howistart.org

41–50 of 61 posts

Re: How I Start: Haskell

#41

When it comes to learning something like Haskell you are caught in dilemma between two ideas - Should you learn a functional programming language for fun and because it will make you a better thinker? or should you use your existing tools / stack to build something better than you have done before. What will be the better utilization of time? While I was more oriented to former in the past, I have been inclining to l…

I have been learning a bit of Haskell on the side recently just for the thrill of learning something completely different to the way I'm used to writing code.

My two cents so far is that using Haskell for "Real World" applications is not practical (at least in my experience), but by writing small applications in Haskell you learn a lot, it changes how you think. In my opinion, learning Haskell makes you a better programmer.

Re: How I Start: Haskell

#42
post #17

I like the How I Start serie.On the other hand,while I get that languages have their specificities,I'd like the same project to be implemented in all these languages,to be able to get a quick understanding about how working with these languages feels like. You know like a TodoMVC ,but in form of tutorial around the same project,a webapp for instance,which would require as little library as possible.

I'm the auhtor of the Erlang article on How I Start. I've felt the same in some ways because it would offer a nice comparison point, but the problem with this idea is that it doesn't let the authors pick a problem for which they think their tool shines.

In a way, forcing the same problem on all authors is more or less risking telling them "you may have to use the wrong tool for this job, but please tell us how you'd do it."

Instead, I think the current format is, well first of all nicer for the author (they can pick what inspires them), and also gives you a richer level of content where you may end up learning more than you thought you would.

For example, the Erlang text focuses on Releases and shipping Erlang systems, something I felt was still blurry in a lot of people's minds. the Elixir project is done with a concurrent approach that wouldn't necessarily carry over the same way in Ruby, and Ruby's text is showing how to build a gem.

Letting the authors pick their subject means they can choose to focus as much as possible on what they feel is trickier with their tool of choice, rather than just showing a given program, for which a site like rosettacode.org might be more interesting.

Re: How I Start: Haskell

#43
Great article! As a programmer yet to have tried Haskell, this was actually one of the first articles I've read about Haskell which made sense to me. I tend to have a lot easier to learn from practical examples than the more academic approach normally seen in Haskell learning material and blog posts.

Re: How I Start: Haskell

#44
post #37

Earlier quoted context omitted.

Yes, I found the Data Analysis cookbook very helpful as well. However, it really drove home to me the need for a dataframe/Pandas-like library in Haskell... About half the code in every one of his examples was reading a CSV file, parsing it into some ad-hoc data structure etc. For very robust production apps, that can be justifiable, but for just a quick look at some data, it should just be a one-liner...

This rings very true to my use as well. I'd like to see something like Vinyl specialized to data frames, but nobody has built it yet. Edit: see the post by coolsunglasses below—Carter's work is certainly the furthest along in this direction that I'm aware of.

And wrt syntx sugar for hlists and vinyl, there's some somestuff I hope to get into the merge window for ghc this week that might make that much nicer to work with. I hope.

Re: How I Start: Haskell

#45
post #2

What do you think about the lens library? I have been trying Haskell for a few weeks and this library feels strange. Also I don't really think I need the things it provides. But perhaps I just don't understand it.

I found this talk by edward kmett incredibly helpful[0]. I kept rewatching parts of it bit by bit until I managed to absorb it all (there is a lot of information for a beginner) but I found it hugely helpful and mind-blowingly powerful.

[0] https://www.youtube.com/watch?v=cefnmjtAolY

Re: How I Start: Haskell

#46
post #41

When it comes to learning something like Haskell you are caught in dilemma between two ideas - Should you learn a functional programming language for fun and because it will make you a better thinker? or should you use your existing tools / stack to build something better than you have done before. What will be the better utilization of time? While I was more oriented to former in the past, I have been inclining to l…

I have been learning a bit of Haskell on the side recently just for the thrill of learning something completely different to the way I'm used to writing code. My two cents so far is that using Haskell for "Real World" applications is not practical (at least in my experience), but by writing small applications in Haskell you learn a lot, it changes how you think. In my opinion, learning Haskell makes you a better prog…

I have a crawler downloading 160 million websites a day, almost all in Haskell. It is a much more practical language than the alternatives.

Re: How I Start: Haskell

#47
post #41

When it comes to learning something like Haskell you are caught in dilemma between two ideas - Should you learn a functional programming language for fun and because it will make you a better thinker? or should you use your existing tools / stack to build something better than you have done before. What will be the better utilization of time? While I was more oriented to former in the past, I have been inclining to l…

I have been learning a bit of Haskell on the side recently just for the thrill of learning something completely different to the way I'm used to writing code. My two cents so far is that using Haskell for "Real World" applications is not practical (at least in my experience), but by writing small applications in Haskell you learn a lot, it changes how you think. In my opinion, learning Haskell makes you a better prog…

>In my opinion, learning Haskell makes you a better programmer.

No, it makes you a more dissatisfied programmer.

Dissatisfied with how poor the tools in other ecosystems are.

You can't take Haskell with you. Erik Meijer is wrong about this. You can't use monads productively in Python. You can try, but it doesn't work well.

You need Haskell. Laziness, FP, immutability, types, the whole shebang. It all hangs together in a well designed way. Not even Scala can do FP well.

https://twitter.com/bitemyapp/status/534498324296921088

https://twitter.com/bitemyapp/status/534498480430284801

https://twitter.com/bitemyapp/status/534498423870066688

https://twitter.com/bitemyapp/status/534498512398864384

https://twitter.com/bitemyapp/status/534500037901176832

To quote mwotton:

"here is a lightsaber, an elegant and powerful weapon. After you practice with this, you will be much better at stick-poking." is absurd.

More powerful abstractions tend to invalidate more and more combinations of terms. This means the space in which your program will be correct gets narrower and narrower.

The good news is, it means your abstractions will more precisely represent the correct program you want.

The bad news is, you'll want help from the computer and a well-designed language.

I have a video of my Haskell workflow here: https://www.youtube.com/watch?v=Li6oaO8x2VY

It's worth considering in this context what Haskellers mean when they talk about "type tetris".

Re: How I Start: Haskell

#48
post #41

When it comes to learning something like Haskell you are caught in dilemma between two ideas - Should you learn a functional programming language for fun and because it will make you a better thinker? or should you use your existing tools / stack to build something better than you have done before. What will be the better utilization of time? While I was more oriented to former in the past, I have been inclining to l…

I have been learning a bit of Haskell on the side recently just for the thrill of learning something completely different to the way I'm used to writing code. My two cents so far is that using Haskell for "Real World" applications is not practical (at least in my experience), but by writing small applications in Haskell you learn a lot, it changes how you think. In my opinion, learning Haskell makes you a better prog…

What "Real World" applications do you think Haskell isn't practical for? For instance, why wouldn't Haskell be practical for web development?

Re: How I Start: Haskell

#49
post #41

Earlier quoted context omitted.

I have been learning a bit of Haskell on the side recently just for the thrill of learning something completely different to the way I'm used to writing code. My two cents so far is that using Haskell for "Real World" applications is not practical (at least in my experience), but by writing small applications in Haskell you learn a lot, it changes how you think. In my opinion, learning Haskell makes you a better prog…

>In my opinion, learning Haskell makes you a better programmer. No, it makes you a more dissatisfied programmer. Dissatisfied with how poor the tools in other ecosystems are. You can't take Haskell with you. Erik Meijer is wrong about this. You can't use monads productively in Python. You can try, but it doesn't work well. You need Haskell. Laziness, FP, immutability, types, the whole shebang. It all hangs together i…

> No, it makes you a more dissatisfied programmer.

Maybe it makes you a more dissatistfied programmer.

> You can't take Haskell with you. Erik Meijer is wrong about this. You can't use monads productively in Python. You can try, but it doesn't work well.

Can you explain why? Because its my experience that monads, once you understand them even a little bit, open up a way of thinking about and addressing problems that can be productively used in most programming languages (Python certainly included).

> You need Haskell. Laziness, FP, immutability, types, the whole shebang. It all hangs together in a well designed way.

Certainly Haskell's very nice and hangs together fairly well (though its also got some warts.) And certainly, some people will be much more productive with Haskell than with other languages. But that doesn't mean that learning Haskell won't improve your productivity with other languages, and that the combination of available existing libraries, etc., might still make some other language a net win for a particular real-world project.

> Not even Scala can do FP well.

Scala is certainly less good at some things than Haskell is -- and its especially unsurprising that its not as great at FP since it deliberately compromises Haskell-style FP to support extended Java-style OO (and thereby also to interop well with Java.)

> "here is a lightsaber, an elegant and powerful weapon. After you practice with this, you will be much better at stick-poking." is absurd.

Except its not, either in the literal sense (lightsaber fighting, after all, is stick poking with SFX) or the figurative sense.

Re: How I Start: Haskell

#50
post #37

Earlier quoted context omitted.

This rings very true to my use as well. I'd like to see something like Vinyl specialized to data frames, but nobody has built it yet. Edit: see the post by coolsunglasses below—Carter's work is certainly the furthest along in this direction that I'm aware of.

And wrt syntx sugar for hlists and vinyl, there's some somestuff I hope to get into the merge window for ghc this week that might make that much nicer to work with. I hope.

Yay!
Post reply on HN