Thread View: comp.lang.misc
2 messages
2 total messages
Started by Anthk GM
Thu, 19 Nov 2026 08:20
Re: Algol 68 / Genie - support of user defined libraries?
Author: Anthk GM
Date: Thu, 19 Nov 2026 08:20
Date: Thu, 19 Nov 2026 08:20
36 lines
2847 bytes
2847 bytes
On 2025-08-16, Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote: > Lacking some basic standard libraries in Algol 68 I'm at a point > where I'd like to build separate modules/includes/libraries that > can be accessed in various application contexts without doing a > copy/paste of the complete library code. I've read that such > things have been done in some variants or proposed as extension > (e.g. Lindsey https://www.algol68-lang.org/docs/algol68-mr.pdf). > > I'm using Marcel's Genie Algol 68 system and failed to find any > way to achieve that. The closest I came across in the documents > that sound like something like that was using 'pragmats'... > > • some previously compiled portion of the particular-program > is to be invoked, e.g., PR WITH segment FROM album PR; > • the source text is continued on some other document, e.g., > PR READ FROM another file PR; > > but I'm not sure it does what I'm looking for, nor how it shall > interact with other external items (like "segment" or "album" > as given with the example above), how it's actually used/done. > > Has someone experiences with this Genie-specific mechanism, or > any other suggestions how to achieve modularization with Genie? > > I'm (at the moment) not too picky about the mechanism, whether > it's, say, a supported built-in syntax, a working Genie pragmat, > or a primitive include mechanism. > > If there's nothing supported with the Genie system I'd probably > just work around the requirement with an external tool like CPP. > > Janisa Ga68 under GCC supports POSIX and thus sockets and maybe internet connections. I wish a68g had for instance socket, TLS and such support.
Features of "a68g" and "ga68" (was Re: Algol 68 / Genie - support of user defined libraries?)
Author: Janis Papanagnou
Date: Thu, 19 Nov 2026 09:59
Date: Thu, 19 Nov 2026 09:59
69 lines
4302 bytes
4302 bytes
On 2026-11-19 09:20, Anthk GM wrote:
> On 2025-08-16, Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
>> [...]
>
> Ga68 under GCC supports POSIX and thus sockets and maybe internet
> connections. I wish a68g had for instance socket, TLS and such
> support.
(Wow, a reply to a post that is more than a year old, and obviously
not even addressing the original topic.)
Now concerning your new topic... (I changed the subject line)
First I'd like to know what you mean by "Ga68 [...] supports POSIX".
Do you mean all the UNIX *low-level* system calls (i.e.low-level
I/O, processes, threads, signals, terminal handling, and obviously
IPC that you mentioned in one variant at least)?
Mind that Algol 68 is a high-level language. It has its own file I/O
abstractions, abstracted parallel processing already in the language.
Genie (a68g) specifically has a couple high-level (and also some more
primitive) extensions that have been considered useful.
Curiously asking the search engine about Ga68 I find in the POSIX
prelude these things:
* Process Control. Handles program termination and status reporting
(e.g., posix exit, exit status).
supported by Genie (execve, wait, ...).
I'm missing passing an exit-code to the calling environment in Genie.
(I suggested it but it obviously wasn't considered for inclusion.)
* Command Line. Provides access to command-line arguments passed to
the program (argc, argv).
also supported by Genie
* Environment. Allows reading environment variables via getenv.
also supported by Genie
* Error Handling. Exposes system error states through errno,
strerror, and perror.
also supported by Genie
* Files & Descriptors. Includes standard streams (stdin, stdout,
stderr), file creation and opening (fopen, fcreate, fclose),
open flags (...), and file property queries.
also supported by Genie (standin/standout/standerr/standback and the
channels as part of the standard Algol 68 methods, no specific system
functions, all functions from the Algol 68 standard). I don't see a
point in supporting an alternative open/create/close function set.
* Sockets. Provides basic network socket operations such as fconnect.
unsupported by Genie (but used in its Postgres DB support extension)
* String Transput. Offers C-style character and string I/O procedures
Genie has the powerful features existing already in Algol 68 and quite
some sensible extensions. But not the low-level C-transput functions.
But it supports other C-library string functions, and extensions for
Regexps.
Genie supports also some other _higher-level_ extensions. (Just noting;
I refer to the Genie manual for details.)
And I see that Ga68 seemingly also supports what I was asking for here
in my original post: "Foreign Function Interface (FFI)"!
Also a suggestion I made that wasn't considered for addition in Genie.
Janis
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads