IronPython is a new Python implementation targeting the .NET and Mono platforms. It is now available as Open Source Software on a single zip file containing both the source code and the binary executables. On other Python news, here is an example on how to use PyGame.
Edd wrote about it earlier today as well:
http://usefulinc.com/edd/blog/2004/7/29#00:28
Looks pretty neat!
http://www.python.org/pycon/dc2004/papers/9/
Finally.
I can’t wait until Mono matures a bit more (performance optimizations and such) and more compilers are written for other languages to the CIL.
It’d be nice to just have one runtime for all the languages on my system. Right now you have so many different interpreters and VM it just seems like a lot of duplicated effort and wasted RAM.
So instead of having wish (tcl interpreter), perl, python, java etc etc running on my system I could just run the Mono VM for all those programs.
Go Mono!
that would rock.
I would assume it work work on Mac OS X, that is, if you can install Mono on it.
Mono is pretty cool, but I’m still hoping that Parrot will meet all our dynamic language VM needs.
http://www.parrotcode.org/
I really think that the everything-can-be-its-own-opcode design choice in parrot will limit its adoption
First you should hope that they actually bang out something producable within the decade!
Looks like the Parrot folks are actually moving along fairly well on producing a working Python implementation. At this point it looks like they’re building a bytecode translator, rather than trying to build a compiler from scratch, and this approach seems to make the most sense. The compiler used by the C implementation of Python is ging to produce far more optimized Python bytecode than anything hacked together from the ground up.
Parrot seems to be a very nicely compartmentalized approach to a virtual machine. Each part of the system has a very specific goal, and I see that increasing the adoption of Parrot, not hindering it. You can keep your heavily optimized tool for generating bytecode, then allow the translator to turn that into highly optimized Parrot bytecode.
Parrot is years off (if ever) from being production-ready. The odds that Parrot will ever be taken seriously compared to the CLR or the JVM are slim and none.
Hopefully, history demonstrates you overly pessimistic. O’Reilly is just updating the Perl6 internals book…
Mono runs on OSX, so IronPython should run there as well.
Quite impressive the momentum Python is getting lately…it could become the base of an open-source killer platform one day.
I just tried IronPython on both .Net 1.1 and Mono 1.0 and it worked straight away, including the Windows.Forms and GTK sample…sweet!!
I mean, open-source “killer platform”, in case someone thinks I want open source to be killed
This thing is awesome!!!
now is possible write apps in c# and reuse it with ironpython.
sample sweet
actually the parrot guys implemented 4 tests out of 7 for the pie-thon in just 5 weeks and they got them running beetween 1 and 3 times faster than CPython (see the archives of perl.perl6.internals).
BTW the devil is in the details, so I wont tell that parrot will outrun other VMs but given that parrot is approaching a mature state I hope well.
Plus, I love the choice of having a nativre calling interface that avoids dwelling in C to write bindings (modeled over Ruby/DL / python’s ctype)
The Perl team is hard at work on Parrot. It will most likely be another year or two until completion. You never know though, they have some really good programmers working on it.
hey tha latest release of parrot is date 10 feb 2004
i think that this vm is a vapourware for geeks….
I have seen Parrot posts both here and at Slashdot for quite a while, but never bothered to check out the language until today.
I followed one of the Parrot links posted here and perused some of the Parrot example code. My first impression (based solely on syntax) is uncontrollable retching. It looks like the unfortunate offspring of a coital union between Basic and Assembly.
I’ve downloaded IronPython for take first impressions on it but i have a question…
is possible to compile a python script in CIL ?
if yes how can do it ?
thanks
I don’t have IronPython here right now, but have you tried to run “ironpythonconsole <filename>” against a python script file, and see what you’ll get?
@Clinton
My first impression (based solely on syntax) is uncontrollable retching. It looks like the unfortunate offspring of a coital union between Basic and Assembly.
That’s because you aren’t meant to write code in Parrot. You’re meant to write code in Perl 6 or Python and have Parrot be the backend silly
“I don’t have IronPython here right now, but have you tried to run “ironpythonconsole <filename>” against a python script file, and see what you’ll get?”
Yeah i’ve tried mono IronPythonConsole.exe script.py
and it produces a nice __main__.exe assembly
I just tried IronPython on both .Net 1.1 and Mono 1.0 and it worked straight away, including the Windows.Forms and GTK sample…sweet!!
Welcome to .NET. ;0
/me loves concept of being able to access .NET’s wonderful array of libraries without actually having to write a wrapper everytime he changes languages.
“”I don’t have IronPython here right now, but have you tried to run “ironpythonconsole <filename>” against a python script file, and see what you’ll get?””
“Yeah i’ve tried mono IronPythonConsole.exe script.py
“and it produces a nice __main__.exe assembly
You should be able to disassemble the assembly to CLI thought it probably not quite whe the you’d prefer. Don’t know ironpython so there may well be a better way fo doing it.
I have somewhere near zero free time, and have always wanted more just to play with Pygame. It makes game development easy enough for me to have fun with (granted, so far all I’ve done is make a guy walk around the screen, but hey, I never got near that far trying to do such things in C / SDL!).
I’m currently away from my home computer, so my actual testing of IronPython will have to wait, but I must say I’m very encouraged by the comments on this discussion post so far.
Can you believe IronPython, Jython and AspectJ are all created/co-designed by this one guy, Jim Hugunin? Amazing. And amazing to see such talent being contributed to the Open Source community. Thanks, and way to go!
I also want to give a ‘shout out’ to the contributors at ParrotCode. I appreciate the contributions of the Perl community and their affiliate communities. Perl is what got me started with the so called ‘scripting languages’ in the first place.
As per Parrot’s progress, certainly it seems to lack the time in the spotlight that Mono has been getting. Nonetheless, there’s news from Dan Sugalski’s Blog, Squawks of the Parrot: http://www.sidhe.org/~dan/blog/ for those who want to keep in the know. Reading the most recent entries, it’s hard to tell how ‘alive’ the project currently is, but knowledge and the quest for learning can sometimes be reward enough in themselves.
Read his comments on http://www.ironpython.com/:
…”I found the CLR to be an excellent target for the highly dynamic Python language… The more time that I spent with the CLR, the more excited I became about its potential… I’ve decided to join the CLR team at Microsoft beginning on August 2… My work with Python should continue …. I will also reach out to other languages to help overcome any hurdles that are preventing them from targeting the CLR effectively. I welcome any and all feedback about how to best accomplish this”
All of this sounds extremely encouraging to me. Way to go Jim! Good luck at your new job next week.
I have so much fun with this tutorial that I actually created a small game yesterday night:
http://www20.brinkster.com/rodviking/spacinvaders/
PyGame is fun, Python doubly so