r/Oberon • u/tkurtbond • 4h ago
Announcing Peaseblossom: an Oberon-2 compiler, and libraries and programs for it and for voc
This software was developed with the aid of AI.
I'm announcing a set of Oberon-2 projects: a compiler, libraries, and programs built with them. All are on GitHub, and the software is under the BSD 3-Clause License.
For voc (Vishap Oberon)
- olibfyaml: a binding to libfyaml, the YAML 1.2 parser and emitter. It covers parsing, navigation, typed values, building and emitting YAML or JSON, anchors, tags and source locations. Errors in the input come back as values with
file:line:columnmessages.
For both voc and poc
- opp: the Oberon pretty printer. It reformats modules within a maximum line length and keeps every comment. It handles both compilers' language extensions. Before writing, it checks that its output has exactly the tokens and comments of its input.
- Ropes: ropes, strings represented as trees of pieces, with a self-test and a command-line demo.
- ArgParser: command-line parsing: long and short options, clustered short options, option values, commands, and usage messages.
Peaseblossom
- poc, the Peaseblossom Oberon Compiler: an Oberon-2 compiler with an LLVM backend for Linux, FreeBSD, OpenBSD and NetBSD, and a VAX backend for VAX/VMS 5.5-2. It was motivated in large part by my wish for a more modern language than the limited ones available on the VAX system I maintain. A release tarball needs only clang and GNU make, or it can be bootstrapped using Vishap Oberon. Packages are available for Fedora, Debian, FreeBSD, OpenBSD and NetBSD. It comes with a User's Guide and a Reference Guide.
- polibfyaml: olibfyaml for poc, with the same API, tests and examples.
- ova_fmt_po, an example program using polibfyaml: it formats characters for the OVA tabletop RPG from YAML as reStructuredText, gemtext, Markdown and more.
- pofltk: a thick binding to FLTK 1.4. FLTK's classes are record types a program extends, and
draw()andhandle()are type-bound procedures it overrides. Coverage includes widgets, layout (flex and grid), menus, dialogs, text editors, browsers, trees, tables, images, the clipboard and preferences.FlTestdrives a program's windows in tests on Xvfb or a headless compositor. Many of FLTK's test programs are ported as examples.- ova_cg_po, an example program using pofltk: a character generator for OVA. It's a complete program with a menu bar, tabs, grids, file choosers, preferences and window tests. Its tour for pofltk readers says where in its code each technique is.
- poDateTime: dates, times, durations and time zones. It has instants, the proleptic Gregorian calendar, clocks, POSIX
TZrules and tz database files, ISO 8601, RFC 3339 andstrftimeformats. It runs on the four Unixes and on VAX/VMS. - pounix: Unix services that poc's runtime doesn't provide: dropping root for good, file descriptors and directories, running child processes with an argument list (no shell), and
errno. - posockets: TCP (IPv4 and IPv6) and Unix-domain sockets. It works with poc's cooperative
Tasks, so one thread can serve many connections, with deadlines. - polibtls: a binding to libtls (LibreTLS on Linux, FreeBSD and NetBSD; OpenBSD's own). It supports server contexts with several key pairs, client certificates, and non-blocking I/O with
Tasks. It's tested against openssl, gnutls-cli and Go's TLS. - pogemini: a Gemini server built on the four libraries above. It serves several capsules by host name, each with its own certificate, and can require client certificates for parts of a capsule. Every connection runs in a task in one thread.
- poDB: a database-independent SQL interface, with drivers for SQLite and PostgreSQL. A program moves from one to the other by changing its connection URL and the driver it imports.
Comments, bug reports and patches are welcome. Many of the poc libraries are early in their lives; polibfyaml and pofltk have had the most use.