Talk:ALGOL
From Wikipedia, the free encyclopedia
| This It is of interest to the following WikiProjects: | ||||||||||||||||||
| ||||||||||||||||||
Old discussion without headings
The Algo programming language? When has it ever been called that? Are you sure you don't mean the "Algol programming language"? -- JanHidders
There is no programming language Algo. I am sure it is a typo. Have moved page. Will attempt to fix references now. Of course, you'll never find _this_ page (/Talk) except by looking at Recent Changes now... :) --drj
Actualy, there is a programming language Algo. It was an algebraic language loosely modeled on ALGOL 58 and released in the early 1960's by Bendix for their G-15. I plan to put in a complete article Real Soon Now. --User:DJBrantley
- Good to know. I had the old Algo page marked for deletion. Is there any paper about Algo on the ACM library? — danakil 21:34, Sep 13, 2004 (UTC)
I just removed this text, added by User:216.186.53.2:
- This is also a pun on the latin word algol, meaning pain, since programming is a painful process.
Probably just a joke, but might be legit. Does anyone know if algol is Latin for "pain"? If so, does anyone know if this influenced the choice of name? Couldn't find anything on Google. Tualha 23:48, 15 Dec 2003 (UTC)
I don't believe it influenced the choice of name. Never heard that stated during the period when Algol was popular. I agree the reference should be removed. Geoff97 08:44, 16 Dec 2003 (UTC)
- Never heard of that one, it's simply short form of "ALGOrithmic Language". --Palapala 17:25, 2004 Mar 9 (UTC)
- Algos is a Greek word for pain (verb algeO, to suffer), from which we get the word analgesic. Algol is not Latin or Greek at all, but rather that other classical language, Arabic: al-ghul, meaning the demon — or, transliterated, the ghoul. —FOo 18:00, 12 Sep 2004 (UTC)
Algol vs ALGOL (all-caps)
Don't want to start an edit war, but surely the name of the language was always in all-caps during the time when it was an important language? I bow to those who say that "Lisp" is now normally in mixed-case but I think the articles on these languages should state and document the proper capitalization of the languages and the date when the capitalization changed officially (if it changed officially) or the approximate time of transition in usage (if the change was informal). Dpbsmith 14:15, 9 Mar 2004 (UTC) Cursory googling convinces me it was indeed ALGOL, all-caps. I'll leave this here for a while, and if nobody responds I'll change it to all-caps eventually. Dpbsmith 14:17, 9 Mar 2004 (UTC)
- No need to quarrel - it's definitively all-caps; I should know, I grew up with it (I'm an old hand :) --Palapala 17:15, 2004 Mar 9 (UTC)
- Given that the two references in the External Links (including the one to ALGOL 68) give it in all-caps, and given that Rosen's 1967 "Programming Systems and Languages" includes the ALGOL 60 report which gives it in all caps, I'm going to go ahead. Dpbsmith 23:04, 9 Mar 2004 (UTC)
- It is of little interest to me, but the articles for the specific dialects of ALGOL are all in lowercase. One convention should be standardized throughout the encyclopedia. --Prosfilaes 01:17, 31 May 2004 (UTC)
- Given that the two references in the External Links (including the one to ALGOL 68) give it in all-caps, and given that Rosen's 1967 "Programming Systems and Languages" includes the ALGOL 60 report which gives it in all caps, I'm going to go ahead. Dpbsmith 23:04, 9 Mar 2004 (UTC)
- Algol W. Looking at the articles I have copies of from that time, Algol (in small caps) is most common in running text, but ALGOL and Algol both appear. The TeX version of the Revised Report on the Algorithmic Language Algol 60 clearly uses the lowercase form. I don't have an original, so I don't know how authentic that is. The original Algol material I have usually uses capitals in the title and small caps in the text. One of the references sited in Knuth's article uses Algol in the title, whereas the others use ALGOL.
- I have the original, published in 1964 by A/S REGNECENTRALEN, which writes ALGOL always in capitals througout the book. — Preceding unsigned comment added by 89.96.201.82 (talk) 20:47, 20 November 2013 (UTC)
- Algol W. Looking at the articles I have copies of from that time, Algol (in small caps) is most common in running text, but ALGOL and Algol both appear. The TeX version of the Revised Report on the Algorithmic Language Algol 60 clearly uses the lowercase form. I don't have an original, so I don't know how authentic that is. The original Algol material I have usually uses capitals in the title and small caps in the text. One of the references sited in Knuth's article uses Algol in the title, whereas the others use ALGOL.
right|thumb|220px|Revised Report on the Algorithmic Language - ALGOL 68 Edited by: A. van Wijngaarden & al, Sep 1973 For Algol 68 there are two principal reports that differ in CAPs:
- 1968: "Report on the Algorithmic Language ALGOL 68" [1]
- 1973: "Revised Report on the Algorithmic Language Algol 68" [2]
NevilleDNZ 09:01, 1 May 2007 (UTC)
Still vital
The language is still in use today; for example, in its 5th decade, ALGOL is still used to calculate the brix in the manufacture of orange juice, for example, by certain corporations, on the East Coast of the US. Ancheta Wis 18:34, 12 Aug 2004 (UTC)
Algol 68 was not disliked primarily because of pointers; most stuff I've read blamed it for excess complexity and the second stage effect. I think pointers were really a minor part of it. --Prosfilaes 07:40, 28 Feb 2005 (UTC)
C.A.R. Hoare (now senior researcher at Microsoft Research in Cambridge, England) stated:
About Algol W: "It was not only a worthy successor of ALGOL 60, it was even a worthy predecessor of PASCAL[...] I was astonished when the [ALGOL 68] working group, consisting of all the best known international experts of programming languages, resolved to lay aside the commissioned draft on which we had all been working and swallow a line with such an unattractive bait." - Wiki Quotes - NevilleDNZ 07:29, 28 October 2005 (UTC)
More Examples ?
I've got a few more examples of ALGOL 60 programs written for the Elliott 803. If any one is interested I'll add some. I've also got the original 803 ALGOL 60 compiler (co-written by C.A.R. Hoare) running on an 803 emulator. PeterO 22:40, 4 October 2005 (UTC)
PeterO - please contact me (gtoal@gtoal.com) as I'ld like to provide an online home for the compiler sources you mention above. Incidentally have you seen the page http://www.billp.org/ccs/ElliottAlgol/ ? (mirror)
By the way here is Edinburgh University's ALGOL60 compiler source (written in Edinburgh IMP) and the accompanying grammar and grammar table converter. I'm using that grammar at the moment to write an ALGOL60 source code formatter - don't suppose anyone has the source of the original SOAP program? I could also use any ALGOL60 example programs you might find as test data. (Later update: Formatter works and example programs are here: http://www.gtoal.com/languages/algol60/TESTS/ )
By the way the KDF9 restoration team found the original SOAP: Report and source code.
An excellent compiler test program can be found in Merner & Knuth's "Algol 60 Confidential". It is available on online if you persuade an ACM member to forward the PDF to you. Procedure is called GPS and it can evaluate any computable function (with a suitable call). When I wrote the FP6000 Algol compiler I used the call which computed the N=th prime number as part of my test suite. Roger D Moore Rdmoore6 22:14, 28 December 2005 (UTC)
Are the Elliot algol characters available in Unicode?
An alternative example, using Elliott Algol I/O is as follows. In fact, Elliott Algol used different characters for 'open-string-quote' and 'close-string-quote', but ASCII does not allow these to be shown here.
Are these characters now available in the Unicode characterset? In that case we could fix the example.
Kim Bruning 13:01, 20 April 2006 (UTC)
- We certainly could use proper quotes like “quote” which I suspect should match the Elliott characters.--Prosfilaes 01:55, 21 April 2006 (UTC)
The other character (miss by unicode) that was part of Algol was the ALCOR "subscript 10". eg.
real n; n := 6.0221415₁₀23;
The one "byte" (6/7 bit) subscript-"₁₀" became a backslash-"\" in the 1967 version of ascii and thus never made it into unicode.
real n; n := 6.0221415\23;
Oddly the tens {⑽, ⒑, ⑩} do exist in unicode... something to do with the British wanting to support 12 pennys in a shilling. But the subscript 10 needs two characters in unicode.
Note "₁₀" was part of the ALCOR paper tape standard for Algol, also has been included in a German norm (DIN66006), it has been discussed in ACM: comm.ACM 7 No 7(424,447) (there called "subscript 10") and "₁₀" is part of a couple of Russian GOST standards. A nice web page about the cyrillic codes includes their "lower ten": http://www.science.uva.nl/museum/DWcodes.html
In standards: ALCOR, MC FLEXOWRITER, KDF ALGOL, IBMEL, BENDIX G20, SOVJET GOST 10859-6, GOST 10859-LATIN, GOST 10859-CARD and GOST 10859-7.
NevilleDNZ 11:23, 22 April 2006 (UTC)
- the "lower ten" has been proposedunder the name DECIMAL EXPONENT SYMBOL (see ) and accepted for (the yet unreleased) unicode 5.2 as (Ammendment 6, with currently unofficial codepoint 23E8 as shown in this draft: ). Frédéric Grosshans (talk) 17:44, 14 April 2009 (UTC)
OK... I confess, I have not managed to figure out what the Runic Cross was for in Algol60? Any hints? I am guessing that it was either:
- A format string delimiter. eg. WRITE(LP,᛭ "MEAN =",F6.2 ᛭,MEAN);
A return statement from a procedure, or a loop break? eg. IF X>Y THEN ᛭;
Both the AT&T and teletype paper tape has a $ in place of the ALCOR iron/runic cross eg , this suggests that the runic-cross was for format/string quoting. Eg ALGOL 68#formatted_transput. NevilleDNZ 23:58, 29 April 2006 (UTC)
"Subject of the famous Turing lecture"
The proper noun, "Turing" in the "True ALGOL 60s specification and implementation timeline" table currently points to a disambiguation page. I'd like to improve the wikification here, but I don't know what the "the famous Turing lecture" is. So, two things: (1) "famous" might be an inaccurate adjective for the "Turing lecture" (I have a degree in Computer Engineering and I haven't heard about it before now) and (2) "Turing" needs to point to something somehow related to this lecture. Any advice? --InformationalAnarchist 15:31, 5 December 2006 (UTC)
- There is but one Turing in computer science; that is, Alan Turing.--Prosfilaes 15:44, 5 December 2006 (UTC)
- True, but there also is but one Turing Lecture, which is the one given by the recipient of the Turing Award. Presented by the ACM, the Turing Award is sometimes described as the Nobel Prize of Computer Science -- a somewhat hyperbolic description but not totally unapt, as the current award is $250,000. There should be more information on acm.org if it's not on WP. The WP page on C A R Hoare has some info (and some of that page is copied from http://awards.acm.org/citation.cfm?id=4622167&srt=all&aw=140&ao=AMTURING, whether legally I'm not sure). There's also a WP page on the Turing Award. The text is available on the ACM web site, but only with a Digital Library subscription AFAIK. The note in the article could use a link to the Turing Award page and/or the Hoare page, but I don't see any need for any other change. I don't have time to do it right now. (I had the privilege of attending this lecture, though I have to admit that I no longer remember much from it.)--Paleolith (talk) 04:07, 13 February 2008 (UTC)
Call-by-name
I reverted "These strategies facilitated recursion, avoided anomalous side effects that followed from the then-prevalent call-by-reference, and provided some polymorphism." back to "Call-by-name had certain limitations in contrast to call-by-reference, making it an undesirable feature in imperative language design. For example, it is impossible in ALGOL 60 to develop a procedure that will swap the values of two parameters if the actual parameters that are passed in are an integer variable and an array that is indexed by that same integer variable. However, call-by-name is still beloved of ALGOL implementors for the interesting “thunks” that are used to implement it." Call by reference is an option in Ada, C++ and Fortran, among other languages, so it's not exactly "then-prevalent". IIRC, it was a mistake in standardization to create call-by-name, and in retrospect, it was clearly the wrong choice. Every serious programming language designer has read about ALGOL 60 and call-by-name; none of them have used it in their programming languages.--Prosfilaes 19:56, 21 March 2007 (UTC)
- Well, not really. Call-by-name in the form of lazy evaluation is the preferred calling mechanism for modern functional languages such as Miranda, Clean and Haskell. I'm guessing this was Sadorrest's intent in mentioning imperative languages. Simple call-by-name is inefficient because the same expression may be evaluated multiple times, but this is avoided in lazy evaluation. The mechanism is still avoided in imperative languages because it doesn't serve much purpose within that framework. The situation is different with a functional approach where lazy evaluation provides a theoretically cleaner mechanism and supports notions like infinite data structures.
- It's unfortunate that Mdmi simply deleted the remarks critical of ALGOL and replaced them with an opposing set. There look to be valid points in both sets of remarks that can be made without violating NPOV. It certainly makes sense to indicate the reasons why call-by-name was avoided in imperative languages, but that does require saying that it was simply wrong. A B Carter (talk) 20:40, 21 March 2007 (UTC)
- It was simply wrong, though. Call-by-name as a tool has some advantages in certain environments. However, in ALGOL--in this article--it was a poorly thought-out choice that was widely agreed upon afterwards to have had little to no upside. I don't have access to a great library for this stuff anymore, but there was some stuff I copied off when I did that I'll try and summerize and cite in the next few days.--Prosfilaes 15:05, 23 March 2007 (UTC)
- Still learning about ALGOL and my knowledge of its usages is weak. A quick search indicates that you're probably right, but I would be very interested in further comments and any references you have. What got me wound up was your final statement that call-by-name has not be used in any language developed after ALGOL. A B Carter (talk) 15:41, 23 March 2007 (UTC)
- It was simply wrong, though. Call-by-name as a tool has some advantages in certain environments. However, in ALGOL--in this article--it was a poorly thought-out choice that was widely agreed upon afterwards to have had little to no upside. I don't have access to a great library for this stuff anymore, but there was some stuff I copied off when I did that I'll try and summerize and cite in the next few days.--Prosfilaes 15:05, 23 March 2007 (UTC)
For example, it is impossible in ALGOL 60 to develop a procedure that will swap the values of two parameters if the actual parameters that are passed in are an integer variable and an array that is indexed by that same integer variable.
I would assume this sentence belongs into the evaluation strategy article, like most of the discussion in this section. I would like to see a practical example (code) for this. Andreas (T) 22:30, 28 March 2007 (UTC)
Of course it is possible. This example does not work:
begin
integer i,j;
integer array a[1:10];
procedure swap(x,y); real x,y;
begin
real z;
z:=x;
x:=y;
y:=z
end;
for i:=1 step 1 until 10 do a[i]:=-i;
i:=j:=3;
swap(i,a[i]);
outinteger(1,i);
outinteger(1,a[j]);
outterminator(1)
end
However, when the original array value is saved first, it works OK:
begin
integer i,j;
integer array a[1:10];
procedure swap(x,y); real x,y;
begin
real z;
z:=y;
y:=x;
x:=z
end;
for i:=1 step 1 until 10 do a[i]:=-i;
i:=j:=3;
swap(i,a[i]);
outinteger(1,i);
outinteger(1,a[j]);
outterminator(1)
end
The output of this code is -3 3. I tested it using marst-2.4.
I wonder when this case is relevant in real life. I would think that if an expression is to be used as a parameter, it would be declared value anyway. The only reason why call by name is undesirable is because it is expensive; apart from that, it is theoretically the best solution, it gives the value that corresponds to the situation at the time when the parameter is needed. This is why the fathers of ALGOL implemented it. In any case, as long as the above statement is not documented somewhere, it is original research and therefore should not be included in Wikipedia. Andreas (T) 00:58, 29 March 2007 (UTC)
- To be a little harsh: it's an example of good programming, but irrelevant for the criticism against ALGOL:s name parameters – which is "that you cannot construct a
swapprocedure that takes care of this saving for the programmer who callsswap". However my gut now tells me that one actually can! Said: Rursus ☺ ★ 08:44, 28 June 2007 (UTC)
- I spake crap! Pardon! Your example is perfectly relevant, I just didn't understand it immediatelly. For symmetry I propose:
begin
integer i,j;
integer array a[1:10];
procedure swap(x,y); real x,y;
begin
real x2, y2;
x2:=x; y2:=y;
x:=y2; y:=x2;
end;
for i:=1 step 1 until 10 do a[i]:=-i;
i:=j:=3;
swap(i,a[i]);
outinteger(1,i); outinteger(1,a[j]); outterminator(1)
end
- which takes care of both calling
swap(i,a[i]);andswap(a[i],i);. Maybe (?)... Said: Rursus ☺ ★ 08:51, 28 June 2007 (UTC)- No, the
secondlast example does not work either. I knew it would not (I've been programming extensively in Burroughs Algol since 1972), but I tested it anyway (changing the I/O of course). It faults when it reachesy:=x2because the globalihas already been assigned the value -3, which is not a valid subscript for the array. I'm guessing that you missed one of these critical points: 1) that an assignment to a call-by-name formal parameter alters the actual parameter immediately, or 2) that when a call-by-name formal parameter is referenced, the entire expression of the actual parameter is re-evaluated, including subscripts -- it doesn't just reload a referenced location. Point 1 is the same as for call-by-reference, whereas point 2 is a critical difference. I'm not absolutely certain, but I believe that the current version of the page is correct in saying that a swap procedure is not possible in pure Algol. (Burroughs Algol has a couple of extensions which enable it -- an intrinsic procedure called either READLOCK or EXCHANGE, and a :=: assignment operator.) - In 35 years of Burroughs Algol programming, I don't think I have ever used the capabilities of call-by-name that go beyond call-by-reference. In theory it has additional capabilities; in practice using those capabilities is limited by the opaqueness of the resulting code and the rarity of actually needing them. I don't think it's wrong to say that call-by-name was a mistake -- it was a mistake which generated a great deal of productive thought, but no useful code. The modern version of Burroughs Algol also has a
referencespecifier to invoke call-by-reference, but call-by-name remains the default for backward compatibility. --Paleolith (talk) 06:08, 12 December 2007 (UTC)
- No, the
- which takes care of both calling
Yet another attempt to make everything US centric in this international encyclopaedia!
Removed "Of these, ALGOL 60 was the most widely known in the United States". —The preceding unsigned comment was added by 86.138.228.61 (talk) 07:49, 1 May 2007 (UTC).
- I doubt it was an intentional attempt. ~a (user • talk • contribs) 22:33, 2 May 2007 (UTC)
- I agree. It seems that many Americans do this sort of thing without thinking. —The preceding unsigned comment was added by 86.138.228.61 (talk) 18:44, 9 May 2007 (UTC).
- Many non-Americans have your anti-American complex. — Preceding unsigned comment added by 50.14.189.78 (talk) 19:37, 2 July 2011 (UTC)
- I agree. It seems that many Americans do this sort of thing without thinking. —The preceding unsigned comment was added by 86.138.228.61 (talk) 18:44, 9 May 2007 (UTC).
Propose brief timeline of innovations in Algol 58,60,X,Y,68,M,W & specific ALGOL 60 page
My proposal is:
- this ALGOL page should contain a summary of the chief innovations as Algol evolved through its various versions.
- include a brief timeline of the decendents. Algol 58,60,X,Y,68,M,W, Pascal etc etc
- Move Algol 60 specific details to a Algol 60 specific page
- on Algol 60 page: add a more details descriptions of the ALGOL 60 implementations and features.
I am hoping that someone can work with me on this and help point out chief Algol version innovations.
NevilleDNZ 09:01, 1 May 2007 (UTC)
Front cover of the ALGOL 60 Final Report
Does anyone have a copy from which they can scan the ALGOL 60 cover page?
NevilleDNZ 09:04, 1 May 2007 (UTC)
- Maybe, but such an image would be an unfree image (covered by copyright) so it wouldn't be of use to Wikipedia. Paul Koning 14:45, 10 August 2007 (UTC)
Humor
From: http://www.devprotalk.com/t666-humor-shooting-yourself-in-the-foot.html
- 6502: You shoot yourself in the foot.
- 8086: You foot yourself in the shoot.
- 68000: You can't decide which gun and which bullet to use, so you hang yourself.
- ALGOL 58/IAL: You shoot yourself in the foot with a musket. The musket is aesthetically fascinating, and the wound baffles the adolescent medic in the emergency room.
- ALGOL 60: You spend hours trying to figure out how to fire the gun since it doesn't have any provision for input or output.
- ALGOL 68: You mildly deprocedure the gun, the bullet gets firmly dereferenced, and your foot is strongly coerced to void.
An implementation: Algol 68 - Parallel processing
NevilleDNZ 12:26, 17 June 2007 (UTC)