[oclug] Yet Another Language Discussion (was Re: Python )
Francis J. A. Pinteric
linuxdoctor at linux.ca
Fri Jun 20 07:45:00 EDT 2003
On 20 Jun 2003 00:09:57 -0400
Rod Giffin <rod at giffinscientific.com> wrote:
> You know, to me Perl is one of those languages that you never needed
> unless you learned it. If you learn it, it's indispensible, but if
> you never learn it, you don't miss it. Funny that.
I've learned it and I don't need it. Perl started out as a tool to
manipulate log files and grew into the monstrosity it is today. I don't
really dislike perl, what I do dislike is that people tend to use it in
place of more appropriate tools simply because Perl can do it. How
many times have you seen Perl invoked to do things that sed and awk can
do better and faster?
Back in my university days, the moe snobbish amoung the gurus (back then
we were called `hacks') used to say that a real computer language is one
in which you could write a compiler for it in itself. That, it was self
righteously pontificated, was the mark of a truly useful language. Can
Perl do that? Hmmmm????
There are reasons why some people thought that way, one being that a
language compiler is required to do all sorts of various and sundry
things and it is truly a test of it's flexibility. One person I knew
back then went so far as to attempt to write a C compiler using QED. I
don't know if he ever succeeded though. QED is a text editor with a
very powerful editting and macro language from which ed, vi and sed were
derived as very small subset. It had internal buffers that you could
divert text into or even execute. There were a whole host of number and
string registers that could be called upon, and user defined number and
string registers could created, not to meantion a very powerful macro
capability. There were dozens of commands and the whole concept of
regular expressions actually originated with QED.
While regular expressions since then have become more powerful than back
in the 1970's, how they could be applied was more powerful. For
instance, you could tell the substitude command on which particular
instance(s) of a string you want the substitution to occur:
This would substitute the second and fourth occurance of `string' with
`new string'. The numbers could be a number register also which
syntactically was written as `\n'. Lots of QED ended up in various
different other small languages like troff.
And talk about unreadable! If QED were around today, it would inspire
obfuscated code writers of all languages by the tens of thousands. In
fact, there would be no need to obfuscate, because the language is so
unreadable in it's natural state that a whole team of cryptanalysts
would have to be called in to decypher it.
But QED was a very large language running on large computers, notably
GCOS on a Honeywell 6000 series computer where I ran into it. `ed' is a
stripped down verion of QED designed to run on the PDP-11 Unix system
which didn't have all that much memory. However, if a full and complete
implementation of QED were made available back then, I'm sure a lot of
the different tools we have today may not even be around, and I could
name both awk and perl.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://tux.oclug.on.ca/pipermail/oclug/attachments/20030620/806ed572/attachment.bin
More information about the OCLUG