Lisp development with macros faster than Python development?..

Discussion in 'Python' started by seberino@spawar.navy.mil, Jul 5, 2005.

  1. Guest

    I've been reading the beloved Paul Graham's "Hackers and Painters".
    He claims he developed a web app at light speed using Lisp and lots
    of macros.

    It got me curious if Lisp
    is inherently faster to develop complex apps in. It would seem if you
    could create your own language in Lisp using macros that that would be
    quite an advantage....

    I realize that Python has operator overloading and OOP so I'm not sure.

    Any ideas? Any *evidence* one way or another?

    thanks!

    Chris
     
    , Jul 5, 2005
    #1
    1. Advertising

  2. wrote:

    > I've been reading the beloved Paul Graham's "Hackers and Painters".
    > He claims he developed a web app at light speed using Lisp and lots
    > of macros.
    >
    > It got me curious if Lisp
    > is inherently faster to develop complex apps in. It would seem if you
    > could create your own language in Lisp using macros that that would be
    > quite an advantage....
    >
    > I realize that Python has operator overloading and OOP so I'm not sure.
    >
    > Any ideas? Any *evidence* one way or another?

    If that means that I have to learn a new programming language for every
    program I'd like to apply a minor fix/customization to: not a good idea.
    Probably not just for the casual hacker like me, but also for the
    maintainance phase of a project, when the former lead gurus lost interest
    and/or employment.

    --
    Benjamin Niemann
    Email: pink at odahoda dot de
    WWW: http://www.odahoda.de/
     
    Benjamin Niemann, Jul 5, 2005
    #2
    1. Advertising

  3. Joost Jacob Guest

    Very hard to say.

    LISP has OOP too, Google for CLOS.

    Operator overloading is something to avoid anyway, IMHO, just like
    static typing is something to avoid if you need fast development, on
    schedule and the like.

    LISP has one thing that Python does not have: LISP code is LISP data.
    A thorough study comparing LISP and Python in this respect would be
    welcome.
     
    Joost Jacob, Jul 5, 2005
    #3
  4. Dave Brueck Guest

    wrote:
    > I've been reading the beloved Paul Graham's "Hackers and Painters".
    > He claims he developed a web app at light speed using Lisp and lots
    > of macros.
    >
    > It got me curious if Lisp
    > is inherently faster to develop complex apps in. It would seem if you
    > could create your own language in Lisp using macros that that would be
    > quite an advantage....
    >
    > I realize that Python has operator overloading and OOP so I'm not sure.
    >
    > Any ideas? Any *evidence* one way or another?


    Well, his Viaweb company was founded in about '95, right? So he probably just
    used Lisp because Python wasn't as well known yet. ;-)

    IMO one of Python's strengths over Lisp is that it plays well with many other
    technologies. It should be remembered that Graham's use of Lisp in Viaweb was in
    building a web application, so that Lisp's main links to the "outside world"
    were the filesystem and Apache. They didn't use a database, and Apache had to be
    modified in order to work with Lisp.
     
    Dave Brueck, Jul 5, 2005
    #4
  5. Guest


    > Well, his Viaweb company was founded in about '95, right? So he probably just
    > used Lisp because Python wasn't as well known yet. ;-)


    David

    That is what I thought too. It makes sense but I wasn't sure. Still
    ain't.
    The problem is that questions like 'What lang is fastest to develop
    in?'
    are hard to answer definitively.

    Chris
     
    , Jul 5, 2005
    #5
  6. Peter Hansen Guest

    wrote:
    > The problem is that questions like 'What lang is fastest to develop
    > in?' are hard to answer definitively.


    That's because the answer depends on lots of context such what is the
    problem domain and who is the programmer. Really, it's an impossible
    question to answer. Measuring two different programmers with two
    different languages would give useless results, since you can't ensure
    the two programmers are equally capable. Using the same programmer for
    the same problem with two different languages doesn't work since she
    would learn from doing it the first time and inevitably have advantages
    in the second time through. Using two different problems is of course
    pointless as well.

    Ultimately, however, the question needs no answer, since "speed of
    development" is not the only or even the most important factor in
    development. Take into account issues of maintainability, quality of
    code, performance and such, and you've muddied the question even more,
    making this a religious question and one that has no meaningful answer,
    nor a need to be answered in a simple way.

    For *me*, Python has proven to be the fastest language to develop in, so
    far, but it's quite possible to imagine another language in the future
    which I might learn which would be -- for me -- even faster, at least
    for certain types of problems. (But so what? :) )

    -Peter
     
    Peter Hansen, Jul 6, 2005
    #6
  7. "" <> writes:

    > I've been reading the beloved Paul Graham's "Hackers and Painters".
    > He claims he developed a web app at light speed using Lisp and lots
    > of macros.
    >
    > It got me curious if Lisp
    > is inherently faster to develop complex apps in. It would seem if you
    > could create your own language in Lisp using macros that that would be
    > quite an advantage....


    Well, for me, I was playing around with lisp and developing in python
    for my little scripts until I finally hit something that could leverage
    a lisp macro to create a new type of iterator. After that things moved
    foward at a rapid speed. Another point in lisp's favor is that I prefer
    nested s-expressions to the sometimes ugly mashup of functional and OO
    calls that I end up creating in python.

    On the other hand, python benefits from a much richer standard library,
    so some of the things you take for granted in python such as
    string.split(None,3) need to be found or created.



    > thanks!
    >
    > Chris
    >


    --
    Kirk Job-Sluder
    "The square-jawed homunculi of Tommy Hilfinger ads make every day an
    existential holocaust." --Scary Go Round
     
    Kirk Job Sluder, Jul 6, 2005
    #7
  8. Mike Meyer Guest

    "" <> writes:

    >> Well, his Viaweb company was founded in about '95, right? So he probably just
    >> used Lisp because Python wasn't as well known yet. ;-)

    >
    > David
    >
    > That is what I thought too. It makes sense but I wasn't sure. Still
    > ain't.
    > The problem is that questions like 'What lang is fastest to develop
    > in?'
    > are hard to answer definitively.


    True. You might start by asking which lets you write the fewest LOC,
    as studies during the 70s showed that programmers tended to write the
    same number of LOC/day, regardless of the language chosen.

    The problem with the LOC measurement is that the most productive days
    are the ones where you refactor and eliminate a thousand LOC. That
    sort of throws the whole thing off.

    <mike
    --
    Mike Meyer <> http://www.mired.org/home/mwm/
    Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
     
    Mike Meyer, Jul 6, 2005
    #8
  9. wrote:
    > I've been reading the beloved Paul Graham's "Hackers and Painters".
    > He claims he developed a web app at light speed using Lisp and lots
    > of macros.
    >
    > It got me curious if Lisp
    > is inherently faster to develop complex apps in.



    With Lisp or Forth, a master programmer has unlimited power and
    expressiveness. With Python, even a regular guy can reach for the
    stars.


    Raymond
     
    Raymond Hettinger, Jul 6, 2005
    #9
  10. wrote:
    > The problem is that questions like 'What lang is fastest to develop
    > in?'
    > are hard to answer definitively.


    FWIW, Google's answer to that question is C++, Java, and Python. For
    any given problem, any of the three are acceptable. Each programmer or
    engineering team gets to decide based on his or her language
    expertise.*



    Raymond


    * Source: Greg Stein's keynote address at PyCon 2005.
     
    Raymond Hettinger, Jul 6, 2005
    #10
  11. Fuzzyman Guest

    Fuzzyman, Jul 6, 2005
    #11
  12. Fuzzyman:
    > So Lisp is for really good programmers, and Python is for
    > mediocre programmers ?



    Python is *also* for mediocre programmers. I see this as a
    strength, not as a weakness.

    Michele Simionato
     
    Michele Simionato, Jul 6, 2005
    #12
  13. On 6 Jul 2005 00:30:34 -0700, Raymond Hettinger <> wrote:
    >
    > With Lisp or Forth, a master programmer has unlimited power and
    > expressiveness. With Python, even a regular guy can reach for the
    > stars.


    +1 QOTW
     
    Andrew Durdin, Jul 6, 2005
    #13
  14. Fuzzyman Guest

    Fair enough ;-)

    I'd like to discover the power of Lisp, but I have a limited amount of
    time to sink into programming... so maybe I'm better off putting my
    energies and imagination into Python.

    *A language is a medium of expression.* - Paul Graham

    All the best.

    Fuzzy
    http://www.voidspace.org.uk/python
     
    Fuzzyman, Jul 6, 2005
    #14
  15. Op 2005-07-06, Michele Simionato schreef <>:
    > Fuzzyman:
    >> So Lisp is for really good programmers, and Python is for
    >> mediocre programmers ?

    >
    >
    > Python is *also* for mediocre programmers. I see this as a
    > strength, not as a weakness.


    But sometimes I get the impression people want it to evolve
    so it is only for mediocre programmers.

    --
    Antoon Pardon
     
    Antoon Pardon, Jul 6, 2005
    #15
  16. Larry Bates Guest

    You don't say how long it took to develop the "macros" but
    you should see what kind of website an experienced Zope/Plone
    programmer can whip up in a few minutes.

    Acceleration in programming has always been about the "Standard
    Library" (not only Python's standard library but also your
    standard library). I'm talking about stable, debugged,
    documented macros, functions and classes that the programmer can
    use to quickly do very complex tasks. I discovered this well
    over 30 years ago and taught many young programmers and
    University students this very important "trick". As you write
    software you will eventually come across common routines that
    are used in almost every software package (logging, reading
    from CSV files, date/time manipulation, ...). If you have lots
    of these to choose from in your library, you will produce code
    10-100 times faster than those that start over every time AND
    the code will be MANY times more reliable because you are
    utilizing stable code that has been debugged over a long period
    of time. You will also be producing code that is more
    "maintainable". Discovered a bug in a library routine? Fix it
    and then it is fixed in 100's (or 1000's) of existing programs
    that use it.

    -Larry Bates

    wrote:
    > I've been reading the beloved Paul Graham's "Hackers and Painters".
    > He claims he developed a web app at light speed using Lisp and lots
    > of macros.
    >
    > It got me curious if Lisp
    > is inherently faster to develop complex apps in. It would seem if you
    > could create your own language in Lisp using macros that that would be
    > quite an advantage....
    >
    > I realize that Python has operator overloading and OOP so I'm not sure.
    >
    > Any ideas? Any *evidence* one way or another?
    >
    > thanks!
    >
    > Chris
    >
     
    Larry Bates, Jul 6, 2005
    #16
  17. Zachery Bir Guest

    Larry Bates <> writes:

    > You don't say how long it took to develop the "macros" but
    > you should see what kind of website an experienced Zope/Plone
    > programmer can whip up in a few minutes.


    Zope/Plone (as frameworks) represent exactly the kinds of DSLs people
    have been building with Lisp for decades. Shoulders of giants, and all
    that. Lisp has web app frameworks as well: Uncommon Web and BKNR, to
    name two.

    Zac
     
    Zachery Bir, Jul 6, 2005
    #17
  18. Tom Anderson Guest

    On Tue, 5 Jul 2005, Mike Meyer wrote:

    > "" <> writes:
    >
    >>> Well, his Viaweb company was founded in about '95, right? So he
    >>> probably just used Lisp because Python wasn't as well known yet. ;-)

    >>
    >> That is what I thought too. It makes sense but I wasn't sure. Still
    >> ain't. The problem is that questions like 'What lang is fastest to
    >> develop in?' are hard to answer definitively.

    >
    > True. You might start by asking which lets you write the fewest LOC, as
    > studies during the 70s showed that programmers tended to write the same
    > number of LOC/day, regardless of the language chosen.
    >
    > The problem with the LOC measurement is that the most productive days
    > are the ones where you refactor and eliminate a thousand LOC. That sort
    > of throws the whole thing off.


    As in:

    http://www.folklore.org/StoryView.py?project=Macintosh&story=Negative_2000_Lines_Of_Code.txt

    Perhaps the real question, then, is which language allows you to delete
    lines of code most quickly.

    tom

    --
    find porn apricot
     
    Tom Anderson, Jul 6, 2005
    #18
  19. Peter Hansen Guest

    Tom Anderson wrote:
    > Perhaps the real question, then, is which language allows you to delete
    > lines of code most quickly.


    No, then the question becomes "which language allows you to quickly
    write very many lines of code which then have to be deleted".

    Of course, writing those lines manually would be silly if you could
    automate the process. After all, the lines of code aren't required, so
    they don't really have to do anything, do they?

    So naturally Assembly would be the proper way to get maximum performance
    out of your automatic code writing program.

    Therefore Assembly is clearly the fastest development language.

    -Peter
     
    Peter Hansen, Jul 6, 2005
    #19
  20. Raymond Hettinger wrote:
    > wrote:
    >
    >>The problem is that questions like 'What lang is fastest to develop
    >>in?'
    >>are hard to answer definitively.

    >
    >
    > FWIW, Google's answer to that question is C++, Java, and Python. For
    > any given problem, any of the three are acceptable. Each programmer or
    > engineering team gets to decide based on his or her language
    > expertise.*


    Actually, Google's answer to that question is something called "ILOG
    CPLEX", followed by Visual Basic, English as a second language, PHP, and
    "Holt Software Associates". ;-)

    http://www.google.com/search?hl=en&q=What language is fastest to develop in?&btnG=Google Search

    Given this finding, I'm not sure I should put much weight into Google
    search results anymore ...
     
    Rocco Moretti, Jul 6, 2005
    #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. sturlamolden

    Lisp-like macros in Python?

    sturlamolden, May 1, 2007, in forum: Python
    Replies:
    5
    Views:
    875
    John Nagle
    May 1, 2007
  2. ekzept
    Replies:
    0
    Views:
    393
    ekzept
    Aug 10, 2007
  3. dpapathanasiou

    Python equivalent of Common Lisp Macros?

    dpapathanasiou, Nov 26, 2008, in forum: Python
    Replies:
    5
    Views:
    447
    dpapathanasiou
    Nov 26, 2008
  4. bolega
    Replies:
    8
    Views:
    987
    fortunatus
    Jun 16, 2010
  5. bolega
    Replies:
    8
    Views:
    259
    fortunatus
    Jun 16, 2010
Loading...

Share This Page