Live data from Hacker News

Hello Haskell, Goodbye Scala

joshbassett.info

91–100 of 118 posts

Re: Hello Haskell, Goodbye Scala

#91

Earlier quoted context omitted.

>It's still bad and cabal is still bad. No, it isn't. You have the exact same problems with CPAN and everyone and even the most devoted perl-haters will admit "perl is a terrible language, but CPAN is amazing". You run into the exact same problems with every other language, the only difference being dynamic languages tend to be lazy about correctly managing version numbers, so you get "installs properly but completel…

>You have the exact same problems with CPAN I don't use Perl and that's a crock anyway. I've used Leiningen on Clojure, easy_install/pip on Python and the Golang stack happily with no trouble. I don't like XML or Java, but you'd have a hard time arguing Maven "doesn't work". It's what Leiningen is built upon anyway. Rubygems, rbenv, and bundler aren't perfect but they do largely work for everybody in the Ruby communi…

Nobody's pretending that everything is "hunky-dory" with Cabal--there are concerted efforts at fixing the problems, and discussions on it come up often both on the mailing list and on /r/haskell. However, some people are pretending that it's worse than it really is. It's not perfect, but it's certainly not bad enough to not use Haskell!

I remember having annoying problems with Python--both easy_install and pip--just a year ago. Perhaps it's better now, but that just means packaging issues can be fixed. And, for Haskell, people are fixing them.

Re: Hello Haskell, Goodbye Scala

#92
post #73

Earlier quoted context omitted.

"Enrollment is Closed We are sorry" Yeah me too. Coursera = MCOC = Massively Closed Offline Course. Imagine wikipedia only allowing people to view the "Scala" page between the hours of 7:30 and 8:30 on alternate tuesdays, otherwise you're outta luck, for completely arbitrary reason. Very unimpressed with the MOOC trend. Bring back MIT OCW where I can download and watch video lectures whenever I want, forever.

When did they take that down? Thankfully I got the material for the course I was working through downloaded. Why would they do that?

Would it be okay/possible to post the materials online? I'd be interested in going through the course.

Re: Hello Haskell, Goodbye Scala

#93
post #3

I enjoyed the read, but I borked at your suggestion that not being purely functional, and the language barking at you if you break that convention stops you learning functional programming. Take most Lisps (I'll assume scheme, because it's what I'm most familiar with), which give you more than enough side-effecty rope to hang yourself with should you so desire- but you won't get far unless you're coding functionally.

Sometimes you need side-effects. The world is far from pure. I think Common Lisp gives you exactly the tools you need and gets out of your way. Dynamic variables (a very specific term in CL) are simply awesome . You need side-effects when you're dealing with I/O -- sockets, files, shells, etc. I prefer languages that make it as painless as possible when I need it. Purity, IMO, is over-rated. You can write pure FP cod…

Type-inference doesn't provide anything related to parallel maps, though Haskell's type system can verify that they're safe. Switching an arbitrary loop to a parallel one in C#, Scala, Java, whatever, is certainly a crapshoot.

The real benefit to purity and laziness (imo) is the STM. The type system (and pure functions) allow rerunning transactions arbitrarily without worry about side effects, and laziness by default minimizes lock contention by deferring most code execution outside of the transaction block. Joe Duffy has a pretty good writeup a few years ago outlining the difficulty of writing an STM for languages without such guarantees, it's definitely worth a read: http://www.bluebytesoftware.com/blog/2010/01/03/ABriefRetros...

Re: Hello Haskell, Goodbye Scala

#94

Earlier quoted context omitted.

On the other hand, that one time you just need a simple library for something, you get to use some guy's pet experiment for learning one of these concepts (Monoids, Monads, Monad transformers, Comonads, Arrows, Lenses, Foldables, Iteratees, Functional-Reactive Programming) you haven't learned yet just to parse some XML. Yeah, a real productivity booster. It's like batteries included but with C4 attached to every batt…

Yeah, those tricky monoids. So hard to learn, and even harder to use a library based on them. You have a whole whopping one function to learn, that does some incredibly convoluted and arcane nonsense called "appending"? What a horrible language. You should definitely devote more time to complaining about ridiculous strawmen like this, it seems like a very good use of time.

Here is some of my code to parse html:

    tstamp >> arr parseTime ->>
        (this ! "href") &&& (getAllText >>> arr parseScore) -
So yes, you do have to learn about arrow syntax in order to use HXT efficiently. For most newbies it is not an easy concept to grasp, not helped by the fact that HXT isn't a very well documented library.

Re: Hello Haskell, Goodbye Scala

#95
post #72

Earlier quoted context omitted.

Maybe you should actually learn something about FP rather than trying to learn a bunch of languages?

I think you'll discover that languages are actually much smaller than they appear in your mirror.

That's my point. You're talking about jumping around from language to language, but Functional Programming techniques tend to be applicable across all of them. My personal angle is that Haskell puts up less bullshit in your path while you're learning stuff about type based reasoning at the cost of being much less like things you may have seen before.

Regardless of that, going from Haskell to Scala to ML to Clojure ad naseum isn't going to get you any deeper understanding of techniques. At most you'll understand how some very basic concepts work in different languages.

Re: Hello Haskell, Goodbye Scala

#96
post #94

Earlier quoted context omitted.

Yeah, those tricky monoids. So hard to learn, and even harder to use a library based on them. You have a whole whopping one function to learn, that does some incredibly convoluted and arcane nonsense called "appending"? What a horrible language. You should definitely devote more time to complaining about ridiculous strawmen like this, it seems like a very good use of time.

Here is some of my code to parse html: tstamp >> arr parseTime - >> (this ! "href") &&& (getAllText >>> arr parseScore) - So yes, you do have to learn about arrow syntax in order to use HXT efficiently. For most newbies it is not an easy concept to grasp, not helped by the fact that HXT isn't a very well documented library.

"Use >>> like a pipe in unix" is not an easy concept to grasp?

Re: Hello Haskell, Goodbye Scala

#97
post #92

Earlier quoted context omitted.

When did they take that down? Thankfully I got the material for the course I was working through downloaded. Why would they do that?

Would it be okay/possible to post the materials online? I'd be interested in going through the course.

The course material is still available, although you'll need to sign up for a Coursera account. It also looks like they're running another course in March 2013.

https://class.coursera.org/progfun-2012-001/class/index

Re: Hello Haskell, Goodbye Scala

#98
post #72

Earlier quoted context omitted.

I think you'll discover that languages are actually much smaller than they appear in your mirror.

That's my point. You're talking about jumping around from language to language, but Functional Programming techniques tend to be applicable across all of them. My personal angle is that Haskell puts up less bullshit in your path while you're learning stuff about type based reasoning at the cost of being much less like things you may have seen before. Regardless of that, going from Haskell to Scala to ML to Clojure ad…

I wouldn't call opening myself to multiple languages "jumping", and it seems a bit of a leap that you assume so. (Note that I said nothing of the proportions invested in each.) The only point of my post was that one does not need to wall oneself off from one language in order to open oneself to another.

Regardless of that, going from Haskell to Scala to ML to Clojure ad naseum isn't going to get you any deeper understanding of techniques.

I suppose that's a fair view if one starts from the assumption that techniques are all that is worthy of pursuit.

But there is also comparison of priorities implicit in different design choices. There is also an appreciation of history (ML is a good example of that) and an appreciation for industrial frontiers (Rust is a great example there: if you're not following Graydon Hoare you're missing out). Each language also has its own unique traits that don't readily map to others. Haskell's lazy evaluation and monadic IO are a great example there. Want to wield the sword of homoiconicity? Better learn a LISP.

Moreover, learning Haskell prepares you to read a lot of literature. ML prepares one to read Chris Okasaki's book on purely functional data structures. (Yes, there is a Haskell appendix in the back of the book, but knowing both means you can compare them!). Scala is worth study as a case study in the tradeoffs of making on object/functional hybrid.

The human brain is an associative machine, you know. Sometimes the act of broadening has the consequence of strengthening (or even deepening), because you're giving your melon more things to interrelate.

Re: Hello Haskell, Goodbye Scala

#99
>For christmas I bought myself a copy of Learn You A Haskell For Great Good by Miran Lipovača. Apart from being a great Haskell learning resource, it’s one of the best programming books I have ever read.

I second that. Miran is a superb technical writer. He also annotates the book with little excerpts from all my favorite movies.

Post reply on HN