7 ms·
PyJVM – JVM in Python
- sanxiyn 13y agoIf JVM is your thing, Doppio is a JVM in TypeScript. https://github.com/int3/doppio https://github.com/int3/doppio
- sitkack 13y agoOr a pure Lua JVM https://cowlark.com/luje/doc/stable/doc/index.wiki https://cowlark.com/luje/doc/stable/doc/index.wiki
- JasonFruit 13y agoI am usually fine with "because we could" as a justification, but . . . why? It's like making a hamburger out of lobster, Kobe beef, and truffles.
- maxerickson 13y agoGoogle that burger. I would label it a stunt, but it is something that someone has made. Edit: The moderately less farcical versions don't seem to mix the lobster and truffles.
- JasonFruit 13y agoOkay. Wow. Things like that are a little outside my experience, but I think my point stands, perhaps even enhanced a little.
- a3n 13y agoWhy: https://github.com/andrewromanenco/pyjvm/blob/master/WHY.md https://github.com/andrewromanenco/pyjvm/blob/master/WHY.md
- astrosi 13y agoNot quite a burger but Tournedos Rossini [1] exists. This is a fillet steak topped with foie gras and served with black truffles. [1] http://en.wikipedia.org/wiki/Tournedos_Rossini http://en.wikipedia.org/wiki/Tournedos_Rossini
- stcredzero 13y agoThat sounds awesome in its own way. You could probably make millions in Houston with a restaurant featuring that.
- shellac 13y agoFinally, the terseness of Java combined with the speed of python.
- ville 13y agoCan we run Jython on it? Why? Just because. EDIT: Also if it can run on Jython that would make a nice full circle. EEDIT: Looks like it requires Python 2.7 so this might not be the case (yet).
- rectangletangle 13y agoI can see it now PyJVM --> Jython --> PyJVM --> Jython ... It reminds me a bit of LISP interpreters that are mostly/entirely written in LISP.
- antocv 13y agoI would rewrite the title to read "JVM in Python".
- St-Clock 13y agoThat's an interesting take of the Python and Java relationship and although it complements well the landscape (with Jython, JPype, Pyjnius, and Py4J), I'm not sure what the need is. (shameless plug warning) When I created Py4J (http://py4j.sourceforge.net/ http://py4j.sourceforge.net/), I wanted to decouple the two ecosystems as much as possible so that both could evolve independently. There is no jni, no re-implementation of bytecode or interpreter, just plain sockets working on linux, mac, windows and most versions of Python and Java.
- sgt 13y agoWhat is a use case for this?
- stevoski 13y agoThere isn't one. More helpfully, the author describes it as a learning experience. How to implement a stack-based virtual machine in Python.
- kyllo 13y agoYou are using a computer that has Python installed, but not Java (perhaps for security reasons). But you need to run some Java code.
- danfitch 13y agoSo I have to wonder.... why? If I was you I would put the link to https://github.com/andrewromanenco/pyjvm/blob/master/WHY.md https://github.com/andrewromanenco/pyjvm/blob/master/WHY.md front and center. That's great that it was done for academic purposes but I didn't understand that from the main page.
- 1ris 13y ago>Requires python 2.7 Why? It's dead, accept it.
- ihsw 13y agoDead? Python 2.7 seems to be Good Enough(TM) for much of the industry titans that I don't think we'll ever see widespread Python 3.x adoption within the heavy-weights' infrastructure. Python 2.7 is far from dead, and the changeover to Python 3 seems to be similar to Perl5->Perl6 -- or, more to the point, not happening at all.
- chris_mahan 13y agoWindows XP still seems to be Good Enough for the industry titans. (My desktop machine is still XP, due to move to win7 in the next few days, granted, but I'm typing this on XP)
- rch 13y agoNot exactly - I see it happening sporadically based on the expected longevity of the project, more this year than last.
- 1ris 13y agoPython 2.7 is still dead. >Short version: Python 2.x is legacy, Python 3.x is the present and future of the language >Python 3.0 was released in 2008. [6 years ago] The final 2.x version 2.7 release came out in mid-2010 [4 years ago], with a statement of extended support for this end-of-life release. The 2.x branch will see no new major releases after that. 3.x is under active development and has already seen over four years of stable releases, including version 3.3 in 2012. The next release is the upcoming Python 3.4 in early 2014. This means that all recent standard library improvements, for example, are only available by default in Python 3.x. https://wiki.python.org/moin/Python2orPython3 https://wiki.python.org/moin/Python2orPython3 There is still software for DOS around, and DOS is still dead.
- GFK_of_xmaspast 13y agoshit works, yo, and python can only blame itself for so many people (myself included) remaining with 2.7.
- migrantgeek 13y agoThere's a lot of questioning about why someone would do this. Why can't someone just write for fun? Does everything now have to be "disruptive" and commercially viable?
- stevoski 13y agoA few years ago I wrote a Java decompiler. Not to actually decompile code but to learn how to use my weapon of choice (Java) at a deeper level. I never finished. The only code I ever bothered decompiling was code I had written to test the decompiler. But I learnt a heck of a lot about how the JVM works, about Java byte code, and about some data structures and analysis. And I learnt exactly how the Java class file is defined. It is something I'd highly recommend trying for your language of choice.
- arjn 13y agoExactly, just do it for fun. Much can be learned and created that way.
- paperwork 13y agoThis is something I have been trying to find the time to do. Something like this is great to learn how the JVM actually works, and can improve the way you code Java. I always found it incredibly boring to read language/vm specs but building something like this makes the abstract and obscure, concrete (at least for a programmer's brain)
- phleet 13y agoIt's definitely totally fine to build these things for fun, but with a landing page like this, it seems like the author built it for some purpose beyond that, otherwise I don't see the point in presenting it in this form. If the author wanted to learn _and_ get publicity, a blog post or at least including a "why" section that says "just for fun" on the landing page would seem suitable to me. There probably is some interesting motivation for doing this, it's just not clear what it is.
- daenz 13y ago
- avaku 13y agoThis can be stacked in multiple levels, cool :) JVM on Python on JVM on Python on JVM...
- mindcrime 13y agoNeeds Parrot and Javascript in there somewhere though, for maximum coolness factor.
- stcredzero 13y agoDoes anyone make a JVM that can save its memory image in the style of Smalltalk and Lisp VMs? This would give a potential solution to the Clojure startup time problem. (There was a JVM on Smalltalk named Frost.)
- rooted 13y agoCheck out drip?
- stcredzero 13y agoI'm using it. It cut the startup time in half. Saved memory images could do much better.
- Edmond 13y agoOn the flip side there is Python on the JVM :) http://crudzilla.com/assets/img/info-graphics/lang-demo.gif http://crudzilla.com/assets/img/info-graphics/lang-demo.gif
- rguldener 13y agoAnd if I recall correctly Graal, the next generation Java JIT Oracle is working on is also working on Python support. By far not there yet but pretty cool to see them take their compiler efforts beyond Java.
- interknot 13y agoAFAIK this refers to ZipPy: https://bitbucket.org/ssllab/zippy https://bitbucket.org/ssllab/zippy
- Sir_Cmpwn 13y agoProgrammers add abstractions just as fast as Moore's Law adds speed.
- joshuacc 13y agoI think you underestimate how quickly programmers can add abstractions.