well...Perl gets me a bit nutty sometimes and I want to try something new. Anyone using Python for CGI around here?
perl vs. python (cgi)
Collapse
X
-
ewh python? perl or php ...all else is obsoleteComment
-
I used to program in Python and still love it. On the other hand, if Perl gets you nutty, Python will drive you insane.I couldn't possibly know what I'm talking about, I'm completely, absolutely and definitively out of my fucking mind.Comment
-
-
oh...I got halfway through C Programming Language and Unix Programming Environment and that's really what I wanted to do...just got sidetracked with a few perl projects...ok, maybe forget the scripting languages and get back to trying to learn C?Originally posted by Lane
if u insist on cgi and have the balls, try some C
u might even enjoy it
and thanks for the replies.Comment
-
well...after 200 - 300 lines of code I am lost...is this just a newbie thing or is this just how programming goes ;-)Originally posted by dnsmonster
I used to program in Python and still love it. On the other hand, if Perl gets you nutty, Python will drive you insane.Comment
-
Simple solution - Write readable code and comment your shit!Originally posted by hudson
write only...read never...I would rather rewrite code than to try to understand what I wrote before ;-)
If you can't read your own perl then you will trouble with any programming language.
The only things that are difficult to read are complex regular expressionsI don't endorse a god damn thing......
Comment
-
no...no...no...don't pin this shit on me...lot's of people say perl is a write only language...it isn't just me!Originally posted by blazin
Simple solution - Write readable code and comment your shit!
If you can't read your own perl then you will trouble with any programming language.
The only things that are difficult to read are complex regular expressionsComment
-
Take Python for what it is intended to do. It's indented loop structure is awkward, but visibly logical. It's meant to be a CONTROL language to launch other sub-programs/APIs.
Think of PERL as a swiss army knife... it can do anything, but it isn't always pretty. Python is like an army general, controlling what other programs do, and bossing them around. Coding a solution in only Python is silly in most cases (even at slashdot.org). Using Python to integrate, say, 5 different codebases in 5 different (computer) languages is what Python is intended to do. It's the glue that helps other different parts work together.
Yes, Python sucks up system resources. But if it's used to only launch other programs (with a reasonably minimum amount of processing logic within the Python code), as it's meant to be used, it really kicks ass as a control language.Comment
-
-
C is just fast, but it will take you much longer to code the same thing.Originally posted by hudson
oh...I got halfway through C Programming Language and Unix Programming Environment and that's really what I wanted to do...just got sidetracked with a few perl projects...ok, maybe forget the scripting languages and get back to trying to learn C?
and thanks for the replies.
PHP is the best scripting language by far. Its really good for web scripts.
C can have performance advantages if your code involves a lot of system calls. And its a pretty low level language (meaning close to the machine level). Not many people bother to learn C, but if you do, you can learn a lot about language structures, memory management, file systems and other system related stuff as you use it.
Comment
-
-
thanks a lot...Originally posted by Alky
thats the stupidest thing i have ever heard.

here's a random quote from the newsgroups:
"Have a look at python sometime... All the power of perl, object orientation if you want it, and it's write once, read later rather than perl's write once, read later and scratch head wondering what it does..."Last edited by hudson; 08-15-2003, 06:34 PM.Comment
-
Lane, I think just even reading books by Brian W. Kernighan and Dennis Ritchie taught me a hell of a lot about programming and it translates over to perl or whatever you use. But...I know it will take me a year or two to finally learn C ;-)Originally posted by Lane
C is just fast, but it will take you much longer to code the same thing.
PHP is the best scripting language by far. Its really good for web scripts.
C can have performance advantages if your code involves a lot of system calls. And its a pretty low level language (meaning close to the machine level). Not many people bother to learn C, but if you do, you can learn a lot about language structures, memory management, file systems and other system related stuff as you use it.Comment
-
Perl and PHP both have their place. If I am just doing some simple scripting and need some dynamic content, then it's PHP all the way. I do the more sophisticated tasks in Perl. PHP just isn't able to handle some of the things I need to do.
If I have something that is going to see some serious traffic then it's C all the way. PHP and Perl are both slow compared to well written C. C is a real pain in the ass to write...for me anyway. It takes about twice as long as Perl or PHP.
Advantage: PerlI like pie.Comment
-
That's just silly. What kind of programmer looks at his code and says "what was I trying to do there"? The only code I wrote that leaves me scratching my head was shit I wrote my first couple of months of programming. Good god that was some funky code (about 5 years ago, don't worry).Originally posted by hudson
here's a random quote from the newsgroups:
"Have a look at python sometime... All the power of perl, object orientation if you want it, and it's write once, read later rather than perl's write once, read later and scratch head wondering what it does..."I like pie.Comment
-
well....its been said a lot that perl is a write once language. maybe it is just a common myth?Originally posted by Armed & Hammered
That's just silly. What kind of programmer looks at his code and says "what was I trying to do there"? The only code I wrote that leaves me scratching my head was shit I wrote my first couple of months of programming. Good god that was some funky code (about 5 years ago, don't worry).
of course, once you get into the code you can figure it out.Comment



Comment