r/programming • • Mar 15 '09

Dear Reddit I am seeing 1-2 articles in programming about Haskell every day. My question is why? I've never met this language outside Reddit

245 Upvotes

634 comments sorted by

18

u/sisyphus Mar 15 '09

The languages we use every day aren't usually very interesting. I'd rather see Yet Another Why Haskell Rocks article than Yet Another Why PHP/Perl/Java/MyWorkLife sucks article.

62

u/weavejester Mar 15 '09

Because whether or not its a practical language to build things in, it's certainly an interesting language, and "interesting" tends to get modded up.

→ More replies (2)

161

u/ssylvan Mar 15 '09 edited Mar 15 '09

I find that Haskell is one of those languages that offer a very strong "conversion experience" precisely because it's so different. So the timeline for the typical person learning Haskell is something like this:

  1. Hear about Haskell the first few times
  2. Look it up.
  3. Decide that it looks far too weird and abandon it.
  4. Hear about Haskell some more.
  5. Look it up again, this time more determined.
  6. Spend a few very frustrating weeks with it, decide it's rubbish for "real world programming" and abandon it.
  7. Hear more about Haskell, mocking the people talking about it as not being real-world programmers.
  8. Hear even more about Haskell from smart people, perhaps someone you respect, or perhaps from someone writing a real-world application (e.g. Darcs, XMonad or what have you).
  9. Give Haskell yet another go, this time determined to write some real code in it.
  10. Head aches.
  11. Trying very hard to unlearn some bad habits from all those years of imperative coding.
  12. Oh god my head hurts.
  13. Hang on...
  14. EUREKA! THIS is how you're supposed to program computers!
  15. "I must tell he world what they're missing!"

Or, the alternative version for those learning it at university:

  1. Get told you have to learn Haskell.
  2. Hate the language for five weeks, but push through anyway because it's a required course and you don't want a bad grade on it.
  3. "Oh god I wish I could just use Java, this language is rubbish!"
  4. Hang on...
  5. Go to 14. in the previous list.

138

u/weeksie Mar 15 '09
  1. Hear about Haskell
  2. Build a couple of small things in it and get excited
  3. Blab about how amazing it is
  4. Try it for a real world project
  5. Deal with unpredictable performance issues and awkward treatment of real world issues like I/O
  6. Learn to hate it because you're stuck with it until the end of the project
  7. Appreciate Haskell for what it is (a research language) and take the things you learned back to a practical language.

9

u/iwishiknew Mar 15 '09

After reading your comment, I am sure people deserve the language that they program in. If you or your team could not use it for a real world application, you arrive at the conclusion that Haskell is ... whatever.

I used C for years and I thought I'd never use anything else. Never needed Java/C++, or anything. I respect C as much even today. Then python came and I thought - that's it - C and Python.

Finally, no single PL has been more fulfilling and useful to me than Haskell. I wrote a working compiler of a subset of another PL in first few weeks of learning Haskell. And then wrote lots of utilities that I needed.

Actually it's ok. Use whatever you want. There is something wrong on the Internet and I can't fix it.

4

u/Imagist Mar 16 '09

The person whose comment you are responding to noted that there are some difficult-to-solved performance issues.

It's true that a person with a deep knowledge of Haskell could optimize these issues. But optimization is a complex topic in any language, and is even more so in Haskell. And to do even reasonably simple programming in Haskell you have to understand a few things like tail recursion to get reasonable performance.

People often cite the downsides of popular languages like Java and C and how Haskell doesn't have them. But are we to just accept that a steep learning curve ISN'T a downside? I think not.

I say this as an avid Haskell programmer.

→ More replies (2)
→ More replies (3)

14

u/jlouis8 Mar 15 '09 edited Mar 15 '09

At 5. you could either:

; Learn how to use the profiler and read the stricness analyzers output

; Program in ML

At 7, even if you go back to a "practical" language you might want to remember some of the things you learnt in Haskell. I used an Applicative Functor in Python the other day. It is ugly, but it works :)

15

u/weeksie Mar 15 '09

That's exactly what I said at number 7. I use FP in appropriate situations, I'm not a language bigot but I am pragmatic.

→ More replies (2)
→ More replies (1)

12

u/ssylvan Mar 15 '09

You're such a poster boy for someone at stage 7.

33

u/weeksie Mar 15 '09

Considering that I used it on a large project that lasted ten months (this was in 2006-7) I'm well past the n00b phase. I understand the language and appreciate it but I don't find it to be nearly as useful to me as a dynamically typed imperative language that has functional features.

I have far fewer bugs in my Lua/C projects and they're way easier to track down. Maybe it's because I'm not a smart dude. I'll live with that if it means that I can write code that works and is easy to debug.

6

u/cia_plant Mar 15 '09

What sort of problems did you run into, working in Haskell? It does seem like there has not been very much large-scale development in Haskell (for a variety of reasons), so I am quite curious what kinds of problems you would run into.

→ More replies (3)
→ More replies (13)
→ More replies (1)

16

u/[deleted] Mar 15 '09 edited Mar 15 '09

The alternative version for those learning it at a university like mine:

  1. Get told you have to learn functional programming.
  2. Do a couple simple function definitions in Scheme.
  3. Get told that Haskell is "just weird."
  4. Learn some OO design patterns.
  5. Get a degree!

2

u/rule Mar 16 '09

Sound more like a vocational school than a university.

→ More replies (2)

55

u/username223 Mar 15 '09 edited Mar 15 '09

I think at least as many go like this:

  1. Hear about Haskell.
  2. OMG THAT QUICKSORT IS SO SHORT!
  3. Write about it on my blog.
  4. Upvote/submit other people at step 3.
  5. Try to work it into my everyday programming.
  6. Migrate back to whatever I was using to get things done before.

Not all the time, mind you, but more often than not. Something similar happens with Rails and "OMG BLOG APP!"

40

u/G_Morgan Mar 15 '09

I went OMG that quicksort is not quicksort!

→ More replies (7)

6

u/Nerdlinger Mar 15 '09

Which is pretty much ssylvan's list, sans steps 7-15.

→ More replies (1)

5

u/awb Mar 16 '09 edited Mar 16 '09

Trying very hard to unlearn some bad habits from all those years of imperative coding.

I don't like the characterization of imperative programming as bad or backwards. Imperative programming isn't bad or backwards, just like object-oriented, logic, or functional programming. They all have their places, and it's likely the habits you're trying to avoid while doing functional programming are great for doing imperative programming like graphics or device drivers, just like the habits you're trying to learn for functional programming would be very out of place there.

Common Lisp has a GOTO-alike. It's very out of place when doing functional or object-oriented programming, but if you need to transcribe an old algorithm, it's fantastically handy. Use the programming style that fits the problem domain and your code base.

2

u/crutcher Mar 16 '09

Perhaps it is true that all programming styles have their place, but I would suggest that for some styles, that place is on a shelf labeled "Things which didn't work out".

→ More replies (3)

4

u/tbp Mar 15 '09

Haskell as a liturgy? Seems you've found your opium. But i'm curious, may i expect some kind of flash of light, booming voice or any other pyrotechnics during my "very strong conversion experience"?

13

u/FalconNL Mar 15 '09

I don't know about anyone else, but for me it was more of a gradual process. At some point you just start realizing that because lists are monads you can turn

[Card suit value | suit <- [Spades ..], value <- [One ..]]

into

liftM2 Card [Spades ..] [One ..]

or that you can make most parsers much shorter by writing them in applicative instead of monadic style. And once you get to that point (or probably much sooner) you know you can never be fully happy again with the likes of Java and C#.

3

u/edwardkmett Mar 15 '09

Or equivalently, as you said, applicatively:

Card <$> [Spades..] <*> [One..]

→ More replies (1)

12

u/hectorhector Mar 15 '09

as a Haskell programmer, you should know that go to statements are a really bad practice.

28

u/ssylvan Mar 15 '09 edited Mar 15 '09

It's a tail call man!

9

u/jsnx Mar 15 '09

I can confirm this conversion experience.

3

u/[deleted] Mar 15 '09

That list is pretty close. I'm at step 9. Though I skipped #7. I never mocked the zealots. I know there must be something to it.

Though maybe I did go through step 7, I just haven't evaluated it yet. :-)

3

u/seabre Mar 15 '09 edited Mar 15 '09

Or, the alternative version for those learning it at university:

Actually, I introduced one of my professors to Haskell and I did a directed study class with him on functional programming (with a Haskell focus). After that class he has been reworking the intro CS class to focus more on the functional style to help students better prepare for the later courses such as algorithm analysis and data structures.

7

u/weej Mar 15 '09

This really applies to any functional programming language.

11

u/ssylvan Mar 15 '09

Possibly, but Haskell has that whole "purity" thing making it exaggerated. In O'Caml you can always revert to C style coding at any point if you get stuck which makes it easier on imperative coders.

9

u/[deleted] Mar 15 '09 edited Mar 15 '09

Personally, I don't really appreciate the ability to fall back to other styles of programming. A language should enforce its ideals. Like I hate how OO is so half-assed in PHP and Perl. If you're going to support OO, go all the way, damn it. Most of the standard libraries are just not geared towards working with objects. Or you get libraries that do it both ways. Just pick one! Seriously, I can handle it. I don't like things that try to hard to be everything to everyone. If you have a niche, just stick to it and be good at it.

6

u/ssylvan Mar 15 '09

Me too, I'm just saying that for an imperative programmers something O'Caml won't be as painful because he can keep writing imperative code (i.e. not really learning all that much).

→ More replies (1)

6

u/hiffy Mar 15 '09

I keep feeling like the only right approach was Smalltalks, where everything goddamnit is OO, even the control structures.

11

u/wnoise Mar 15 '09

In Haskell, even our control structures are functions.

→ More replies (15)
→ More replies (30)

8

u/maweaver Mar 15 '09

Ok, I guess I'm way at the start of this process.

I hear about Haskell all the times, but all I hear are too things:

  • It's hard as anything to learn
  • It's the greatest thing since sliced bread; or as frukt facetiously put it above, it shits unicorns and rainbows

I can't help but thinking that at least some of the evangelizing is due to people's need to justify the time they spent learning the language.

It's like a risk vs reward analysis; life is short, and I don't have as much free time as I'd like. I don't want to spend it learning a language unless I'm sure it will benefit me.

The problem is I probably won't use it day-to-day, and then when the perfect problem comes along and I'm ready to pull it out, I'll have forgotten it.

Maybe I'm missing out on something that would make me happier and more productive, but I guess that's where the risk part comes in.

12

u/[deleted] Mar 15 '09

It's like a risk vs reward analysis; life is short, and I don't have as much free time as I'd like. I don't want to spend it learning a language unless I'm sure it will benefit me.

I can only think of a couple of languages worth learning given this criterion and some assumptions about what you already know. If I assume that you already know at least one, but probably actually several, imperative, object-oriented languages, then the biggest bang-for-buck languages to learn next, IMHO, would be:

  1. Haskell
  2. Oz

In my opinion, they satisfy the Alan Perlis "A language that doesn't change how you think about programming isn't worth learning" criterion. Interestingly, they do so in completely different ways: Haskell by taking a radically pure approach to functional programming; Oz by taking a radically multiparadigm approach to programming. Haskell is even statically typed and Oz is dynamically typed (but Oz being dynamically typed doesn't bother me; ask me why if you're curious).

9

u/maweaver Mar 15 '09

Actually, the language that met the criteria for me was Scala. It integrates with Java well, which means I can re-use a ton of existing code, both third-part libraries and my own. Plus it can compile down to a .jar and sit within an existing Java app, so it's an easier sell to write a portion of a larger app using it when appropriate.

It supports the functional paradigm (though it can be mixed with the imperative), and other interesting things like Erlang-style actors.

I guess it's the middle-ground; doesn't force you to completely change the way you think so it's maybe not quite as mind-expanding, but easier to get going and incorporate other ideas as needed.

I'll admit I hadn't heard of Oz. Why is it that you don't mind its being dynamically typed? I have a pretty strong preference for statically-typed languages; maybe I've used them so long they've become a crutch, but the compiler always seems to catch a ton of typing-related errors for me, and I feel like I'm missing a safety net using a dynamic language.

9

u/[deleted] Mar 15 '09

I like Scala a lot, which is one reason I'm serving as a tech reviewer for a Scala book. :-)

As I said in another reply, Oz's logic (single-assignment) variables mitigate a great deal of the damage that can be done by dynamic typing. This doesn't make Oz a completely satisfactory substitute for a good statically-typed language, IMHO, but it's sufficient to keep Oz high on my list of "languages to recommend to others without guilt" list, and Oz's extreme multiparadigm nature, with its expressive power, provides more than enough positive motivation to put it high on the list as well. CTM is, IMHO, the best currently-available computer science text, bar none, and it uses Oz as its vehicle, just as SICP before it used Scheme.

→ More replies (1)
→ More replies (5)

5

u/[deleted] Mar 15 '09

but Oz being dynamically typed doesn't bother me; ask me why if you're curious

I'm curious actually, if you don't mind...

7

u/[deleted] Mar 15 '09

So far (this could change), I don't mind Oz being dynamically typed because its variables are logic variables: that is, they're single-assignment. This reduces the possible negative consequences of the lack of static typing sufficiently, in my experience, that it matters much, much less than it would otherwise.

I still prefer static typing in general. But I do find the mitigating effect of logic variables in a dynamically typed language fascinating, and worth noting.

→ More replies (1)

12

u/ssylvan Mar 15 '09 edited Mar 15 '09

I program C++ all day, and I do think that knowing Haskell helps me write better C++. So it's worth it. Especially since C++ will shortly get lambdas etc. which will make higher order programming a lot easier.

7

u/yogthos Mar 15 '09 edited Mar 15 '09

I couldn't agree more, I find having learned Haskell and what functional programming is all about, it has made me a better imperative programmer. I'm much more aware of state manipulation now, and I have new perspective on how to approach a lot of problems.

I find when I hear people complain about functional languages it reminds me of back in the day when Java was still new and people complained about how it had forced exceptions. People would say that it's limiting and that the programmer shouldn't be forced to handle exceptions, etc. Eventually though most peole came to realize that exceptions are indeed a good thing. If you're opening a file you should have to handle the case if the file cannot be read, allowing you to leave that case for later, can mean that you won't handle it at all.

I find pure functional programming approaches state in the exact same way, if you are going to change the state you have to be explicit about it, you have to understand that you're doing something potentially dangerous that can change the state of the world, and you should handle that properly. This is exactly what monads let you do in Haskell.

→ More replies (1)
→ More replies (2)

2

u/xhanjian Mar 16 '09

why the 'haskell learning algorithm' is written in a imperative style?

2

u/barsoap Mar 16 '09

FAIL. A list is a functor.

2

u/Espinha Mar 15 '09

You just HAD to made me google it, didn't you?! I HATE You!

1

u/[deleted] Mar 15 '09

I've been stuck in a #4 - #6 loop for almost two years.

→ More replies (14)

259

u/[deleted] Mar 15 '09

Because Haskell is one of those languages that you spend more talking about programming in than actually programming in.

134

u/[deleted] Mar 15 '09

Ron Paul

Peter Schiff

GUN CONTROL OHNOES

Haskell.

Welcome to Reddit.

44

u/[deleted] Mar 15 '09

Someone needs to write a parody of "we didn't start the fire" about reddit.

8

u/gr8whitesavage Mar 15 '09

we didn't start the flame war

→ More replies (25)

19

u/[deleted] Mar 15 '09

Don't forget about Marijuana.

25

u/taligent Mar 15 '09 edited Mar 15 '09

Also how taxing marijuana will cure the world's economic problems.

12

u/[deleted] Mar 15 '09

Actually, it's legalizing it and taxing.

→ More replies (2)
→ More replies (3)

9

u/[deleted] Mar 15 '09

you forgot tasers.

8

u/ZLegacy Mar 15 '09

and atheism.

→ More replies (8)

64

u/ssylvan Mar 15 '09

Because the actual programming only takes a few minutes!

145

u/frukt Mar 15 '09

Haskell is so awesome, it shits unicorns and rainbows.

112

u/ih8mondays Mar 15 '09

And Narwhals!!! YEAAAAAAAAAH!!!!!!1

60

u/shoseki Mar 15 '09 edited Mar 15 '09

So what you're saying is that its a pain in the ass...

→ More replies (5)

7

u/MechaAaronBurr Mar 15 '09

THEY AIN'T AFRAID NO MONADS!

42

u/gclaramunt Mar 15 '09

Actually, it shits bananas, lenses, and barbed wire. It gives you something that represents the unicorns, you get the actual unicorn when you need to use it

→ More replies (1)

9

u/dons Mar 15 '09 edited Mar 15 '09

Actually, you're right:

cabal install pony

→ More replies (1)
→ More replies (21)

36

u/[deleted] Mar 15 '09

And that's a bad thing because?

Haskell may not be mainstream, but by learning it you're then capable of using the same techniques in your language of choice where it applies.

I just wish programmers would do more thinking, and less bitching about meaningless issues.

→ More replies (7)

10

u/dons Mar 15 '09 edited Mar 15 '09

Check it out, there were dozens of new Haskell packages released this week, and >1000 in the last 500 days on http://hackage.haskell.org (hackage averages ~10 releases a day). People are definitely programming in it, leading to articles, and blogs and other stuff.

→ More replies (2)

26

u/guapoo Mar 15 '09 edited Mar 15 '09

Haskell is correlated with blowhards. Haskell does not cause blowhardiness.


Edit: what do you people think 'blowhard' means? I'm using it to mean someone who talks a lot, in an assertive way. It does not mean that they are unfriendly or a "bad person" (lol at that, night_cough.)

Anyway, the sentiment was that people who like to pontificate about code are drawn to Haskell because its a wellspring of ideas to pontificate about. That doesn't mean there aren't droves of quiet, effective hackers idling on #haskell. (That you can have a conversation on a channel with 500+ people demonstrates that there are.)

I guess I failed in my attempt to say that succinctly, so here I am belaboring the point that some Haskellers run their mouths not because the language is baroque and academic but because baroque academics can indulge their tendencies in Haskell as easily as the pragmatist can indulge his tendency to get shit done, because the language is so malleable. I apologize if my brevity came across as a troll, but I was trying to avoid the stereotype of the windbag reddit Haskeller (again, not pejorative!) that this thread is about.

23

u/ssylvan Mar 15 '09

This is not true. Go to #haskell or the haskell mailing lists. Haskell has the most level-headed and friendly programming language community I've ever seen.

Go to any C++ channel/list on the other hand...

7

u/27182818284 Mar 15 '09

They definitely are friendlier, but I don't think that is because the C++ people are meaner or the Haskell people nicer.

If you spend a lot of time in places ##c++ and such, you realize that questions are being asked over and over again and this just causes frustration among the channel regulars. Even the nicest regulars will get frustrated sometimes.
For example, lurk in ##c++ and you see that every day it seems there is somebody asking about the proper way to convert a string to an int.

Hang out in haskell, and the questions typically aren't revolving around concepts like that because practically no one starts with haskell as their first language. The new haskell users are typically people with experience in another language already.

tl;dr It may be that haskell seems nicer because the people inside are less annoyed by the questions because the questions don't come from raw, beginning programmers.

→ More replies (1)
→ More replies (3)

10

u/ubernostrum Mar 15 '09

So that's why people are talking about leaving Lisp for Haskell...

Just take a statement like "I'm not actually going to write any code, but if I did Lisp would theoretically make it so much easier to write than any other language" and replace "Lisp" with "Haskell". Also, throw in a few strings of eight-syllable mathematical jargon, just for appearances.

→ More replies (3)

10

u/thisisnotmyname Mar 15 '09 edited Mar 15 '09

Because you come to reddit to read hopefully interesting articles about things you wouldn't encounter ordinarily?

8

u/hacksoncode Mar 15 '09

I think there's a much more straightforward answer:

Up until the last few years, there hasn't been much point for the vast majority of engineers to worrying about the non-parallelizability of programming languages (as a practical matter, not theoretically... all languages are equally capable theoretically).

Now that Moore's Law has stopped going in the "faster pussycat, kill, kill" direction, and instead is creating extremely underutilized multiple (slower) cores on chips, many of the smarter programmers are starting to be legitimately worried that they will need to start parallelizing their programs rather than relying on faster processors to cure their bloat.

So they go searching, and find Haskell, which at least in theory has some serious advantages in the parallelizability category.

I'm not sure it really wins you that much, in practice, with normal humans writing the code instead of 99th percentile programmers. But at least if you're a 99th percentile programmer it's a huge win.

And those are the programmers other reddit programmers tend to admire.

Q.E.D.

1

u/Peaker Mar 17 '09

Haskell makes it really easy to parallelize things, even for normal humans :-)

See nested data parallelism.

1

u/[deleted] Mar 17 '09

So they go searching, and find Haskell, which at least in theory has some serious advantages in the parallelizability category.

Does it still hold in the presence of monads? Just guessing here, but if you're maintaining state via a monad, shouldn't you also serialise access to it?

14

u/Peaker Mar 15 '09

Because it makes programs (including real-world ones):

  • Much shorter than in any other language I know. At first, it doesn't seem to be so useful, if it takes longer to read said code. But after a few months of using Haskell, I'm reading this code just as fast as I read other languages -- but since it takes so much less of it, I actually read Haskell code much faster than other languages.
  • Much more reliable than any other language I know (I think Coq/Agda/others should be even more reliable but much harder to get something executing. I may be wrong). The "If it compiles -> It works" joke is ever closer to being actually true in Haskell.
  • It has type-classes, facilitating better code re-use than Java-like interfaces.
  • Has really cool features, such as type-system-marked purity, QuickCheck, and others, see: http://research.microsoft.com/en-us/um/people/simonpj/papers/haskell-tutorial/

3

u/[deleted] Mar 16 '09

Erlang is quite likely more reliable than Haskell, if only because it support hot code swapping, so you can actually update your app without stopping it.

FWIW, I've dealt with both Haskell and Erlang in the wild, being used by finance geeks.

2

u/Peaker Mar 16 '09

Isn't Erlang untyped?

That makes it far less reliable, IMO.

Hot code swapping is a great feature, but its not really a "reliability" feature.

3

u/[deleted] Mar 16 '09 edited Mar 16 '09

Erlang has types.

And it seems pretty disingenuous to define reliability such that hot code updates aren't viewed as an asset on that front.

→ More replies (1)

43

u/[deleted] Mar 15 '09 edited Mar 15 '09

Haskell is also the place where a lot of innovations are happening that later get adopted by other, more mainstream languages. For example, Haskell was one of the early languages with list comprehensions, but now they're in Python too. It's also a place where interesting work with software transactional memory and other new concurrency abstractions is happening, and these might end up in something like Java 10 or C# 7. Also, LINQ in the newer versions of .NET is based on monads, which were pioneered in Haskell.

This means that it deserves and gets more attention than one would expect based on market share.

2

u/munificent Mar 15 '09

Also, LINQ in the newer versions of .NET is based on monads, which were pioneered in Haskell.

Can you explain this more? I haven't seen anything in LINQ that reminded me of monads.

11

u/edwardkmett Mar 15 '09

Linq expressions are a descendant and slight generalization of the earlier Haskell 1.4 era concept of a 'monad comprehension' which is a generalization of list comprehensions to arbitrary monads.

Monad comprehensions were ultimately dropped from the language because they led to terrifying error messages that scared off newcomers to the language.

The connection between monads and LINQ shouldn't come as too much of a surprise as LINQ creator Erik Meijer used to be very active in the Haskell community.

20

u/ssylvan Mar 15 '09 edited Mar 15 '09

Look at the type signature for SelectMany. It's your trusty old >>= (specialized for IEnumerable, since MSIL doesn't support higher kinded polymorphism).

LINQ is really just monad comprehensions, with a tiny bit of extra special-case syntax added on top for things like grouping and sorting.

→ More replies (1)

23

u/Porges Mar 15 '09 edited Mar 15 '09

Perhaps because it is at the moment being quite actively developed (and discovered). It's not like there are currently big changes going on in the C world, or that there are people writing blog posts saying “hey guys, look at this awesome new language I discovered... it has pointers and null-terminated strings!” (;])

12

u/[deleted] Mar 15 '09

I know many Haskell programmers in real life, but that's probably because I'm a useless academic. =\

2

u/[deleted] Mar 16 '09

It's also fairly easy to find if you work in the geekier corners of the finance world.

There are lots of quants who love Haskell.

→ More replies (1)

12

u/crux_ Mar 15 '09 edited Mar 15 '09

Late-to-the-party, career-oriented answer: Because Haskell is one of a few languages that, although they are far from mainstream, are pointing where the mainstream will be.

Language features like: generics (Java 1.5; C# 2.0; C++ templates sort of), list comprehensions (Python's for-comprehensions; C#'s LINQ), closures (C# 2.0; hotly debated for a future Java, anonymous inner classes can fake it; Python & Ruby), higher-order functions.... guess where they come from?

Joe Programmer can work with these as mysterious black boxes, but Sally the Haskell programmer will be able to take them apart, reassemble them, and make them dance.

Not to mention that learning an entirely different way to program is fun.

(Note: I don't use Haskell much myself; instead I use a lot of O'Caml and Scala these days.)

5

u/[deleted] Mar 15 '09

Bitches don't know about my loeb :: Functor a => a (a x -> x) -> a x.

28

u/daybreaker Mar 15 '09

Haskell is the Ron Paul of programming languages.

5

u/shinta9 Mar 15 '09

Government students are required to study Ron Paul? Somehow, I doubt it.

Maybe Haskell is like the U.S. Constitution of programming languages. Everybody has to learn it in school, and you're convinced at the time that they only teach it to make your life painful, and you say "pshaw, this sucks -- the only way to get anything done in the real world is (with C++|a very liberal interpretation of these rules)".

Then 10 years later you go back and take another look, and say "you know, this actually was kind of a good idea". And so you try to tell other people about what a good idea it would be if they read about (Haskell|the U.S. Constitution), and they just think you're a crazy old fart, just like you did when you were their age, and the cycle repeats itself.

3

u/[deleted] Mar 15 '09

We don't have to study Haskell, in school... I wish we did, because I get things done with it faster than in C++ most of the time.

→ More replies (1)

4

u/redditnoob Mar 15 '09

Ron Paul is the Simon Peyton Jones of politics.

3

u/[deleted] Mar 15 '09 edited Mar 15 '09

I think you mean Peyton ‘Simon‘ Jones.

5

u/ithika Mar 15 '09

I'd be willing to bet Simon Peyton Jones isn't a creationist.

5

u/redditnoob Mar 15 '09

Oh yeah? Well I bet Ron Paul doesn't think monads are a good idea.

→ More replies (1)
→ More replies (1)

22

u/guapoo Mar 15 '09

Why? Dons. That's why.

22

u/ssylvan Mar 15 '09 edited Mar 15 '09

Pretty sure it takes more than a single person to upmod articles significantly.

4

u/guapoo Mar 15 '09 edited Mar 15 '09

You're right. I imagine that dons' fans on reddit (clearly he has many) are satisfied users of his many excellent libraries and applications. That still leaves dons as the reason.

8

u/ssylvan Mar 15 '09

I suspect the reason is Haskell, not dons.

→ More replies (3)

14

u/chneukirchen Mar 15 '09

Because this subreddit is about programming, and not the real world.

4

u/djork Mar 15 '09

As one Haskell book put it: you'll see the features that make Haskell unique in mainstream programming languages ten years from now.

68

u/samlee Mar 15 '09 edited Mar 15 '09

Dear Sydd,

It means 1-2 people are positing Haskell related articles here everyday. And a few more people are upvoting the posted articles. Of course, there are many who down vote Haskell related articles. However, number of upvoters are greater than number of downvoters.

I think that's why you see them on this subreddit.

To summarize, there are people submitting those links and there are people upvoting those links. That's my conclusion.

Some might say that Reddit is affiliated to Haskell and they just boost up Haskell articles unfairly. I do not work for Reddit and I can't comment on that.

It's pretty simple. When time passes, you get old. When wind blows, you can feel it. When people submit Haskell articles and enough people upvote, you see them here on Reddit.

I think you are actually asking why there are people who submit and upvote Haskell articles here in Reddit. This can be answered by studying demographics of Reddit users. If many Haskell programmers who are interested in Haskell articles are using Reddit, some of them could be submitting/upvoting Haskell articles because they are interested in Haskell articles.

So, maybe you are asking why on earth Haskell programmers come to Reddit. Probably they have enough time to come here.

And you confess that you've never met this language called Haskell outside Reddit. You can meet Haskell on Facebook, the Internet, Wikipedia, and many other places.

So, I assume that you don't go to Facebook, the Internet, Wikipedia and other places. Be more social. Get out more. Get out from your usual social gathering places like 4chan, Digg, Slashdot, and go to Facebook, the Internet, Wikipedia and other places. I am sure you can find Haskell if you go out more.

Lastly, to answer your question "why?", I have to point to your social behavior and demographics of Reddit. Many things are cause and effect. And, to my knowledge, your experience with Haskell and Reddit is such because of your social ring and current demographics of Reddit.

Wait.. I think I should add that there might be shy ATS developers here on Reddit who would love ATS articles, but they are too shy to post ATS articles. Maybe there are relatively few people interested in Haskell articles. But all of them are so active here on Reddit posting/upvoting Haskell articles.

Man, I don't think I can fully answer your question. I just noticed so many fallacies of my comment. I think I should stop writing because I am making fun of myself by writing further.

To really answer your question, you should close your eyes and feel it. Feel why the universe is as it is... Why Reddit is as it is.. Why you are who you are.. Why Haskell is.... you're falling asleep.. Tender.. Tenderly.. 3.. 2.. 1.. zzZ

29

u/TakaIta Mar 15 '09

Dear Sam,

This might be hard to understand for you but 'going out' does not mean changing the view on the screen in front of you.

5

u/Tekmo Mar 15 '09

I thought it meant refreshing the reddit homepage

18

u/llimllib Mar 15 '09

I think you are actually asking why there are people who submit and upvote Haskell articles here in Reddit. This can be answered by studying demographics of Reddit users. If many Haskell programmers who are interested in Haskell articles are using Reddit, some of them could be submitting/upvoting Haskell articles because they are interested in Haskell articles.

gold.

12

u/AmazingSyco Mar 15 '09

Started off at 0 cuil, ended somewhere around 0.7.

1

u/[deleted] Oct 19 '09

So, I assume that you don't go to Facebook, the Internet, Wikipedia and other places. Be more social. Get out more. Get out from your usual social gathering places like 4chan, Digg, Slashdot, and go to Facebook, the Internet, Wikipedia and other places. I am sure you can find Haskell if you go out more.

That's great :D

1

u/jeff303 Mar 15 '09

Why does the Facebook page have a narwhal?

→ More replies (1)
→ More replies (1)

14

u/benz8574 Mar 15 '09

Yes, it does seem to be a reddit idiosyncrasy. I think there are just more Haskell users here than on other websites.

13

u/ssylvan Mar 15 '09 edited Mar 15 '09

I think people who like programming enough to actually visit the programming subreddit are probably more open to learning cool new things. Haskell certainly fits that category - but things like ATS gets upmodded at least as much too, it just seems like there's more happening in Haskell land at the moment, hence more articles about it.

→ More replies (1)

10

u/DGolden Mar 15 '09

I first encountered haskell in the 90s. The fact you've never met the language outside reddit is just you, shrug.

6

u/BONUS_ Mar 15 '09

I don't actually know Haskell, I just pretend to for cred.

11

u/GunnerMcGrath Mar 15 '09

I think sydd was asking WHY so many of you are infatuated with the language. Short summary about why you think it's worth looking into, please? So far all the comments have just been "It's super hard to learn and you'll hate it until you love it and we'll all have a circle jerk about it." It's like smokers or coffee drinkers talking up how much they like their particular disgusting, acquired taste of a vice. =)

So, anyone have anything to say that might actually make someone want to look into the language? Anyone creating real world applications in it? Why Haskell over any other language in that case?

12

u/ssylvan Mar 15 '09 edited Mar 15 '09

For me there are three, mostly orthogonal reasons:

  1. The functional programming style has lots to offer in terms of productivity. You can get this in any language that adopts the features in question (light weight data structures, lambdas, comprehensions, etc.). Basically this is why you would use F# rather than C# for .Net programming.
  2. Purity. This is an all-or-nothing kind of deal so you won't get it in F#, but with the coming many-core era I really think that separating side effecting code from pure code is going to be crucial. I don't care if Monads end up being the winning strategy for this, but something will almost certainly be needed, and Monads are a proven technique at this point.
  3. Strong typing. Value-oriented programming (very few "statements" where you can screw up the ordering without causing type errors) combined with highly polymorphic code (reduces the number of valid programs that satisfy a given type) combined with a very strong type system leads to programs that "Just Work" once they pass the compiler. Again, this is something you could get from e.g. F#, and not Haskell specific.

So really, it boils down to purity for me. I think parallel and concurrent programming will be ubiquitous in the future, and we need languages that have a chance of dealing with that.

2

u/[deleted] Mar 15 '09

In VB 10/C# 4 you can mark functions as "pure". If so marked, you get a compiler warning when calling any impure function.

Because it isn't strictly enforced, you can side-step the rules when you need to. For example, something the caches values but from the caller's perspective is still pure.

3

u/ssylvan Mar 15 '09

You sure about that? I've seen several presentations about new features in C# 4.0 and not one of them mentioned this.

→ More replies (1)

3

u/jfredett Mar 15 '09

Interesting, so it seems then, that in effect, they are dealing with the dual of purity. Namely, your code is impure by default (in haskell-y terms, all in the IO monad) but with intermittent, marked bits of purity.

→ More replies (1)

3

u/GunnerMcGrath Mar 15 '09 edited Mar 15 '09

Well you have some upvotes, probably from people who like Haskell, but for someone who has not studied it (but has been a successful professional programmer for over a decade) all of those words did nothing to answer my question, since they basically did not convey any actual information, at least to me.

I briefly read through a little information on the language but I'm still unclear on this "pure code" concept. Care to elaborate (or someone else who is a little less interested in showing off his vocabulary and more interested in actually getting the point across to someone who is not well versed in these concepts already)?

4

u/ssylvan Mar 15 '09 edited Mar 15 '09

The 10000 feet view:

Purity means that a function must declare what side effects it has. Here's an example of how it might look in C#.

public IO<string> ReadLine()
{
 // read a string from stdio and return it
}

The key idea is that you're not returning a string, you're returning an IO<string> which says that in order to get call this function and get a string, you must be prepared to do some IO.

In other words if you want to do IO, then you must say so in the type signature. For IO specifically (but not exclusively) there is no way of calling an function that does IO from a function which does not. So it's "sticky", if you want to call a function that does IO, you need to do so within another function marked as doing IO (main, which is the entry point, is an IO function). Effectively you get a (hopefully thin) "shell" of IO functions that interface with the outside world, these functions can in turn call other functions which do not do any IO. Functions withou a "side effect marker" on its type are called "pure". If you pass them some input, they will always return the same output without causing any side effects (e.g. writing to global variables, etc.). This helps readability and reasoning by quite a bit, as it's simply impossible to end up with a wide range of bugs. Even in OOP it's considered best practice to avoid shared mutable state - mutate all you like within the function, but prefer to return the result to the caller, rather than storing it in state that persists after the call. The point is that it's well known even in imperative languages that dealing with mutable state is tricky, and you often end up in weird corner cases where some specific execution path ends up corrupting the state and you have to figure out exactly what circumstances lead to the program ending up in a bad state (which can be tricky). In my experience the vast majority of access violations (or null pointer exceptions) are due to this, and would simply not be possible in Haskell (or if you wrote code in a purely functional style in whatever language you use).

Furthermore, this is becoming even more important because if you e.g. have a list of ten thousand elements, and you want to apply some function to all of them, you can safely do so in parallel if the function you wish to apply is pure - it's simply impossible that the execution of these functions could interfere with each other. In Haskell the type system will catch any attempt to use a function that is not pure in a context where purity is required (such as parallelism).

So it's really all about being "honest" about what you're doing by stating up front in the type signature for the function what you're doing inside it. That way you can safely call third party plugin-code in a parallel context if the types say they don't do side effects, whereas in an impure language you couldn't.

3

u/[deleted] Mar 15 '09

Purity means that you can't mix code with side effects with code that doesn't have side effects without intentionally doing so. Additionally, once an impure procedure uses a function, the result of that function is also considered impure. This is beneficial for a number of reasons:

  1. You can't inadvertantly modify variables. This is useful for preventing program crashes, race conditions, and improves the ability to optimize and parallelize things.
  2. You can prove that your pure code works. If you have a function that doesn't modify data that you pass in or some global variable, then you will always get the same result any time you pass in the same argument (i.e. 2 + 2 always equals 4, global state doesn't change this).
  3. Pure code enforces smarter abstraction and allows you to find edge cases easily. By separating code with side effects and pure code, you typically have a good idea of where to look for bugs or strange behavior (typically the impure code). Also, code naturally falls into multiple stages. You don't have a 'get input, process input partially, print something, finish processing' sort of cycle. Your code neatly falls into a 'get input, process input, print something' sort of cycle. Thus you get cleaner and more organized code.

Hope that helps

6

u/shepheb Mar 15 '09

The introduction to Real World Haskell makes such an argument, though perhaps not as short as you would like.

→ More replies (5)

9

u/Random Mar 15 '09

I'll answer the meta question for you.

There are many many languages that are outside of the mainstream. I think it is fair to characterize the mainstream as Java, C++, C, Fortran (in science labs), PHP/PERL (web), Python...

Many of these languages are radically different in how you should attack problems - they have different affordances for the programmer - and that is a good thing if those correspond to things that you need.

Think of this like the OOP versus non-OOP languages: programming a GUI in non-OOP is a pain because objects just correspond to screen objects well.

So here's the thing. Programming in a non standard language, even if you then go back to your other language will make you a better programmer, because it makes you see your language as an approach, rather than as the whole world.

Concept languages come and go on Reddit. In the last 5 or so years I can recall waves of posts on LISP, erlang, smalltalk, ruby, scheme, lua, and haskell. Plus the subdued but continual buzz about python.

Haskell is a pain to learn but ... to match the pain is the gain.

(this philosophy is essentially from Eric Raymonds rant on the programming languages everyone should learn)

3

u/[deleted] Mar 16 '09

In the last 5 or so years I can recall waves of posts on LISP, erlang, smalltalk, ruby, scheme, lua, and haskell.

Sir, reddit has only been around for four years.

→ More replies (3)

7

u/oldfashionedguy Mar 15 '09
  1. Hear about Haskell.
  2. Enjoy a nice salad.
  3. Get back to inventing snake legs.

5

u/drguildo Mar 15 '09

But... but... xmonad!

5

u/[deleted] Mar 15 '09

It already happened three separate times in this thread:

Q: Has anybody ever written a useful program in Haskell?

A: Yeah, duh, XMonad. It's an entire window manager written in Haskell.

It gets funnier every single time I see this exact exchange.

2

u/ssylvan Mar 15 '09 edited Mar 15 '09

Dude, http://www.haskell.org/communities/05-2008/html/report.html

Particularly section 6 and 7. Xmonad is mentioned because it's probably more appealing to the reddit crowd (being a linux window manager for expert users and all that).

Also, please consider that this is a subset of people who were willing to write a project report (and even knew about HCAR!).

5

u/tejoka Mar 15 '09

It's interesting.

What do you WANT submitted? The 15 blog posts written today about how PHP sucks ad infinitum? zzzz

28

u/TrueTom Mar 15 '09

The reason is that certain people spam /r/programming with everything that contains the word 'Haskell' in order to promote the language.

Sometimes there is a nice article among them, but most of the stuff (especially the 5 lines mailing list posts) should go to /r/haskell.

12

u/furlongxfortnight Mar 15 '09

They wrote a Haskell program to do that.

→ More replies (5)

22

u/[deleted] Mar 15 '09 edited Mar 15 '09

Actually, I don't consider Haskell articles as spam.

I think Haskell is a neat language and I find it interesting to read articles about it. An if someone is enthusiastic about Haskell and feel the need to share the enthusiasm with other that seems reasonable to me.

I know when I had just discovered bzr and got all excited about it bzr I posted a few articles about it here. :-)

PS: I haven't posted any articles on Haskell yet.

Edit: Btw, it not just about the Haskell articles, I frequent reddit as I like hearing of cool new stuff be it haskell, scala, clojure, arc and so on.

17

u/TrueTom Mar 15 '09

It depends on the article. Some mailing list post about someone who announced v0.0.1 of some library isn't really that interesting if you don't use Haskell. Using some sensationalist headline like "Interesting! This is so cool! Haskell has now a library for..." is also kind of lame.

7

u/Chandon Mar 15 '09

And that's why there's a downvote button.

→ More replies (1)

2

u/sbrown123 Mar 15 '09

The reason is that certain people spam /r/programming with everything that contains the word 'Haskell' in order to promote the language.

So true. And it doesn't promote the language I believe. Most people who use /r/programming aren't influenced easily by fluff and start ignoring the noise after a while (or invent/use nice little filters that remove good and bad articles on the subject from their view altogether).

2

u/[deleted] Mar 15 '09

But Haskell wants to avoid all success, so its users are doing it a service this way.

10

u/[deleted] Mar 15 '09

This has many parallels to the atheism subreddit.

If you surround yourself with religious folks and read only the mainstream media, atheists are invisible. But there is a whole different world out there, and you have to go through a wormhole (such as Reddit) to the other side.

You will notice that O'Reilly -- a purveyor of popular books on tools (Make, X Windows, Perl) -- is selling out Real World Haskell. Sort of like the God Delusion. There are a lot of people questioning the status quo.

I suppose the same question and answer could apply to Lisp (see Clojure, Practical Common Lisp) and Erlang as well.

1

u/[deleted] Oct 19 '09

If you surround yourself with religious folks and read only the mainstream media, atheists are invisible.

Classic.

→ More replies (1)

5

u/jsnx Mar 15 '09 edited Mar 15 '09

It is because of our powerful lambdabot, which has cracked the Reddit algorithm. Soon, very soon, we will be at the top of the front page...

Then we will demand one million dollars!

1

u/m_res Mar 15 '09

That's such a small pittance for Congress to pass out these days. It wouldn't even be worthwhile to lobby them for it.

(Yes, I get the reference)

5

u/Tommstein Mar 15 '09

Because Haskell users are unemployed with nothing better to do than spam their language at a per capita rate 1,000 times higher than other languages?

4

u/beltingorion Mar 15 '09 edited Mar 15 '09

That's because when we REALLY need to get work done in a functional language we use Erlang. (ducks)

4

u/[deleted] Mar 15 '09

Get out more, they teach it as part of Comp Sci at my local Uni (Nottingham, UK)

4

u/davebrk Mar 15 '09

Something that always bothers me. You see a lot of people mentioning Haskell's great performance on the Shootout, but if you look at underlying haskell code, not all of it is elegant and you can spot quite a few go to's and C like code blocks...

8

u/igouy Mar 15 '09 edited Mar 15 '09

not all of it is elegant

Given arbitrary tasks and performance constraints is it too much to expect that the code will always be elegant?

Is it enough to ask that the code is more elegant than the alternatives? Is the code more elegant than the alternatives?

For example, if we look at the spectral-norm programs,

3

u/sclv Mar 15 '09

There's a bit of c-like ffi left in a very very few benchmarks. There are no go tos. None. Haskell doesn't have a go to, or anything resembling a go to, or anything resembling something that resembles a go to.

→ More replies (2)

2

u/dmead Mar 15 '09

i do agree, that code on the shootout is written by people who understand how ghci handles code, not average haskell programmers who attack problems from a conceptual point of view. i'm sure if i wrote neat and concise haskell for that it wouldn't even make the top 10

→ More replies (2)

6

u/[deleted] Mar 15 '09

that's because such a large number of people in academia are working on functional programming and haskell is a functional programmer's language of choice.

See for example here why functional programming is all the rage now

18

u/[deleted] Mar 15 '09

Actually, that's why it was all the rage 25 years ago...

2

u/jfredett Mar 15 '09

well, 50ish years ago, when lisp was invented... :)

→ More replies (1)

3

u/Poddster Mar 15 '09

Does anyone have any examples of useful things (programs or tools) that have been created in Haskell?

10

u/[deleted] Mar 15 '09

I use a window manager called XMonad on a daily basis. That's written in Haskell. There's also one of the first distributed version control systems, darcs, but it's fallen out of favor because it doesn't perform as well as newer ones like git (specifically, it has corner cases that can make it go REALLY SLOW).

5

u/allertonm Mar 15 '09 edited Mar 15 '09

This is a screenshot of XMonad: http://xmonad.org/images/screen-dons-tall-status.png

I've no idea why this has not caught on!

4

u/[deleted] Mar 15 '09

Hehe, yeah, the eye candy in XMonad isn't so hot :) But the usability for someone like me is really great! It makes it much faster to use both my monitors effectively. It's pretty bad for something like the GIMP that uses lots of tiny windows, but I spend most of my time in Firefox, Thunderbird, Netbeans, Emacs, and other programs that have one big window. It's great for that!

3

u/edwardkmett Mar 15 '09

Actually, I used to laugh about xmonad myself, then I tried it.

I don't particularly like the idea of a tiling window manager, but it just gets out of your way. This doesn't show well in a screenshot, because it doesn't display anything other than the contents of the widows it is tiling, and a little border to tell you which one is active.

The fact is its short enough to read and understand completely in a single sitting, it's thoroughly tested and far easier to extend than the comparable tiling window managers it was designed to compete against.

→ More replies (1)

3

u/dons Mar 15 '09

There's a user contributed gallery of screenshots here: http://haskell.org/haskellwiki/Xmonad/Screenshots#Misc_screenshots

7

u/awj Mar 15 '09

Yeah, if it doesn't have crazy transparency and real-time dynamic lighting it isn't a window manager to me.

Also, wobbly windows.

→ More replies (39)

4

u/edwardkmett Mar 15 '09

The darcs version control system was the first package in Debian written in Haskell to obtain wider distribution than the compiler itself.

I still prefer it to git for small projects because it lets you cherry pick patches without a ton of manual labor.

5

u/[deleted] Mar 15 '09

Because its milkshake brings all the boys to the yard.

4

u/[deleted] Mar 15 '09

Pfft, Haskell is for people who can't understand [Erlang | Io | Scheme | Brainfuck].

4

u/OpenMindedCitizen Mar 15 '09

Haskell: The Ron Paul of programming languages.

3

u/srparish Mar 15 '09

Because r/programming != infoq. There are other places its mentioned a lot, ultimately due to lambda, but i won't name locations as you'd dilute the discussion there like the discussion here has been diluted.

3

u/bbibber Mar 15 '09

Typical real world vs academia disconnect. You probably have a real job with real world needs that need to be filled in a practical way today. So you frequent a social circle where Haskell is not a solution and hence not talked about. The average r/Haskell pusher on the other hand...

2

u/bleahy Mar 15 '09

This is probably a meaningless generalization but what the hell...Haskell is a functional language like ML, Scheme, Lisp and some others. It is supposedly pure but I will leave that whole discussion for language narcs. But in general people who use these languages often use recursion...a lot. People love recursion, are ambivalent towards recursion or hate/don't get recursion. What is recursion? Suppose you have a list of numbers and you want the sum. Many people quickly see the idea of creating an extra variable, let's call it sum. Now we go through the list one element at a time and add each number to sum. Seems logical. But that's not recursion. Recursion is realizing that if the list contains no elements its sum is 0 otherwise its sum is the sum of the first element and the sum of the rest of the list. Or sum(list) = 0 if empty?(list) is true otherwise = first(list) + sum(rest(list)). If you thought that was the coolest thing you have ever seen you might like Haskell. If you thought it seemed like kind of complex and idiotic way to find a sum then Haskell is probably not your cup of tea.

3

u/bleair Mar 15 '09 edited Mar 15 '09

This is a pretty good answer. I'd also add that unless you are trying to "solve" the problem of how to generate a fibonacci sequence haskell isn't that useful in the real world.

See, here's the thing. The world has this stuff called money, and if you can solve real problems in the real world better or cheaper or more quickly than someone else then you're able to build tools (or produce graphics, or produce websites) better than everyone else and as a result the real world will pay you lots of money. Curiously, despite all the supposed benefits of haskell, this doesn't happen. Now maybe every person who learns haskell to a proficient level also ends up learning to hate money, or maybe haskell just isn't useful in the real world.

Are there any games, telecomm systems, websites, data-store systems, search engines, or films whose cgi are produced with software written in haskell?

It's not just because haskell is a functional language, xslt and erlang are both functional and both solve problems in their respective spaces (search haskell vs. erlang :), though I'm sure being functional is part of haskell's problem. Haskell is missing constructs, libraries, and toolkits that would allow its users to solve real problems. Maybe that will change someday.

3

u/[deleted] Mar 16 '09 edited Mar 16 '09

Are there any games, telecomm systems, websites, data-store systems, search engines, or films whose cgi are produced with software written in haskell?

http://www.haskell.org/haskellwiki/Haskell_in_industry

The answer is "Yes" to most of your questions.

→ More replies (1)
→ More replies (2)

2

u/[deleted] Mar 15 '09

Because it doesn't really exist outside of Reddit X-D

2

u/zorglub421 Mar 15 '09

reddit was one programmed in lisp if I remember correctly, attracting some functional programming interest. Then moved to python. There are sometime article about Caml, too.

2

u/ayrnieu Mar 15 '09

You have a single-minded publicist, a humorless voting bloc, and then Haskell's hype base: people who hem and haw and say, well, there must be something to this! I mean: it's got all these singly interesting features -- surely any manner of amalgamation of them would also be interesting? Every time I put my finger in it I withdraw bleeding sores... but who can say why that is? And all these other hype-users seem to want to learn it. With any other language in the world, they'd've just gone out and learned it, reported back with their confident newbie distortions, and never have maintained this "aww, one day I'll learn X" for very long. That you never see these kind of reports with Haskell must mean that it's really good!

3

u/Smallpaul Mar 15 '09

Yes, Haskell is special in 2008 for the same reason that Lisp was special in the 1950s. It is most likely a vessel for important ideas that will re-emerge elsewhere. The mainstream programmers who hated Lisp for years benefited TREMENDOUSLY from the innovations it drove.

1

u/[deleted] Mar 15 '09

I had to learn it for a class last term, didnt work out great in the exam... funny to see it featured so often at reddit

1

u/[deleted] Mar 16 '09

I found reddit from talk on #haskell and Haskell somehow when I searched for interesting languages to learn.

0

u/lukasmach Mar 15 '09

Because the relation "Haskell vs. Other programming languages" is equivalent to "Particle physics vs. Engineering". The latter is useful, the former is beautiful.

(Now, of course, Haskell should really be replaced by "purely functional languages".)

20

u/frukt Mar 15 '09

Beauty is in the eye of the beholder. I personally find C very elegant and beautiful. (I should probably duck now to avoid the flaming fireballs.)

5

u/Seppler9000 Mar 15 '09

C is beautiful. Arguably, its beauty is what makes it such a terrible language for large, complex programs.

→ More replies (2)

10

u/Leonidas_from_XIV Mar 15 '09

C is okay in reddit-land, but you better don't say anything good about C++ :)

3

u/[deleted] Mar 15 '09

I like java.

2

u/the_bob Mar 15 '09

Something needs to be said about your grammar.

→ More replies (1)
→ More replies (1)

8

u/[deleted] Mar 15 '09

It's okay. I find Perl elegant and beautiful.

At least while I'm writing it.

→ More replies (3)
→ More replies (3)

1

u/[deleted] Mar 15 '09

Haskell rocks. It's the new sliced bread!

If you want to write less code in a high level language, Haskell is the way to go and GHC produces smoking fast performance(look at the language shootout).

If you want to write high level assembly go with C++ and you will slit your wrists eventually and regret your choice of C++ instead of Haskell.

→ More replies (2)

0

u/flkdsjflsd Mar 15 '09 edited Mar 15 '09

I've done Haskell in uni and probaly will (gladly) never and ever use it again. I think it's good for social website like this for people to contribute what they're passionate about. There is a reason why there is an up and down button.

8

u/vagif Mar 15 '09

Wow, you are lucky. Not that many programmers (me included) had a functional programming course in university. We had to learn it after.

2

u/[deleted] Mar 16 '09

Perhaps that's why we like it...

1

u/[deleted] Mar 15 '09

I bet most of these people saying that Haskell isn't usable for real world applications have never tried it.

1

u/logrus101 Mar 15 '09

Remember Scheme?

Yeah, some CS guru comes up with a new language every decade that allows other CS gurus to code eloquently for a certain set of problems.

The rest of us cobble together serpentine "if" statements in Python, VB, Java and Perl.

1

u/shea241 Mar 15 '09

Haskell spontaneously formed itself. Nobody created it, and it was only recently discovered.

1

u/m_res Mar 15 '09

This sounds like the plot to a bad SciFi/Hacker movie.

1

u/RalfN Mar 15 '09

Then you haven't been to college yet.

1

u/[deleted] Mar 15 '09 edited Mar 15 '09

2 weeks ago didn't someone post a self.programming about how proggit used to be so much better when there were links about Haskell instead of _________?

0

u/[deleted] Mar 15 '09

It's the language of these damn reddit domestic terrorists, that hate our freedoms!

0

u/randomb0y Mar 15 '09

Because the universe was programmed entirely in Haskell.

8

u/ItsAConspiracy Mar 15 '09

No it wasn't.

It wasn't?

I mean, ostensibly, yes. Honestly, we hacked most of it together with Perl.

1

u/[deleted] Mar 15 '09

The universe is actually a bug. God was just trying to calculate a factorial.

2

u/ludwig1024 Mar 15 '09

That's one hell of a side-effect.

2

u/Porges Mar 16 '09

unsafeInterleaveUniverse

0

u/neoabraxas Mar 15 '09

Is there an actual application written in Haskell? Can anyone point to it?

3

u/jfredett Mar 15 '09

xmonad, pandoc, gitit, patchtag...

really, just poke around on hackage for 20 minutes, there are 1100+ packages...

→ More replies (1)