Language APL
(version one)
Date: | 05/22/05 |
Author: | John A. Estep |
URL: | n/a |
Comments: | 5 |
Info: | n/a |
Score: | (2.50 in 14 votes) |
Download Source | Write Comment
Download Source | Write Comment
Add Comment
Please provide a value for the fields Name,
Comment and Security Code.
This is a gravatar-friendly website.
E-mail addresses will never be shown.
Enter your e-mail address to use your gravatar.
Please don't post large portions of code here! Use the form to submit new examples or updates instead!
Comments
Joat Mon said on 06/27/05 22:12:45
Too bad this isn't rendered in the APL character set. What can we do about that?
Ian Osgood said on 07/12/05 19:36:52
The APL operators are at Unicode code points #2336 through #237A. Can we specify that this page be rendered in a Unicode font that has these characters?
Alternatively, display as HTML with inline GIF's for the special symbols.
Dave Gordon said on 10/20/05 15:53:35
How about a version that's *not* explicitly iterative e.g. using an idiom such as
BEERVERSE <each> ,[0.5+<quadIO>] <reverse> <quadIO> - <commute> <iota> 100
Unfortunately the desktop APL that I'm using doesn't implement all the above operators, otherwise I might post it myself, but Dyalog APL and IBM's APL2 have all those operators -- and probably more, that might provide nicer ways of getting the verses down the page and avoiding quadIO dependencies too.
The coding of BEERVERSE itself is left as an exercise for the reader
roger said on 02/08/06 00:17:08
A non-recursive APL version just doesn't seem right. Someone needs to implement as a self calling function.
Don said on 03/26/06 21:39:15
It has been 20 years since I programmed in APL but this strikes me as an uninspired solution. What is needed is a simple matrix-based solution. It would also be the shortest and simplest, probably also the most efficient. I wouldn't even want to see it done in more than a single statement. No statement separators. No functions. No recursion. No looping. Just create the matrix, and since printing the resulting value is what happens to any statement's result, bingo! As I recall you don't need much more than the iota and rho operators for this sort of problem.