merits of Lisp vs Python

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Stephen Eilert

    #46
    Re: merits of Lisp vs Python


    Alex Mizrahi escreveu:

    >
    we should feed this text to the query-builder.
    then we should bind ?dept to our variable departament (i'm not sure how this
    is done in SPARQL, but there should be a way).
    then we should iterate over results and output HTML. a python-like
    pseudocode:
    >
    query = BuildQuery(quer y_str)
    query.bind("?de pt", departament)
    results = query.execute()
    for each rs in results:
    print "<tr><td>" + htmlesc(rs.get( "?fname")) + "</td><td>" +
    htmlesc(rs.get( "?lname")) + "</td><td>" + rs.get("?salary ") + "</td></tr>"
    I just want to add that this kind of HTML mixed with code is something
    that should be avoided, no matter what language is used.


    Stephen

    Comment

    • Kay Schluehr

      #47
      Re: merits of Lisp vs Python

      O.K. I agree with what you said about the generic function vs per
      object dictionary dispatch.
      But do the performance differences vanish when only builtin types and
      functions are used to express Python algorithms?

      Comment

      • Chris Mellon

        #48
        Re: merits of Lisp vs Python

        On 8 Dec 2006 12:23:54 -0800, Stephen Eilert <spedrosa@gmail .comwrote:
        >
        Alex Mizrahi escreveu:
        >
        >

        we should feed this text to the query-builder.
        then we should bind ?dept to our variable departament (i'm not sure how this
        is done in SPARQL, but there should be a way).
        then we should iterate over results and output HTML. a python-like
        pseudocode:

        query = BuildQuery(quer y_str)
        query.bind("?de pt", departament)
        results = query.execute()
        for each rs in results:
        print "<tr><td>" + htmlesc(rs.get( "?fname")) + "</td><td>" +
        htmlesc(rs.get( "?lname")) + "</td><td>" + rs.get("?salary ") + "</td></tr>"
        >
        I just want to add that this kind of HTML mixed with code is something
        that should be avoided, no matter what language is used.
        >
        results = doQuery(departm ent="Accounting ")
        for row in results:
        for field in ["fname","lname" ,"salary"]:
        print "<td>%s</td>" % htmlesc(row[field])

        I hide away the binding etc in doQuery as the lisp version does. Note
        that in any kind of real code most of the literals that take up the
        space are likely to come from elsewhere.

        Note how much more trivial it is to change the HTML output of this
        version that the lisp - it's a matter of creating a format string,
        which you can retrieve from just about anywhere, rather than requiring
        a code refactoring. Just because you have macros doesn't mean it makes
        sense to use them.

        Comment

        • Rob Warnock

          #49
          Re: merits of Lisp vs Python

          Pillsy <pillsbury@gmai l.comwrote:
          +---------------
          | hankhero wrote:
          | Pythons advantages are:
          | Faster startup-time which makes it a good scripting language.
          |
          | ... but on my machine, SBCL starts up and runs a "Hello World"
          | program a bit faster than Python, and CLisp really blows its doors off.
          +---------------

          On my various machines, CMUCL startup is *slightly*
          faster than CLISP, but both are under 20 ms...

          I use Common Lisp for scripting a *lot*!


          -Rob

          -----
          Rob Warnock <rpw3@rpw3.or g>
          627 26th Avenue <URL:http://rpw3.org/>
          San Mateo, CA 94403 (650)572-2607

          Comment

          • JShrager@gmail.com

            #50
            Re: merits of Lisp vs Python

            Okay, since everyone ignored the FAQ, I guess I can too...

            Mark Tarver wrote:
            How do you compare Python to Lisp? What specific advantages do you
            think that one has over the other?
            (Common) Lisp is the only industrial strength language with both pure
            compositionalit y and a real compiler. What Python has is stupid slogans
            ("It fits your brain." "Only one way to do things.") and an infinite
            community of flies that, for some inexplicable reason, believe these
            stupid slogns. These flies are, however, quite useful because they
            produce infinite numbers of random libraries, some of which end up
            being useful. But consider: Tcl replaced Csh, Perl replaced Tcl, Python
            is rapidly replacing Perl, and Ruby is simultaneously and even more
            rapidly replacing Python. Each is closer to Lisp than the last; the
            world is returning to Lisp and is dragging the flies with it.
            Eventually the flies will descend upon Lisp itself and will bring with
            them their infinite number of random libraries, and then things will be
            where they should have been 20 years ago, but got sidetracked by Tcl
            and other line noise.

            Comment

            • Fred Gilham

              #51
              Re: *** C.L.L README/FAQ ***


              A suggestion is to mention Dylan as a possibility to people who think
              Lisp syntax is too funky but want to see something Lisp-like.

              --
              Fred Gilham gilham@csl.sri. com
              Progressive (adj): Value-free; tolerant; non-judgemental.
              E.g. traditional archery instruction methods spent tedious hours
              teaching the archer to hit a bulls-eye. Progressive methods achieved
              better results by telling the student archer to shoot in the manner he
              or she found most comfortable, then calling whatever the arrow hit the
              bulls-eye.

              Comment

              • Paddy

                #52
                Re: merits of Lisp vs Python


                Mark Tarver wrote:
                How do you compare Python to Lisp? What specific advantages do you
                think that one has over the other?
                >
                Note I'm not a Python person and I have no axes to grind here. This is
                just a question for my general education.
                >
                Mark
                I've never programmed in Lisp but I have programmed in Cadence Skill a
                Lisp inspired language with infix notation as an option. I found Skill
                to be a very powerful language. At the time I new only AWK, C, Pascal,
                Forth, Postcript, Assembler and Basic. Skill was superior and I came
                to love it.
                But that was a decade ago. Now, I'd rather a company integrate Python
                into their product as I find Python to be less 'arcane' than Skill;
                with more accessible power, and a great community.
                ..
                Analogy time!
                You need Pure Maths, but more mathematicians will be working applying
                maths to real-world problems. You need research physicists, but more
                physicists will be applying physics in the real world. It seems to me
                that Lisp and its basis in maths makes people research and develop a
                lot of new techniques in Lisp, but when it comes to applying those
                techniques in the real world - switch to Python!

                Lisp has a role to play, but maybe a language tuned to research and
                with its user base would naturally find it hard to compete in the roles
                in which dynamic languages such as Python are strongest.

                - Paddy.

                Comment

                • Klaas

                  #53
                  Re: merits of Lisp vs Python


                  Aahz wrote:
                  As for your claims about speed, they are also nonsense; I doubt one
                  would find an order of magnitude increase of speed for production
                  programs created by a competent Lisp programmer compared to programs
                  created by a competent Python programmer.
                  Lisp can be compiled into an executable that has c-like speeds. It can
                  be much faster than python.

                  -MIke

                  Comment

                  • tayssir.john@googlemail.com

                    #54
                    Re: merits of Lisp vs Python

                    Aahz wrote:
                    I would say that your statement about Lisp syntax is wrong. Not that it
                    is technically inaccurate, but that it completely misses the point, so
                    much so that it is wrong to say it. One of the key goals of Python is
                    readability, and while it is indeed easy to learn the rules for Lisp
                    syntax, observational experience indicates that many people (perhaps even
                    the vast majority of people) find it difficult to learn to read Lisp
                    programs.
                    I think this holds true for experienced programmers, who often report a
                    difficult unlearning process with Lisp. However, for people without
                    preconceptions, the difference is likely less -- after all, many have
                    painful memories of poorly-taught math and computer classes in school.
                    So Python's similarity to gradeschool math may not be such a plus.

                    Richard Stallman explained about a Lisp variant:

                    "Multics Emacs proved to be a great success -- programming new editing
                    commands was so convenient that even the secretaries in his office
                    started learning how to use it. They used a manual someone had written
                    which showed how to extend Emacs, but didn't say it was a programming.
                    So the secretaries, who believed they couldn't do programming, weren't
                    scared off. They read the manual, discovered they could do useful
                    things and they learned to program."
                    <http://www.gnu.org/gnu/rms-lisp.html>

                    But of course this is anecdotal evidence.

                    Consider this: Lisp has had years of development, it has had millions of
                    dollars thrown at it by VC firms -- and yet Python is winning over Lisp
                    programmers. Think about it.
                    Even now, Lisp still contains radical concepts (as in latin's radix
                    meaning "root"), and overly radical ideas tend not to dominate in the
                    marketplace. So we see an incremental progression towards Lisp ideas.

                    Guy Steele, a central figure in Java, claimed:

                    "And you're right: we were not out to win over the Lisp programmers; we
                    were after the C++ programmers. We managed to drag a lot of them about
                    halfway to Lisp. Aren't you happy?"
                    <http://people.csail.mi t.edu/gregs/ll1-discuss-archive-html/msg04045.html>

                    But speaking of the marketplace, there's at least one Lisp company
                    sustaining itself by asking for a cut of its customers' revenues... The
                    last Lisp implementation I used "merely" asked for thousands per head
                    per platform. ;)


                    (Personally, I used Python before being aware of Lisp. Now I use Common
                    Lisp all the time, though I will recommend Python when I consider it
                    more appropriate. A few months ago, I missed the Condition System most
                    when using Python, and also lexical scope. However, it is nice to work
                    with friends, who know Python and not Lisp.)


                    Tayssir

                    Comment

                    • Paddy

                      #55
                      Re: merits of Lisp vs Python


                      JShrager@gmail. com wrote:
                      Okay, since everyone ignored the FAQ, I guess I can too...
                      >
                      Mark Tarver wrote:
                      How do you compare Python to Lisp? What specific advantages do you
                      think that one has over the other?
                      >
                      (Common) Lisp is the only industrial strength language with both pure
                      compositionalit y and a real compiler. What Python has is stupid slogans
                      ("It fits your brain." "Only one way to do things.") and an infinite
                      community of flies that, for some inexplicable reason, believe these
                      stupid slogns. These flies are, however, quite useful because they
                      produce infinite numbers of random libraries, some of which end up
                      being useful. But consider: Tcl replaced Csh, Perl replaced Tcl, Python
                      is rapidly replacing Perl, and Ruby is simultaneously and even more
                      rapidly replacing Python. Each is closer to Lisp than the last; the
                      world is returning to Lisp and is dragging the flies with it.
                      Eventually the flies will descend upon Lisp itself and will bring with
                      them their infinite number of random libraries, and then things will be
                      where they should have been 20 years ago, but got sidetracked by Tcl
                      and other line noise.
                      What is it about Lisp that despite doing everything first, way before
                      any other language, people don't stop using anything else and
                      automatically turn to Lisp? Maybe there is more to this everything than
                      the Lisp community comprehends.
                      Maybe Lisp is to science, as Python is to engineering - with a slight
                      blurring round the edges?

                      - Paddy.

                      Comment

                      • smallpond@juno.com

                        #56
                        Re: merits of Lisp vs Python


                        Mark Tarver wrote:
                        How do you compare Python to Lisp? What specific advantages do you
                        think that one has over the other?
                        >
                        Note I'm not a Python person and I have no axes to grind here. This is
                        just a question for my general education.
                        >
                        Mark
                        cmp `which clisp` `which python`
                        /usr/bin/clisp /usr/bin/python differ: byte 25, line 1

                        HTH

                        --S

                        Comment

                        • George Sakkis

                          #57
                          Re: merits of Lisp vs Python

                          JShrager@gmail. com wrote:
                          Okay, since everyone ignored the FAQ, I guess I can too...
                          >
                          Mark Tarver wrote:
                          How do you compare Python to Lisp? What specific advantages do you
                          think that one has over the other?
                          >
                          (Common) Lisp is the only industrial strength language with both pure
                          compositionalit y and a real compiler. What Python has is stupid slogans
                          ("It fits your brain." "Only one way to do things.") and an infinite
                          community of flies that, for some inexplicable reason, believe these
                          stupid slogns. These flies are, however, quite useful because they
                          produce infinite numbers of random libraries, some of which end up
                          being useful. But consider: Tcl replaced Csh, Perl replaced Tcl, Python
                          is rapidly replacing Perl, and Ruby is simultaneously and even more
                          rapidly replacing Python. Each is closer to Lisp than the last; the
                          world is returning to Lisp and is dragging the flies with it.
                          Eventually the flies will descend upon Lisp itself and will bring with
                          them their infinite number of random libraries, and then things will be
                          where they should have been 20 years ago, but got sidetracked by Tcl
                          and other line noise.
                          I know we shouldn't feed the trolls, but this one was particularly
                          amusing to resist the urge. The joke about lisp's world domination in
                          some unspecified point in the future never fails to bring a good
                          chuckle. I heard it's scheduled right after strong AI and before time
                          travel, is this still the plan? A quick look at
                          http://www.tiobe.com/tpci.htm may be helpful as a reality check before
                          you go back to your ivory tower (interesting how close in ratings and
                          growth is the "Lisp/Scheme" entry with another dinosaur, Cobol).

                          Comment

                          • Ken Tilton

                            #58
                            Re: merits of Lisp vs Python



                            George Sakkis wrote:
                            JShrager@gmail. com wrote:
                            >
                            >>Okay, since everyone ignored the FAQ, I guess I can too...
                            >>
                            >>Mark Tarver wrote:
                            >>
                            >>>How do you compare Python to Lisp? What specific advantages do you
                            >>>think that one has over the other?
                            >>
                            >>(Common) Lisp is the only industrial strength language with both pure
                            >>compositional ity and a real compiler. What Python has is stupid slogans
                            >>("It fits your brain." "Only one way to do things.") and an infinite
                            >>community of flies that, for some inexplicable reason, believe these
                            >>stupid slogns. These flies are, however, quite useful because they
                            >>produce infinite numbers of random libraries, some of which end up
                            >>being useful. But consider: Tcl replaced Csh, Perl replaced Tcl, Python
                            >>is rapidly replacing Perl, and Ruby is simultaneously and even more
                            >>rapidly replacing Python. Each is closer to Lisp than the last; the
                            >>world is returning to Lisp and is dragging the flies with it.
                            >>Eventually the flies will descend upon Lisp itself and will bring with
                            >>them their infinite number of random libraries, and then things will be
                            >>where they should have been 20 years ago, but got sidetracked by Tcl
                            >>and other line noise.
                            >
                            >
                            I know we shouldn't feed the trolls, but this one was particularly
                            amusing to resist the urge. The joke about lisp's world domination in
                            some unspecified point in the future never fails to bring a good
                            chuckle. I heard it's scheduled right after strong AI and before time
                            travel, is this still the plan? A quick look at
                            http://www.tiobe.com/tpci.htm may be helpful as a reality check before
                            you go back to your ivory tower (interesting how close in ratings and
                            growth is the "Lisp/Scheme" entry with another dinosaur, Cobol).
                            >
                            And it interesting that VB is almost three times "better" than Python,
                            and that a Honda could kick a Lamboghini's ass for it at Laguna Seca:

                            Type 2 keywords and click on the 'Fight !' button. The winner is the one which gets best visibility on Google.


                            Come on, COBOL is a great language, even has macros (copy ... replacing)
                            and the worlds greatest case statement, evaluate. We are proud to be its
                            neightbor.

                            ken

                            --
                            Algebra: http://www.tilton-technology.com/LispNycAlgebra1.htm

                            "Well, I've wrestled with reality for thirty-five
                            years, Doctor, and I'm happy to state I finally
                            won out over it." -- Elwood P. Dowd

                            "I'll say I'm losing my grip, and it feels terrific."
                            -- Smiling husband to scowling wife, New Yorker cartoon

                            Comment

                            • Duane Rettig

                              #59
                              Re: merits of Lisp vs Python

                              "Paddy" <paddy3118@nets cape.netwrites:
                              Mark Tarver wrote:
                              >
                              >How do you compare Python to Lisp? What specific advantages do you
                              >think that one has over the other?
                              >>
                              >Note I'm not a Python person and I have no axes to grind here. This is
                              >just a question for my general education.
                              >>
                              >Mark
                              I've never programmed in Lisp but I have programmed in Cadence Skill a
                              Lisp inspired language with infix notation as an option. I found Skill
                              to be a very powerful language. At the time I new only AWK, C, Pascal,
                              Forth, Postcript, Assembler and Basic. Skill was superior and I came
                              to love it.
                              Remember; Lisp is a program-language programming language. Sometimes,
                              one programs in Lisp without really knowing it:

                              Franz is a leading vendor of Graph Search Technology (AllegroGraph and Gruff) and Common Lisp Software Development Tools (Allegro CL and AllegroCache)


                              --
                              Duane Rettig duane@franz.com Franz Inc. http://www.franz.com/
                              555 12th St., Suite 1450 http://www.555citycenter.com/
                              Oakland, Ca. 94607 Phone: (510) 452-2000; Fax: (510) 452-0182

                              Comment

                              • George Sakkis

                                #60
                                Re: merits of Lisp vs Python

                                Ken Tilton wrote:
                                George Sakkis wrote:
                                JShrager@gmail. com wrote:
                                >Okay, since everyone ignored the FAQ, I guess I can too...
                                >
                                >Mark Tarver wrote:
                                >
                                >>How do you compare Python to Lisp? What specific advantages do you
                                >>think that one has over the other?
                                >
                                >(Common) Lisp is the only industrial strength language with both pure
                                >compositionali ty and a real compiler. What Python has is stupid slogans
                                >("It fits your brain." "Only one way to do things.") and an infinite
                                >community of flies that, for some inexplicable reason, believe these
                                >stupid slogns. These flies are, however, quite useful because they
                                >produce infinite numbers of random libraries, some of which end up
                                >being useful. But consider: Tcl replaced Csh, Perl replaced Tcl, Python
                                >is rapidly replacing Perl, and Ruby is simultaneously and even more
                                >rapidly replacing Python. Each is closer to Lisp than the last; the
                                >world is returning to Lisp and is dragging the flies with it.
                                >Eventually the flies will descend upon Lisp itself and will bring with
                                >them their infinite number of random libraries, and then things will be
                                >where they should have been 20 years ago, but got sidetracked by Tcl
                                >and other line noise.

                                I know we shouldn't feed the trolls, but this one was particularly
                                amusing to resist the urge. The joke about lisp's world domination in
                                some unspecified point in the future never fails to bring a good
                                chuckle. I heard it's scheduled right after strong AI and before time
                                travel, is this still the plan? A quick look at
                                http://www.tiobe.com/tpci.htm may be helpful as a reality check before
                                you go back to your ivory tower (interesting how close in ratings and
                                growth is the "Lisp/Scheme" entry with another dinosaur, Cobol).
                                >
                                And it interesting that VB is almost three times "better" than Python,
                                and that a Honda could kick a Lamboghini's ass for it at Laguna Seca:
                                Didn't say better, not even in quotes (and btw, if you're only doing
                                GUI apps in MS, VB is the path of least resistance in many cases, as is
                                PHP for quick'n'dirty web apps). What was funny in the GP's post was
                                the pomposity about "flies eventually descending upon Lisp itself", as
                                if language popularity (or any popularity for that matter) is
                                determined solely by theoretical computer science metrics.

                                George

                                Comment

                                Working...