Live data from Hacker News

GCC SC approves inclusion of Algol 68 Front End

gcc.gnu.org

91–100 of 115 posts

Re: GCC SC approves inclusion of Algol 68 Front End

#91
post #90

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 Gnat frontend is used for modern Ada development these days. Not sure if that’s what you mean

Re: GCC SC approves inclusion of Algol 68 Front End

#92
post #46

Earlier 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

Yeah if you ever wondered why the fields in a lot of Posix APIs have names with prefixes like tm_sec and tm_usec it's because of this misfeature of early C.

Re: GCC SC approves inclusion of Algol 68 Front End

#93
post #59
post #31

Earlier 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…

I had a small programming task a while ago, and decided to try doing it algol68 (using the algol68 genie interpreter) simply because I'd had some exposure to the language many years ago at Uni.

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

#94
post #37

Earlier 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?

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.

Re: GCC SC approves inclusion of Algol 68 Front End

#95
post #54
post #45

Earlier quoted context omitted.

Burroughs used an Algol60 derivative (not '68)

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 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

#96
post #42

Earlier 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?

That task would be beyond my skills, as I said, I am just a hobbyist. I think it would be interesting to see what would result from going back to one of those early foundational languages and developing a modern language from it. With a language like Algol we don't have the decades of evolution (baggage) which are a big part of languages like C and C++ and trickle into the languages they inspired even if they are trying to remove that baggage. So, what would we get if we went back to the start and built a modern language off of Algol? What would that look like?

Re: GCC SC approves inclusion of Algol 68 Front End

#97
post #23

In 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…

Not just little demand, also expensive and uncommon hardware. If the maintainers don't have the hardware to test on they can't guarantee support for that hardware. Not having hardware available often happens because there's little demand for it, but the difficulty of maintaining software for rare hardware further reduces the demand for that hardware.

Re: GCC SC approves inclusion of Algol 68 Front End

#98
post #21

Where 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

What I'm taking away from this is that there's absolutely zero code of interest that is Algol 68

Re: GCC SC approves inclusion of Algol 68 Front End

#99
post #95
post #54

Earlier 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…

As mentioned it evolved into NEWP, and you can get all the manuals from Unisys, as they keep selling it.

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

#100
post #37

Earlier 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.

Yeah, but I meant specifically from ALGOL68.
Post reply on HN