Status?

303 views
Skip to first unread message

Rui Carmo

unread,
Sep 25, 2013, 1:18:24 PM9/25/13
to clojure...@googlegroups.com
Hi there. I'd like to know if this is still moving forward somehow. I see that core.async is taking up a lot of mindshare, but I'm quite interested in the prospect of a Python backend for Clojure...

Are there any plans to move this forward? I started looking at ways to bundle the whole thing as a Python .egg, but there is apparently no way to cache the compiled Python bytecode...

R.

Antony Lee

unread,
Sep 25, 2013, 2:44:52 PM9/25/13
to clojure-py-dev
Hi,
The project is totally unactive right now, but it is in a reasonably usable state (you can start python2 clojure.py and get a working REPL).  At some point in the future (tm) I would like to rewrite the whole compiler to target Python AST (or some sort of AST representation) instead of Python bytecode, which is a moving and complex target, but meanwhile, you are welcome to try it and file bug reports :-) (I may even look at them when I have some time)
The whole "caching compiled bytecode" is a big issue and will probably not be solved before the compiler rewrite though (there has been some discussions on the topic earlier on the mailing list, just have a look).
Antony


2013/9/25 Rui Carmo <rca...@gmail.com>
Hi there. I'd like to know if this is still moving forward somehow. I see that core.async is taking up a lot of mindshare, but I'm quite interested in the prospect of a Python backend for Clojure...

Are there any plans to move this forward? I started looking at ways to bundle the whole thing as a Python .egg, but there is apparently no way to cache the compiled Python bytecode...

R.

--
You received this message because you are subscribed to the Google Groups "clojure-py-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure-py-de...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Antony Lee

unread,
Sep 25, 2013, 2:46:57 PM9/25/13
to clojure-py-dev
And just FYI, please use the github HEAD, not the PyPI version which is waaay out of date.
Antony


2013/9/25 Antony Lee <anton...@berkeley.edu>

Rui Carmo

unread,
Sep 25, 2013, 3:48:05 PM9/25/13
to clojure...@googlegroups.com, anton...@berkeley.edu


On Wednesday, September 25, 2013 7:44:52 PM UTC+1, Antony Lee wrote:
Hi,
The project is totally unactive right now, but it is in a reasonably usable state (you can start python2 clojure.py and get a working REPL). 

Yeah, I got it working on Pythonista (for the iPad) during my Summer break. It was quite impressive once you got past the 1m warmup time, but then again it reminded my of the Symbolics LISP machines :)
 
At some point in the future (tm) I would like to rewrite the whole compiler to target Python AST (or some sort of AST representation) instead of Python bytecode, which is a moving and complex target,

Yeah, I get that. I was just wondering if there was a quick way to get it working for 2.7.x byte code at least, so that I could toss the whole thing inside PyPy or Stackless (but mostly because I wanted to get it to load _much faster_ on the iPad).
 
but meanwhile, you are welcome to try it and file bug reports :-) (I may even look at them when I have some time)

I might do you one better and try for some pull requests, possibly themed around missing functions and a few CLI fixes (need to get the iPad stuff out of the way). Depends on free time, as usual, but right now I wanted to gauge feasibility and community involvement (there's a bit of an echo here, judging from posting history).
 
The whole "caching compiled bytecode" is a big issue and will probably not be solved before the compiler rewrite though (there has been some discussions on the topic earlier on the mailing list, just have a look).

I did, but they were somewhat inconclusive. I'd like to go for some low-hanging fruit like serializing things on a per-file basis (.clo or something), and see if that sped up loading times. 

R.

Antony Lee

unread,
Sep 25, 2013, 9:09:19 PM9/25/13
to clojure-py-dev



2013/9/25 Rui Carmo <rca...@gmail.com>



On Wednesday, September 25, 2013 7:44:52 PM UTC+1, Antony Lee wrote:
Hi,
The project is totally unactive right now, but it is in a reasonably usable state (you can start python2 clojure.py and get a working REPL). 

Yeah, I got it working on Pythonista (for the iPad) during my Summer break. It was quite impressive once you got past the 1m warmup time, but then again it reminded my of the Symbolics LISP machines :)
I don't know the specifics of Python on iPad but the slow startup time may be due to the somewhat poor implementation of PersistentHashMaps... more information here: https://groups.google.com/forum/#!topic/clojure-py-dev/jibEGIUqSsk.  The simple-data-structures branch on my repo (https://github.com/anntzer/clojure-py/tree/simple-data-structures) tries to improve that (at the cost of decreasing the efficiency of larger PersistentHashMaps); you may want to give it a try but it's not really in a mergeable state.
 
At some point in the future (tm) I would like to rewrite the whole compiler to target Python AST (or some sort of AST representation) instead of Python bytecode, which is a moving and complex target,

Yeah, I get that. I was just wondering if there was a quick way to get it working for 2.7.x byte code at least, so that I could toss the whole thing inside PyPy or Stackless (but mostly because I wanted to get it to load _much faster_ on the iPad).
It works fine on CPython 2.7.  Unfortunately I think PyPy bytecode is slightly different so you may want to check what the differences are exactly (hence, again, my interest in targeting AST instead).  No idea of how Stackless bytecode looks like.
 
but meanwhile, you are welcome to try it and file bug reports :-) (I may even look at them when I have some time)

I might do you one better and try for some pull requests, possibly themed around missing functions and a few CLI fixes (need to get the iPad stuff out of the way). Depends on free time, as usual, but right now I wanted to gauge feasibility and community involvement (there's a bit of an echo here, judging from posting history).
I'd be happy to look at your PRs and merge them, but to be honest the project is not my priority right now (other stuff to do...).  Also, you can find various works-in-progress on my clone of the repo (https://github.com/anntzer/clojure-py).
 
The whole "caching compiled bytecode" is a big issue and will probably not be solved before the compiler rewrite though (there has been some discussions on the topic earlier on the mailing list, just have a look).

I did, but they were somewhat inconclusive. I'd like to go for some low-hanging fruit like serializing things on a per-file basis (.clo or something), and see if that sped up loading times. 

R.

--

Rui Carmo

unread,
Sep 29, 2013, 6:07:19 PM9/29/13
to clojure...@googlegroups.com
Thanks. I'll be looking at those branches (already peeked at the simple-data-structures one, which made sense).

R.

Reply all
Reply to author
Forward
0 new messages