Tux Machines

Do you waddle the waddle?

Other Sites

news

Algol 68 GCC Front-End

posted by Roy Schestowitz on Jan 02, 2025

  • Jose E. Marchesi: Algol 68 Front-End for GCC

    Just posted a WIP series for an Algol 68 front-end for GCC. It is about time to have support for the best programming language ever designed in the best optimizing compiler ever made ;) Thanks to Marcel van der Veer for his awesome parser, that I took the liberty to borrow from Algol 68 Genie. Free Software for the win! WIP patch series in gcc-patches...

  • An Algol 68 front end for GCC
    While some people are focused on new and trendy languages, José Marchesi has, instead, gifted the world with a GCC front end for the Algol 68 language.
  • Algol 68 GCC Front-End
    Hello people, happy GNU year!
    
    This WIP is a GCC front-end for Algol 68, the fascinating, generally poorly understood and often vilified programming language. It is common knowledge that Algol 68 was well ahead of its time back when it was introduced, and anyone who knows the language well will suspect this probably still holds true today, but more than fifty years after the publication of the Revised Report the world may finally be ready for it, or perhaps not, we shall see ;) At the very least having support in GCC will make it easier for Algol 68 enthusiasts to write, share and use their programs in modern systems.
    This is work in progress, but the front-end can already compile most of the main language constructs and many full programs.
    Most of the predefined operators provided by the standard prelude are still missing. Adding these is a matter of filling in the gaps and should not require any fundamental change in the implementation.
    There is no transput, so the programs that can currently be compiled and ran are not terribly useful since they cannot operate on files. A proper transput implementation that integrates well in modern POSIX systems is in the works.
    The Revised Report didn't concern itself with mundane topics as separated compilation, so at this point each compilation unit is a full program. Early Algol 68 compilers supported separated compilation, each on its own way. The WG 2.1 also produced a proposal for a standard modules system for Algol 68, never implemented to my knowledge. A proper modules system is also in the works.
    The goal is for GNU Algol 68 to be a strict super-language of Algol 68, as blessed by the Report.
    At this point I am confident the implementation is viable and it is reasonable to continue the development in public without risking wasting anyone's time in vaporware.
    Speaking about the implementation.
    This is my first GCC front-end and I am still only moderately familiar with the applicable lore. Up to now I have focused in functionality rather than efficiency in order to assess the feasibility of the task and to get something working and suitable to be published. Therefore there are many parts of the implementation that are crude and can be made smarter, and places where I may have simply used the wrong approach, out of ignorance. The FE is also awfully slow and I haven't paid much attention to not leak memory. All of this will be fixed. In the meanwhile any feedback from actually knowledgeable FE gurus would be highly appreciated!
    The parser used in this front-end has been borrowed and adapted from Algol 68 Genie, an Algol 68 interpreter written by Marcel van der Veer. It is worth noting that this parser is not your typical garden variety parser, as it is capable of effectively parsing the two-level grammar of Algol 68, which is no small deal. Parsing Algol 68 is notoriously difficult, and without Marcel's careful work of many years this front-end would most probably not exist. It is also a beautiful implementation that is a delight to both read and work with. I certainly have learned a lot from it. The syntax tree built by the parser is then lowered into a GENERIC tree by a lowering pass, which then invokes the gimplifier and hands the resulting gimple IR over to the rest of the compilation, down the rabbit hole all the way to optimized assembly code.
    The DWARF currently generated by the compiler is not very useful. Emitting DWARF that accurately describes the Algol 68 data structures is still to be done. As is GDB support and its corresponding expressions parser, which by the way will be lots of fun to do, considering the language in question ^^
    The mangling of symbols is currently very dumb. This is because we need to design and decide on a separated compilation model first in order to determine what information to encode in the symbols.
    The compiler driver is called `gac', for GNU Algol 68 Compiler. The compiler proper is called `a681'. The run-time library is called `libgac'.
    The front-end includes a testsuite for catching regressions, as well as an user manual and an internals manual, all of which is being expanded as the work progresses. A couple of tests are currently failing, sorry about that.
    Note that auto re-generated files like configure are not included in the series to not bloat the emails. These can be re-generated normally using autoreconf and the like. I have also dispensed with ChangeLog entries in this WIP patch series, as well as with detailed commit messages. These will be incorporated in a subsequent version if/when the front-end gets officially proposed for incorporation in GCC.
    All the C and C++ code is formatted following the GNU Coding Standards.
    The original parser is copyright Marcel van der Veer. The rest of the code is either copyright of yours humble or boilerplate taken from other GCC front-ends. All the code is licensed under GPLv3+, with the GCC Runtime Library exception for run-time components. The manuals are licensed under the GNU FDL like the rest of the documentation shipped with GCC.
    As to where to host the project, the obvious choice is perhaps a project at sourceware, but it would be nice if we could develop the front-end in a branch in the GCC git repo, to have a mailing list under gcc.gnu.org and to use a page in the GCC wiki to track the FE progress... please let me know if that is feasible.
    An Emacs mode for editing Algol 68 programs can be found at https://git.sr.ht/~jemarch/a68-mode. It supports automatic indentation, pretty-printing of bold tags, an auto-stropping minor mode and other useful features.
    The Algol 68 Jargon File at https://jemarch.net/a68-jargon aims to provide a comprehensive list of definitions for technical and non-technical terms used in the context of Algol 68, which are many. It contains few entries at the moment but I am progressively expanding it as time allows.
    Finally, I am using the #gnualgol channel in irc.oftc.net. Everyone is welcome to join and have fun with Algol 68.
    Salud!
    PS: many thanks to Iain, Andrew, Segher and others for their help and patience answering my FE related n00b questions in the IRC channel. You are the best.

Other Recent Tux Machines' Posts

Lots of Coverage About 9-Year-Old Linux Kernel Vulnerability (Privilege Escalation, Local)
kernel issue
Kernel: Realtek Rant and DRM via HDMI 2.1
mostly AMD coverage
qBittorrent 5.2 Open-Source BitTorrent Client Released with Many New Features
qBittorrent 5.2 open-source BitTorrent client is now available for download with many new features, improvements to the WebUI and search, and platform-specific changes. Here’s what’s new!
gThumb 4.0 porting to GTK-4 & LibAdwaita Image Viewer / Organizer
gThumb, the free open-source image viewer and organizer, is finally porting to GTK4 plus LibAdwaita
Free Software Events (LibreLocal) and Educational Meetups
coming up soon
 
Microsoft Facing Problems in Qatar (Not Just Missiles); GNU/Linux is Growing Fast [original]
Due to cyberattacks it would be a wise choice to adopt Free software and not outsource to GAFAM
Raspberry Pi Imager Now Supports Raspberry Pi Connect for Organizations
Raspberry Pi Imager 2.0.9 flashing tool for Raspberry Pi devices is now available for download with support for Raspberry Pi Connect for Organizations and many other changes.
Programming Coverage by Valnet
Shells, Python, and more
Kernel Space / Virtualisation: Home Directory Flexibility in Storage Device and Raves About Proxmox
recently in XDA
GNOME Extensions and Making It More Like Hyprland
3 recent Valnet articles
Hardware Projects and Self-Hosting: Raspberry Pi, Jellyfin, Framework, and NAS at Home
Hardware leftovers
HowTo Geek: Articles about Vim's statusline
a couple of recent articles
Free, Libre, and Open Source Software Leftovers
FOSS picks
Events: Lomiri/Open Source Mobile Dev Hackathon, WordCamp, and LSFMMBPF
some upcoming events
GNU/Linux Leftovers
mostly GNU/Linux
Hardware: PhobosLab, ESP32, and Reducing Phone-Induced Anxiety
open hardware and more
Web: End of ‘Ask Jeeves’, Feather Wiki, Reverting Back to RSS, and Blocking Ads (Spyware)
WWW related picks
Programming Leftovers
Development leftovers
Security Leftovers
Security related news
OpenSUSE: Tumbleweed Monthly Update and OpenSUSE Asia Summit 2026 Call for Speakers
a pair of news updates
Red Hat's Slop Promotion, GAFAM Advocacy, and Fedora on RISC-V by Marcin Juszkiewicz
IBM stuff and corporate things
Applications: InstaMAT and InstaLOD Come to Linux, NetHack 5.0.0 Released
Software releases and ports
Games: PlayStation 5 GNU/Linux Tested, Steam’s April Hardware Survey Shows Trends
gaming leftovers
KDE: Kdenlive Goals for GSoC 2026 and Union's Spring 2026 Update
KDE picks
Distributions and Operating Systems: EasyOS, DistroWatch, Alpine, and Portable (USB) GNU/Linux
distros and commentary
today's howtos
Instructionals/Technical picks
Linux Kernel: Virtualisation, Inter-Process Communication (IPC), and More
kernel picks
Games: Steam Controller, Wireworks, and More
GamingOnLinux's latest articles
Android Leftovers
Android 17 Beta Code Points to Rear Lights on the Next Pixel
Free and Open Source Software
This is free and open source software
Today It's 5/5 and We're 5 Weeks Away From Our 22nd Anniversary [original]
Next month one contributor plans to host a little party for the site, seeing that there are budgetary constraints this year
GNU/Linux Measured at Record High in Chile [original]
South America is adopting more of GNU/Linux
Today in Techrights
Some of the latest articles
Android Leftovers
It’s official: Android Auto finally fixes a decade-old bug that infuriated millions of drivers
I installed a Linux gaming distro and got better frame rates than Windows on the same PC
Every year, someone declares it's finally the year of the Linux desktop
Free and Open Source Software
This is free and open source software
Scaleclaw – Linux distribution image built around Universal Blue’s base image
Scaleclaw is a Linux distribution image built around Universal Blue’s base image
GNU/Linux, BSD, and Free Software Leftovers
mostly GNU/Linux
Security Leftovers
very few for today
LibreOffice Report and OnlyOffice Faking 'Open Source' (Openwashing)
office suites' news
Audiocasts/Shows: LINUX Unplugged and This Week in Linux
2 new episodes
Valve Officially Releases New Steam Controller with 35-Hour Battery, Grip Sense
Valve releases new Steam Controller for $99 USD with four haptic motors, two full-size magnetic thumbsticks with capacitive touch, two capacitive areas, and a 35-hour battery.
Programming Leftovers
Development picks
End of Jeeves or Ask.com
Web history
Distributions and Operating Systems: Chromebook Without ChromeOS, vixalien, and KaikuOS
some OS news, hacks, and developers' updates
Hardware, Arm64, Banana Pi, and Various GNU/Linux Devices
Hardware leftovers
Games: Linux Support and Valve Steam Deck OLED, OptiScaler Client
Games-related news
today's howtos
terminal, howtos, and more
KDE: Tux Manager, Mega Sprint, Drawy, Plasma Tips and Tricks
KDE news and updates
Attack knocks Ubuntu websites, services and Snap store offline
If you’re having trouble accessing the Ubuntu website
Free and Open Source Software
This is free and open source software
nellaOS – Linux distribution made in Venezuela
nellaOS is a Linux distribution made in Venezuela that aims to work on all 64-bit computers
Linux Mint 22.3 HWE ISOs Now Available for Download with Linux Kernel 6.17
Linux Mint 22.3 HWE ISO images are now available for download powered by the Linux 6.17 kernel series from Ubuntu 24.04.4 LTS.
Linux 7.1-rc2
second one out late Sunday
Android Leftovers
Stop struggling with big phones: Android's hidden one-handed setting changes everything
This extension finally turns KDE into a tiling window manager
KDE is great. It’s probably my favorite desktop environment
GNOME is good, actually
While I’m normally a KDE user
Finland: Windows Falls to New Lows, Fast (GNU/Linux Measure at Over 10%) [original]
the growing platform isn't Apple's but GNU/Linux
GNU/Linux and Development Leftovers
From end of April
Weekly GNU-like Mobile Linux Update: Slow Seventeen and 7 Cameras
how freedom shapes up
NixOS forced me to declare my entire system, and now I can't imagine Linux any other way
There's a version of you in every Linux machine you've ever set up
ReactOS Gets Unified Installer Image and a New Storage Stack
Although the ReactOS project is in no rush to dethrone Windows as the desktop operating system of choice
I left GNOME for COSMIC, tried KDE next, and only one felt right in the end
Desktop environments can make or break your overall Linux experience
After months of desktop hopping, I finally understand why Linux users can't agree on anything
I was installing roughly three extensions just to add a taskbar to GNOME
Free and Open Source Software
This is free and open source software
MoltOS – security-based Linux distribution
MoltOS is a Debian-based Linux distribution built for privacy, defensive security analysis, network research, forensics, data recovery, and cybersecurity education
Dolphin 26.04 release
I want to highlight a few changes that came to Dolphin 26.04 and add some nuance to the release announcement
Review: Xubuntu 26.04
This has not been a good year for Xubuntu, the Xfce-based Ubuntu flavour
Gestures in Graz, and beyond
KDE's Mega Sprint 2026 in Graz brought a group of about 20 KDE contributors together in early April
KDE email, part 3: don’t filter your email
This is part 3 in my series about email management, with the prior one being about using email client apps
Videos/Audiocasts/Shows: GNU/Linux and Free Software/Coding Clips
recent via Invidious
Redcore Linux Hardened 2601 Vulpecula Stable
Redcore Linux Hardened 2601 (codename Vulpecula) stable ISO
Asmi Linux 26.04
Asmi Linux 26.04 is now available based on Ubuntu 26.04 (Resolute Raccoon)
CachyOS ISO Release for April 2026 Brings Shelly as Default GUI Package Manager
The CachyOS ISO snapshot for April 2026 is now available for download with the Shelly graphical package manager, DNS-over-HTTPS, fingerprint sudo, and more.
Today in Techrights
Some of the latest articles
9to5Linux Weekly Roundup: May 3rd, 2026
The 290th installment of the 9to5Linux Weekly Roundup is here for the week ending May 3rd, 2026.
Sharing and Free, Libre, and Open Source Software
FOSS and more
GNU/Linux and BSD Leftovers
mostly the former
Canonical Giving up on GNU/Linux, Selling Slop Ponzi Scheme via Ubuntu Brand
very bad sign
Audiocasts/Shows: Sacha and Prot Talk Emacs, Linux Saloon Covers Many Topics
2 new episodes
Programming Leftovers
Development leftovers and news
Ben Hutchings, GSoC Interns, and Upcoming debian.org E-mail Change (SPF)
Debian picks
Open Hardware/Modding/Retro/Hacking: Commodore 64, ESP32, and More
some projects and raves
EasyOS Development Updates
3 updates from BK
ScummVM's Google Summer of Code, Steam, and GNU/Linux Growing
3 links for now
today's howtos
biodiff and more
Valve dev fixes up VRAM management on AMD GPUs to improve performance
4 articles
Postgres-Related Releases: pgexporter 0.8, pgagroal 2.1, pgmoneta 0.21, and PgQue v0.1
4 new releases
Europe Decoupling from GAFAM is Good News, Especially for European Member States [original]
France was likely just the beginning
Copy Fail Linux Kernel Vulnerability Now Patched in Debian, Ubuntu, and Others
The Copy Fail (CVE-2026-31431) Linux kernel security vulnerability that could allow a local user to elevate privileges to the root user has now been patched. Update your installations as soon as possible!
statCounter Reckons GNU/Linux Rose to 7% in The Netherlands, Windows at All-Time Lows [original]
This month's latest
FreeBSD 15.1-BETA1 Now Available
The first beta build of the 15.1-RELEASE release cycle is now available
Wine 11.8
The Wine development release 11.8 is now available
Free Software Report: "60% of open source maintainers work unpaid, 60% have quit or considered quitting, and 44% cite burnout specifically."
new and old commentary
Android Leftovers
This underrated Android feature makes my belly hurt from laughing — here's why you should try it out too
5 more lightweight Linux distros that go easy on your old Windows PC
So, here are five more Linux distributions that are lean, resource-efficient
Linux Lite 8.0 RC1 Released! Based on Ubuntu 26.04 LTS
Linux Lite, the lightweight, beginner friendly, and Ubuntu based Linux Distribution, announced the RC1 release for the next 8.0 major version yesterday morning
Free and Open Source Software
This is free and open source software
Evernight Vista – Fedora-based Linux distribution
Evernight Vista Operating System is a Fedora-based Linux distribution that aims to make Fedora more approachable for desktop users
LiaisonOS – distribution designed for amateur radio emergency communications
LiaisonOS is a Debian-based Linux distribution designed for amateur radio emergency communications
This month in KDE Linux: April 2026
Welcome to another edition of “This month in KDE Linux”!
Ubuntu’s Official Flavour List Is Shrinking, And That’s Not a Bad Thing
There are fewer official flavors with 26.04 LTS version. Is it alarming
Windows All-Time Lows in Europe, GNU/Linux Rose to 6% in Germany [original]
'Soft power' gone, less Microsoft, more sovereignty through Free software
Today in Techrights
Some of the latest articles