HP3000-L Archives

December 2005, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Roy Brown <[log in to unmask]>
Reply To:
Roy Brown <[log in to unmask]>
Date:
Thu, 15 Dec 2005 13:43:34 +0000
Content-Type:
text/plain
Parts/Attachments:
text/plain (98 lines)
In message <[log in to unmask]>, Matthew
Perdue <[log in to unmask]> writes

>Quoting "William L. Brandt" <[log in to unmask]>:

>> Anybody read this?
>>
>> Interesting article - in essence they said that there has been an explosion
>> of languages - many needlessly - to the consternation of Microsoft which
>> would like to control software developers.
>>
>> Gosh I came from an era when there was COBOL, FORTRAN, and assembler.
>>
>> Now there's Ruby On Rails (actually a system to work on a language called
>> Ruby), C, Perl, Python, PHP, TCL, Java, Ajax, Flash (for buiilding web
>> sites), Dojo, Domo Arigato (ok, just made the last one up.....)
>>
>> Bill

>I remember learning in the mid-70's a language that had a beautiful syntax and
>was elegant in execution. It was very powerfull - a single statement of less
>than 10 characters could create a three dimensional matrix, populate it with
>random numbers and then invert the entire matrix. It was difficult to learn as
>it had two different modes: monadic and dyadic (some of you may now know the
>name of the language). As I remember it was targeted more towards math
>functions. Also, if memory serves, it was: A Programming Language - APL. And (I
>think) for a short time there was a compiler available on the 3000 series II.

I learned it too. I think if you learn APL, it changes the way you think
about problems forever, even if you don't ever use APL again.

When operating on a row of numbers, even now, I consider whether I can
achieve my aim more easily by cumulate/operate/decumulate than by
operating on the row as is. That's an APL trick.

Monadic and dyadic aren't hard, BTW. Take some good old Basic:

LET A = - B
LET A = C - B

In the first, the minus sign is monadic - it takes one term, the B
In the second, it is dyadic - it takes two terms, the C and the B

Just as Molière's Le Bourgeois Gentilhomme was surprised to find that
he'd been 'speaking prose all his life', you might be surprised that you
have been using and understanding these concepts all the time :-)

APL also has niladic, as it happens, roughly equivalent to, e.g.:
        LET A = TIMENOW
where TIMENOW is a volatile function that returns what its name
suggests.

What might have hampered APL is that it uses a large range of special
symbols. While these give it a lot of its power and terseness, you have
to learn them. And you are probably better off with a special keyboard
that has an APL mode, and the symbols on its keycaps: another extra-cost
purchase option..

APL evaluates right to left, which takes a little getting used to at
first. But if you look again at that apparently simple LET A = C - B
example above, you'll find that that has both left-to-right and
right-to-left evaluation steps in it. Us humans seem to find it simple,
but it's actually more complex than APL. For a machine, anyway.

There was an APL for the HP3000 for a while - it was a board, as well as
software. But it would flatten your II or III series, so there was not
much take-up, and from IV onwards, there was no hardware support for the
board. But the HP APL manual was a thing of beauty, using multiple
colours to get its ideas across. I still have one (though I never had
the product) in the not-loft somewhere.

As you say, APL leant towards math functions, but it had some very
practical uses in manufacturing; I did an entire production scheduling
system in it - at first just to assist the people doing it manually, by
doing the grunt calculations on the plans they conjectured and typed in
- but later, we achieved the holy grail of having the system do the
actual planning as well, within the constraints we set.

Those 3D matrices might seem somewhat removed from oil-and-swarf
reality; but take an array of Products x Work Centres, where each
row/column intersection holds the hours the product needs there; and
then an array of Products/Week where each row/column intersection holds
the quantity required; and matrix multiply them together - and bingo!
there is your machine loading by Work Centre and week, in one hit.

Sure beats FOR j = 1 to m, nested within FOR i = 1 to n...

Of course, you can now do this in Excel, with a pretty 3D graph that
bobs up and done as you change the figures, in a couple of lines of
code. But without APL, I might never have figured out that that was the
smart way to go...
-- 
Roy Brown        'Have nothing in your houses that you do not know to be
Kelmscott Ltd     useful, or believe to be beautiful'  William Morris

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2