Ramblings 6/7 - APL & C for Mac

Jay Fields jayf at islenet.UUCP
Sat Jun 8 21:15:37 AEST 1985


Mac C & APL
By J Fields

While Macintosh seems to be the computer for the rest of us, what about all 
of the people who are use to the run-of-the-mill type of old standard 
computers?  What about people who like the usefulness of business 
languages like COBOL for coding business programs, or the speed and 
compactness of machine language for requirements that are speed or space 
critical?  Fortunately, new tools are coming along.  In recent months we've 
seen the arrival of both high-level languages like Basic, Forth, and Pascal 
(perhaps we'll even see COBOL soon); as well as machine level tools like 
MacASM for getting down to the   nitty-gritty bits.  (MacASM, by the way, is 
pronounced MAC-A-S-M with 'asm' spelled out so it doesn't sound like 
something out of Master's & Johnson's....)

My own observation is that the MAC is turning out to be a very good 
platform to implement both high-level and low-level tools on.  Not only is 
the Mac user interface appropriate for writers of executive memos and high-
tech scribblers, but it also lends itself well to programming -- I no longer 
have to write the same code twice.  The first language to show me this was 
HIPPO-C.  

Level one of Hippo-C comes with a well written and easy to use tutorial.  
How many languages have you learned by trudging through the books 
entering sample programs one at a time by hand?  With Hippo you can cut 
and paste the samples right out of the tutorial on your screen.  Want to 
experiment?  Well, you can use many of the same editing techniques you've 
been using in popular word processing programs to modify the sample 
programs.  So, instead of the program printing out Chris Somebody's name on 
your screen it can print out yours, or perhaps some favorite salutation, 
"Damn the torpedoes...."

Today something new and exciting came along.  Dr. Jerry Brenan, who works 
in the University of Hawaii's Psychology department, introduced me to APL 
on the Macintosh.  This was particularly exciting because I've not even seen 
APL advertised for the Mac, and did not know it was available.  Don't all 
software producers start advertising months in advance of product 
availability?

Now, if you're like I was before I knew about APL then you're probably 
sitting there asking yourself to reconsider your initial decision to read this 
particular article.  Such would have been my reaction at the very mention of 
a 'new language.'  The minds and bodies of programmers seem to develop 
some sort of defense mechanism with time.  

"We are not going to suffer these long hours while you learn every new thing
that comes along." they seem to say.  

They may have a point.  After all, you've hardly touched that 'good ole'  
MDL-2+ after the time you spent learning it (never mind what it cost -- the 
investment you made, the backup disks, and the surprise upgrade to super-
duper version 1.2XXX-rev. A to mod. II).  Still, APL is worth checking out.  It 
might just knock your socks off.

APL stands for "A Programming Language."  It's a language that seems 
particularly well suited to working with numbers.  Jerry showed me how, 
with five or six characters, he could almost instantly fill an array with 
10,000 randomly generated numbers.  "Hm, seems kind of fast," he 
murmured.  Four keystrokes later the sum of all 10,000 numbers was 
displayed just as quickly.  It was my turn to be impressed.  "Try doing that 
in Applesoft," I thought to myself.

Psychologists, like Dr. Brenan, can use APL to perform statistical analysis.  In 
fact, Dr. Brenan has programmed, in APL, a statistics package called STAT 1 
that runs on PC-DOS machines.  He will very likely be producing it for the 
Mac soon judging from his reaction to the Mac.  Rather than try to interpret 
what he presented to me, here are a few paragraphs from his brochure on 
STAT 1:

	"STAT 1 brings powerful research tools to the office desk.  It is ideal 
(a) as a statistics learning tool; (b) as an introduction to computer-based 
research; (c) as a set of statistical analysis tools.  STAT 1 takes data from 
initial coding and documentation through printing the final analysis with 
titles and footnotes.  STAT 1 helps the user pick appropriate statistics with 
its 'statistical decision tree,' and provides topical help screens at the touch of 
a key.

	"STAT 1 is reasonably priced, easy to learn, requires no special 
language, and comes with a comprehensive manual that focuses on 
application examples.  STAT 1 requires no computer programming, but 
presents all choices in easy-to-use menu form.  The user simply selects a 
procedure from the menu and presses Return.  STAT 1 prompts for critical 
inputs through each step of the analysis.  The program is ideal for offices and 
agencies in which a number of people must analyze research, but do not 
have time to master complex mainframe statistical packages.

	"STAT 1 provides all basic statistical procedures, beginning with 
simple descriptive statistics crosstabulations and data transformation, and 
working through to powerful correlation, analysis of variance, and regression 
routines.  STAT 1's full-screen editor gives the user complete control over 
data entry and correction.  Robust data transformation procedures help 
correct for bias in data, and unique date-arithmetic functions provide a tool 
for analyzing administrative data."

There, I couldn't have said that better myself.  I want to stress that Dr. 
Brenan also offers a text version of the STAT 1 manual that is suitable for 
use as an introductory text for teaching statistics.  My feeling is that if 
you've never studied statistics, but think you could benefit from applying 
statistics in your work environment, then STAT 1 would be a good package 
to pick up both for learning stats and for later applying them.

STAT 1 is offered at $179.95 and requires an IBM-PC or a "99% compatible" 
personal computer with 256K bytes of memory and two floppy disk drives 
or one floppy disk and one fixed disk drive.  It will use an 8087 math 
processor chip automatically if one is installed, and uses all available 
computer memory.  To order contact me via Compuserve 76174,456; USENET 
..islenet/jayf ; SOURCE CL3035; phone, 808/521-4487; or mail, c/o IDSC, 1251 
Heulu St. #107, Honolulu, Hawaii 96822-3085.  If you have a bankcard or 
can send a check I'll relay the order to a stocking dealer.

STAT 1 is an example of the usefulness of APL.  If you have math intensive 
applications APL is probably a good tool to add to your kit bag.  Other uses I 
can think of are for stock market analysis, financial modeling, engineering, 
and business management.  APL comes with its own tutorial built in, a 
terminal program for hooking up with mainframes -- my bet is that you 
could use this to hook with Dow Jones for rapid-fire price analysis -- and a 
menu generator.  

Don't overlook this last item.  Have you ever wondered how programmers go 
about setting up the menus on Mac with all those buttons, text boxes, and 
icons?  APL is worth getting just to see how it's done.  However, you do not 
have to buy APL.  You can pick up the free demo disk.  The demo disk has all 
of the same features, but does not allow you to Save.  If you want a copy, 
send an INITIALIZED blank Macintosh disk labeled with your name & 
address along with a SASE and $1.00 to the above address; I'll fire a copy of 
the APL sample back to you.  The buck is to buy peanuts for the chipmunks 
that keep my disk drives spinning -- you gotta feed the chipmunks 
occasionally or they go away.

What has become increasingly clear is that the MAC is not just the machine 
for the rest of us, it's THE MACHINE FOR ALL OF US.  Being able to learn a 
new language like C or APL with out laboring over the manuals is a big 
advantage.  Being able to pull down the tutorial anytime you need to while 
you're in the middle of coding something is also helpful.  But the icing on the 
cake was seeing Dr. Brenan's reaction to the MAC (I was calling him "Jerry" 
until I sat down to write this and discovered with alarm that he's a phd, 
someone I may well end up taking classes from someday, and someone who 
should certainly be addressed as Dr. so-and-so...).  

"This is fast," he said.  "This is much faster than the 8088."

-Cheers-
J Fields



More information about the Comp.lang.c mailing list