LWN.net Logo

MIX - Novell's de Icaza criticizes Microsoft patent deal (LinuxWorld)

MIX - Novell's de Icaza criticizes Microsoft patent deal (LinuxWorld)

Posted Mar 8, 2008 18:19 UTC (Sat) by jwb (subscriber, #15467)
In reply to: MIX - Novell's de Icaza criticizes Microsoft patent deal (LinuxWorld) by drag
Parent article: MIX - Novell's de Icaza criticizes Microsoft patent deal (LinuxWorld)

Why isn't python appropriate?  Writing gtk+/gnome apps in python is wonderfully easy.  


(Log in to post comments)

MIX - Novell's de Icaza criticizes Microsoft patent deal (LinuxWorld)

Posted Mar 8, 2008 19:10 UTC (Sat) by drag (subscriber, #31333) [Link]

Yes it's very nice.. If I can program in pyGTK then anybody can.

I am not a big language lawyer, but three instances I can see are that Mono is faster then
python in most respects.

1)
In the 'language shootout' Mono is only 2-3 slower then GNU C/C++ in most benchmarks were as
Python is much much slower in most respects.
http://shootout.alioth.debian.org/gp4/benchmark.php?test=...
http://shootout.alioth.debian.org/gp4/benchmark.php?test=...

Although Python seems to be better with memory management. So Python is suitable for utilities
and smaller long-running stuff were as Mono would be more suitable for making applications
that will end up being much more involved or more complex.


2) 
Lots of people (I expect people coming from a C++ or Java background) do not really like
Python. So having something like C# is probably more attractive for them. I figure giving
people a choice between C, C#, and Python is giving people a good spread of options from
low-level to very high-level languages.

3) 
Thanks to Microsoft C# is a insanely popular language. For new programmers having something
that _seems_ fast is attractive and is something they went to school for. I mean schools are
cranking out .NET programmers left and right. So if they want to program for Linux then having
to learn a new framework is probably easier then making them learn a new language and a new
framework at the same time.



I am no language lawyer and I don't want to get in a big arguement over this vs that, mostly
because I don't really know.. All I've realy looked at is Python and a tiny bit of C, but it's
my impression that having something like C# is a good thing.

Maybe it's a question of Gnome supporting Java vs Mono as a top tier Gnome language. One of
the wonderful things about Python is that's not written by python-nazis.. that you can
incorporate C and libraries written in other languages into your python program, usually
without to much heartache.. It's difficult sometimes, but not a deal breaker. Having bindings
for C or C++ libraries for python is a fairly natural thing to have. It seems to me that Java
is always Java-this and Java-that.. that unless something is written in java it's very hard to
use in Java programs.

It seems that Mono is more accepting of libraries written in other languages like Python is. 

Again I don't know this for a fact, but it's the general impression that I get.


MIX - Novell's de Icaza criticizes Microsoft patent deal (LinuxWorld)

Posted Mar 8, 2008 20:33 UTC (Sat) by tjc (guest, #137) [Link]

> Thanks to Microsoft C# is a insanely popular language.

OK Steve. :)

MIX - Novell's de Icaza criticizes Microsoft patent deal (LinuxWorld)

Posted Mar 8, 2008 23:38 UTC (Sat) by epa (subscriber, #39769) [Link]

You might want to read the Mono versus Python for GNOME development blog entry linked on LWN a while back.

MIX - Novell's de Icaza criticizes Microsoft patent deal (LinuxWorld)

Posted Mar 10, 2008 1:10 UTC (Mon) by tialaramex (subscriber, #21167) [Link]

Federico doesn't mention (it's possible he's not even aware) that both Mono and Python don't
actually manage to sleep properly in anything but trivial single-threaded programs.

Given that we'd like to not constantly spin up the CPU with busy work, that makes them both
equally bad choices. They also both have followed Microsoft's "both fingers in your ears and
hope it goes away" approach to real Unicode text [Microsoft were hoping in the 1990s that
UCS-2 was good enough, it wasn't, and they've been plastering over the cracks every since].

In each case the maintainers are aware of these problems, but seem to be treating them as
minor annoyances, to be looked at in some distant future release. Some day one or both might
deliver on the dream of high level programming without annoyances. Meanwhile, I recommend
staying away from both languages.

It was a surprise to me, but in 2008 you're still looking at C if you want to write portable
and maintainable programs that "pay their taxes" as Raymond Chen calls it. Perl comes a close
second if you can achieve the discipline needed to write maintainable Perl.

MIX - Novell's de Icaza criticizes Microsoft patent deal (LinuxWorld)

Posted Mar 10, 2008 6:22 UTC (Mon) by Cato (subscriber, #7643) [Link]

Windows and Java both initially supported UCS-2 (16 bit Unicode encoding) and both now support
UTF-16 (21 bit Unicode), so Microsoft is really not much different to Sun in this respect.

Reference on Microsoft support:
http://www.microsoft.com/globaldev/DrIntl/columns/021/def...

Mono

Posted Mar 10, 2008 11:18 UTC (Mon) by tialaramex (subscriber, #21167) [Link]

It's true that Sun are just as bad, but that doesn't make Microsoft any better. And
specifically it doesn't mean Mono's even lousier support is any good.

I did single out Mono. I'm sure the Microsoft CLR has its problems, but it can manage to fall
properly asleep and it does, (in current versions) more or less get Unicode handling correct,
or close enough. What we have isn't a good clone of a terrible system, but a poor clone of a
not-so-great system.

Crossing out UCS-2 and writing UTF-16 in your documentation (when you even remember to say
something more specific than just "Unicode") isn't enough. In any case, UCS-2 tends to get
people into a mindset where they start thinking of a character, a code point, a code unit and
a glyph as more or less the same thing, precisely the type of attitude that UTF-8 has been
beating out of people developing in C or Perl. .NET inherits from Win32 certain APIs that
implicitly make this mistake, and fixing them makes it awkward and unsettling. As with Java,
the C# "wide character" built-in type is almost entirely useless, because it can only store a
UTF-16 code unit, and in a high level language you almost never /want/ a UTF-16 code unit but
instead need a character, which won't fit.

MIX - Novell's de Icaza criticizes Microsoft patent deal (LinuxWorld)

Posted Mar 10, 2008 6:39 UTC (Mon) by jamesh (subscriber, #1159) [Link]

The sleep problem has apparently been fixed for pygtk applications on Python 2.6:

http://blogs.gnome.org/johan/2008/01/04/enough-wakeups-in...

PyGTK used to sleep properly before the Py_MakePendingCalls() calls were added, but it
prevented ctrl+C and other UNIX signals from working which made people sad.  Calling this
function regularly fixed the signal problem but prevented applications from sleeping for
extended periods.

Python 2.6 adds a new API for checking whether signal handlers need to run that does not
require polling (added specifically for extensions like PyGTK), which should let it sleep as
you'd expect them to.

MIX - Novell's de Icaza criticizes Microsoft patent deal (LinuxWorld)

Posted Mar 10, 2008 10:59 UTC (Mon) by tialaramex (subscriber, #21167) [Link]

Exactly as I said, the suggested "fix" is that you can upgrade to some future version (Python
2.6 isn't out) and use this new API to work around the problem.

If this was some minor library being worked on by a volunteer in their spare time, fair
enough, we can always just avoid that library - but people are proposing that we write large
and important programs in this language now.

Look what it took to even get this concession, 18 months later, that the next version would
have a fix, someone had to grab Guido at a conference and basically shake him up and down so
he'd go investigate.

In a toy language, or a prototyping language, these sorts of problems are easily forgivable.
But today people want to recommend Python for writing real software that will go out to end
users or into production systems. Indeed most Linux distributions include such software, and
you'll find it running on your machine easily enough, it's the program with the GUI that
freezes whenever it's doing any work, or the one that wakes up needlessly every few
milliseconds, chewing through the whole laptop battery in an hour and a half - and far from
being concerned about this total failure, the Python developers hail it as a success.

MIX - Novell's de Icaza criticizes Microsoft patent deal (LinuxWorld)

Posted Mar 10, 2008 14:02 UTC (Mon) by beoba (guest, #16942) [Link]

Exactly as I said, the suggested "fix" is that you can upgrade to some future version (Python 2.6 isn't out) and use this new API to work around the problem.

What would you rather they do? Go back in time and change 2.5 before its release? Bringing attention to flaws is good, but unreasonable expectations don't help anyone.

The "new API" comes in the form of a new function which is being added to the standard library's "signal" module.

MIX - Novell's de Icaza criticizes Microsoft patent deal (LinuxWorld)

Posted Mar 10, 2008 18:25 UTC (Mon) by tialaramex (subscriber, #21167) [Link]

Python 2.5.2 was released just a couple of weeks ago.

But Python aspires to the (completely unrealistic) ideal that such releases should be both
backward and forward compatible. The result is that software can still break (thanks to the
universe's unlimited capability to build bigger idiots no amount of rules about backward and
forward compatibility can prevent new releases from breaking old software) but Python refuses
to import important fixes like this to the stable tree because someone might try to run a
(fixed) program against 2.5.1 and that wouldn't work.

In reality some people are using Python to develop major applications. Those people, including
the OLPC project are in the unfortunate situation of having to fork Python 2.5 and maintain
their own version with this fix in it. So even the compatibility goal is sabotaged.

And it's all very well to say "Go back in time" but this specific bug was reported eighteen
months ago - and the problem really dates back to Python's implementation of signal handling
years ago, turning an asynchronous signal into something you have to poll regularly. It's fine
in principle to have a major release cycle which takes years, but you still need to achieve
timely resolution of bugs. Python's current "no compromise" approach doesn't do that.

MIX - Novell's de Icaza criticizes Microsoft patent deal (LinuxWorld)

Posted Mar 11, 2008 4:34 UTC (Tue) by beoba (guest, #16942) [Link]

Python 3 is not planned to be forward compatible, hence the change in major version number.

2.5.2 is a bugfix release within the 2.5 branch. The aforementioned problem is being solved by
adding a new function call to the standard library, which inherently makes it a target for
2.6.

It sounds like you're complaining without any intent of seeking a resolution to your
complaint. At this point, there isn't really anything else to discuss. Patches welcome.

Python

Posted Mar 11, 2008 10:44 UTC (Tue) by tialaramex (subscriber, #21167) [Link]

Of course it's possible to resolve this complaint, but only by taking it seriously. Here's a
thought, why don't you present an example of something that would actually have broken if
Python had taken this fix in some form for 2.5.2 ?

No ? The maintainers working on this bug didn't either. 

Rather than offer an actual rationale you've just recited policy, "inherently makes it a
target for 2.6" isn't a statement about some universal and "inherent" truth but of the
maintainer's policy.

So there's your patch, find the "policy" document that says fixes like this can't go into a
bugfix release, and change it to say "We aim to be pragmatic about taking fixes early." Or
else take the Twisp and Catsby route, and just add a policy statement that Python is not for
use in production software. Either is an adequate response to my complaint (well originally it
wasn't a complaint, just a statement that Python and Mono's C# remain inadequate for serious
application development in 2008).

Copyright © 2008, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds