Python + Lisp integration?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Simo Melenius

    #1

    Python + Lisp integration?


    Hi,

    I'm wondering (after a bit of googling) whether there exists a Python
    binding to any open source Lisp environment (like librep or some
    Scheme or Common Lisp implementation) that could be recommended for
    non-toy use?

    My intention would be to use the Lisp environment to augment and help
    my Python programming (and/or conversely: have access to the wealth of
    Python libraries and Python code from a lispy language), which yields
    at least the following requirements:

    - the type and runtime environment system would need to be quite
    transparently integrated, e.g. being able to use (pass, call,
    set/get attr) Python objects in Lisp and vice versa with minimum
    hassle

    - the performance should match at least that of Python's. That
    probably requires a native interpreter, although the ability to
    compile Lisp to Python bytecode could do (if the lispy language
    could be efficiently implemented in the Python bytecode)

    There are many Scheme/Lisp interpreters written in Python, but those
    I've found and looked at I consider to be more of proof of concepts.
    Nesting different interpreters costs probably an order of magnitude in
    speed.
  • Arthur

    #2
    Re: Python + Lisp integration?

    On 29 Dec 2004 14:50:53 +0200, Simo Melenius
    <firstname.last name@iki.fi-spam> wrote:
    [color=blue]
    >
    >Hi,
    >
    >I'm wondering (after a bit of googling) whether there exists a Python
    >binding to any open source Lisp environment (like librep or some
    >Scheme or Common Lisp implementation) that could be recommended for
    >non-toy use?[/color]

    Not sure this is going to help much,

    but Lush - Lisp Universal Shell - is mature and has bindings to the
    Python C API.



    The bindings are specific to Python22. I had trouble getting all the
    demos working against Python23.

    Art

    Comment

    • Fuzzyman

      #3
      Re: Python + Lisp integration?


      Simo Melenius wrote:[color=blue]
      > Hi,
      >
      > I'm wondering (after a bit of googling) whether there exists a Python
      > binding to any open source Lisp environment (like librep or some
      > Scheme or Common Lisp implementation) that could be recommended for
      > non-toy use?
      >
      > My intention would be to use the Lisp environment to augment and help
      > my Python programming (and/or conversely: have access to the wealth[/color]
      of[color=blue]
      > Python libraries and Python code from a lispy language), which yields
      > at least the following requirements:
      >
      > - the type and runtime environment system would need to be quite
      > transparently integrated, e.g. being able to use (pass, call,
      > set/get attr) Python objects in Lisp and vice versa with minimum
      > hassle
      >
      > - the performance should match at least that of Python's. That
      > probably requires a native interpreter, although the ability to
      > compile Lisp to Python bytecode could do (if the lispy language
      > could be efficiently implemented in the Python bytecode)
      >
      > There are many Scheme/Lisp interpreters written in Python, but those
      > I've found and looked at I consider to be more of proof of concepts.
      > Nesting different interpreters costs probably an order of magnitude[/color]
      in[color=blue]
      > speed.[/color]


      When I looked for one I oculdn't find one. As Common Lisp generally
      runs *considerably* faster than Python it could be a useful thing to
      have. (Writing python extensions in CLISP would be more 'Pythonic' than
      writing them in C ?). A two way binding to GNU CLISP would seem a
      sensible one to implement.

      Don't think it's already been done though.
      Regards,


      Fuzzy
      http://www.voidspace.org.uk/python/index.shtml

      Comment

      • Erno Kuusela

        #4
        Re: Python + Lisp integration?


        hello,

        you might want to look at <http://logix.livelogix .com/> .

        -- erno

        Comment

        • Simo Melenius

          #5
          Re: Python + Lisp integration?

          Arthur <ajsiegel@opton line.com> writes:
          [color=blue]
          > but Lush - Lisp Universal Shell - is mature and has bindings to the
          > Python C API.[/color]

          Lush looks like a very interesting project on its own, too, and seems
          to have a load of bindings to other libraries too÷÷. (Even better if it
          was to support Python 2.3/2.4 once again in the future).


          br,
          S

          Comment

          • Simo Melenius

            #6
            Re: Python + Lisp integration?

            Erno Kuusela <erno@iki.fi> writes:
            [color=blue]
            > you might want to look at <http://logix.livelogix .com/> .[/color]

            Thanks, this was a good link! Logix looks like an interesting project,
            really, and I think I'll at least study its internals myself to shed
            light to how it uses the Python compiler. Looks like something to hack
            on.


            br,
            S

            Comment

            • Peter Dembinski

              #7
              Re: Python + Lisp integration?

              Simo Melenius <firstname.last name@iki.fi-spam> writes:
              [color=blue]
              > Hi,
              >
              > I'm wondering (after a bit of googling) whether there exists
              > a Python binding to any open source Lisp environment (like librep
              > or some Scheme or Common Lisp implementation) that could
              > be recommended for non-toy use?[/color]

              Dunno about non-toy uses, but if you want program your emacs with
              Python, there is pymacs available :)

              Comment

              Working...