Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 08-14-2003, 05:09 PM   #1
hudson
Confirmed User
 
Join Date: Jul 2003
Location: Grand Central
Posts: 2,948
perl vs. python (cgi)

well...Perl gets me a bit nutty sometimes and I want to try something new. Anyone using Python for CGI around here?
hudson is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-14-2003, 07:12 PM   #2
hudson
Confirmed User
 
Join Date: Jul 2003
Location: Grand Central
Posts: 2,948
no one into python around here?
hudson is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-14-2003, 07:16 PM   #3
Lane
Will code for food...
 
Join Date: Apr 2001
Location: Buckeye, AZ
Posts: 8,496
why python?
__________________
Lane is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-14-2003, 07:17 PM   #4
SomeCreep
:glugglug
 
SomeCreep's Avatar
 
Join Date: Mar 2003
Location: Where the Wild Things Are
Posts: 26,118
ewh python? perl or php ...all else is obsolete
__________________

Webair Hosting

I use and recommend Webair for hosting.
SomeCreep is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-14-2003, 07:19 PM   #5
Lane
Will code for food...
 
Join Date: Apr 2001
Location: Buckeye, AZ
Posts: 8,496
if u insist on cgi and have the balls, try some C
u might even enjoy it
__________________
Lane is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-14-2003, 07:27 PM   #6
dnsmonster
Confirmed User
 
Join Date: Jul 2002
Location: A warm place.
Posts: 634
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.
dnsmonster is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-14-2003, 07:29 PM   #7
Chris
Too lazy to set a custom title
 
Chris's Avatar
 
Industry Role:
Join Date: May 2003
Location: icq: 71462500 Skype: Jupzchris
Posts: 27,880
php!
__________________
[email protected]
Chris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-14-2003, 07:31 PM   #8
hudson
Confirmed User
 
Join Date: Jul 2003
Location: Grand Central
Posts: 2,948
Quote:
Originally posted by Lane
if u insist on cgi and have the balls, try some C
u might even enjoy it
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.
hudson is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-14-2003, 07:37 PM   #9
hudson
Confirmed User
 
Join Date: Jul 2003
Location: Grand Central
Posts: 2,948
Quote:
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.
well...after 200 - 300 lines of code I am lost...is this just a newbie thing or is this just how programming goes ;-)
hudson is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-14-2003, 07:39 PM   #10
hudson
Confirmed User
 
Join Date: Jul 2003
Location: Grand Central
Posts: 2,948
Quote:
Originally posted by Lane
why python?
python, ruby...those are the things that seem to pop up the most...something different than perl.
hudson is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-15-2003, 01:11 AM   #11
hudson
Confirmed User
 
Join Date: Jul 2003
Location: Grand Central
Posts: 2,948
Quote:
Originally posted by Lane
why python?
well, actually python looks pretty cool and it would be a new thing
hudson is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-15-2003, 01:13 AM   #12
Libertine
sex dwarf
 
Libertine's Avatar
 
Join Date: May 2002
Posts: 17,860
Quote:
Originally posted by hudson


well...after 200 - 300 lines of code I am lost...is this just a newbie thing or is this just how programming goes ;-)
That means that you code badly. Comments might help.
__________________
/(bb|[^b]{2})/
Libertine is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-15-2003, 01:18 AM   #13
hudson
Confirmed User
 
Join Date: Jul 2003
Location: Grand Central
Posts: 2,948
Quote:
Originally posted by punkworld


That means that you code badly. Comments might help.
nooooooo....I don't think so...!!

maybe I just get confused too easily ;-)
hudson is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-15-2003, 01:19 AM   #14
hudson
Confirmed User
 
Join Date: Jul 2003
Location: Grand Central
Posts: 2,948
It is just fucking perl is a write once language...been said a thousand times before....
hudson is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-15-2003, 01:24 AM   #15
dougeetx
Confirmed User
 
dougeetx's Avatar
 
Join Date: Apr 2002
Location: Dallas, TX
Posts: 6,163
speaking as a website, PYTHON IS HELL ON A SERVER!
__________________
Coming Soon! A NEW revolution in black adult social networking!
dougeetx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-15-2003, 01:27 AM   #16
Alky
Confirmed User
 
Alky's Avatar
 
Join Date: Apr 2002
Location: Houston
Posts: 5,651
Quote:
Originally posted by hudson
It is just fucking perl is a write once language...been said a thousand times before....
write once?
Alky is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-15-2003, 01:29 AM   #17
hudson
Confirmed User
 
Join Date: Jul 2003
Location: Grand Central
Posts: 2,948
Quote:
Originally posted by dougeetx
speaking as a website, PYTHON IS HELL ON A SERVER!
oh cool...thanks for the reply...maybe I should learn C instead ;-)
hudson is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-15-2003, 01:31 AM   #18
hudson
Confirmed User
 
Join Date: Jul 2003
Location: Grand Central
Posts: 2,948
Quote:
Originally posted by Alky
write once?
write only...read never...I would rather rewrite code than to try to understand what I wrote before ;-)
hudson is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-15-2003, 01:38 AM   #19
blazin
Confirmed User
 
Join Date: Aug 2002
Posts: 2,781
Quote:
Originally posted by hudson


write only...read never...I would rather rewrite code than to try to understand what I wrote before ;-)
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 expressions
blazin is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-15-2003, 01:43 AM   #20
hudson
Confirmed User
 
Join Date: Jul 2003
Location: Grand Central
Posts: 2,948
Quote:
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 expressions
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!
hudson is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-15-2003, 01:46 AM   #21
Alky
Confirmed User
 
Alky's Avatar
 
Join Date: Apr 2002
Location: Houston
Posts: 5,651
Quote:
Originally posted by hudson


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!
thats the stupidest thing i have ever heard.
Alky is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-15-2003, 01:51 AM   #22
Baal
Confirmed User
 
Join Date: Jan 2002
Location: SoCal
Posts: 696
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.
Baal is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-15-2003, 02:09 AM   #23
IMP^or^SNiTL.e
A/S/L .. I don't names.
 
Industry Role:
Join Date: Aug 2003
Posts: 1,177
cgi is fun
IMP^or^SNiTL.e is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-15-2003, 02:21 AM   #24
blazin
Confirmed User
 
Join Date: Aug 2002
Posts: 2,781
Quote:
Originally posted by hudson


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!
Lots of people don't know how to code
blazin is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-15-2003, 12:36 PM   #25
Lane
Will code for food...
 
Join Date: Apr 2001
Location: Buckeye, AZ
Posts: 8,496
Quote:
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.
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.
__________________
Lane is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-15-2003, 12:40 PM   #26
plsureking
bored
 
plsureking's Avatar
 
Industry Role:
Join Date: Aug 2003
Location: PORNCMS.com
Posts: 4,778
Quote:
Originally posted by Lane


PHP is the best scripting language by far. Its really good for web scripts.

i agree. unless you're writing software, keep it simple stupid. what the hell are you writing anyway?
__________________
#
plsureking is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-15-2003, 07:22 PM   #27
hudson
Confirmed User
 
Join Date: Jul 2003
Location: Grand Central
Posts: 2,948
Quote:
Originally posted by Alky
thats the stupidest thing i have ever heard.
thanks a lot...

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 at 07:34 PM..
hudson is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-15-2003, 07:29 PM   #28
hudson
Confirmed User
 
Join Date: Jul 2003
Location: Grand Central
Posts: 2,948
Quote:
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.
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 ;-)
hudson is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-15-2003, 07:30 PM   #29
Babaganoosh
♥♥♥ Likes Hugs ♥♥♥
 
Babaganoosh's Avatar
 
Industry Role:
Join Date: Nov 2001
Location: /home
Posts: 15,841
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: Perl
__________________
I like pie.
Babaganoosh is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-15-2003, 07:35 PM   #30
Babaganoosh
♥♥♥ Likes Hugs ♥♥♥
 
Babaganoosh's Avatar
 
Industry Role:
Join Date: Nov 2001
Location: /home
Posts: 15,841
Quote:
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..."
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).
__________________
I like pie.
Babaganoosh is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-15-2003, 07:37 PM   #31
hudson
Confirmed User
 
Join Date: Jul 2003
Location: Grand Central
Posts: 2,948
Quote:
Originally posted by blazin


Lots of people don't know how to code
hmmm...talking to me? hehe...
hudson is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-15-2003, 07:40 PM   #32
hudson
Confirmed User
 
Join Date: Jul 2003
Location: Grand Central
Posts: 2,948
Quote:
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).
well....its been said a lot that perl is a write once language. maybe it is just a common myth?

of course, once you get into the code you can figure it out.
hudson is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.