Fri 1 Jul 2005
It seems whenever I bring up the subject of Python people get their emotions in a basket and clearly demark themselves as pro or against. I’m not immune to this as I have defended Python for many reasons. Its merits aside, promoting it has little to do with Python itself but with the adoption of higher level languages to enable a broader group of hackers contributing to GNOME.
I could sit pretty knowing that Red Hat, Canonical, Fluendo and other GNOME centric companies all support Python as a way of writing apps. Hell, even GNOME has somewhat sanctioned it saying there is no objection for Python apps being included in the core provided they meet all the criteria for such a placement.
I don’t sit pretty because there still is a culture of conservatism within the community that I believe holds back contributions. I believe encouraging higher level languages may bring a lot of weekend programmers to the mix, but that is what we want. We want to encourage people to learn, to play with our bits and eventually churn out quality software. Erecting a C barrier to entry just turns those developers away and we never get a chance to see what talents might have emerged.
I want to address a couple of comments to my previous blog (you can go there to see who wrote them):
I for my own believe that it’s better to have one language being used throughly inside GNOME rather than 5 different ones.
And when all you have is a hammer… Why does a user care what language was used? How many apps in the desktop does one put their hands into anyway that they care if there are multiple languages being used? I have my hands in many of the applications on the desktop and I personally care more about API’s and build systems than the languages used. Most languages are dialects anyway. There are only so many ways one can write a for loop or an if statement.
Python is by far to overhyped and it’s getting much more attention than neccesary. Rewriting apps in python offers yet again a solution for a problem that doesn’t exist.
Overhyped how? I think that is a knee jerk reaction. It is just another tool in the toolbox and has been used to great effect by many people. I’m not suggesting rewriting GNOME in Python. The new EoG maintainer blogged about rewritting the EoG shell in Python. I offered encouragement (and mostly a counterpoint to naysayers) as I believe it is a great experiment. If it falls short of solving any real issues GNOME can go along with the older versions of EoG. Lets not discourage people from trying new things just for the sake of trying new thing. You never know where it will lead (a.k.a. stop being a back seat programmer).
This is a big mistake. Check torrent clients for the best example. None of based Python, Java or any higher level language of torrent clients have manage to get low overhead, use less CPU and RAM. Any C/C++ based of torrent clients have whoops on based Python and other higher level language very far in no question.
I have to note that the first bittorrent client was written in Python. Python allowed the author to actually create bittorent. Without it it may have never been created. So what is better? A slightly more resource hungry application that is useful or no application at all?
And that is my point. All those programmers around the world who have great ideas, we don’t want to tell them it is C or nothing. It is better to have an app then have it never been created? We can always go back and fix things or rewrite portions in another language. The important part is not the language but the idea and implementing that idea. Where would Anaconda, Flumotion, PiTiVi or even Google be without Python?
That is why I push Python.
[read this post in: ar de es fr it ja ko pt ru zh-CN ]
July 1st, 2005 at 9:49 am
I agree with you that, in this day of fast processor and tons of RAM, end-user apps should be written in higher-level languages. But why push stock Python instead of pushing for more use of Mono? That way people can use their choice of language (use IronPython if you so desire) and still have the ability to link to and extend each others’ code?
Not to mention the fact that IronPython performs significantly better (at least under .NET, I don’t know too much about Mono’s performance characteristics, but I’d imagine it’s ok). But performance considerations aside, I’m a big fan of the CLR simply because of the cross-language interoperability.
July 1st, 2005 at 11:01 am
Way to go. I think the focus should be on innovation and quality. Folks code in scripting languages because it’s conducive to creativity.
The naysayers seem to think scripting languages in GNOME will lead to crap software. It’s just not so.
That said, Python’s not my favorite. I’d like to see Ruby being used more–it’s a beautiful language.
July 1st, 2005 at 11:06 am
Keep pushing! (Not over the edge though!
Anyway, I think it is ridicously time-consuming, boring and error-prone to write GUI stuff in languages such as C and C++, whereas Python and GNOME makes my day!
\David
July 1st, 2005 at 11:15 am
Hear, hear!
I’ve been wanting to contribute to GNOME for quite some time now, but I have a dirty little secret: I hate the C programming language. I’m a Ruby guy myself, but the point is the same as with Python–it’s not *painful*. It’s fun.
July 1st, 2005 at 12:17 pm
As long as you aren’t paying for the software, it’s easy to whine about how authors should have used C to get just the slight bit snappier response times. Never mind the amount of extra work caused by using a low level, low productivity language.
Of course there are several high level, high performance languages available too. They just tend to have problems with their freeness, name recognition, learning curve, distribution and/or quality of Gtk+/GNOME bindings. No-one has a problem with Python’s license, everyone knows it, it’s easy to learn, it’s installed everywhere and the bindings are first-rate. It’s an easy choice even when you might prefer some alternative.
July 1st, 2005 at 3:35 pm
I’m not against python, or any high-level language for that matter. I’m against using these languages in gnome libraries or in the core of gnome.
It’s obvious the gnome libraries should be written in C, as writing them in any other language pulls in an extra dependency you have to link against. Writing library A in C++ for example, which library B (in plain C) would link against, would make it impossible to write an app in plain C linking against lib B.
As for the core of gnome: I thought the purpose was to make the memory-footprint smaller, not larger. And there is exactly nil to be gained from porting eog to python, except for a little more experience for that programmer in python/pygtk. If he wants to do that for himself, fine by me, but it should not go in gnome proper.
That being said, I really do think the high-level languages do have a place (or actually 2). As a matter of fact, I use pygtk for writing my own apps:
1) Writing end-user applications. Those applications are not mandatory for the core desktop, and as such the user has a choice of installing them, while someone an a computer with a smaller memory footprint can just run gnome without python.
2) Possibly using a language like python to script apps like gnumeric or abiword.
July 1st, 2005 at 4:13 pm
No one is advocating writting libaries in Python. When I say core GNOME I mean the set of applications and libraries that make up the GNOME release.
July 1st, 2005 at 10:12 pm
I’m in the same boat as Phil except that I am a Python fanboy.
July 7th, 2005 at 4:30 am
My requirements for a language are Unicode, OO, Exceptions, Threading, and Generics. I currently program primarily in Java – Multiple inheritance of interfaces helps, I love checked exceptions, synchronized methods make threading simple, generics in 1.5 make me happy, but I still wish it had a 32bit UCS-4 char. I find C# palatable from reading about it, but don’t actually use it. C++ with Boost and enough other libs can get the job done, but eww. I lost respect for Python when it came to threading. Try moving a window over RedHat’s up2date Python GUI while it’s downloading RPM’s – it won’t repaint. Not performing operations in the GUI event thread is like… Java 101. And how can anyone take Zope seriously as an app server, if it can only scale to one CPU? Python is a far sight better than hacks like Perl or PHP, but I will stick with Java thanks.
July 7th, 2005 at 10:00 am
GUI not updating is the the coders fault. I don’tt think the system-config tools are threaded. They all use a mainloop but if you are updating an rpm and don’t return to the mainloop you get GUI update problems. Java’s nice. It’s not free – yet. A lot of Java apps don’t repaint correctly either. This whole my lanuage is better than your language is so against the point of what I wrote anyway. I think you are just perpetrating the same FUD that people perpetrated against Java (Java’s “perception” of being slow is why we don’t see more mainstream desktop apps written in the language). If you think python isn’t scalable then I guess you better tell google that.
BTW without perl there might be no dynamic web and without PHP the dominate server side language might have become VB/ASP (which for awhile it was I believe). Oh and my blog uses PHP
July 7th, 2005 at 3:34 pm
Don’t get me wrong, I think Python is a great language! I’m not trying to play “my language is better than yours”, more it’s just that I have become used to having certain features that I have in Java, and when examining Python found Threading to be dissapointing.
My information about Python threading comes from here:
http://www.python.org/doc/faq/library.html#can-t-we-get-rid-of-the-global-interpreter-lock
So, I don’t think you can quite call it FUD. Their suggestion of dividing work between multiple processes is difficult to apply in practice – to do such a thing for a Zope server, you basically need to implement clustering, which has it’s own problems.
When I started programming Java in 98 Sun was promising to make it an ISO standard. I’m still pissed at them. As we speak, I’m trying to get all my development setup using Free Java (GCJ) tools under FC4. And you certainly can make threading mistakes in Java… most programmers do. Though with the threading features integrated into the language from the start, I think it’s easier to do the right thing in Java.
I do think Python is the best *scripting* language out there… but I think it’s a case of the right tool for the right job. I think it’s great for gluing things together, but for large scale development, I still would prefer a language like Java or C#.
As for PHP, I find it difficult to achieve a clean separation between logic and presentation. I prefer having my server side “business logic” generate XML, and then applying all presentation through XSLT. Having a well defined (machine readable) schema as a “contract” layer between the two appeals to me. This also aids development, as you can create sample XML output for your web design team to work with, long before you have finished coding your server.
And as for your blog – it’s asking me to verify my humanity by entering the code “JAVA”. So, I think we know who it agrees with
July 30th, 2005 at 9:11 pm
Yes please! GNOME really, really, really needs a higher level language because programming in C is not as funny as it is programming in Python.
If Python was a dependancy for GNOME, and if non time-critical apps could be written in it, I am sure that development would be much faster.
October 2nd, 2005 at 1:42 pm
The main purpose of new technologies is to make things faster.Why spend hours of programming some app in C or C++, if could easily write an app in Python in couple of minutes?