RE: Is Perl *that* good? (was: How's ruby compare to it older brother python)

Discussion in 'Python' started by jwsacksteder@ramprecision.com, Apr 26, 2004.

  1. Guest

    >>getting dynamic HTML pages up and running quickly. Perl is great for
    >>its string-handling abilities. (On my Web pages, I actually call a Perl
    >>script from PHP precisely for this reason.)


    >I hear this more often than I understand it. Perl certainly
    >does support many string-oriented operations. What's a speci-
    >fic example, though, of an action you feel more comfortable
    >coding in external Perl? I suspect there's something I need
    >to learn about PHP's deficiencies, or Perl's power.


    I suspect the perl is the first place many people get exposed
    to regexes and when they understand the utility of that, some
    of the glow rubs off on perl. Someone actually said to me
    once "I program in perl because I can't live without regex."
    Now when someone says "perl text-processing", I hear "regex".
    (If I was motivated, I would include the above substitution in
    regex notation here...)

    The php/mysql crowd gives me this feeling as well, but that's
    a discussion for another day and another list.
     
    , Apr 26, 2004
    #1
    1. Advertising

  2. Peter Hansen Guest

    Re: Is Perl *that* good? (was: How's ruby compare to it older bro

    wrote:

    > I suspect the perl is the first place many people get exposed
    > to regexes and when they understand the utility of that, some
    > of the glow rubs off on perl. Someone actually said to me
    > once "I program in perl because I can't live without regex."
    > Now when someone says "perl text-processing", I hear "regex".
    > (If I was motivated, I would include the above substitution in
    > regex notation here...)
    >
    > The php/mysql crowd gives me this feeling as well, but that's
    > a discussion for another day and another list.


    I guess it would be interesting to pose the question back to
    them "If you could not use regexes in Perl, would you still
    like to program in it?" or "If you couldn't use mysql in PHP
    would you still use it?"

    What similar question, if any, would be a difficult one for
    us Python types?

    -Peter
     
    Peter Hansen, Apr 26, 2004
    #2
    1. Advertising

  3. Re: Is Perl *that* good? (was: How's ruby compare to it older bro

    In article <>,
    Peter Hansen <> wrote:
    .
    .
    .
    >I guess it would be interesting to pose the question back to
    >them "If you could not use regexes in Perl, would you still
    >like to program in it?" or "If you couldn't use mysql in PHP
    >would you still use it?"
    >
    >What similar question, if any, would be a difficult one for
    >us Python types?
    >
    >-Peter


    Over in Perlmark, Randal "often" (his adverb) claims
    no one'd use Tcl now if Expect and Tk hadn't kept it
    alive.

    I don't get it, though. The questions just don't work
    for me; I don't find them as illuminating as more pre-
    cise and less inflammatory alternatives. Moreover,
    I'm sure I could find abundant Perlites who'd still
    use it without its built-in REs.

    If Python lacked the interactive shell ... well,
    someone would build it, immediately.
    --

    Cameron Laird <>
    Business: http://www.Phaseit.net
     
    Cameron Laird, Apr 26, 2004
    #3
  4. leeg Guest

    Re: Is Perl *that* good? (was: How's ruby compare to it older bro

    Peter Hansen wrote:

    >
    > I guess it would be interesting to pose the question back to
    > them "If you could not use regexes in Perl, would you still
    > like to program in it?" or "If you couldn't use mysql in PHP
    > would you still use it?"
    >
    > What similar question, if any, would be a difficult one for
    > us Python types?
    >

    "If you couldn't write any program your imagination came up with in Python,
    or couldn't at least prototype it, or it took longer to write in Python
    than it did in C or Objective-C, would you still use it?"

    That's my question. I don't write operating systems or control nuclear
    reactors (not real ones anyway).
    --
    Graham Lee
    I am leeg, for we are many
    C++: An octopus constructed by nailing extra legs onto a dog.
    http://users.ox.ac.uk/~wadh1342
     
    leeg, Apr 26, 2004
    #4
  5. Peter Hansen Guest

    Re: Is Perl *that* good? (was: How's ruby compare to it older bro

    leeg wrote:

    > Peter Hansen wrote:
    >
    >>I guess it would be interesting to pose the question back to
    >>them "If you could not use regexes in Perl, would you still
    >>like to program in it?" or "If you couldn't use mysql in PHP
    >>would you still use it?"
    >>
    >>What similar question, if any, would be a difficult one for
    >>us Python types?
    >>

    >
    > "If you couldn't write any program your imagination came up with in Python,
    > or couldn't at least prototype it, or it took longer to write in Python
    > than it did in C or Objective-C, would you still use it?"
    >
    > That's my question. I don't write operating systems or control nuclear
    > reactors (not real ones anyway).


    I guess it's pretty easy to come up with such questions if
    you leave it wide open.

    Perhaps I should have said "limit yourself to questions involving
    key pieces of functionality, external libraries, or specific
    syntax" or something like that...

    -Peter
     
    Peter Hansen, Apr 26, 2004
    #5
  6. leeg Guest

    Re: Is Perl *that* good? (was: How's ruby compare to it older bro

    Peter Hansen wrote:

    > leeg wrote:
    >
    >> Peter Hansen wrote:
    >>
    >>>I guess it would be interesting to pose the question back to
    >>>them "If you could not use regexes in Perl, would you still
    >>>like to program in it?" or "If you couldn't use mysql in PHP
    >>>would you still use it?"
    >>>
    >>>What similar question, if any, would be a difficult one for
    >>>us Python types?
    >>>

    >>
    >> "If you couldn't write any program your imagination came up with in
    >> Python, or couldn't at least prototype it, or it took longer to write in
    >> Python than it did in C or Objective-C, would you still use it?"

    >
    > I guess it's pretty easy to come up with such questions if
    > you leave it wide open.
    >
    > Perhaps I should have said "limit yourself to questions involving
    > key pieces of functionality, external libraries, or specific
    > syntax" or something like that...
    >


    OK, fair enough. In that case, there is no reason for me to be using Python
    (except that it's easy to write and easy to read, which is good enough for
    me). I use POSIX-ey stuff and interfaces to lumps of code written in other
    languages, so Python could be Perl or Objective-C or C or Pascal or
    anything as far as I care; I just happen to be able to write correct code
    fairly quickly in Python. I hope that makes sense :)
    --
    Graham Lee
    I am leeg, for we are many
    "Computer Science is the only discipline in which we view adding a new wing
    to a building as being maintenance." - Jim Horning
    http://users.ox.ac.uk/~wadh1342
     
    leeg, Apr 26, 2004
    #6
  7. Re: Is Perl *that* good? (was: How's ruby compare to it older bro

    In article <c6jcf5$mfv$>,
    leeg <> wrote:
    .
    .
    .
    >That's my question. I don't write operating systems or control nuclear
    >reactors (not real ones anyway).

    .
    .
    .
    But then, from the reliable rumors that reach me, at least
    some of the software used in nuclear reactors is done in
    C++ and Visual Basic and ... well, let's not overdo our
    apologies.
    --

    Cameron Laird <>
    Business: http://www.Phaseit.net
     
    Cameron Laird, Apr 26, 2004
    #7
  8. Re: Is Perl *that* good? (was: How's ruby compare to it older bro

    Peter> I guess it would be interesting to pose the question back to them
    Peter> "If you could not use regexes in Perl, would you still like to
    Peter> program in it?" or "If you couldn't use mysql in PHP would you
    Peter> still use it?"

    Peter> What similar question, if any, would be a difficult one for us
    Peter> Python types?

    "If Python didn't support indentation-based block structure would you still
    use it?"

    :)

    Skip
     
    Skip Montanaro, Apr 26, 2004
    #8
  9. Re: Is Perl *that* good? (was: How's ruby compare to it older bro

    In article <c6jdsu$n1j$>,
    leeg <> wrote:
    .
    .
    .
    >OK, fair enough. In that case, there is no reason for me to be using Python
    >(except that it's easy to write and easy to read, which is good enough for
    >me). I use POSIX-ey stuff and interfaces to lumps of code written in other
    >languages, so Python could be Perl or Objective-C or C or Pascal or
    >anything as far as I care; I just happen to be able to write correct code
    >fairly quickly in Python. I hope that makes sense :)

    .
    .
    .
    So we're concluding that people use most languages because they
    must, to access some specific curd of functionality, but Python
    is different, and simply doesn't get in the way? How flattering!
    --

    Cameron Laird <>
    Business: http://www.Phaseit.net
     
    Cameron Laird, Apr 26, 2004
    #9
  10. Roy Smith Guest

    Re: Is Perl *that* good? (was: How's ruby compare to it older bro

    (Cameron Laird) wrote:
    > Over in Perlmark, Randal "often" (his adverb) claims
    > no one'd use Tcl now if Expect and Tk hadn't kept it
    > alive.


    I don't know about that. What Tcl lacks in power and expressiveness, it
    makes up for in simplicity of use, quick learning curve, and ease of
    embedding/extending. I've written a lot of Tcl code, and never used
    either Expect or Tk. I think Tcl fills a valid niche, especially for
    small embedded applications.

    I'll go further than that; I think everybody who considers themselves a
    professional programmer should learn Tcl. Even if you never use it in
    anger, it's interesting and useful to explore different corners of the
    "language design concept" space. For the same reason, I think people
    should learn postscript, and try writing some real programs in it (no,
    it's not just a printer language).

    It's important to keep learning new stuff, and to recognize that however
    great your favorite tool d'jour is, there's going to be something better
    coming along in the future. Perl was invented because the mammoth
    shell/awk/sed/grep scripts of the day were getting unmanageable, and
    gained such popularity because it was better than the alternatives.
    Inertia, and lack of real competition has kept it alive for 20 years,
    but it's clear that better things have come along.

    By the same token, while Python is in its ascendancy, it's foolish to
    think nothing better will come along. It might be one of the Python
    outgrowths like the brand-new Prothon, or a current competitor like
    Ruby, or something even more afield like D, or something not yet
    invented. But it'll happen.

    My advice is to celebrate the joy that Python gives us today (just like
    Unix sysadmins celebrated Perl's introduction 20 years ago), but keep
    trying new things too. 5 years ago, Pythonistas (was the term even
    invented then?) were crazy rebels. Today, they're the fashionable avant
    garde. 5 years from now, they'll be comfortably mainstream. 10 years
    from now, they'll be old-fashioned. And 20 years from now, they'll be
    dinosaurs. Don't let yourself become a dinosaur.
     
    Roy Smith, Apr 26, 2004
    #10
  11. Re: Is Perl *that* good? (was: How's ruby compare to it older bro

    In article <>,
    Roy Smith <> wrote:
    .
    .
    .
    >trying new things too. 5 years ago, Pythonistas (was the term even
    >invented then?) were crazy rebels. Today, they're the fashionable avant

    .
    .
    .
    Gordon McMillan, 1998 <URL:
    http://groups.google.com/groups?frame=left&th=a4392ccc9b42f7cd >

    My first guess was almost exactly a year earlier.
    --

    Cameron Laird <>
    Business: http://www.Phaseit.net
     
    Cameron Laird, Apr 26, 2004
    #11
  12. John Roth Guest

    Re: Is Perl *that* good? (was: How's ruby compare to it older bro

    "Skip Montanaro" <> wrote in message
    news:...
    >
    > Peter> I guess it would be interesting to pose the question back to

    them
    > Peter> "If you could not use regexes in Perl, would you still like to
    > Peter> program in it?" or "If you couldn't use mysql in PHP would you
    > Peter> still use it?"
    >
    > Peter> What similar question, if any, would be a difficult one for us
    > Peter> Python types?
    >
    > "If Python didn't support indentation-based block structure would you

    still
    > use it?"
    >
    > :)


    I probably wouldn't have learned it - indentation based block
    structure has been one of my "nice to have" things from at least
    the middle '70s, so when I saw it in Python, I learned it to see how
    it ran, and haven't looked back. However, it's not the reason I stay with
    it.

    John Roth
    >
    > Skip
    >
    >
     
    John Roth, Apr 26, 2004
    #12
  13. leeg Guest

    Re: Is Perl *that* good? (was: How's ruby compare to it older bro

    Cameron Laird wrote:

    > In article <c6jdsu$n1j$>,
    > leeg <> wrote:
    >>I use POSIX-ey stuff and interfaces to lumps of code written in
    >>other languages, so Python could be Perl or Objective-C or C or Pascal or
    >>anything as far as I care; I just happen to be able to write correct code
    >>fairly quickly in Python. I hope that makes sense :)

    > .
    > So we're concluding that people use most languages because they
    > must, to access some specific curd of functionality, but Python
    > is different, and simply doesn't get in the way? How flattering!


    Well, it doesn't get in the way for *coding*. It does for *running*; so
    sometimes I code in Python then rewrite in C to run. But yeah, that's the
    general idea :)
    --
    Graham Lee
    I am leeg, for we are many
    "If we knew what we were doing, it wouldn't be called research, would it?" -
    Albert Einstein
    http://users.ox.ac.uk/~wadh1342
     
    leeg, Apr 26, 2004
    #13
  14. Roger Binns Guest

    Re: Is Perl *that* good? (was: How's ruby compare to it older bro

    Roy Smith wrote:
    > What Tcl lacks in power and expressiveness, it
    > makes up for in simplicity of use, quick learning curve, and ease of
    > embedding/extending. I've written a lot of Tcl code, and never used
    > either Expect or Tk.


    That was how I originally came to Tcl. Never used Expect either (although
    some colleagues did) and never did Tk (until Tkinter!)

    Tcl does have power and expressiveness. It is one of the few languages
    where you can trivially define your own control structures. Object
    orientation was added without changing the language (almost SmallTalk
    like).

    Tcl also had a shot at stardom. I added it to the Mosaic browser where
    it was used in a similar capacity to JavaScript today. Details are in
    the proceedings of the 2nd WWW conference. (The audience were in awe
    of a demo that printed an entire book based on following the rel links
    in web page headers, got everything in the right order, loaded the pages
    and printed).

    To solve the same problems, Netscape invented yet another language and
    put "marketing flavour of the day" in front, blessing us with Javascript.
    I really wish Tcl had won that one.

    Roger
     
    Roger Binns, Apr 27, 2004
    #14
  15. Greg Ewing Guest

    Re: Is Perl *that* good? (was: How's ruby compare to it older bro

    Roy Smith wrote:
    > 5 years from now, they'll be comfortably mainstream. 10 years
    > from now, they'll be old-fashioned. And 20 years from now, they'll be
    > dinosaurs. Don't let yourself become a dinosaur.


    I suspect that, 20 years from now, there will still be
    a language called Python, and it will still be quietly
    and unobtrusively kicking all its competitors' backsides.

    Whether it will bear any resemblance to the Python of
    today is another matter...

    --
    Greg Ewing, Computer Science Dept,
    University of Canterbury,
    Christchurch, New Zealand
    http://www.cosc.canterbury.ac.nz/~greg
     
    Greg Ewing, Apr 27, 2004
    #15
  16. Paul Prescod Guest

    Re: Is Perl *that* good?

    Roger Binns wrote:
    >
    > Tcl also had a shot at stardom. I added it to the Mosaic browser where
    > it was used in a similar capacity to JavaScript today. Details are in
    > the proceedings of the 2nd WWW conference. (The audience were in awe
    > of a demo that printed an entire book based on following the rel links
    > in web page headers, got everything in the right order, loaded the pages
    > and printed).


    Python had a shot too:

    http://ksi.cpsc.ucalgary.ca/archives/WWW-TALK/www-talk-1994q3/1066.html

    And I think Python has a claim to the first Web robot:

    http://www.webhistory.org/www.lists/www-talk.1993q1/0060.html

    > To solve the same problems, Netscape invented yet another language and
    > put "marketing flavour of the day" in front, blessing us with Javascript.
    > I really wish Tcl had won that one.


    I wish Python had won. ;)

    Paul
     
    Paul Prescod, Apr 27, 2004
    #16
  17. Re: Is Perl *that* good?

    Paul Prescod wrote:
    > And I think Python has a claim to the first Web robot:
    >
    > http://www.webhistory.org/www.lists/www-talk.1993q1/0060.html


    That's a fascinating little bit of history, especially this:

    "I have written a robot that does this, except it doesn't check for valid
    SGML -- it just tries to map out the entire web. I believe I found roughly
    50 or 60 different sites..."

    -Mike
     
    Michael Geary, Apr 27, 2004
    #17
  18. Peter Maas Guest

    Re: Is Perl *that* good? (was: How's ruby compare to it older bro

    Peter Hansen wrote:
    > I guess it would be interesting to pose the question back to
    > them "If you could not use regexes in Perl, would you still
    > like to program in it?" or "If you couldn't use mysql in PHP
    > would you still use it?"
    >
    > What similar question, if any, would be a difficult one for
    > us Python types?


    If you could not use block indentation in Python, would you
    still like to program in it? :)

    Mit freundlichen Gruessen,

    Peter Maas

    --
    -------------------------------------------------------------------
    Peter Maas, M+R Infosysteme, D-52070 Aachen, Hubert-Wienen-Str. 24
    Tel +49-241-93878-0 Fax +49-241-93878-20 eMail
    -------------------------------------------------------------------
     
    Peter Maas, Apr 27, 2004
    #18
  19. Peter Hansen Guest

    Re: Is Perl *that* good? (was: How's ruby compare to it older bro

    Peter Maas wrote:

    > Peter Hansen wrote:
    >
    >> I guess it would be interesting to pose the question back to
    >> them "If you could not use regexes in Perl, would you still
    >> like to program in it?" or "If you couldn't use mysql in PHP
    >> would you still use it?"
    >>
    >> What similar question, if any, would be a difficult one for
    >> us Python types?

    >
    > If you could not use block indentation in Python, would you
    > still like to program in it? :)


    The way I indent my braces (the One True Way ;-), I wouldn't
    really mind, I suppose:

    def install(name)
    {
    if os.path.exists(name)
    {
    path, ext = os.path.splitext(name)
    if ext == '.zip'
    {
    try
    {
    x = Extractor(name)
    path = os.path.join(x.extract(), path.replace('_', '.'))
    }
    finally
    {
    x.close()
    }
    }
    else
    {
    path = name
    }
    }
    }

    -Peter
     
    Peter Hansen, Apr 27, 2004
    #19
  20. Re: Is Perl *that* good? (was: How's ruby compare to it older bro

    Greg> I suspect that, 20 years from now, there will still be a language
    Greg> called Python, and it will still be quietly and unobtrusively
    Greg> kicking all its competitors' backsides.

    Greg> Whether it will bear any resemblance to the Python of today is
    Greg> another matter...

    Perhaps look back ten years to see what's happened since then. Does Python
    more-or-less look the same as it did in 1994 (or even earlier)? I suspect
    the answer is "yes". There has been some new syntax (*args/**kwds,
    listcomps, complex numbers, raw strings, packages, assert statement, loss of
    access statement) and a whole lot of new library functionality, but the core
    language is pretty much the same.

    Skip
     
    Skip Montanaro, Apr 27, 2004
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Christian Seberino
    Replies:
    30
    Views:
    907
  2. Hunn E. Balsiche

    How's ruby compare to it older brother python

    Hunn E. Balsiche, Apr 26, 2004, in forum: Python
    Replies:
    78
    Views:
    1,446
    Fredrik Lundh
    May 24, 2004
  3. Dominic Maier

    brother tree insert

    Dominic Maier, Sep 7, 2004, in forum: C Programming
    Replies:
    1
    Views:
    316
    Keith Thompson
    Sep 7, 2004
  4. Hunn E. Balsiche
    Replies:
    34
    Views:
    355
    Gavin Sinclair
    Apr 30, 2004
  5. Mike Cox

    Ruby, brother of VB?

    Mike Cox, Mar 21, 2005, in forum: Ruby
    Replies:
    15
    Views:
    370
    Rob .
    Mar 21, 2005
Loading...

Share This Page