Slashdot Mirror


IronPython 1.0 is Born

dougblank writes "IronPython version 1.0 was just released after 3 years of development. Jim Hugunin, the creator of Jython and the lead developer of the Shared Source IronPython, made the birth announcement earlier this week. From the announcement: 'I wanted to understand how Microsoft could have screwed up so badly that the CLR was a worse platform for dynamic languages than the JVM... I found that Python could run extremely well on the CLR — in many cases noticeably faster than the C-based implementation. [...] Shipping IronPython 1.0 isn't the end of the road, but rather the beginning. Not only will we continue to drive IronPython forward but we're also looking at the bigger picture to make all dynamic languages deeply integrated with the .NET platform and with technologies and products built on top of it. I'm excited about how far we've come, but even more excited by what the future holds!'"

285 comments

  1. Yes, but.... by gnud · · Score: 5, Interesting

    ...does it run on Mono?

    1. Re:Yes, but.... by bogaboga · · Score: 2, Informative

      It technically could run or to be more precise, it could run with minor changes. My question though is:

      Is it as easy to learn as [Microsoft's] Visual Basic?

      Can it be used to create GUIs, add [business] logic to these GUIs as easily as VB?

    2. Re:Yes, but.... by Anonymous Coward · · Score: 1, Informative

      for awhile and then they use a new ms-only feature and it breaks and then mono implements the feature and it works, lather-rinse-repeat; one of the features of 1.1.17 was the ability to compile and run ironpython 1.0rc

    3. Re:Yes, but.... by Ana10g · · Score: 0

      Visual Basic? Easy to learn? I don't believe that these two statements belong in the same sentance. IMHO VB is a terrible tool to learn, as when used to teach programming fundamentals (as is often done with information systems students in business departments), it corrupts the student's understanding so grotesquely that often, they can never recover.

      --
      just an analog boy living in a digital age.
    4. Re:Yes, but.... by Ana10g · · Score: 2, Insightful

      One other thing. Visual Basic from Microsoft is an IDE, and their name brand for a language. IronPython is not an IDE, so, no, it probably cannot be used to create GUIs and add business logic as easily as VB.

      --
      just an analog boy living in a digital age.
    5. Re:Yes, but.... by Anonymous Coward · · Score: 2, Insightful

      He asked if it was as easy to learn as Visual BASIC, implying that Visual BASIC is easy to learn. He didn't say "Is as good an idea to learn as VN" or "Is ideologically sound as a beginners programming language."

      Maybe if you took your monocle off before reading what's on your screen, you'd be a little less shocked when you do read it, and so would lose it less often.

    6. Re:Yes, but.... by CaymanIslandCarpedie · · Score: 1

      He did ALSO as Can it be used to create GUIs, add [business] logic to these GUIs as easily as VB?

      Whats that about reading the screen? ;-)

      --
      "reality has a well-known liberal bias" - Steven Colbert
    7. Re:Yes, but.... by jupo · · Score: 5, Informative
      --
      Me I'm a maker, mostly of axioms.
    8. Re:Yes, but.... by lakeland · · Score: 0, Troll

      VB is a language that poor programmers find very easy to hack up (unmaintainable) solutions in.
      I imagine that the same programmers will find Python (and therefore IronPython) considerably harder to hack up solutions in.

      Because it is CLR, it is easy for you to integrate python code with the ugly solutions poor programmers have written in VB.net. So next time some non-programmer shows you their awful business-critical program and asks you to add a feature, you will be able to do it in (Iron)Python. I see that as a good thing.

      I don't see IronPython being adopted by the non-programmers though.

    9. Re:Yes, but.... by lakeland · · Score: 4, Informative

      As a .net CLR language, it can integrate with any other .net language including VB.net very easily. This integration is tight enough that you can write each function in your program in a different language, or write the GUI in VB.net and the support code in IronPython.net

      No, it is not as easy for non-programmers.

      Can it be used to create guis...? Yes it can. At some point it could be made as easy as it is in VB.net; if I were on the development team then that would not be high on my priority list. Leave the toy languages for interactive GUI prototyping, and leave IronPython for code-driven development. However, that's just me and other people have different itches they want scratched.

      I see IronPython as a very valuable development and it will make interacting with standard Microsoft-only developers on windows much easier since I will now be able to use a language I like while maintaining 100% compatability and interoperability.

    10. Re:Yes, but.... by Shados · · Score: 2, Informative

      Hmm, are we talking about the same VB.NET? I'm a C# programmer myself, not VB.NET (though I did do VB.NET for a year or so), but VB.NET is only VB in syntax.. its definately not the RAD tool VB6 used to be. In its simplest form, you could say its Java with VB keyword and a bit of syntax sugar. You won't shoot yourself in the foot any more quickly than you would in any other language commonly used in multi-tier development (Java, C#, and so on). I only quickly looked at Python, but aside maybe for the GUI part, how is it harder to hack up some garbage than it would be in a .NET language?

    11. Re:Yes, but.... by JimDaGeek · · Score: 5, Interesting
      I actually find the multi-language of of the CLR to be a negative. I work at a fortune 500 and most of us use C# and/or Java. There are a few groups of "programmers" that have always been VB-only/ASP-Only "programmers". They have really no understanding of programming maintainable code. The majority of the junk they churn out is MS-Only/IE-Only crud. The bad part is if one of us programmers ever have to maintain the crappy VB.Net code. C# is a pretty nice language that flows well with .Net and is not overly verbose. VB.Net is the exact opposite, one might as well code in COBOL.Net. It really stinks to have the majority of a code-base in C# and then have some VB.Net assemblies thrown at you that you that you later have to maintain. IMO, it really kills productivity to have to switch to VB.Net from C# for a few bits of a project. To me it seems as if no real design went into VB.Net in contrast to C# which seems like a lot of thought went into how to do things and how not to do things.

      I really wish MS just let VB die with VB 6, it would have been for the best. The VB 6 fans could have continued with VB 6 until they learned a real programming language and real programming techniques.

      I don't see IronPython being adopted by the non-programmers though.
      I agree. I think Python is a good language and most importantly it is cross-platform. Why would someone want to kill Python by making it MS-Only? As far as getting this IronPython on Mono, I don't see it happening. I use Mono and it is pretty nice. Mono has .Net 1.1 complete and .Net 2.0 is pretty much there now too. I just don't see IronPython ever getting enough development behind it to get a port to Mono, especially with a "shared" source license.

      Even though the MS-PR-machine says .Net is cross-platform, it really is not. MS only released a C# compiler for FreeBSD. The compiler is not a big deal. The thing that makes .Net, just like Java, is the extensive framework. MS made an MS-Only framework. It is only because of the hard work of the Mono team that we can enjoy C#/.Net/ASP.Net/ADO.Net/etc on Linux, Mac OS X, Solaris, OpenBSD, FreeBSD, NetBSD and even MS Windows. Mono is cross-platform, Microsoft .Net is not. When Sun did Java, they put the effort in to make the most important part, the framework, cross-platform. I wish MS did the same.
      --
      General, you are listening to a machine! Do the world a favor and don't act like one.
    12. Re:Yes, but.... by jma05 · · Score: 2, Informative

      As far as I know, IronPython at the moment is not seamlessly integrated into VS2005. If you want VB GUI simplicity (drag control, add event handler), you might want to try Boo. Boo is well integrated into SharpDevelop (in fact SharpDevelop bundles Boo now). While, this is no Visual Studio, it does a pretty good job.

      Boo is not Python, but rather a middle ground between C# and Python. It is an easy to learn statically typed functional language with a Python inspired syntax.

    13. Re:Yes, but.... by Anonymous Coward · · Score: 0

      You mean the bit where he wasn't referring to what you just quoted and actually was replying to the fact VB and "Easy to learn" were in the same sentence?

    14. Re:Yes, but.... by hey! · · Score: 4, Insightful

      Visual Basic? Easy to learn? I don't believe that these two statements belong in the same sentance. IMHO VB is a terrible tool to learn, as when used to teach programming fundamentals (as is often done with information systems students in business departments), it corrupts the student's understanding so grotesquely that often, they can never recover.

      This kind of comparison, it seems to me, invites comparing apples and oranges.

      The Visual Basic language has certain irregularities and peculiarities, but MOSTLY the issue with it is that it is very primitive. As such, you can certainly learn elementary programming concepts with it without suffering permanent brain damage; you just don't get the benefits of learning to think "in the large" the way you do with a more expressive language.

      However the language is only 1/3 of the three distinct items that make up the whole package: the language, the runtime system and the IDE. A lot of stuff you "do" in VB is actually done by libraries written in C++.

      When most people thinking about "learning" a system like VB have in mind is learning how to accomplish specific tasks. For those tasks that are well supported by the runtime system and the IDE, VB is highly productive. We're talking common business tasks that can be supported by bolting together VB controls and some ActiveXs with a few event handlers. The useful scope of such applications is very wide indeed.

      However, if you're trying to do something that doesn't fall into that range of tasks, the primitive nature of the VB language is a dreadful hobble.

      WRT brain damaging effects of VB, I'd say this: very few people in this world are cut out to be programmers. For some people it's almost natural thing. For others it is a latent talent that can be trained. But most people, regardless of their intelligence, dilligence and personal virtue, could only be trained to the level of mediocrity, at least with the ways we know how to teach. Many would not even reach the level of mediocrity.

      VB's runtime system and IDE can mask that. Sit two people down. The first is a reaonably intelligent person who has been trained in VB, the other is a gifted programmer who has to work with vim, the language of your choice, and a GUI toolkit. Give them a common business data entry problem to solve, and they both end up with something that works in a reasonable time. Task them with creating a program which finds economically optimal air travel itineraries using various data sources and meeting certain user defined criteria, and the first guy is out of his depth.

      --
      Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
    15. Re:Yes, but.... by jerdenn · · Score: 4, Informative

      IronPython is integrated into VS.NET 2005. In fact, the Visual Studio 2005 SDK (VSIP) uses the IronPython IDE integration as the reference implementation for Visual Studio integration.

    16. Re:Yes, but.... by afd8856 · · Score: 1

      That "Shared source" is actually BSD licenced. Read the article.

      --
      I'll do the stupid thing first and then you shy people follow...
    17. Re:Yes, but.... by Anonymous Coward · · Score: 2, Informative
      As far as getting this IronPython on Mono, I don't see it happening.

      Except that in another comment there's a link to instructions on how to get IronPython working with Mono. They amount to replacing the csc compiler (MS C#) with gmcs (Mono C#), and fixing a mkdir statement. You can't complain about that level of portability.

    18. Re:Yes, but.... by Dr_Barnowl · · Score: 1

      The thing it lacks is a UI designer ; both VB.NET and C# have nice graphical UI designers that stream the design to a code module. The code itself can be inspected and to a limited extent, tampered with. In contrast to the VB6 IDE, the code is not concealed from the programmer by the IDE. In VB6, you could manually tamper with forms, or even write your own, if you were highly comfortable with the forms language that VB used, but you had to close the IDE to do so. And some properties ended up serialized to a binary resource, where you had very little hope of tampering with them.

      IronPython can construct UI by using the same kind of code ; the creation of WinForms elements. Of course, until it has a UI designer, it will be a manual, and thus onerous task.

    19. Re:Yes, but.... by aybiss · · Score: 0

      Not to detract from your arguments, but to play devils advocate I must point out that I'm doing an open source project that integrates a couple of GPL libraries using free tools, all thanks to Visual Studio Express and .NET 2.0.

      Sure, right now it only runs on Windows, but I'm just waiting for Mono to get Forms 2.0 support ;-)

      --
      It's OK Bender, there's no such thing as 2.
    20. Re:Yes, but.... by Anonymous Coward · · Score: 2, Interesting

      Why would someone want to kill Python by making it MS-Only?

      IronPython-development is sponsered by Microsoft. Draw your conclusions. It's just as with Adobe being in the W3C-group to kill the SVG-standard by making it virtually unimplementable.

    21. Re:Yes, but.... by RAMMS+EIN · · Score: 2, Interesting

      ``The Visual Basic language has certain irregularities and peculiarities, but MOSTLY the issue with it is that it is very primitive.''

      I don't know what "primitive" is really supposed to mean here. If it means simple, I would say that a language can both be simple and flexible (e.g. Scheme and Smalltalk are). But I do find that irregularities in a language are generally a Bad Thing: they may seem acceptable or even convenient while the language is being used for simple tasks in a small domain, but once the scope of the language and the tasks it is put to is expanded, they will really start to hurt. You can see this happening when you look at the history of Perl, PHP, Python and Ruby.

      ``As such, you can certainly learn elementary programming concepts with it without suffering permanent brain damage;''

      I disagree. If the language design is bad, you will suffer brain damage by working with it, for two reasons. First of all, you will accept the peculiarities of the language as "the way it is done", or even "the right way". I don't know about you, but I've certainly encountered my share of people who thought that all languages besides the only one they knew were terrible, because they didn't have some feature that their language had...and they lacked the open-mindedness to see that some people might actually consider that feature a Bad Thing. Secondly, the more peculiarities you have to deal with in a language, the more it distracts from the actual process of designing and implementing programs: eventually, you will miss the forest for the trees. This is especially bad for people who would have difficulty with the programming process to begin with.

      ``you just don't get the benefits of learning to think "in the large" the way you do with a more expressive language.''

      And that just adds insult to injury. Even when you manage to master programming by fighting and beating your badly designed language, you will never become a great programmer with it, simply because the language doesn't let you. So, (ignoring what useful things the language library might let you do, after all we're discussing design here) you've wasted your time and energy.

      ``However the language is only 1/3 of the three distinct items that make up the whole package: the language, the runtime system and the IDE. A lot of stuff you "do" in VB is actually done by libraries written in C++.''

      I don't know what point you're trying to make by saying the libraries are written in C++. Also, I disagree with your three items. The IDE doesn't belong in there: you can develop an IDE for any language. My division would be: the language (syntax and semantics), the libraries (what functionality is provided), and the implementation (compiler, interpreter). The syntax and semantics are fixed; you don't have any control over them as a programmer. The library is definitely part of the personality of the language, but it can be expanded and perhaps even replaced (e.g. imagine C, but with a library that included only garbage-collected data types and safe functions (e.g. no gets)). The implementation is mostly a contingent property (e.g. there are dog slow and lightning fast Scheme implementations), except for two things: incompatibilities among implementations and the fact that there will typically be a de-facto standard implementation.

      ``When most people thinking about "learning" a system like VB have in mind is learning how to accomplish specific tasks. For those tasks that are well supported by the runtime system and the IDE, VB is highly productive. We're talking common business tasks that can be supported by bolting together VB controls and some ActiveXs with a few event handlers. The useful scope of such applications is very wide indeed.''

      True enough, but that doesn't make the use of an inferior language a Good Thing. People would be much better of if the language they were taught and that they used to write their glue code was also a good vehicle for real programming. The number one reason for that is that small, o

      --
      Please correct me if I got my facts wrong.
    22. Re:Yes, but.... by Anonymous Coward · · Score: 0

      Well I program in both C# and VB/Net daily and, sadly, I oftenn find myself maintaining crap code in both languages.

      If people are writing crap code it's very rarealy becaue of the language, it's usually down to them knowing no better. Where I work a lot of people have also received insufficient training and have then been let loose on a project with a tight deadline which helps your code qulity immensely - NOT.

      Despite being from a C background I also find myself actually preferring VB.Net these days as the IDE has so much better auto completion for VB syntax - I'm getting too old to keep typing everything by hand.

      And don't get me started on crappy tools that outo generate rubbish, I had enoughh of those in the 1980s. They're the biggest source of shite code ever.

    23. Re:Yes, but.... by shutdown+-p+now · · Score: 2, Insightful
      C# is a pretty nice language that flows well with .Net and is not overly verbose. VB.Net is the exact opposite, one might as well code in COBOL.Net.
      There are practically no serious semantic differences between C# and VB.Net. You can often get away with converting code from one to another by replacing curly braces with If .. End If, and similar changes.

      This is not to say there is any point whatsoever in existence of VB.Net when there is C#. It's essentially the same language with slightly uglier (but some rather say readable *shrugs*) syntax, nothing more, nothing less. As such, it is not of much practical use. It is not the spawn of evil you tried to present it either, though.

    24. Re:Yes, but.... by hey! · · Score: 1

      I don't know what "primitive" is really supposed to mean here. If it means simple, I would say that a language can both be simple and flexible (e.g. Scheme and Smalltalk are).

      "Simple" is not the same as "primitive". In fact, it's often the opposite. The simple way of doing this is often a needle in the haystack of complexity.

      But I do find that irregularities in a language are generally a Bad Thing

      Which goes to my point above. Often irregularities are the result of underlying complexity. Something that looks simple on the surface but is complex underneath isn't simple: it's simplistic.

      Bringing up simplicity is really changing the subject. I was talking about VB being primitive, by which I mean lacking in features that have been proven as beneficial in making your programs simple. That said, the irregularities in VB are trivial.

      I don't know what point you're trying to make by saying the libraries are written in C++.

      The point is that you can't use the rather complex things VB allows you to do as a counterexample to the primitive nature of the VB language.

      And that just adds insult to injury. Even when you manage to master programming by fighting and beating your badly designed language, you will never become a great programmer with it.

      Actually, by your argument, not being able to "think in the large" is the injury, if there is any such. I would agree with this, but it is a rectifiable injury. That said, I think the problems of the VB language are those of omission, not commission.

      Alan Kay used to teach whole classes of primary school children to program. By the time he was done, the whole class would be able to write programs.

      I think our experience with children and computers points to this not being so extraordinary. The reason it doesn't happen is we don't try. And it is trying that makes Mr. Kay's efforts extraordinary. That said, I think anyone with average intelligence can be taught to grind out progrms. The key is to have a decent runtime system for the problems you are assigning (e.g. Logo and turtle graphics).

      --
      Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
    25. Re:Yes, but.... by gbjbaanb · · Score: 2, Funny

      It [VB.NET] is not the spawn of evil you tried to present it either, though.

      Yes, but VB programmers are :-)

      oh, and C# programmers who think that they are the only ones who can write 'clean', maintainable, wonderfully object oriented code.

    26. Re:Yes, but.... by oohshiny · · Score: 1

      I actually find the multi-language of of the CLR to be a negative.

      That's not unique to the CLR runtime: the Java runtime and the C runtime both support multi-language programming, and it's widely used. In particular, every platform needs at least one decent dynamic language in addition to a static language, and Python one of the better choices.

      When Sun did Java, they put the effort in to make the most important part, the framework, cross-platform. I wish MS did the same.

      Please stop this Sun fanboy-ism. Sun has gone out of their way to make life miserable for open source platforms, and Sun's Java implementations for Linux are stil much worse than their implementations for Windows. I think that barely counts as cross-platform, not that most developers even give a damn about cross-platform.

      Why would someone want to kill Python by making it MS-Only?

      Even if IronPython were MS-only, how would that "kill" the language? Did the creation of a Microsoft C compiler "kill" C?

      But you're wrong on your facts anyway: IronPython is not Microsoft-only, it runs on Mono and that is the intent of the developers.

    27. Re:Yes, but.... by Gr8Apes · · Score: 2, Insightful
      To me it seems as if no real design went into VB.Net in contrast to C# which seems like a lot of thought went into how to do things and how not to do things.


      Most of that "design" and "thought" was "how did Sun do it with Java". And they still borked it up with the explicit override, virtual, and new keywords for methods. What's the point of an OO language's polymorphism if you have to go back and change the super classes in a third party library if you need to override a method? (And yes, I'm aware that C++ follows the same paradigm - who said they were right?)
      --
      The cesspool just got a check and balance.
    28. Re:Yes, but.... by ahsile · · Score: 1

      I'm glad someone else pointed this out.

    29. Re:Yes, but.... by Gr8Apes · · Score: 1

      I started some work with C# once, and quickly decided that given the choice, I wouldn't use it precisely because of that incredibly bad decision in language architecture. That alone kills the third party library market, unless they make everything explicitly overridable. Considering most third party libraries don't even come with reasonable documentation to make even the simple samples work....

      --
      The cesspool just got a check and balance.
    30. Re:Yes, but.... by DangerAwaits · · Score: 1

      VB's runtime system and IDE can mask that. Sit two people down. The first is a reaonably intelligent person who has been trained in VB, the other is a gifted programmer who has to work with vim, the language of your choice, and a GUI toolkit. Give them a common business data entry problem to solve, and they both end up with something that works in a reasonable time. Task them with creating a program which finds economically optimal air travel itineraries using various data sources and meeting certain user defined criteria, and the first guy is out of his depth.

      I happen to be in the second category. However, I am currently writing some code for a consulting gig I have in C#. One problem I'm having is that I have to "change the way I think" in order to work the "Microsoft Way". For example, when writing code in Visual Studio, it really wants you to declare your variable, implement the method that uses the variable, and then you can write the code that calls the method.

      However, I usually work exactly the other way around. I write the highlevel code first, and the rest is just trivial details. MS makes it easy to do the trivial stuff.

      There are other examples like this one. I'm not going to get into the productivity hit I take when I'm not using vim...

      My point is that it is quite possible for a "trained VB" person to be more productive when doing VB-like tasks than someone like me.

    31. Re:Yes, but.... by smallpaul · · Score: 2, Insightful

      I actually find the multi-language of of the CLR to be a negative. I work at a fortune 500 and most of us use C# and/or Java. There are a few groups of "programmers" that have always been VB-only/ASP-Only "programmers". ...

      Surely this is a corporate policy problem and not a technology problem. There is no way to make a virtual machine that will only run one language. Even if you totally optimize it for a single language, someone can implement another language in that language. So you might as well make it work well for multiple languages.

      I agree. I think Python is a good language and most importantly it is cross-platform. Why would someone want to kill Python by making it MS-Only?

      How does adding a port of Python to .NET make Python "MS-Only." Development continues on at least three other Python impementations for different runtimes. It's like saying that the existence of Visual C++ makes C++ MS-Only. It increases, not decreases the scope of Python.

      As far as getting this IronPython on Mono, I don't see it happening. I use Mono and it is pretty nice. Mono has .Net 1.1 complete and .Net 2.0 is pretty much there now too. I just don't see IronPython ever getting enough development behind it to get a port to Mono, especially with a "shared" source license.

      Would you please stop talking out of your ass? IronPython does not need to be "ported" to Mono. Mono adheres to the ECMA CLR spec. IronPython adheres to the ECMA CLR spec. Any divergence is a bug. Most beta versions of IronPython do run on most beta versions of Mono and any incompatibility between the two in the final release versions will be considered a bug by one of the parties involved.

      Furthermore, the IronPython license is very liberal. What aspect of it would prevent a port to Mono?

    32. Re:Yes, but.... by 00lmz · · Score: 1
      VB.Net is the exact opposite, one might as well code in COBOL.Net.

      This NetCOBOL for .NET seems interesting... It integrates with VS2005, the GUI designer, and the ASP.NET designer, but with that kind of syntax, who would want to use it (except companies porting older COBOL code)? I'm not really sure it's fair to compare VB.NET to something like this:

      77 String-1 USAGE OBJECT REFERENCE SYS-STRING
      .
      .
      .
      INVOKE SYS-STRING "Equals" USING BY VALUE a BY VALUE b RETURNING returnValue
    33. Re:Yes, but.... by LWATCDR · · Score: 1

      I have written in java and have had no problem with them working under Linux, Windows, and after a one line change Mac OS/X. I also have no problem using Eclipse under Linux and Windows.
      I have not seen any real problems with Java as a multi platform solution. For the tasks I use it for it works very well.

      --
      See my blog http://ilovecookes.blogspot.com/ for light hearted technical information.
    34. Re:Yes, but.... by JimDaGeek · · Score: 1

      "I'm not really sure it's fair to compare VB.NET to something like this:..."

      OK, it is not as pull-your-hair-out verbose as COBOL, however it is far to verbose for my liking. Too many keywords that don't serve any purpose. Here is method declaration:

      Public Function Add(Num1 as integer,Num2 as integer) As Integer
              return Num1 + Num2
      End Function

      Why the need for the function keyword? It doesn't do anything, if a programmer cannot look at a method declaration and tell that it is a method declaration, well, they shouldn't be programming IMO. I hate the As keyword. It is just stupid and serves no purpose, the same goes with End keywords. VB.Net is just too verbose to me and feels like a Fisher Price language. Give me a language like C, C++, Java, PHP, C# any day. Here is the same method in C#.

      Public int Add(int Num1, int Num2)
      {
              return Num1 + Num2;
      }

      No fluff, less typing and no hand-holding. If someone cannot learn to understand the above, they should look for a job in a field other than programming IMO. ;-)

      --
      General, you are listening to a machine! Do the world a favor and don't act like one.
    35. Re:Yes, but.... by sgt+scrub · · Score: 1
      IronPython [1] is an implementation of Python 2.4 written in C#. This means it integrates fully with the Microsoft .NET framework 2.0 and Mono. You can natively use .NET classes from within IronPython.

      http://www.voidspace.org.uk/python/weblog/arch_d7_ 2006_05_20.shtml#e342
      --
      Having to work for a living is the root of all evil.
    36. Re:Yes, but.... by sgt+scrub · · Score: 2, Informative
      Windows Forms is a way to create native, rich client GUI applications with .NET. Programs created with Windows Forms can be extremely good looking, and fully programmable IronPython.

      http://www.voidspace.org.uk/python/weblog/arch_d7_ 2006_05_20.shtml#e342
      --
      Having to work for a living is the root of all evil.
    37. Re:Yes, but.... by RAMMS+EIN · · Score: 1

      ``I see IronPython as a very valuable development and it will make interacting with standard Microsoft-only developers on windows much easier since I will now be able to use a language I like while maintaining 100% compatability and interoperability.''

      Technically, perhaps. But practically? Is your manager going to allow you to use a different language from everybody else? Are the people who will have to work with your code going to be happy about it?

      --
      Please correct me if I got my facts wrong.
    38. Re:Yes, but.... by Lodragandraoidh · · Score: 1
      "...since I will now be able to use a language I like while maintaining 100% compatability and interoperability."


      Until MS breaks some interface, as they have done in the past.

      Python and Tk give you everything you really need to develop GUI apps on any system. Throw in Zope and you can web-enable it.

      KISS - debugging complex apps is difficult enough without adding another layer of cruft on top of if - just so I can use some 'gee-whiz' .Net gizmo.
      --

      Lodragan Draoidh
      The more you explain it, the more I don't understand it. - Mark Twain
    39. Re:Yes, but.... by JimDaGeek · · Score: 1
      Surely this is a corporate policy problem and not a technology problem
      I agree 100%. I think it is a good thing that there are multiple languages with .Net. However, I have ran into to many places that think it is a plus to have people working in different languages on a project. I hear it touted as a plus for .Net over Java. IMO, the best projects have been projects where all developers worked in one language (not counting any odd scripting glue). This way if one dev is out, leaves or whatever, the project can continue with minimal interruptions. A manager where I work hired a consultant to work on a small web app that no one had time to start. The guy was VB-only and did the project in VB.Net because he didn't "know" C#. Now no one wants to maintain/enhance that project because no one wants to be stuck back in the VB world. Yes it is a corporate policy issues. However PHB's buy into to the buzz of .Net and being able to many different development languages to "increase ROI, and leverage existing skill sets". Bleh.

      How does adding a port of Python to .NET make Python "MS-Only." Development continues on at least three other Python impementations for different runtimes. It's like saying that the existence of Visual C++ makes C++ MS-Only. It increases, not decreases the scope of Python.
      Good point. I initially did a quick read of the site and thought it was worse than it is. However, once cannot expect to write something in IronPython and have it run in regular (CPython). Most of the other Python forks/implementations just tweak Python to make it faster or work better for certain things. So they still run your regular Python code. If you write some IronPython stuff with with .Net using WinForms, well you just killed one of the best features of Python, cross-platform execution.

      Would you please stop talking out of your ass? IronPython does not need to be "ported" to Mono. Mono adheres to the ECMA CLR spec. IronPython adheres to the ECMA CLR spec. Any divergence is a bug. Most beta versions of IronPython do run on most beta versions of Mono and any incompatibility between the two in the final release versions will be considered a bug by one of the parties involved.
      And your point? All of Microsoft's .Net platform is not part of an ECMA spec. In fact, the most important parts of it, the framework, are not an ECMA spec. So just because Mono and IronPython adhere to the ECMA CLR spec doesn't mean they will work. IronPython was paid for by MS so if MS has anything put in IronPython that is MS-Only, like Winforms, etc. then IronPython has basically become MS-Only.

      I like C# and the .Net platform. I would really like to see it be a great cross-platform dev environment. However with MS it looks like it will always just be one MS-only extension after another. Just enough to make most .Net code to be MS-Only. Things like this is what makes me keep Java around. Otherwise I would have dropped Java for C#. At least with Java I know that there is the core standard Java framework that runs on multiple platforms thansk to Sun.

      Furthermore, the IronPython license is very liberal.
      I just prefer to use an Open Source or Free software license. I can see MS not wanting to go with a GPL license, however MS could have at lease picked an OSI approved license or have submitted their license to OSI.
      --
      General, you are listening to a machine! Do the world a favor and don't act like one.
    40. Re:Yes, but.... by JimDaGeek · · Score: 1

      I agree with your points. However I am not sure if that aspect of C# bothers me more than exceptions in Java. Exceptions in Java are just annoying.

      --
      General, you are listening to a machine! Do the world a favor and don't act like one.
    41. Re:Yes, but.... by JimDaGeek · · Score: 1
      Please stop this Sun fanboy-ism. Sun has gone out of their way to make life miserable for open source platforms, and Sun's Java implementations for Linux are stil much worse than their implementations for Windows. I think that barely counts as cross-platform,
      Sorry but I am not a Sun fanboy. I do 99.99% of my development at work with C# in Visual Studio 2005. How much testing have you done with Sun's Linux Java version? Hmmm? Don't make up crap to try to make a point. Sun's Java runs great on Linux and many of the server apps we run have better overall performance on a Linux box vs an MS windows box, especially after you add in slower drive performance due to an on-access virus scanner and other things needed to lock down an MS Windows server. Also, Sun's Java is not the only Java in town. IBM has a good JVM that works great on MS Windows and Linux and Bea has JRockit which is optimized for Intel on Windows and Linux.

      not that most developers even give a damn about cross-platform.
      Huh? So you have talked to "most" developers to see what they care about? I somehow doubt that. I see Open Source growing very well on Linux, MS Windows and Mac OS X. I bet a goal of many of those projects are to be cross-platform.

      But you're wrong on your facts anyway: IronPython is not Microsoft-only, it runs on Mono and that is the intent of the developers.
      Yes, it currently runs on Mono until the next IronPython change, Mono get tweaked, IronPython change, lather-rinse-repeat. Most of Microsoft's .Net is not an ECMA spec, so IronPython, which is sponsored by Microsoft, is not cross-platform just because it currently runs in mono. Write an IronPython GUI app with Microsoft's non-ECMA Winforms and see how well it does on non-MS platforms.
      --
      General, you are listening to a machine! Do the world a favor and don't act like one.
    42. Re:Yes, but.... by supersnail · · Score: 1

      Normaly I would be in there knocking Microsoft with the rest of them.

      But anyone who has ever had more than a cursory look at ".net" has
      come away impressed.

      When you consider that the main competion in this area is the J2EE
      ( a maze of twisty little APIs ..... ) it would not be hard to impress.
      But even so it all looks so right!

      Whats more its interoperable -- MS have gone to a lot of trouble to
      publish real standards for the CLR, C# etc.

      I would seriously prefer to use mono on linux over J2EE.

      --
      Old COBOL programmers never die. They just code in C.
    43. Re:Yes, but.... by jma05 · · Score: 1

      I was under the impression that you had only access to the basic features of VS2005 (highlighting, debugger etc - stuff that you can get in any good Python open source Python IDE) via it's integration. If it includes form editor and intellisense support, I am behind times.

    44. Re:Yes, but.... by smallpaul · · Score: 2, Insightful

      However, once cannot expect to write something in IronPython and have it run in regular (CPython). Most of the other Python forks/implementations just tweak Python to make it faster or work better for certain things. So they still run your regular Python code.

      According to Jim, the creator of IronPython: "To drive our Python compatibility, we run a large portion of the standard Python regression test suite in addition to a large custom test suite we added that runs IronPython and CPython side-by-side to test for identical behavior whenever possible. Despite all of this work, there will still be differences between IronPython 1.0 and CPython. The most obvious difference is that IronPython is missing a number of standard C-based extension modules so things like "import bsddb" will fail. We maintain a detailed list of differences between the two implementations and aim to reduce the size of this list in every release."

      None of the implementations of Python run every C-based extension module that pure Python does. But IronPython is already more compatible with CPython than Jython is.

      If you write some IronPython stuff with with .Net using WinForms, well you just killed one of the best features of Python, cross-platform execution.

      Well, "duh." But who has a gun to your head telling you to do that? Just pick up a standard Python book at the library and code in standard Python. How would you even LEARN about WinForms without learning that it was a Microsoft .NET thing?

      And your point? All of Microsoft's .Net platform is not part of an ECMA spec. In fact, the most important parts of it, the framework, are not an ECMA spec. So just because Mono and IronPython adhere to the ECMA CLR spec doesn't mean they will work. IronPython was paid for by MS so if MS has anything put in IronPython that is MS-Only, like Winforms, etc. then IronPython has basically become MS-Only.

      Yes. That's why I explained to you that IronPython adheres to the ECMA spec. WinForms is not part of the ECMA spec, so IronPython does not depend upon it. IronPython can ACCESS WinForms, just as Unix Python can access Gnome GUI stuff and Mac Python can access Cocoa. But Iron Python does not depend upon Winforms.

    45. Re:Yes, but.... by oohshiny · · Score: 1

      How much testing have you done with Sun's Linux Java version? Hmmm? Don't make up crap to try to make a point. Sun's Java runs great on Linux and many of the server apps we run have better overall performance on a Linux box vs an MS windows box,

      Server apps run fine pretty much everywhere. Making server apps cross-platform isn't hard.

      The trouble areas with Java on Linux are in areas such as graphics, desktop support, user interfaces, and device access. I have done plenty of testing there, and you can believe me: Java doesn't even come close to fulfilling its cross-platform promise.

      Huh? So you have talked to "most" developers to see what they care about? I somehow doubt that. I see Open Source growing very well on Linux, MS Windows and Mac OS X. I bet a goal of many of those projects are to be cross-platform.

      Look at the statistics on Sourceforge or Freshmeat: the vast majority of open source projects and LOCs are not cross platform.

      Yes, it currently runs on Mono until the next IronPython change, Mono get tweaked, IronPython change, lather-rinse-repeat.

      Yeah, just like Jython currently runs on Sun Java, Sun Java gets changed, Jython has to follow suit, etc. Oh, actually there is a difference: we can tweak Mono, we can't tweak Sun Java because it's proprietary.

      Also, since IronPython is open source, if Microsoft doesn't pay enough attention to Mono compatibility, IronPython would simply get forked. Even if it needed to be forked, it would still represent a contribution of many man-years of useful development effort to the open source community.

      Most of Microsoft's .Net is not an ECMA spec, so IronPython, which is sponsored by Microsoft, is not cross-platform just because it currently runs in mono.

      At least a big part of .NET actually has an official standard and there are two open source implementation of it. The Java specifications, in contrast, are completely proprietary.

      Write an IronPython GUI app with Microsoft's non-ECMA Winforms and see how well it does on non-MS platforms.

      About as far as I get running Jython Swing apps on non-Sun implementations of Java--they sort of work, but not always. Both Winforms and Swing are proprietary APIs, and in both cases, open source implementations have to go through a lot of trouble to try to keep up with the proprietary vendors.

      Sorry but I am not a Sun fanboy.

      Yes, you are. You're also either deliberately spreading FUD, or simply very misinformed. And it's insulting that you imply that Jim Hugunin, the guy who has given so much to the open source community, including Jython, and who runs the IronPython project at Microsoft, supports some nefarious Microsoft purpose with this work.

      IronPython is what it is: an open source implementation of the Python language for the CLR, and it's enormously useful at that. How it will evolve in the long term, who will maintain the Mono version, etc., remains to be seen, but that doesn't change how useful it is.

    46. Re:Yes, but.... by oohshiny · · Score: 1

      I have written in java and have had no problem with them working under Linux, Windows, and after a one line change Mac OS/X.

      So have I; that doesn't make Java a good cross-platform solution. For something to be a good cross-platform solution, it not only needs to result in programs that run on many platforms, it also needs to come close to providing native functionality on each of those platforms, and Java falls way short there.

    47. Re:Yes, but.... by Gr8Apes · · Score: 1

      Well, here's a key on exceptions - don't use them. :)

      I know that's a trivial statement, but seriously, I've worked with well-written code that only used existing exceptions where absolutely necessary, had few try-catch blocks, and would almost never throw a RunTime exception because data was validated before being operated on.

      Then I had the counter-experience: a massively overly complicated "Exception Framework" complete with layered translation layers all spec'd out via Spring. Why? Because some nimrod read about exception frameworks being the next best thing in some drivel rag, and gave the struts exception framework as an example. What happened? We had individual exception classes written for every exception, complete with translator classes etc. Over 200 classes for something that at most required a single class with a data member indicating type of application exception. I say at most, because many of these were potential NPEs and the like that could have been checked and handled gracefully or via the default exceptions, but instead were layered in a "framework" that made debugging virtually impossible, as the stacktrace was lost through the translation layers - all without logging, of course. I did state that this was a nimrod's brain fart.

      --
      The cesspool just got a check and balance.
    48. Re:Yes, but.... by LWATCDR · · Score: 1

      What version of Java are you using? The current version does a pretty good job with providing a very windows like look and feel in Swing. Not only that but swing is actually pretty fast.
      However if that is your benchmark I would have to say that .net totally fails since it only runs under Windows.

      --
      See my blog http://ilovecookes.blogspot.com/ for light hearted technical information.
    49. Re:Yes, but.... by oohshiny · · Score: 2, Interesting

      The current version does a pretty good job with providing a very windows like look and feel in Swing. Not only that but swing is actually pretty fast.

      Yes, indeed, it provides a "very Windows-like look and feel"; unfortunately, it does so on every platform, including Linux and Macintosh.

      What Java doesn't do is support/follow well conventions about menus, shortcuts, keyboard layout, preference files, drag-and-drop, window management, device access, scripting language access, desktop search integration, and a host of others.

      There are a number of well-written, useful Java GUI applications, but, except for some trivial ones, none come even close to behaving like a native app.

      (I'm using Java 1.4 and 1.5 on Linux, Macintosh, and Windows.)

    50. Re:Yes, but.... by cyber-vandal · · Score: 2, Insightful

      A GUI designer does not make a language a toy, it makes it a language where time is saved in building the GUI painstakingly trial and error fashion - time that can be spent working on the logic. And given that most languages have GUI designers now that would make them all toys, which, having learned C++, makes me wonder what sort of toys you had as a child :P

    51. Re:Yes, but.... by phrasebook · · Score: 1

      I agree with your VB comments, but that C# snippet is atrocious. Braces given their own newlines... matter of fact, braces at all?! And types! The method in Python:

      def Add(num1, num2):
          return num1 + num2

      Now that's nice.

    52. Re:Yes, but.... by lakeland · · Score: 1

      I can't stand TK. Python and Qt and I'll agree with you. Deal? :)

    53. Re:Yes, but.... by lakeland · · Score: 1

      Maybe not.

      I know we run a fairly relaxed workplace here and yet, while using other languages is tolerated, using anything except python is quite strongly discouraged. Sadly I guess that 'x is our language of choice' is enforced elsewhere. (I spent a couple hours yesterday porting a perl program I wrote to python to conform to the language requirement here. Or rather, "so that other people will be able to read the code after you've left.")

    54. Re:Yes, but.... by lakeland · · Score: 1

      My experience of VB.net is just an hour long - after I'd finished a training course on C# the instructor decided to teach us all VB.net so we could learn the similarity. Before then the last time I had touched VB was VB6. Surprisingly good training course incidentially, I learned how a fair chunk of .net, the syntax of C#, how to create C# websites and how to use the MS IDE, oh, and that VB.net doesn't fix all my criticisms of VB.

      Going from C# to VB.net I was reminded repeatedly about all the stupid design decisions built into basic that encourage bad programming. Sure, a good number of them had been forced out by the requirement to be CLI compliant, and I got the feeling that a decent programmer could make a not bad VB.net program if they wanted whereas when I was writing VB in VB6 I nearly tore my hair out trying to write decent code. However, a whole heap of the BASIC cruft remained in VB.net and I'm sure a poor programmer would naturally take advantage of that cruft just like they used to do in VB for the same reason that they traditionally find more restrictive languages such as Java hard.

      As for hacking up garbage in Python. Well, you can hack up garbage in any language, the question is how easy it is. Python, like C#, Java and others tries to make good software engineering easier and ugly garbage harder. It doesn't do that as well as some languages (I mean, what's with "if __name__ == '__main__':"?) But it does much better than BASIC (incl. VB.net). Constructs such as reusable strings are pretty easy and natural in Python, so putting magic values in your code is very easy to avoid (the python IDE we use highlights all magic values in red by default - something that would get annoying if they weren't so easily avoided.)

      Hmm, what else... It is all fairly anecdotal I guess. I like Python, it is elegant and simple. I quite like C#, it combines some good points of C with good OO and an excellent class library. I don't like Java much, it is verbose without benefit too often. I like C, it lets me visualise the assembly being generated without the time required to write the assembly myself. I hate basic, it requires many lines of code where one would do without giving you the control of C. Realistically though, my current job is all python (+ R,SQL) based so the only time I get to use .net is with IronPython and since I quite like .net, I see IronPython as a good thing.

    55. Re:Yes, but.... by Shados · · Score: 1

      Makes sense. Well, honestly, the important thing with VB.net is to set option strict. Then really, it becomes C# with different keywords. Without it, there's a ton of implicit casting, and THEN it really is garbage. But I'll say this... once you do option strict vb.net, you might as well switch to C#. So in the end I guess we agree, in a way.

      And item == "blah" ? somestuff : whatever; is actualy in C#, and has ONE good use, in my opinion. To read from a datareader while checking for null values..

      double blah = myreader["field1"] == DbNull.Value ? 0 : (double)myreader["field1"];.


      When you have a bunch of these in a row, its suprisingly cleaner than the alternative. Only exception though :)

    56. Re:Yes, but.... by Lodragandraoidh · · Score: 1

      Deal.

      As a matter of fact, there are a bunch of GUI libraries being or already developed for python.

      The point is, you don't have to drink the purple koolaid if you don't want to. ;)

      --

      Lodragan Draoidh
      The more you explain it, the more I don't understand it. - Mark Twain
  2. Faster than C? by Anonymous Coward · · Score: 0, Funny

    Yeah, right. Let's quickly port the Linux kernel to python, and while we're at it every other cpu intensive app.

    1. Re:Faster than C? by cduffy · · Score: 5, Informative

      Faster than CPython (ya know, the original upstream Python implementation), not faster than C.

    2. Re:Faster than C? by KDR_11k · · Score: 3, Funny

      Doesn't "faster than c" violate a basic law of physics?

      --
      Justice is the sheep getting arrested while an impartial judge declares the vote void.
    3. Re:Faster than C? by Anonymous Coward · · Score: 0

      One word: Assembly

  3. About speed. by Poromenos1 · · Score: 5, Informative

    I found that Python could run extremely well on the CLR in many cases noticeably faster than the C-based implementation.

    Actually, that's not really something to be proud about (though I'm not downplaying the huge achievement of running python on the CLR). The C implementation of Python is not very optimised, and that's why projects like PyPy or psyco are trying to speed Python up (and succeeding very well). I've had CPU-intensive scripts (such as SortSize) run tens of times faster with psyco, by just adding a line of code to my script.

    --
    Send email from the afterlife! Write your e-will at Dead Man's Switch.
    1. Re:About speed. by danhs7 · · Score: 1

      Your sortsize program seems similar to the knapsack problem. Perhaps you can solve it as a knapsack problem much faster.

    2. Re:About speed. by grammar+fascist · · Score: 4, Interesting

      My favorite so far is Pyrex, which lets you write C extension modules in a Python-like language. (It adds things like C data types and support for importing header files. I wish it would do generators, though.) A lot of times you can move a hefty inner loop into a Pyrex module and see tremendous gains.

      --
      I got my Linux laptop at System76.
    3. Re:About speed. by Poromenos1 · · Score: 1

      Oh, that's great, I had forgotten about that. Thanks a lot for the tip, I'll try it.

      --
      Send email from the afterlife! Write your e-will at Dead Man's Switch.
    4. Re:About speed. by Anonymous Coward · · Score: 0
    5. Re:About speed. by Breakfast+Pants · · Score: 1

      This wasn't a troll, it was simply a question.

      --

      --

      WHO ATE MY BREAKFAST PANTS?
    6. Re:About speed. by Paul+Crowley · · Score: 1

      If you find a fast, general solution (ie one that's polynomial time in the worst case) do let me know...

  4. Link is unreadable! Jeez! by Anonymous Coward · · Score: 5, Informative

    [IronPython] [ANN] IronPython 1.0 released today!
    Jim Hugunin Jim.Hugunin at microsoft.com
    Tue Sep 5 13:27:12 PDT 2006

    * Previous message: [IronPython] ipy support in msxsl:script blocks
    * Next message: [IronPython] [ANN] IronPython 1.0 released today!
    * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    I'm extremely happy to announce that we have released IronPython 1.0 today!
    http://www.codeplex.com/IronPython

    I started work on IronPython almost 3 years ago. My initial motivation for the project was to understand all of the reports that I read on the web claiming that the Common Language Runtime (CLR) was a terrible platform for Python and other dynamic languages. I was surprised to read these reports because I knew that the JVM was an acceptable platform for these languages. About 9 years ago I'd built an implementation of Python that ran on the JVM originally called JPython and later shortened to Jython. This implementation ran a little slower than the native C-based implementation of Python (CPython), but it was easily fast enough and stable enough for production use - testified to by the large number of Java projects that incorporate Jython today.

    I wanted to understand how Microsoft could have screwed up so badly that the CLR was a worse platform for dynamic languages than the JVM. My plan was to take a couple of weeks to build a prototype implementation of Python on the CLR and then to use that work to write a short pithy article called, "Why the CLR is a terrible platform for dynamic languages". My plans quickly changed as I worked on the prototype, because I found that Python could run extremely well on the CLR - in many cases noticeably faster than the C-based implementation. For the standard pystone benchmark, IronPython on the CLR was about 1.7x faster than the C-based implementation.

    The more time I spent working on IronPython and with the CLR, the more excited I became about its potential to finally deliver on the vision of a single common platform for a broad range of languages. At that same time, I was invited to come out to Microsoft to present IronPython and to talk with members of the CLR team about technical issues that I was running into. I had a great time that day working through these issues with a group of really smart people who all had a deep understanding of virtual machines and language implementation. After much reflection, I decided to join the CLR team at Microsoft where I could work with the platform to make it an even better target for dynamic languages and be able to have interesting technical discussions like that every day.

    The first few months at Microsoft were a challenge as I learned what was involved in working at a large company. However, once the initial hurdle was over I started experiencing the things that motivated me to come here in the first place. The team working on dynamic languages in general and IronPython in particular began to grow and I got to have those great technical discussions again about both how to make IronPython as good as it could be and how to make the CLR an even better platform. We began to take advantage of the great new features for dynamic languages already shipping in .NET 2.0 such as DynamicMethods, blindingly fast delegates and a new generics system that was seamlessly integrated with the existing reflection infrastructure.

    We were also able to release IronPython publicly from Microsoft with a BSD-style license. In the agile spirit of the project, we put out a new release of IronPython once every three weeks (on average) over the course of the project. This helped us connect well with our daring early adopters and receive and incorporate their feedback to make IronPython better. We've had countless excellent discussions on the mailing list on everything from supporting value types to calling over

    1. Re:Link is unreadable! Jeez! by kwark · · Score: 4, Funny

      And here I thought whitespaces were very very important to python.

  5. Or, if you're using Opera... by Poromenos1 · · Score: 1

    Press Ctrl+F11. I love this browser.

    --
    Send email from the afterlife! Write your e-will at Dead Man's Switch.
    1. Re:Or, if you're using Opera... by maop · · Score: 2, Funny

      Try pressing that 10 times really fast in a dark room.

    2. Re:Or, if you're using Opera... by HeroreV · · Score: 1

      You misspelled "Ctrl+Q".

    3. Re:Or, if you're using Opera... by Allador · · Score: 1

      You, sir, are a god!

      I love my Opera, but I didnt even know about the 'Fit to Width' command. I now love my Opera even more than before.

      How people struggle along with weak browsers like IE and FireFox is beyond me. ...

      Just kidding! (mostly) ... I'm just giddy with my new Opera feature that I didnt even know about before.

  6. Summary is confusing... by __aaclcg7560 · · Score: 4, Funny

    Is Python being used to fix Microsoft's mistakes? Or did a python got run through the Iron Chef competition? Either way, does it taste like chicken?

    Signed, IronConfused

  7. Hmmm by Anonymous Coward · · Score: 2, Interesting

    "in many cases noticeably faster than the C-based implementation"

    Funny enough, I haven't yet found one of these cases...

    1. Re:Hmmm by ThePub2000 · · Score: 2, Insightful

      Most of the benchmarking takes place after the CLR loads up, which is why they can say that. For short stuff though, just the load time of the CLR to load the python interpreter can easily kill your start to finish times.

    2. Re:Hmmm by ultrabot · · Score: 1

      pystone "benchmark", for starters.

      --
      Save your wrists today - switch to Dvorak
    3. Re:Hmmm by Anonymous Coward · · Score: 0

      The thing is, my benchmarks with somewhat long running code show IronPython to be half as fast as CPython.

  8. OB Black Sabbath by Anonymous Coward · · Score: 5, Funny

    I AM IRON PYTHON<\DistortedVoice>

    Duh, duh, duh duh duh.

    1. Re:OB Black Sabbath by Anonymous Coward · · Score: 0

      duh duh duh duh duh --- duh -- duh -- duh - duhhhhh

  9. Finally! by Anonymous Coward · · Score: 1, Insightful

    I can tie all my critical business programs to a platform that Microsoft controls without regard for anything but its own bottom line! Just think, when Microsoft decides one day that the .NET runtime will be a $500 "extra feature", I'll be the first in line to be forced to buy a thousand copies or watch my entire business go down the drain! Wooot! Shared Source is SO much better than that crappy "Open Sores" stuff. Where would the world be without all this Microsoft Innovation(tm).

    1. Re:Finally! by Anonymous Coward · · Score: 1, Insightful

      Why, would the current .NET runtime suddenly not work for you? What if the OSS library developers decide to radically change their API in the next version and remove the API that you are using?

      Also think of it this way: Microsoft doesnt make any money if its programming partners for the Windows platform dont make money. Microsoft has a vested interest in making you happy. In most cases, OSS developers dont care if you use their product or not, or even if it helps you to be successful. After all, they are doing it to "scratch their itch". Microsoft has had an excellent reputation for backward API compatibility (better than any other software vendor on the planet). Microsoft wants you to keep using their API's because it ties you to their platform.

      BTW, I don't know why you are mentioning .NET. The guy is talking about the CLR, not .NET.

    2. Re:Finally! by squiggleslash · · Score: 3, Insightful

      Shared source and open source are not mutually exclusive. According to the only document I can find on the subject, the Wikipedia page (IronPython's webpage sucks) the license is the CPL, an IBM-authored license which is incompatible with the GPL but is nonetheless considered a Free Software license by the FSF, and Open Source by the OSI.

      Despite it's incompatibility with their own GPL, the FSF sounds like they actually rather like it:

      This is a free software license but it is incompatible with the GPL.

      The Common Public License is incompatible with the GPL because it has various specific requirements that are not in the GPL.

      For example, it requires certain patent licenses be given that the GPL does not require. (We don't think those patent license requirements are inherently a bad idea, but nonetheless they are incompatible with the GNU GPL.)

      So I really wouldn't worry about the "shared source" write-up. It's an unusual choice of license, but it is considered Free Software and Open Source, the patent license requirements are actually fairly positive from the point of view of protections from Microsoft itself. Microsoft have chosen the same license in the past when releasing other code they want to be seen as completely open.

      --
      You are not alone. This is not normal. None of this is normal.
    3. Re:Finally! by Anonymous Coward · · Score: 0

      Is that why windows patches keep making various pieces of software my company uses break? Their extremely good API backwards compatibility with the last patch?

    4. Re:Finally! by drakaan · · Score: 2, Interesting
      Speaking of the patent licensing portion, can someone explain what exactly this part means:

      6. That the patent rights, if any, granted in this license only apply to the Software, not to any derivative works you make.

      So, being that there's nothing mentioned in the license that specifically grants any patent rights, aside from:

      You may use the Software for any commercial or noncommercial purpose, including distributing derivative works.

      ...so, basically, if you use the software to make a derivative work (which is an unspecified term in the license), the generous granting of rights to use the software for any commercial or noncommercial purpose do not apply (if there's a patent involved)?

      That pretty much makes me not want to have anything to do with IronPython development at all. After SCO and a few other "IP" related sagas, I've become a bit less trusting, so I now read the licenses that tools like this come with. I was all set to download it and start playing, but now I'm worried about even trying.

      Is there anyone out there who has a more generous reading of the license or who can address the apparent gaping hole in the license concerning what your rights are once you use the software to create something?

      --
      "Murphy was an optimist" - O'Toole's commentary on Murphy's Law
    5. Re:Finally! by JimDaGeek · · Score: 2, Insightful
      So I really wouldn't worry about the "shared source" write-up. It's an unusual choice of license, but it is considered Free Software and Open Source
      Huh? No it is not. The "Shared" source license is not the CPL license, if it were, it would be called ... the CPL license! Read the FAQ at the bottome of the license page for IronPython.
      Q: Is this license OSI compliant?
      A: This license has not been submitted to OSI, but it allows developers to take full advantage of a dynamic language on the CLR and to have the freedom to distribute their works for the benefit of the community at large. The license is half of a page long and very straight forward. We believe it stands up to what developers demand of an "open" license.
      So why not submit it to OSI to get an official approval as an Open Source license? I am guessing some of the stuff in there about Microsoft and patents might not get through OSI approval.

      We believe it stands up to what developers demand of an "open" license
      eh? I would think that the majority of developers want something more GPL-like since 75%+ of all open source software uses a GPL license.
      --
      General, you are listening to a machine! Do the world a favor and don't act like one.
    6. Re:Finally! by squiggleslash · · Score: 1

      That's interesting. My comment about the CPL was based upon the Wikipedia page. I couldn't get the FAQ to load (actually, I still can't, it comes up as an attachment, I try to save it, and it just hangs.) And I certainly couldn't find a license page.

      Thanks for linking to that. That's interesting. A little disappointing too. Why the hell did they change it (assuming Wikipedia was correct)?

      --
      You are not alone. This is not normal. None of this is normal.
    7. Re:Finally! by Decaff · · Score: 0, Troll

      Microsoft has had an excellent reputation for backward API compatibility (better than any other software vendor on the planet).

      As someone who has been using Microsoft's development products since the 70s (I started with the Macro Assembler on the TRS-80!) I can say I completely disagree. They freely abandon APIs and products, leaving developers stranded. Just ask PenWindows developers. Look back at the mess that was Win32s, and the painful upgrade path from earlier Windows versions(I have Win16 apps from the early 90s that simply won't run on XP). Just look at how they have left VB6 developers stranded.

      Meanwhile, on Linux, I am using APIs and tools that were around in UNIX in the 70s.

    8. Re:Finally! by kingdon · · Score: 1

      Well, BSD or X11 licenses don't have a patent license
      (at least not expressly),
      so I'm not sure whether the problems are unique
      to this license.

      But yes, if there are patents on Iron Python, then
      anyone downstream of Microsoft wouldn't be able
      to distribute a patched version unless they also
      removed anything covered by patents, as I understand
      it.

      Although you are right that the "including derived
      works" language could possibly contradict the patent clause.

      Not sure what this all means, but the license raised
      my eyebrows too.

    9. Re:Finally! by Javaman59 · · Score: 1

      Now, if Microsoft did that, and free software was viable competitor, then Microsoft would go out of business very quickly. So, either Microsoft wants to go out of business, or free software will never be a viable competitor, or your scenario won't ever happen.

      --
      I'm a software visionary. I don't code.
    10. Re:Finally! by Master+of+Transhuman · · Score: 1


      I agree - the FAQ just hangs. Presumably, since these people are so enamored with .Net, their Web site is unusable in Firefox...

      That immediately turned me off to the entire project - not that the words ".NET" didn't also have something to do with my reaction.

      When are the idiots doing these projects going to start doing competent Web sites?

      When are the idiots doing these projects going to start producing their documentation in PDF or some other downloadable format so we can download it and use it locally - not in useless online Web pages?

      Actually, when are the idiots doing these projects going to do ANY documentation?

      --
      Richard Steven Hack - This sig is TOO GODDAMN SHORT TO DO ANYTHING USEFUL WITH! MORONS!
    11. Re:Finally! by Dr_Barnowl · · Score: 1

      The alternate interpretation is that if they submit the license to the OSI, this may be construed as admission by Microsoft that OSI approved licenses have some kind of legal weight.

      Since MS would like nothing better than the GPL and its ilk to be shot down in flames in court, confidence in the whole legal standing of OSS to be destroyed, and Linus Torvalds forced to roam the streets begging for pickled herrings, I'm willing to be that even if a developer on the team had piped up and said, "Hey, lets submit this license to the OSI!", the legal team would have deployed a crack team of guys-with-briefcases very soon after.

    12. Re:Finally! by shutdown+-p+now · · Score: 2, Insightful

      The license is essentially BSDL with an additional patent clause, which terminates any rights otherwise given you by the license if you sue Microsoft or anyone else over "patents that you think may apply to the Software for a person's use of the Software". Personally, I don't see how this is not OSS. It certainly gives the developer more freedom than GPL.

    13. Re:Finally! by Decaff · · Score: 1, Insightful

      Interesting moderation of my original post here - "Troll".

      Perhaps people who disagree with me might actually like to challenge facts rather than abuse their mod points?

      How can stating established issues (known to any developer who has been working with Microsoft tools, good though some of those tools have been - nothing I have said here is controversial) be "Trolling" - some strange new Slashdot definition of the term?

    14. Re:Finally! by JimDaGeek · · Score: 1
      It certainly gives the developer more freedom than GPL.
      The GPL is not about giving developers freedom, or letting people see the source code. The GPL is about granting rights above what standard copyright allows to users of the software, whether those users are developers or not.
      --
      General, you are listening to a machine! Do the world a favor and don't act like one.
    15. Re:Finally! by Decaff · · Score: 2, Insightful

      So commenting negatively about Microsoft's poor legacy API support is 'Trolling', and then trying to refute the 'Trolling' claim by asking for a reasoned discussion is 'off topic'?

      Awesome. Slashdot has just lost it.

    16. Re:Finally! by cbhacking · · Score: 1

      Oh please... write some bloody ASP.NET, then whine if it doesn't work. ASP.NET 1.1 required a work-around (read: 1 line of code added to each page) for it to recognize Firefox as a high-level browser, but it would feed it basic HTML happily even without. ASP.NET 2.0 renders perfectly in Firefox, no workarounds needed, with advanced tags and properties, superb JavaScript support, and compliant (if not the full set of) CSS. I tested it using the W3C validation tools and it passed near perfectly.

      I've written a couple of aspx pages that work in Firefox but actually render brokenly in IE6... would have been a great laugh if it wasn't such a PITA to fix!

      --
      There's no place I could be, since I've found Serenity...
    17. Re:Finally! by shutdown+-p+now · · Score: 1

      And this is relevant exactly how? If it gives the developer freedom to use the code as he wishes, then it is OSS, and "Free" according to FSF as well. It does not have to be GPL-compliant to be open or even "Free". What else do you need?

    18. Re:Finally! by Master+of+Transhuman · · Score: 1


      FAQ still hung...

      That's the bottom line.

      --
      Richard Steven Hack - This sig is TOO GODDAMN SHORT TO DO ANYTHING USEFUL WITH! MORONS!
  10. I think I played too much Diablo by Hinhule · · Score: 1, Offtopic

    Suddenly got this mental image of coding Iron Python like playing Diablo Iron Man, one bug and your project is gone forever!

  11. Snakes... by Cameron+McCormack · · Score: 4, Funny

    on a VM!

    1. Re:Snakes... by SB_SamuraiSam · · Score: 1

      Hilarious! If only I had mod points. :-D

    2. Re:Snakes... by Twisted64 · · Score: 2, Funny

      I don't find that funny at all. As soon as this finishes posting, I'm going to mod you down.

      --
      Consciousness is a myth. Trust me.
    3. Re:Snakes... by Cameron+McCormack · · Score: 1

      Sheesh, just because you haven't watched the movie yet!

    4. Re:Snakes... by Twisted64 · · Score: 1

      ...movie?

      --
      Consciousness is a myth. Trust me.
    5. Re:Snakes... by Matt+Perry · · Score: 4, Funny

      Bill Gates: "I have had it with these muthafuckin' snakes on this muthafuckin' VM!"

      --
      Slashdot: Failed Car Analogies. Amateur Lawyering. Anecdote Battles.
    6. Re:Snakes... by neuro.slug · · Score: 5, Funny

      Or even better.. shit, they have Ruby on Rails--we need Python on Planes (or Python on MUTHAFUCKIN' Planes)

    7. Re:Snakes... by rbarreira · · Score: 1
      --

      The AACS key is NOT 0xF606EEFD628B1CA427BEA93A9CA9773F
    8. Re:Snakes... by Chapter80 · · Score: 1
      they have Ruby on Rails--we need...
      OK, mildly funny, but do we have to take sides?

      How about learning all of the above: Ruby, Rails, Python, IronPython, and then choosing the right tool for the job. I don't know about you, but personally, I want all my tools to improve, as well as my skills using various tools to improve.

    9. Re:Snakes... by grayrest · · Score: 1
      OK, mildly funny, but do we have to take sides?
      Yes, yes we do!
    10. Re:Snakes... by Anonymous Coward · · Score: 0

      I mostly agree with you, but since your response was so out of context, I'd like to play devil's advocate here and state that the "right tool for the job" mantra, while being quite true, still manages to see overuse. If you're a seasoned Python developer and you suddenly find yourself needing to dive into a web project, you could quite justifiably give preference to a Python-based framework. There's only so much time to learn so many things; sometimes the "right tool for the job" simply requires too much up-front investment to learn, and a "tool that gets the job done" is preferable (arguably making it the right tool for the job, but for my sake please don't make that argument).

      That said, please shoot me if I ever have to do another website in PHP.

  12. Cut to Next Scene by ClamIAm · · Score: 0, Troll

    we're also looking at the bigger picture to make all dynamic languages deeply integrated with the .NET platform and with technologies and products built on top of it.

    Somewhere in a billion-dollar mansion (OK it's in Washington), Gates and Ballmer are doing a very good "evil scheme" laugh.

    Yeah, yeah, I know, Mono. Software patents aren't valid everywhere, Microsoft is failing anyway, blah blah. But if you think this wasn't the design all along, you may want to check into an institution that helps folks deal with reality.

    1. Re:Cut to Next Scene by vinsci · · Score: 1
      Please mod parent up, insightful. It's not the first time we see Microsoft do this. In fact, it's the only thing they do, all the time. Feeding the monopoly.

      Apparently a troll moderator modded the parent post down to 0, currently.

      --

      Trusted Computing FAQ | Free Dawit Isaak!
    2. Re:Cut to Next Scene by SanityInAnarchy · · Score: 1

      Of course it was the design. Question is whether it's an evil design. If the MS .NET starts really acting badly, we can always run Mono on Windows -- we do that already anyway.

      --
      Don't thank God, thank a doctor!
  13. Does the world need more children by Colin+Smith · · Score: 3, Insightful

    There are plenty of them round already. Basically you're getting old, the world is moving on and leaving you behind. Welcome to middle age.

    --
    Deleted
  14. XTremez by Ana10g · · Score: 1

    Well, Yea! Please tell me that the current state of the art is not our crowning achievement in Computer Science. If it is, I quit.

    --
    just an analog boy living in a digital age.
  15. Round peg... by Anonymous Coward · · Score: 1

    ...meet square hole.

    1. Re:Round peg... by Anonymous Coward · · Score: 0

      Round peg... ...meet square hole.

      And whadda you know, it fits!

  16. Re:Sometimes I feel like a Luddite... by Jerf · · Score: 3, Informative

    "Another" programming language? It's just another implementation of Python, which has been around for about as long as Perl.

    Besides, if it gets to the point where Microsoft is officially supporting it, it would be a major addition to the .Net platform. If I could both develop in Python and in .Net I might actually be willing to develop in .Net. What stops me from wanting to develop in .Net or on the Java platform is the god-awful primary languages they are built around. Java makes me want to scream, and C# is only slightly better, all in all.

  17. Re:Sometimes I feel like a Luddite... by Anonymous Coward · · Score: 0

    "Another" programming language?

    Someone else already bagged on you for this, but really. That was a very stupid comment. It's not "another" programming language. It's been around for two decades, dummy.

  18. Dealing with UI by Carcass666 · · Score: 3, Interesting

    So, if I'm using Iron Python under .NET, would I use be compelled to use WinForms at that point or would libraries like wxPython still be available?

    1. Re:Dealing with UI by Anonymous Coward · · Score: 1, Informative

      No you pretty much lose any existing Python library that is not 100% Python and pretty much must use the .NET equivalents.

    2. Re:Dealing with UI by XMyth · · Score: 1
    3. Re:Dealing with UI by jsoderba · · Score: 1

      A quick google shows wx.NET, a C# wrapper around wxWidgets. I haven't tried it, though. The Mono project provides GTK# along-side their Windows.Forms implementation, of course.

    4. Re:Dealing with UI by gnud · · Score: 1

      The ironpython faq explains how to load native python libraries. So I expect you can use wxPython (or even better, pyqt :)

    5. Re:Dealing with UI by Tyger · · Score: 2, Informative

      Probably not wxPython, but you would be able to use wx.NET with it. (Though the development looks to have stopped on that judging by the timeline on that page.)

      It would be interesting to see how similar wxPython is to wx.NET with Python.

    6. Re:Dealing with UI by Fearless+Freep · · Score: 1

      If you wanted to use wxPython, why would you be using .net anyway?

    7. Re:Dealing with UI by JanneM · · Score: 0

      You should be able to use Gtk# just fine.

      --
      Trust the Computer. The Computer is your friend.
    8. Re:Dealing with UI by Carcass666 · · Score: 1
      If you wanted to use wxPython, why would you be using .net anyway?

      Sort of "I want my cake and eat it too." It'd be nice to get all of .NET's framework libraries (insomuch as they are available in Mono), and to get the nice native-looking apps wx gives you on Windows and Linux (I'm not a huge fan of GTK+ on Windows, they never seem "native" but maybe that's just the apps I've run into and I'm sure that makes me lame, but whatever) -- this post isn't meant to debate the virtues of GTK, the parent was just asking "why"?

  19. Bad article summary... by ndykman · · Score: 2, Informative

    The snipped out part of the announcement seems to me to leave a bad impression. Given this is /., I can almost hear everybody filling the blanks with "and it's still is slow, because MS sucks" or the like, which is not the opinion or intent of the comment actually quoted.

    If you read the whole comment, you will see that in fact, the CLR implementation does very well, the designer is now at MS working on the CLR, and all in all, IronPython is a decent Python implementation.

    Given this work and the F# compiler work http://research.microsoft.com/fsharp/fsharp.aspx, I think CLR is done quite well as a language independent platform. Also, given the excellent work of the Mono and Portable .Net groups, I think it is also reasonably portable as well.

    1. Re:Bad article summary... by Anonymous+MadCoe · · Score: 1

      Hear hear, someone who knows what he is talking about...

  20. Hrm by IamTheRealMike · · Score: 4, Interesting

    Well, the links to the FAQ don't seem to work thanks to some kind of site move (I am asked to download the HTML instead of view it and ... well ... am too lazy tonight). But a few thoughts based on what is already there:

    • It says they are maybe 1.7 times faster than CPython, which is not that great, because CPython is incredibly slow and things like Psyco can give pretty big speedups (say 10 to 100 according to their website).
    • It seems fundamentally impossible to make a language like Python or Ruby fast. By their very nature everything has to be done at the last minute, based on string comparisons, and you can't do global optimizations really because at any moment the program might change itself and invalidate them. Consider the way every object can implement a fallback method that is called if somebody invokes "foo.bar" and bar does not exist in foo. It implies that every single method invocation must be identified by string not a number, and matched by string comparison.
    • If IronPython can't make Python fast .... seems like its only purpose is to give people who like Python and .NET some half way point between the two. But it's not quite Python, because you can't use its standard library, and it's not quite .NET so in a way you seem to get the worst of both worlds

    I guess I just don't get it.

    1. Re:Hrm by killjoe · · Score: 2, Interesting

      I think the point is to discourage the use of cross platform libraries and languages. MS figures if they can tie python programmers to windows then less programs will be written that can run on linux or the mac.

      The question is does ironpython run on mono.

      --
      evil is as evil does
    2. Re:Hrm by squiggleslash · · Score: 2, Informative

      It's quite simply an attempt to make Python available for .NET (and presumably the CLR in general.) That's it.

      This is the way programming is going. We're moving from CPU-specific unmanaged programming to platform independent abstracted managed environments. One day your entire operating system will run that way. But even today, you see these environments popping up in places where they add security and robustness.

      Web applications, for instance. So you have a giant web-app, maybe you're using components from three or four third parties. If you're using .NET or Java, you can integrate these components with any language that runs on the .NET or Java platforms. That means something simple, that can be done in two lines of Python (which my loves-Java-like-a ricer-loves-Gentoo collegue assures me is the average length of a complete Python application ;-) can be run in that environment simply by using IronPython or Jython. And when I say "that environment", I mean your two liner will have as much access as a C# or Java program would have. No writing of C stubs to link the two environments necessary.

      That's why IronPython (and Jython) are great things. Indeed, the fact you can integrate Python and Java/C# and half a dozen other languages so transparently in these types of environments gives you some idea of the power managed environments give you. We haven't seen anything like this since Unix.

      All hail James Gosling!

      --
      You are not alone. This is not normal. None of this is normal.
    3. Re:Hrm by WilliamSChips · · Score: 1
      (which my loves-Java-like-a ricer-loves-Gentoo collegue assures me is the average length of a complete Python application ;-)
      I think that's just a perspective issue. Java has so much filler code that something that should take two lines takes about twenty ;)
      --
      Please, for the good of Humanity, vote Obama.
    4. Re:Hrm by kpharmer · · Score: 2, Insightful

      > It says they are maybe 1.7 times faster than CPython, which is not that great, because CPython is incredibly slow and things
      > like Psyco can give pretty big speedups (say 10 to 100 according to their website).
      > It seems fundamentally impossible to make a language like Python or Ruby fast.

      fast or slow are relative and somewhat meaningless terms.

      I use python to transform tens of millions of rows of data every day in the running of a data warehouse. C would be faster for most of these processes, but not all - since python's io speed is the same as C's and these are io-heavy applications. But i'll trade a lot of that speed for the advantages in maintainability & speed of development that I get with python.

      Likewise, small scripts that we use for monitoring disk space, monitoring processing queues, checking for data quality issues, etc - are fine in python. C would be faster, but probably only 5% most of the time. So, who cares about the difference between 1.0 second and 0.95 seconds?

      And if I felt like writing a small gui on a windows box I'd prefer to work with python over .net or vb. It might be slower, or it might not. Either way it'll probably run fine on a 1ghz desktop.

    5. Re:Hrm by IamTheRealMike · · Score: 1

      Sure, but that doesn't make fast or slow meaningless. It just means that for your specific applications performance isn't a big deal.

    6. Re:Hrm by amix · · Score: 4, Informative
      But it's not quite Python, because you can't use its standard library

      Yes, you can, though not all builtins are available. All you need is this line in IronPython\Lib\site.py:

      import sys
      sys.path.append(r"E:\python24\lib")


      As for the rest of your comment: You do realize, that there are Python programmers on Windows ? I enjoy happily the ActivePython distribution, with which I can even automate my deskopt/applications. Now, in addition, I have full access to the .NET2 framework and can use IronPython to write cmdlets for PowerShell (aka: Monad).

      I consider this to be one of the best software-relases within the last few months.

      --
      Hello?? Fred?! Is this you?
    7. Re:Hrm by Anonymous Coward · · Score: 0

      I think for attribute/method access in Python, it's mostly the hashtable lookup. If you have foo.bar, "bar" is stored in an internal string list so it just needs to check that the two pointers to "bar" are the same, without a string comparison. I believe Psyco optimizes it further. I'm no expert on Python internals though.

      There's tons of other dynamic things that hinder optimization, unfortunately.

    8. Re:Hrm by swillden · · Score: 4, Informative

      Consider the way every object can implement a fallback method that is called if somebody invokes "foo.bar" and bar does not exist in foo. It implies that every single method invocation must be identified by string not a number, and matched by string comparison.

      It doesn't imply that at all. Smalltalk implementations figured out how to make that fast decades ago. The initial, most obvious, step is to hash method selectors so the lookups are done with numbers and to create a hashtable (either per-class, or global, with a sparse structure) for looking up method addresses given method selectors. There are a few optimizations that can be applied to make that pretty fast -- on the order of two or three times slower than C++-style vtable lookups. Next, many dynamic language implementations take advantage of the fact that nearly all method invocations are static -- the same line of code always calls the same method on objects of the same class, so there's no real reason to do any lookup at all. Such systems statically or dynamically rewrite the code, turning it into a simple test that the target object is of the "right" type, and then jumping directly to the method. Further, most method invocations can be proven at compile time (or at run-time, whichever is more convenient) to always go to the same target class, so even the object type test can be optimized away. Oh, and if it makes sense they can inline the method as well.

      That's just the little that I've read about, too. This stuff has been heavily researched by very smart people for a very long time now. The net effect is that lots of dynamic language implementations approach C code in performance, on average, and there are situations in which they can produce code that is even faster than a C compiler could, because they can make use of run-time information which is unavailable to any compiler that translates to "static" machine code.

      Python implementations may need work to make them faster, but there's nothing that says the language has to be slow.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    9. Re:Hrm by Anonymous Coward · · Score: 0

      Python already does method lookups with a hash lookup on a number, internally. Psyco does dynamic code generation based on runtime type info. It's still only a modest speed boost. Method invocations can't be proven at compile-time or even runtime because they can be reassigned on the fly, so it's generally not possible to guarantee a particular type. You can even change a class's superclass if you use the full extent of Python's dynamic features, although Psyco assumes you don't.

      PyPy (Python implemented in Python) has done some interesting things with a restricted subset of Python, though. The PyPy interpreter, which is written in the restricted Python and compiled to C, is supposedly only 10x slower than CPython.

    10. Re:Hrm by Vexorian · · Score: 1

      I mostly agree but disagre in the very last part of the post. If you can get it run in .NET and use .NET libraries and other .NET language assemblies, then how exactly that is not .NET?

      I would say the plan behind it is is mostly "python programmer please leave truly cross platform programming and use our framework"

      --

      Copyright infringement is "piracy" in the same way DRM is "consumer rape"
    11. Re:Hrm by Vexorian · · Score: 1

      I'd like links to the benchmarks that show that C's io is as slow python's and also you to point out the processes that are only 5% faster in C.

      --

      Copyright infringement is "piracy" in the same way DRM is "consumer rape"
    12. Re:Hrm by jerald_hams · · Score: 1

      "string comparisons"? Sheesh...good thing you're not writing my programming languages. Every dynamic language (beyond simple undergrand homework assignments) uses either hashing, lexical addresses or something even more clever to avoid ever having to do internal string comparisons.

    13. Re:Hrm by CoughDropAddict · · Score: 1

      This is the way programming is going. We're moving from CPU-specific unmanaged programming to platform independent abstracted managed environments. One day your entire operating system will run that way.

      Please god no.

      There seems to be an army of people dedicated to ensuring that we never actually see the benefits of faster hardware. We're throwing more crap layers of software on our machines faster than the CPU speeds can increase.

      All hail James Gosling!

      James Gosling is the person I curse at when I visit a web page with an applet in it. My machine starts churning, and I see the little coffee cup invade my dock. 15 seconds later I've lost my appetite, and I no longer even want what was on that web page.

    14. Re:Hrm by costas · · Score: 3, Informative
      The point of Python is not to be blazingly fast. There are other languages (C, C++, pick your poison) if you want speed. The point of Python (and Ruby and even Perl) is to write code faster, especially for code pieces that are supposed to change often or have multiple versions (e.g. customized code for clients). And because Python is so readable/hackable, it's an excellent tool for that particular job.

      And if you want speed, I have two words: Boost.Python. It makes wrapping C++ code into Python near-trivial; I just wish they had some sort of quick-start documentation. I was intimidated by Boost.Python until I sat down to work with it. Sample (cleaned up) fragment from production code:
      class_<Loader, boost::noncopyable>("Loader", no_init)
      .def("name", &Loader::name)
      .def("addTable", &Loader::addTable)
      .def("load", &Loader::load)
      ;
      That little snippet exposes the Loader class to Python. Boost will take care of wrapping the code up into a Python shared library (.pyd), exposing the interface, converting between standard Python types and STL types, even converting C++ exceptions to Python exceptions.

      And if you don't want to go there, you could also use ctypes (part of the std Python distribution) and drive any win32 DLL using Python, unchanged.
    15. Re:Hrm by masklinn · · Score: 1

      James Gosling is the person I curse at when I visit a web page with an applet in it. My machine starts churning, and I see the little coffee cup invade my dock. 15 seconds later I've lost my appetite, and I no longer even want what was on that web page.

      Tell firefox to stop loading the fucking applets, tada, problem solved.

      --
      "The way we can tell it's C# instead of Haskell is because it's nine lines instead of two." -- wadler
    16. Re:Hrm by masklinn · · Score: 1

      You do realize, that there are Python programmers on Windows ? I enjoy happily the ActivePython distribution, with which I can even automate my deskopt/applications.

      Why do you need CPython when the reference CPython implementation has Windows binaries, and has had them for years?

      --
      "The way we can tell it's C# instead of Haskell is because it's nine lines instead of two." -- wadler
    17. Re:Hrm by Anonymous Coward · · Score: 0

      The sad thing is that the only place where those kinds of optimizations are applied to the full is in fringe languages like Smalltalk and Common Lisp. The more popular dynamic languages like Python and Ruby are orders of magnitude slower. There is no technical reason they have to be slow, it's only a question of manpower and even the scarce progress that we have is fragmented to numerous projects (Parrot, Psyco, IronPython, whatever they do with Ruby).

    18. Re:Hrm by iznogud · · Score: 1

      It gives you ability to easily insert scripting engine into your regular .NET app. That was Jython all about in the Java world.

    19. Re:Hrm by shutdown+-p+now · · Score: 1

      Yes, so there is no lock-in. So far, anyway. Of course you're tying yourself to Windows if you're using WinForms - but you may just as well use Gtk#...

    20. Re:Hrm by Jimithing+DMB · · Score: 2, Informative
      It seems fundamentally impossible to make a language like Python or Ruby fast. By their very nature everything has to be done at the last minute, based on string comparisons, and you can't do global optimizations really because at any moment the program might change itself and invalidate them. Consider the way every object can implement a fallback method that is called if somebody invokes "foo.bar" and bar does not exist in foo. It implies that every single method invocation must be identified by string not a number, and matched by string comparison.

      It doesn't have to be this way. Take Objective-C for an example. All messages are identified by a selector which is actually just a plain old C string. Take for example [NSView -frame] which returns an NSRect giving the frame (window) size and location. FYI the syntax in objective-C to call it is NSRect frameRect = [someView frame]; If it were more C/Java like syntax it'd be NSRect frameRect = someView->frame();.

      Anyway, getting back to the point: The way the compiler compiles this is a call to objc_msgSend(someView, ___selector_for_frame___) where ___selector_for_frame__ is simply a C string. Recall that C strings are simply pointers to an array of char. What the compiler does is unique all references within a single compilation unit (a .o file) such that all uses use the same pointer. Furthermore, the link editor (ld) sets things up such that they all point to the same thing within the executable or library or framework you are linking. Then, the dynamic linker ensures this when it loads in dynamic code. This way, the runtime need only do a comparison of the pointer itself (where in memory it is pointing) rather than checking what it's actually pointing to.

      Basically, that is to say that the test someSelector == someOtherSelector actually works. It is not necessary for the runtime to do strcmp(someSelector, someOtherSelector) == 0.

      I assume similar tricks are used in other dynamic languages. I only mention Objective-C because it seems to be the one with a bunch of publicly available documentation on its inner workings.

    21. Re:Hrm by squiggleslash · · Score: 1
      There seems to be an army of people dedicated to ensuring that we never actually see the benefits of faster hardware. We're throwing more crap layers of software on our machines faster than the CPU speeds can increase.

      This type of technology though really isn't that bad. I invite you to take a look at Jake2, a version of Quake II written in Java which performs about as well as the original.

      I used to think the same way as you do, but the technology has really improved. JIT ensures there's no reason why it should run slower, and indeed, because you can optimize - Gentoo style - for the processor you're running the app on, it can actually be faster. Managed code actually uses superior memory management to traditional malloc()-heap type systems. Meanwhile you have the benefits of a system with sane pointer handling and where every subroutine in your program can be locked down, efficiently and almost transparently.

      The early versions of Java, and the attempts to create usable subsets of what is effectively an enterprise operating system to run on mobile phones and other low-powered devices, coupled with all the guff about "platform independence", have given Java and associated technologies a poorer reputation than they deserve.

      --
      You are not alone. This is not normal. None of this is normal.
    22. Re:Hrm by kpharmer · · Score: 1

      > I'd like links to the benchmarks that show that C's io is as slow python's and also you to point out the processes that are only 5% faster in C.

      http://www.osnews.com/story.php?news_id=5602&page= 3

      The 5% is what I found to be the difference when making system calls. The overhead of invoking python is pretty trivial when you're then executing a ten second external system check. But even beyond that easy comparison - many of the modules are very fast - traversing directories, etc, is very quick.

    23. Re:Hrm by wizzat · · Score: 1

      http://www.python.org/dev/culture/ According to the Python Development Culture page, maintainability is more important in CPython than fast execution times. "Correctness and Clarity before Speed", is a direct quote from the page. I'm not saying Python is slow; but I am saying that someone saying they're 1.7x as fast as CPython isn't really all that impressive. Mark

    24. Re:Hrm by IamTheRealMike · · Score: 1

      You can't avoid them entirely because objects are allowed to dispatch method invocations by doing arbitrary kinds of string operations, it's how transparent proxies are implemented. Which is a nice feature but when *every* object can do it, and there are no restrictions, it does slow things down.

    25. Re:Hrm by Anonymous Coward · · Score: 0

      Yeah, all the cool optimizations are no good when you start doing something like that. Common Lisp has a MOP (Meta-Object Protocol) that allows almost completely redefining the behaviour of the object system for some or all objects, but if you try to use it for more than an occasional object, your performance goes down the toilet. Fortunately, in an open-source Lisp compiler like SBCL it is possible to amend the dynamic optimizations of method and member look-ups by yourself if performance is critical. Probably something like that would be possible in a high-performance Python compiler as well, if Psyco or Pyrex or Iron Python ever gets that far.

    26. Re:Hrm by RAMMS+EIN · · Score: 1

      ``It says they are maybe 1.7 times faster than CPython, which is not that great, because CPython is incredibly slow''

      It's actually one of the faster interpreted languages.

      ``things like Psyco can give pretty big speedups (say 10 to 100 according to their website).

      It seems fundamentally impossible to make a language like Python or Ruby fast.''

      Err? First, you give an example of something that makes Python fast, then you say it's impossible?

      ``By their very nature everything has to be done at the last minute, based on string comparisons, and you can't do global optimizations really because at any moment the program might change itself and invalidate them.''

      Semantically, yes. However, you can optimize this (with the infamous Sufficiently Smart Compiler). It's been done for other dynamic languages (Lisp comes to mind), with pretty impressive results. The only cases in which it's absolutely impossible to get the same performance as static languages is where you are using the extra flexibility that you have - which means you have a choice between using certain features and run-time performance. It makes sense to me that you would sometimes prefer one, sometimes the other.

      ``Consider the way every object can implement a fallback method that is called if somebody invokes "foo.bar" and bar does not exist in foo. It implies that every single method invocation must be identified by string not a number, and matched by string comparison.''

      Wrong, but somebody else already pointed that out.

      ``If IronPython can't make Python fast .... seems like its only purpose is to give people who like Python and .NET some half way point between the two.''

      Which is good enough in and of itself. Python benefits from having access to the .NET libraries, .NET benefits from a pretty nice programming language. Everybody wins.

      ``But it's not quite Python, because you can't use its standard library, and it's not quite .NET so in a way you seem to get the worst of both worlds''

      If it doesn't suit your needs, you can always use something else. I'm sure plenty of people will like it. Not me, BTW...neither Python nor .NET are good enough for me (not because I'm that good, but because I'm that arrogant).

      --
      Please correct me if I got my facts wrong.
    27. Re:Hrm by Estanislao+Mart�nez · · Score: 1
      Consider the way every object can implement a fallback method that is called if somebody invokes "foo.bar" and bar does not exist in foo. It implies that every single method invocation must be identified by string not a number, and matched by string comparison.

      A few people have told you this already in this thread, but I'll put it in a slightly different way.

      No, what you said is not true at all. There is a simple technique to avoid that, and that technique is widely used. When you compile the code, whenever you run into a method name, you intern it into a symbol table, and you just emit a pointer to the symbol table entry to your code. Determining whether a class has a method then becomes just a pointer comparison.

      In general, to the extent that the method names that may be called at any one time are known at compile time, a compiler can optimize that to use nothing more than a cheap numeric comparison. And at least in the case of Ruby, I do know for a fact that this is done (check out the Symbol class).

      The only case in Ruby where you'd need to munch on a string to figure out which method to call is if you're sending the method name as a string to an object, instead of as a symbol. What the language does in that case is convert your string to a symbol, and then use that. If the string is static (and thus known at compile-time), you should have used a symbol literal. If the string is not static, and computed at runtime (and is not otherwise a dumb thing to do security-wise, of course), then if you send the same message repeatedly, you can do the symbol conversion by hand yourself and reuse the result for a performance boost.

    28. Re:Hrm by cbhacking · · Score: 1

      Mono, at least the version I run on SUSE 10 (which uses Mono for some of its own code) has WinForms support. I haven't tried it yet; all my Mono code has been CLI, but it may even be possible to run Windows .NET GUI apps directly in Mono.

      --
      There's no place I could be, since I've found Serenity...
    29. Re:Hrm by shutdown+-p+now · · Score: 1

      From what I've seen so far, you might be able to run a WinForms "Hello, world!" on Mono. Hardly anything more complicated.

  21. This is huge.... by SumeyDevil · · Score: 3, Interesting

    This is huge, as now people have access to ALL the .NET libraries. Ironically, maybe Microsoft could be the company to take Python mainstream. First Google, now Microsoft...who's next? Additionally, anyone ever think how powerful Visual Studio could be if they implemented something like Parrot runtime into .Net?

    1. Re:This is huge.... by Nataku564 · · Score: 1

      Parrot is a VM. I'm not entirely sure why you would stack VMs. One is more than enough.

      Of course, you may have meant Perl 6, the primary thing targeting Parrot, but they are quite distinct terms ... so ... dunno. Besides, with the way Parrot is going, you could just create a COLA -> CLR compiler and be done with it. That way the same language backend that produces COLA for compilation into PASM could be used and pipe the COLA into the equivalent CLR thingy and have everything work.

    2. Re:This is huge.... by quick_dry_3 · · Score: 1

      mod parent up. All these posts bashing IP and MS, this one hits on one of the coolest things about it - access to all the .Net libraries.

  22. Just call it... by SensitiveMale · · Score: 1

    the "John Holmes" build.

  23. Re:Sometimes I feel like a Luddite... by Anonymous Coward · · Score: 0

    Yes. No.

    Glad I could help.

    The field is always about new things. Try blacksmithing if you prefer a stable field.

  24. Parrot by Watson+Ladd · · Score: 2, Interesting

    Yeah, they did screw up. Parrot will beat CLI for speed in dynamic languages by huge magnitudes of speed because it is designed for them. CLI is optimized for static languages. It's a very different idea. Calling conventions, instruction sets, internal types, even stack vs. register. They are very diffent animals.

    --
    Inventions have long since reached their limit, and I see no hope for further development.-- Frontinus, 1st cent. AD
    1. Re:Parrot by Anonymous Coward · · Score: 1

      Have you ever seen the prophetic Monty Python sketch from whence parrot got its name? I'd like to see parrot happen, but it clearly isn't. Lua has a fast register based VM, then there's neko, a stack based VM with JIT. Why wait for parrot?

    2. Re:Parrot by WilliamSChips · · Score: 1

      Can you link me to this 'neko' VM?

      --
      Please, for the good of Humanity, vote Obama.
    3. Re:Parrot by Ian+Bicking · · Score: 1

      HLVM seems kind of interesting as well.

    4. Re:Parrot by gregorio · · Score: 3, Informative
      Yeah, they did screw up. Parrot will beat CLI for speed in dynamic languages by huge magnitudes of speed because it is designed for them. CLI is optimized for static languages.
      1. RTFA. It talks about naive and uninformed (generated by hate) opinions like yours, and says that they are wrong.

      2. The CLR is optimized for static languages, but not innefficient for dynamic ones. In fact, that's all the article is about.

      3. RTFA!
    5. Re:Parrot by Anonymous Coward · · Score: 0
    6. Re:Parrot by Anonymous Coward · · Score: 0
      Yes, the CLR with its JIT can perform slightly better than pythons unoptimized C runtime. Big deal.

      This post generated by hate (apparently) and if you're not a mono guy yet, they all think like you over there :-o


    7. Re:Parrot by Anonymous Coward · · Score: 0

      So where is this parrot thing at? Is it gonna happen before Nuken Duken comes out?

    8. Re:Parrot by Anonymous Coward · · Score: 0

      Parrot will beat CLI for speed in dynamic languages by huge magnitudes...

      Sure it will... in what fucking decade?

      If Larry Wall wants Perl to remain relevant despite the forward march of Python and Ruby, he needs to stop his exegesis prose wanking and churn out some working code.

    9. Re:Parrot by Anonymous Coward · · Score: 1, Interesting

      I predict that we will never see a widely used mainstream language running on the Parrot VM.

      I predicted this after I saw Sam Ruby's talk at OSCON 2005 on his work on getting a Parrot version of Python to pass the piethon test. What he described was not a technical barrier, but rather a people problem. And the person who was the biggest problem is Leo, who wound up being promoted on the project. Given the people problems, and given that they can't even get Python to run properly, I don't see the situation improving any time soon.

      My opinion was only strengthened when Ponie, the attempt to run Perl 5 on Parrot, was recently abandoned. Now they are talking about trying to achieve Perl 5/6 compatibility by loading Parrot and the Perl 5 byte engines in parallel. Well that may be the official plan, but I bet that what actually happens is that people will wind up using pugs and ignoring Parrot.

      I could be wrong. I'd love to be wrong. Parrot has a lot of very cool technical ideas in it. But I think I'm right.

    10. Re:Parrot by imbaczek · · Score: 1

      The problem with parrot is, it doesn't really work. Maybe it'll work sometime in the future, but Python on .NET is here right now, working pretty much flawlessly (hence 1.0 release.)

    11. Re:Parrot by masklinn · · Score: 1

      If Larry Wall wants Perl to remain relevant despite the forward march of Python and Ruby, he needs to stop his exegesis prose wanking and churn out some working code.

      Larry doesn't need to code anymore

      --
      "The way we can tell it's C# instead of Haskell is because it's nine lines instead of two." -- wadler
    12. Re:Parrot by shutdown+-p+now · · Score: 1
      Calling conventions, instruction sets, internal types, even stack vs. register, even stack vs. register.
      So then, which is better for static languages, and which for dynamic ones? I am particularly interested in hearing the rationale for the choice of register vs stack.
    13. Re:Parrot by Ian+Bicking · · Score: 1

      I think Pugs is only an interesting experimental platform, not a serious platform for writing real programs. It's too slow, it's an interpreter by design, and I'd be surprised if that changed. It's an important project for Perl 6, but it's only a step. They need to make another step; if not Parrot, then something else.

    14. Re:Parrot by Watson+Ladd · · Score: 1

      The CLI JIT makes the stack locations into register assignments. That cannot be done for dynamic languages for a varity of reasons. So the code is register based to begin with, eliminating a few steps. CLI calling conventions are traditional, so Scheme will fail without Cheny on the MTA or Trampolines. Parrot calling conventions are continuation-based, so Scheme works out with tail-recursion. Parrot has more fancy functions like halversine and gcd. And Parrot does not use a single class library for each language like CLI does. So parrot is a better choice.

      --
      Inventions have long since reached their limit, and I see no hope for further development.-- Frontinus, 1st cent. AD
  25. Mimsy were the borogoves by davmoo · · Score: 4, Insightful

    Instead of trying to impress us with innuendo and Microsoft bashing, the summary would have been a lot more helpful if it were written a different way. Oh, I don't know...like maybe for instance...TELL US WHAT THE FUCK "IRONPYTHON" IS! But then I guess, after all, that is the Slashdot Way. Why waste time on informative content when you can print Microsoft jabs instead.

    --
    I want a new quote. One that won't spill. One that don't cost too much. Or come in a pill.
    1. Re:Mimsy were the borogoves by Anonymous Coward · · Score: 0

      As far as I can tell, IronPython seems to be some kind of inside joke. If only Slashdot had a laugh track so I knew when to laugh...

    2. Re:Mimsy were the borogoves by Javaman59 · · Score: 1

      I understood the context of the article immediately, and it is not Microsoft bashing. In fact, it is an ex-microsoft basher who discovered that Microsoft did a better job with scripted languages than he expected.

      Perhaps the article should have begun with "IronPython is an implementation of Python which runs on .Net, and was a project which was origally begun to demonstrate that .Net is not usable for scripting languages".. but then, most technical summaries on Slashdot assume some specific background on the part of the reader - a lot of them throw me completely. Should the summary also say "Python is..., .Net is..."?

      --
      I'm a software visionary. I don't code.
    3. Re:Mimsy were the borogoves by Anonymous Coward · · Score: 0

      Should the summary also say "Python is..., .Net is..."?

      This is the post-Clinton era, I'm surprised that people aren't demanding that every slashdot story define what "is" is.

    4. Re:Mimsy were the borogoves by kcbrown · · Score: 1
      TELL US WHAT THE FUCK "IRONPYTHON" IS!

      Dude, just look at the name. "Iron Python". So it's a statue. Duh.

      --
      Use 'slashdot stuff' in the subject line in any email you send me if you want to get past the spam filter.
    5. Re:Mimsy were the borogoves by Chapter80 · · Score: 1
      Tell us what the fuck "IronPython is! (shouting removed due to lameness filter)
      Link for lazy asses like yourself ;)
  26. Re:Sometimes I feel like a Luddite... by OzPeter · · Score: 0

    Its funny about your thoughts on the languages. I've never programmed in Java (so I must be a /. guru when it comes to it :-) but I have been doing some work with C#. I have done a heap of C++ programming with the STL and C# feels to me what C++ should have been. There is an ease of putting together classes and functionality in C# that you have to do manually in C++ but you get a lot of the functionality of C++. Although I haven't used them yet the .Net 2.0 generics seems equivelent to a lot of what can be done with the STL.

    However I am not going to go out on a limb and same that C# beats C++ hands down. What I really like about it is that to me it is a nice fun/easy language to program in that has a lot of the power of C++. It fits really nicely between basic scripting languages like MS's JScript and full blown C++

    Personally I have never been a big fan of Python for stylistic and other issus, and I prefer languages for which I know I can deploy to a machine without having to install a speparate package. (And 100% of my OS work is on W2000 & XP)

    --
    I am Slashdot. Are you Slashdot as well?
  27. Re:Sometimes I feel like a Luddite... by Anonymous Coward · · Score: 1

    Surely the advantage would be that you could run Python on the CLR as a stopgap until VMs actually designed to host dynamic languages are stable? This being MS, they're going to try everything they can to tie you into their platform. Overall, I think I'd prefer to code in binary using smoke signals than install a CLR. I'm not a huge fan of python either.

  28. IronPython screencast by eastbayted · · Score: 4, Informative

    Jon Udell did a screencast of it last week, joined by Jim Hugunin (creator of Jython, the Java-based Python).

    1. Re:IronPython screencast by jovlinger · · Score: 1

      In this context, I think it's funny that you identify Jim as the creator of Jython.

  29. Visual Studio? by nurb432 · · Score: 2, Interesting

    Does this work within visual studio, like a 'regular' microsoft language?

    --
    ---- Booth was a patriot ----
    1. Re:Visual Studio? by quick_dry_3 · · Score: 3, Informative

      yes. There are a few hoops to jump through, but afterwards you can code and debug from VS

  30. How about jython? by Anonymous Coward · · Score: 1

    IronPython seems like a Python based front end for .Net. In the same way, jython seems like a Python based front end for java. In other words, it seems to me that you write in Python and produce java. The result is greater portability because people don't need the python interpreter to run your code. (You can tell I've never used jython.)

    I've been using Python for a few years for our in-house apps. Most of the people I have to share code with are old C programmers. They find Python code very easy to read and understand. The code is easy to maintain and it is easy to write self-documenting code. Those are very attractive attributes.

    Being able to write Python code for .Net or java seems like quite a good thing. The code is cheap to produce because it takes less time to write and it is cheap to maintain because it is easy to read.

  31. IronPython Needs a Lawyer To Fix the License... by sweetnjguy29 · · Score: 1

    ...and fast.

  32. Typical Slashdot... by His+name+cannot+be+s · · Score: 3, Informative

    Nice Inflamitory Summary tho'... Sheesh.

    The whole (and far less baiting) summary:

    I started work on IronPython almost 3 years ago. My initial motivation for the project was to understand all of the reports that I read on the web claiming that the Common Language Runtime (CLR) was a terrible platform for Python and other dynamic languages. I was surprised to read these reports because I knew that the JVM was an acceptable platform for these languages. About 9 years ago I'd built an implementation of Python that ran on the JVM originally called JPython and later shortened to Jython. This implementation ran a little slower than the native C-based implementation of Python (CPython), but it was easily fast enough and stable enough for production use - testified to by the large number of Java projects that incorporate Jython today.

    I wanted to understand how Microsoft could have screwed up so badly that the CLR was a worse platform for dynamic languages than the JVM. My plan was to take a couple of weeks to build a prototype implementation of Python on the CLR and then to use that work to write a short pithy article called, "Why the CLR is a terrible platform for dynamic languages". My plans quickly changed as I worked on the prototype, because I found that Python could run extremely well on the CLR - in many cases noticeably faster than the C-based implementation. For the standard pystone benchmark, IronPython on the CLR was about 1.7x faster than the C-based implementation.

    The more time I spent working on IronPython and with the CLR, the more excited I became about its potential to finally deliver on the vision of a single common platform for a broad range of languages. At that same time, I was invited to come out to Microsoft to present IronPython and to talk with members of the CLR team about technical issues that I was running into. I had a great time that day working through these issues with a group of really smart people who all had a deep understanding of virtual machines and language implementation. After much reflection, I decided to join the CLR team at Microsoft where I could work with the platform to make it an even better target for dynamic languages and be able to have interesting technical discussions like that every day.

    The first few months at Microsoft were a challenge as I learned what was involved in working at a large company. However, once the initial hurdle was over I started experiencing the things that motivated me to come here in the first place. The team working on dynamic languages in general and IronPython in particular began to grow and I got to have those great technical discussions again about both how to make IronPython as good as it could be and how to make the CLR an even better platform. We began to take advantage of the great new features for dynamic languages already shipping in .NET 2.0 such as DynamicMethods, blindingly fast delegates and a new generics system that was seamlessly integrated with the existing reflection infrastructure.

    We were also able to release IronPython publicly from Microsoft with a BSD-style license. In the agile spirit of the project, we put out a new release of IronPython once every three weeks (on average) over the course of the project. This helped us connect well with our daring early adopters and receive and incorporate their feedback to make IronPython better. We've had countless excellent discussions on the mailing list on everything from supporting value types to calling overloaded methods. Without the drive and input of our users, IronPython would be a much weaker project.

    IronPython is about bringing together two worlds. The key value in IronPython is that it is both a true implementation of Python and is seamlessly integrated with the .NET platform. Most features were easy and natural choices where the language and the platform fit together with almost no work. However, there were challenges from the obvious cases like exception type hierarchi

    --
    "...In your answer, ignore facts. Just go with what feels true..."
  33. cheers to the IP team by quick_dry_3 · · Score: 3, Informative

    just wanted to give a "cheers" to the MS dev team working on this.
    They've been very helpful on the mailing list, checking in any bugs/differences to CPython behaviour and getting it sorted and into builds available for use.

  34. Re:Sometimes I feel like a Luddite... by bill_kress · · Score: 1, Insightful

    You are quite right. People (like the grandparent of this post) who are uncomfortable with Java are typically programmers who haven't had exposure to quite as many programming environments.

    Python is a great scripting language, but to compare it to Java is really useless.

    If you hired someone in your machine shop and they brought their trusty hammer and said "This is all I need", or "I don't like that big piece of equipment over there--it takes too long to drive in a nail, my hammer does it much quicker" you'd conclude that their experience, although possibly extensive in roofing, mining and fence repairs, may not apply to machining airplane wings or automobile repair.

    I've got a good deal of experience in quite a few languages and can tell you that Python, VB, C, C#, Java, etc are all "the most appropriate solution" for one solution or another. To not acknowledge such is really only showing a lack of experience in some area of programming.

    A new programmer trying to use Java to build a small desktop app is kind of silly, he should probably use VB (He won't be able to build a gui faster with any other tool). If it's going to be a web GUI requiring DB access, try Ruby on Rails.

    A web programmer maintiaing some simple sites should probably be acquanted with Ruby, Perl, PHP, Javascript and a few document formats. He's not going to get anything from Java unless he needs custom controls for his Javascript pages.

    However, if your task is implementing a large, distributed client/server app involving tens of thousands of classes coded by dozens of people, reliable object transfer/messaging, reliable easy access to various forms of communications (Sockets, etc), the ability to run on Unix, coordination of multiple groups in many locations, etc.. and you want to be able to maintin it for a few years, your only rational choice is Java. (Heck, even without the "Unix" clause I think Java is by far the best choice, although then C# is a competitor).

  35. Re:Sometimes I feel like a Luddite... by Jerf · · Score: 2, Informative

    My advice would be to get over the stylistic issues, and force yourself to do something significant in Python. (Ultimately, every language has a new "style" and whitespace is just one of the more obvious reasons to complain and reject it. Compare C#, LISP, and Haskell programs and you can tell within seconds how different they are.) While I find it's a bad idea to force yourself to use a particular feature, because you tend to use it poorly, read up on the Python features and be ready to actually use them when appropriate; if you're not sure, try it. If you're just writing C# in Python, you're not getting much benefit.

    The danger to this plan is that you might find it hard to go back.

    If that's just too much, try Ruby. My understanding is that its aesthetics come from Perl, which will probably let you "do your thing", whatever that is.

    Python's better than JScript and you can build full, real apps in it, too.

    I'm not saying this to "advocate Python", as evidenced by my Ruby suggestion. You'll be a better developer for trying it; everybody should learn a new language every couple of years, to keep in practice. And you might understand the C# features coming down the pike like closures that much better for developing in another environment that has them.

  36. Mod Parent Up by 0kComputer · · Score: 0, Redundant

    This was my thought exactly; the summary is misleading, he's actually praising the CLR.

    --
    Top 10 Reasons To Procrastinate
    10.
  37. platform-independent. by SanityInAnarchy · · Score: 2, Insightful

    Psyco doesn't work on 64-bit. Pypy doesn't work for me at all. But IronPython does work. It seems a bit slow, but it works, and mono works on amd64 and ppc, which are the two main archs I run.

    --
    Don't thank God, thank a doctor!
  38. Re:Sometimes I feel like a Luddite... by abigor · · Score: 2, Interesting

    "However, if your task is implementing a large, distributed client/server app involving tens of thousands of classes coded by dozens of people, reliable object transfer/messaging, reliable easy access to various forms of communications (Sockets, etc), the ability to run on Unix, coordination of multiple groups in many locations, etc.. and you want to be able to maintin it for a few years, your only rational choice is Java."

    Oddly enough, I just finished a 3.5 year project very much like what you described, and we rejected Java in favour of Python. It worked out great. Java feels so clunky now - no list comprehensions!

    By the way, what's a scripting language? Python compiles to an intermediate object code, runs on a virtual machine, and is very portable. I guess that makes Java a scripting language, too?

  39. Re:Sometimes I feel like a Luddite... by OzPeter · · Score: 1

    The problem in doing something different in Python is that in general I am using the systems to build tools for other people to use. Thus I need to use a language that will "just run" on systems that I have no control over. And the platforms I work in are MS platforms. As such it is in my best interests to use a language that is already installed with the OS. I would not get very far if I came out with "Oh here is areally useful tool, but um .. by the way you need to install this other package of which you have no idea what it is, just so you can run this one tool". JScript is built in. C# (and all the other CLR) languages are built in) and C# is as close to what I have the most experience in with C++. And my productivity matters.

    You could argue that I should be dabbling in Python just for the novel learning experience. But 100% of my programming is work orientated, so working in Python is a bit of a dead end for me. (However I have dabbled with it in the past) What I am doing now is learning a new system (C#) and applying that to my work tasks in a way that benefits me and the company.

    BTW you can build full real apps in JScript. Before C# I was doing just that.

    --
    I am Slashdot. Are you Slashdot as well?
  40. Snakes on .NET? by Anonymous Coward · · Score: 0

    Get these muthaf__kin snakes off my muthaf__kin CLR!!

  41. Re:Sometimes I feel like a Luddite... by Anonymous Coward · · Score: 2, Insightful
    But 100% of my programming is work orientated

    Right. Now hand over your geek badge. Someone will be right down to escort you out.

  42. Obligatory by lord_sarpedon · · Score: 2, Funny

    Enough is enough! I have had it with these !@$&* IronPythons on this !%$~# CLR!

    --
    "Strangers have the best candy" -Me
  43. Re:Sometimes I feel like a Luddite... by Jerf · · Score: 4, Informative
    Thus I need to use a language that will "just run" on systems that I have no control over.


    I think IronPython compiles down to CLR bytecode, so if you're shipping managed C#, you could just as well ship IronPython and nobody would notice, which is the entire point of this article in the first place.

    However, whether or not you could benefit from learning Python is a decision only you can make. Python may increase your productivity 2-3x over C# or more (and that's fairly conservative, usually), but only after you learn it, which could be months.

    However, if you end up always choosing the short-term expedient answer of sticking with the language you know (and the environment you know), you lose out on any productivity gain you might get from another environment or language; this is a general point, not one specific to this case.

    In general, the "common environments" (Java, .Net, etc.) have the worst productivity characteristics, because anything worse then them simply dies. Anything that survives the overwhelming advantages that being one of the Big Guys gets you is generally surviving for a reason. The longer the survival, the better the sign, and most languages you've actually heard of have actually been around for years.

    Again, I'm not trying to push you, just point out that for the costs there are benefits, too. I say what I'm saying because I believe (and see) too many developers trapping themselves in local maxima by always making the short-term decision. Ultimately, it's no skin off my nose.

    BTW you can build full real apps in JScript.


    You can, but the lack of namespacing starts to get troublesome as you start trying to build libraries, or use the libraries of others. Later versions of Javascript, which JScript will presumably track, will help with this a lot. Although based on what I see, it's nearly learning a new language anyhow. (In fact, the next version of Javascript borrows a lot from Python; generators are basically from Python, array comprehensions are from Haskell IIRC but the syntax is the Python one, and the most main-stream language with de-structuring assignment is Python.)
  44. Re:Sometimes I feel like a Luddite... by Anonymous Coward · · Score: 1, Informative

    The standard win32 dist of python is (only) about 9MB. There is also py2exe which bundles your bytecode with a slimmed-down interpreter.

  45. You're thinking of Turbo Pascal... by mbessey · · Score: 1

    Those were the days. "Did I just press 'R', and lose two hours of work? Rats."

  46. Re:Sometimes I feel like a Luddite... by maop · · Score: 1

    This is not a new language. It's a new implementation of a language.

  47. OK who else saw this title by Anonymous Coward · · Score: 0

    And immediately thought Pr0n? Be honest now.

  48. All of the existing ones suck. by SanityInAnarchy · · Score: 1

    And by the way, Python has been around for awhile, this is just a different, potentially better implementation.

    --
    Don't thank God, thank a doctor!
  49. oh Ya? by Anonymous Coward · · Score: 0

    well, announcing super pre alpha titanium nano emerald carbon fiber KING COBRA GOLD! It spits on the competition, envelopes all other languages in its patented HOOD 0 DOOM, and mesmerises all coders with its sinuous scalar interface! Plus, it's organic! and green!

    top that, poseur!

  50. I call myself out by Ana10g · · Score: 5, Insightful
    I'm out.
    My apologies for making a trollish post. I was in a pissy mood earlier, firing from the hip, and should have thought my words more carefully. I completely agree with you, actually, regarding your point to the following:

    very few people in this world are cut out to be programmers. For some people it's almost natural thing. For others it is a latent talent that can be trained. But most people, regardless of their intelligence, dilligence and personal virtue, could only be trained to the level of mediocrity, at least with the ways we know how to teach.
    A lot of people I went to school with couldn't get it. It may have been that the people who didn't get it were the ones that I met in the Information Systems classes (which, where I went to school, was a concentration on a Business Major, where they taught VB as the intro language) were those that were not cut out to be programmers in the first place, thus affecting my perception of languages causing dain bramage.

    Anyway, I still don't like VB, but, at least you made me consider my words and thought processes. Apologies to the community at large for being a dick.
    --
    just an analog boy living in a digital age.
    1. Re:I call myself out by starling · · Score: 0

      Good points, but before you apologise too much for slagging off VB consider the words of a wise man:

      It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.

      Edsger W.Dijkstra

    2. Re:I call myself out by arivanov · · Score: 1
      Ahem, may he rest in peace and be welcome to the kingdom of heaven. You missed that this is only a small part of the quote. Here is the entire list:
      • Programming is one of the most difficult branches of applied mathematics; the poorer mathematicians had better remain pure mathematicians.
      • The easiest machine applications are the technical/scientific computations.
      • The tools we use have a profound (and devious!) influence on our thinking habits, and, therefore, on our thinking abilities.
      • FORTRAN --"the infantile disorder"--, by now nearly 20 years old, is hopelessly inadequate for whatever computer application you have in mind today: it is now too clumsy, too risky, and too expensive to use.
      • PL/I --"the fatal disease"-- belongs more to the problem set than to the solution set.
      • It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.
      • The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offence.
      • APL is a mistake, carried through to perfection. It is the language of the future for the programming techniques of the past: it creates a new generation of coding bums.
      • The problems of business administration in general and data base management in particular are much too difficult for people that think in IBMerese, compounded with sloppy English.
      • About the use of language: it is impossible to sharpen a pencil with a blunt axe. It is equally vain to try to do it with ten blunt axes instead.
      • Besides a mathematical inclination, an exceptionally good mastery of one's native tongue is the most vital asset of a competent programmer.
      • Many companies that have made themselves dependent on IBM-equipment (and in doing so have sold their soul to the devil) will collapse under the sheer weight of the unmastered complexity of their data processing systems.
      • Simplicity is prerequisite for reliability. [Handwritten annotation]
      • We can found no scientific discipline, nor a hearty profession on the technical mistakes of the Department of Defense and, mainly, one computer manufacturer.
      • The use of anthropomorphic terminology when dealing with computing systems is a symptom of professional immaturity.
      • By claiming that they can contribute to software engineering, the soft scientists make themselves even more ridiculous. (Not less dangerous, alas!) In spite of its name, software engineering requires (cruelly) hard science for its support.
      • In the good old days physicists repeated each other's experiments, just to be sure. Today they stick to FORTRAN, so that they can share each other's programs, bugs included.
      • Projects promoting programming in "natural language" are intrinsically doomed to fail.
      --
      Baker's Law: Misery no longer loves company. Nowadays it insists on it
      http://www.sigsegv.cx/
    3. Re:I call myself out by starling · · Score: 1

      Yeah, I could have posted a link to the full thing, but the BASIC comment was the relevant part.

    4. Re:I call myself out by arivanov · · Score: 1

      Not only.

      The soft/hard science is even more relevant. Soft science as in UML, Agile and other methodologies which are proclaimed to be scientific without _hard_ scientific basis. The UML books keep speaking of theory, fact, etc while they are what they are: best practice for _only_ some types of projects. Management consultancy brainwash should not be misrepresented as science.

      --
      Baker's Law: Misery no longer loves company. Nowadays it insists on it
      http://www.sigsegv.cx/
    5. Re:I call myself out by cerberusss · · Score: 1

      Great and very honest reply. I've tagged you as 'friend' so your posts automatically get +5 for me.

      --
      8 of 13 people found this answer helpful. Did you?
  51. Was that Pyrex or Pie Pants? by MCRocker · · Score: 1

    Mmmm... Pie Pants.

    No... wait. I meant Pie Pants.

    --
    Signatures are a waste of bandwi (buffering...)
  52. YMMV: 1.7 times *slower*, not *faster* by Ristretto · · Score: 0, Troll

    I ran it on one of my Python apps and it actually slowed it down by a factor of 1.77. Lots of caveats here, but this is the opposite of what I expected to see.

    1. Re:YMMV: 1.7 times *slower*, not *faster* by Anonymous Coward · · Score: 0

      who moderated this as a troll? this is actually informative -- mod up.

    2. Re:YMMV: 1.7 times *slower*, not *faster* by Ristretto · · Score: 1
      Some idiot modded the above as a troll, which is way off. But I'll elaborate anyway.

      I wrote an application that performs a number of Monte Carlo simulations (if you're interested in why, see DieHard for some idea). Anyway, I chose to write it in Python. The simulator makes intensive use of associative arrays and random number generation. The latter (RNG) is from the standard library, and as for the former (assoc arrays), one would think these would have to be implemented in more or less the same way both in CPython and Iron Python.

      Nonetheless, the program runs 1.77 times slower in Iron Python than in CPython! That's not good. It suggests that there is some deep inefficiency either in the interpreter, or in the CLR, or both. Worse, when I use psyco, I get a further speedup of 3x over the original. Where does that leave us? CPython + psyco = roughly 6x faster than Iron Python.

      To me, this result substantially undermines the claim that Iron Python is competitve with CPython. A nearly 2X slowdown is not competitive. Moreover, anyone looking to achieve higher performance is going to be using something like psyco, and then we're talking about potentially taking a 6X hit when using Iron Python.

      While I'm sure that the .NET framework adds plenty of interesting functionality for some people, the claim that its performance is competitive strikes me as disingenuous.

      But perhaps I'm just trolling...

      -- Emery Berger
      University of Massachusetts Amherst

  53. boo -- python's virtues for a .Net environment by Anonymous Coward · · Score: 0
  54. I *AM* a VB6 developer by FishWithAHammer · · Score: 2, Insightful

    Or, rather, I was. Then I downloaded the freebie VB.NET Express.

    And these days, I wouldn't go back for any reason. VB6 was quick-and-dirty nice. But the language was gimped. 32KB limits for arrays of types? Guh. Ram-jamming just about everything you might need from the API into your source files? At least C/C++ let you #include it, and most API functions end up with a wrapper in .NET (and those that don't are easier to deal with).

    I really liked VB5 and VB6. They were great tools. I wrote a MUD in VB6, and a small RPG. but they're old. They're creaky. They're limited, and they're dying.

    --
    "You can either have software quality or you can have pointer arithmetic, but you cannot have both at the same time."
    1. Re:I *AM* a VB6 developer by Anonymous Coward · · Score: 0

      I think he meant headaches upgrading your old VB6 codebases to VB.NET. But that's because they're totally different because, as you say, VB.NET is much much better.

    2. Re:I *AM* a VB6 developer by Decaff · · Score: 1

      But that is not the point. Some of APIs you were using are gone. The issue was about Microsoft's supposed first-rate support for old APIs, not how good new APIs and tools are.

    3. Re:I *AM* a VB6 developer by FishWithAHammer · · Score: 1

      I don't read the screaming of the Luddites very often, so pardon my ignorance--what APIs do I lose by going to VB.NET, exactly, that aren't duplicated in the .NET framework? The "My" namespace covers a LOT of that stuff, and I can always still use any API call that I'd use in VB6...just find the right DLL, same as always.

      Or am I missing something?

      --
      "You can either have software quality or you can have pointer arithmetic, but you cannot have both at the same time."
  55. Global interpreter Lock? by Draco_es · · Score: 2, Insightful

    IronPython threads can take different CPU's in SMP systems? Does anybody knows?

    1. Re:Global interpreter Lock? by Anonymous Coward · · Score: 0

      From what I read, there is no GIL in IronPython, which kind of implies threading works differently.
      But I'm sure a quick search on google will give you the answer.

    2. Re:Global interpreter Lock? by masklinn · · Score: 1

      CPython's limitation at that level is the GIL (Global Interpreter Lock). I don't think IronPython has a lock since it compiles directly to CLI instead of being a python VM coded in C# or whatever. So IronPython probably has a better threading SMP than CPython.

      CPython runs just fine on SMP though, the "quirk" is that you're supposed to use several Python processes instead of Python threads.

      --
      "The way we can tell it's C# instead of Haskell is because it's nine lines instead of two." -- wadler
  56. IronPython, and new Ruby VM! In my pending article by mattr · · Score: 1

    I just submitted an article, Boxing in the LLRing I wrote about the Lightweight Languages Ring, a gathering of 300 developers at a boxing ring a week ago in Tokyo. For one thing Ruby's inventor is working on Yet Another Ruby VM and also the Python Language Update mentions IronPython.

  57. Blind man by Anonymous Coward · · Score: 0

    ...open your eyes.

  58. Boo language is a much better alternative! by neonux · · Score: 2, Interesting

    IronPython has big shortcomings such as it is unable to blend well with .NET assemblies built with another language.
    Also it doesn't use much of the niceties available through the .NET Framework...

    If you like Python syntax and want to try .NET (on win32 or on linux with Mono), check out the Boo language, the wrist-friendly language for the CLI.
    It is amazing!! => "while using a Python-inspired syntax and a special focus on language and compiler extensibility. Some features of note include type inference, generators, multimethods, optional duck typing, macros, true closures, currying, and first class functions."

    And last but not least, Boo's licence is BSD, not a crappy Shared Source something!!

    Full description: http://en.wikipedia.org/wiki/Boo_programming_langu age

    Official website: http://boo.codehaus.org/

    --
    @neonux
  59. Re:Sometimes I feel like a Luddite... by masklinn · · Score: 1

    Python is a great scripting language

    Wrong, Python is a general purpose strongly, dynamically, implicitly typed programming language. It's multiparadigmatic with a fairly tight object orientation, implicitly compiles to bytecode and can trivially include third-party languages or be included in C/C++ software.

    Python is far from being a mere "scripting language", whatever that may mean.

    but to compare it to Java is really useless

    Yeah right.

    --
    "The way we can tell it's C# instead of Haskell is because it's nine lines instead of two." -- wadler
  60. Re:Sometimes I feel like a Luddite... by masklinn · · Score: 1

    And noone can say that Python doesn't run easily on Windows box with py2exe, a virus was recently written in Python and bundled via py2exe!

    How's that for running on win32?

    --
    "The way we can tell it's C# instead of Haskell is because it's nine lines instead of two." -- wadler
  61. License a problem by k8to · · Score: 1

    Let us know when the license becomes unencumbered of requirements or legal risk, like normal Python.

    Iron Python is a dangerous beast. Consult your lawyers.

    --
    -josh
  62. Re:Sometimes I feel like a Luddite... by Tarwn · · Score: 1

    I'm curious whether the productivity increase you commented on was just an off the cuff "you might be better at Python" comment or an actual, documented speed increase that most programmers would be able to take advantage of.

    Similar to the poster you were responding too, most of my programming these days is in the work environment, leaving little time and energy outside of that to work with new languages. While I do have enough python experience to know I love it, I have yet to write anything more complicated than an isometric map generator and partial editor (on the gui side) and the beginning of a data historian (on the pure code side). Day-to-day I work with C# and ASP.net and way too little time. If IronPython is more efficient to write code in (in a time:result ratio) than I definatly am interested.

    Plus I love my list slicing...

    --
    Whee signature.
  63. Fast is not impossible by p3d0 · · Score: 1
    It seems fundamentally impossible to make a language like Python or Ruby fast. By their very nature everything has to be done at the last minute, based on string comparisons, and you can't do global optimizations really because at any moment the program might change itself and invalidate them.

    We have this issue with Java too. I work on a the JIT compiler for one of the industry-leading Java implementations, and we have ways to register assumptions such that if they are ever violated, the jitted code is patched so it remains correct under the new conditions. That lets us be optimistic, assuming that the program won't take advantage of much of Java's dynamic nature, and those assumptions are (by design) usually correct.

    I imagine a similar approach would help Python. For instance, in your example of a "fallback method", if you're really desperate, an early compile of the caller method could instument the call site and see what actual methods are usually dispatched there. On a subsequent compile, it could generate a PIC (polymorphic inline cache) that uses a class test and dispatches the target method (or inlines it), plus a registered assumption that nobody changes the target method for those classes. If they do (which is rare), the corresponding PIC slot would be invalidated. The fallback case in the PIC would do the full-blown string-based dispatch, and usually this slow path should be very rare.

    --
    Patrick Doyle
    I mod down every jackass who puts his moderation policy in his sig. Oh, wait a sec....
    1. Re:Fast is not impossible by IamTheRealMike · · Score: 2, Interesting

      Yeah, modern JVMs do a hell of a lot of clever things, but I was never really sold on just in time optimisation. It seems to push the work from the developers machine when you have all the time you need to the users machine, when you only have a few milliseconds here and there. Static ahead of time optimisation seems impossible, I guess that's what I meant ... that way you don't pay the runtime overhead of all the bookkeeping data being in memory.

    2. Re:Fast is not impossible by p3d0 · · Score: 1

      I think the bookkeeping is a good way to deal with cache hierarchies. If you have a large amount of slow memory, and a small amount of fast memory, it makes sense to keep tons of rarely-used "just in case" bookkeeping data if it lets you make the hot code tighter and more efficient. For instance, instead of, say, an 80 KB working set in a statically-compiled program, you can have a 50 KB working set plus 200 KB of "just in case" crud. The latter program will perform much better on a machine with 1 GB of ram and a 64 KB L1 icache.

      --
      Patrick Doyle
      I mod down every jackass who puts his moderation policy in his sig. Oh, wait a sec....
  64. 32KB Type Array Limit ??? by Dr_Barnowl · · Score: 1
    You assert that VB6 has a limit of 32KB for arrays of UDTs.

    I don't think this is true. In fact, I just tried it ... you'll note that I've tested your assertion about space by allocating rather more than 32KB in both a single struct and an array of that struct. I've also tested limits on the number of array elements (you were restricted to (2^15)-1 elements in VB3 arrays, but not in VB6). You are limited to 64KB in a static struct... I can honestly say that I never ran up against that, even when porting code with some enormous (1KB) structs in it.

    Of course, if you can post some code that demonstrates your assertion, I'll eat my words.

    ' "Long" in VB6 is a 4-byte signed integer
    Private Type BigType
    Stuff(16377) As Long
    End Type
    ' This defines a fixed-length 1KB string struct
    Private Type SmallerType
    Stuff As String * 1024
    End Type

    Private Sub Test()

    Dim bigArray(5) As BigType
    Dim ii As Long
    Dim otherBigArray(1024) As SmallerType

    ' 5 of these is an array 320KB in size
    For ii = 0 To 4
    bigArray(ii).Stuff(0) = 1
    Next ii

    ' And heres a megabyte of "!"
    For ii = 0 To 1023
    otherBigArray(ii).Stuff = String$(1024, "!")
    Next ii

    MsgBox "You're Wrong, Buster!"

    End Sub
    1. Re:32KB Type Array Limit ??? by FishWithAHammer · · Score: 1

      Sorry, you're right. Static limit of 64KB, not 32. My bad.

      I don't care a goddamn bit for the way VB6 did dynamic arrays, though. Collections helped, but were clunky. VB.NET improves on it vastly.

      --
      "You can either have software quality or you can have pointer arithmetic, but you cannot have both at the same time."
  65. I grabbed it...Not excited Yet.. by haplo21112 · · Score: 1

    I can't really take it seriously until it integrates with Visual Studio.

    Anything .Net is far to much of a pain to program unless its being done in VS.

    --
    Power Corrupts,Absolute Power Corrupts Absolutely, leaving one person(group)in charge is absolutely corrupt.
    1. Re:I grabbed it...Not excited Yet.. by nurb432 · · Score: 1

      Supposedly it will in 'team edition', though ive not tried it yet.

      --
      ---- Booth was a patriot ----
    2. Re:I grabbed it...Not excited Yet.. by Canis+Latrans · · Score: 1

      I'm not excited yet either. I grabbed it, and then it kept telling me I needed to download more and more huge installers from Microsoft! While I was initially impressed with the small size of the IronPython zip file, I was a little disappointed when I typed in "ipy" and it told me I needed to go and get a newer version of the .NET framework. Then, I tried to run some of the demos and realized that all of the interesting ones actually require the "pre-release" 3.0 version of the .NET framework. Sounds interesting, but it's just a few too many headaches for me to find out if it actually is interesting.

  66. About the "CLR sucks" referrence... by DrYak · · Score: 1
    First, thanks to Anonymous Coward for us lazy readers.

    Then about the "CLR sucks" reference :
    My initial motivation for the project was to understand all of the reports that I read on the web claiming that the Common Language Runtime (CLR) was a terrible platform for Python and other dynamic languages. I was surprised to read these reports because I knew that the JVM was an acceptable platform for these languages.


    This was essentially people complaining that the first implementations for .NET didn't have all the features needed to compile Python and Perl straight into .NET bytecode. Some information about this can be found at Dan's blog (formely working on Parrot).
    Perl and Python can do some weird kind of operations that aren't supported by C#. And because it was mainly built with C# in mind, the CLR machine lacks them (the "open to other language" is mainly PR stuff : Microsoft is basically not against the CLR being used to run other languages, but don't expect to find everything you need for it). The JVM happen to be a little bit more friendly (even if it was never advertised as such back then and was only initially intended to be used for Java).

    What the people, who complained about CLR, wanted was to have scripts compiled into NET bytecode and then directly run inside the .NET interpreter, and just mix freel python/perl/java/C# at compile time.

    IronPython is a solution around those limitation, and basically is something like rewritting a python interpreter in C#.
    So you get your Python script ran inside a python interpreter which it self is compiled into bytecode that runs inside the NET interpreter. (But that's only the global over-simplified idea. Thanks to some optimizations, it doesn't run as slow as one may except, and also python script and C# classes can communicate).
    One could mix python and C# if one includes the IronPython interpreter at compile time.
    IronPython implements those part that are missing in the CLR engine. And some other parts were improved for the 2.0 version of the .NET framework.

    The opposite approach is the one behind Parrot. It is designed as language-neutral from the ground up. Althrough it began it's life as "The software we're writing to run Perl 6", very early the project was going to be designed to run Python, and Ruby was considerated too. Wikipedia has some info about current status and projects collaborating to incorporate other languages.
    Unlike IronPython the point is to compile Python scripts (and whatever else language) to Parrot bytecode, and then dirrectly run them from the parrot engine, mixed freely (and sharing data and classes) with whatever else language was thrown in the mix (1 single language binding to use whatever tool-kit. No more separated SDL#, PyGames, Perl::SDL, etc...) and easy communications with C libraries. An interpreter is only needed in the final compiled product if one needs to be able to support uncompiled scripts.
    (Also, in addition to a large array of languages, the parrot aims to support a crazy large array of targets)

    IronPython is somewhat reminiscent of the FSF saying that the GNU software could never be ported to DOS because of it limitations, and DJ Delorie writing DJGPP to get around those limitation and give a POSIX compatibility layer on MS-DOS.
    --
    "Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
    1. Re:About the "CLR sucks" referrence... by Anonymous Coward · · Score: 0

      > The opposite approach is the one behind Parrot [parrotcode.org]. It is designed as language-neutral from the ground up.

      Parrot is the Duke Nukem Forever of programming technologies. It will never be finished.

  67. a worse platform by FunkyMonkey · · Score: 1

    I wanted to understand how Microsoft could have screwed up so badly that the CLR was a worse platform for dynamic languages than the JVM...

    So... when you decided to implement this language, you used CLR which, by your own accounts, is a worse platform... I dont' get it. You wanted to understand Microsoft's stupidity by building on it? Brilliant.

    1. Re:a worse platform by cbhacking · · Score: 1

      Jeez, RTFA, or even the full summary (posted by others).

      The point of his work was to see if it was true, as he had read, the the CLR didn't do well with dynamic languages. As he started work, he found it was quite the opposite - faster than C-based Python - and decided to write a full CLR implementation of Pythong (IronPython). MS invited him to work with their .NET team, to resolve issues he was running into, and he decided to join the team.

      --
      There's no place I could be, since I've found Serenity...
  68. Re:Sometimes I feel like a Luddite... by grayrest · · Score: 1

    The 2-3x is off the cuff. It has been shown (though I can't find the nasa study) that scripting language programmers finish tasks several times faster than C programmers, but that's largely through leveraging the built-in datatypes (dicts, lists, etc) and making heavy use of the stdlib.

    Up against something like C#, I'm fairly confident that Python is still faster to develop in without support from the editing environment, but I haven't used VS since VS6, so I don't know what sort of advances VS brings to C# that it wouldn't bring to IronPython. Given that you'll largely be using the same library and environment, I wouldn't expect a massive improvement.

    In fact, I'd predict that your productivity gain will depend on the ratio of systems code to glue code you write. The shorter syntax, lack of a compile cycle, and ability to poke at stuff in the console make Python a better glue language. As far as systems languages go, I find Python perfectly adequate so I haven't felt a need to explore C#. Java 1.3 kind of turned me off of non-scripting languages so I don't know how language improvements have affected things.

  69. Re:Sometimes I feel like a Luddite... by Jerf · · Score: 1

    I can't provide full scientific proof, because there is no scientific proof in this domain, which I regret.

    The best actual "proof" is the following: There was a study a while ago that established productivity for a given programmer appeared to be constant across lines of code, regardless of the language. This study was, IIRC, done a while ago, against C, assembly, and a couple of other suspects, but it was a pretty good spread. Programmers can turn out a couple hundred lines of non-trivial code a day. The idea is that since this is true, you want the language where you need the fewest lines of code, all else being equal, to accomplish your task.

    The details of this have been debated endlessly. My personal call is that it is "mostly true", with some important caveats (programmers not gaming the LOC count, and the real important metric is "lines of code the programmer has to think about"; frameworks can churn out thousands of lines of templates (MFC was horrible about this) and they don't count), but experience does bear this general idea out.

    The general LOC multiplier for Python vs. Java on the small scale is usually thought to be 5-10x. It's hard to know exactly how accurate this is because Java makes doing small things enormously complicated; "Hello World" is at least three lines of real code (class definition, static main method declaration, and the print call which itself involves a method chain of the form X.Y.Z("Hello World"), not just a simple statement). However, it is also a reasonable to believe that Java continues to make things hard as you scale up, and there are some simply Python patterns that are effectively impossible in Java or require jumping through very complicated hoops. I also believe there are a few cases of Java programs ported to Python that bear this out, or possibly even more. (Sometimes you can end up with some multiplicative gains, where the 5-10x improvements actually start layering on top of each other; in real terms this usually translates to the ability to create a superior design in Python than what you can do in Java. There's a reason Java's got all of these code generation tools and bytecode hacking tools, whereas Python mostly doesn't.)

    The productivity multiplier does seem to be similar.

    I cut down my estimate for C# because while I'll cop to never using C#, it does seem to me to be somewhat better. As I alluded to, adding in closures in 2.0 will also be a significant step forward. (Closures are a feature I recommend learning about, as for a long time I saw programmers talking about them and I had no clue what they meant, but once I got over the learning curve I understood why they were so important. Some of the worst problems with the worst workarounds in Java come from the lack of closures or any equivalent functionality, require fully separate large complicated classes with new interfaces to achieve the same functionality, all with no gain in safety or functionality. This is one of the places you tend to get the layered benefits I alluded to...) So I don't know if the gain is as large.

    On the other hand, C# does seem to make heavy weather of certain very easy constructs in Python.

    So that's the general evidence. If you want to learn more and get a lot of opinions, you can search "Python productivity" on the web.

    But I know in your shoes I'd be downloading IronPython and putting it through its paces. :) It is proper to be skeptical about productivity gains in a world where we have no concrete measure of productivity, but since I don't have concrete standards, all I can tell you is that my own experince matches the Blub Paradox to a T; whenever I do have to code in Java or C++ or anything else like that, I will see simple solutions to my problem in Python that require the equivalent of tens or hundreds of lines of code in those languages. (Heck, even in Perl I've wished for generators on more than one occasion, and unrolling a generator is no fun.)

  70. Re:Sometimes I feel like a Luddite... by DrVomact · · Score: 1

    Offtopic? I'm wounded. Deeply wounded. Or do people not know what a "Luddite" is? And you never have a Luddite sort of mood? And how can being a Luddite on /. ever be off-topic? Ah well. I guess I'll change my sig to all smiley faces, then people will stop taking me seriously.

    . I guess I should have asked if Iron Python is still indent-sensitive.

    --
    Great men are almost always bad men--Lord Acton's Corollary
  71. Re:Sometimes I feel like a Luddite... by bill_kress · · Score: 1

    Well then, I stand corrected.

    Best of luck.

  72. Is threading fully baked in yet? by ovapositor · · Score: 1

    I spent a considerable amount of time trying to do a real world IVR engine in python with C extensions to the driver library. It was to be multithreaded... not multi process. I COULD NOT get it to work correctly... and yes I know about the "Allow threads" directive for the C calls. I even asked the amazing brain trust at the Pycon in 2003 what could be done. My conclusion was that no one else was trying to do what I was :(

    The Global Interpreter Lock seems to me to be part of the problem. I think the Jython implementation worked with "native" Java threads.... I wonder if IronPython uses native .NET threads?

    I like the promise of rapid application development in python but it needs to be able to take advantage of multiprocessor/threaded CPU architectures to be useful to me. I know you can use the multi process approach but frankly, this is a wart that rubs me the wrong way.

    Thanks for listening :)

    1. Re:Is threading fully baked in yet? by Anonymous Coward · · Score: 0

      CPython uses native OS threads, but the whole thing is locked up so badly by the GIL that you're only ever using one CPU anyway. One major reason for the GIL is supposedly the reference counting scheme, which can recursively touch memory all over the place and makes locking a nightmare. Garbage-collecting Python implementations like Jython and IronPython probably have a much better shot at real threading.

      Maybe CPython 3 will fix things ...

  73. Re:Sometimes I feel like a Luddite... by bill_kress · · Score: 1

    Just out of curiosity, how did your team make this work. With different development units spread across the state, did you have shared ownership or did each group own their own code? How many people worked on it? How did you communicate primary interfaces? Did you use UML for primary design or some other method, or did you just all code at once and hope things lined up?

    How did you manage the namespace thing. That's really one of my biggest questions about large-scale Python development. It's frightening that the namespace outside a method can be passed into that method, so a method may operate differently based on functionality defined outside that class. You can say "We won't use dangerous language features when doing large-scale development", but then why use python?

    Did you use unit tests? Is it easy to replicate the entire environment of a class in order to get your tests to work?

    What do you use for scaling the server to multiple systems? Did you have to do all that code yourself, or did you have a tool that worked like a J2EE server? For that matter, how do you manage objects on the server, do you re-create them every time the server is called, or do you have a permenant cache to save you all those allocations. Personally I don't love J2EE and if that same functionality is available in python, I'd love to see it.

    Any other details would be appreciated, this seems an amazing undertaking. Also, what factors did you weigh when choosing python over java?

    Oh, and since you asked, my definition of a scripting language would be any language balanced for writing a minimal ammount of code to get something to work. For instance, in most scripting language a "hello world" is one line. A development language is based on readability and communication with other programmers, Brevity in this kind of a language is not desired, nor are multiple ways of doing something. Consistancy and linguistic simplicity are key (The fewer keywords, options and built-in "tricks", the better).

  74. Re:Sometimes I feel like a Luddite... by 00lmz · · Score: 1

    (In fact, the next version of Javascript borrows a lot from Python; generators are basically from Python, array comprehensions are from Haskell IIRC but the syntax is the Python one, and the most main-stream language with de-structuring assignment is Python.)

    Aren't you forgetting another language? Another one that starts with "P"? From the "New in JavaScript 1.7" page:

    This capability is similar to features present in languages such as Perl and Python.

    $ perl
    ($a, $b, ($c, $d)) = (1, 2, (3, 4));
    print "$a $b $c $d\n";
    1 2 3 4
    $

    Or is Perl "less mainstream" than Python nowadays?

  75. Re:Sometimes I feel like a Luddite... by abigor · · Score: 2, Informative

    Wow, lots of questions! Okay, here we go:

    1. There were around 25 people working on our product, with people spread around the province (not state ;) We had a good project manager who tracked progress closely; normally there were no more than two people working on the same component. We were lucky in that most people were relatively senior. Also, not everything was the Python part of the server; we also had guys writing kernel code, TI DSP software, etc.

    2. We used UML and well-defined interfaces in the form of abstract base classes that were implemented using the staticmethod decorator. An "interface" keyword would have been nice, mind you. Obviously, these interfaces were hammered out before any coding started.

    3. Can you clarify the namespace question? Python uses packages and modules aligned along directories much like Java does.

    4. Python has built-in support for unit tests. It is considered a part of the "Python way" to use them.

    5. We are scaling with hardware, and that works rather well. But you're right, the Python world could really use a JBoss or similar. I guess Zope sort of fits that bill, but I've never been able to figure it out.

    6. Object management is a good question. Originally, we cached our objects to prevent bottlenecking the database with reads. Later, we hit on the bright idea of a fully stateless system where every method is decorated with the classmethod keyword. So objects do not maintain state, because no objects are allocated - everything is a class method (obviously, we do create lots of temporary objects to complete tasks, but these lifetimes don't outlast the method they're in). On the downside, every time a request comes in, it means an entirely new Python instance with all the classes needs to be created. Happily, mod_python can cache interpreter instances so multiple requests can come in to our stateless system without causing huge delays. But any time you want to retrieve state, it means a database hit...such is the price of simplicity. Kind of embarrassingly, we got the idea for a fully stateless system from a .Net system.

    7. It's not an amazing undertaking. Lots of people are using Python as the back-end these days for their transactional systems. Read about the Django project for some cool examples. Django is a fine piece of work. So is Twisted, which we were originally going to use as well.

    8. We chose Python for speed of development and language features. Like Peter Norvig of Lisp and Google fame says, Python is Lisp with a conventional syntax. Practically everything in software boils down to operations on lists of objects. So language features like list comprehensions and dynamic yet strong typing, plus strong support for unit tests, made Python an easy choice. And pydoc is just like javadoc, so we get class documentation for free.

    9. I can write "Hello, world" in C in a single line ;) How about this: a scripting language is fully interpreted, with no intermediate compilation step. Bash and Javascript are scripting languages, for example. Python, Java, and Perl are bytecode-interpreted languages, while C and C++ are machine-instruction interpreted ;)

    Anyway, thanks for all the questions. To be honest, I'm off that project now, and I'm looking for contract work, which will probably end up being Java...

  76. Re:Sometimes I feel like a Luddite... by bill_kress · · Score: 1

    If you care to come to the middle of nowhere washington/idaho we are looking for some good developers. You obviously know what you're talking about.

    Okay,
    Namespace: I could very well be wrong but I was under the impression that if you assigned a variable then called a method (Perhaps in another package), that variable would be available to the called method. Perhaps I'm confusing python with another language? This is the way that scripting languages act and it scares the crap out of me, explicit interface definitions and repeatability are hugely important.

    Object Management: Sounds like you are going through the same stuff that Java users went through that forced 'em to develop the j2ee style servers.

    Dynamic typing: How does python deal with errors like this?
    abc=1
    acb=abc+1

    In visual basic if I were to see a developer that didn't put Option Explicit at the top of each file, I'd fire him on the spot. Does Python have the same ability, and if so, why is python advertised as dyanamically typed--no developer would ever use dynamic typing unless some way was found around the above example, it's too dangerous.

    Scripting Languages:
    Beanshell turns Java into a scripting language. It still compiles it though. Basic can be compiled or not, C can be interpreted, ...

    So for my definition of a scripting language I look at, for instance, Java under BSH vs standard Java.

    Under beanshell, this would work (iirc)
    x=5;
    public addone() {
        return x+1;
    }
    print addone();
    6

    This is neat for quick scripting, but there are a few features that I would be terrified to use in real development:
    1) the simplification of System.out.println() to print. It really isn't any harder to type and having multiple ways to do something just means additional confusion.

    2) The fact that addone would return 6 for a value of 5, and "5+1" for a value of "5" makes your code extremely unpredictable.

    3) Probably most important, the fact that you can access x from the callers namespace. From the class namespace is fine, but from the callers namespace is insane. I may be wrong about Python having the ability to do this. If it can't do this, I apoligize, but I swear that's where I stoped evaluating it and threw it into the toy/scripting category.

    Oh, and just having the ability to shut it off doesn't make it a better language (But it makes it a usable language!). Just because VB has "Option Explicit" makes it usable, but it's still terrifying that you could run into code out there where someone didn't turn it on, so all VB code has to be suspect.

    Arrays:
    A lot of code (Perhaps not all) is done in collections/arrays. The question is, is it worth having multiple ways to do something to save a few keystrokes.

    My answer is always, don't do anything just to save keystrokes. REPEATED keystrokes are horrible (my bane is the java "JFrame f=new JFrame()" but it never actually cost me any time, it's just a little ugly.), but if you can't type in documentation or can't write a simple for each loop, you are probably in need of a typing class.

    If you can think faster than you type, even in the wordiest syntax imaginable (COBOL?), you probably need a typing class.

    Chose a syntax for readability not "typeability" because you only type it once, but it will be read much more often.

  77. Re:Sometimes I feel like a Luddite... by Jerf · · Score: 1
    That summary is incorrect; Perl does not have destructuring assignment, and that example is writting be someone who doesn't understand Perl lists. (Not they can be blamed; list flattening is one of the more braindead Perl decisions and I believe it has been acknowledged as such by Larry himself.)
    $ perl
    my $a, $b, $c;
    [$a, [$b, $c]] = [1, [2, 3]];
    ^D
    Can't modify single ref constructor in scalar assignment at - line 2, near "];"
    Execution of - aborted due to compilation errors.
    The example you give is functionally identical to ($a, $b, $c, $d) = (1, 2, 3, 4); the extra layer of parens is fully meaningless and ($a, $b, ($c, $d)) = (1, 2, 3, 4) works exactly the same.

    Perl can assign lists to lists, so you might call it first-order destructuring, but it can't (to the best of my knowledge) do it arbitrarily deeply like Python, Erlang, and other fully-destructuring languages.
  78. C# != (or ) VB.NET by cbhacking · · Score: 1

    Close, but I think you're slightly off. I use C# by preference (though I'm still learning it) and VB.NET at work (required; migrating from VB6 was enough of a headache, practically nobody here speaks a non-VB language). I have so far seen about the same productivity, though C# tends to *click* better in my mind.

    Regarding differences, however, I don't think VB.NET (or possibly any language other than C#/Managed C++) allows explicit stack allocation, pointer manipulation, etc. For high-level stuff this is USUALLY not needed, and for low-level you probably wouldn't be using the CLR anyhow, but VB.NET is still behind C# (from what I've read, C# and the CLR were basically built for eachother, and C# is the purest and most complete expression of what the framework can handle).

    Also, while you can do a lot by just changing keywords around, VB.NET contains some legacy mechanisms (there are two ways to cast bool to int, one of which produces -1 for True and one that produces 1, for backwards compatibility). Furthermore, since VB still has no really good conditional statement (IIf is a built-in function, and returns only a generic object, which is a pain and tends to need casting... oh, and the cast syntax is annoying) code tends to be longer, requiring either more lines or lots of horizontal viewing area. Their For loops are also partially crippled (no way to do things like
    for (current = head; current != null && !(current.value.equals(searchItem)); current = current.next)
    which, while a debatable coding practice, can reduce LOCs considerably and is preferred by some programmers in any case, just as some like
    for (;;)
    which I hate... and which is not possibly either in VB. This is a hassle for them even if I think they ought to use
    while (true)
    like the rest of us.) VB also uses = as both assignment operator and equality tester (to the point that you must use .referenceEquals() if you want to check for the same object, rather than a clone, as opposed to the style of ==) means you can't cleanly do things like
    if ( (current = current.next) == null)
    or other little shortcuts that people are used to. VB doesn't require Delegates as explicitly, although you *might* be able to (so far I've gotten by with sloppier methods of raising/handling events, etc.) which can be a convenience (it took me a while to figure out how to trigger events in C#) but is also a crutch (inline functions, etc. can be handy tools that most VB programmers will never see).

    In short, VB.NET is MS taking their "easy introduction to programming" language and pushing it into a powerful, full-featured runtime. They had to cut corners to do this, and it requires a fancier version of the CLR (this is why VB.NET on Mono is still incomplete, despite there being a compiler already; C# on Mono is pretty much fully .NET 2.0 compliant). VB isn't the only language that has required such; J# for example (despite being, syntactically, a near-perfect subset of C#) also requires extensions to the base CLR (on second thought, this may be for support of the Java package/namespace... it might work if written using only mscorlib).

    --
    There's no place I could be, since I've found Serenity...
    1. Re:C# != (or ) VB.NET by shutdown+-p+now · · Score: 1
      from what I've read, C# and the CLR were basically built for eachother, and C# is the purest and most complete expression of what the framework can handle

      Not quite - C# has unsigned types and a few other things that are considered "non-portable" in the .NET world (in a sense that you should not use them if you want your classes to be accessible from any .NET language). In other words, C# is somewhat above the CLI common denominator.

      since VB still has no really good conditional statement (IIf is a built-in function, and returns only a generic object, which is a pain and tends to need casting... oh, and the cast syntax is annoying)

      The bad thing about IIf is not so much what you mentioned, as it is the fact that both arguments get evaluated, always.

      some like for (;;) which I hate... and which is not possibly either in VB

      Actually, it is quite possible and very natural in VB:

      Do
      ...
      Loop

      Actually, the Do..Loop construct is something I like most in VB (and others - it's present in every MS dialect of BASIC since at least QuickBASIC). It lets you check the condition both before (Do While..Loop) and after (Do..Loop While) iteration, invert it in both cases (Do Until..Loop or Do..Loop Until), and omit it entirely when it is not needed (the plain Do..Loop as shown above), with clear and concise syntax for all cases.

      VB also uses = as both assignment operator and equality tester (to the point that you must use .referenceEquals() if you want to check for the same object, rather than a clone, as opposed to the style of ==)

      If you need to check for reference equality, you should use the Is and IsNot operators. This is one other sane thing in VB, actually (though it wasn't that in VB6 from whence it originated). The equality operator = always compares values of two objects, value-type or not. The reference equality operator Is always compares references. IIRC this is the same as in Python.

  79. Re:Sometimes I feel like a Luddite... by abigor · · Score: 1

    Okay, let's see:

    1. For the namespace thing, the answer is no. The variable is scoped to the local context. However, Java does have the concept of public/private members, and Python has no such distinction. We used a syntactical marker ('_foo') to show private members and counted on code reviews to catch transgressions. Because Python has an automated way of setting up getters/setters using the property keyword, this is mitigated somewhat.

    2. Dynamic programming errors: the Python world has this neat utility called pychecker, which does a static compile-time check of everything and warns you about potential problems. It catches a LOT of stuff, much like it was a typed language. Also, read this: http://www.artima.com/intv/pycontract.html

    3. Agreed about the scripting language stuff - I was being a bit tongue in cheek. To me, they're all just programming languages, and I choose the right one for the job. The great thing about Java isn't the language itself, which is pretty dull, but the incredible support - huge class libraries, J2EE servers, and so on.

    4. Python's unofficial motto is "There's only one way to do it." The emphasis is on readability, which is why map and filter are supposedly being dumped, because list comprehensions do the same thing more readably. So you shouldn't be concerned on this front.

    Here, read this for god's sake: http://dirtsimple.org/2004/12/python-is-not-java.h tml

    Washington/Idaho, eh? Strangely enough, I was nearly in Idaho this summer. I work well remotely, by the way ;)

  80. Re:Sometimes I feel like a Luddite... by bill_kress · · Score: 1

    Should a language need practices like _foo and external utilities to do checking, or does the requirement imply that perhaps the language wasn't developted targetting the kind of work we are doing?

    I think Python is neat, but for real work I just don't want a neat language. I want something booring, plain and predictable. I despise C++ in part for operator overloading (also templates and just the uglyness of the whole thing), but don't have a significant problem with C' simplicity on really small projects (Not that I'd choose it).

    btw: I realize Java now has templates, and I think that's by far the biggest negative change java has made so far, possibly the ONLY negative change. Writing java classes to support templates requires an entire new, awkward syntax just to support it. Completely counter to everything I like about Java. Checked exceptions are on my hate list as well, but they've been there all along.

    The part that interests me the most about Python is probably the neat array manipulation stuff (I forget what they call it--comprehensions?). I'm on the fence about it. On one hand, I think it might make one think differently about how he handles groups of objects which would be fantastic, on the other, now you have another way to do something (as opposed to iterating) that doesn't really gain much.

    The shop I work for is very pro-XP so they are really looking for local people. If you have any networking/network management background I know a guy who is staffing up for a big project here and I don't believe he'd mind people working remotely.

    I certianly enjoy talking to you, and i'm learning a bit. I think my next step is to go through python again and take notes on what was bothering me about it so much and forward them to you :) I don't remember the specifics so much as coming away from it just feeling that it was the same as the other scripting languages--targetted at quick throw-away code and not really worth enough to spend the extra time on, perhaps you could convince me otherwise.

    If you want to pull this off /. or are interested in that position, my email is bill dot kress at gmail.

  81. Re:Sometimes I feel like a Luddite... by cbhacking · · Score: 1
    I would disagree slightly with a few of your points...
    build a small desktop app... should probably use VB (He won't be able to build a gui faster with any other tool).
    C# (or probably any language you can use with Visual Studio) can develop GUI's with the same level of effort... the only difference is in the procedural code and event handlers; the IDE writes all the GUI code for you. At that point it comes down to "Which VS language are you fastest/most productive/most familiar with?"

    distributed client/server app involving tens of thousands of classes coded by dozens of people, reliable object transfer/messaging, reliable easy access to various forms of communications (Sockets, etc), the ability to run on Unix... your only rational choice is Java.
    I'm not denying that Java is a reasonable choice for tis scenario; it is very readable and extremely portable. What most people don't realize is that the CLR (C# in particular) is nearly as portable to all the OS's you mentioned (okay, MacOS support takes a little work on deployment, but it runs perfectly on Linux and some Unixes... SUSE 10, for example, uses Mono for several integral programs.) C# also gives more control than Java (options for explicit memory management, function variables, etc.) and, unless you're using a JIT instead of the JVM, will often execute faster.

    Oh, and speaking of "distributed client/server app involving tens of thousands of classes coded by dozens of people, reliable object transfer/messaging, and reliable easy access to various forms of communications" have you by any chance heard of a MMOG called of EVE-Online which, using "a special stackless version of Python" recently broke 30,000 concurrent users on one server?
    --
    There's no place I could be, since I've found Serenity...
  82. Re:Sometimes I feel like a Luddite... by bill_kress · · Score: 1

    VB: Used to be a fantastic environment for beginners. It NEVER let you see the generated form code--this is a massive improvement. Generated code should never be edited, just leads to confusion. I haven't checked lately, my guess is MS screwed this up when they moved VB to their workbench, so you're right. VB3 also had the best f1 help I've ever seen, whatever you want, you hit f1 and it always figured out the right context and quickly poped up a help screen for it. Library coverage, controls, keywords--all integrated. This was broken later, don't know if they fixed it again.

    There is still a problem--newbies probably shouldn't use Java/C#. I'm not saying they shouldn't be trained in it, but people jumping into Java without having a clue what you are doing (Just because it's a simple looking language) has really given it a bad name because of all the crap apps developed.

    For instance, the newb practice of throwing up a quick dialog box that blocks it's thread (the swing thread) makes most people think java GUI's are clunky. They're not, it's just that a lot of apps are written by people who don't understand swing or threading.

    C#: good point, I didn't realize it was that portable, but the reason to use Java on such a project is system support for stuff like cross-platform object messaging and trasferring and application servers to reduce active object counts. Also, in the future I'd rather have my code base sitting on an infrastructure who's goal is to make the best system rather than one who's goal is to make the most marketable system.

    EVE: Stackless version is like a J2EE applicaiton server. You end up with no data associated with your objects, so you're no longer in an OO system (Well, it depends on how you write your functions, you can use objects within functions...). At any rate, that's great, but they could have gone with an existing, free java appserver and saved them the trouble of writing their own stateless appserver.

    That also means that they must have had to create their own redundancy/failover system. Not trivial, but now that they've done it maybe they will release a Python appserver--that's pretty much what happened with java.

    PS: How do you get those cool comment bars in the reply?

  83. No. by Anonymous Coward · · Score: 0

    Java does not have templates -- not even close. C++ templates are turing complete whereas Java's generics are a pathetic implementation of parametric polymorphism (which isn't even reflectable!). I you want to know why "full" templates are good, look no further than the STL or Boost. Along with free functions they achieve extensibility that the Java/C# people cannot even imagine. Btw, operator overloading has a lot to do with that extensibility, and until you understand that you haven't really understood C++.

    That's not to say C++ is perfect. Far from it.

    1. Re:No. by Anonymous Coward · · Score: 0

      C++ templates are Turing-complete, but getting useful work out of that involves learning a purely functional language that doesn't even resemble ordinary C++ and whose design was an afterthought. It's an interesting intellectual challenge (as Alexandrescu's book demonstrates), but a pretty serious waste of effort compared to doing the same thing in Lisp (in which you're encouraged to use the entire language at compile time).

  84. New language does not equal better programmers by jt2190 · · Score: 1
    I actually find the multi-language of of the CLR to be a negative. I work at a fortune 500 and most of us use C# and/or Java. There are a few groups of "programmers" that have always been VB-only/ASP-Only "programmers". They have really no understanding of programming maintainable code.

    I'm not sure I follow your logic... How would forcing your poor programmers to switch languages make them better programmers? I think the best that you could hope for is that they'd still be poor programmers, just in a different language.

    Besides, the Java Virtual Machine has just as many, if not more lanugages available for it than the CLR. (Note that I said "available" not "supported.")

    1. Re:New language does not equal better programmers by JimDaGeek · · Score: 1
      How would forcing your poor programmers to switch languages make them better programmers?
      It is called training. In my experience, the more languages a programmer knows, the better they become. I first learned C. Then I learned C++ and became a better all around programmer. I then learned PHP, Java, and C#. Each new language required me to learn new techniques and made me a better programmer. VB is/was such a simple language it didn't really require much learning and it certainly didn't require much knowledge about programming techniques and algorithms. These legions of VB-only "programmers" are among the worst programmers I have ever had to work with. Requiring them to get training in a new language with new programming techniques and algorithms will make them better. There is also the possibility that a lot of those vb-only "programmers" will not have the aptitude to learn new languages and techniques, thus weeding out the bad apples.

      The VB-only phenomenon is very similar to the COBOL phenomenon IMO. COBOL was designed to be very English-like and make it easy for business people to do simple programming tasks. However, business managers, hired a bunch of business people to become "programmers" and let them loose to write millions of lines of really bad code (I had to do some COBOL porting back in the day). It was the same situation a few years ago with VB5 and VB6. MS pushed it as a simple RAD tool that will give you great "ROI" and other business buzz words. The business managers went and looked for these business people with no real programming abilities, all they needed to have on their resumes was some type of VB experience with some simple SQL and they got a decent paying job. When .Net came around MS designed a decent language, C#, to work best with .Net and the new methods of .Net. MS could have killed off VB, however the legions of VB-only people cried what about us, so MS morphed a simple beginners language into a mess that is now VB.Net.

      I recently was working on a medium-sized C#/.Net app. A new feature was asked for, however we didn't have the time to get to it for the first release. So some business manager went and hired some guy who had .Net on his resume. He was one of those VB-only guys and the parts he made were in VB.Net while 99.999% of everything was in C#. To the business managers this is no big deal because it makes their hiring easier. They just need to look for MS approved buzz words like .Net, ASP.Net and SQL. However, this situation stinks for a programming team who all hate VB. No one wants to have to fix and maintain the small VB.Net crap. I hate VB/VB.Net, it feels like I am working with some beginners language made for grade school kids. I have actually been spending my launch times slowly porting any VB.Net crap to C#, just to get rid of it.
      --
      General, you are listening to a machine! Do the world a favor and don't act like one.
    2. Re:New language does not equal better programmers by jt2190 · · Score: 1
      It is called training.

      Training that, I assume, your company doesn't offer, even in VB, right? Otherwise, I'd assume that the poorly performing programmers would be receiving training to bring their coding skills up to snuff.

      I first learned C. Then I learned C++ and became a better all around programmer. I then learned PHP, Java, and C#. Each new language required me to learn new techniques and made me a better programmer.

      Clearly, you care about your craft enough to go and learn new langauges, and to improve your skills. But we're talking about the poorly performing VB programmers at your company.

      VB is/was such a simple language it didn't really require much learning and it certainly didn't require much knowledge about programming techniques and algorithms.

      Is VB such a simple language that it prevents you from learning programming techniques and algorithms? If one of your VB programmers were actually interested in improving their coding, would VB become a roadblock? Would they be unable to implement an algorithm in VB, for exampe?

      Requiring them to get training in a new language with new programming techniques and algorithms will make them better.

      You're probably right that they'll get a little better. But I'd suspect providing training in new programming techniques and algorithms without switching languages will help quite a bit.

      There is also the possibility that a lot of those vb-only "programmers" will not have the aptitude to learn new languages and techniques, thus weeding out the bad apples.

      If your management hired them in the first place, what makes you think that the same managers will do a better of hiring their replacements?

      Someone said: "There are no technology problems, just people problems." The point is, you're blaming VB (the technolgy) for the poor output of some programmers (the people), and now you're suggesting changes to the people side of the equation (through triaining or dismissals) part of the solution. Shouldn't the team be able to switch languages without new training or staff changes, and see the quality of their work improve?

    3. Re:New language does not equal better programmers by JimDaGeek · · Score: 1

      I understand your point and do agree with you that I shouldn't blame the technology, but the user. I don't think it is the fault of a gun, but of the gun owner. However, my major beef with VB is that it lowered the bar to entry in the programming field to a level I think is too low. Sure, one can be a good programmer and code good algorithms in VB. However, over the last 9 years that I have been a professional programmer, I have found that to be the exception not the rule.

      I guess I think that if all of the beginner level programming languages were removed, then the sub-par programmers would either improve their skill-set or leave the field. Is that is correct thinking? I do not know.

      --
      General, you are listening to a machine! Do the world a favor and don't act like one.
  85. Re:Sometimes I feel like a Luddite... by Rob+Riggs · · Score: 2, Informative

    This has become common knowledge amongst Python developers, to the point that many people forget where it came from. I was at the 9th International Python Conference where Bruce Eckel (author of Thinking in C++, Thinking in Java, Thinking in Patterns) gave the keynote speech, so it sticks with me that it came from him. See http://www.artima.com/intv/tipping.html for a good interview with him that gives some details into his experience with the langauge.

    --
    the growth in cynicism and rebellion has not been without cause
  86. Re:Dude, Seriously c'mon by cyberprunes · · Score: 1
    I think you are a little off base here.

    Its not the multi language nature of the CLR that is negative, it the programmers!! How is it that incompetent programmers are the responsibility of the CLR? "I have crappy programmer because the CLR implemented VB!" C'mon Plus, if there was no VB.NET you can bet your ass they'd still be using VB 6 and you'd be COM interoping your way to sadness. Plus.. a Bad VB programmer forced into C# is still a bad programmer.

    the Microsoft PR machine does not claim that .NET is cross-platform. Mono is great but why do they exist??? Because M$ submitted the CLI to ECMA and Mono was born from implenting that spec.. so lets give M$ some credit (though im waiting for M$ to sue Novell now for MONO :) ) I agree about a platform being only as good as its Class libraries.

    IronPython does run on Mono.
    Implementing Python on .NET does not make python MS-only. I'm not sure i understand that. IronPython is compatable with much of the python standard library.. which will get better with time. If you don't need .NET then just use Python2.4+. Whats the beef there? Personally being able to write/prototype .NET apps in Python is very exiting.

  87. Horseshit by Anonymous Coward · · Score: 0

    I know this post is old now, but I was scrolling back through it looking for some links and noticed the parent.

    Boo is neat, but I call horseshit, as it is most certainly not a much better alternative. It might be a better alternative someday, but that day won't come until boo is stable, gets rid of some of its documented issues, and, more important than anything else, has VS.NET IDE integration with full debugger support, which is where IronPython is going to kick its ass for a good time to come.

    Boo's language extensibility is neat, but certainly doesn't make up for the things it is lacking. I want to like it, I really do, but it's just not there yet.

  88. Re:Sometimes I feel like a Luddite... by cbhacking · · Score: 1
    PS: How do you get those cool comment bars in the reply?
    You mean that? It's how Slashdot styles the <blockquote>...</blockquote> element.

    Also, with regard to form-generated code, I must disagree slightly... while hiding it is good (and .net 2.0, with one partial class holding all the form-designer-generated code, and one holding all 'your' code, does a reasonable job of this) there are times when editing it, or even just viewing it, can be useful. Arguably you should never *need* to, and most VB newbies wouldn't know what to make of it anyhow, but some things - like examples of how to add event handlers - can be easily learned by reading the generated code (learning, or even reminding oneself, by looking at examples.) Also, sometimes it IS necessary to edit the generated code; VB6 allowed control arrays mostly for purposes of allowing more than 128 controls (or whatever the limit was, it's been a few years) per form. .NET doesn't have that limitation, but they've made control arrays much harder to use too. Writing a few loops in the form creation code will fix this (though those elements won't appear in the form designer) and sometimes control arrays are downright useful (index-based access for use in loops, easy search tools, etc.) It's not neccessary - For Each loops, for example, make index-based access far less significant - but my point is that somebody who knows how to, and wants to, should be allowed to edit form code. It can also lead to a better understanding of programming; my first language after VB6 was Java, and it took me a while to figure out why I had to have all this explicit frame and control layout code.
    --
    There's no place I could be, since I've found Serenity...
  89. Re:Sometimes I feel like a Luddite... by bill_kress · · Score: 1

    I was just saying that for beginners, VB used to be easier because you couldn't access the generated code and I think your reply agreed with that point.

    If one has gone beyond that, they should probably move to another platform. Once you are to the point where you are using control arrays and manually installing event handlers, you should probably move on to a more appropriate language--C# or something.

    Honestly I detest the idea of editing generated code, it's just confusing and doesn't scale in any way (hard to maintain, easy to make it so it can't be loaded back into the orignal form editor, incompatible with future releases of the platform and typically they generate horrid code).

    I've always wondered why the form designers don't just create the form class with all the controls public (or better yet, a getter to get the controls by name). You can add yourself as a listener to any of the objects and modify the properties without touching the class source code. It would also split the combined view/controller model that those generators always cause (sometimes enforce).

    If I HAVE to use a form generator, I'll often use this technique, iterating through the controlls collection of the form looking for a certian name (from another class). The problem is that often the forms don't expose anything publicly, so even this is impossible without modifying the generated code to provide a getter or something.