Talk:APL (programming language)/Archive 3

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Archive 1 Archive 2 Archive 3 Archive 4 Archive 5

Meek!

The article says:

Because of its condensed nature and non-standard characters, APL has sometimes been termed a "write-only language", and reading an APL program can at first feel like decoding Egyptian hieroglyphics.

Opinion:

  1. this statement is weaselly, because "some say", who?
  2. it is actually wrong because APL symbols look nothing like hieroglyphs,
  3. it would be really macho if APL really used Egyptian hieroglyphics, all of them,

so hereby I declare WANTED: a programming language using Egyptian hieroglyphics. Said: Rursus 16:01, 20 February 2008 (UTC)

It is weaselly, for sure. However, the statement is far less weaselly than the one which it replaced, which compares APL to an alien, perhaps Martian, tongue. It is a question of what is worse. This whole character set problem has been the curse of APL from the beginning. The reference on hieroglyphs, to me seemed the least offensive.

I have a cartoon (somewhere) which appeared in one or another magazine (Computerworld? APL Quote Quad?) of two Egyptologysts comparing notes on hieroglyphs. The punch line reads "It must be a dialect of APL."

Generally, this statement has got to go if this article should ever reach Class A status. If you have something better, by all means, put it in. Cowznofski (talk) 11:32, 24 February 2008 (UTC)

Keyboard

Suppose I wanted to quickly change key assignments from qwerty to the APL layout in windows, how would I go about this? Is there an input language file for this? Redoubts (talk) 13:50, 9 April 2008 (UTC)

It depends. I assume you want to use an APL keyboard mapping outside of APL, i.e. in Notepad or something. Part of the problem is that depending on which APL system you're used to, to enter some of the glyphs you may need to enter cntl-something or alt-something to get the glyph you want. Arguably, alt-something is better, as cntl-something erodes into some of the accepted and well-known Windows shortcuts like copy and paste.

There is a a Windows program somewhere, Windows Keyboard Viewer or something, which lets you configure your own keyboards. If you are using a US keyboard, you can probably get most of the way there.

European keyboards use an alt-gr key, which gets you some extended characters. Of course, each country or locale is different. For a US keyboard, this would be a good way to handle input of the extended glyphs, problems arise when you want to do this for a European keyboard. There is no Alt-alt-gr.

It's interesting just how the APL keyboard problem just never goes away.

Cowznofski (talk) 20:49, 2 June 2008 (UTC)

Unintentional humor / magical thinking

I think the following sentence is not meant to be humorous, but it is (taken from 'Usage' section):

APL has long had a small and fervent user base. It was and still is popular in financial and insurance applications, in simulations, and in mathematical applications, often where a solution changes frequently or where in a standard language yields excessive complexity. (emphasis mine)

APL looks excessively complex by itself to the untrained eye, and it is difficult to imaging software developers seriously thinking, "well, we could use Java to program ___, but it might be too complex. We'd better use APL instead." In addition, the distinction between applications where "the solution changes frequently" and those where the solution does not change frequently is dubious. What does "frequently" mean? And why does this matter for choice of language? So this gets cleaned up. Please explain if you think it should go back in. 128.32.82.78 (talk) 18:53, 23 July 2008 (UTC)

Neutrality Dispute: Usage section

This section appears to advocate for APL. The section appears to take credit for good ideas (use of domain specific languages and code generators) that are not specific to any one programming language. So although the facts may be accurate, I'd argue that the inclusion of specific uses of APL to excessive detail constitutes undue weight WP:UNDUE (Wikipedia is not a place to collect every single fact about APL). In any case, the facts need to be sourced. If a particular use of APL is particularly notable, then giving it more space is fine, but "we wrote code generators in APL to replace legacy systems written in Fortran, COBOL, and Java" is barely worth mentioning. It should get at most 1 sentence, not an entire paragraph. Any high-level language could accomplish these feats. Original saved here for reference:

APL has also been used in numerous metaprogramming applications. Given external data which varied from time to time, APL programs were used to compose portions or complete sections of code written in other languages such as Fortran, COBOL, or Java. One application used APL to generate FORTRAN code of a substantial linear programming model. As such, the FORTRAN code was thought to be too large to be comfortably understood by a single or small group of individuals. However, with this approach, routine maintenance posed no barrier. Similar approaches were used where consolidation tables maintained outside of APL could be instantly transformed into sizable COBOL programs which performed the necessary consolidation computations. A tedious step which previously required several man-days, namely modifications to a long COBOL program, was practically eliminated. Similar things have been done which in the end emitted Java code.

In addition, there are tone problems with this section.

128.32.82.78 (talk) 19:31, 23 July 2008 (UTC)

Just what we need, another global policeman.

Although I in principle agree with your criticism, I find the "noise" with which this is done excessive. The approach taken by Piranha in "J is not APL" is at least quieter. Like yourself, Piranha isolates the offending text, explains why it is out of place, but relocates it to where it it may be of use.

Piranha dispenses with the theatrics. Wikipedia policy or not, not (noisily) flagging the section much more appeals to my sense of good behaviour and respect for an author's (albeit excessive) contribution.

89.84.237.181 (talk) 19:11, 5 August 2008 (UTC)

Hmmm, describing Excel as "high productivity" compared to APL is a sick joke Ehrenkater (talk) 14:58, 19 March 2009 (UTC)

"we wrote code generators in APL to replace legacy systems written in Fortran, COBOL, and Java" - an impressive feat, but this is not what the article says. In the interest of picking the dead mouse up from the kitchen floor (a memorable quote from Nicholas von Hoffman) I will remove this section entirely. These days, code generation is nothing really that special. Do you think that 100% of all Java code was written by a human? —Preceding unsigned comment added by Renaldo Moon (talkcontribs) 13:48, 10 May 2009 (UTC)


There doesn't appear to be any ref in the article to Code Generation so if it was there someone must have removed it.

That leaves Domain Specific Languages. As I was writing stuff that certainly conforms to one of the two or three meanings of this phrase back in the early eighties there doesn't seem to be anything particularly wrong with the acticle's mentioning it except that they didn't acquire that name until the mid to late nineties so it's likely to be fruitless looking for an external ref!

As soon as I have found a suitable alternative name or short descriptive phrase I'm going to remove all reference to DSL and the [citation needed] tag along with it. And, pro tem, that'll be the last one. Do I get to remove the banner at the top as well? Phil Last (talk) 17:31, 10 August 2009 (UTC)

I've removed all reference to Domain Specific Languages because APLers pretty much stopped writing stuff that way (at least I did) 10 years before anyone called them by that name. So now there are no [citation needed] tags left can we lose the banners? Phil Last (talk) 09:05, 16 August 2009 (UTC)

"Citation needed" on nomadic operators(?!?)

I find it odd that this topic was singled out for a "citation needed". Anyone with even a slight nodding familiarity with APL or any of its dialects will know that it is indeed true that there are functions which can be either monadic or dyadic.

I attempted an edit to fix this, but real life kept interrupting, thus my note here.

Here are two URLs that give the "citation needed":

http://www.aplteam2.com/aplwiki/LearnApl/FunctionsAndOperators

http://www.absoluteastronomy.com/topics/APL_programming_language —Preceding unsigned comment added by Dougmerritt (talkcontribs) 04:40, 20 December 2008 (UTC)

The issue here would appear to be the use of the term "nomadic" rather than the nature of functions. I have always seen such functions referred to as "ambivalent" or "ambi-valent". The second reference given above is circular. The first comes from a Dyadic wiki. I don't have access at the moment to a Dyadic language reference, but I do note that IBM and Dyalog refer consistently, and only, to such functions as ambivalent. On the other hand, the APLX language reference from MicroAPL does refer to them as "ambivalent or nomadic". A language manual would appear to be a much better citation than a vendor's wiki.
RayTrimble (talk) 20:54, 1 April 2009 (UTC)
Note that APLX says "ambivalent" before it says "nomadic" and that no-one else says "nomadic" which started as a joke. The term is "ambivalent". The APL wiki is not a Dyadic wiki; it is independent, now having the domain aplwiki.com and the reference to "nomadic" was copied directly from APLX by a representative of MicroAPL at 2008-09-24 11:35:16 UCT+1:00. In my view the entire glossary should be re-written. Phil Last (talk) 08:14, 11 June 2009 (UTC)
I corrected this and added a citation on 2009-08-08. Does this mean we can delete this section of the talk page? Phil Last (talk) 17:51, 12 August 2009 (UTC)
Wikpedia talk page sections should NOT normally be deleted, except for gross vandalism or WP:BLP violations and the like. However, they may be archived when the page gets too big (and it's possible to set a bot up to do this). We're nowhere near that point yet. NSH001 (talk) 18:54, 12 August 2009 (UTC)

The "pick 6" example

There is clearly something wrong with this example. The first symbol is either not an APL character at all, or is "First" (monadic Take), which wouldn't work at all. What is needed to match the description is "Grade Up", but within an indexing expression which also has a variable assignment and then indexes that variable:

 temp[GradeUp temp Gets 6 ? 40]

By the time you do all that the example looks so much like the second one that I don't think it's worth doing. RayTrimble (talk) 07:26, 25 March 2009 (UTC)

I'm going to delete the example soon if no one speaks up. But meanwhile, let me use this post to see if I have figured out how to create "real" APL characters here.

 X[⍋X←6?40]

RayTrimble (talk) 21:08, 1 April 2009 (UTC)

I agree with you about the example, in fact I was so incensed by it that I corrected it (before reading your note here). Feel free to delete it, but (note to everyone else) do not revert it to the wrong text!

BudgieJane (talk) 17:57, 24 January 2010 (UTC)

Terminology

This section has three or four very specific errors. The word "value" in the first paragraph should be replaced by the word "array". A value can be that of a function. Functions take arguments and return results that are ARRAYS. Operators take arguments that are functions OR ARRAYS.

The discussion refers to the "ceiling" function as that which returns the higher of two numbers. It does not. It is monadic and returns the number itself if it is an integer or the next higher integer if it is not. The function referred to is the dyadic case and is called "maximum".

The statement something like "operator (aka higher level function)" is out of context here. The APL concept of an operator is similar to that called higher level function elsewhere but not in APL circles. I have been coding APL since 1981 and have heard of higher level functions often in reference to other functional languages but never APL.

One more thing. The ref to Iverson's renaming functions and operators as verbs and adverbs is not quite accurate. He renamed functions as verbs, monadic operators as adverbs and dyadic operators as conjunctions which difference is reflected both syntactically & semantically. Phil Last (talk) 20:46, 10 June 2009 (UTC) Following this I made the requisite changes on 28 June 2009. Phil Last (talk) 13:42, 23 July 2009 (UTC)

The term "operator" in APL is similar to the term in mathematics. For example, differentiation and indefinite integration take a function as operand and return another function as result. Some maths courses (including at least two that I have taken) use D for the differentiation operator and I for the integration operator. BudgieJane (talk) 18:04, 24 January 2010 (UTC)

Replacement of introduction

On 2009-07-24 the BAA-London group had its monthly meeting and resolved to improve certain aspects of the article.

I've just changed the introduction by overwriting with the result of a nine day consultation on the APL wiki, a vendor independent though thoroughly APL partisan site.

All of the information that could be gleaned from what has been overwritten is repeated at least once elsewhere on the page which otherwise remains unchanged. What replaces it is intended to follow the guidelines we published at Wikipedia Apl Page Revamp on 2009-07-25 which were:

Goals for a new introduction

Before editing the Wikipedia page, we will refine our draft here, and collect citations for the facts presented.

Our goals in the opening are to

  • identify features of the language that might attract new users of it
  • identify aspects of APL development style that might attract sponsors of software projects
  • establish that the language is in active use, with up-to-date interpreters

We must also meet two constraints: avoid contentious claims, and ensure what we say is verifiable. This means adding citations wherever we make a claim that can be challenged.

I am new to making more than very minor changes to wikipedia so I apologise for my naive use of the wiki layout and facilities.

We intend finally to clean the page to the extent that all admonitions can be removed. We feel that the APL wiki should be the primary source of definitive knowledge regarding APL so please expect a shorter page in future with more of the references pointing there for further information and verification. This may take more than a few weeks. Please join us on BAA London discussion group and attend our meetings if you can.

Phil Last (talk) 21:55, 3 August 2009 (UTC)

Hi, Phil. Just a few quick points before I go to bed:
  • Your lead is a good, well-written introduction to the language, but it contradicts WP:LEAD, which says that the lead should be a summary of the whole article. So you should aim to develop the article first, then the lead will follow (sounds a bit odd, but that's the way Wikipedia works)
  • People here generally take a dim view of off-wiki discussion (as do I, see the note at the top of my user talk page).
  • ditto anything that smacks of advertising or promotion
  • Much better for discussion to take place here
I say this as a member of BAA, and a great fan of APL, though I have not had much opportunity to use it in recent years (I started on VS APL under CMS). Having said all that, I wish you well in your efforts to improve this page, and hope you won't get too frustrated (as I often do) by the weird ways of Wikipedia.
--NSH001 (talk) 00:23, 4 August 2009 (UTC)

My opinion is that the content of the whole article is so lousy that the only sensible thing to do is firstly consign it (and the associated "Criticism of APL") to some archival site and start over. Phil's new introduction is a beginning to this process. The situation truly is an example of "if you want to get there you shouldn't be starting from here". Dick Bowman (talk) 07:04, 6 August 2009 (UTC).

APL is not an acronym

The WP page Acronym admits there is disagreement but throughout the article it comes back over again to the idea that acronyms, as when the term was first coined, are pronouncable as WORDS.

APL is not an acronym according to most people's and most dictionaries' understanding of of the term. Phil Last (talk) 12:11, 16 August 2009 (UTC)

Okay, so it's an initialism if one is pedantic. Lede rectified. --Cybercobra (talk) 12:29, 16 August 2009 (UTC)

(It would be an acronym if it were pronounced “apple” instead of “ay pea el.” Just like “SCSI” is not an acronym if pronounced “ess sea ess eye,” but is if pronounced “scuzzy” [which is actually quite common] or “sexy” [as has been proposed as an improvement over “scuzzy”]. That said, has anyone ever actually heard “APL” pronounced as “apple” in general programmer conversation?) —Preceding unsigned comment added by 69.2.74.138 (talk) 19:40, 2 April 2010 (UTC)

Intermediate result edit deleted

Why was my edit deleted? The table I entered showed the intermediate result. All other items have intermediate results. How can this be deleted with no comment other than "not helpful"? It was immediately helpful! Don't assume non-APLers will understand otherwise.TomTrottier (talk) 23:38, 20 August 2009 (UTC)


I don't know why Zaxby deleted it but in my opinion the entire section should disappear. At least prior to your explanation it wasn't quite so obvious what an incredibly inefficient algorithm it is; consider the implications of the outer product if you want all primes up to 1000.

Of course we only need (1↓⍳⌈R*0.5) for the outer product but it's still nothing to write home about.

If we want to show APL off and we think we need examples at least choose ones that don't show it off as a waste of space. Phil Last (talk) 14:36, 21 August 2009 (UTC)


For instance,

(~z∊z∘.×x←1↓⍳⌈r*0.5)/z←1↓⍳r

takes the same time at r=10, is 8 times quicker at r=100 and 78 times quicker at r=1000. Better speedups are available.

I'm not, nevertheless, about to supplant one piece of incomprehensible crap (to 99% of readers) with another more so. If punters are interested in the claims for the language they'd be better to be pointed at a good primer and a free interpreter, links to both of which are available at The APL wiki. Phil Last (talk) 16:12, 21 August 2009 (UTC)


remove "vector" from glossary

I'm removing the "vector" entry from the glossary because its definition is not "at variance with usage in mathematics or computer science." see foldoc - vector (4.) and vector Phil Last (talk) 10:59, 30 August 2009 (UTC)

I did the deletion but re-reading my own comment I realise there is a problem with the introductory sentence. Some words in the APL vocabulary have usage or meaning which is at variance with usage in mathematics or computer science.

This must of necessity include all words whose meanings differ between mathematics and computer science.

If by A, mathematics means Am, while computer science means Ac, and Am & Ac differ, then the meaning of A is at variance with at least one of them.

While we are talking about the language that has the most thorough coverage of matters logical we might as well get it right.

I'll change the sentence when I've mulled it a bit and come up with something that means what it says. Simplest would be to replace or with and but a better solution is possible. Phil Last (talk) 08:22, 31 August 2009 (UTC)

Ok, done that! Phil Last (talk) 10:01, 12 October 2009 (UTC)

focussed/focused

15:11, 24 October 2009 98.202.149.61 (talk) (46,401 bytes) (undo) 

Considering this is one of those controversial differences of spelling oft encountered crossing the Atlantic it seems rather silly changing one for the other. Perhaps consider using a different word if it offends.

Lets hope no-one takes it into his head to change all the zeds (zees) for esses in words such as "Standardization". Phil Last (talk) 17:31, 28 October 2009 (UTC)

Hm. I've never seen that spelling before. Interesting. --Cybercobra (talk) 18:19, 28 October 2009 (UTC)

Which? zeds, zees or esses? Phil Last (talk) 22:11, 28 October 2009 (UTC)

"Focussed" with 2 "s"s. In fact, my American spellchecker flags it as a spelling error. --Cybercobra (talk) 23:10, 28 October 2009 (UTC)

http://en.wiktionary.org/wiki/focussed Phil Last (talk) 09:56, 29 October 2009 (UTC)

FWIW, my Oxford American Dictionary says: (fo·cused, fo·cus·ing or fo·cussed, fo·cus·sing). —Frungi (talk) 04:32, 24 November 2009 (UTC)

I have both a US and a UK spellchecker in my word processor. The US checker says focussed is wrong. The UK checker says they are both right. Unless we decide to "standardise" on the version of the English language that has been in existence longer, I suggest we stick with "focused".

RayTrimble (talk) 10:18, 1 March 2010 (UTC)

Systemic bias

I believe some parts of the article (particularly the syntax section) have a pro-APL slant and should probably be at least partially rewritten. Thoughts? --Jacob Myers (Flame me!) 01:32, 28 January 2010 (UTC)

Non-APL example in Syntax section much revised. --Cybercobra (talk) 01:55, 28 January 2010 (UTC)

I am interested to know what you have in mind. Do you wish to remove facts or beliefs that are biased towards APL or balance them with counter opinions? A fact (of whether seen as pro-APL, anti-APL or neutral) should be substantiated if it is to remain, an belief (of whatever bias) shared by a significant number of people and with good supporting evidence should be allowed to remain. I write as a current user of APL. --ApMog (talk) 11:04, 2 February 2010 (UTC)

I believe this was the offending text:
// Everything above this comment was JUST to implement the five-character (including operands) “6?40” “Deal” operation!
// Implement sorting algorithm here (for the one-character “↑” operation acting on the result of the above).
// This ALONE would be several lines in older languages that lack built-in array sorting functions.
// Now output the results. This part takes ZERO characters in APL, since it’s assumed!
which was definitely not phrased in an NPOV manner. Although I do not know if Mr. Myers had other concerns. --Cybercobra (talk) 12:52, 2 February 2010 (UTC)

The notice charges us to:Please do not remove this message until the issue is resolved. Cybercobra seems to have corrected the issue but as to its being resolved, do we have to wait for Jacob's consent? While I'm not convinced that Cybercobra's example can be described as in a traditional imperative/procedural programming language, at least it shows that the rest of the computing world has moved on from the original cumbersome alternatives to APL. I'm unhappy with this type of comparison within an article about one of the comparates whose intent can only be biassed in any case. My preference would be to remove the example. In fact, to remove the section. Phil Last (talk) 09:09, 4 February 2010 (UTC)

History: The nature of shared variables

The section says APL SV "offered shared variables as a means to access facilities outside of the APL system." I believe, in fact, that the concept was originally and primarily intended as a means for sharing data between workspaces within the APL system, and indirectly using that shared data to control processing in the session with which it was shared. Developers soon realized that with a little extra work the facility could also be used to share data with non-APL programs, and those "shared variable processors" or "auxiliary processors" would be useful for interfacing with external facilities such as graphics terminals and operating system files. I would suggest a slight extension of the statement:

In 1973, IBM released APL SV which was a continuation of the same product, but which offered shared variables as a means to access and modify data in other APL sessions as well as access facilities outside of the APL system, such as operating system files.

RayTrimble (talk) 11:12, 1 March 2010 (UTC)

Ardent adherents

I don't understand the phrase "The observation that some who learn it usually become ardent adherents ..." The use of "some" and "usually" in the same sentence doesn't make sense to me. "Some who learn it become ardent adherents" makes sense and is probably true; "Those who learn it usually become ardent adherents" makes sense and is probably false, but I don't understand the sentence as it stands. Mnudelman (talk) 16:51, 29 April 2010 (UTC)

Examples - unicode for gradient doesn't display properly on all systems

Currently in the examples, unicode 234b(hex) is used for grade up, as in:

X[⍋X+.≠' ';]

On my system, I only see square boxes for unicode in the range 2300 -> 23FF (the ones added for APL).

I created a image file to use instead:


You can get some of the APL operators using unicode, but using images would probably be simpler, as in this example:



Rcgldr (talk) 17:59, 5 October 2010 (UTC)

I see no rectangle symbol in your textual example. --Cybercobra (talk) 17:56, 5 October 2010 (UTC)
What browser are you using, and have you updated your unicode around 2300+ (hex) to show APL characters? I'm using IE8 on Windows XP, and I get a square box symbol instead of gradeup symbol. On my system, I only get square boxes for unicode in the range 2300 -> 23ff. Rcgldr (talk) 18:03, 5 October 2010 (UTC)
Safari 5, Mac OS X Snow Leopard. No special APL-specific fonts installed. Note that {{APLcode}} is in the article for this reason. --Cybercobra (talk) 21:58, 5 October 2010 (UTC)
I understand that, but many viewers will be using a browser and/or system that doesn't have the APL unicode fonts installed. An image would eliminate this issue. Rcgldr (talk) 02:18, 6 October 2010 (UTC)

APL example compared to procedural programming language

from random import shuffle # import randomization library
one_thru_40 = range(1, 41) # generate list of numbers 1 thru 40 inclusive
shuffle(one_thru_40) # randomly reorder the list
numbers = one_thru_40[:6] # pick the first 6 elements from the list
numbers.sort() # sort the numbers in the list
print(" ".join(str(num) for num in numbers)) # convert numbers to strings and output with spaces between them

Language in question is obviously python but that is not how that example should be implemented in python. More pythonic example would be

from random import sample
one_thru_40 = range(1, 41)
sorted(sample(one_thru_40, 6))

six pseudo-random integers ranging from 1 through 40, guaranteed non-repeating, and displays them sorted in ascending order.

I understand if the point is supposed to be just a "pseudocode" of how it would be generally done in most languages, but it is in no way representative of the python programming language with its extensive standard library. Also using the print statement in python but not in APL because it will output it anyway is no excuse. Python will output that too if done in interactive interpreter.

I will accept the example as a generic pseudo code example, but although APL is a powerful language, so are many modern languages, like python. :)

--Aperculum (talk) 22:42, 30 November 2010 (UTC)

Command shell?

How is APL a command shell in the sense of that article or in the context of the members of the Category:Command shells? I suggest to remove that category from this article. -- Michael Bednarek (talk) 09:50, 15 February 2011 (UTC)

I found the section about the IBM 5100 where APL was used in way BASIC was used on other desktop computers. I think neither qualifies as a command shell, but I suspect that view might not attract wide-spread support. -- Michael Bednarek (talk) 00:55, 20 February 2011 (UTC)
APL normally runs as an read-eval-print loop, ie a command shell. And there are commands to save workspace etc. I remember an early IBM machine with a big (litterally) switch on it marked APL or Basic. When you booted, you were given the appropriate command shell. There was no other shell or visible operating system.Tuntable (talk) 06:38, 27 March 2012 (UTC)