Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there some lispy language that seamlessly integrates with Python?

Is there a language based on S-expressions with powerful macros that allows as seamless integration with Python as Clojure with JVM?

I want to try using such syntax and features while having access to all usual python libraries (including PyQt).

like image 316
Vi. Avatar asked Jan 08 '11 02:01

Vi.


2 Answers

I've been working a project to do this: psil. I have a series of blog posts talking about what I've done. Here's the short manifesto:

Psil is a new general-purpose programming language in the Lisp family of languages. Psil is implemented on top of Python, allowing easy access to existing Python libraries.

  • Best features from Lisp and Scheme
  • Complete language in its own right
  • Built upon the Python standard libraries
  • Strong interoperability with Python code

The reality hasn't quite caught up to the vision; for example I don't think there is a way to declare new classes in Psil code that can be used from Python. But at least for functions, it's mostly there.

Note that Psil is built completely on Python 3, and there is no Python 2 version. I don't know whether there is a PyQt for Python 3.

like image 107
Greg Hewgill Avatar answered Oct 01 '22 09:10

Greg Hewgill


While these aren't exactly what you're looking for, check:

CLPython - an implementation of Python in Common Lisp

(An ((Even Better) Lisp) Interpreter (in Python))

like image 30
TryPyPy Avatar answered Oct 01 '22 11:10

TryPyPy