I suppose this is what you’d have to call "small-audience" humour
June 25, 2009 8:22 AM   Subscribe

 
As a bonus, if you always wanted to learn Haskell but just don't know where to start, over on Stack Overflow user nanothief blows the question completely out of the water.
posted by Dr Dracator at 8:22 AM on June 25, 2009 [8 favorites]


Whoa, is Haskell really picking up steam lately?

Heh, the "master programmer" should have just used ATL. Man, I'm glad COM is mostly over.
posted by ignignokt at 8:34 AM on June 25, 2009 [1 favorite]


Wow, could that be more of an inside joke?
posted by oddman at 8:39 AM on June 25, 2009


Another Junior Haskell Programmer, reporting for duty.

(It's a nice place to visit, but I wouldn't want to live there.)
posted by DU at 8:42 AM on June 25, 2009


I dunno about Haskell, but Scala is getting some mindshare in the geek community. It's somewhere between Java-with-less-typing and a useful functional language with its own clever ideas in the mix. Running on the JVM is a huge bonus: you get a stable platform and a lot of libraries for doing useful work.
posted by Nelson at 8:46 AM on June 25, 2009 [1 favorite]


I like that page's background colour.
posted by Monday, stony Monday at 8:47 AM on June 25, 2009


The original is deeply flawed:
High School/Junior High
  10 PRINT "HELLO WORLD"
  20 END
should pretty clearly be:
High School/Junior High
  10 PRINT "Simon is Gay ", 
  20 GOTO 10
posted by fightorflight at 8:51 AM on June 25, 2009 [5 favorites]


Java-with-less-typing. Er.. keystrokes. Scala has lots of typing, but you have to press fewer keys to use them.
posted by Nelson at 8:51 AM on June 25, 2009 [2 favorites]


On Scala: Code sizes are typically reduced by a factor of two to three when compared to an equivalent Java application

Detailing in English exactly what you want the program to do would reduce Java code size by two orders of magnitude, so that isn't say much.
posted by DU at 8:52 AM on June 25, 2009 [3 favorites]


Wow, I remember reading that page years ago :)
posted by pharm at 8:57 AM on June 25, 2009 [2 favorites]


The second to last example is using a Church numeral encoding.
posted by null terminated at 9:22 AM on June 25, 2009


"Java-with-less-typing."

Hm. Really? I'm not a tremendous fan of strongly typed languages for many of my own projects since remembering what the hell a thing is supposed to be is what I pay a computer to do. Hmm, maybe it's time to take a lo--

"Er.. keystrokes. Scala has lots of typing"

Oh. Crud.
posted by majick at 9:24 AM on June 25, 2009


As a bonus, if you always wanted to learn Haskell but just don't know where to start, over on Stack Overflow user nanothief blows the question completely out of the water.

Killer. I'm taking Haskell in a couple semesters and I was hoping to get some reading done on functional languages ahead of time. This should do nicely - thanks.
posted by threetoed at 10:02 AM on June 25, 2009


I'm not a tremendous fan of strongly typed languages for many of my own projects since remembering what the hell a thing is supposed to be is what I pay a computer to do.

Do you mean that you don't want to explicitly declare types and want your compiler/interpreter to figure them out for you? If so, you might want to try ML or one of its variations. It's strongly typed (so no runtime errors due to dynamic or weak typing) but instead of forcing you to explicitly delcare types it implicitly infers types based on usuage. This means you can do neat stuff like create variables that can an empty list, a single string, or a list of strings without having to explicitly declare or write a class definition for it.
posted by burnmp3s at 10:08 AM on June 25, 2009


Interesting to see this cross my radar yet again. I've actually been in a couple of Prof. Ruehr's classes and I have to say he has the same sense of humor in person as you can see on the page. He's been following Haskell for years and even created the previous logo they used. For any of you interested in learning Haskell, here's the class website of his Introduction to Functional Programming class which has 7 labs and a ton of links into the haskell community.
posted by Axle at 10:16 AM on June 25, 2009 [1 favorite]


Is it just me the feels like they kind of missed the point of the first one? But perhaps the new one is hysterically funny if you're a Haskell programmer (haven't touched it since Uni).
posted by Cach-e at 10:16 AM on June 25, 2009


Erlang! ERRRRRRRRRRRRRRLAAAAAAAAAAAAAAAAAAAAAAAAAAAAANG!
posted by fatbird at 10:22 AM on June 25, 2009 [1 favorite]


I'm not a tremendous fan of strongly typed languages for many of my own projects since remembering what the hell a thing is supposed to be is what I pay a computer to do.

Which is precisely what the compilers of strongly-typed languages like ML and Haskell do. You can write a perfectly legal Haskell (or ML) program without specifying a single type: the compiler will infer them all for you.
posted by pharm at 11:46 AM on June 25, 2009


Damn, I got beat to the Erlang comment.
posted by GuyZero at 11:52 AM on June 25, 2009


I'm not sure which I'm most ashamed of: that I couldn't follow the Haskell code after "junior", or that I understood everything under "Master Programmer" in the first link.
posted by 0xdeadc0de at 3:06 PM on June 25, 2009


Ah, but it's missing the final, madly gibbering transformation: constructive type theory. I could try to define the fac thing with a dependently typed fold over an element in Fin n or something like that. But last time I did it, Azatoth oozed through the type judgement for that thing, and ate our cleaning staff. They are still blaming me for the residual grime, around here.
posted by Iosephus at 3:28 PM on June 25, 2009 [1 favorite]


(And yes, it's Azathoth. I know. Blame a delicious chicken sandwich for distracting me.)
posted by Iosephus at 3:30 PM on June 25, 2009


pharm: "You can write a perfectly legal Haskell (or ML) program without specifying a single type: the compiler will infer them all for you."

Which misses a good half of the problem. I won't speak for Haskell, but it's blissfully simple to define data structures (ie new types) in OCaml:

type btree = Tree of btree * btree | Leaf of int

However, it's both OCaml and Haskell are missing the pervasive multithreading that Java is actually useful for.
posted by pwnguin at 4:04 PM on June 25, 2009


My dad used to be on the Haskell committee (I assume he helped develop the language, it certainly sounds like the sort of thing he'd do), so if any of you are having any Haskell related problems, let me know and I'll have a stern word to him.
posted by Sparx at 5:01 PM on June 25, 2009 [2 favorites]


Good because I've always hated object oriented programming. i'm the kind of guy who will use a magazine to swat a fly, patch a hole in the wall with toothpaste, or defend myself with a bottle of catchup and a fork. I'll load a jpeg into my text editor as a quick way to see what camera was used to take the photo.

Functions are not meant to be locked up and owned by objects--they yearn to be free!
posted by eye of newt at 10:40 PM on June 25, 2009


Detailing in English exactly what you want the program to do would reduce Java code size by two orders of magnitude, so that isn't say much.

DU, detailing in English exactly what you want a post to say would reduce this grammar cops' snarkiness quite a bit, to.

/ self-invoking, and accounting for, Skitt's Law.
/ two
/ tu
posted by IAmBroom at 12:32 PM on June 26, 2009


cop's

/ damn, Skitt's Law is strict!
posted by IAmBroom at 12:33 PM on June 26, 2009 [1 favorite]


Which misses a good half of the problem. I won't speak for Haskell, but it's blissfully simple to define data structures (ie new types) in OCaml

pharm was referring to type inference, which OCaml supports as well. The Haskell for defining a new data type looks almost very similar to the OCaml.

However, it's both OCaml and Haskell are missing the pervasive multithreading that Java is actually useful for.

I don't know about OCaml, but Haskell is not without attractive techniques for manycore programming. For an example, see this recent paper which goes over the most popular method and introduces a nice graphical tool for visualizing parallelization.
posted by Rictic at 1:30 PM on June 26, 2009


I know he was referring to type inference; I was just pointing out that it's also damn simple to make new types. No twenty damn .java files to define a type hierarchy of types, which necessitates UML diagrams to understand.

I presume you mean that ThreadScope is nice because it builds Gantt charts from actual run times, not that they invented Gantt Charts. I wasn't aware that Parallel Haskell had been included in GHC, that does represent a significant step forward and add yet another reason for me to try out Haskell. The primary problem with manycore in Ocaml is the garbage collector, which is single threaded. You can multithread, but doing so with a single core GC is like treading water with one hand in the air.
posted by pwnguin at 3:59 PM on June 26, 2009


If you're going to talk about parallel computation in functional languages, you pretty much have to look at the software transactional memory stuff people have been working on in Haskell.
posted by hattifattener at 8:02 PM on June 26, 2009


While we're swimming in lambdas, I present you: LAMBDACATS. (and now someone has to do an Oleg post)
posted by Monday, stony Monday at 9:27 PM on July 7, 2009 [2 favorites]


« Older Make a toaster from scratch   |   Re: Re: Re: Re: Re: Where is the paddle? We need... Newer »


This thread has been archived and is closed to new comments