11 ms·
Algol-68 seemed like a good idea
- jandrese 2y agoIt sounds like a classic case of the Second System effect. Where the original product was functional but a maybe little too basic, so everybody has an idea of how to improve it. Many of the ideas are good on their own, but the committee ends up accepting far too many and the thing suffers from terminal feature creep.
- kazinator 2y agoFeature creep and Second System effect are all the rage now. Every recent language has them. If you don't constantly have three dozen Requests for Implementation brewing, seven of which are going into the next release, you're a dead project.
- dboreham 2y agoEmergent property of humans, it turns out.
- setopt 2y agoPerhaps we should make a language with a hard cap on the number of “features” in the language syntax + standard library. For everything you propose to add, you would then also need to propose something to remove.
- dotancohen 2y agoThough in principal I love the idea, it would kill backwards compatibility. But maybe each major version revision should have a vote on keeping or removing some older features.
- kazinator 2y agoOnly those holding no stakes would play the vote game; anyone actually depending on compatibility would silently (or sometimes not so silently) depart.
- JadeNB 2y ago> For everything you propose to add, you would then also need to propose something to remove. There are surely lots of features the proposer would be willing to remove (although one also has to define how to count the number of features, or else every proposal, no matter how long, will be for one giant feature, and will propose removing one tiny feature in return). The problem is that what I consider dispensable in return for my essential proposal will conflict with what the next programmer over considers essential ….
- mhd 2y agoThere's a lot of hearsay in that articles, and a lot of sentiment rooted in the particulars of that time. Sure, it was a complex thing in the late 60s/early 70s. Sure, Wirth came up with something simpler. But I'm missing a deeper analysis, especially with a more modern view point where basically any language is at least as complex as Algol 68[0]. > Arguably Wirth’s Algol-W was a better successor to Algol-60 I might not even disagree, but what were the arguments, and how are they holding up? > and arguably did not have the same connections to industry as the likes of Fortran and Cobol Sure. But neither did Algol-W or Pascal. And pretty much anything else in the 20th century. [0]: http://cowlark.com/2009-11-15-go/ http://cowlark.com/2009-11-15-go/
- aidenn0 2y agoEWD comes up as a dissenter for Algol-68, and the longer my career as a software developer the more I disagree with him on anything that isn't pure math.
- mhd 2y agoHaving EWD as a dissenter also seems a rather low bar, to be fair. (One might say he was a bit of a Edsgerlord.)
- le-mark 2y agoEWD is apparently Edsger W. Dijkstra for those also unaccustomed to reading him cited by his initials.
- User23 2y agoThe appellation is in some part due to his custom of writing monographs for himself titled EWD-n[1]. They are a fascinating mix of deep mathematical and philosophical insight and curmudgeonly reflective essaying. [1] https://www.cs.utexas.edu/~EWD/ https://www.cs.utexas.edu/~EWD/
- 082349872349872 2y ago
- zgs 2y agoAlgol 68 was to Algol as C++ is to C: trying to do too much resulting in over-complexity. The two page spread showing a graph of the implicit type conversions was a masterpiece.
- Taniwha 2y agoBut not really - lots of new stuff was added - structures, unions, pointers, function pointers, operator definitions, a heap - all stuff that hadn't appeared in a language spec before, things we all see and use every day. The big problem was that the language spec was incomprehensible (I've done a language implementation), trying to embed syntax and semantics into the one spec - the maths guys went a bit overboard there. The other main problem was trying to solve the reserved word problem by defining effectively multiple fonts/type faces for different parts of the language .... at a time when even lower case wasn't really an option for most people
- trhway 2y ago>Algol-68 (or derivatives of) did rise to some prominence in one place – the USSR. The most prominent implementation of the language came from Leningrad State University. It was apparently used to design Russian telephone exchanges. 6-pass compiler for Algol-68 :) The telephone exchange was built on the base of the microcomputer (while developed in USSR/Russia, and ultimately that microcomputer was mostly used by the Russian military, the major customer for the exchange who funded the work at some point was Alcatel) which was like Tandem, only 3 instead of 2 systems in parallel because of low quality of electronics, the CPU was USSR-developed "Samson" [1], a kind of Elbrus offshoot. The exchange software was developed in SDL (Z.100, kind of like Erlang-by-European-commitee-in-1980ies) and compiled into Algol-68 which was compiled into that CPU codes. [1] (in Russian) https://www.computer-museum.ru/articles/sistemi_kompleksi/90/ https://www.computer-museum.ru/articles/sistemi_kompleksi/90...
- Taniwha 2y ago6 passes seems like a lot but likely that was just to fit it in the tiny computers of the time. One problem with the language is that you can't parse declarations and expressions until after you have parsed the bracket structure of the language (because you can't tell whether a name is a type or an operator until you have processed their declarations (which do not have to be done before use) - that sort of means you have to do at least 2 lexical/parse passes
- butterisgood 2y agoAnd we lost Wirth this year sadly. I hope we can find a language with safety, simplicity, and just enough features to be practical someday.
- musicale 2y agoI think Wirth said something like "I am a programmer who is a professor, and a professor who is a programmer." Definitely a huge inspiration to me, both for the elegance and compactness of his system designs as well as the idea that research could and should affect practice, and vice-versa. At least with -fbounds-safety clang is finally catching up with what Pascal (including UCSD, Apple, and Turbo Pascal) and Ada (a rather more complicated descendant of Pascal) compilers had in the 1980s. (Delphi and Free Pascal still have range checking today.)
- EVa5I7bHFq9mnYK 2y agoBut you could insert ASM instructions directly into PASCAL code, in case you needed something fast and without bounds checking.
- Pet_Ant 2y agoI think was added in Turbo Pascal, not in the versions he wrote. I could be mistaken.
- EVa5I7bHFq9mnYK 2y agoIt worked in pdp-11 version of pascal, long before turbo pascal.
- pjmlp 2y agoI found that in Modula-2 and Oberon, however times have changed. For me the best version of Oberon linage is Active Oberon, while I appreciate Wirth I think he went too far on his quest for language simplification. Even Go has more features than Oberon -07. As for Modula-2, it is now a standard language on GCC, otherwise Zig and Odin are relatively similar for the curly bracket folks.
- ogogmad 2y agoI've just looked at this snippet, which the blog used back in 2017 to illustrate that Algol 68 was "utter madness": https://craftofcoding.wordpress.com/2017/03/06/a-brief-look-at-the-utter-madness-of-algol-68/ https://craftofcoding.wordpress.com/2017/03/06/a-brief-look-... COMMENT Algol 68 program to calculate the Sieve of Eratosthenes for some upper limit N COMMENT PROC eratosthenes = (INT n) []INT: ( [n]INT sieve; FOR i TO UPB sieve DO sieve[i] := i OD; INT k = ENTIER sqrt(n); sieve[1] := 0; FOR i FROM 2 TO k DO IF sieve[i] NE 0 THEN FOR j FROM i*i BY i TO n DO sieve[j] := 0 OD FI OD; sieve ); INT n; print("Upper limit to calculate sieve? "); read(n); print((eratosthenes(n), newline)) A few things: This code is very readable. The blogger didn't understand it because he didn't understand what the "Sieve of Eratosthenes" did: It's a means of calculating lists of prime numbers. He incorrectly stated that it was used for calculating Fibonacci numbers. Syntax-wise, it looks like some mix of Go, C and Python. Nothing at all unusual. It would be pretty easy to learn to program in this, and comfortable too. [Edit: The blogger later demonstrated a good understanding of the Sieve of Eratosthenes, but still expressed criticism of Algol68: https://craftofcoding.wordpress.com/2021/04/06/algorithm-35-the-sieve-in-algol-68/ https://craftofcoding.wordpress.com/2021/04/06/algorithm-35-...]
- foobarian 2y agoIsn't Algol the crazy language using special characters all over the place as operators? I could see that being undesirable, but I don't see it in that snippet. edit: I'm thinking of APL. It looks like it's the same kind of functionality as what the Matlab, R or numpy cohort provides.
- ogogmad 2y agoALGOL is the main forerunner of C. Anything vaguely C-like is also ALGOL-like.
- musicale 2y agoAs I understand it, B[1] was the immediate predecessor of C. Pascal (and its descendants) and Ada (and VHDL) seem closer syntactically to algol 60 than C is (begin/end as block delimiters, no parentheses needed for control structures, := for assignment, etc.) The example code at [1] (using bold keywords) should be understandable to most HN readers 64 years later. [1] https://en.wikipedia.org/wiki/B_(programming_language) https://en.wikipedia.org/wiki/B_(programming_language) [2] https://en.wikipedia.org/wiki/ALGOL_60 https://en.wikipedia.org/wiki/ALGOL_60
- Animats 2y agoIt's not that ALGOL-68 was that bad. It's that the description of it was terrible. There was an attempt to formalize the semantics, and it was a disaster. Nobody knew how to describe language semantics back then, so they invented a new notation. There was an ALGOL-68 report, which was incomprehensible.[1] Then there was "Informal Introduction to ALGOL-68"[2], which was difficult. Finally, there was a "Very Informal Introduction to ALGOL-68"[3], which was somewhat readable. Some sample text from the report: A "nest" is a 'NEST'. The nest "of" a construct is the "NEST" enveloped by the original of that construct, but not by any 'defining LAYER' contained in that original. (The nest of a construct carries a record of all the declarations forming the environment in which that construct is to be interpreted. Those constructs which are contained in a range R, but not in any smaller range contained within R, may be said to comprise a "reach". All constructs in a given reach have the same nest, which is that of the immediately surrounding reach with the addition of one extra "LAYER". The syntax ensures (3.2.1.b, 3.4.1.i,j,k, 3.5.1.e, 5.4.1.1.b) that each 'PROP' (4.8.1.E) or "property" in the extra 'LAYER' is matched by a defining. indicator (4.8.1.a) contained in a definition in that reach.) They're trying to get hold of the concept of variable scope and lifetime, back when that was a new idea. They were also trying to invent type theory, which they needed and which didn't exist yet. The first 50 pages of the report are all about the notation they invented to be used in the rest of the report. It's not a very good notation. It's like calculus before Leibniz, when people were trying to use Newton's fluxions.[4] Computer science just didn't have enough widely understood abstractions for people to even talk about this stuff clearly. [1] https://www.softwarepreservation.org/projects/ALGOL/report/Algol68_revised_report-AB-600dpi.pdf https://www.softwarepreservation.org/projects/ALGOL/report/A... [2] https://www.abebooks.com/servlet/BookDetailsPL?bi=31962044630 https://www.abebooks.com/servlet/BookDetailsPL?bi=3196204463... [3] https://www.computinghistory.org.uk/det/8776/A-Very-Informal-introduction-to-ALGOL-68/ https://www.computinghistory.org.uk/det/8776/A-Very-Informal... [4] https://en.wikipedia.org/wiki/Fluxion https://en.wikipedia.org/wiki/Fluxion
- deleted 2y ago[deleted]
- habitue 2y agoDude, this is an amazing comment. Really points out how it looks when someone us ahead of their time: - awkward groping for how to explain things - none of the words match how we talk about things now Algol-68 was clearly so ahead of its time, it's hard to understand anything they're saying. They're in outer space
- somat 2y agoAlgol-68 is sort of the reference case for the problem with prescriptive standards. They sound like a good idea "Lets get the best minds together and create the ideal standard" however because they are not based on anything built tend to be over engineered and hard to implement. At the opposite end of the spectrum is posix, which is a sort of terrible "lets just glob what everyone is doing together" descriptive standard, at least it gets everyone operating on the same page. so I think of it as a good place to start, not the end result. There is a reason the ieft was so successful with their "working code and rough consensuses". Which is why it worries me as they try to redefine them self as a "standards" body. as opposed to publishing standards.
- pram 2y agoThe development and scope creep sounds a lot like what happened with Perl 6 ;P
- pjmlp 2y agoIndustry did adopt ALGOL variants, it was and still is, one of the languages on the Burroughs linage. https://public.support.unisys.com/framework/publicterms.aspx?returnurl=%2faseries%2fdocs%2fClearPath-MCP-19.0%2f82251729-000%2f82251729-000%2fsection-000053445.html https://public.support.unisys.com/framework/publicterms.aspx... UK Navy also had a system programmed on it. Also it was largely influential in PL/I and its dialects, which were used a bit everywhere, the most well known being PL.8, PL/S and PL/M. And the competition that eventually lead to the Pascal tree of programming languages. History would have been much different if Algol 68 hadn't existed in first place.
- fanf2 2y agoYou are talking about Algol 60 which is a very different language to Algol 68
- pjmlp 2y ago> The first implementation of the standard, based on the late-1968 draft Report, was introduced by the Royal Radar Establishment in the UK as ALGOL 68-R in July 1970. This was, however, a subset of the full language, and Barry Mailloux, the final editor of the Report, joked that "It is a question of morality. We have a Bible and you are sinning!"[31] This version nevertheless became very popular on the ICL machines, and became a widely-used language in military coding, especially in the UK https://en.m.wikipedia.org/wiki/ALGOL_68 https://en.m.wikipedia.org/wiki/ALGOL_68
- fanf2 2y agoBurroughs Algol was based on Algol 60, Pascal was derived from Algol W which forked off from Algol 60 well before Algol 68, PL/I also predates Algol 68.
- pjmlp 2y agoApparently you missed the point, "History would have been much different if Algol 68 hadn't existed in first place." Without the way Algol 68 went down, Algol W and the related events that gave birth to Pascal linage would never happened. Likewise, PL/I adoption linage would most likely taken a different evolution.
- foldr 2y agoI did some of the Advent of Code in Algol 68 a few years back: https://github.com/addrummond/aoc_2021_algol68 https://github.com/addrummond/aoc_2021_algol68 It was a surprisingly pleasant language to work with considering its age. The main annoyances were: * Extensible arrays were fiddly to work with (which is understandable given that allocating arrays of arbitrary size barely makes sense on a 1968 computer). * Formatted IO is weird. I never really understood how it worked and just tweaked examples till I got what I needed. * No hashtables in the stdlib. * Available implementations on modern hardware are not production quality.
- musicale 2y agoGreat idea - what inspired you to try this? I'm always inspired when someone (like the author of the Algol 68 compiler you used) decides to make a historically important – but obsolete and generally unavailable – software system usable and available on modern hardware.
- foldr 2y agoA few people were doing Advent of Code at work and I guess I wanted the bragging rights of doing it in the most obscure language possible. I think if I did something like this again I would do it with an old Advent of Code to remove the competitive pressure. It was fun to start with but it ended up stressing me out quite a bit towards the end (which is not ideal over the Christmas vacation).
- OskarS 2y agoNicely done! The multi-wprd identifiers with spaces in them is really freaking me out :)
- Koshkin 2y agoAlgol 68 ended up competing with Ada, and you can guess which one won.