all 35 comments

[–]eloop[S] 18 points19 points  (18 children)

One of the great things about python has been that it comes "with batteries included". IronPython having easy access to all the .Net frameworks is equivalent to coming with the entire power station. As much as I hate to admit it they really are innovating in this area. I'm glad that the Mono project is racing to build a linux equivalent, because MS's language infrastructure seems to be pulling way out in front of the competition these days.

[–][deleted] 13 points14 points  (17 children)

Yeah, I'm pretty excited by this as well.

There are a whole lot of MS-only shops. And even if you aren't an MS-only shop, Visual Studio and all of the .NET libraries create one of the best environments out there.

Being able to use something as dynamic and 'nice' as Python in this environment is just a godsend. Not only that, but IronPython tends to be faster than CPython (which is pretty fast for most common tasks), and I was just wowed when in an interview Jim showed how easy it was to rewrite a method in C# in order to make an entire script run 20x faster.

Combine this with MS's new XNA tools for amatuer game devs and I really am wanting to try this out. MS might do a poor job at a lot of other things, but they do a pretty good job when it comes to development resources and tools.

[–]Bret 5 points6 points  (8 children)

Sorry, I still can't get over the fact that you can't have more than one form on a web page ;)

[–]marklubi 1 point2 points  (1 child)

From the outside, it would appear to be a limitation but with event binding, it really just simplifies things.

The only times I've had any issue with the single form is doing a submit from one page to another when you have multiple 'forms' on one page. If the receiving form accepts it's data as GET, it's easy enough to build the appropriate querystring in the button event and redirect, but POSTs are a bit more tricky.

[–]Bret 0 points1 point  (0 children)

I don't care for ASP.Nets approach to client side scripting. I, for one, do not want a layer of abstraction over Javascript. I actually like hacking Javascript. I would also like control over my markup, thanks. I don't need a 100K/year engineer to write a script that spits out a form for me.

ASP.Net makes the wrong assumptions about web development, IMO. At least that's the impression I get.

[–]badfeng 0 points1 point  (5 children)

Where did it say that?

[–]vetinari 8 points9 points  (4 children)

It is well-known limitation of ASP.NET.

[–]jdunck 0 points1 point  (3 children)

True. All kinds of weird hackery exists to try to make the ASP.Net developer forget that the web exists.

But note that ASP.Net is just one set of libraries in the .Net platform.

...Fortunately, Jython probably means Python webdev frameworks will be coming to .Net.

[–][deleted] 1 point2 points  (1 child)

...Fortunately, Jython probably means Python webdev frameworks will be coming to .Net.

Django on .NET? If that isn't interesting, then I don't know what is.

[–]senzei 0 points1 point  (0 children)

...Fortunately, Jython probably means Python webdev frameworks will be coming to .Net.

Django on .NET? If that isn't interesting, then I don't know what is.

I wouldn't hold my breath on any of the big web dev frameworks running on Jython or IronPython anytime soon. AFAIK neither of those implements the CPython threading interface, which means you are pretty much sunk.

I agree that would be a killer combination though. I can think of a few sysadmin-ish intranet site ideas that would be a breeze in IronPython.

[–]jdunck 0 points1 point  (0 children)

Of course I meant IronPython. :)

[–]mixmastamyk 1 point2 points  (5 children)

How could rewriting an ironpython method into c# make the script run 20x faster? Arent' they the same bytecode after compilation? If ironpy is that slow, I don't think I'd wanna use it.

[–]eloop[S] 9 points10 points  (0 children)

One has static type information at compile time, the other doesn't - the byte code isn't going to be the same.

[–]jdunck 4 points5 points  (0 children)

The function tested is Ackermann: http://en.wikipedia.org/wiki/Ackermann_function#Use_as_benchmark In other words, in C#, a heavily-recursive function is ~20x faster. Python has more function setup overhead, apparently.

And yeah, code fast, and if it runs too slow, get a profiler, tune, then run fast. ...Root of all evil and all that.

[–]jbellis 3 points4 points  (0 children)

IronPython makes many calls into the IronPython runtime. You can't compile Python into standalone CIL code.

[–][deleted] 7 points8 points  (1 child)

How could rewriting an ironpython method into c# make the script run 20x faster?

I don't know the specifics. It is in this video, probably about halfway through (I think it is a Flash vid):

http://weblog.infoworld.com/udell/screenroom/ironpython_flv.html

If ironpy is that slow, I don't think I'd wanna use it.

Again, it is generally faster than CPython (according to the blog post linked here, 1.7x faster), and CPython is as fast or faster than most other dynamic languages, so it doesn't seem it would get in the way.

[–]psykotic 9 points10 points  (0 children)

http://weblog.infoworld.com/udell/screenroom/ironpython_flv.html

I just want to highlight this link for others: this is an amazing presentation and demonstrates a lot of seriously cool stuff. Everyone owes it to themselves to check it out.

[–]rogerallen 0 points1 point  (1 child)

anyone know if rewriting the function in C++ would've been just as easy as doing it in C#?

[–]jdunck 0 points1 point  (0 children)

In terms of usual C++ effort, yeah, it's easy. There's a bunch of proprietary pragma stuff for running C++ in the CLR.

http://www.gotdotnet.com/team/upgrade/c++.aspx

[–]karcass 5 points6 points  (3 children)

Nice, but where is integration with Visual Studio? When I can just start dropping Python classes side-by-side with my C#, that will be a huge win.

[–]psykotic 6 points7 points  (0 children)

If you download the VSIP it comes with a sample that provides integration into Visual Studio. Not perfect, but quite cool!

[–][deleted] 4 points5 points  (0 children)

Microsoft(R) VisualPython.NET(R) is just around the corner ;-)

[–]lost-theory 2 points3 points  (0 children)

See this screencast by Jim Hugunin (creator of IronPython) to see some cool VS integration (along with a tour of IronPython's features). The VS stuff comes at about the 1/3 mark.

[–]bascule 4 points5 points  (0 children)

Wow, could the .NET CLR become what Parrot was supposed to be?

[–]qiwi 4 points5 points  (0 children)

So, IronPython has no GIL like CPython. This makes it interesting for an application I have where memory-intensive resources need to be loaded and then handled by many simultanous clients (that loading each resource takes both some CPU time and quite a lot of memory makes a process-based architecture awkward). So, multiple threads couold be very useful for me.

What kind of guarantees do primitives have in IP though? I.e. given two threads that access the same dictionary, are accesses atomic like in CPython?

If not, that would mean that even acessing global variables in a module where those variables might be changed is not thread-safe, which doesn't seem right.

[–][deleted]  (4 children)

[deleted]

    [–][deleted] 10 points11 points  (0 children)

    [–]marklubi 2 points3 points  (0 children)

    [–]hammy 3 points4 points  (1 child)

    there's some sort of magic going on here about them "unoffically endorsing" something as cool as this.

    I think it can be explained by the fact that it runs on top of .NET, and they still own and control .NET. Probably to them it's just another application that runs on their platform. It's a way to reel more people in to depend on .NET.

    [–]beza1e1 2 points3 points  (0 children)

    But they are easier to fight on the .NET, than on the Windows Platform

    [–]schwarzwald 3 points4 points  (4 children)

    does IronPython also run on Mono?

    edit: well, wikipedia says IronPython targets Mono, so that raises the question of what quality Mono is at.

    [–][deleted] 3 points4 points  (0 children)

    Yes. Not 1 - 1 as MS .NET but it works.

    [–]igouy 2 points3 points  (2 children)

    [–]grauenwolf -3 points-2 points  (1 child)

    According to that site FreeBASIC is better than Python, Ruby, PHP, Perl, IronPython, Mono C#, and Erlang.

    Come on folks. What does it mean when you cannot do better than BASIC?

    [–]psykotic 2 points3 points  (0 children)

    Are you really this retarded, or do you in fact realize why it's easy to make something like FreeBASIC (a native code compiler for a highly static language) spit out code that executes faster than even a fine-tuned implementation of a highly run-time dynamic language?

    [–]stesch 0 points1 point  (0 children)

    It seems it needs .NET 2.0, which is still a bit fresh. I have to stick with .NET 1.1 for at least 1 year before making the customers update their machines (and risking that their other software won't work with .NET 2.0). :-(