Fwd: TR : [Jython-users] What are the implications of Jython going PyPy?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Fwd: TR : [Jython-users] What are the implications of Jython going PyPy?

méchoui
Hi,

Jython and Pypy is interesting, but here are some clarifications (correct me if I'm wrong).

Writing Jython with Pypy would _not_ mean writing Jython in Jython. Here is what that woud be :

Pypy projects contains :
- A python tp <other language> translator (C, for instance)
- A python interpreter, written in python
...and the first python code that you want to translate in <other language> is the python interpreter itself.
...so you have a python interpreter (witten in python but translated to <other language>) which runs your python code.

So, you may want to create a "python 2 java " translator. That woud enable your python interpreter (written in python) to be translated in Java, then this "java" python interpreter woud be able to execute python code. (By the way, there are funny people that just try to interpret... the interpreter again... to interpret python code, life is so funny !)

But it would not be "java-integrated" as Jython is, not without a lot of work.

I personnaly think pypy is the right very long term approach, but I think the current Jython approach is the right one on the short term. The main point is that the Pypy approach enables you to have a single python code for your interpreter, whatever the targeted language (where it will be translated). Modifying the interpreter behaviour becomes much easier. And the integration with the targeted language becomes an isolated problem for each language (which does not mean it is not a BIG issue anyway).

But working on a "python 2 java" translator would be complex, not to mention the java integration !

2 cents, again,

-----Message d'origine-----
De : [hidden email] [mailto:[hidden email]] De la part de Leo User
Envoyé : jeudi 30 mars 2006 17:45
À : [hidden email]; [hidden email]
Objet : [Jython-users] What are the implications of Jython going PyPy?


howdy,

I just thought Id toss this out in the open since Ive
seen some talk about Jython becoming implemented like
PyPy.  First off, I don't know much about PyPy but
from the sounds of it, its about implementing Python
in itself.  I guess having Jython do the same thing is
to have Jython be implemented in itself.  So this
comes to my big question:
What would going in that direction mean for tools
built on top of Jython.

Ive got 2 classes of apps in mind:
1. Those that just use Jython as Jython.  jyleo, for
example.
2. Those that build using the Jython classes.  jyleo's
JythonShell is an example here.  Its pure Java and
uses alot of Jython's Java classes to acheive its
integration.

Im surmising a goal of going PyPy would be to make #1
class apps work fine.  But what are the implications
of #2?  Does my valuable code suddenly become a thing
that can't jump into the future?  Granted there will
probably be work between jython version to jython
version to have it work.  I had to do some recoding to
get it to work from jython 2.1 to jython 2.2.

What about other Java apps that embed Jython in
themselves and do like the JythonShell does and uses
Jython's Java classes?

thanks!
leouser

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Jython-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-users
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: TR : [Jython-users] What are the implications of Jython going PyPy?

Yan Weng
Hi Laurent,

I guess we can't avoid "python 2 java" translator anyway. The current Jythonc approach is just a source to source translator. If we want a true "compiler", we have to translate the Jython AST to java byte code.

BTW, I feel deployment and compiler are two relative weak areas of Jython. But that may just be my personal feeling.

Best regards,

Yan


On 4/3/06, Laurent Ploix <[hidden email]> wrote:
Hi,

Jython and Pypy is interesting, but here are some clarifications (correct me if I'm wrong).

Writing Jython with Pypy would _not_ mean writing Jython in Jython. Here is what that woud be :

Pypy projects contains :
- A python tp <other language> translator (C, for instance)
- A python interpreter, written in python
...and the first python code that you want to translate in <other language> is the python interpreter itself.
...so you have a python interpreter (witten in python but translated to <other language>) which runs your python code.

So, you may want to create a "python 2 java " translator. That woud enable your python interpreter (written in python) to be translated in Java, then this "java" python interpreter woud be able to execute python code. (By the way, there are funny people that just try to interpret... the interpreter again... to interpret python code, life is so funny !)

But it would not be "java-integrated" as Jython is, not without a lot of work.

I personnaly think pypy is the right very long term approach, but I think the current Jython approach is the right one on the short term. The main point is that the Pypy approach enables you to have a single python code for your interpreter, whatever the targeted language (where it will be translated). Modifying the interpreter behaviour becomes much easier. And the integration with the targeted language becomes an isolated problem for each language (which does not mean it is not a BIG issue anyway).

But working on a "python 2 java" translator would be complex, not to mention the java integration !

2 cents, again,

-----Message d'origine-----
De : [hidden email] [mailto:[hidden email]] De la part de Leo User
Envoyé : jeudi 30 mars 2006 17:45
À : [hidden email]; [hidden email]
Objet : [Jython-users] What are the implications of Jython going PyPy?



howdy,

I just thought Id toss this out in the open since Ive
seen some talk about Jython becoming implemented like
PyPy.  First off, I don't know much about PyPy but
from the sounds of it, its about implementing Python
in itself.  I guess having Jython do the same thing is
to have Jython be implemented in itself.  So this
comes to my big question:
What would going in that direction mean for tools
built on top of Jython.

Ive got 2 classes of apps in mind:
1. Those that just use Jython as Jython.  jyleo, for
example.
2. Those that build using the Jython classes.  jyleo's
JythonShell is an example here.  Its pure Java and
uses alot of Jython's Java classes to acheive its
integration.

Im surmising a goal of going PyPy would be to make #1
class apps work fine.  But what are the implications
of #2?  Does my valuable code suddenly become a thing

that can't jump into the future?  Granted there will
probably be work between jython version to jython
version to have it work.  I had to do some recoding to
get it to work from jython 2.1 to jython 2.2.

What about other Java apps that embed Jython in
themselves and do like the JythonShell does and uses
Jython's Java classes?

thanks!
leouser

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
<a href="http://mail.yahoo.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://mail.yahoo.com


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
<a href="http://sel.as-us.falkag.net/sel?cmd=lnk&amp;kid=110944&amp;bid=241720&amp;dat=121642" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Jython-users mailing list
[hidden email]
<a href="https://lists.sourceforge.net/lists/listinfo/jython-users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">https://lists.sourceforge.net/lists/listinfo/jython-users

Reply | Threaded
Open this post in threaded view
|

Re: Fwd: TR : [Jython-users] What are the implications of Jython going PyPy?

méchoui
Hi Yan,

My own feeling is that translating from source (python) to source (java) is a simpler approach, even if it is not the most powerful. I think that it is much easier to debug the translator when its output is java. But I agree this is not the "best" approach in terms of performance / precision.

But anyway, why should we care about generating byte-code if the java compiler does it for us ?

Bye,

On 4/3/06, Yan Weng <[hidden email]> wrote:
Hi Laurent,

I guess we can't avoid "python 2 java" translator anyway. The current Jythonc approach is just a source to source translator. If we want a true "compiler", we have to translate the Jython AST to java byte code.

BTW, I feel deployment and compiler are two relative weak areas of Jython. But that may just be my personal feeling.

Best regards,

Yan



On 4/3/06, Laurent Ploix <[hidden email]> wrote:
Hi,

Jython and Pypy is interesting, but here are some clarifications (correct me if I'm wrong).

Writing Jython with Pypy would _not_ mean writing Jython in Jython. Here is what that woud be :

Pypy projects contains :
- A python tp <other language> translator (C, for instance)
- A python interpreter, written in python
...and the first python code that you want to translate in <other language> is the python interpreter itself.
...so you have a python interpreter (witten in python but translated to <other language>) which runs your python code.

So, you may want to create a "python 2 java " translator. That woud enable your python interpreter (written in python) to be translated in Java, then this "java" python interpreter woud be able to execute python code. (By the way, there are funny people that just try to interpret... the interpreter again... to interpret python code, life is so funny !)

But it would not be "java-integrated" as Jython is, not without a lot of work.

I personnaly think pypy is the right very long term approach, but I think the current Jython approach is the right one on the short term. The main point is that the Pypy approach enables you to have a single python code for your interpreter, whatever the targeted language (where it will be translated). Modifying the interpreter behaviour becomes much easier. And the integration with the targeted language becomes an isolated problem for each language (which does not mean it is not a BIG issue anyway).

But working on a "python 2 java" translator would be complex, not to mention the java integration !

2 cents, again,

-----Message d'origine-----
De : [hidden email] [mailto:[hidden email]] De la part de Leo User
Envoyé : jeudi 30 mars 2006 17:45
À : [hidden email]; [hidden email]
Objet : [Jython-users] What are the implications of Jython going PyPy?



howdy,

I just thought Id toss this out in the open since Ive
seen some talk about Jython becoming implemented like
PyPy.  First off, I don't know much about PyPy but
from the sounds of it, its about implementing Python
in itself.  I guess having Jython do the same thing is
to have Jython be implemented in itself.  So this
comes to my big question:
What would going in that direction mean for tools
built on top of Jython.

Ive got 2 classes of apps in mind:
1. Those that just use Jython as Jython.  jyleo, for
example.
2. Those that build using the Jython classes.  jyleo's
JythonShell is an example here.  Its pure Java and
uses alot of Jython's Java classes to acheive its
integration.

Im surmising a goal of going PyPy would be to make #1
class apps work fine.  But what are the implications
of #2?  Does my valuable code suddenly become a thing

that can't jump into the future?  Granted there will
probably be work between jython version to jython
version to have it work.  I had to do some recoding to
get it to work from jython 2.1 to jython 2.2.

What about other Java apps that embed Jython in
themselves and do like the JythonShell does and uses
Jython's Java classes?

thanks!
leouser

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
<a href="http://mail.yahoo.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://mail.yahoo.com


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
<a href="http://sel.as-us.falkag.net/sel?cmd=lnk&amp;kid=110944&amp;bid=241720&amp;dat=121642" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Jython-users mailing list
[hidden email]
<a href="https://lists.sourceforge.net/lists/listinfo/jython-users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">https://lists.sourceforge.net/lists/listinfo/jython-users


Reply | Threaded
Open this post in threaded view
|

Re: Fwd: TR : [Jython-users] What are the implications of Jython going PyPy?

Samuele Pedroni
Laurent Ploix wrote:
> Hi Yan,
>
> My own feeling is that translating from source (python) to source (java)
> is a simpler approach, even if it is not the most powerful.

is not simple at all, especially if the translation is used to generate
a re-implementation of Jython.

Notice that PyPy contains most of the technology needed to do RPython
(a statically typeable subset of Python) to Java/Java bytecode translation.

The hard parts of this are done in a generic way for possible
oo oritented targets. What is needed is "just" a backend. I expect
writing such a thing to take some effort, but OTOH working on source
to java translation for the purpose of getting a Jython
re-implementation would be a rather pointless task. Writing a backend
hard parts would be taming code size issues, and dealing with complex
object graphs of constants. And tuning speed.

Jythonc works because Jython contains a python runtime in java,
which is what jythonc leans on. Of course You could not use such a
technology to get a python runtime in java itself.


> I think that
> it is much easier to debug the translator when its output is java. But I
> agree this is not the "best" approach in terms of performance / precision.
>
> But anyway, why should we care about generating byte-code if the java
> compiler does it for us ?
>
> Bye,
>
> On 4/3/06, *Yan Weng* < [hidden email] <mailto:[hidden email]>> wrote:
>
>     Hi Laurent,
>
>     I guess we can't avoid "python 2 java" translator anyway. The
>     current Jythonc approach is just a source to source translator. If
>     we want a true "compiler", we have to translate the Jython AST to
>     java byte code.
>
>     BTW, I feel deployment and compiler are two relative weak areas of
>     Jython. But that may just be my personal feeling.
>
>     Best regards,
>
>     Yan
>
>
>
>     On 4/3/06, * Laurent Ploix* <[hidden email]
>     <mailto:[hidden email]>> wrote:
>
>         Hi,
>
>         Jython and Pypy is interesting, but here are some clarifications
>         (correct me if I'm wrong).
>
>         Writing Jython with Pypy would _not_ mean writing Jython in
>         Jython. Here is what that woud be :
>
>         Pypy projects contains :
>         - A python tp <other language> translator (C, for instance)
>         - A python interpreter, written in python
>         ...and the first python code that you want to translate in
>         <other language> is the python interpreter itself.
>         ...so you have a python interpreter (witten in python but
>         translated to <other language>) which runs your python code.
>
>         So, you may want to create a "python 2 java " translator. That
>         woud enable your python interpreter (written in python) to be
>         translated in Java, then this "java" python interpreter woud be
>         able to execute python code. (By the way, there are funny people
>         that just try to interpret... the interpreter again... to
>         interpret python code, life is so funny !)
>
>         But it would not be "java-integrated" as Jython is, not without
>         a lot of work.
>
>         I personnaly think pypy is the right very long term approach,
>         but I think the current Jython approach is the right one on the
>         short term. The main point is that the Pypy approach enables you
>         to have a single python code for your interpreter, whatever the
>         targeted language (where it will be translated). Modifying the
>         interpreter behaviour becomes much easier. And the integration
>         with the targeted language becomes an isolated problem for each
>         language (which does not mean it is not a BIG issue anyway).
>
>         But working on a "python 2 java" translator would be complex,
>         not to mention the java integration !
>
>         2 cents, again,
>
>         -----Message d'origine-----
>         De : [hidden email]
>         <mailto:[hidden email]>
>         [mailto:[hidden email]
>         <mailto:[hidden email]>] De la part de
>         Leo User
>         Envoyé : jeudi 30 mars 2006 17:45
>         À : [hidden email]
>         <mailto:[hidden email]>;
>         [hidden email]
>         <mailto:[hidden email]>
>         Objet : [Jython-users] What are the implications of Jython going
>         PyPy?
>
>
>
>         howdy,
>
>         I just thought Id toss this out in the open since Ive
>         seen some talk about Jython becoming implemented like
>         PyPy.  First off, I don't know much about PyPy but
>         from the sounds of it, its about implementing Python
>         in itself.  I guess having Jython do the same thing is
>         to have Jython be implemented in itself.  So this
>         comes to my big question:
>         What would going in that direction mean for tools
>         built on top of Jython.
>
>         Ive got 2 classes of apps in mind:
>         1. Those that just use Jython as Jython.  jyleo, for
>         example.
>         2. Those that build using the Jython classes.  jyleo's
>         JythonShell is an example here.  Its pure Java and
>         uses alot of Jython's Java classes to acheive its
>         integration.
>
>         Im surmising a goal of going PyPy would be to make #1
>         class apps work fine.  But what are the implications
>         of #2?  Does my valuable code suddenly become a thing
>
>         that can't jump into the future?  Granted there will
>         probably be work between jython version to jython
>         version to have it work.  I had to do some recoding to
>         get it to work from jython 2.1 to jython 2.2.
>
>         What about other Java apps that embed Jython in
>         themselves and do like the JythonShell does and uses
>         Jython's Java classes?
>
>         thanks!
>         leouser
>
>         __________________________________________________
>         Do You Yahoo!?
>         Tired of spam?  Yahoo! Mail has the best spam protection around
>         http://mail.yahoo.com
>
>
>         -------------------------------------------------------
>         This SF.Net email is sponsored by xPML, a groundbreaking
>         scripting language
>         that extends applications into web and mobile media. Attend the
>         live webcast
>         and join the prime developer group breaking into this new coding
>         territory!
>         http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
>         <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642>
>         _______________________________________________
>         Jython-users mailing list
>         [hidden email]
>         <mailto:[hidden email]>
>         https://lists.sourceforge.net/lists/listinfo/jython-users
>         <https://lists.sourceforge.net/lists/listinfo/jython-users>
>
>
>



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
<a href="http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642">http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
Jython-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-dev
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: TR : [Jython-users] What are the implications of Jython going PyPy?

Yan Weng
Samuele,

Thank you for your input. I did think writting the Java bytecode translator for PyPy before. I even checked out the pypy code and studied it. However, from what I saw, PyPy is not production ready right now. Going to PyPy seems a little bit early for Jython right now.

I believe Jython's power comes from the combination of the Python language and Java platform (libraries). If we can align Jython with agile Java development closer, we can win huge mindshare in Java community. Here are the features I want to see in Jython in the short time peoriod.
1. Has the new Python language feature such as method decoration. We can defer the library related update later. The point is we don't really have to keep 100% compatible with Python. We just need the core language feature.
2. Can leverage the recent JDK change.
3. Integrate with Spring, Hibernate, JSF and other Java frameworks better. Jython should be great on simplifying configuration (including depency injection),  testing, deployment, xml handling and other areas.

By improving the above three areas, I am pretty sure Jython can easily win minshare in Fortune 500.

Just my 2 cents.

- Yan

On 4/3/06, Samuele Pedroni <[hidden email]> wrote:
Laurent Ploix wrote:
> Hi Yan,
>
> My own feeling is that translating from source (python) to source (java)
> is a simpler approach, even if it is not the most powerful.

is not simple at all, especially if the translation is used to generate
a re-implementation of Jython.

Notice that PyPy contains most of the technology needed to do RPython
(a statically typeable subset of Python) to Java/Java bytecode translation.

The hard parts of this are done in a generic way for possible
oo oritented targets. What is needed is "just" a backend. I expect
writing such a thing to take some effort, but OTOH working on source
to java translation for the purpose of getting a Jython
re-implementation would be a rather pointless task. Writing a backend
hard parts would be taming code size issues, and dealing with complex
object graphs of constants. And tuning speed.

Jythonc works because Jython contains a python runtime in java,
which is what jythonc leans on. Of course You could not use such a
technology to get a python runtime in java itself.


> I think that
> it is much easier to debug the translator when its output is java. But I
> agree this is not the "best" approach in terms of performance / precision.
>
> But anyway, why should we care about generating byte-code if the java
> compiler does it for us ?
>
> Bye,
>
> On 4/3/06, *Yan Weng* < [hidden email] <mailto:[hidden email]>> wrote:
>
>     Hi Laurent,
>
>     I guess we can't avoid "python 2 java" translator anyway. The
>     current Jythonc approach is just a source to source translator. If
>     we want a true "compiler", we have to translate the Jython AST to
>     java byte code.
>
>     BTW, I feel deployment and compiler are two relative weak areas of
>     Jython. But that may just be my personal feeling.
>
>     Best regards,
>
>     Yan
>
>
>
>     On 4/3/06, * Laurent Ploix* <[hidden email]
>     <mailto:[hidden email]>> wrote:
>
>         Hi,
>
>         Jython and Pypy is interesting, but here are some clarifications
>         (correct me if I'm wrong).
>
>         Writing Jython with Pypy would _not_ mean writing Jython in
>         Jython. Here is what that woud be :
>
>         Pypy projects contains :
>         - A python tp <other language> translator (C, for instance)
>         - A python interpreter, written in python
>         ...and the first python code that you want to translate in
>         <other language> is the python interpreter itself.
>         ...so you have a python interpreter (witten in python but
>         translated to <other language>) which runs your python code.
>
>         So, you may want to create a "python 2 java " translator. That
>         woud enable your python interpreter (written in python) to be
>         translated in Java, then this "java" python interpreter woud be
>         able to execute python code. (By the way, there are funny people
>         that just try to interpret... the interpreter again... to
>         interpret python code, life is so funny !)
>
>         But it would not be "java-integrated" as Jython is, not without
>         a lot of work.
>
>         I personnaly think pypy is the right very long term approach,
>         but I think the current Jython approach is the right one on the
>         short term. The main point is that the Pypy approach enables you
>         to have a single python code for your interpreter, whatever the
>         targeted language (where it will be translated). Modifying the
>         interpreter behaviour becomes much easier. And the integration
>         with the targeted language becomes an isolated problem for each
>         language (which does not mean it is not a BIG issue anyway).
>
>         But working on a "python 2 java" translator would be complex,
>         not to mention the java integration !
>
>         2 cents, again,
>
>         -----Message d'origine-----
>         De : [hidden email]
>         <mailto: [hidden email]>
>         [mailto:[hidden email]
>         <mailto:[hidden email]>] De la part de
>         Leo User
>         Envoyé : jeudi 30 mars 2006 17:45
>         À : [hidden email]
>         <mailto:[hidden email] >;
>         [hidden email]
>         <mailto:[hidden email]>
>         Objet : [Jython-users] What are the implications of Jython going
>         PyPy?
>
>
>
>         howdy,
>
>         I just thought Id toss this out in the open since Ive
>         seen some talk about Jython becoming implemented like
>         PyPy.  First off, I don't know much about PyPy but
>         from the sounds of it, its about implementing Python
>         in itself.  I guess having Jython do the same thing is
>         to have Jython be implemented in itself.  So this
>         comes to my big question:
>         What would going in that direction mean for tools
>         built on top of Jython.
>
>         Ive got 2 classes of apps in mind:
>         1. Those that just use Jython as Jython.  jyleo, for
>         example.
>         2. Those that build using the Jython classes.  jyleo's
>         JythonShell is an example here.  Its pure Java and
>         uses alot of Jython's Java classes to acheive its
>         integration.
>
>         Im surmising a goal of going PyPy would be to make #1
>         class apps work fine.  But what are the implications
>         of #2?  Does my valuable code suddenly become a thing
>
>         that can't jump into the future?  Granted there will
>         probably be work between jython version to jython
>         version to have it work.  I had to do some recoding to
>         get it to work from jython 2.1 to jython 2.2.
>
>         What about other Java apps that embed Jython in
>         themselves and do like the JythonShell does and uses
>         Jython's Java classes?
>
>         thanks!
>         leouser
>
>         __________________________________________________
>         Do You Yahoo!?
>         Tired of spam?  Yahoo! Mail has the best spam protection around
>         http://mail.yahoo.com
>
>
>         -------------------------------------------------------
>         This SF.Net email is sponsored by xPML, a groundbreaking
>         scripting language
>         that extends applications into web and mobile media. Attend the
>         live webcast
>         and join the prime developer group breaking into this new coding
>         territory!
>         http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
>         <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642>
>         _______________________________________________
>         Jython-users mailing list
>         [hidden email]
>         <mailto:[hidden email]>
>         https://lists.sourceforge.net/lists/listinfo/jython-users
>         < https://lists.sourceforge.net/lists/listinfo/jython-users>
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Fwd: TR : [Jython-users] What are the implications of Jython going PyPy?

Samuele Pedroni
Yan Weng wrote:
> Samuele,
>
> Thank you for your input. I did think writting the Java bytecode
> translator for PyPy before. I even checked out the pypy code and studied
> it. However, from what I saw, PyPy is not production ready right now.
> Going to PyPy seems a little bit early for Jython right now.
>

yes, seriously experimenting with PyPy toward a reimplemetation of
Jython would make sense only from a more stable and resourceful
situation, with a released Jyhton out, with a sufficiently complete set
of current CPython core features, and with at the minimum the ability to
make bug fix releases as nedeed. PyPy cannot solve Jython maintaince
short term.

While PyPy can reduce the maintaince efforts long term and open
new possibilities, it would need an experimentation phase,
and quite a up front effort.


Laurant Ploix wrote:
 >There is a important issue here : who could help creating the Pypy
 >version of Jython ? How large does the community needs to be ?

well you would need people with expertise both in PyPy and Jython.

Writing a backend may require 2-3 man-months. (An open source
contributator has started playing with a CLI backend recently,
there are probably lessons to be acquired there, although
whether this will go all the way to a production CLI backend is a
different matter.)

A functioning if not completely complete Jython based on PyPy
would require some further 3-4 man-months if no show-stopper
appears. This estimate assumes trying to write as much as possible
of glue code in pure Python instead of Java. Reusing current
Jython code would be maybe possible only if this has been
cleaned up first.

These are estimates based on the time it took to write the production
backends in PyPy.


While the backend needs to be fully there to start experimenting
the rest can be done progressevily.


One thing to keep in mind is that a first way to use PyPy with the
current Jython instead of substituing everything, once the backend is
there, would be to regenerate some of the modules (like sre) from PyPy code.

In the context of the PyPy project we likely intend to work on
technology such that from a single (R)Python source for a module
versions both for PyPy and CPython can be derived by translation.
These techniques could be re-applied to Jython too.


This is just to give an overview of the situation and efforts possibly
involved, it is not proposal or a nudge. I think things are premature
from both PyPy and Jython side at the moment. OTOH playing with PyPy and
Java bytecode generation would already be worthwhile if someone has time
to invest.


regards.







-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Jython-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-dev