Not relevant to GCC, but one use for an old A68 compiler was apparently to be adapted for the old NA Software Fortran 90 compiler, I was told by a former colleague. I'd have expected Ada to be a closer fit, and I don't know how well the decision worked out.
GCC SC approves inclusion of Algol 68 Front End
91–100 of 115 posts
Re: GCC SC approves inclusion of Algol 68 Front End
#92Earlier quoted context omitted.
C had 3 major sources, B (derived from BCPL, which had been derived from CPL, which had been derived from ALGOL 60), IBM PL/I and ALGOL 68. Structs come from PL/I, not from ALGOL 68, together with the postfix operators "." and "->". The term "pointer" also comes from PL/I, the corresponding term in ALGOL 68 was "reference". The prefix operator "*" is a mistake peculiar to C, acknowledged later by the C language desig…
C originally had =+ and =- (upto and including Unix V6) - they were ambiguous (a=-b means a= -b? or a = a-b?) and replaced by +=/-= The original structs were pretty bad too - field names had their own address space and could sort of be used with any pointer which sort of allowed you to make tacky unions) we didn't get a real type system until the late 80s
Re: GCC SC approves inclusion of Algol 68 Front End
#93Earlier quoted context omitted.
The big difference is that Algol 68 is set in stone. This is what allows a single dedicated person to write the initial code and for it to keep working essentially forever with only minor changes. The Rust frontend will inevitably become obsolete without active development. Algol 68 isn’t any more useful than obsolete Rust, however.
The core Algol 68 language is indeed set in stone. But we are carefully adding many GNU extensions to the language, as was explicitly allowed by the Revised Report: [RR page 52] "[...] a superlanguage of ALGOL 68 might be defined by additions to the syntax, semantics or standard-prelude, so as to improve efficiency or to permit the solution of problems not readily amenable to ALGOL 68." The resulting language, which…
It was an AWK like task, but I decided up front it was too much trouble to do in AWK, as I needed to build a graph of data structures from the input data.
In part the program had an AWK like pattern matching and processing section, which wasn't too awkward. I found having to use REF's more trouble that dealing with pointers, in part due to the forms of auto dereferencing the language uses; but that was expected.
The real problem though was that I ended up needing something like a map / hash-table, and I concluded it was too much trouble to write from scratch.
So in the end I switched the program to be written in Go.
That then suggests a few things to me:
- it should have an extension library (prelude) offering some form of hash table.
- it would be useful to add syntax for explicit pointers (PTR keyword) which are not automatically dereferenced when used.
- maybe have with either something like the Go (or Zig) style syntax for selecting a member of a pointed to struct (a.b) and maybe Zig like explicit defer (ptr.\*).
That latter pointer suggestions because I found the "field OF struct" form too verbose, and especially confusing when juggling REFs which may or may not get auto dereferenced.Re: GCC SC approves inclusion of Algol 68 Front End
#94Earlier quoted context omitted.
Personally, I think the whole C tangent was a misstep and would love to see Algo 68 turn into Algo 26 or 27. I sort of like C and C++ and many other languages which came, but they have issues. I think Algo 68 could develop into something better than C++, it has some of the pieces already in place. Admittedly, every language I really enjoy and get along with is one of those languages that produced little compared to t…
I wonder about what you think is wrong with C? C is essentially a much simplified subset of ALGOL68. So what is missing in C?
Re: GCC SC approves inclusion of Algol 68 Front End
#95Earlier quoted context omitted.
Burroughs used an Algol60 derivative (not '68)
ESPOL initially, which evolved into NEWP.
The Burroughs large systems architecture didn't really protect you from yourself, system security/integrity depended on only letting code from vetted compilers run (only a compiler could make a code file, and only a privileged person could make a program a compiler) - so the Algol 60 compiler made code that was safe, Espol could make code that wasn't, could do things a normal user couldn't - you kept the espol compiler somewhere safe away from the students ....
(there was a well known hole in this whole thing involving mag tapes)
Re: GCC SC approves inclusion of Algol 68 Front End
#96Earlier quoted context omitted.
Personally, I think the whole C tangent was a misstep and would love to see Algo 68 turn into Algo 26 or 27. I sort of like C and C++ and many other languages which came, but they have issues. I think Algo 68 could develop into something better than C++, it has some of the pieces already in place. Admittedly, every language I really enjoy and get along with is one of those languages that produced little compared to t…
Is like to order a complementary question to the sibling one. What are you going to add to (/remove from?) Algol 68 to get Algol 26?
Re: GCC SC approves inclusion of Algol 68 Front End
#97In my mind this highlights something I've been thinking about, the differences between FOSS influenced by corporate needs vs FOSS driven by the hacker community. FOSS driven by hackers is about increasing and maintaining support (old and new hardware, languages etc..) while FOSS influenced by corporate needs is about standardizing around 'blessed' platforms like is happening in Linux distributions with adoption of Ru…
I don’t know that that is fair. A number of years ago I worked on a POWER9 GPU cluster. This was quite painful - Python had started moving to use wheels and so most projects had started to build these automatically in CI pipelines but pretty much none of these even supported ARM let alone POWER9 architecture. So you were on your own for pretty much anything that wasn’t Numpy. The reason for this of course is just tha…
Re: GCC SC approves inclusion of Algol 68 Front End
#98Where might one look to find examples of such code? I've never found algol outside of wikipedia
https://rosettacode.org/wiki/Category:ALGOL_68 https://github.com/search?q=algol68&type=repositories Without knowing what your interests/motivations and backgrounds are, it is hard to make good recommendations, but if you didn't know about rosettacode or github I figured I should start with that
Re: GCC SC approves inclusion of Algol 68 Front End
#99Earlier quoted context omitted.
ESPOL initially, which evolved into NEWP.
ESPOL was (is?) simply a version of the standard Algol compiler that let you do 'system' sorts of things. The Burroughs large systems architecture didn't really protect you from yourself, system security/integrity depended on only letting code from vetted compilers run (only a compiler could make a code file, and only a privileged person could make a program a compiler) - so the Algol 60 compiler made code that was s…
Given its architecture, it is sold for batch processing systems where security is paramount.
Yes, ESPOL and NEWP, being one of the first systems languages with UNSAFE code blocks, a binary that is compiled having unsafe is tainted and requires administrator configuration before being allowed to execute by the system.
One cannot just compile such code and execute it right away.
Re: GCC SC approves inclusion of Algol 68 Front End
#100Earlier quoted context omitted.
I wonder about what you think is wrong with C? C is essentially a much simplified subset of ALGOL68. So what is missing in C?
I think what C is missing is everything that people fall back onto clever use of pointers and macros to implement. Not that I think C should have all those things, Zig does a decent job of showing alternatives.