perl vs. python (cgi)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hudson
    Confirmed User
    • Jul 2003
    • 2948

    #1

    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
    Confirmed User
    • Jul 2003
    • 2948

    #2
    no one into python around here?

    Comment

    • Lane
      Will code for food...
      • Apr 2001
      • 8496

      #3
      why python?

      Comment

      • SomeCreep
        :glugglug
        • Mar 2003
        • 26118

        #4
        ewh python? perl or php ...all else is obsolete

        Webair Hosting

        I use and recommend Webair for hosting.

        Comment

        • Lane
          Will code for food...
          • Apr 2001
          • 8496

          #5
          if u insist on cgi and have the balls, try some C
          u might even enjoy it

          Comment

          • dnsmonster
            Confirmed User
            • Jul 2002
            • 634

            #6
            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

            • Chris
              Too lazy to set a custom title
              • May 2003
              • 27880

              #7
              php!
              [email protected]

              Comment

              • hudson
                Confirmed User
                • Jul 2003
                • 2948

                #8
                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.

                Comment

                • hudson
                  Confirmed User
                  • Jul 2003
                  • 2948

                  #9
                  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 ;-)

                  Comment

                  • hudson
                    Confirmed User
                    • Jul 2003
                    • 2948

                    #10
                    Originally posted by Lane
                    why python?
                    python, ruby...those are the things that seem to pop up the most...something different than perl.

                    Comment

                    • hudson
                      Confirmed User
                      • Jul 2003
                      • 2948

                      #11
                      Originally posted by Lane
                      why python?
                      well, actually python looks pretty cool and it would be a new thing

                      Comment

                      • Libertine
                        sex dwarf
                        • May 2002
                        • 17860

                        #12
                        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})/

                        Comment

                        • hudson
                          Confirmed User
                          • Jul 2003
                          • 2948

                          #13
                          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 ;-)

                          Comment

                          • hudson
                            Confirmed User
                            • Jul 2003
                            • 2948

                            #14
                            It is just fucking perl is a write once language...been said a thousand times before....

                            Comment

                            • dougeetx
                              Confirmed User
                              • Apr 2002
                              • 6163

                              #15
                              speaking as a website, PYTHON IS HELL ON A SERVER!
                              Coming Soon! A NEW revolution in black adult social networking!

                              Comment

                              • Alky
                                Confirmed User
                                • Apr 2002
                                • 5651

                                #16
                                Originally posted by hudson
                                It is just fucking perl is a write once language...been said a thousand times before....
                                write once?

                                Comment

                                • hudson
                                  Confirmed User
                                  • Jul 2003
                                  • 2948

                                  #17
                                  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 ;-)

                                  Comment

                                  • hudson
                                    Confirmed User
                                    • Jul 2003
                                    • 2948

                                    #18
                                    Originally posted by Alky
                                    write once?
                                    write only...read never...I would rather rewrite code than to try to understand what I wrote before ;-)

                                    Comment

                                    • blazin
                                      Confirmed User
                                      • Aug 2002
                                      • 2781

                                      #19
                                      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
                                      I don't endorse a god damn thing......

                                      Comment

                                      • hudson
                                        Confirmed User
                                        • Jul 2003
                                        • 2948

                                        #20
                                        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!

                                        Comment

                                        • Alky
                                          Confirmed User
                                          • Apr 2002
                                          • 5651

                                          #21
                                          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.

                                          Comment

                                          • Baal
                                            Confirmed User
                                            • Jan 2002
                                            • 696

                                            #22
                                            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

                                            • IMP^or^SNiTL.e
                                              A/S/L .. I don't names.
                                              • Aug 2003
                                              • 1177

                                              #23
                                              cgi is fun

                                              Comment

                                              • blazin
                                                Confirmed User
                                                • Aug 2002
                                                • 2781

                                                #24
                                                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
                                                I don't endorse a god damn thing......

                                                Comment

                                                • Lane
                                                  Will code for food...
                                                  • Apr 2001
                                                  • 8496

                                                  #25
                                                  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.

                                                  Comment

                                                  • plsureking
                                                    bored
                                                    • Aug 2003
                                                    • 4905

                                                    #26
                                                    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?
                                                    PornCMS / low cost paysite management with hosting

                                                    Comment

                                                    • hudson
                                                      Confirmed User
                                                      • Jul 2003
                                                      • 2948

                                                      #27
                                                      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, 06:34 PM.

                                                      Comment

                                                      • hudson
                                                        Confirmed User
                                                        • Jul 2003
                                                        • 2948

                                                        #28
                                                        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 ;-)

                                                        Comment

                                                        • Babaganoosh
                                                          ♥♥♥ Likes Hugs ♥♥♥
                                                          • Nov 2001
                                                          • 15841

                                                          #29
                                                          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.

                                                          Comment

                                                          • Babaganoosh
                                                            ♥♥♥ Likes Hugs ♥♥♥
                                                            • Nov 2001
                                                            • 15841

                                                            #30
                                                            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.

                                                            Comment

                                                            • hudson
                                                              Confirmed User
                                                              • Jul 2003
                                                              • 2948

                                                              #31
                                                              Originally posted by blazin


                                                              Lots of people don't know how to code
                                                              hmmm...talking to me? hehe...

                                                              Comment

                                                              • hudson
                                                                Confirmed User
                                                                • Jul 2003
                                                                • 2948

                                                                #32
                                                                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.

                                                                Comment

                                                                Working...