0353: "Python"

This forum is for the individual discussion thread that goes with each new comic.

Moderators: Moderators General, Prelates, Magistrates

User avatar
b.i.o
Green is the loneliest number
Posts: 2519
Joined: Fri Jul 27, 2007 4:38 pm UTC
Location: Hong Kong

0353: "Python"

Postby b.i.o » Wed Dec 05, 2007 5:03 am UTC

Image
Alt text: I wrote 20 short programs in Python yesterday. It was wonderful. Perl, I'm leaving you.

I only know a little Python, but what I do know I love. Learning a lot more Python is my winter break project.
Last edited by b.i.o on Wed Dec 05, 2007 5:06 am UTC, edited 1 time in total.

User avatar
Wolf
Posts: 581
Joined: Fri Jul 13, 2007 10:07 pm UTC
Location: Orange County (sadly), California, US

Re: "Python" discussion

Postby Wolf » Wed Dec 05, 2007 5:05 am UTC

I hope Perl isn't too crushed by all this.

I really need to learn Python. It just sounds fun, as well as incredibly useful.
There's a method to my madness. Somewhere. Don't worry, I'll find it!

I'm learning game design! Watch my progress here: http://www.humming-rain.com

My friend wrote:You played fast and loose with punctuation and suffered the consequences.

User avatar
suso
Posts: 199
Joined: Wed Jan 17, 2007 6:23 pm UTC
Location: Sky Grund
Contact:

Re: "Python" discussion

Postby suso » Wed Dec 05, 2007 5:06 am UTC

Bleh, I don't know. Python just doesn't do it for me, and that's probably because I already am strict about writing readable code. Its my wife that I wish would indent, and she's the one with a CS degree. :o

If you can write Frozen Bubble in Perl, you can probably do everything Python does. It serves my needs.

Waiting for this thread to finally show up was an exercise in pain.
Imagine theres no signatures....

benjhayden
Posts: 3
Joined: Wed Dec 05, 2007 5:05 am UTC

Re: "Python" discussion

Postby benjhayden » Wed Dec 05, 2007 5:13 am UTC

SHIRT!

User avatar
Syphon
Posts: 116
Joined: Fri May 04, 2007 1:48 am UTC

Re: "Python" discussion

Postby Syphon » Wed Dec 05, 2007 5:13 am UTC

I find php more fun.

The dollar signs make it seem classy.

ln|mower|+c
Posts: 31
Joined: Fri Mar 30, 2007 3:20 am UTC

Re: "Python" discussion

Postby ln|mower|+c » Wed Dec 05, 2007 5:18 am UTC

Maybe I will have to try my hand at some Python. It couldn't hurt to give it a fair try.
signature

User avatar
Anpheus
I can't get any worse, can I?
Posts: 860
Joined: Fri Nov 16, 2007 10:38 pm UTC
Location: A privileged frame of reference.

Re: "Python" discussion

Postby Anpheus » Wed Dec 05, 2007 5:20 am UTC

Syphon wrote:I find php more fun.

The dollar signs make it seem classy.


That's rich! Ha-ha!
Spoiler:

Code: Select all

  /###\_________/###\
  |#################|
  \#################/
   |##┌         ┐##|
   |##  (¯`v´¯)  ##|
   |##  `\ ♥ /´  ##|
   |##   `\¸/´   ##|
   |##└         ┘##|
  /#################\
  |#################|
  \###/¯¯¯¯¯¯¯¯¯\###/

User avatar
DragonHawk
Posts: 457
Joined: Sat Sep 15, 2007 1:20 am UTC
Location: NH, US, Earth
Contact:

Re: "Python" discussion

Postby DragonHawk » Wed Dec 05, 2007 5:21 am UTC

Oh, boy, a programming language war on xkcd! This should be fun.

My favorite language is INTERCAL. Hey, it's Turing-complete. ;-)

I posted this comic to the local Python SIG's mailing list; they should get a chuckle out of it.
Ben'); DROP TABLE Users;--

GENERATION 42: The first time you see this, copy it into yοur sig on any forum and stick a fork in yοur еyе. Social experiment.

User avatar
BNOOOOGERS
Posts: 38
Joined: Fri Nov 09, 2007 5:10 am UTC
Contact:

Re: "Python" discussion

Postby BNOOOOGERS » Wed Dec 05, 2007 5:22 am UTC

WHAT?!

Since when was there a serpentine alternative to perl??

(in guiness style) Brilliant!

User avatar
OfficiallyHaphazard
Age=postcount/60
Posts: 209
Joined: Tue Aug 28, 2007 2:56 pm UTC

Re: "Python" discussion

Postby OfficiallyHaphazard » Wed Dec 05, 2007 5:31 am UTC

Wow, this came with perfect timing. I have a python program due tomorrow :D

Also, for programing wars, go to the "Religious Wars" forum.
"Who are you, how did you get in my house?" - Donald Knuth

User avatar
1337geek
Posts: 551
Joined: Mon Oct 01, 2007 4:21 am UTC

Re: "Python" discussion

Postby 1337geek » Wed Dec 05, 2007 5:32 am UTC

I like Python. It's a bit difficult to get accustomed to it after spending time with C++ and Java, though.

Python is used by Google, NASA, YouTube, BitTorrent, and Industrial Light & Magic.
"Duct tape is like the Force. It has a light side, a dark side, and it holds the universe together." --Carl Zwanzig

User avatar
Anpheus
I can't get any worse, can I?
Posts: 860
Joined: Fri Nov 16, 2007 10:38 pm UTC
Location: A privileged frame of reference.

Re: "Python" discussion

Postby Anpheus » Wed Dec 05, 2007 5:35 am UTC

I think you're getting a little ahead of yourself saying Python must be awesome because look, these other awesome people use it ;p
Spoiler:

Code: Select all

  /###\_________/###\
  |#################|
  \#################/
   |##┌         ┐##|
   |##  (¯`v´¯)  ##|
   |##  `\ ♥ /´  ##|
   |##   `\¸/´   ##|
   |##└         ┘##|
  /#################\
  |#################|
  \###/¯¯¯¯¯¯¯¯¯\###/

User avatar
aerojad
Wall O' AWESOME
Posts: 200
Joined: Wed Sep 26, 2007 8:54 am UTC
Location: Detroit, MI
Contact:

Re: "Python" discussion

Postby aerojad » Wed Dec 05, 2007 5:44 am UTC

Perl is going to go home sad and listen to Linkin Park.
Image

User avatar
ThatOneRedhead
Posts: 11
Joined: Fri Nov 30, 2007 9:52 pm UTC
Location: Midwest, USA
Contact:

Re: "Python" discussion

Postby ThatOneRedhead » Wed Dec 05, 2007 5:47 am UTC

aerojad wrote:Perl is going to go home sad and listen to Linkin Park.


Can you have an emo programming language?

/always saw Fortran saying 'Get off my lawn!'

User avatar
marco
Posts: 34
Joined: Fri Jul 06, 2007 5:59 am UTC
Location: -----

Re: "Python" discussion

Postby marco » Wed Dec 05, 2007 5:47 am UTC

he...and again, it seems Randall knew about my day.
I was discussing python with a friend today, and I even said something along the lines of "..I dunno, dynamic typing?.."
but after ruby I can get used to it I guess...it's my winter break project as well, and I am even more excited now! I'll be able to fly down south to scape all the snow.
I never really loved Perl anyways...
"I wonder if she lets anyone into that island of light"

9tails
Posts: 2
Joined: Wed Dec 05, 2007 5:46 am UTC

Re: "Python" discussion

Postby 9tails » Wed Dec 05, 2007 5:48 am UTC

<3 Ruby.

Though PyGame is pretty awesome.

keflavich
Posts: 2
Joined: Wed Dec 05, 2007 5:49 am UTC
Location: Boulder

Re: "Python" discussion

Postby keflavich » Wed Dec 05, 2007 5:52 am UTC

I'm in, the snake language is clean. It has a nice set of data language packages for replacing IDL and such. Still, it's more difficult to be a regexp hero with python...

Adam

User avatar
mwn3d
Posts: 44
Joined: Fri Jul 06, 2007 4:19 am UTC
Location: NY
Contact:

Re: "Python" discussion

Postby mwn3d » Wed Dec 05, 2007 5:53 am UTC

oddly enough...the quickBASIC hello world program is also

Code: Select all

print "Hello world"

of course you could just type

Code: Select all

? "Hello world"

and it would change it into the right code.





but who uses BASIC for anything important anymore?

jamesh
Posts: 13
Joined: Fri Jul 20, 2007 6:39 am UTC

Re: "Python" discussion

Postby jamesh » Wed Dec 05, 2007 5:56 am UTC

>>> import this

bcoblentz
Posts: 59
Joined: Mon Jun 18, 2007 6:28 am UTC
Location: Davis, CA

Re: "Python" discussion

Postby bcoblentz » Wed Dec 05, 2007 5:57 am UTC

Python's great when you want to program more as a means rather than an end. It's not that I don't admire programmers who take the time to master harder/"better"/whatever languages; I just recognize that I don't have the knack for it and I'd rather get my results in as little time and with as little frustration as possible.

A nonlinear dynamics class made me love Python last spring. If only it could have done the same thing with nonlinear dynamics*. :oops:

That being said, Python was as easy to forget as it was to learn. I didn't touch it all summer and now I have to do my next program in C++.

Err, I mean, good comic.



*Although I did get to play in a holodeck.
Last edited by bcoblentz on Wed Dec 05, 2007 6:04 am UTC, edited 1 time in total.

galofdasouth
Posts: 3
Joined: Wed Dec 05, 2007 5:58 am UTC

Re: "Python" discussion

Postby galofdasouth » Wed Dec 05, 2007 6:02 am UTC

Okay, so I giggled a LOT today when I read this comic. It's funny, cause I learned Python first. Now I am taking a course in JAVA and I realize just how amazing Python truly is.

I find myself writing mini programs in Python to help me with my Math and Physics hw.... It's better than a calculator by far.

Oh, and Visual Python kicks ass when you want to waste time. You can make pretty pictures that move. How awesome!

But yeah, Python is for people who want to program but don't want to actually learn how to program. This is why I am able to use it. :-D

tkeller
Posts: 11
Joined: Wed Jan 10, 2007 1:41 am UTC

Re: "Python" discussion

Postby tkeller » Wed Dec 05, 2007 6:04 am UTC

Code: Select all

antigravity.py

import webbrowser
webbrowser.open('http://www.xkcd.com/353')


:)

User avatar
aeflash
Posts: 11
Joined: Wed Nov 14, 2007 7:20 am UTC

Re: "Python" discussion

Postby aeflash » Wed Dec 05, 2007 6:04 am UTC

I always liked python, especially better than perl. It reads like pseudocode. The only thing python lacks is built in regex support, but its easy enough to import re. Perl is really weird with its strict variable prefixes and weird operators. "Obfuscated perl" is a redundant statement.

User avatar
dr7
Posts: 59
Joined: Mon Feb 12, 2007 3:17 am UTC
Location: Right here. You can't see me?
Contact:

Re: "Python" discussion

Postby dr7 » Wed Dec 05, 2007 6:06 am UTC

C is still the best language ever in the history of computer languages. Always has been, still is, and always will be.

If you don't like C, you must be some sort of communis--I mean terrorist. Terrorist.
dr7: king of the wicker people

User avatar
sunami
Posts: 239
Joined: Sat Jul 21, 2007 4:52 am UTC
Location: Arlington. The state of Northern Virginia.

Re: "Python" discussion

Postby sunami » Wed Dec 05, 2007 6:07 am UTC

ANOTHER CONVERT!!! SOON THE WORLD WILL BE-- hmm, I should probably keep that last bit quiet...

Seriously, python is a great language and I love seeing representation from xkcd!

Oh, as for an actual comment on the comic itself, did anyone else have a really hard time reading the third panel (middle one on the bottom)? The bottom-to-top approach kept throwing me off.
Last edited by sunami on Wed Dec 05, 2007 6:09 am UTC, edited 1 time in total.
"You heard it here first: all my software is shitty."

steve.howard
Posts: 6
Joined: Wed Oct 24, 2007 9:06 am UTC

Re: "Python" discussion

Postby steve.howard » Wed Dec 05, 2007 6:08 am UTC

I first learned C++. Then I moved to Java for AP CS, and it was like "Hey, network connections that don't make me have to worry about handcrafting my own packets! Cool!"

Then I moved to Python and I haven't touched Java since (used C++ for a data structures class that required it, though).

Bummer is now I have to work with Perl at work. @$)(%*!#%(#)$# - frustration, or sophisticated algorithm? In Perl, TMTOWTDI, so it must be both.

Oh, and

Code: Select all

from __future__ import braces


That is all...
Last edited by steve.howard on Wed Dec 05, 2007 6:34 am UTC, edited 1 time in total.

User avatar
scowdich
The Hedgehog
Posts: 771
Joined: Tue May 22, 2007 4:55 am UTC
Location: University of Illinois (Urbana-Champaign)
Contact:

Re: "Python" discussion

Postby scowdich » Wed Dec 05, 2007 6:13 am UTC

Nobody is concerned about the "sampled everything in the medicine cabinet" bit? No matter how floaty our new Python user is now, in about 10 minutes he's going to have some interesting interaction effects.

User avatar
borvise
Posts: 25
Joined: Mon May 28, 2007 4:55 am UTC
Contact:

Re: "Python" discussion

Postby borvise » Wed Dec 05, 2007 6:16 am UTC

I really do love python.

If anyone is looking for an absolutely excellent example of python, check out Blender. It's by far the fastest 3D Modeling/Rendering/Editing/Animating/Game-Creating/PB&J-Making software I've tried out, it runs on any major operating system, and is ridiculously moddable. A happy man is he who is running a python program.
Irony and Coincidence are my food.

smw
Posts: 1
Joined: Wed Dec 05, 2007 6:15 am UTC

Re: "Python" discussion

Postby smw » Wed Dec 05, 2007 6:17 am UTC

After writing a couple hundred thousand lines of Python, I took a good look at Ruby, and found that programming can be even more fun.

User avatar
aeflash
Posts: 11
Joined: Wed Nov 14, 2007 7:20 am UTC

Re: "Python" discussion

Postby aeflash » Wed Dec 05, 2007 6:20 am UTC

galofdasouth wrote:But yeah, Python is for people who want to program but don't want to actually learn how to program. This is why I am able to use it. :-D


Actually, one thing that I see that I dont like about python is that it brings about a breed of programmers that don't need to understand computers. See, I really appreciate python because I had to labour though C and C++ for several years, and was relieved to see python automatically take care of stuff like memory management. However, a novice can just pick up python and write functional programs, but they ay not understand how they work at the low level.

bcoblentz
Posts: 59
Joined: Mon Jun 18, 2007 6:28 am UTC
Location: Davis, CA

Re: "Python" discussion

Postby bcoblentz » Wed Dec 05, 2007 6:26 am UTC

That isn't *always* important.

User avatar
aerojad
Wall O' AWESOME
Posts: 200
Joined: Wed Sep 26, 2007 8:54 am UTC
Location: Detroit, MI
Contact:

Re: "Python" discussion

Postby aerojad » Wed Dec 05, 2007 6:28 am UTC

ThatOneRedhead wrote:
aerojad wrote:Perl is going to go home sad and listen to Linkin Park.


Can you have an emo programming language?

/always saw Fortran saying 'Get off my lawn!'

Well if you want to go by age groups, which programming language would be in the MySpace Teenage years right now? Perl would actually fit the age description nicely (born in 1987) If any language is going to be emo I'd guess C++ (1983, hey my age) because no matter what C++ does to impress people everyone still thinks his dad is better.



I can't believe I just did that.
Image

ph33l_da_l0v3
Posts: 23
Joined: Mon Oct 30, 2006 3:53 pm UTC
Contact:

Re: "Python" discussion

Postby ph33l_da_l0v3 » Wed Dec 05, 2007 6:33 am UTC

First drug reference in an xkcd comic?

User avatar
Unforgiven
Posts: 162
Joined: Wed Jul 25, 2007 8:48 am UTC
Location: Tokyo, Japan

Re: "Python" discussion

Postby Unforgiven » Wed Dec 05, 2007 6:34 am UTC

aeflash wrote:
galofdasouth wrote:But yeah, Python is for people who want to program but don't want to actually learn how to program. This is why I am able to use it. :-D


Actually, one thing that I see that I dont like about python is that it brings about a breed of programmers that don't need to understand computers.

That's rather elitist, and a far too common attitude. Why is programming without understanding computers a bad thing? As long as these guys don't write software for nuclear powerplants I don't see the problem.

Besides, Python is far from the first language that does this. Visual Basic, which despite what some people may say still has one of the largest userbases in the world when it comes to business programming, is also perfectly usable without knowing one iota about the underlying mechanics.

The thing is that if you do know those things, your code will all the better, regardless of the language, C#, VB, Java, Python, it doesn't matter. That has been and will continue to be the distinction between a casual programmer and a great coder.
"Now we're at the museum. Do you think they'll have DDR in there too?"
"It's Japan. Of course they will."

top1214
Posts: 29
Joined: Wed Oct 17, 2007 6:06 am UTC

Re: "Python" discussion

Postby top1214 » Wed Dec 05, 2007 6:37 am UTC

By no means am I a programmer. I'm just a biologist who knows how to program a little. I got into it a little bit doing research over the summer and needing perl. This convinced me to take the "hard" intro to programming (C++). I almost laughed in class when we were shown the 7 or so lines to print "Hello, world" that takes the shebang and one line in perl. Long and boring story short, I learned to program in C++ and appreciate perl.

I love perl arrays and regex.

And who doesn't like using $_, $1, or something like @{$_[0]} ?

russianspy1234
Posts: 51
Joined: Mon Sep 10, 2007 4:43 am UTC

Re: "Python" discussion

Postby russianspy1234 » Wed Dec 05, 2007 6:48 am UTC

++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
FTW

Or, the next best programming language ever.
HAI
CAN HAS STDIO?
VISIBLE "HAI WORLD!"
KTHXBYE

And of course, clocking in at #3

Satertek
Posts: 4
Joined: Fri Nov 02, 2007 1:54 am UTC
Location: Alabama

Re: "Python" discussion

Postby Satertek » Wed Dec 05, 2007 7:00 am UTC

At work tip: Python website is .org NOT .com. :shock:

Hockeypuck
Posts: 7
Joined: Sat Jul 07, 2007 4:21 am UTC
Location: Groton, MA
Contact:

Re: "Python" discussion

Postby Hockeypuck » Wed Dec 05, 2007 7:00 am UTC

I think this is the only time I've ever read the word Python on the internet in unknown context, thought about the programming language, and was actually correct!

Pipian
Posts: 3
Joined: Wed Dec 05, 2007 6:57 am UTC

Re: "Python" discussion

Postby Pipian » Wed Dec 05, 2007 7:09 am UTC

9tails wrote:<3 Ruby.

Though PyGame is pretty awesome.


I had to join just to agree with this. I've learned Perl, loved Python, and even coped with PHP 4's half-assed object-oriented code, but after having taught myself Ruby by way of Rails this summer, Ruby is like everything Python is, but better and without whitespace as a hindrance to vision-impaired programmers.*

Seriously, can you define and implement methods in some random file and then mix them seamlessly into any Python class you choose without subclassing and almost implement multiple inheritance? Ruby can.**

Oh, and it has its ways of making you use lambda-like functions without even trying.

Python is still my second favorite scripting language though. And I still have a warm spot in my heart for Objective-C for compiled language (I love being able to mix in methods into my NSString), even though C# is also quite nice. Java and C++ are simply too clunky for my average taste, but I can deal.

* I am not vision-impaired
** I mean yeah, if you're being pedantic, you could technically write a Ruby OR a Python script to write Python scripts, so everyone wins, but that's cheating.

EDIT: P.S. As you can see, I <3 Duck Typing.
Last edited by Pipian on Wed Dec 05, 2007 7:21 am UTC, edited 1 time in total.

AdShea
Posts: 14
Joined: Tue Apr 24, 2007 9:11 pm UTC

Re: "Python" discussion

Postby AdShea » Wed Dec 05, 2007 7:16 am UTC

I'm glad another Perl user has seen the light...

Regexes aren't meant to be scary... they're meant to be fun!


Return to “Individual XKCD Comic Threads”

Who is online

Users browsing this forum: pex and 36 guests