Live data from Hacker News

Haskell for a New Decade [pdf]

dev.stephendiehl.com

71–80 of 190 posts

Re: Haskell for a New Decade [pdf]

#71
post #37

Earlier quoted context omitted.

Counter point on "investment": I was in a Haskell team at Google, and have trained groups at various companies professionally. From that experience, for a normal developer with working experience in Java, Python, or C++: * It takes 2-3 weeks of full-time onboarding (half with a coach, half self-study) to work on a typical industrial Haskell project. * It takes around 3 months of full-time participation in such a proj…

Thanks for that. Everything you said is from the perspective on being not only in a Haskell job but in a Haskell team. Your 3 months is 5 years for someone trying to learn on their own in their spare time. And then they need this to get a Haskell job due to the competition for such job and the queue of super smart people lining up for a Haskell job. And the pay cuts are brutal. Now you are an outlier, working on a Ha…

> Your 3 months is 5 years for someone trying to learn on their own in their spare time.

I learned the key parts of Haskell in 3 months of my spare time from university (where I had much less spare time than I have now in industry). And that was at a time where learning Haskell was much harder than it is now; today there are a lot of really detailed books, tutorials, and videos available, tooling works out of the box with few surprises, and error messsages are way better.

Of course learning in your spare time does not give you as much practical experience and feedback as you get on a job, but it gets you enough to get into such a job.

> You don't have to try and pick apart the online knowledge.

Not any more.

* Step 1, buy a beginner book and work through it.

* Step 2, work through FP Complete's [1] Applied Haskell Syllabus (https://www.fpcomplete.com/haskell/syllabus/). This will make you comfortable with most day-to-day data structures, techniques, testing, benchmarking and so on.

* Step 3, practice building some small applications that you think companies will actually need. Web servers, input validation, streaming data processing, and so on. It doesn't have to be fancy or use "cool" techniques, it just has to be /useful/.

* Optional Step 4, for extra hireability: Become better-than-average in a specific topic. This could be testing, performance, developer tooling, documentation, web stuff, anything that gets your juices flowing. Do a bit of open-source work in that area. Go to some meetups or conferences to see who's hiring, what they are doing, and what might be useful for them

> I want to understand Lens?

Again, you don't need to do that to get a job. I've conducted ~ 40 technical interviews for filling Haskell positions for various companies, and none required this. What is required is that you can do normal /useful/ things, with the high amount of correctness, clarity, refactorability, and reliability that Haskell provides.

Haskell, like mathematics, knitting, and C++, offers near infinite avenues of special topics that you can deep-dive into if you want. People talk about those at meetups because they excite them. But you don't have to do that to build useful software or get a job.

[1] This is the consulting company as part of which I gave most of aforementioned training. It makes most of the training material publicly available.

Re: Haskell for a New Decade [pdf]

#72
post #37

Earlier quoted context omitted.

Counter point on "investment": I was in a Haskell team at Google, and have trained groups at various companies professionally. From that experience, for a normal developer with working experience in Java, Python, or C++: * It takes 2-3 weeks of full-time onboarding (half with a coach, half self-study) to work on a typical industrial Haskell project. * It takes around 3 months of full-time participation in such a proj…

Can you share what kind of system your Haskell team worked on at Google? I thought Google projects were limited to a few blessed languages. Once upon a time that was Java, C++, and Python but I guess that would now include Go and Rust (in parts of Fuchsia and possibly Chrome).

Yes: Ganeti, an open-source cluster-management system:

https://en.wikipedia.org/wiki/Ganeti

Re: Haskell for a New Decade [pdf]

#73
post #60

Earlier quoted context omitted.

It's odd how the various smaller companies I referred to, many of which are normal enough that you may never have heard of them, get summarised as "It was Google". I only mentioned it to also include the largest org I know where onboarding onto a Haskell project was not a problem.

I think he meant "bad sample" in the sense that those programmers aren't representative of abilities of average programmers. Ie, he thinks Google programmers are top programmers.

I got that, and it's an often-heard argument, which is why I stated that it worked as described for other companies as well.

Re: Haskell for a New Decade [pdf]

#74
post #37

Earlier quoted context omitted.

Counter point on "investment": I was in a Haskell team at Google, and have trained groups at various companies professionally. From that experience, for a normal developer with working experience in Java, Python, or C++: * It takes 2-3 weeks of full-time onboarding (half with a coach, half self-study) to work on a typical industrial Haskell project. * It takes around 3 months of full-time participation in such a proj…

Can you share what kind of system your Haskell team worked on at Google? I thought Google projects were limited to a few blessed languages. Once upon a time that was Java, C++, and Python but I guess that would now include Go and Rust (in parts of Fuchsia and possibly Chrome).

Ex-googler here: While the "blessed languages" still exist in a way, it's mostly about not really needing to explain the language choice when considering/pitching a project. Choosing a different language (such as Haskell) is allowed, sure, but it'll be one more hurdle to clear when trying to get go-ahead compared to just using, say, Java.

Re: Haskell for a New Decade [pdf]

#77

I think the focus on Haskell is missing the mark a bit. Haskell is about programming language researchers and enthusiasts having a excellent example language to try out ideas. Over the years it has turned into a production ready platform. As the PDF shows there are many languages spun off Haskell and it doesn't even mention them all. Then there are language features in C# and Java, Typescript etc. that are coming acr…

None of the languages that let you achieve certain top qualities (top performance, proven correctness, concurrency, compactness, etc) are trivial or "feel natural". Haskell, Rust, APL / K / Q, Erlang, hell, even C++ and Scala (though these two are unnecessarily bloated). You got to study and internalize concepts that underlie them, change your way of thinking.

This is because reality is not intuitive, too.

Take natural numbers. They are utterly intuitive. Three-year-olds can grasp them. But as you try to calculate more and more complex things in the real world, you discover the need in counter-intuitive concepts like zero, negative numbers, fractions, even the aptly named irrational numbers. If you try to calculate √3 using the intuitive natural numbers, your solution will be rather approximate.

Same thing with many "intuitive" languages, from Basic-80 to ES6. You can solve a number of problems with them, but many solutions end up inexact and full of holes. In a lot of cases, this is acceptable, or seen as acceptable.

But when you need tools for a precise solution, you have to study some "advanced concepts" (another word for math) and take a language like Haskell which support them. Sometimes you end up with something as unwieldy as your average three-story analytic formula, but this is often not a shortcoming of the language but the nature of your problem domain, described correctly.

Re: Haskell for a New Decade [pdf]

#78
post #55

Earlier quoted context omitted.

Thanks for that. Everything you said is from the perspective on being not only in a Haskell job but in a Haskell team. Your 3 months is 5 years for someone trying to learn on their own in their spare time. And then they need this to get a Haskell job due to the competition for such job and the queue of super smart people lining up for a Haskell job. And the pay cuts are brutal. Now you are an outlier, working on a Ha…

> For example a lot of libraries use Lens. I want to understand Lens? It is not simple: check out the diagram on https://hackage.haskell.org/package/lens . You're making it seem harder that it really is. Yes, it's hard if the package documentation is all you have, but that's the hard way to learn. There are other online unofficial documentation and tutorials (of diverse quality). There's also a book ( https://leanpub…

Ah OK, things have moved on in recent years. Maybe there are more resources out there than I thought.

Re: Haskell for a New Decade [pdf]

#79

Why Haskell, and why not just write it in Lisp? It appears Lisp has proven itself consistently, at solving difficult problems.

I've been paid to write Lisp most of my career. Most new languages I check out seem like some variant of C or a dumbed-down version of Lisp. Haskell is the only one that seems like an actual upgrade from Lisp, in that there are things you can do in Haskell that would be quite difficult to shoehorn into Lisp without changing Lisp in fundamental ways. (A statement I never thought I would make before I found Haskell.) The full panoply of monads for example. Automatic currying for another. A true lambda-functional language that does not need parentheses and makes no compromises for their absence for yet another.

All this does not make me want to abandon Lisp for Haskell; Lisp is still more practical for most of my needs. But if I had to write a parser I'd probably first write it in Haskell and then translate it to Lisp, because Haskell expands the way you think about hard programming problems -- even beyond the realm to which Lisp expands it.

Re: Haskell for a New Decade [pdf]

#80

I think the focus on Haskell is missing the mark a bit. Haskell is about programming language researchers and enthusiasts having a excellent example language to try out ideas. Over the years it has turned into a production ready platform. As the PDF shows there are many languages spun off Haskell and it doesn't even mention them all. Then there are language features in C# and Java, Typescript etc. that are coming acr…

> Instead of Haskell we should be thinking of programming language research and how to get the best ideas into our mainstream languages.

I feel like that's what the Scala people are doing. Yet the end result is that this kind of Scala code is just as slow to compile as Haskell, and just as hard to learn for newcomers as Haskell.

The difficulty lies in the concepts enabled by the language, not the language itself. Go read the GHC user guide, especially the part about language extensions, and you'll finish in an afternoon. Yet people are always coming up with new ideas and abstractions that use these language features in new ways. Haskell is an especially rich platform for new ideas and abstractions to foster. Lens is somewhat difficult to learn, yet in its simplest form it can even be used without any language extensions. (You won't be able to name the Lens or Traversal type itself without RankNTypes, but you just need to expand the synonyms; in other words it's just sugar.)

Post reply on HN