473,748 Members | 2,398 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1617
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*********@ac m.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********@gmai l.com
mail: ca********@yaho o.com
Jul 18 '05 #4
Maurice LING <ma*********@ac m.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.or g> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
Jul 18 '05 #5
Maurice LING <ma*********@ac m.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*********@ac m.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***@dalkescie ntific.com
Jul 18 '05 #9
Maurice LING <ma*********@ac m.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

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

Similar topics

59
4339
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 HTML version is much more readable than the ReST version. See: http://www.python.org/peps/pep-0322.html
4
4560
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 has almost all of it public methods Java synchronized: > > http://cvs.sourceforge.net/viewcvs.py/jython/jython/org/python/core/PyStringMap.
6
2109
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 generous enough to make the two languages possible, that, well, they're kinda different. I guess it was inevitable, but with Jython stuck at Python 2.1, it's not really the same language as CPython is today. You still have to type "from __future__...
4
3427
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
2296
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 mode as shown below:
12
5922
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 says: usage: java fit.FitServer host port socketTicket -v verbose I think this is because I do not understand the jython mechanism for inheritance (yet).
3
2573
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 developer site at Sourceforge. However nothing has been released for over a year (i.e. no support for Python 2.3, 2.4 or 2.5). Is seems that IronPython may have a better future than Jython. I know this is a bit of a troll but I'm concerned about...
4
2044
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 default /root/jython2.2 directory. The install went without issues. However, typing ............jython --version in a teminal still gives me ........ Jython 2.1 on java (JIT: null)
5
3609
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
8991
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8830
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9544
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9372
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9324
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6074
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4606
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2783
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2215
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.