Python Considered Dangerous, but what to do?

n1vux on 2005-11-04T23:51:11

Python Considered Dangerous
Famine threatens, Modest Proposals needed
or, an Ecology of Free Software -


I was reminded by Nat's comment on learning Python and a comment on Boston.PM list referring to a Slash-Dot thread (that strangely claims PHP has defeated Java) that that I had had a revelation at a LUG meeting recently.

I have heard two reasons to prefer Python to Perl that made sense -- and the source and sense of the second one scared me.

  • A friend with little remaining wrist does his scripting in Python, since his voice-typer works better with a non-punctuated language.
    (Yes he can reconfigure it to do Perl, but he can do Python with the same training set as email and data files, and it doesn't like switching training sets. If he could switch brands he would, but there's not a good open source alternative in voice-typers yet, there's a very high cost to entry to that market. I assume he uses auto-indent so he doesn't have to say TAB TAB TAB for each line.)
    This is reasonable, limited, and harmless.

  • Mark Shuttleworth is pushing to make Python the dominant scripting language of the universe. If I understood Mako correctly at his Ubuntu talk to BLU
    «Python: One goal is "python everywhere." It is the energy that surrounds us and binds us as Jeff Waugh has said.

    «We are working hard to have everything extensible by Python. Mark loves Python.»
    [notes]

    In Q&A, Mako elaborated that having one scripting language for system install, config, startup files and for application customization/integration/scripting is obviously a win. But the reason for preferring Python over Perl in the Gnome+Python+security Ubuntu-preferred feature-set is the simplicity of syntax will make it more acceptable / accessible as a mere scripting language to non-programmers, the desktop users. The minimal subset is perceived to be smaller.

    This is reasonable, potentially pervasive, and thus dangerous. Since he's the millionaire astronaut behind Ubuntu, Mark can do this. If he succeeds in making Ubuntu the replacement for Windows -- and all FLOSS users should hope he does, even Perl Mongers -- Python will be the replacement for WinDos ComManD files and VBA scripting (Visual Basic for Applications), and the replacement for most BASH too.



Modest Proposals Needed

In the sense of Swift, we need some modest proposals to let us see the elephant in the room -- maybe some cup-throwing too, because Jon's comments that Perl is in trouble

« unless we can come up with something that will excite the community, because everyone's getting bored and going off and doing other things»
is still, or again, true. Perl6 is exciting, but what Perl community will be left for it to excite when it is done? They are wandering off -- even Nat is learning Python, though he says it's only a dalliance, not an affair of the heart -- but more seriously, the niches that were once Perl's alone are crowded with too many kinds of finches in one niche.



I'll play Devil's Advocate.(or perhaps Estate Agent and look at our location, location location selling points)

Is Parrot the redemption of Perl, or the path to obscurity? If Parrot makes Python run faster and gives it native access to all of CPAN and 6PAN, does Perl become just the esoteric language for a small band of FLOSS gurus to implement modules for Ubuntu and Open Office users to call from their Python scripts?

So what "ecological" niches has Perl had in the past, and where can Perl5/Perl6 continue expand in the future?

  • PHP, a watered down Perl, has colonized the low-end LAMP niche (in spite of mod_perl and FastCGI actually being faster and safer, contrary to mythology).
  • Ruby on Rails seems to be gaining mind-share in larger and rich-client (AJAX) LAMP applications, as if Catalyst, Maypole, CGI::Applicaiton, FastCGI didn't exist. Having a cool name that plugs the language is an advantage?
  • Java (contrary to the /. article) retains the high ground of stick-build web-apps, thanks in part to the high-profile Apache+Struts library-stack community.
  • Python may well get the VBA and Better Shell niche thanks to Ubuntu and the backfeed to Debian (if FLOSS wins all).
  • The added academic respectability of the Junctions, Grammar, etc. of Perl6 may give Perl an academic life, but the academic life can be the kiss of death, look at poor Pascal and SmallTalk.
  • One liners rule! but the are not a community-building niche.
  • CPAN continues to be the "killer app" as the mechanism implementing Cox's Software IC marketplace, but will that be an advantage forever? Python may not have a repository yet, but it will on the Ubuntu side, and must eventually get there for all platforms. PHP and JScript already do. The new Debian.CPAN.org provides automated packaging, which Ubuntu is planning for Python.)
  • BioPerl owns not just its niche but its whole microclime, because of a standard SDK.
  • Thick-Client programming -- possible with TK or Win32 libs, but this is not "mainstream", and not likely to be competitive
  • WebServices -- should be a sustainable niche, but limited growth for the same reason -- largely professional coders, this is more complicated than scripting users usually get.
  • Systems Administration -- well established in proprietary Unixes and Linux; likely to remain so in Proprietary and non-Ubuntu Linux. But if Python takes over on Ubuntu and thence Debian and thence DCC- and thence LSB-based distros, perhaps this is a shrinking pool?


In the market place of ideas it's grow or die. The Media new and old -- magazine publishers, slash-dot, book publishers, stock pickers, bloggers -- treat everything as if you aren't growing you must be shrinking, and if you aren't the fastest growing you aren't growing. This is strange logic, but all too often self-fulfilling.

So, where do we grow?


The VBA niche

Alias on 2005-11-05T10:00:02

There's no reason Perl can't be the VBA replacement.

CPAN forms the core advantage because of it's Long Tail effect. It's not the strength of the core dependencies that is it's strength, it's the breadth of the modules.

And that's the sort of thing that takes 5 or 10 years to really flesh out.

I am continuously encouraging people to write CPAN modules in their obscure specialised areas, and to write internal things in the form of CPAN modules, so that later they can be moved over to CPAN easily.

With the breadth of the CPAN behind it, we just really a truly brainlessly easy to install Windows installation of Perl, something we don't have with ActivePerl, something that installs from CPAN directly, not via some filtered PPM repository.

See the PXPerl for what is the closest thing to this yet.

And we need higher QA for CPAN, in fact to be the new corporate VBA we need universal testability. See the soon to be announced Perl Image Testing Architecture for that. And we need better tools for Perl... PPI and friends are slowly heading in that direction too.

There are things happening, they are coming along, but they just aren't ready to intersect with the general Perl-using public quite yet.

And remember, there's still more jobs for Perl skills that Python and Ruby. Making Perl sexy again is a harder problem... :/

Dont be afraied

sir_lichtkind on 2005-11-05T11:20:14

when others throw cups. python can be the pain in the ass, when you're a demanding person and ubuntu isnt the perfect distro in all terms.

and why should this be a "eat or be eaten game", do we really want this? this world behave like this is no excuse because it its this way only when we allow it. the primer goal is to have joy while programming and to be effektive with your stuff, so if there is something to lern lets adapt it or when it just ruins the fun, ignore it.

yes perl sometimes need some better PR but please consider that python is facing some serious thread from haskell boo perl etc too. and has promblems with its rapid changing syntax etc. maybe you need to see it all from different perspective.

Scripting for non-programmers?

bart on 2005-11-06T14:55:00

the simplicity of syntax will make it more acceptable / accessible as a mere scripting language to non-programmers, the desktop users.

I do not buy that argument. Applescript was supposed to be a plain English, simple language for casual users. But in reality, it's one of the most inpenetrable languages around: the best way to write code that works, is to copy a working snippet, and edit it. Starting coding from scratch is, in my experience, almost impossible to do.

So: I tend to think that a "simple syntax for non-programmers" is more like a holy grail, something people would like to have, but which cannot really exist. The best syntax for a language is, IMO, a consistent syntax. Simple rules which make sense. But non-programmers will typically still never get it.

And perl's rules are simple... though it's typically not a uniform syntax, at least the syntax is simple for any given construct.