APL in Second Gear. Does APL have a future? What’s the point of APL?

72
APL in Second Gear

Transcript of APL in Second Gear. Does APL have a future? What’s the point of APL?

Page 1: APL in Second Gear. Does APL have a future? What’s the point of APL?

APL in Second Gear

Page 2: APL in Second Gear. Does APL have a future? What’s the point of APL?

Does APL have a future?

Page 3: APL in Second Gear. Does APL have a future? What’s the point of APL?

What’s the point of APL?

Page 4: APL in Second Gear. Does APL have a future? What’s the point of APL?

Did Ken Iverson invent APL?

Page 5: APL in Second Gear. Does APL have a future? What’s the point of APL?

Did Ken Iverson discover APL?

Page 6: APL in Second Gear. Does APL have a future? What’s the point of APL?

APL Exists in the Mind of the Beholder

Page 7: APL in Second Gear. Does APL have a future? What’s the point of APL?

APL is a Tool of Thought

But of whose thoughts?

Page 8: APL in Second Gear. Does APL have a future? What’s the point of APL?

APL Big Bang Theory

Page 9: APL in Second Gear. Does APL have a future? What’s the point of APL?
Page 10: APL in Second Gear. Does APL have a future? What’s the point of APL?

What’s the point of APL?

Page 11: APL in Second Gear. Does APL have a future? What’s the point of APL?

A notation of direct abstraction is possible

Page 12: APL in Second Gear. Does APL have a future? What’s the point of APL?

Skip the fluff

Trim the fat

Keep it simple Cut the crap

1-to-1 (notion to notation)

Don’t waste my time

Page 13: APL in Second Gear. Does APL have a future? What’s the point of APL?

The APL Food Chain

Page 14: APL in Second Gear. Does APL have a future? What’s the point of APL?

The Consumer

Page 15: APL in Second Gear. Does APL have a future? What’s the point of APL?

The Business

Page 16: APL in Second Gear. Does APL have a future? What’s the point of APL?

The Industry Software Expert

Page 17: APL in Second Gear. Does APL have a future? What’s the point of APL?

The APLer

Page 18: APL in Second Gear. Does APL have a future? What’s the point of APL?

The Utility Wizard

Page 19: APL in Second Gear. Does APL have a future? What’s the point of APL?

The APL Interpreter Developer

Page 20: APL in Second Gear. Does APL have a future? What’s the point of APL?

The Operating System Developer

Page 21: APL in Second Gear. Does APL have a future? What’s the point of APL?

The Consumer

The Business

The Industry Software Expert

The APLer

The Utility Wizard

The APL Interpreter Developer

The Operating System Developer

Page 22: APL in Second Gear. Does APL have a future? What’s the point of APL?

The Invisible Utility Wizard

Page 23: APL in Second Gear. Does APL have a future? What’s the point of APL?

I don’t buy it.We don’t have a Utility Wizard and we don’t

needone. We do just fine.

Page 24: APL in Second Gear. Does APL have a future? What’s the point of APL?

We already know how to compute an average. We

don’t need another method.

Our method works just fine.

Page 25: APL in Second Gear. Does APL have a future? What’s the point of APL?

(Prepare to fall in love again.)

Page 26: APL in Second Gear. Does APL have a future? What’s the point of APL?

A notation of direct abstraction is possible

or

Trim the fat

Page 27: APL in Second Gear. Does APL have a future? What’s the point of APL?

First gear: Primitives

And so on.

Second gear: Utilities built on primitives

Third gear: Utilities built on utilities

Page 28: APL in Second Gear. Does APL have a future? What’s the point of APL?

Given today’s date TODAY (yyyymmdd)

and a birthdate DOB (yyyymmdd), what

is the age of the policyholder?

Page 29: APL in Second Gear. Does APL have a future? What’s the point of APL?

„„

Page 30: APL in Second Gear. Does APL have a future? What’s the point of APL?

Given today’s date TODAY (yyyymmdd)

and the contract date POLDAT (yyyymmdd), how many days has

the policy been in effect?

Page 31: APL in Second Gear. Does APL have a future? What’s the point of APL?

Page 32: APL in Second Gear. Does APL have a future? What’s the point of APL?

Given today’s date TODAY (yyyymmdd), what will be the date (yyyymmdd) in 90 days,

180 days, 360 days?

Page 33: APL in Second Gear. Does APL have a future? What’s the point of APL?

Page 34: APL in Second Gear. Does APL have a future? What’s the point of APL?

Format these dates as a 10-column matrix in

mm/dd/yyyy notation.

Page 35: APL in Second Gear. Does APL have a future? What’s the point of APL?

Page 36: APL in Second Gear. Does APL have a future? What’s the point of APL?

Compute the average ofa set of numbers V.

Page 37: APL in Second Gear. Does APL have a future? What’s the point of APL?

Page 38: APL in Second Gear. Does APL have a future? What’s the point of APL?

‘‘

Page 39: APL in Second Gear. Does APL have a future? What’s the point of APL?

1.  Communications2.  User Input3.  Calculations4.  File Handling5.  Reports/output6.  Miscellaneous

Page 40: APL in Second Gear. Does APL have a future? What’s the point of APL?

File Handling: Given a comma-delimited file that looks like the following, read its fields (except SS No.) into a set of APL variables:

Policy No.,Date of Birth,Sex,SSNo,LastName,Premiums

12614,03/15/1940,M,022-14-1567,Smith,103500

12983,05/30/1937,F,038-15-1129,Jones,58200

Page 41: APL in Second Gear. Does APL have a future? What’s the point of APL?

„„„„„„„„…„„†

Page 42: APL in Second Gear. Does APL have a future? What’s the point of APL?

File Handling: Given a fixed-format file with the following layout, read its fields

(except SS No.) into a set of APL variables:

Bytes Length Description

----- ------ -------------

1-8 8 Policy number

9-18 10 Date of birth

19 1 Sex (M or F)

20-30 11 Social Security No.

31-50 20 Last name

51-65 15 Premiums ($)

Page 43: APL in Second Gear. Does APL have a future? What’s the point of APL?

„„„„„„„„…„„†

Page 44: APL in Second Gear. Does APL have a future? What’s the point of APL?

File Handling: Save theseAPL variables in an APL file.

Page 45: APL in Second Gear. Does APL have a future? What’s the point of APL?

Page 46: APL in Second Gear. Does APL have a future? What’s the point of APL?

Calculations: Sum premiums and the

number of policies by year of birth.

Page 47: APL in Second Gear. Does APL have a future? What’s the point of APL?

„„„›

Page 48: APL in Second Gear. Does APL have a future? What’s the point of APL?

Reports/output: Generate thisreport, and display it on the screen:

Policy Summary Report

As of 09/22/2009

 

Number Total

Year of Policies Premium $

---- ----------- ---------

1940 17 12,345

1945 302 3,125,889

1946 45 55,013

Page 49: APL in Second Gear. Does APL have a future? What’s the point of APL?

„ƒ†Œ„„„„„Œ„„

Page 50: APL in Second Gear. Does APL have a future? What’s the point of APL?

Reports/output: build thereport as a Word file.

Page 51: APL in Second Gear. Does APL have a future? What’s the point of APL?

„…„œ„„

Page 52: APL in Second Gear. Does APL have a future? What’s the point of APL?

Reports/output: build thereport as an .xls file.

Page 53: APL in Second Gear. Does APL have a future? What’s the point of APL?

…„ƒ†Œ„„„„„„„œ„„„

Page 54: APL in Second Gear. Does APL have a future? What’s the point of APL?

Communications: Given two .xls filescreated by other functions, send

themas attachments to Fred in

Accounting.

Page 55: APL in Second Gear. Does APL have a future? What’s the point of APL?

„›œ„œ„œ„œ„œ„œ„„

Page 56: APL in Second Gear. Does APL have a future? What’s the point of APL?

User Input: Present a menuof choices, from which the

user is to pick one.

Page 57: APL in Second Gear. Does APL have a future? What’s the point of APL?

Page 58: APL in Second Gear. Does APL have a future? What’s the point of APL?

User Input: Present a menu ofchoices, from which the user

may pick any number of them.

Page 59: APL in Second Gear. Does APL have a future? What’s the point of APL?

Page 60: APL in Second Gear. Does APL have a future? What’s the point of APL?

User Input: Present a menu of choices, from which the user may pick any number of them. Selected choices are in a list on

the right; remaining choices are in a list on the left; Add/Remove buttons are located in

between.

Page 61: APL in Second Gear. Does APL have a future? What’s the point of APL?

Page 62: APL in Second Gear. Does APL have a future? What’s the point of APL?

User Input: Present a menu of choices,and allow the user to alter their order by highlighting choices and clicking

the Up or Down buttons.

Page 63: APL in Second Gear. Does APL have a future? What’s the point of APL?

Page 64: APL in Second Gear. Does APL have a future? What’s the point of APL?

User Input: Present the following input form:

Page 65: APL in Second Gear. Does APL have a future? What’s the point of APL?

„„„„„„„„„„›„›„›„›„„›„›„›„…„„„

Page 66: APL in Second Gear. Does APL have a future? What’s the point of APL?

Where have we gone wrong?What’s holding us back?

Page 67: APL in Second Gear. Does APL have a future? What’s the point of APL?

The ConsumerThe Business

The Industry Software Expert 

The APLerThe Utility Wizard

 

The APL Interpreter Developer 

The Operating System Developer

Page 68: APL in Second Gear. Does APL have a future? What’s the point of APL?

The solution: a different(gear-two) mindset.

Page 69: APL in Second Gear. Does APL have a future? What’s the point of APL?

The APL Interpreter Developer

- Coordinates Wizard communication- Plays “librarian,” not “author”- Documents/distributes both gears

Page 70: APL in Second Gear. Does APL have a future? What’s the point of APL?

The Utility Wizard

-Works with APLer- Communicates with other Wizards- Develops utilities

Page 71: APL in Second Gear. Does APL have a future? What’s the point of APL?

The APLer

- Provides feedback to Wizard- Writes APL

Page 72: APL in Second Gear. Does APL have a future? What’s the point of APL?

APL in Second Gear,The Future of APL