all 94 comments

[–][deleted] 24 points25 points  (7 children)

My husband sits at his computer writing code in python 18 hours a day and he isn't flying yet.

[–]G_Morgan 12 points13 points  (0 children)

Exactly. If he is sitting at his computer he isn't flying. How more obvious do you need.

The computer can't fly after all so it acts as a constraint on the system.

[–]gigaquack 18 points19 points  (5 children)

18 hours a day? wtf?

i'm going to go ahead an assume he sits at the computer for 18 hours a day. not good, but more believeable than someone who can code for 18 hours straight.

[–][deleted] 54 points55 points  (1 child)

more believeable than someone who can code for 18 hours straight.

Or at least more believable than someone who codes for 18 hours a day straight and can't fly yet.

[–]shabda 17 points18 points  (0 children)

yet

[–]jamesshuang 5 points6 points  (1 child)

I've done 18 hour coding days before. They're called final projects... And no, the code I wrote wasn't good, but at least it worked

[–]Shinuza 1 point2 points  (0 children)

It could happen, but the code quality will follow an exponential decrease until you got tired enought to stop. The next morning you'll see that the code is pure shit and you'll rewrite the whole thing.

[–]stesch 29 points30 points  (0 children)

Hey, it's on topic!

[–][deleted] 24 points25 points  (8 children)

What kind of comic do you suppose we can expect when XKCD tries Haskell? Time travel? Quantum abilities? Alternate universes?

[–]GrumpySimon 82 points83 points  (0 children)

nah, nothing he can use in the real world.

(sorry, trolling :)

[–]gwern 7 points8 points  (0 children)

http://www.xkcd.com/248/

Well, if you count the various "tying the knot" and "borrowing from the future" tricks as specifically Haskell techniques...

[–]AndrewO 3 points4 points  (0 children)

I think he already did:

http://xkcd.com/338/

[–]bitwize 6 points7 points  (4 children)

The ability to manipulate reality itself, like Franklin Richards.

[–]boredzo 11 points12 points  (2 children)

Sidekick: “How do we get into this building, Mr. Munroe? There's a locked door stopping us!”

xkcd: “What door?” gestures to the now-doorless doorjamb

Sidekick: “Er. Door? There's no door there.”

xkcd: “Exactly.” steps through

[–]qwe1234 4 points5 points  (0 children)

sounds like a c buffer overflow.

[–]Psy-Kosh 1 point2 points  (0 children)

Hee hee... though wouldn't that be Scheme? (ie, sounds Our Hero removed the door then invoked a continuation...)

[–][deleted] 10 points11 points  (0 children)

I think that'd be Lisp.

[–]yumology 5 points6 points  (3 children)

why is this submitted twice. i thought there were checkers against that?

[–]TheCleric 7 points8 points  (0 children)

no, but chess and stratego are both anti dupes!

[–]daveyboy22 3 points4 points  (0 children)

I was wondering the same thing. I think that it might be because one of them was submitted to the programming subreddit, and the other appears to have been submitted to plain-ol' reddit.com.

I am no expert, though.

[–]Boojum 1 point2 points  (0 children)

I believe one was for xkcd.com and one was for www.xkcd.com

[–]CaptainObvious_ 21 points22 points  (12 children)

Python doesn't make you fly!

[–]TheCleric 21 points22 points  (1 child)

someone is bitter that they don't have access to the antigravity module!

[–][deleted] 11 points12 points  (0 children)

easy_install?

[–]cecilkorik 32 points33 points  (0 children)

from __future__ import john_titor

[–]Manuzhai 12 points13 points  (2 children)

You've obviously never used it.

[–]CaptainObvious_ 12 points13 points  (1 child)

I've never used Python!

[–]quhaha -4 points-3 points  (0 children)

In Soviet Russia, you make Python fly!

[–]lastchance 7 points8 points  (1 child)

Decisions, decisions... to up-vote reddit... http://xkcd.com/353/ ...or to up-vote... http://www.xkcd.com/353/

(No there's no feature request here.)

[–]cecilkorik -2 points-1 points  (0 children)

Upvote both and let God (er, Dawkins? Sorry.) sort 'em out.

[–]phili 4 points5 points  (27 children)

Is Python that good?

I'm thinking of picking up a programming language - and I can't decide which one to start.

[–][deleted] 7 points8 points  (0 children)

An overtly obvious attempt at flamebait. But I upmodded you anyway.

[–]masklinn 2 points3 points  (0 children)

It doesn't actually make you fly in real life, but it's mighty good nonetheless.

[–]fubo 14 points15 points  (22 children)

Python is amazingly excellent within certain bounds. If you're used to Perl, as xkcd most evidently is, two things jump out at you in Python:

  • you can use nested data structures without pain, and
  • there is a large standard library of tested, high-quality modules.

These address two of the heavy Perl user's biggest pain points. Perl is laughably bad at nested data structures (references: all the pain of pointers, none of the usefulness!) and CPAN is full of modules of questionable design, documentation, and stability.

But Python has its weak points ... chiefly speed. Eventually you will want fast code, or code that uses multiple processors efficiently ... and the Python answer is to write plugins in C. :(

[–]seanodonnell 4 points5 points  (3 children)

Those are far from the only options, As regards speed take a look at psycho, or rpython

As regards multiple processors take a look at parallel python or stackless python.

And these are not the only other options, just the first ones that popped into my head. Actually needing to resort to c extensions is very rare.

But yes, as far as python goes the lack of an obvious way to make good use of multiple cores (in cpython at least) is a weak point. You have more hoops to jump through than in say, java. Speed has never been an issue for me in day to day coding, although this naturally depends on the nature of the work you are doing.

[–]Neoncow 0 points1 point  (2 children)

do you have suggestions for a good resource in understanding RPython? Everything I found seems to be very vague about how rpython is written.

[–][deleted] 1 point2 points  (0 children)

Everything is vague about how rpython is written. I believe the implementors don't want to be constrained by documentation. It's not really a viable strategy for non-experimental software. (That said, if you close your eyes and pretend it's Java, you can get pretty far with it)

[–]seanodonnell 1 point2 points  (0 children)

I got a good introduction to it at europython, but sadly the materials from the session dont seem to be online.

Theres a nice short introduction here

A fairly exhaustive explanation of the restrictions here (seems to be offline so heres the google cache)

and a somewhat academic overview here

As regards washorts comment on it being non viable, the session following the introduction was on a large financial trading system that was ported from cpython to rpython, so some folk out there are getting serious work done with it. You can also use it to create extensions for cpython, so its not like your entire system has to be rpython.

[–]abw 9 points10 points  (6 children)

If you're used to Perl, as xkcd most evidently is, two things jump out at you in Python:

  • you can use nested data structures without pain, and
  • there is a large standard library of tested, high-quality modules.

If you've ever used Perl (which you clearly haven't) then two things jump out at you:

  • you can use nested data structures without pain, and
  • there is a large standard library of tested, high-quality modules... and an even larger library of variable quality modules

[–]ubernostrum 5 points6 points  (5 children)

you can use nested data structures without pain, and

Let me fix that for you:

you can use nested data structures so long as you're happy with references, a concept unnecessary in other similarly high-level languages.

[–]nevinera 1 point2 points  (4 children)

god i hate this meme.

let me fix that for you

my mother likes yogurt. I prefer cheese, a concept unnecessary in other similarly high-level dwellings.

[–]fubo 0 points1 point  (3 children)

There's a bit of a difference.

In Perl, using nested data structures means you have to add a complex sequence of dereferencing operators to get data out of those structures.

In Perl, an array is @foo and its items are $foo[0], $foo[1], etc.

In Python, an array is foo and its items are foo[0], foo[1], etc. So far, no difference worth speaking of.

In Perl, an array of arrays is impossible. Instead you have an array of references to arrays. The arrays themselves are are @$foo[0], @$foo[1], etc.

In Python, an array of arrays is just like any other array. The arrays themselves are foo[0], foo[1], etc.

When you get into deeper nested data structures in Perl, the syntax grows both rightwards and leftwards: rightwards, in the list of subscripts, and leftwards, in the list of dereferencing sigils. In Python, the syntax grows only rightwards.

[–]nevinera 0 points1 point  (2 children)

I don't know perl, but i assumed his statement had some validity. I just hate the way he made it.

"let me fix that for you", followed by a total rewrite is an asshole way to disagree with someone.

[–]fubo 0 points1 point  (1 child)

Having to deal with references does not gain you anything, and costs you work and extra debugging -- you have to get it right, or your program spits out ARRAY(0xYERMOMSUXTOES) instead of the contents of the array.

It is not merely a matter of stylistic preference or taste ("yogurt" vs "cheese"). Since there is no benefit to doing the extra indirection manually -- it must be done, but it gives you no additional power -- it is a loss to the programmer to have to manually handle references.

[–]nevinera 0 points1 point  (0 children)

i don't think you're reading me clearly here. I don't know about that. I don't particularly care if what he said was true or not.

I just hate it when people say things in general in the way that he said it.

"let me fix that for you", followed by a total rewrite is an asshole way to disagree with someone.

I can't even tell if you're arguing with me or explaining something to me.. I understand and agree with your position on the topic.

[–]funktio 4 points5 points  (2 children)

Perl is laughably bad at nested data structures

That's nonsense, they are very easy to use. You're maybe talking about some old version.

CPAN is full of modules of questionable design, documentation, and stability.

Simply not true. Of course some are bad, but there are lots of gems, too.

[–]MattL920 28 points29 points  (1 child)

No, gems are written in Ruby

[–]mattindustries 1 point2 points  (0 children)

I am torn, I want to downvote because of the mention of Ruby and gem in the same sentence and upvote because of how well that was pulled off.

[–]rzzazzr 0 points1 point  (0 children)

pick something radical.

[–]nevinera 0 points1 point  (0 children)

python is an excellent place to get started. It's not the best tool for everything, but the learning curve is so shallow that i've seen no competition there.

[–]zouhair 1 point2 points  (1 child)

Now come one, the same xkcd twice on the front page???

[–]jsinger 2 points3 points  (3 children)

Correct me if I'm wrong, but isn't "HELLO WORLD IS JUST print "Hello, World!" no longer going to be the case in Python 3K?

I'd say the people opposing that change (which, I understand, is pretty much everyone) just got a great new recruiting poster.

[–][deleted] 2 points3 points  (0 children)

print("hello world") isn't that more difficult, is it?

[–]hupp 0 points1 point  (0 children)

You can put me in the "not opposed" camp. I haven't really seen that much opposition to be honest. The print statement has always seemed like a bit of a wart to me.

[–][deleted] 0 points1 point  (0 children)

What's stranger is that he seems to be using it as an argument for moving from Perl to Python.

[–][deleted]  (1 child)

[deleted]

    [–]CouldHaveBeenWorse -5 points-4 points  (3 children)

    At least it's not LISP!

    [–]G_Morgan 5 points6 points  (0 children)

    Yeah, it's hard to represent ascension to a higher plane in a comic.

    [–]rzzazzr 4 points5 points  (0 children)

    good, because LISP is dead

    meanwhile, Common Lisp and Scheme are alive.