A tribute to APL: Gilbert Giappesi

A tribute to APL: Gilbert Giappesi

Post by AA2e72 » Sat, 09 Dec 2006 15:46:21



"Hello to all, and sorry being late.

I am not sure I understand all the implications that are really meant
by the below comment.
In terms of number of records, this what I have done recently, for a
one off task :

I read entirely in a WS a nearly 1.9 GB sized simple file with a few
millions records, process it and return to disk another resulting file.
It took 1 week to deliver, instead of a 3 months effort "requested" for
a conventional solution.

This is what affordable current technology allows ... WITH APL ....

Ok perhaps (?) this may not be generalized ... But, I am not so sure !
Gilbert "

Amazing, In a single week of the Gregorian calendar, (to me that is
35/40 hours) this was achieved:

1. A full techical specification of that the application was written
and then reviewed by a peer for both consistency and completeness and
detailing the technical limits of the application.
2. A full user manual, including an on-line help facility, was written
and they passed all user acceptance ciiteria.
3. A full suite of unit tests together with their corresponding
expected results were written and carried out.
4. Representatives of the user base specified and carried out their
suite of tests, using real data, both for the usability of the
application and its results.
5 A full release note that details system requirements and core
functionality for the application was produced.
6. The training material for a course, for training all other users
including future ones, as well as the arrangements for the course
itself are in place.
7. An automated installation for the application was written, tested
and used for deployment.
8. The full suite of code, documentation and test scripts and results
were archived in some version control software like Visual Source Safe.
9. The actual and book value of the application itself and the cost of
its deployment were perfectly obvious to the auditors.
10. And the application has full error recovery so that users are not
made to feel stupid.

Fascinating! I wonder why every one does not use APL for everything?

Or was this a case of:

"I know what this application SHOULD do and HOW it should be used and
HERE it is: for all other details, READ MY MIND, I am going to be
around to ANSWER all other questions and make you FEEL STUPID: accept
this or I might think you are thick!"

The answers to all other possible questions are perfectly obvious,
like:

What happens if the file is twice as big?
Will it work with the next version of the APL interpreter?
Will it work on a network?
Will it work with VISTA?
etc.

Randy M says "APL: If you can say it, it is done...."

The key part is "if you can say it" and it is understood that "I am
listening" before "it is done".

I wonder why no one believes the popular APL approach: "Here's the
solution, what is the problem?"
 
 
 

A tribute to APL: Gilbert Giappesi

Post by Randy MacD » Sat, 09 Dec 2006 23:50:22


@f1g2000cwa.googlegroups.com:


When you can express something you need in APL, and if it feels like the
expression mirrors how you would think of it, just press Enter, and you
have an answer you can use, perhaps all the answer you need.


APL is always listening. Sometimes it listens too well.


Perhaps one too many books have been written with that approach.

--
------------------------------------------------------------------------
|\/| Randy A MacDonald | APL: If you can say it, it's done.. (ram)
|/\| XXXX@XXXXX.COM |
|\ | | The only real problem with APL is that
BSc(Math) UNBF'83 | it is "still ahead of its time."
Sapere Aude | - Morten Kromberg
Natural Born APL'er | Demo website: http://www.yqcomputer.com/
-----------------------------------------------------(INTP)----{ gnat }-

 
 
 

A tribute to APL: Gilbert Giappesi

Post by Paul Manso » Sun, 10 Dec 2006 00:36:19


Hi Gilbert,

I too did did not undertand AA2e72E's comment "try that in APL" with
respect to Excel's 2007 new limit of one million rows ( I can just see
Austin Powers -- one MILLION rows!).

Don't listen to AA2e72E. I was sorry I bough his book for one reason.
Now I'm sorry I bought his book for two reasons.
 
 
 

A tribute to APL: Gilbert Giappesi

Post by AA2e72 » Sun, 10 Dec 2006 01:01:19


The remark "try that in APL" was in relation to the Excel formula for
calculating Easter Sunday (refer back to the post): it was meant as a
rebuttal of the argument that things are always simpler and better in
APL. If there is a more concise formula for Easter Sunday in APL, I'd
like to see it. Useful for working out working days (in the UK, Monday
following Easter Sunday (as the Friday preceding it) is always a bank
holiday, this is always variable, unlike all the other holidays).

Just in case it is misunderstood, I'll re-iterate that the Excel
formula is NOT mine: it comes from a book by John Walkenbach.

PS: The magnitude of Excel worksheets or the depth of APL arrays are
intrinsically meaningless: there is always another that goes beyond.
The context was the allegation that Excel cannot cope with more than
32000 rows regardless of machine resources( even Excel2000 supports
65536 rows)---whereas APL may well do: an array of shape 32768 by 256
([]dr 645), the size of a worksheet, requires a workspace of 76M or
more just to create it and in that workspace no other operation like
transpose or rotate are possible.
 
 
 

A tribute to APL: Gilbert Giappesi

Post by Paul Manso » Sun, 10 Dec 2006 01:28:53


Would that be this post, pasted below in its entirety? Now I have 3
reasons I'm sorry I bought your book.



SQL is indeed not a language, it is a means of describing the view of
the existing data that is sought/required (which may include basic
calculations), no knowledge of programming whatsoever is required: the
phrase data to information/intelligence comes to mind. SQL works in the

ultimate spirit of the APL language, namely the ability to resolve your

problem without any awareness of machine constraints or the internal
workings of any algorithms used.

Excel is "fine for your home budget": if you seriously believe that
then there is nothing more to say!!!

"it's limit appeared to be 32000+ (2^16) ..." and what do you conclude

from this? That APL does not have limits? Everything on a desktop is
ultimately bound by the resources of the computer it is running on.
Excel 2000 (since 6 years ago) can accommodate 65,536 rows on a single
worksheet and it can have as many worksheets as available resources
allow. Excel 2007 has 1M rows. Try that with APL!
 
 
 

A tribute to APL: Gilbert Giappesi

Post by AA2e72 » Sun, 10 Dec 2006 02:02:42

It is difficult to refer back to the precise message in words: it would
be message 27 sorted in reply order on Google Groups; here's the
relevant bit:
"

As you are peddling algorithms to make a feeble point, here are a
couple for you:

=DOLLAR(("4/"&A1)/7+MOD(19*MOD(A1,19)-7,30)*14%,)*7-6

This formula (not mine!), in a cell (formatted as a date) will
calculate Easter Sunday for the year specified in cell A1 as CCYY; try
it in APL!

I hasten to add, it does not make Excel better or APL worse.
"

Obviously your cross-reference is more accurate than mine "try that in
APL" as opposed to "try it in APL". Still I'd like to know how much
memory it takes to create an APL nested array of shape 32768 256 (for
that is what Excel worksheets are, in effect) and then to do any
operation on it, like selecting all rows where the first column is
numeric; I know it takes milliseconds in MS SQL.

I did not understand the reference to Austin Powers but I believe I get
the drift; so I'll ask: did you not find anything Austin Powers in the
'Here's a loan amortisation algorithm in K (followed by the rejoinder
using the adjective lovely)' and asking for corresponding code in
something else?

I'd stop counting the reasons and put it down to bad experience.
Sometimes, this happens in life. Better still write one that keeps the
number of reasons to precisely zero, universally.
 
 
 

A tribute to APL: Gilbert Giappesi

Post by jk » Sun, 10 Dec 2006 02:17:13

Sorry Paul, that I'm listening with you both, but ...
thanks for unveiling this!

I'm ultimately surprised that "AA2e72E" is writing books, although ...
he's typing a lot. I could expect it "I don't know K (and I am not going
to)"
How do they call this attitude?

"AA2e72E" can't even read or is not reading - nobody was talking about
calculating Easten Sunday with APL. I said - twice - "the munks
did that for me" (you might remember Ray Cannon's article in Vector).
Instead, the subject was the "leapyear". "AA2e72E" came up with a
buggy JavaScript piece of code, which should be readable, bla, bla ...
(somebody from J Software checked, I didn't - I had no urge whatsoever).
We've seen this kind of APL-bashers for ages, most of them unable
to distinguish {dot} from {iota}, if you know what I mean.
Best regards and say hello to your brother (I still have his
butterfly-tie!).
(jk) Jan Karman
 
 
 

A tribute to APL: Gilbert Giappesi

Post by Randy MacD » Sun, 10 Dec 2006 14:11:04


@j72g2000cwa.googlegroups.com:



This doesn't look like something that would make APL break a sweat. I'm
curious as to the meaning of:
. DOLLAR(X),
"4/"&A1 -- I _do_ know A1 is a reference to cell A1, but the quoted
thing..?

14% means what?

I've some guesses, and I'll work from there, using J, which is close
enough:

_6 + 7* DOLLAR (4 }. ": A1) % 7+ 40* 30 | _7 + 19 * 19 + A1

I'm not sure what the answer is supposed to look like... MMDD perhaps?

Some hints would be appreciated.
--
------------------------------------------------------------------------
|\/| Randy A MacDonald | APL: If you can say it, it's done.. (ram)
|/\| XXXX@XXXXX.COM |
|\ | | The only real problem with APL is that
BSc(Math) UNBF'83 | it is "still ahead of its time."
Sapere Aude | - Morten Kromberg
Natural Born APL'er | Demo website: http://www.yqcomputer.com/
-----------------------------------------------------(INTP)----{ gnat }-
 
 
 

A tribute to APL: Gilbert Giappesi

Post by AA2e72 » Sun, 10 Dec 2006 19:17:13


Given:

1. ActiveWorkbook.Date1904 = True (overwridden)
2. Application.ReferenceStyle = xlA1 (default)
3. Columns("C:C").NumberFormat = "DD/MM/YYYY" (overridden)
4. ActiveWindow.DisplayFormulas = True (default)

The data view of a worksheet (Year is in Col A, Result is n Col B,
Result as Date is in Col C)

Year Result Result as Date
1960 20560 16/04/1960
2002 35883 30/03/2002
2006 37360 15/04/2006
2010 38809 03/04/2010

Given:

5. ActiveWindow.DisplayFormulas = True (overridden)

The formula view of the worksheet

Year Result Result as Date
1960 =DOLLAR(("4/"&A2)/7+MOD(19*MOD(A2,19)-7,30)*14%,)*7-6 =B2
2002 =DOLLAR(("4/"&A3)/7+MOD(19*MOD(A3,19)-7,30)*14%,)*7-6 =B3
2006 =DOLLAR(("4/"&A4)/7+MOD(19*MOD(A4,19)-7,30)*14%,)*7-6 =B4
2010 =DOLLAR(("4/"&A5)/7+MOD(19*MOD(A5,19)-7,30)*14%,)*7-6 =B5

The worksheet functions like DOLLAR, MOD, % are documented in the help
files:refer to both the Excel and the Excel VBA files.

Notes:
1. The formula works equally well when ActiveWorkbook.Date1904 = False
but you wil see different integers in column B but the result in column
C will be identical.
2. The numbers in column B represent the number of days since a
reference date (with 1904 as the reference date (day 1) is 02/01/1904
otherwise is 01/01/1900) on which Easter Sunday falls.
3. The dates are in Short UK Regional Date format.

If you want to apply another format to the date, this will give you a
clue:

I linked cells B2:B4 into D2:D4 and applied this format:

Columns("D:D").NumberFormat = "ddd dd, mmm yyyy"

The result is:

Year Result Result as Date Long Date
1960 22023 17/04/1960 Sun 17, Apr 1960
2002 37346 31/03/2002 Sun 31, Mar 2002
2006 38823 16/04/2006 Sun 16, Apr 2006
2010 40272 04/04/2010 Sun 04, Apr 2010

Hope this is of some value.
 
 
 

A tribute to APL: Gilbert Giappesi

Post by AA2e72 » Sun, 10 Dec 2006 19:28:37

Well spotted: the base date must be 1900 else the result in B2 needs 1
added to it.
 
 
 

A tribute to APL: Gilbert Giappesi

Post by Randy MacD » Mon, 11 Dec 2006 23:00:29


@j72g2000cwa.googlegroups.com:


Given I won't be buying Excel any time soon, I'll presume the help files
will not be available. The samples should be a great help. Thanks.

--
------------------------------------------------------------------------
|\/| Randy A MacDonald | APL: If you can say it, it's done.. (ram)
|/\| XXXX@XXXXX.COM |
|\ | | The only real problem with APL is that
BSc(Math) UNBF'83 | it is "still ahead of its time."
Sapere Aude | - Morten Kromberg
Natural Born APL'er | Demo website: http://www.yqcomputer.com/
-----------------------------------------------------(INTP)----{ gnat }-