Page 1 of 2

1312: "Haskell"

Posted: Fri Jan 03, 2014 8:29 am UTC
by Hiferator
Image

Hover text: The problem with Haskell is that it's a language built on lazy evaluation and nobody's actually called for it.

I have to admit, I've never heard of Haskell before. Where do I hand in my nerd card now?

Edit: Fixed title.

Re: 1312: Haskel

Posted: Fri Jan 03, 2014 8:36 am UTC
by tWoolie
I think that this comic is a bit of an inside joke, since xkcd uses a fair bit of Haskell internally.

source: http://www.reddit.com/r/haskell/comment ... ind_xkcds/

davean wrote:Many parts of xkcd are implemented with Haskell. A short list includes:
  • dynamic.xkcd.com (though it is unloved and in need of a rewrite, using an old, old version of happstack - a rewrite on WAI exists and will be deployed soonish)
  • Umwelt, which will be merged with dynamic.xkcd.com soon; described above.
  • pbfcomics.com which we host and somewhat maintain. Based on WAI, feed, and HStringTemplate (mistake due to the Haskell implementation of StringTemplate).
  • holistic.xkcd.com a quick joke site using WAI, digestive-functors (plus internal digestive-functors-wai that needs to be open sourced), the leveldb bindings, and for spam checking http-conduit.
  • Tools for interacting with our hosting provider voxel.net (downloads logs, purges CDN, etc). (release need to release these)
  • Some business admin tools.
  • Two new sites that haven’t been released yet. One of which is written using Hakyll.

Re: 1312: "Haskel"

Posted: Fri Jan 03, 2014 8:38 am UTC
by capncanuck
You misspelled the title, it's "Haskell"

Re: 1312: "Haskell"

Posted: Fri Jan 03, 2014 8:46 am UTC
by Leibnix
Why knock Haskell for being lazy? That was uncalled for!

Re: 1312: "Haskell"

Posted: Fri Jan 03, 2014 9:00 am UTC
by Nix_Seb
Leibnix wrote:Why knock Haskell for being lazy? That was uncalled for!


*snarf*

Re: 1312: "Haskel"

Posted: Fri Jan 03, 2014 9:04 am UTC
by BAReFOOt
The advantage of Haskell is, that few people understand it, and few people ever will.

So it is likely to never be susceptible to dumbing down by the iTard crowd that already destroyed (X)HTML, Firefox, KDE, Gnome, and tries to do the same to Linux as a whole.

The mindset in the Haskell community is still this wonderful fresh air of maximum emergence, efficiency and elegance,
as opposed to “simplicity”, “KISS” and other styles of dumbing things down beyond being still useful.

So you still have some actual power in there, and can actually do advanced programming, without an idiot jumping out from behind a hedge and going “But the morons (who don’t want to get it) won’t get it! We must delete fucking everything, and only have one big button that says ‘automagic’ and never does what you actually want, unless you have no free will! I am too stupid to realize that that has just created even dumber (and louder) idiots in the past, so you are egocentric for wanting something for smart people too for even once!

The “year of Linux on the Desktop” will be the year where Linux dies. (See: Android/FirefoxOS/… and ETIAF.)
The year of Haskell in mainstream will be the year where Haskell dies.

Re: 1312: "Haskell"

Posted: Fri Jan 03, 2014 9:10 am UTC
by rhomboidal
I'd definitely count unkempt body hair as a potential side effect.

Re: 1312: "Haskell"

Posted: Fri Jan 03, 2014 10:14 am UTC
by FLHerne
I may use XMonad a lot (right now even) but have so far entirely failed to actualy understand the language. It's weird. :? :oops:

Re: 1312: "Haskel"

Posted: Fri Jan 03, 2014 10:59 am UTC
by PolakoVoador
BAReFOOt wrote:The advantage of Haskell is, that few people understand it, and few people ever will.

So it is likely to never be susceptible to dumbing down by the iTard crowd that already destroyed (X)HTML, Firefox, KDE, Gnome, and tries to do the same to Linux as a whole.

The mindset in the Haskell community is still this wonderful fresh air of maximum emergence, efficiency and elegance,
as opposed to “simplicity”, “KISS” and other styles of dumbing things down beyond being still useful.

So you still have some actual power in there, and can actually do advanced programming, without an idiot jumping out from behind a hedge and going “But the morons (who don’t want to get it) won’t get it! We must delete fucking everything, and only have one big button that says ‘automagic’ and never does what you actually want, unless you have no free will! I am too stupid to realize that that has just created even dumber (and louder) idiots in the past, so you are egocentric for wanting something for smart people too for even once!

The “year of Linux on the Desktop” will be the year where Linux dies. (See: Android/FirefoxOS/… and ETIAF.)
The year of Haskell in mainstream will be the year where Haskell dies.


Dude, you really can't post without being self-pretentious and calling everyone else retard, can you?

Re: 1312: "Haskel"

Posted: Fri Jan 03, 2014 11:18 am UTC
by DR6
BAReFOOt wrote:The advantage of Haskell is, that few people understand it, and few people ever will.

So it is likely to never be susceptible to dumbing down by the iTard crowd that already destroyed (X)HTML, Firefox, KDE, Gnome, and tries to do the same to Linux as a whole.

The mindset in the Haskell community is still this wonderful fresh air of maximum emergence, efficiency and elegance,
as opposed to “simplicity”, “KISS” and other styles of dumbing things down beyond being still useful.

So you still have some actual power in there, and can actually do advanced programming, without an idiot jumping out from behind a hedge and going “But the morons (who don’t want to get it) won’t get it! We must delete fucking everything, and only have one big button that says ‘automagic’ and never does what you actually want, unless you have no free will! I am too stupid to realize that that has just created even dumber (and louder) idiots in the past, so you are egocentric for wanting something for smart people too for even once!

The “year of Linux on the Desktop” will be the year where Linux dies. (See: Android/FirefoxOS/… and ETIAF.)
The year of Haskell in mainstream will be the year where Haskell dies.


... are you /u/TheGoodMachine on reddit? If you aren't, you two would be friends. I swear he posted what was semantically the same rant, including the same examples, and if that rant didn't use "iTard", another one did.

The difference being that on reddit you just get downvoted and nothing happens, while here a flame war will be able flourish until a mod comes: if you are wrong, because people call you out, and if you're right, because people call you out for being pretentious. Such is life.

PD: What's up with the deletionpedia link? How is it relevant to programming?

Re: 1312: "Haskell"

Posted: Fri Jan 03, 2014 12:00 pm UTC
by Jamaican Castle
I've heard of indie musicians, and indie gamers, but this has to be the first time I've seen an indie programmer.

I have to say, it doesn't come off any better than the other two...

Re: 1312: "Haskell"

Posted: Fri Jan 03, 2014 12:06 pm UTC
by Negrebskoh
I programmed in Haskell before it was cool.

Re: 1312: "Haskell"

Posted: Fri Jan 03, 2014 12:46 pm UTC
by Muffinman42
It's a well known fact that Haskell solely exists to power Imperial college London by making Alan Turing spin in his grave at ~5million hertz.

Re: 1312: "Haskell"

Posted: Fri Jan 03, 2014 12:58 pm UTC
by cellocgw
Negrebskoh wrote:I programmed in Haskell before it was cool.


I'd like to say "I programmed in Haskell before it was lazy," but I've never actually used Haskell.

Then again, I've never used WhiteSpace or BrainFuck either, thank goodness!

Let me put in a plug for another sadly overlooked language: LOLcode

Re: 1312: "Haskel"

Posted: Fri Jan 03, 2014 1:51 pm UTC
by R3sistance
BAReFOOt wrote:So it is likely to never be susceptible to dumbing down by the iTard crowd that already destroyed (X)HTML, Firefox, KDE, Gnome, and tries to do the same to Linux as a whole.


you can't really destory software that isn't very good to begin with. Firefox was just massively overly praised by the community and I don't think KDE or Gnome were really ever that good to begin with either, my preference generally was always a Bash terminal over either unless I really needed a GUI for whatever reason

HTML has always been flimsy since IE, Firefox, Opera and others came along and just varied too much from the standard. Opera probably kept the strictest to the standards historically but as all three browsers would try to interpret nonsense from the get-go the damage was already done. XHTML was an attempt to undo that damage but developers weren't convinced, thus XHTML was not a failure of dumbing down considering the original was basically dumb to begin with due to the browsers. W3C are still trying to tighten up HTML but I doubt HTML5 will achieve that, let alone HTML6 whenever that becomes a thing.

Also there are other things in your post that were just dumb past comprehension but to address it all would take literally all day... however you complained literally that the year of the Linux desktop is the year linux dies yet also complained of how "the iTard Crowd" already destroyed KDE and Gnome both of which that are Desktop Environments used for placing Linux on... the Desktop... yeah... You just seem to be mindlessly ranting in angst rather than actually putting together anything of any meaningful argument or complaint.

Re: 1312: Haskel

Posted: Fri Jan 03, 2014 1:54 pm UTC
by Klear
tWoolie wrote:
davean wrote:Many parts of xkcd are implemented with Haskell. A short list includes:
(...) pbfcomics.com which we host and somewhat maintain. Based on WAI, feed, and HStringTemplate (mistake due to the Haskell implementation of StringTemplate).(...)


Perry Bible Fellowship is hosted by xkcd? Cool.

Re: 1312: "Haskell"

Posted: Fri Jan 03, 2014 2:05 pm UTC
by DR6
cellocgw wrote:
Negrebskoh wrote:I programmed in Haskell before it was cool.


I'd like to say "I programmed in Haskell before it was lazy," but I've never actually used Haskell.

Then again, I've never used WhiteSpace or BrainFuck either, thank goodness!

Let me put in a plug for another sadly overlooked language: LOLcode


Oh, come on, at least BAReFOOt actually holds the opinions he defends: you must just be trolling.

Re: 1312: "Haskell"

Posted: Fri Jan 03, 2014 2:21 pm UTC
by Flumble
While I really like Haskell for its laziness and glorious syntax, I always prefer an imperative language to actually make something (slightly) useful.


Muffinman42 wrote:It's a well known fact that Haskell solely exists to power Imperial college London by making Alan Turing spin in his grave at ~5million hertz.

Are you reading dresden codak by any chance?

Re: 1312: "Haskell"

Posted: Fri Jan 03, 2014 2:26 pm UTC
by TomPace101
Here's my problem with Haskell:
I wanted to learn it, so I bought a book about it and downloaded an interpreter to experiment with.
...None of the code in the book works. :(

Re: 1312: "Haskell"

Posted: Fri Jan 03, 2014 2:36 pm UTC
by jestingrabbit
Negrebskoh wrote:I programmed in Haskell before it was cool.


Well I programmed in miranda, a precursor to haskell.

Re: 1312: "Haskell"

Posted: Fri Jan 03, 2014 2:43 pm UTC
by DR6
TomPace101 wrote:Here's my problem with Haskell:
I wanted to learn it, so I bought a book about it and downloaded an interpreter to experiment with.
...None of the code in the book works. :(


... what book and what interpreter? That is sure weird. Learn You a Haskell's code should totally work, except a few parts which are slightly outdated.

Re: 1312: "Haskell"

Posted: Fri Jan 03, 2014 3:06 pm UTC
by TomPace101
This was about 10 years ago, but the book was "An Introduction to Functional Programming Systems Using Haskell" from Cambridge University Press, and the interpreter was the Glasgow Haskell Compiler (GHC).
I think the problem was just that it was an older book, and the language had changed since it was published.

Here are the links:
http://www.cambridge.org/us/academic/subjects/computer-science/programming-languages-and-applied-logic/introduction-functional-programming-systems-using-haskell
http://www.haskell.org/ghc/

Re: 1312: "Haskell"

Posted: Fri Jan 03, 2014 3:36 pm UTC
by XrXr
I discovered Haskell a few days ago in a video about programming paradigm. I only have about 2 years of experience programming in Python prior to that.
It's so werid..
I went to tryhaskell.org to try it so maybe it can become less werid to me, but it didn't help..
so..
Flumble wrote:While I really like Haskell for its laziness and glorious syntax, I always prefer an imperative language to actually make something (slightly) useful.

Re: 1312: "Haskell"

Posted: Fri Jan 03, 2014 4:43 pm UTC
by qubodup
The main programming language of Nikki and the Robots is Haskell.

At least as of now, circa 1018 people at least pretended to run Haskell-based Nikki and the Robots.

Re: 1312: "Haskell"

Posted: Fri Jan 03, 2014 5:22 pm UTC
by carlt
This is silly. Haskell is one of the best programming languages around and a wonder to work with because you're focused on problem solving instead of introducing loop counters, indices and other semantically irrelevant lines of code. The type system alone makes Haskell great. It's not the right language for every application but try writing a parser in a C-style language and then port it to Haskell and you'll notice how neatly a grammar can be expressed. There's obviously still a place for imperative programming but Haskell is the better choice more often than you'd think.

Re: 1312: "Haskell"

Posted: Fri Jan 03, 2014 7:03 pm UTC
by hegel5000
I find it pretty easy to use purity in other languages, even without Haskell's very nice support for it.

Obviously, without lazy evaluation (which essentially delays copying until you've made all your edits), you have to mutate large collection objects because it would be silly to copy those all the time. But otherwise, you can just . . . you know . . . pass by copy. Or use C++'s const& in your type signatures.

And remember to take advantage of the ternary operator, which is like a functional version of if-then-else because it actually returns a value, so you can have

Code: Select all

const T = predicate ? value1 : value2;
and stuff like that.

What really makes Haskell special is that the syntax is concise enough that you can arbitrarily define control flow statements by writing functions which take functions as arguments. Also, Haskell does have state. It's presented to the programmer as a function's arguments, and it's edited by calling a function but with different arguments. This way, state transitions are more easily managed both by other programmers and by the garbage collector. And Haskell has all standard imperative programming features (as well as a fantastic C foreign function interface). It's just encapsulated in a special object which has to be passed to the main function.

Re: 1312: "Haskell"

Posted: Fri Jan 03, 2014 7:06 pm UTC
by jonat
Bah! It can't hold a candle to INTERCAL.

Re: 1312: "Haskell"

Posted: Sat Jan 04, 2014 3:00 am UTC
by Nautilus
hegel5000 wrote:What really makes Haskell special is that the syntax is concise enough that you can arbitrarily define control flow statements by writing functions which take functions as arguments.

Yeah, this is one of the things I like most about haskell; I usually find higher order functions to be more comprehensible than macros or direct syntax extensions. (Although, to be fair, haskell code tends to play fast and loose with syntax extensions)
I actually love haskell in general, but it is a puzzle language, and it can be obnoxious to learn if you're not used to abstract math - which you don't strictly need to use haskell, but the mindset helps.

Re: 1312: "Haskell"

Posted: Sat Jan 04, 2014 6:34 am UTC
by Kit.

Re: 1312: "Haskell"

Posted: Sat Jan 04, 2014 4:49 pm UTC
by ronzie9
Is Haskell polite and respectful when grownups are around, and an evil little prick when they're not?

Re: 1312: "Haskell"

Posted: Sat Jan 04, 2014 4:59 pm UTC
by hamjudo
The first language I learned with lazy evaluation was "make", with its incredibly crufty Makefile syntax.

I use that style of lazy processing in other languages. That is, I create objects which have the rules necessary to generate the result, but it doesn't use those rules, unless and until, I need the result.

Re: 1312: "Haskell"

Posted: Sat Jan 04, 2014 5:39 pm UTC
by gnutrino
Oh dear, I see Religious Wars is leaking.

Re: 1312: "Haskell"

Posted: Sun Jan 05, 2014 11:12 am UTC
by sudo make me a username
Second time xkcd made me think "I should learn <x>". First time was with the old comics about LISP (that talked about how timeless and elegant it is). This time it's more about the discussion here than the comic itself.
And in another topic, I'm hope I'm not starting a flamewar, but I had some experiences that make me identify just a little with BAReFOOt. He presented his point with a aura of extreme elitism, saying that everything is dumbed down now. I disagree with that. You could say programming became simpler. That is progress, that was bound to happen, and it doesn't make the languages any less powerful. What I dislike is overdoing it. Making a "single magic button" that does half the work for you. It's fun and all but then you need to change the default behaviour and it's sometimes as hard as writing it all from scratch. I think Microsoft is especially guilty of doing that with their too-popular .net framework. Especially ASP.net. I once had to help someone with an ASP project. He used what seemed to be an extremely powerful feature to easily make a page that displays forms for every database table he wants and allows the user to edit or insert individual rows. It took minutes to create the page, hours to make it work as we wanted. Fun fun fun.

Re: 1312: "Haskel"

Posted: Sun Jan 05, 2014 4:40 pm UTC
by SecondTalon
DR6 wrote:
BAReFOOt wrote:The advantage of Haskell is, that few people understand it, and few people ever will

...

The difference being that on reddit you just get downvoted and nothing happens, while here a flame war will be able flourish until a mod comes: if you are wrong, because people call you out, and if you're right, because people call you out for being pretentious. Such is life.

No, the difference is on Reddit there are mods who supposedly stop shit, but do nothing. On most subs, at least.

Here, we prevent you from posting - either in certain places or the whole thing - , ban you, or just change what you said.

Both of you. Hell, all of you. For being asshats.

Don't be asshats. I hate having to figure out which tool in my arsenal to use. I hate trying new ones too. I will, sure. But I hate doing it.

The same way a kid at a birthday party hates eating another slice of cake.

(This is called Giving The Poster Rope. If you choose to tie a noose and stick your neck in it, I cannot stop you.)

Re: 1312: "Haskell"

Posted: Mon Jan 06, 2014 3:22 am UTC
by Twitchkidd
All I can say, really, is: ... you OK, bro? I know it's cold out, but damn ..

Re: 1312: "Haskel"

Posted: Mon Jan 06, 2014 5:20 am UTC
by Jamaican Castle
SecondTalon wrote:The same way a kid at a birthday party hates eating another slice of cake.


Wait... there are kids who hate eating more cake? I never had those at my birthday parties...

Re: 1312: "Haskell"

Posted: Mon Jan 06, 2014 6:47 am UTC
by prosfilaes
carlt wrote:This is silly. Haskell is one of the best programming languages around and a wonder to work with because you're focused on problem solving instead of introducing loop counters, indices and other semantically irrelevant lines of code.


The problem is, I get all of that with Scala, plus the ability to use imperative programming and access all Java's libraries trivially. Heck, even Java and Ada have loops that let you iterate through a container without indices.

Re: 1312: "Haskell"

Posted: Mon Jan 06, 2014 2:33 pm UTC
by Kit.
prosfilaes wrote:
carlt wrote:...and other semantically irrelevant lines of code.

The problem is, I get all of that with Scala,

One example from my link above:

Code: Select all

fac 0 = 1
fac n = n * fac (n-1)

Can you show us the equivalent code in Scala?

Re: 1312: "Haskell"

Posted: Mon Jan 06, 2014 11:47 pm UTC
by tWoolie
Haskell really is an amazing language, but it gets a lot of (undeserved) shit for being hard to learn, being too mathematical/theoretical, impractical. These may have been true criticisms 5 years ago, but the language has evolved into an incredibly productive standard since then (Haskell2010, Haskell Platform).

You don't need to know the theoretical underpinnings of monads and category theory to be able to write a simple IO program

Code: Select all

main = do
    in <- getLine
    putStrLn ("You Said: " ++ in)

Nor do you need to understand Relational Algebra to use a database:

Code: Select all

main = runSqlite ":memory:" $ do
    print ( rawQuery "SELECT * FROM students WHERE name LIKE '%DROP TABLE%';" )

Just listen to what some of these smart people have to say about Haskell.
http://www.quora.com/Reviews-of-Haskell

Re: 1312: "Haskel"

Posted: Tue Jan 07, 2014 6:06 am UTC
by SecondTalon
Jamaican Castle wrote:
SexyTalon wrote:The same way a kid at a birthday party hates eating another slice of cake.


Wait... there are kids who hate eating more cake? I never had those at my birthday parties...


I see not everyone quite gets my metaphors....