Re: [pypy-dev] google should build a pypy phone or someone
In a message of Tue, 15 Feb 2011 11:36:43 +0100, Antonio Cuni writes: <snip>
Anyway, back to the original topic: what would python offer more than jav a for android?
ciao, Anto
As some of you saw in Leysin, I own one of these. http://www.freedominput.com/freedom-accessories/freedom-pro-keyboard which works with Android. which makes the whole idea of being able to sit down and program whenever the mood strikes you, even when your laptop is far away or out of power more attractive, since you can touchtype. But that doesn't make me want to start programming in java. Especially for the sort of quick and dirty calculations I use python -c for. Laura
On 02/15/2011 12:51 PM, Laura Creighton wrote:
In a message of Tue, 15 Feb 2011 11:36:43 +0100, Antonio Cuni writes: <snip>
Anyway, back to the original topic: what would python offer more than jav a for android?
ciao, Anto
As some of you saw in Leysin, I own one of these. http://www.freedominput.com/freedom-accessories/freedom-pro-keyboard which works with Android.
which makes the whole idea of being able to sit down and program whenever the mood strikes you, even when your laptop is far away or out of power more attractive, since you can touchtype.
But that doesn't make me want to start programming in java. Especially for the sort of quick and dirty calculations I use python -c for.
I am sure you know of this then: http://code.google.com/p/android-scripting/ It's an app for Android that lets you script the phone with various dynamic languages (including Python). Actually I think that PyPy could/should be made to work with this thing. It would not quite make PyPy a first class VM on the phone, but would already give you access to a number of phone-specific features. Carl Friedrich
On Tue, Feb 15, 2011 at 03:06:07PM +0100, Carl Friedrich Bolz wrote:
On 02/15/2011 12:51 PM, Laura Creighton wrote:
http://www.freedominput.com/freedom-accessories/freedom-pro-keyboard which works with Android.
which makes the whole idea of being able to sit down and program whenever the mood strikes you, even when your laptop is far away or out of power more attractive, since you can touchtype.
But that doesn't make me want to start programming in java. Especially for the sort of quick and dirty calculations I use python -c for.
I am sure you know of this then:
http://code.google.com/p/android-scripting/
It's an app for Android that lets you script the phone with various dynamic languages (including Python). Actually I think that PyPy could/should be made to work with this thing. It would not quite make PyPy a first class VM on the phone, but would already give you access to a number of phone-specific features.
the Scripting eniroment uses an enviroment varible to indicate a socket to connect to, once connected you make JSON calls over the socket to access the platform API's that are done via a java proxy. porting pypy to run in the enviroment would be as simple as compiling an arm port and importing the (all python) proxy libary i have a couple of scripts running on my phone for utility functions (checking my site is up and such) the API is a bit limited and i think that pypy running on the native VM would be more flexible for creating "full" programs (cant acceses many GUI componenets from this restricted enviroment)
On Tue, Feb 15, 2011 at 6:29 AM, <pypy@pocketnix.org> wrote:
On Tue, Feb 15, 2011 at 03:06:07PM +0100, Carl Friedrich Bolz wrote:
On 02/15/2011 12:51 PM, Laura Creighton wrote:
I am sure you know of this then:
http://code.google.com/p/android-scripting/
It's an app for Android that lets you script the phone with various dynamic languages (including Python). Actually I think that PyPy could/should be made to work with this thing. It would not quite make PyPy a first class VM on the phone, but would already give you access to a number of phone-specific features.
the Scripting eniroment uses an enviroment varible to indicate a socket to connect to, once connected you make JSON calls over the socket to access the platform API's that are done via a java proxy. porting pypy to run in the enviroment would be as simple as compiling an arm port and importing the (all python) proxy libary
A guy at my local Python User Group uses an Android phone, and has explored both Python and Ruby in the Android Scripting Environment. He tells me that because the Ruby implementation is running on the Dalvik virtual machine, that its API access is more complete than that of the CPython port. Presumably you need a wrapper function for everything you want to chain into over the socket (in CPython), and people create those wrappers mostly on an as-needed basis. In light of this, it seems it might be better to put a JVM (which is almost the same as Dalvik) version of Pypy, or Jython, on Android rather than Pypy built for ARM.
There's always NDK which includes JNI bindings, so you can comile (or jit-compile) pypy and python code natively and still access android framework. If it really is a good idea, I cannot tell. I suppose if you want simple scripting, json-rpc would suit you fine, if you wanted more scripting, reflection, shared object space and good integration perhaps dalvik jvm is a way to go, if cpython or pypy becomes standard in android and apps are witten in python entirely, jni bindings are probably better, whether static or runtime reflection. I'm sure there would be a few issues to resolve though, object lifetime, garbage collection and callbacks for one. 2c from someone who went dumbphone 2 years ago :P On 15 February 2011 11:40, Dan Stromberg <drsalists@gmail.com> wrote:
On Tue, Feb 15, 2011 at 6:29 AM, <pypy@pocketnix.org> wrote:
On Tue, Feb 15, 2011 at 03:06:07PM +0100, Carl Friedrich Bolz wrote:
On 02/15/2011 12:51 PM, Laura Creighton wrote:
I am sure you know of this then:
http://code.google.com/p/android-scripting/
It's an app for Android that lets you script the phone with various dynamic languages (including Python). Actually I think that PyPy could/should be made to work with this thing. It would not quite make PyPy a first class VM on the phone, but would already give you access to a number of phone-specific features.
the Scripting eniroment uses an enviroment varible to indicate a socket to connect to, once connected you make JSON calls over the socket to access the platform API's that are done via a java proxy. porting pypy to run in the enviroment would be as simple as compiling an arm port and importing the (all python) proxy libary
A guy at my local Python User Group uses an Android phone, and has explored both Python and Ruby in the Android Scripting Environment.
He tells me that because the Ruby implementation is running on the Dalvik virtual machine, that its API access is more complete than that of the CPython port. Presumably you need a wrapper function for everything you want to chain into over the socket (in CPython), and people create those wrappers mostly on an as-needed basis.
In light of this, it seems it might be better to put a JVM (which is almost the same as Dalvik) version of Pypy, or Jython, on Android rather than Pypy built for ARM. _______________________________________________ pypy-dev@codespeak.net http://codespeak.net/mailman/listinfo/pypy-dev
participants (6)
-
Carl Friedrich Bolz -
Dan Stromberg -
Dima Tisnek -
Laura Creighton -
pypy@pocketnix.org -
Stefan Behnel