Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Links

Perl and Postmodernism 69

An anonymous reader sent us a link to Perl and Postmodernism which is Larry Walls speech at LWCE (which I missed despite the fact that it was the only speech that I really wanted to see). If you enjoy Wall's stuff, you'll dig it. If you don't, you won't. I'm in the former group personally.
This discussion has been archived. No new comments can be posted.

Perl and Postmodernism

Comments Filter:
  • Posted by Just Another Perl Hacker from:

    I believe Larry explained at the beginning that
    he was talking about Modern in the sense of a
    "Cultural Period"... not from the perspective of
    something being "new".

    From that viewpoint, all of those languages are
    "modern".
  • by ninjaz ( 1202 )
    The problem with adding every feature that he thinks is cool is that you end up with a mess... in this case named Perl. Natural languages tend to me messes too, especially English.

    Perl comes with around 200 or so built-in functions. Compare that with Java's object heirarchy if you want to discuss bloat. On the other hand, perl is modular and extensible - take a look at CPAN, for instance. Just about any given task having to do with databasing, networking or text parsing can be easily coded up in a matter of minutes if you're perl-savvy. Contrast Sybase's perl and C API's if you'd like an example. The fact of the matter is that lots of *good* things are done that wouldn't otherwise get done because of the existence of perl and CPAN.

    Sure, you can write shitty perl code, but you can write shitty code in any language. If you're the anal-retentive type, you can use strict. :)

    FWIW, I've heard slashdot-esque attacks time after time on perl by people advocating using some other language, but when it came time to get down to business, for some reason, anything they coded which was more complex than hello world ended up segfaulting when looked at funny.

    This shouldn't be construed as an attack on C (or java for that matter). I realize that different languages serve different purposes. Perl realizes that, too.. :) It's written in C, after all, and has XS to make use of C libraries.
  • an AC said
    Why use a language that you hate?
    I am a big Python fan, having switched from several years of Perl programming. I don't hate Perl, so I cannot give a real answer, but I will say that sometimes:

    #!/usr/local/bin/perl -pw
    BEGIN {
    %color = ( "A" => "red", "T" => "yellow", "C" => "blue", "G" => "green");
    }
    s|([ATCG])|"<font color='$color{$1}'>$1</font&gt"|eg if !/^>/;

    is just too cool for words (this HTML colorizes input DNA sequences in FASTA format based on the residue type).

    Doesn't Python have a regular expression library?
    Sure does, and Perl5 compatible (excepting a few examples with backtracking based on embedded perl code). However, the equivalent would be somewhat more complicated.

    Also in Dylan,
    I'm sure this re example would be more complicated in Dylan as well.

    methods can return more than one value.
    Perl and Python both allow multiple return values, so I don't understand the relevance of your comment.

  • by Matts ( 1628 )
    Messes get the work done though. It tends to be the case that when I say something in english that isn't quite what I should have said, people understand anyway. Perl is the same.

    You can argue that this isn't a good way to design a language until the cows come home, but it works for me, especially if you manage projects - less competent people can produce the goods, and more competent people can produce good goods. I've had to work with less competent people before and its better to have an end product than have to train them to program right (this is because of time constraints, not because I think it's a better thing to do).

    Matt.
  • Unfortunately these academic languages don't solve many real world problems - only a subset. Perl solves many real world problems. I recall languages like Haskell, which is great for cute little (and some large) graph problems, but shite at text processing, GUI's, sound, networking, etc. Personally I do lots of different jobs at my work (text processing, GUI's, networking, graph problems, etc) and it helps me to have one language that can do them all.

    However, I would never force anyone to use perl if they hated it, like one poster here.
  • by Matts ( 1628 )
    Efficiency wasn't the point I was trying to make. If I had the time and the money to waste teaching every lemon fresh out of University how to program cleanly (in perl or in any other language) I wouldn't still be in business. I don't apply perl to every domain under the sun - but I apply it to most of the stuff that I do - because it's the language I know best (I also know C++, Java, Oberon-2, Python, Pascal, VB (yes, really), JavaScript and some others). If I was writing something time-critical I wouldn't use perl, but generally the stuff I do (text processing and databases) the time is either not critical, or the limiting factor is in the database.

    However, as a competent (I like to think _good_) perl programmer, everything I write is in modules and well documented.

    The point about perl though is that a good programmer can write well structured modular code (take a look at the NNML module for a fantastic example - it's an NNTP server), and a not-so-good programmer can just get along with it. The same can't really be said of many other languages, where you have to learn all the constructs and the right way to do things.

    And as for the example of inference - Perl manages to infer what you want to do very well (just like english). The sentance you write makes sense in the right context, the same can be said of perl programs. But let's not get carried away - perl is only context sensitive to the current statement - not across multiple statements (unless you count retval overloading).

    Language advocacy is futile isn't it... Still - can be worth it sometimes - it's the reason I checked out Python - and went back to perl.
  • I like what Wall says, and I try to read it a lot, because it makes being forced to work with Perl a little tiny bit less of a living hell.

    I hate that language.

    Except for short text-munching scripts, of course. Then I'll kill you if you keep it from me. Python works for everything else, but Perl rules there.

    -Billy
  • Perl's design doesn't presume that one language can solve 100% of the problems out there very well. Perl solves 90% of them very well. For the other 10%, I'll gladly go to another language.

    Perl solves 10% of the problems very well, and has been shoehorned into solving 50% more REALLY badly.

    Golly, that makes it a majority, doesn't it? Majority rules! Let's all use Windows.

    -Billy

  • Perl text-processing problems better than any language. There's 50% of web programming right there.

    If I had a hammer...

    Zope clearly shows that text mangling is not the only way to run a website (and in this case, not the easiest). There's more than one way to do this, and Perl's way isn't always the best way.

    Perl does networking well. There's another 10%.

    True, on a Unix box -- backquotes aren't considered good style. Still, 10% for CPAN support.

    But now you're adding unlike units -- "50% of web programming" doesn't add to "10% of all programming" to equal 60% of anything.

    Perl is a great replacement for shell scripting. Another 10%.

    Shell scripting is a replacement for Perl programming. I'll grant you more than 10% on that one :-).

    Perl is a great prototyping language. Another 10%.

    I try to prototype everything, but not in Perl. Shudder. I'll give you 10% here, although Python walks away with about 50% by your style of counting.

    Perl is an adequate (not great) approach to OO programming. Enough to clobber C++ for 10% of the problems, as it is more portable.

    "Not great" isn't high praise. Adequate is about right, though; it'll work, as would Intercal-2 (you know, the one with subject orientation).

    There's an easy 90%.

    Work the math again. Even ignoring the fact that Python can handle all of these except text mangling in a nicer and more portable manner, your numbers add up to somewhere above 30% (ignoring your web estimates, so add in as much as 50% times whatever fraction of jobs are done on the web).

    Now consider that Python does all this better.

    Of course, you'd have to program to know this.

    Thank you! But I think you DO know how to program, and you're just being modest.

    -Billy

  • As you'd expect, having something incorporated into the language allows having helpful syntactic sugar. For the particular case of regexes, Perl includes them in the language, while Python has an add-on module for them (primarily maintained by me). Because of this, using regexes in Python is somewhat clumsier than using them in Perl. For example, you have to pass regex patterns in strings; see the Regex HOWTO [python.org] for the details.

    It's a trade-off; for programs that do lots of complicated regex processing, Perl's notation gives it an edge. On the other hand, there are lots of applications where regexes aren't very useful, and for those applications this clumsiness is irrelevant.

  • Well, I don't know about you, but I have *definitely* heard the word "modern" applied to the system of ideas and beliefs that have ruled the Western world since the Renaissanse to our days (which would be, more or less, what you call rationalism). The difference is that "this" modernism I'm talking about had a broader ambit of influence; that is, it wasn't simply a literary or artistic movement, but a whole... mmm, how to call it... philosophy? Ideology?
    (Whatever; it's late and I'm going to bed...)
  • Threads like this prove to me it is time to do away with anonymous cowards posting on Slashdot. If you are going to ignorantly claim that Larry Wall, of all people, doesn't know anything about modern programming languages, at least tell us who you are so we know not to look at your comments anymore.

    You might as well just say that Ted Turner doesn't know anything about the TV business. And I want to know who is saying these dumb things so I can avoid them more easily in the future as I am looking for interesting comments.
  • by dvdeug ( 5033 )
    Irrelevant. Children are linguistic geniuses - they're basically hard-wired to pick up languages. If you want to compare the time the average adult takes to pick a new natural language to programing language, that's different.

    I'm taking a one credit hour Fortran class. For real ability, I'd probably need another one credit hour class on the subject, or the equivelent. People take five hour courses on human languages, and aren't even considered as knowing the basics yet. Full competence in a human language is probably 20-25 credit hours, at least.
  • In the end, that's my complaint about perl. It's far to easy to write ugly, nasty, unmaintainable code. A programming language should enforce some minimum standard of style in the name of communal good, and the standard in perl seems to be: "well, I sort of understand what it's supposed to do..." Not good enough.
    You are blaming the language for the programmers misuse of it. I don't agree that is appropriate. Perl does enforce some "minimum standard of style", but it appears to be different than your preferred minimum.

    You will never please everybody, but I do like the language.

  • Hmm. Perhaps documentation with that other write only language is the answer?
  • Perl text-processing problems better than any language. There's 50% of web programming right there.

    Perl does networking well. There's another 10%.

    Perl is a great replacement for shell scripting. Another 10%.

    Perl is a great prototyping language. Another 10%.

    Perl is an adequate (not great) approach to OO programming. Enough to clobber C++ for 10% of the problems, as it is more portable.

    There's an easy 90%.

    Of course, you'd have to program to know this.
  • I, too missed the LWE talk by Larry. Now I'm really sorry. Great speech, Larry. Now I know why perl has always looked like the contents of your average apartment complex dumpster: lots of cool, useful shit people throw out, hidden among even more nasty, disgusting stuff...

    I do agree with most of Larry's "analysis" of post-modernism. He even touches on what I think is the biggest downfall of post-modernism, and, coincidently enough, the biggest problem with perl . Larry called it the "Cult of Subjectivity". It's the subject of this talk, er, post:

    Despite Larry's attempts to label it as part of the modernist movement, absolute cultural relativism isn't: it's a natural (and logical) continuation of the post-modernist movement. It's what bothers most people living in the post-modernist age: the feeling that nothing has any absolute value, or that "It all depends on your point of view..." We tend to swallow the discomfort that comes along with being exposed to this concept, as long as it doesn't rear it's ugly head too often. The big problem with cultural relativism (and by some extention, post-modernism), is that you can't build a society on it. What makes a functioning society is common rules. Everyone has to agree that certain conventions are valuable enough that we all have to abide by them. Hence: laws.

    OK, enough philosophizing. How does this all relate to perl? In so far as perl is a post-modern language, it suffers from a problem similar to cultural relativism: the Cult of Mediocrity. Larry's point about the flexibility of perl to produce both beautify and stupifyingly ugly code is well taken: you can produce extremely nice code in perl much easier than many other languages. However, it's also much easier to writing totally unmaintainable code in perl than anything else.

    Perl supports to the Cult of Mediocrity (so does Visual Basic, and many others). It allows a minimally-competent programmer to write code, without thought to the community in general. In sort, perl allows you to be both lazy AND rude. The problem with the Cult of Mediocracy is that it places higher value on getting anything to work, rather than stopping to think if it should work.

    As it has been pointed out by luminaries much greater than myself, the difficulty in writing good code is not in mastering the language. The difficult is in producing a good algorithm (or structure). Programming languages should help the programmer by providing a framework where it is rather difficult to produce nasty code. B&D languages (like Forth) that enforce a single, "correct" standard lack the flexibility to be creative; however, flexibility for it's own sake is equally damaging (like, why are there 6 ways to do a case structure in perl?)

    The post-modernistic view of borrowing is good. However, perl seems to take this to an extreme, where it simply amalgamates other languages, and doesn't sythesize.

    In the end, that's my complaint about perl. It's far to easy to write ugly, nasty, unmaintainable code. A programming language should enforce some minimum standard of style in the name of communal good, and the standard in perl seems to be: "well, I sort of understand what it's supposed to do..." Not good enough.

    This wouldn't be a problem if perl was a restricted-domain (ie niche) language. However, it's a general-use language. No, I don't blame Larry for all the nasty perl code I see, but he does bear a good chunk of the responsibility for designing a language that allows that previous idiot to barf on a page and actually run it.

    ----------------

    All this said, I still like perl. If the programmer puts enough forethought into a perl script, it's great. Far easier and quicker than doing the same in C, C++, or even python. But I'll be more careful where I use it, and how I write code. Hopefully, everyone here will be to.

    It isn't called the "Swiss Army Chainsaw" of programming languages for nothing. Treat it with respect, and care, and it's very powerful. Screw around with it, and it'll rip your leg off (or at least, the programmer who has to read your code will hunt you down, and do so...)

    ----------------

    By the way, Larry, that's what your daughter meant when she says "That sucks!". It's OK to be post-modernist to a certain extent, even to a greater extent, but there have to be certain boundaries. Some things are BAD. And there has to be agreement that they are BAD. Of course, the trick here is to figure out who gets to set the boundaries. Never said it was easy. It's just that the bar is a little too low in perl's case.

  • Sorry, but Nietzsche is postmodern. It's not "reason to power" but "will to power". Objectivity flies out the door when the will to power is asserted: notions of "truth" and "falsehood" are irrelevant, what matters is _will_.

    Though "Modernism" in the fine arts is usually applied to the period beginning with Picasso (probably from WWI to, say, WWII), the roots of Modernism in philosophy date back to the Enlightenment. It is then that the notions of reason and "objective truth" began to be in vogue.

    Po-mo in architecture also had a late start - the death of the "functional building" took place in the early 70's, at which point monstrous monolithic apartment blocks ("machines to be lived in") began to fall out of favour... nowadays buildings tend to be less functional but more ornate, with elements borrowed from various epochs (e.g. columns, art deco and glass facades used simultaneously, etc)

    However, as far as philosophy is concerned, pomo begins with Nietzsche (turn of the century), and continued with Heidegger, Foucault, Derrida et al. With these authors, there is a multiplicity of world-views, and no such thing as real "objectivity" (in fact, there is, but only as one particular world-view :) All of this would have been anathema to Modern thinkers such as Voltaire or Kant.

    My personal opinion, however, is that Schopenhauer had a postmodern core - so pomo in philosophy goes back to the late 19th century.
  • There is a certain irony in trying to pin down the meaning of "postmodernism", since postmodernism itself tries to explode the myth of absolutes. However, I can give my own humble opinion, which will inevitably be open to dispute, given my somewhat limited readings on the subject.

    I think the problem is that the terms have become overloaded by their use by various fields,e.g. architecture, fine arts, literature and philosophy.

    Modernity has its roots in the Enlightenment... it is the "age of the grand narratives", or the age in which it was believed that humankind was ultimately comprehensible and perfectable. It's greatest exponent, in a way, is Karl Marx: he provided a world view that was all-encompassing, and utterly rational (in spite of what some brain dead neo-McCarthyites might think). The law of the day was reason, and the focus was on the human subject. Throughout modernity, the notion of the ego was an unquestioned assumption.

    Modernism, in my view, depends on the field in which it is used. In the social sciences, it was marked by the appearance of Freud. In the fine arts, it refers to the works of Picasso, Braque, Rodin. In literature, it refers to the works of Joyce and Hesse. In architecture, it refers to the works of the likes of Frank Lloyd Wright and De Corbusier. In many ways, these artists created in reaction to classisism... yet their works focused on the centred subject (i.e. it assumed the ego). They could portray a dismal, irrational world, but they always retained the modernist focus on the ego (e.g. the Dadaists, who really attacked reason as a protest against the horrors of WWI - an act which implicitly assumes the ego).

    Postmodernism is the vision beyond (but not necessarily *after*) the modern. A whole mish-mash of ideas and themes fall under this banner. It's invariably a mish-mash, because postmodernism denies that grand narratives of human experience can be universal... hence a taxonomy of postmodernism cannot be universal.

    Postmodern literature sees a "de-centering" of the subject, and the playful use of various elements from "pop-culture" genres... e.g. Umberto Eco's "Name of the Rose" is a philosophical treatise dressed as a detective novel (possibly the bottom of the literary pecking order as far as moderns are concerned :)

    Postmodern buildings will have a pastiche of elements from various epochs... they are in many ways a "pun" on the claims of universality of various epochs, a sort of playful joke. They are, on the whole, definitely more liveable than the modernist monstrosities we saw built in the 50's and 60's.

    The roots of postmodernist art, of course, comes from the disintegration of the modernist project... which begins with the demolition of the ego. However, it's impossible to pin down when this happens in philosophy. Certainly Nietzsche began to break down the assumptions of the centred subject, of modernity's rationalism, of the perfectability of humankind back at the turn of the century. However, existentialists such as Sartre and Camus, who came much later, are still in the modernist camp: their focus on the ego or self is crucial to their writings. So the time when philosophy stops being modern and becomes post-modernist is not clear-cut.

    In fact, this obsession with dividing everything into sequential clear cut periods is very much a modernist thing to do... I have heard from a lecturer that we have always lived in post-modernity, it's just that as moderns we hadn't realised.

    It's interesting that post-modernists like Foucault, Derrida, Lyotard and others really started coming out of the woodwork in the 50's and 60's, soon after the excesses of Stalinism became apparent (after Kruschev's speech at the 20th party congress of the Communist Party). It also took off like a rocket after the Prague Spring, in 1968. A cynic might argue that it is the left intelligentsia's reaction to a failing Soviet Union...given that Marx was the pinnacle of Modernity, it sort of connects, does it not?

    A really good book on the modernist and post-modernist transition in philosophy is Solomon's "Continental Philosophy since 1750", published by Oxford Press. A more humorous treatment of Postmodernism in art, literature, architecture and philosophy is "Postmodernism for Beginners" - a cartoon book!
  • Enough buzzwords for ya? This guy is a master at saying nothing!
  • unfortunately, i must agree. wall is a great writer (i don't think any software manual other than the camel book made me laugh out loud), but he shouldn't engage philosophy in his writings.

    i was especially confused about his comments on deconstruction. he seems to equate deconstruction with a method of taking different elements from different genres and nailing them together into one strange-looking structure - the sort of algorithm that sometimes passes as postmodern art.

    but there was no mention of deconstruction as attempt at discovering and inverting basic cultural assumptions - the same assumptions that that made so many philosophers assert they've discovered metaphysical truths. really, perl is not even close to a deconstructionist language, as it never attempted to discover the bases for 'goodness' and 'badness' behind other languages - in fact, it's primarily pragmatic in that it does not critically analyze other languages, but simply assimilates whatever conventions it finds useful.

    but i still think the camel book is great.
  • Nietzsche and Heidegger were early postmodernists,
    or at least they were highly influential in
    developing the thinking of the radical French
    intelligensia, Derrida in particular.
  • But what point is there in saying modernism
    is based on the philosophy of Nietzsche without
    saying why, such a claim is very close to saying
    modernism equals nazism and more or less
    duplicates the basis of Larry Wall's attack on it.
    Of course Nietzsche differed from the pomos, for
    him subjectivity was exercised by a few supermen
    whereas Derrida goes even lower and refuses any
    universalism what so ever, just meaningless difference.
    As for /. I would have thought a technology website was a very good place to defend rationality
  • by NutZac ( 18515 )
    Loved the speech. Love the language. I've been able to pick up Perl very quickly, and do a considerable amount of cool stuff with it.
    Larry Wall is certainly a man worthy of respect in my mind.
  • Really nice speech, too bad I wasn't there to hear it. More audio-clips from the GNU and Linux-related speeches people! :)
  • by scjody ( 19861 )
    Did this speech cause jwz [jwz.org] to leave the party?

    If so, how quickly?

  • The distinction between Modern and Modernist is subtle but well understood by those engaged in pomo criticism. Everyone from Descartes onward are Moderns, whereas Modernists refer specifically to the period from the late 19th century to 1960s.
  • > Nietzsche is postmodern.

    It is generally a bad idea to claim Nietzsche for a cause, because his philosophical texts is very writerly and lends itself very well to misreading.
    If history is any indication, you can read just about anything into Nietzsche if you try hard enough. The Nazi did it, the existentialists did it, and now Nietzsche is our pomo prophet. There is a section early-on in Beyond Good & Evil in which he predicts exactly just that. It's the section about the New Philosopher wearing many masks but that his true identity will always elude the crowd.

    Of course it'd be wrong to deny that postmodernism is very much a Nietzschean project.
  • You are wrong. Twice. First, the Artistic License is much freeer than the viral GPL. Second, Perl *is* distributed with the GPL. If you want to use Perl, you can do that under either GPL, or the Artistic License. It's *your* choice.


    -- Abigail
  • It was said:

    > Gwydion Dylan has a nice Perl-compatible regexp library. Also in Dylan, methods can return more than one value.


    So what? It has a compatible regexp library, and it returns more than one value from a method just like Perl. All I've been hearing about this Dylan are a handful of things it does the same as Perl.

    If you want to promote Dylan, come up with something it does *different* from Perl. Perhaps you can think of something that it does better; but considering what you've written so far, I doubt there's anything.

    Is there a CDAN?


    -- Abigail
  • by Abigail ( 70184 )
    > Natural languages tend to me messes too, especially English.


    Yet four years old children master English better than most people master C, Java, Python, or Dylan.


    -- Abigail

It is contrary to reasoning to say that there is a vacuum or space in which there is absolutely nothing. -- Descartes

Working...