Oberon examples

Recently I came across the site of Donald Daniel, an engineer who published an Oberon programming tutorial which contains some interesting sources in the process. Donald and I share an appreciation for Oberon and other Pascal derivatives. But we have different opinions when it comes to whitespace. So I reformatted five of Donalds sources. You be the judge. See the section called 'ReFormat'

What is Oberon?

Now, have you ever seen this? Probably not. And the picture is very bad. I had to downsize it to fit on the frame. So it doesn't look half as good as it does when running. But do yourself a favor and click on the picture to see the full snapshot (1024 x 768) of what the Oberon desktop looks like.


Now, wasn't that a beauty? And you get all of it for free! And for just about any platform there is an Oberon version. Windows, Mac, Linux, DOS, you name it and there is an Oberon desktop. Go check it out at the Oberon site and download the versions you require. The latest version of Native Oberon (the Alpha release) is stored on this site. In case the swiss loose it. Use the navigator, Luke!

The Oberon desktop.

The Oberon desktop is made up of two main parts:

  1. the left part is the user track in which your applications open, each in their own 'viewer'. What MS call a Window, Oberon calls a Viewer. Which is more logical anyway.
  2. the right part is the system track. In the current setup, it consists of the System.Log in which all system messages are printed. This viewer is auto scrolling and you can scroll back as far as needed.
    The second viewer is the System3.Tool and it is a huge interactive menu system. You can start just about any command with this Tool.
You can start any command from anywhere in the Oberon system. Suppose you want to run the command Partitions.Show and those letters happen to be in an E-mail from you to president Chirac of France, just point your mouse to the letters and middle click with your mouse. The command is executed.
If Mr Chirac didn't happen to mail you, you can also type the words you need in the System.Log or in the System3.Tool viewer.

Entering text.

If you want to enter some text in a viewer (perhaps to have it executed), just move the mouse cursor into the System.Log viewer and press the left key on the mouse. A pointy hat will be shown on screen and at that particular place, all tokens you choose will be inserted into the viewer.
On some Oberon systems, the arrow keys will move you through the text and on others you need the mouse to move the pointy hat.

Marking text.

Just put the pointy hat somewhere in a text area. Then press the right key on the mouse and drag the mouse over the text. An area will be painted in another colour than the rest of the text. You are now selecting text.
Read the Oberon tutorials to find out how to copy/paste/delete selected texts. The way Wirth and Gutknecht did this is novel and refreshing, to say the least. Only a true genius can think of something similar.

Some literature about Oberon.

There are books and articles about Oberon, but you have best chances on the web. Many of these files used to be (gzipped) postscript files. I downloaded them, unzipped the lot and converted the PS files into PDF. Then I stored them in private webspace. This way the files are easier to access for the world and they are saved from reorganisations. Please also visit the "Project Oberon 2014" section for more documents. The few books that are still available here and there are:

  1. 'Programming in Oberon, steps beyond Pascal and Modula' by Martin reiser and Niklaus Wirth. Check www.amazon.de for availabillity.
  2. 'Project Oberon: the design of an operating system' by Niklaus Wirth and Jurg Gutknecht is also a classic and it is still available from the ACM in New York for a reasonable price (at the current Euro exchange rate).
  3. Check out the Oberon website at http://www.oberon.ethz.ch and follow the related links.
Here is a collection of links to internet sites that have a lot of attention to Oberon related stuff. All links open in a new window. If you get a 404, just kill the window.

Report URL
Project Oberon ProjectOberon.pdf (private webspace)
Oberon with the Objective Oberon to C translator oo2c Programming a computer by Donald Daniel
Compiler Construction (Oberon-0 edition) CBEAll.pdf (private webspace)
Solutions for the problems presented in 'Programming in Oberon' by Martin Reiser ProgrammingInOberon.tar.gz (private webspace)
Programming in Oberon (2004)
A derivative of Programming in Modula-2
ProgInOberon.pdf (private webspace)
Publications of Professor Michael Franz (gone) http://www.ics.uci.edu/~franz/Site/publications.html
The Programming Language Oberon SA 285.pdf (private webspace)
The Oberon Compiler for the Strong-ARM Processor Oberon.ARM.Compiler.pdf (private webspace)
StrongARM compiler for Model Helicopter eth314.pdf
Software for Model Helicopter Flight Control eth316.pdf 284.pdf
Algorithms and datastructures
Oberon version, 1985
AD.pdf (private webspace)
Programming in Oberon
M. Reiser and N. Wirth
ProgInOberonWR.pdf (private webspace)
Mike Spivey's obc compiler http://spivey.oriel.ox.ac.uk/mike/obc/
Oberon systems http://www.ethoberon.ethz.ch/download.html
http://www-old.oberon.ethz.ch/download.html
An introduction to Oberon http://statlab.uni-heidelberg.de/projects/oberon/ItO/
Oberon, the overlooked jewel (gone) http://www.ics.uci.edu/~franz/Site/pubs-pdf/BC03.pdf
The Oberon system family
Brandis, Crelier, Franz and Templ
p_obesys.pdf
Code-Generation On-the-Fly: A Key to Portable Software (gone) http://www.ics.uci.edu/~franz/Site/pubs-pdf/DissETH10497.pdf
Differences between Oberon and Oberon-2
H. Mössenböck
Oberon2.Differences.pdf (private webspace)
The programming language Oberon-2
H. Mössenböck
Oberon2.Report.pdf (private webspace)
From Modula-2 to Oberon
Niklaus Wirth
ModToOberon.pdf (private webspace)
The programming language Oberon
Niklaus Wirth
OberonReport.pdf (private webspace)
Coco/R - A generator for fast compiler front-ends Coco.Report.pdf (private webspace)
A portable Oberon compiler OP2.Paper.pdf (private webspace)
Object Oberon: an object oriented extension of Oberon ftp://ftp.inf.ethz.ch/pub/publications/tech-reports/1xx/109.pdf
Or, in private space 109.pdf
Oberon-2, a high performance alternative to C++ http://www.modulaware.com/mdltws.htm
Modulator1.pdf (Bckup of webpage, just to be sure)
An object oriented database programming environment for Oberon JMLC97.js.pdf (private webspace)
Do the fish really need remote control? aobjects.pdf (private webspace)
Combining Oberon with active objects JMLC97.pdf (private webspace)
A run time debugger for Oberon: Report5.pdf (private webspace)
Process visualization with Oberon system 3 and gadgets TR-SE-94.15.pdf (private webspace)
The design of a distributed Oberon system (gone) http://www-vs.informatik.uni-ulm.de/Papers/DHS/JMLC7.html
A comparison of object-oriented programming in four modern languages CU-CS-641-93.pdf (private webspace)
Emulating an operating system on top of another mf1993a.pdf
The programming language Oberon http://www.mathematik.uni-ulm.de/oberon/reports/report-1992.html
Report1992.pdf (Backup of webpage, just to be sure)
Report of Ulm's oberon compiler http://www.mathematik.uni-ulm.de/oberon/0.5/articles/oc.report.html
RepUOC.pdf (backup of webpage, just to be sure)

An article about why Oberon was made

The text that follows was found accidentally when looking for something else at Google. The original text could be viewed at http://www.scmags.net/opinions/mh/200101mh.shtml . but now it's gone. (Something similar can be found here: http://www.guardian.co.uk/technology/2005/may/15/comment.microsoft .) For reasons of safety, however, I put the full text online on this page as well. So if the original publisher decides to make some space, the text will remain in this section. Which is exactly what happened.
I do not agree with the full text, but that might be caused by my admiration for Professor Wirth. But I decided to publish the unchanged article here.

We should all, by now, be familiar with Moore's Law: the rule that dictates how much faster and cheaper microprocessors will be each year.

Less familiar, perhaps, is a corollary that is most frequently known as Wirth's Law (a reference to Pascal programming language inventor Niklaus Wirth) but should more accurately be called Reiser's Law, after one-time Wirth collaborator Martin Reiser, the man who coined it.

I first came across this in the introduction to Project Oberon, a stupefyingly dull (but extremely worthy) 1992 book by Wirth and J�rg Gutknecht that detailed the building of Oberon, a compact workstation operating environment combining a programming language and some operating system functions. Project Oberon was designed to exemplify Einstein's dictum that everything should be made "as simple as possible - but no simpler".

A driving force behind this project was Reiser's assertion that "software gets slower more quickly than hardware gets faster", a simple statement that feels more and more like true wisdom the longer you think about it (an alternative version that's both more pithy and less profound is the hoary old "Intel giveth and Microsoft taketh away").

A decade ago I also lived in the French Riviera, and my main PC had a 16 MHz 80386SX microprocessor - hardly leading edge at a time when the first i486 chips were appearing, but respectable enough - with a hefty RAM allocation of 5 MB and a 100 MB hard disk (a recent upgrade from a 40 MB item). I ran Microsoft Word for Windows, sent and received Emails, and communicated with other computer users across the nascent Internet. From time to time I listened to CDs playing on my single-speed CD-ROM drive, via a Creative Labs Sound Blaster Pro and the amazing new Windows 3.0 with Multimedia Extensions 1 OS.

Today, my main computer has a pair of 500 MHz processors (again, not too impressive in the post-gigahertz era), 256 MB and 18 GB of RAM and disk respectively, and a DVD drive. I mostly use it for running Microsoft Word 2000, sending and receiving Emails, and communicating with other computers across the Internet. Occasionally, I use the DVD drive for playing music through my Sound Blaster (a Live!, these days), although I very rarely use it for watching DVDs - they belong in the living room, not in the office.

And for all these tasks, my current PC is - in most practical terms - slower than my old 386 was. It takes longer to boot up, and programs take longer to load. Since the effective performance of a word processor is limited more by the abilities of the person wanting words to be processed, the fact that I don't type any quicker these days means that Word 2000 shows no real performance gain over its ancestor. Equally, the Internet work is not noticeably faster.

OK, that's not quite true - the fact that I now use ISDN rather than a 14.4 Kbps US Robotics HST modem means that plain text Emails can be sent in somewhat fewer seconds than they were back then. However, the more interactive elements of telecommunications are, if anything, slower.

In 1991 I used a bunch of "conferencing" systems - CIX in the UK, BIX and CompuServe in the US, CalvaCOM in France. Most of these allowed you to read and compose messages offline (using a "reader" such as CompuServe's wonderfully user-hostile CIM), which meant you could page through hundreds of messages in a few seconds - loading each message merely required my tiny PC to access its local hard disk. Now - generally speaking - I have to use Web-based discussion boards. And these are, frankly, awful at doing a job that was done superbly by the old conferencing systems because they impose such a delay between the reading of one message and the next.

Of course, I can do a lot more with my powerful new(ish) computer than I could with the old one. I can render print-quality A4-sized Photoshop images, edit digital audio and video, play MP3 audio files and (if I happened to like them) 3D games. Most importantly, I can browse the Web - the real Web, I mean, not the bits that do a bad imitation of an old-school BBS.

But even that is getting slower more quickly than its supporting technology is getting faster. When I first started surfing back in the days of NCSA Mosaic, my 28 Kbps modem was downloading pages that mostly contained a couple of kilobytes of text. A typical page that I grab with my 64 Kbps ISDN connection today can easily contain 20 times as much data in the form of text, images and client-side scripting code - although it won't necessarily contain more actual information than the older style of page.

Apart from gamers (who are probably better off with a PlayStation 2), professional designers (who have always had high-end hardware anyway) or a few academics performing complex calculus and the like, computer users generally perform much the same tasks they did a decade ago. Why, with much "faster" systems available, do they take no less - or, worse, more - time to perform? Project Oberon was a technical success but failed to generate much enthusiasm outside a narrow sector of the academic world. Maybe it's time, however, to revisit its underlying principles.

I believe that business could benefit from demanding equipment that delivered real performance benefits (rather than those that appear in benchmarks), forcing hardware and software manufacturers, finally, to deliver on the promises of measurable productivity gains they have been making since time immemorial. If they can't deliver, then we should insist on Moore's Law being applied in a different way - not making hardware faster for a given price, but cheaper at a given performance point.

Then we just have the Herculean task of getting the software houses to deliver applications that break Reiser's Law and follow Einstein's advice: programs that are as simple as possible (although not, obviously, any simpler).

I liked the sentence by Martin Reiser (who was more than a one time contributor to Professor Wirth) about the software:

software gets slower more quickly than hardware gets faster

It has been the reason why I have remained programming in assembler for such a long time (until the introduction of the Pentium processor).

More to come...

But don't count on it!

Page created December 2004,

Page equipped with googleBuster technology