Hacker News new | past | comments | ask | show | jobs | submit login
The Evolution of a Haskell Programmer (2001) (willamette.edu)
121 points by phonebucket on Jan 4, 2021 | hide | past | favorite | 34 comments



This reminds me of one of the closing remarks of Simon Peyton-Jones in his A History of Haskell talk[0].

"Haskell is great fun, it's rich enough to be useful but the thing that I think is really important about it is that it's a kind of playful language. It encourages people who want to play and so I've given some examples here about the sort of playing that people do embedded domain-specific language and cunning type programs, but it's a language in which is fun to write programming pearls in which people really do start to do bits of programming as an art form, write papers about them and even get them published and I think this is good not just because it's fun but also because play leads in the end to to new discoveries so I think languages that are playful lead onto to learning new things."

This playfulness is evident whenever you spend enough time in #haskell in IRC, a question about writing a program to reverse a list ends up in a discussion about folds, talking about ADTs leads you to discover a whole new meaning to "(datatype-)generic programming" and so on, there's even a bot that makes your code 100% pointfree (online version at [1])!

In practice, it's not needed to use these super generalized/golfed solutions, but having the knowledge that there's many ways to approach the problem is akin to knowing many licks and scales in Jazz improvisation, makes programming a great deal more fun and flexible.

[0] https://youtu.be/3bjXGrycMhQ?t=2624

[1] http://pointfree.io/


I actively avoid super general code in my Haskell applications.

Here's some code to add a bookmark in an api controller:

https://github.com/jonschoning/espial/blob/master/src/Handle...


Learning Agda and later Haskell is what my grandfather would call "character building." It was awful and confusing and was seemingly useless until I realized I could intuitively write certain algorithms that my colleagues struggled with.

And what a beauty it is! How many languages can you do the same thing in so many different, humorous ways? Each one expresses somehow the nature of the programmer who wrote them. Haskell is the art of computer programming at some of its finest.


You're absolutely right. The only problem with art is that art doesn't produce what is actually needed for survival (like food or practical engineering solutions), hence promoting Haskell outside of art/research is ultimately a fool's errand. But damn it is pleasant.


They already said it was helping them outside Haskell. I can confirm that my long affair with Haskell (and I still use it for private projects) did so as well.

On the other hand, it also makes for an often frustrating experience of "this would be so much simpler/easier if it were Haskell or at least had x", where x could be algebraic data types, higher order types, Monads, Applicative Functors, dependent types, laziness, and so on and so on...

EDIT: Addendum: Rust scratches some of that itch and seems more and more accepted in the workforce world, so at least that's a good direction we're moving towards.


It is a very good training/shaping tool, like mathematical analysis or modern logic. You'll benefit even if you never see an integral in the "real world". I think it should be taught in all respectable universities.


Haskell powers pandoc, a couple of trading firms, and more and more systems at FB and Google.

I don’t know if any of those things are practical but some are useful and some make money ;)

OCaml is also instructive. It’s a little more similar to “industry languages” but definitely close to Haskell; it also has reasonably broad adoption.


TontineTrust (https://tontine.com) uses Haskell for a practical engineering solution which ensures the survival of retirees that live a long life.

Your parents (and the older version of you) that are facing the 33%+ probability of running out of money in old age will agree that solving such a problem is most definitely not a fool's errand.

Otherwise fully agree.


except it works perfectly fine for practical engineering solutions soooo ??



Haskell is so full of great ideas. But they are well hidden. What worked for me is sitting next to a grad student passionate about Haskell. I would explain a concept in English and he would tell me the Haskell term to Google.


I struggled until I worked through https://haskellbook.com/ and its exercises. Some concepts require a good deal of head bashing to fit them in the cranium.


Oh man, thanks for posting this. I found this many years ago, then lost it, couldn't find it again, but many times have wanted to link or reference it.

I couldn't remember the title, but remembered it was akin to the journey from novice to Zen master, where each step became more complex, until finally the Zen master reduces all of the complexity down to the simplest possible (but no simpler) expression.

I kept searching for phrases like "Zen of Haskell", but never found it that way. Eventually gave up. Really glad to finally find it again!


This is an article that really rewards repeat reads. Although the later iterations are made in somewhat in jest, being able to understand more and more iterations of the factorial implementation sheds a lot of insight into CS concepts.

Of course by the time you start hitting the CPS iteration you probably shouldn't ever directly write that code in production.


Read the whole thing in anticipation of

> fac n = product [1..n]


Haskell is really amusing functional language. But it is hard to find companies which use Haskell to develop interesting program... Of course, there exist some companies in the world, but they are not close to me. I wish more people to get to know that Haskell is really fun, useful and pragmatic.


I think Hasura is written in Haskell


Yes, it is.


It's fun to try to replicate this in other languages. Here's my attempt in Hoon: https://gist.github.com/lukechampine/1b68178af5e05b30fb8e9ef...


Another example (which I think is older, and thus might have inspired the Haskell one): https://www.smart-jokes.org/programmer-evolution.html


I would love to learn more haskell, what resources can I use to get started as a beginner


I think the standard recommendation is Learn You a Haskell for Great Good!, available for free online.

If you want to master the monad, try the Monad Challenges.

http://learnyouahaskell.com

https://mightybyte.github.io/monad-challenges/


Somehow it never comes up in recommendations (I don't know why), but the book that gave me a lot of pleasure in learning Haskell in the beginning was "The Haskell School of Expression" by Paul Hudak.

It just "naturally" plays around with the language using very simple concepts, and at the same time showing the simplicity and expressiveness of working with those concepts that would be hard in other languages.

It's a bit of an old book by now, so it covers an older subset of the language (and maybe some very few syntactic details might be different, but I don't think it should impede anything), but for starting out you don't want to go too "wide" anyway.


Any of the common books should be fine depending on the style you like, then I'd just start building things with it, especially with some of the popular libraries you'll run into new stuff often


Also recommend using the following IDE tooling: https://github.com/haskell/haskell-language-server

Especially easy to setup if you're using VSCode. Lots of Haskell code forgoes type annotations so with this plugin you can simply hover your mouse over things to see the exact type the compiler inferred.


Agreed. The advice from K&R applies, "the way to learn a new language is to write programs in it."


This is good advice. It seems like many people get stuck in a rut of thinking they need to study, study, study before they will be productive. That's backwards. Start building things right away; you'll immediately perceive what you need to understand next, and why.


Good advice for learning any programming language.


for some reason i treated haskell differently when i learned it. IDK why, probably because it was tied so closely to functional programming. Yeah it should be treated like any other language I think


Haskell Programming from First Principles (https://haskellbook.com/). Not free but, hands down, the best book for someone looking to pick up Haskell.


Second this you can get a free sample to check it out.


Thanks guys for sharing resources I’ll bookmark them



I'd like to see this updated for 2021!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: