r/Oberon • • Aug 31 '11

Niklaus Wirth demos an actual Ceres workstation (towards the end of the video)

Thumbnail multimedia.ethz.ch
0 Upvotes

r/Oberon • • 2d ago

Announcing Peaseblossom: an Oberon-2 compiler, and libraries and programs for it and for voc

1 Upvotes

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:column messages.

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() and handle() 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. FlTest drives 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 TZ rules and tz database files, ISO 8601, RFC 3339 and strftime formats. 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.


r/Oberon • • Dec 02 '25

Is this sacrilege?

3 Upvotes

This is the example code from the Oberon-2 specification in a curly brace syntax.

I'm working on adding the ML module system to an imperative language. I don't want to have to experiment with the base language, and I don't want it to be a source of complications, so Oberon 07 seems like the best basis for it.

Since I'm starting the Oberon parser from scratch I can choose a syntax, and I thought maybe this one would let people look at Oberon with fresh eyes.

module Trees {
    import Texts, Oberon;

    pub type Tree = pointer to Node;

    pub type Node = class {
        readonly name: pointer to array of char;
        left, right: Tree;
    };

    var w: Texts.Writer;

    pub fn (t: Tree) Insert (name: array of char) {
        var p, father: Tree;
        p = t;
        do {
            father = p;
            if (name == p.name^) { return; }
            if (name < p.name^) { p = p.left; } else { p = p.right; }
        } while (p != null);
        new(p);
        p.left = null;
        p.right = null;
        new(p.name, len(name) + 1);
        copy(name, p.name^);
        if (name < father.name^) {
            father.left = p;
        } else {
            father.right = p;
        }
    }

    pub fn (t: Tree) Search (name: array of char): Tree {
        var p: Tree;
        p = t;
        while (p != null && name != p.name^) {
            if (name < p.name^) {
                p = p.left;
            } else {
                p = p.right;
            }
        }
        return p;
    }

    pub fn (t: Tree) Write {
        if (t.left != null) { t.left.Write(); }
        Texts.WriteString(w, t.name^);
        Texts.WriteLn(w);
        Texts.Append(Oberon.Log, w.buf);
        if (t.right != null) { t.right.Write(); }
    }

    pub fn Init (t: Tree) {
        new(t.name, 1);
        t.name[0] = '\0';
        t.left = null;
        t.right = null;
    }

    Texts.OpenWriter(w);
}

r/Oberon • • Dec 13 '24

Luon: A new Oberon which is even simpler

Thumbnail
github.com
9 Upvotes

r/Oberon • • Sep 15 '25

gingerBill's Titania Programming Language

Thumbnail
github.com
11 Upvotes

r/Oberon • • Apr 29 '26

The Oberon System 3 now also runs on the Raspberry Pi Zero 2

Thumbnail github.com
11 Upvotes

r/Oberon • • Sep 28 '23

Online Oberon Programming Enviornment.

1 Upvotes

Hello. I was going to post this in the newsgroup comp.lang.oberon but it seems to have been banned from Google Groups due to being overrun by spammers. (Yeah...I know the "real" way to use USENET is through a server, but I currently don't have access to a free one).

Anyhow, some months ago I came across an online Oberon operating environment complete with a decent library (including graphics) and all ran through compiling to JavaScript. It had an account you could log into and save your programs and everything. Lots of really cool physics, chemistry, and mathematics simulations. I was looking forward to playing with it more, but alas it's down. Yeah you can still kind of play with it using the WebArchive but that's not the same. (You can compile and run the test programs. But setting up an account and saving your own programs doesn't work).

https://visual.sfu-kras.ru/

https://online.oberon.org

http://web.archive.org/web/20220314203119/https://visual.sfu-kras.ru/

The OberonJS compiler that it's based on still available.

http://oberspace.org/oberonjs.html


r/Oberon • • Feb 25 '25

Command line Oberon targeting virtual CPU

7 Upvotes

If anyone needs a command line Oberon compiler (and basic Oberon System libraries without a UI), here is one:

Oberon

It's using the Portable Oberon 2 compiler from ETHZ.


r/Oberon • • Oct 14 '26

I’m working on an Active Oberon SDK, with a Doom clone as a practical example

6 Upvotes

Hi, everyone!

Recently, I decided to return to an old passion of mine: the A2 operating system (formerly Bluebottle) and its language, Active Oberon.

I’ve created MiniA2, a project that makes Active Oberon easier to use outside of A2. Active Oberon is a general-purpose language with active objects and built-in synchronization through AWAIT. MiniA2 brings together the compiler, standard library, command-line tools, and editor support, so you can write applications and build standalone executables without running the A2 desktop.

As a practical example, I’m building AO-Doom, a Doom clone written in Active Oberon. It already loads classic maps and supports rendering, movement, pickups, weapons, and several enemy behaviors. It’s still a work in progress, but it gives the toolchain a substantial real-world application to support.

I’d welcome feedback from anyone interested in language tooling, concurrency, Oberon, or Wirth-style languages.

Explore MiniA2:

https://github.com/active-oberon/minia2

Available packages:

https://active-oberon.github.io/a2-registry

AO-Doom:

https://github.com/active-oberon/ao-doom

For a quick introduction to the language, I’ve also added an Active Oberon page to Learn X in Y Minutes:

https://learnxinyminutes.com/active-oberon/


r/Oberon • • Jul 26 '25

Why Your Favorite Oberon Compiler Performance Quote is Probably Misleading

Thumbnail
github.com
7 Upvotes

r/Oberon • • Mar 06 '26

Oberon System 3 supports Multiboot and nicely runs on QEMU

Thumbnail
github.com
6 Upvotes

r/Oberon • • Oct 01 '21

New Oberon+ IDE based on the Mono CLR - lean and fast

Thumbnail
github.com
4 Upvotes

r/Oberon • • Oct 09 '21

A version of the Oberon System running on DotNet

Thumbnail software.rochus-keller.ch
6 Upvotes

r/Oberon • • Mar 10 '24

Emulating Project Oberon RISC5 on Icarus Verilog for a modern software simulation environment

3 Upvotes

Greetings from Iceland!

I've embarked on a journey to emulate the Project Oberon RISC5 system architecture using Icarus Verilog, with the end goal of creating a QEMU-like environment. This would allow for an exploration of the OS, compiler, and applications detailed in the Project Oberon book, all within a software simulation.

However, I've hit a roadblock. The emulation requires specific FPGA modules from the original hardware (a Digilent Spartan 3 board), including the clock (DCM), RAM, and IO components. My challenge is to either replicate these Verilog modules for a software simulation or find suitable alternatives that can be adapted.

This task is somewhat outside my comfort zone as a software engineer, primarily because it involves a deep dive into hardware emulation specifics I'm not very familiar with. I'm reaching out to see if anyone in this community has tackled similar projects or has insights into creating or modifying Verilog code for RAM, DCM, and IO emulation.

The ultimate aim is to produce a contemporary, step-by-step guide for working through the Project Oberon ecosystem without the need for the original FPGA board. Any advice, resources, or guidance on where to start with these hardware component emulations would be greatly appreciated.

Thanks in advance for any help you can provide!


r/Oberon • • Jul 19 '24

A brief interview with Pascal and Oberon creator Dr. Niklaus Wirth

Thumbnail
pldb.io
6 Upvotes

r/Oberon • • Jul 16 '21

The new Oberon+ programming language – modern simplicity

Thumbnail
oberon-lang.ch
7 Upvotes

r/Oberon • • Jan 21 '22

A lean cross-platform OS abstraction and GUI library for Oberon+

Thumbnail
github.com
10 Upvotes

r/Oberon • • May 27 '19

Project Oberon RISC5 CPU Emulator

Thumbnail pythonoberon.readthedocs.io
6 Upvotes

r/Oberon • • Jun 19 '24

Oberon-7 design considerations

5 Upvotes

Hi, I was curious why most programming languages (most of these popular enough so that I can be aware of them) have that "premature return" feature, where you can terminate the procedure (not a function) early on. For example, in Java:

void f() {
  if (true) return;
  System.out.println("quack");
}
...
f(); // does nothing because of that "premature return" (explicit procedure termination)

I was just sitting there thinking that this construct is kind of unnecessary, and the only language I found to not have (or, maybe rather "disallow") it was Oberon-7 (as I checked out, both Oberon-2 (1991), Oberon (1987), and other earlier languages from this "Wirth series" all had this "premature return" feature as well as "every other" high-level imperative programming language out there I am aware of...).

So, in Oberon-7, to rewrite Java's function above, you have to negate the condition, which is just fine (both examples are toyish, maybe I should apologize for that, but they both demonstrates these behaviors good enough):

PROCEDURE f();
BEGIN
  IF ~TRUE THEN
    Out.String("quack");
  END
END f;
...
f(); (* does nothing as well. But has no "premature return" option available! *)

So, are there any documents on this (and, perhaps, other) "improvements" (changes) in design (including the shift to explicit numeric conversion functions that I've read), or maybe there are some talks about it available that I am not aware of? I believe that the removal of this "premature return" was done for a reason, and I would like to know what it was... Does it has something to do with some philosophical/design aspects of "structured programming"? Thanks a lot!


r/Oberon • • Dec 31 '21

Reusing C libraries: The Oberon+ cross-platform FFI language

Thumbnail
github.com
5 Upvotes

r/Oberon • • Dec 17 '21

New Oberon+ to C99 transpiler for near native performance

Thumbnail
github.com
8 Upvotes

r/Oberon • • Nov 18 '22

A brief interview with Pascal and Oberon creator Dr. Niklaus Wirth

Thumbnail
pldb.com
9 Upvotes

r/Oberon • • Feb 02 '21

Transforming recursive Algorithms into iterative loops

Thumbnail e17i.github.io
4 Upvotes

r/Oberon • • Mar 18 '20

Announcing Oberon Commander and Connections

5 Upvotes

Hello.  This is probably the first real Oberon program I've written in years and the first I've publicly released in a couple of decades.  (I had contributed a System 3 Pacman clone years ago...but sadly the Oberon S3 software repository is defunct.  I've learned my lesson and I'm putting this on GitHub.)

Anyway, as an IT contractor I ran into the problem of needing to see which user computers were online so that they could be backed up.  We had several lists of machines and everyone was either just typing the address into the command Windows Explorer address bar and seeing what comes up with a DOS prompt or typing "PING HOST" at the command prompt.  I did write a Power Shell script to handle this using the Test-Connection command.  Power Shell is an awesome tool!  I watched some Microsoft instructional videos and noticed how the "Noun-Verb" nature of Power Shell is analogous to the "Module.Procedure" nature of Oberon commands.  I figured "It should be easy to write an Oberon command to do the same thing."  Well...easy is relative.  What I've run into over the years, dropping in and out of Oberon, is that some things aren't as easy as the could be and processing command arguments is one of them.  There are three different ways commands work.

Module.Procedure arg1 arg2...argn ~
Module.Procedure ^
Module.Procedure *

You have to first scan the parameters to see if you're getting the argument list following the command, from a selection or from a marked viewer.  Then you have to attach a scanner using the appropriate convention (different for each possibility), and THEN you scan your arguments.

So...I wrote Commander.Mod.  It handles all of this so all you have to do is init a scanner and start scanning.

Connections.Mod takes a list of hosts either following the command, from a marked viewer or a selection, and tests each one to see if its alive.  It can use a "quiet" mode that only shows the ones that are alive or a "verbose" mode that shows which ones are alive and which ones aren't.

ConnectionTask.Mod is exactly like Connections.Mod except it uses single process multitasking so it doesn't black the system while it's running.  It is a good and (in my opinion) easy to understand tutorial of how single process multitasking works.  Basically if you have a repeated task, remove the loop and let Oberon do the loop for you.  So:

  PROCEDURE ProcessItems(scanner : Commander.Scanner);
  BEGIN
    REPEAT
      Commander.ScanWhitespace(scanner);
      TestConnection(scanner.s);
    UNTIL Commander.AtEnd(scanner);
  END ProcessItems;

Becomes:

  PROCEDURE ProcessNextItem;
  BEGIN
    Commander.ScanWhitespace(scanner);
    TestConnection(scanner.s);
    IF Commander.AtEnd(scanner) THEN
      Oberon.Remove(scannertask);
      taskrunning := FALSE;
    ELSE
      scannertask.time := Input.Time() + Input.TimeUnit * 5;
    END;
  END ProcessNextItem;

I think Oberon could have a new lease on life as a portable system admin toolkit.  It's a small download that doesn't require "installation" which means it can be run without admin rights and loaded on even the smallest thumb drives.  (It actually fits on 3 floppy disks.)  Power Shell is powerful (no pun intended), but getting some of my fellow techs who are too young to remember DOS to navigate it has at times proven a little challenging.  And writing a GUI to do this would be overkill. A self explaining "tool" file that both includes the command and the documentation for how they work feels like a nice compromise.  

Also I wrote this with portability in mind.  While I have currently only tested this with Oberon V4, I am confident it could easily be ported to Oberon System 3 and even BlackBox Component Pascal.

Here's the github link:

https://github.com/jmdrake/oberoncommander/


r/Oberon • • Aug 29 '21

Oberon+ now also runs on ECMA-335 CLI (.Net) virtual machines

Thumbnail self.compilers
7 Upvotes