/r/Oberon

Photograph via snooOG

A subreddit for the Oberon language family.

/r/Oberon

317 Subscribers

5

Oberon-7 design considerations

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!

6 Comments
2024/06/19
17:56 UTC

3

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

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!

3 Comments
2024/03/10
10:04 UTC

4

Does the Native Oberon allow to create folders?

I created a lot of files and I felt it messed up which all files in one place. Could it possible to create any folder such as using Linux?

1 Comment
2022/12/21
09:10 UTC

7

Oberon+ IDE pre-compiled versions for Linux and Windows x64

Due to frequent requests, the following precompiled packages are now also available (download, unzip and run, no further installation required):

Windows (AMD64): http://software.rochus-keller.ch/OberonIDE_win64.zip

Linux x86_64: http://software.rochus-keller.ch/OberonIDE_linux_x86_64.tar.gz

Note that all language features of legacy Oberon and Oberon-2 are now supported, including access to outer local variables and parameters from nested procedures. New is also variable-length array (VLA) support; see here for a list of features: https://oberon-lang.github.io/2021/07/16/comparing-oberon+-with-oberon-2-and-07.html.

0 Comments
2022/04/24
21:09 UTC

7

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

0 Comments
2021/08/29
16:24 UTC

8

Oberon Compiler: Symbol Table Illustrations

Hi everyone,

I've prepared some illustrations on how the symbol table of the Oberon compiler actually looks like when objects (variables etc.) are being declared. I used the source code of Project Oberon for reference (with minor differences in the names of some record fields).

There are four images, the first one shows declaration of a variable, 2nd - a type, 3rd - a procedure, and 4th - an import of a module with an exported procedure. There are some very minor captions in Russian, but the whole illustration should be self-explanatory, and it's all in English / Oberon.

Here is the link to the images (please click on the four PNG files and download them, as they are rendered at 300% zoom):

https://github.com/kekcleader/oberon/tree/master/etc/docs/schemes

Some information on the project:

We are developing yet another crossplatform Oberon compiler. However, this one is intended to be compiled directly to machine code and possibly allow using multiple dialects (i. e. the new "Revised Oberon-2"). The work is still far from finish though. We also want to make it easier for people to dive in to the project and learn how the compiler works to give them the ability to participate in its development. For that, a book is being written (and later there will be a set of YouTube videos about Oberon and the compiler). The project also includes creating an IDE and a set of libraries, and possibly LLVM and C backends.

https://github.com/kekcleader/oberon

Scroll to the bottom of the README file for English text.

Arthur Yefimov

0 Comments
2020/04/23
20:41 UTC

5

Announcing Oberon Commander and Connections

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/

0 Comments
2020/03/18
17:00 UTC

5

XDS Modula-2/Oberon-2 compilers going open source (x-post from /r/ada)

2 Comments
2019/06/13
06:37 UTC

5

C meets Oberon?

Although this forum is not very active, readers might be interested in the Oberon-influenced programming language Odin.

It is designed with the intent of replacing C with the following goals:

  • simplicity
  • high performance
  • built for modern systems
  • joy of programming

What have been the major influences in the language’s design?

The language borrows heavily from (in order of philosophy and impact): Pascal, C, Go, Oberon.

Niklaus Wirth and Rob Pike have been the programming language design idols throughout this project.

4 Comments
2019/06/03
00:55 UTC

6

Best way to run Project Oberon (2013) on hardware?

I want to install the Project Oberon 2013 system on some hardware (i.e. an FPGA board, not emulated). Unfortunately the OberonStation site is now defunct. This site claims to be selling the same boards but I don't know whether it's a legitimate source (edit: I talked to the site owner and they're no longer selling any).

The only other possibilities I've found are (a) buying used from Ebay the retired Digilent Spartan-3 board, which seems to be the board Project Oberon was originally made to run on or (b) buying a Pepino LX9 Spartan-6 board, since apparently Saanlima has ported the system to the Spartan-6.

Are there any reasons, especially technical ones, to prefer the Spartan-3 board over the Spartan-6 board or vice versa? Are there any other options I missed that I should consider?

9 Comments
2018/12/25
01:27 UTC

3

Guide to the Oberon interface

I used to have a pdf somewhere that had a beautiful explanation of the (book version) Oberon user interface however I cannot remember the name and cannot find it again. It's not the same as the Using Oberon file from ETHZ (unless I'm truly daft, which is possible). It had a really nice explanation of how the columns work and stuff. That is, it was somewhat more comprehensive and a touch more tutorial oriented.

Does anyone know whether such a thing exists or am I just losing it? If it exists, does anyone know where I can find it?

2 Comments
2018/12/03
19:43 UTC

Back To Top