IronPython-0.6 is now available!

C

Christopher T King

(This is HelloWorld is C#. Is this actually different than HelloWorld in
java???)

using System;
public class HelloWorld
{
public static void Main()

{
// This is a single line comment

Console.WriteLine("Hello World! From Softsteel Solutions");
}
}

Nope, looks just as ugly to me... ;)
 
C

Cameron Laird

.
.
.
As near as I can figure, those who find Python has significant
advantages for many applications over Java and C++ will likely
feel the same way about C#, only more so. Isn't it basically
a highly MS-centric remake of Java, but missing the very
cross-platform nature which has served Java (and Python) best?

-Peter

I think there should be no question that Python's effective
portability almost entirely dominates Java's, and both are
far, far ahead of C#. HOWEVER, there are people with a
sincere perspective that it's C# that's available on a wider
range of platforms; we can discuss that, if it really matters.

Also, you might not realize that C# is, at least in principle,
available for Linux, Solaris, FreeBSD, and perhaps other
platforms. Part of the trick, though, is that our previous
experience with languages generalizes imperfectly to C#; the
portability of its library means something different than
that of, say, Python's ...
 
M

Michael Ekstrand

MI is a crutch.

Why do you say this?

A while ago, I was working with an object model in which there was no
effective way to represent the necessary data without multiple
inheritance (which made things really interesting when I was
considering porting it to Java).

-Michael
 
S

simo

Yeah, very pre-alpha from the few tests I did, but I'm very excited
about this, especially as it seems the Parrot guys have given up on
Python :-(
"After exploring many alternatives, I think that I've found the ideal
way to continue working to realize the amazing potential of the vision
of the CLR. I've decided to join the CLR team at Microsoft beginning on
August 2.

Hopefully IronPython will still be *developed* as opensource, or is
this release a last-ditch opensource version, before it is owned by
MS?

I think even I would be tempted to buy "Visual Python.NET" or whatever
it becomes, if it could make standalone CLR .exe's, especially if it
had wx# bindings not just WinForms/GTK#, but I'd prefer an opensource
effort (don't want the Linux/mono version to die).
"At Microsoft I plan to continue the work that I've begun with
IronPython to bring the power and simplicity of dynamic/scripting
languages to the CLR."

I hope this doesn't mean abandoning Python for other scripting
languages.

I think Python on the CLR would be a very nice competitor to Java for
MS.
 
?

=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=

Neal said:
> Is this actually different than HelloWorld in java???
using System;
public class HelloWorld
{
public static void Main()

{
// This is a single line comment

Console.WriteLine("Hello World! From Softsteel Solutions");
}
}

Yes:
- It it not System.Console, but java.lang.System.out,
and java.lang is implicitly imported (not usinged)
- it is not WriteLine, but println
- it is not Main, but main
- the main function requires an argument (String[])

Regards,
Martin
 
?

=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=

Derek said:
I haven't yet found the time to look at any of this stuff in detail,
but I will, and it wouldn't surprise me at all to learn that it was
really quite good in many respects - MS didn't just forge it all from
the ground up in total isolation, ignoring all that had gone before,
hoping to get it working right in the 3rd release.

I have worked a lot with C# and .NET lately, and found two things:
- the VM is very well designed. It does not really work for languages
other than C#, though (and, yes: I believe that it does not work
well for Python either, despite IronPython's existance (*))
- C# is ok. There are a few unfortunate (IMO) hacks, like the notion
of delegates (which are the only callable objects), and the surprising
behaviour wrt. to interfaces and overriding (where functions in a
subclass won't implement an interface operation defined in the base
class unless that implementation is virtual), but all in all, I
can live with it.
- The IDE is great; MSVC's type-ahead interface (or whatever it is
called really saves a lot of typing an documentation lookup)
- The standard library is both huge and awfully, terrible, and a huge
hack.
There is API for nearly any aspect of the system, but many aspects
are ill-designed, apparently in an ad-hoc manner - the entire library
appears to be written under great time pressure. The API is often
counter-intuitive and does not provide features that people would
expect, as very similar features are provided. For example, it has
an interface API for relational databases, but it is not possible
to write an application that is agnostic of the specific interface
implementation, as the application always needs to create instances
of specific implementation classes - they forgot to provide central
factory functions.

Regards,
Martin
 
I

Ivan Voras

Peter said:
That's exactly what I thought, but clearly the OP thinks
differently or (it seems to me) he wouldn't be asking the question
he asked (or in the way he asked it).

Well, it is certainly a big factor. I watched development of Mono with
interest, and I tried it very soon after it went "release", on FreeBSD.
Now, it only runs on a recent development version of the system, due to
unresolved quirks with pthreads that FreeBSD has, but the parts that do
work, work well. (It was actually a suprise with me, I thought it had
much reason to fail). That success lead me to get to know C# a bit
better, so I got a book and started reading.

I agree very much with posts further down the thread by Derek Thompson
and Martin v. Lowis.

The language itself is much more complex than Python (with which I
didn't get a book and I think I know it pretty well), it certainly
doesn't have Pythons elegance in some fields, like lambda functions, and
I don't think it even has things like generators, but IMO, it's *way*
cleaner than Java. I've done a lot of development with Borland Delphi
(Pascal), so my judgement might be influenced by seeing so much of
things I love and use in D. made it in C# (i think a Delphi architect
was part of the C# team at MS), my favourite being "properties" and
"indexers", (indexers = treating classes/properties as array; something
like overriding [] operator), and "ignoreable" exceptions.

Regarding similarity with Python, i though I saw recent Python versions
also have properties and single-root-class (is this what 'new classes'
are about?). C# (or rather, the class lib) also has modern structures
like dictionaries, stacks, etc.

The only part I'm really dissapointed by is the GUI development. It
seems that while the Windows.Forms API is "standard" and published, many
"real life" .net programs call Win32 API in addition to that, so it gets
complicated. I hadn't had great success with Gtk#. It seems Python has
much advantage here.

Oh, I have to mention speed: I made some simple benchmarks, and the JIT
in .net is fantastic! A simple numeric adder-loop in python (with 1e9
iterations, with xrange...) takes about 30min (hadn't tried psyco yet),
while C# code is on par with compiled C code (about 2 sec.) - it seems
they did a hell of a good job there.
 
D

Derek Thomson

Tim Bray (XML) is dipping his toe in the
python waters, Steve Vinoski (CORBA) seems tired of the brittleness of
static languages for building distributed object systems, and is
trying his hand with twisted python,

I suspect he'll be disappointed with "Twisted", as I was. I had a
quick look at it, and the support for RPC is primitive, at best.

It's a "round-peg-square-hole" situation given that Twisted is "event
based", but it's pretty hard to build a distributed object system if
you can't call a method on a remote object easily ... still, it may
just be a matter of focus (i.e. the Twisted team haven't really
haven't done much in the area of RPC/distributed objects yet, by the
look of it). It will be interesting to see how it develops over time.
 
E

Elbert Lev

C# IS a good language and .NET is a very good environment. Recently I
had to write a little program. "one of a kind", "throw away". It took
2.5 hours to finish the proto. Worked fine, but would requere night to
run. Had to rewrite in... C++ or C#. Having the proto in Python, C#
program was written almost as fast as Python's one. The run finishhed
in 1 hour.

Important - Python realities (not exotic) map on C# perfectly.
 
J

John

Neal D. Becker said:
After reading a tutorial on c#, I see immediately that it has all the
features that I disliked in Java.

1) Everything is derived from "Object"
2) Some things have value semantics, some have reference
3) No multiple inheritance

I'm not sure about 2 others:

4) No serious generic programming support
5) Only OO supported:

(This is HelloWorld is C#. Is this actually different than HelloWorld in
java???)

using System;
public class HelloWorld
{
public static void Main()

{
// This is a single line comment

Console.WriteLine("Hello World! From Softsteel Solutions");
}
}



When I saw .NET, I immediatly saw that it addressed the issues that
bothered me most in Java.

1.) No classpath issues.
2.) Built for productivity. Java has almost no helper classes. These
are things that don't REQUIRE to be there but are there for
convenience. Check the recent talk by Bruce Eckel
(http://video.haas.berkeley.edu:24874/ramgen/media-services/Eckel6-25-04.rm).
I don't think any of his criticism applies for C#.
3.) A sensible, easy to use GUI library (even if it isn't very
portable).
4.) IO doesn't require me look up the manuals each time to figure out
which 3 or so classes I need this time.
5.) Excellent performance (Not just on paper).
6.) Easy deployment.
7.) Absolutely the best web development framework (OK! I may be
getting a bit religious here but I love the component and event driven
model. JFaces as I looked at it was not very mature).
8.) Community that does think that it has to use every single design
pattern in every single library.
9.) An IDE that actually feels simple.
10.) DESIGNED for multiple languages (I admit I rediculed this till
recently saying that all languages needed needed to be like C# to be
supported and it was no better than Java in this. But with IronPython
and F#, it looks a bit promising. But I need them to be integrated
into Visual Studio for me to love them.)
11.) Distributed computing for mere mortals. EJB maybe better designed
than COM+ and more portable. But something must be wrong about it's
design that it scares me away each time.
12.) I hate MVC (OK! It is not Java's fault that every Java programmer
wants it).

I am actually looking forward to IronPython a lot. Has anyone figured
out how to build a .NET assembly out of it? I just looked at it for a
few minutes. I couldn't get UtilLibraryBuilder to work. Maybe it was
just me.
 
V

Valentino Volonghi aka Dialtone

I suspect he'll be disappointed with "Twisted", as I was. I had a
quick look at it, and the support for RPC is primitive, at best.

It's a "round-peg-square-hole" situation given that Twisted is "event
based", but it's pretty hard to build a distributed object system if
you can't call a method on a remote object easily ... still, it may
just be a matter of focus (i.e. the Twisted team haven't really
haven't done much in the area of RPC/distributed objects yet, by the
look of it). It will be interesting to see how it develops over time.

Err... What do you mean? Twisted has, at least, 3 different ways of doing
RPC: Perspective Broker, SOAP and XML-RPC.

Perspective Broker is a new RPC protocol which lets you pass objects
remotely and so on.
The other 2 are already well known.

This is a pb server and down here a pb client. How is this
'primitive'? (SOAP and XML-RPC are a lot like these 2 examples below)
====
from twisted.spread import pb
from twisted.internet import reactor

class Echoer(pb.Root):
def remote_echo(self, st):
print 'echoing:', st
return st

if __name__ == '__main__':
reactor.listenTCP(8789, pb.PBServerFactory(Echoer()))
reactor.run()

====
from twisted.spread import pb
from twisted.internet import reactor
from twisted.python import util

factory = pb.PBClientFactory()
reactor.connectTCP("localhost", 8789, factory)
d = factory.getRootObject()
d.addCallback(lambda object: object.callRemote("echo", "hello network"))
d.addCallback(util.println)
d.addCallback(lambda _: reactor.stop())
reactor.run()
====
 
J

John

Neal D. Becker said:
After reading a tutorial on c#, I see immediately that it has all the
features that I disliked in Java.

1) Everything is derived from "Object"
2) Some things have value semantics, some have reference
3) No multiple inheritance

I'm not sure about 2 others:

4) No serious generic programming support
5) Only OO supported:

(This is HelloWorld is C#. Is this actually different than HelloWorld in
java???)

using System;
public class HelloWorld
{
public static void Main()

{
// This is a single line comment

Console.WriteLine("Hello World! From Softsteel Solutions");
}
}

I just posted a message. But reading the above post again, I note that
Neal was talking about Java, the language. Not Java, the platform. My
comments were mostly on the platform.
 
T

Tor Iver Wilhelmsen

1.) No classpath issues.

It *does* have classpath issues - sometimes even greater than Java's -
but most of the time this is hidden from the developer.
3.) A sensible, easy to use GUI library (even if it isn't very
portable).

Swing is sensible and easy to use in my experience.
4.) IO doesn't require me look up the manuals each time to figure out
which 3 or so classes I need this time.

Why not? Because the APIs closer match another language you've used?
If so, coincidence.
5.) Excellent performance (Not just on paper).

Performance should be about the same, since both languages are
compiled to native code on startup.
6.) Easy deployment.

Oh, Microsoft's fabled "xcopy deployment"? How is copying a jar file
harder than compying an EXE plus required DLLs?
7.) Absolutely the best web development framework (OK! I may be
getting a bit religious here but I love the component and event driven
model. JFaces as I looked at it was not very mature).

JavaFaces seems to match the functionality of ASP.Net's CodeBehind
logic, except you're not restricted to an event model; you configure
events yourself in XML files. IDE support for it is coming.
9.) An IDE that actually feels simple.

Which Java IDEs have you tried? And which C# ones?
10.) DESIGNED for multiple languages (I admit I rediculed this till
recently saying that all languages needed needed to be like C# to be
supported and it was no better than Java in this. But with IronPython
and F#, it looks a bit promising. But I need them to be integrated
into Visual Studio for me to love them.)

The only language designed for .Net is and will always be C#. The
other languages are *wrestled* into the CLS strait-jacket, and for
some - like C++ - it does not fit well.
11.) Distributed computing for mere mortals. EJB maybe better designed
than COM+ and more portable. But something must be wrong about it's
design that it scares me away each time.

But EJB is not the be all and end all of Java distributed computing.
If RMI is sufficient, use RMI.
12.) I hate MVC (OK! It is not Java's fault that every Java programmer
wants it).

Why do you hate MVC? Are you addicted to subclassing and code
duplication?
 
E

Elbert Lev

Mathias Waack said:
Nice argument;)

What is wrong with this argument. Java evolved for more then 10 years
(and still is). This group is dedicated to an evolving language -
Python. Why not to allow C# to evolve too.
 
?

=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=

Elbert said:
What is wrong with this argument. Java evolved for more then 10 years
(and still is). This group is dedicated to an evolving language -
Python. Why not to allow C# to evolve too.

Sure. And ten years from now, the issue of C# not providing generic
programming might not be an issue anymore. However, this is not
relevant for people who use C# today - they just can't use generics;
that future versions may provide it still means they can't use it
today. So if this is a flaw, it is a flaw today. Saying that people
want to remove the flaw still makes it a flaw.

Specifically talking about Microsoft, "a future release may" is makes
a particulary bogus argument. There have been many examples where the
future release did not actually provide the feature that Microsoft said
it would provide, and even more examples where the future release might
be delayed so much that the release was irrelevant for the original
problem (which was then solved long ago, by different means).

Regards,
Martin
 
D

Duncan Booth

Sure. And ten years from now, the issue of C# not providing generic
programming might not be an issue anymore. However, this is not
relevant for people who use C# today - they just can't use generics;
that future versions may provide it still means they can't use it
today. So if this is a flaw, it is a flaw today. Saying that people
want to remove the flaw still makes it a flaw.

Whilst what you say is true in general, C# containing generics is available
today (although still in beta). See http://lab.msdn.microsoft.com/vs2005/

BTW, elsewhere in this thread someone said that C++ doesn't fit well into
..Net framework so it is worth mentioning that vs2005 also includes
completely revamped support for C++. Naturally this is incompatible with
their earlier attempt, but it really is much improved.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top