473,326 Members | 2,815 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

reverse Jython

Hi,

I'm looking for a suitable thesis topic, so I hope that I can gather
some advice on this area that I'm thinking of.

Jython appears as a relatively successful attempt to bridge Python to
Java and I find that the best part is that it can convert Python codes
into Java codes. As said in the webpage, it is a python interpreter
written in Java. I am wondering if it is worth reversing this, that is,
a Java interpreter implemented in Python?

A Google search comes up with JPI and PyJava.

Is this still a viable area to look into or it is too done?

Any suggestions?

Thanks
Maurice
Jul 18 '05 #1
11 1580
Hi Maurice
I am wondering if it is worth reversing this, that is, a Java interpreter
implemented in Python?


Why?

Jython makes sense because you free Python usage from C compilation and
platform issues (regarding extension modules) while still providing
acceptable runtime performance.

The other way round would not cure or help anything.

If you need an interesting topic: why not write a just-in-time compiler
for Python?

There's already some interesting stuff in module "weave" and the pythonc
from Jython, but having a python interpreter use (say) gcc at runtime to
convert and probably optimize Python code to natively executable
binaries, you could speed up Python to the max.

Just my 2 cents,

Mark
Jul 18 '05 #2
Maurice LING schrieb:
Jython appears as a relatively successful attempt to bridge Python to
Java and I find that the best part is that it can convert Python codes
into Java codes. As said in the webpage, it is a python interpreter
written in Java. I am wondering if it is worth reversing this, that is,
a Java interpreter implemented in Python?


If you /ask/ if it's worth doing it, then maybe it is not worth doing it
for you?

I personally can't think of a use for such a system, but I know that it
would be quite an effort to get it running, though the JVM itself was
designed to be not that complex.

What would be the advantage over a bridge through the JNI?

Stefan
Jul 18 '05 #3
On Tue, 19 Oct 2004 05:48:56 GMT, Maurice LING <ma*********@acm.org> wrote:
Hi,

I'm looking for a suitable thesis topic, so I hope that I can gather
some advice on this area that I'm thinking of.

Jython appears as a relatively successful attempt to bridge Python to
Java and I find that the best part is that it can convert Python codes
into Java codes. As said in the webpage, it is a python interpreter
written in Java. I am wondering if it is worth reversing this, that is,
a Java interpreter implemented in Python?

A Google search comes up with JPI and PyJava.

Is this still a viable area to look into or it is too done?


If you dont' _need_ to include Java in your thesis, why not help with
PyPy? It's the Python interpreter written in Python. It's regarded as
a important piece of software for experimentation with the Python
language itself. Give it a look:

http://codespeak.net/pypy/index.cgi?home

p.s. There is a rumour that the PyPy team secretly believes that they
can make it run *faster* than CPython. Does it makes it a good thesis?
;-)
--
Carlos Ribeiro
Consultoria em Projetos
blog: http://rascunhosrotos.blogspot.com
blog: http://pythonnotes.blogspot.com
mail: ca********@gmail.com
mail: ca********@yahoo.com
Jul 18 '05 #4
Maurice LING <ma*********@acm.org> writes:
Perhaps I am dreaming of a world that anything can be written in any
programming language (even multiple languages in a same
script... how many times we get questions like... Can Python do
____?) and run on any machines with similar efficiencies... But
then, maybe reversing the Tower of Babel is impossible...


I thought we were already there. Every language I know of talks to C,
so you can glue multiple languages together with C. I once did a
project that had a single program that included FORTRAN, C, Python and
TCL code.

<mike
--
Mike Meyer <mw*@mired.org> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
Jul 18 '05 #5
Maurice LING <ma*********@acm.org> wrote:
Mark Asbach wrote:
If you need an interesting topic: why not write a just-in-time compiler
for Python?

There's already some interesting stuff in module "weave" and the pythonc
from Jython, but having a python interpreter use (say) gcc at runtime to
convert and probably optimize Python code to natively executable
binaries, you could speed up Python to the max.

I think another issue here is that Python bytecode is not stable, as
everyone had said it. So unless a specification on that is present,
implementing JIT compiler for Python is futile... in my opinions.


Nah - just call it "a JIT compiler for Python 2.4". If there are minor
bytecode changes in 2.5, it will be correspondingly minor to adjust the
JIT. And you can start with the body of work (previous art) already
present in psyco and in the pypy project -- indeed since they're open
source you can build on top of either or both; psyco's dormant, but
pypy's quite active and you may end up fruitfully cooperating with pypy
people (we _ARE_ extremely open to community participation!!!) among
which is Armin Rigo, psyco's author. pypy minimizes issues due to
unfamiliarity with C -- it uses pyrex as a backend.

If you're keen to remain in the Java/JVM world for whatever reasons,
there may be interesting work in helping complete Jython _AND_ ensuring
it cooperates smoothly with JVM JIT's (I hear it doesn't, so far, but
this IS just hearsay -- I know nothing of the issue). Not sure this is
easy to package up as a thesis topic. Another possibility would be to
work on Python/Eclipse integration -- there's quite a lot of previous
art and some projects may be ongoing, but that is one extremely useful
wide set of tasks which look like they'd be suitable for packaging up a
thesis topic from.
Alex
Jul 18 '05 #6
Maurice LING <ma*********@acm.org> wrote:
...
MacClaren and trying to catch it...... This is why although PyPy is an
important piece of work and by achieving that (even slower than Jython)
will be a proof of concept of python's completeness, it is not quite
suitable as an part of academic work. Not to mention that it is near
impossible to get developers' documentation (the rationale behind each
function and classes)......


The latter is an aspect on which we _definitely_ plan to do much better
in the future, btw -- we have ambitious projects for dissemination of
information, enhanced documentation, easing the use of pypy for all sort
of teaching and research support. But that doesn't resolve your issue
wrt the "suitable as part of academic work" (=="detached from real-world
usefulness"); we definitely DO plan to be real-world meaningful!-)
Alex
Jul 18 '05 #7
The latter is an aspect on which we _definitely_ plan to do much better
in the future, btw -- we have ambitious projects for dissemination of
information, enhanced documentation, easing the use of pypy for all sort
of teaching and research support. But that doesn't resolve your issue
wrt the "suitable as part of academic work" (=="detached from real-world
usefulness"); we definitely DO plan to be real-world meaningful!-)


Please don't get me wrong. Academic work need not be detached from
real-world usefulness, in fact, academic work should have the potential
to solve real-world problems. I guess it is the time. I think that
academics should tackle real-world issues when a self-sustaining level
of core competency is there. It is certainly more difficult to craft an
academic question out of a real-world situation than to craft one out of
nothing. The latter can even be a case of grabbing a hypothetical
question from a text-book...

maurice
Jul 18 '05 #8
Maurice LING wrote:
Please don't get me wrong. Academic work need not be detached from
real-world usefulness, in fact, academic work should have the potential
to solve real-world problems.


The trick is knowing which research has the potential.

The example I like best is research into primes. It had
over 2000 years of study before its practical use in
cryptography.

Was there another practical use of primes before the mid-1900s?
Neal Stephenson's Baroque Cycle suggests unique prime
decomposition was used as a basis for information management,
but I don't know if that was real, much less practical.

Andrew
da***@dalkescientific.com
Jul 18 '05 #9
Maurice LING <ma*********@acm.org> wrote:
The latter is an aspect on which we _definitely_ plan to do much better
in the future, btw -- we have ambitious projects for dissemination of
information, enhanced documentation, easing the use of pypy for all sort
of teaching and research support. But that doesn't resolve your issue
wrt the "suitable as part of academic work" (=="detached from real-world
usefulness"); we definitely DO plan to be real-world meaningful!-)


Please don't get me wrong. Academic work need not be detached from
real-world usefulness, in fact, academic work should have the potential
to solve real-world problems. I guess it is the time. I think that
academics should tackle real-world issues when a self-sustaining level
of core competency is there. It is certainly more difficult to craft an
academic question out of a real-world situation than to craft one out of
nothing. The latter can even be a case of grabbing a hypothetical
question from a text-book...


Hypothetical questions in good textbooks can be great ways to lead one
onto new ways of thinking, that's for sure.

But... it's said that Plato was once asked by a student, what good was
all this geometry they had to study (Plato made all students study
geometry first, as the best preparation of the mind for philosophy).
Plato called a slave and instructed him to give the student a gold coin
then throw the student out of the school.

There remains in academia an unconfessed sympathy for the Greek
position, exemplified by this anecdote, that real scholarship
_shouldn't_ be "good for something" -- it should be far from the grubby
preoccupation of everyday life, and in its own idealized spiritual
sphere. Nobody in academia will speak this out loud, but, it IS, to
some extent, still in the background.

That's why some of us aren't in academia, often having tried it but
found it wanting, partly because of that. The concept of something I've
done being actually practically useful to some people in their everyday
work, in their everyday life, is too important for me to give up.
Doesn't mean I can't explore blue-sky notions, but there's gotta be some
kind of hope that -- at least if I get real lucky and everything comes
out just right -- it WILL be useful. That's why I'm an engineer, not a
scientist, I guess;-).
Alex
Jul 18 '05 #10
Alex Martelli:
There remains in academia an unconfessed sympathy for the Greek
position, exemplified by this anecdote, that real scholarship
_shouldn't_ be "good for something" -- it should be far from the grubby
preoccupation of everyday life, and in its own idealized spiritual
sphere. Nobody in academia will speak this out loud, but, it IS, to
some extent, still in the background.


Some are in academia in part because it's easier to fail,
or at least fail in interesting ways. I don't mean that
derisively. Consider someone doing work in biochemistry
or genetic research where there are many fundamental
problems that need to be addressed and novel instruments
created before figuring out if a given approach is "good
for something."

It's harder for non-academics to justify this sort of
exploratory work.

BTW, I happen to believe too much basic research is shifted to
academic labs and I complain that as a consequence in the US
it means a single person, the president, can decide that
certain fields of research are prohibited.
Andrew
da***@dalkescientific.com
Jul 18 '05 #11
But... it's said that Plato was once asked by a student, what good was
all this geometry they had to study (Plato made all students study
geometry first, as the best preparation of the mind for philosophy).
Plato called a slave and instructed him to give the student a gold coin
then throw the student out of the school.

There remains in academia an unconfessed sympathy for the Greek
position, exemplified by this anecdote, that real scholarship
_shouldn't_ be "good for something" -- it should be far from the grubby
preoccupation of everyday life, and in its own idealized spiritual
sphere. Nobody in academia will speak this out loud, but, it IS, to
some extent, still in the background.
It reminds me of my convocation ceremony last year and a certain sense
of disbelieve when someone was conferred a PhD in Arts for his work to
"study the numerous bloody scenes of Iliad by Homer." There is a notion
that academics lives in ivory towers...... But considering the life
histories of some philosophers, Immanuael Kant for example (I think),
he's born a nobleman......

I suppose pure mathematicians are still the subscribers to the ancient
notion of real scholarship, considering they do maths just to produce
more maths. Applied mathematicians are the ones that brought us computers...
That's why some of us aren't in academia, often having tried it but
found it wanting, partly because of that. The concept of something I've
done being actually practically useful to some people in their everyday
work, in their everyday life, is too important for me to give up.
Doesn't mean I can't explore blue-sky notions, but there's gotta be some
kind of hope that -- at least if I get real lucky and everything comes
out just right -- it WILL be useful. That's why I'm an engineer, not a
scientist, I guess;-).


I do find more and more academics subscribing to the concept of
real-world use (if lucky). Even though I am a scientist, I cant really
handle obscurity, working in my own sphere of my own creation.
Otherwise, I won't even have asked the question of "is it worth
reversing jython, to compile java into python?" in the first place. In
the notion of real scholarship, it is a nice thought, nobody had done it
or is doing it, why even question the validity...

maurice
Jul 18 '05 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

59
by: Raymond Hettinger | last post by:
Please comment on the new PEP for reverse iteration methods. Basically, the idea looks like this: for i in xrange(10).iter_backwards(): # 9,8,7,6,5,4,3,2,1,0 <do something with i> The...
4
by: Michael Chermside | last post by:
Ype writes: > For the namespaces in Jython this 'Python internal thread safety' > is handled by the Java class: > > http://www.jython.org/docs/javadoc/org/python/core/PyStringMap.html > > which...
6
by: Dave Benjamin | last post by:
Hey good people, I've been doing a lot of simultaneous Jython and CPython programming lately, and just wanted to say, with no intended ill will toward any of the individuals who have been...
4
by: angel | last post by:
A java runtime environment includes jvm and java class (for example classes.zip in sun jre). Of course jython need jvm,but does it need java class. Thanx
1
by: scott | last post by:
I installed darwinports and did a "sudo port install jython" ------------------------- scott$ which jython /opt/local/bin/jython ------------------------- Jython works in interactive...
12
by: Mark Fink | last post by:
I wrote a Jython class that inherits from a Java class and (thats the plan) overrides one method. Everything should stay the same. If I run this nothing happens whereas if I run the Java class it...
3
by: Sloan.Kohler | last post by:
Is Jython development dead or has it just seemed that way for over a year?. The jython.org website has a recent new appearance (but no new content) and there is some message traffic on the...
4
by: Neil Wallace | last post by:
Hi all, I am a novice Python/Jython programmer, and Ubuntu user. Ubuntu still only supports only version 2.1 of Jython. I have used the GUI installer of Jython 2.2, and installed it to the...
5
by: sarup26 | last post by:
Hello .. I would like to know more about Python and Jython? What is the difference between both of them? What is the future for Jython and which are the areas where it is used? Swot
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.