Log in

No account? Create an account

Previous Entry | Next Entry

The irony is that Perl itself is a subset of UNIX features condensed into a quick-and-dirty scripting language. In a literary light, if UNIX is the Great Novel, Perl is the Cliffs Notes.
    - Thomas Scoville, "The Elements of Style: UNIX as Literature"

Care to discuss?

ETA, 20:30 CST: Also, any advice on Wikination and bootable CD burnination?



( 5 comments — Leave a comment )
Jul. 11th, 2005 03:48 pm (UTC)
It's old and out-dated, but certainly relevant for Perl 4. Perl 5 and 6 are far from what one would call a 'scripting language'. Perl has become a full-fledged programming language used by many corporations and open-source groups for building of all kinds of apps. In fact, using the Perl Object Environment, I've put together a tiny web server that pipes the output of a 'tail' function to your web browser. I'm still working on the re-design of this app, but so far I've reduced the number of lines of code from almost 3,500 to 200 (but when I'm done it will probably come closer to 1,000, maybe more).
Jul. 11th, 2005 04:04 pm (UTC)
My evolving relationship with Perl
You just made me look up The Perl Timeline at the Perl History page, and it seems I've always been a bit behind the times.

I first learned perl from Nathan Dale Gettings, one of my programmers at the Beckman Institute, along with alpenglow. I spent about a few weeks to pick up the scripting, regexp, array/hash, and string-centric features of Perl 4, along with its function calling syntax. Unix system hooks and the rest came later.

At this time (spring 1997 - spring 1998), I was also sitting in on the research meetings of Professor Mehdi Harandi, the knowledge-based software engineering (KBSE) guy at UIUC who is now the head of the graduate program and the Illinois counterpart of Professor David Gustafson here. Don't let the acronym "KBSE" fool you - the group was composed of pretty formal PLT (programming language theory) people, such as the senior Ph.D. student at the time, Cesare Tinelli, now a professor at the University of Iowa.

Duane Searsmith spent a couple of months surveying Tcl/Tk, Perl, and Python (Ruby was not yet in vogue then), going over the language features of each. Though I paid sparse attention at the time, I saw how powerful and elegant Python was and I decided to use either it or Perl in my dissertation. Just because Nathan was better with perl, I ended up doing much more work in it.

Note that Perl 5 was out in 1995 and Perl 6 in 1997. I didn't start using Perl 5 until 1999 and am only now even looking at features of Perl 6 - more on my early/late adoption idiosyncrasy later.

In 1998, I completed my dissertation, earned my Ph.D., and went to work as NCSA, where jellybeanzulu was an undergrad programmer at the time. I used perl extensively in all of the preprocessing for data mining using our nearly-open source (MLC++), closed-source (D2K), and commercial (SGI MineSet, Clementine) software. I even used to prepare data for Jenesys, our genetic algorithm module for D2K.

By 2000-2001, I was using Perl 5 heavily to run geckies experiments. Later on some of the geckies people adapted most of my scripts into "ReuseChar", a reimplementatio of Steve Gustafson's Keep-Away Soccer simulator in Java. There are a few perl routines here, mostly wrappers for automation of experiments.

Looking back so far, I haven't done nearly as much with Perl as I'd have liked, but the best is yet to come!

Jul. 11th, 2005 04:36 pm (UTC)
Re: My evolving relationship with Perl
You've worked with Perl a lot more than I thought. That's cool! I'm suggesting that IBM purchase this Perl2Exe compiler that I used at the IRS before leaving them. It does bloat the Perl program when it compiles it, but a little bit of bloat isn't too bad when you want to get a project done quickly. This re-design I'm doing was sized (by other developers) to take 1600 hours and I'll have it finished in less than 300 hours. The PMs are very happy about that.

One of the things that made me happy about Perl 5 was the addition of the ability to lexically scope your variables with my. So now I go and read code other people wrote and see them using the local function to do what should be done with my. I always try to explain to people the difference when they don't know it, because local can get funky if you're using multiple threads (since it modifies that variable only locally within the block of code).

And I think the addition of anonymous subroutines and anonymous hashes and arrays was one of the better additions, because it makes life a lot easier when you're automating enterprise systems management tools like Tivoli. When you need to look at the output of a command and make a decision, it's nice to be able to pipe that command once and then store all of its output in some sort of data structure. Reducing the number of fork calls from back-tick/system/qx calls is never a bad thing.
Jul. 11th, 2005 04:18 pm (UTC)
From my pathetic view, isn't unix the os and perl a language?
Jul. 11th, 2005 05:59 pm (UTC)
A not-so-fine line
Actually, that was my first reaction, too.

I think the more subtle nuance here is that Perl is both a general-purpose programming language, with platform-independent features (those that can be isolated from, and portable across, architecture and representation) and a scripting language, which gives hooks into an OS.

Think about cat, cut, head, tail, less, grep, uniq, sort, and join - Unix commands that can be used to do a lot of sophisticated things, even implement some features of a relational database without DBMS software. Then consider regular expressions, sed, awk, and cut. Combine these with lex/flex (or Antlr for you young whippersnappers) and yacc/bison (or JCup) and pretty soon you're talking about real power. Some of these (e.g., awk by itself) are Turing-complete, but as David Padua, a professor of ours at UIUC, put it in his Advanced Compilers (CS 426) course: "I'm a programmer, not a poet". :-)

Back when the vi/emacs wars were relevant, this was an important distinction. For a time, after the first advent of compilers but before the total ubiquity of the bytecode interpreter and the virtual machine, C was not just a high-level programming language but a mid-level one. People reveled in the ability to break representation independence (some might say "wallowed in the mud"1).

1 Paul Tanenbaum, a friend of mine at Hopkins who ended up becoming a Mathematical Sciences major and completing a Ph.D. under Ed Scheinerman, once heard me rant about the 0 == FALSE / 1 == TRUE equivalence and pointer arithmetic. In those days he was a grad student in CS and I was a third-year undergraduate in CS and MathSci. "What's wrong with that?" he asked. "It's convenient!" I sputtered for a bit as CS undergrads are wont to do and spouted the party line about while(1) being a pretty dumb expression, the sanctity of types, etc. At that time I worked for Amy Zwarico and Scott Smith (who was the new head of JHU-CS, the last I checked), both languages gurus. If I had had more PLT experience at the time, I'd have pulled out a pencil and paper and shown him how weak typing breaks things. But it just goes to show: you can believe in something but not have the intellectual tools or knowledge to back it up, in which case a dogmatic position is nothing more than a matter of religion.

( 5 comments — Leave a comment )

Latest Month

December 2008

KSU Genetic and Evolutionary Computation (GEC) Lab



Science, Technology, Engineering, Math (STEM) Communities

Fresh Pages


Powered by LiveJournal.com
Designed by Naoto Kishi