News for hackers. Stuff that matters.
Re:Compiler Construction by Niklaus Wirth [pdf] by ainar-g on Friday January 31, 2020 @04:07PM (#22205755)
Wirthian languages, and especially Oberon-07, are definitely a topic I want to familiarise myself with, but there is so little information about it on the Web, and even fewer codebases to learn from. And a lot of the compilers and tooling seems to be weirdly Windows-oriented. The questions I still have very little answers to are:

* How is error handling done in Oberon-07?

* How does one do generic programming in Oberon-07?

* What is Oberon-07's async story?

I will be thankful for any pointers (heh).

Re:Compiler Construction by Niklaus Wirth [pdf] by Rochus on Friday January 31, 2020 @05:23PM (#22206539)
Here (https://github.com/rochus-keller/Oberon) is a Qt/C++ based viewer/cross-referencer for Oberon-07 code bases as well as an Oberon to C++/Lua/LuaJIT bytecode transpiler/compiler; an IDE is work in progress.

> How is error handling done in Oberon-07?

There is an Oberon programming language with compiler written in Oberon, and there is an operating system called Oberon as well; you can have a look at the source code, but there are also a couple of free books about it, see http://www.projectoberon.com/

> How does one do generic programming in Oberon-07?

No support for generics yet; there was a proposal in the nineties, but Wirth didn't integrate it. Neither the Go language which is a brain child of Oberon-2 has generics (yet).

> What is Oberon-07's async story

Oberon is single threaded; there is a coroutine library part of the Oakwood standard. But nothing comparable e.g. to Go.

Re:Compiler Construction by Niklaus Wirth [pdf] by pjmlp on Friday January 31, 2020 @05:21PM (#22206524)
Error handling is done the old style, you just test for error conditions and such.

Generic programming and async are supported on the Active Oberon programming language in the Oberon family branch. Which also does support exception handling.

Most recent version from Active Oberon

http://cas.inf.ethz.ch/news/2

The A2 OS written in Active Oberon and respective documentation

https://github.com/btreut/a2

Some A2 overview

http://sage.com.ua/en.shtml?e1l0

While Modula-2 had co-routines and exceptions, Wirth has chosen a minimalist path with Oberon.

Oberon-07 design goal has been to remove as many features as possible from original Oberon, while keeping a GC enabled systems programming language.

Then you have the other path, taken by others at ETHZ, which extended Oberon into a more expressive language, namely Oberon-2, Component Pascal and Active Oberon.

With Active Oberon being what is actually still used at ETHZ for teaching some OS classes and OS research subject.

Re:Compiler Construction by Niklaus Wirth [pdf] by lboasso on Friday January 31, 2020 @09:24PM (#22208150)
> And a lot of the compilers and tooling seems to be weirdly Windows-oriented

When I read this book I had an hard time running and compiling the source code included. If you want to read the book and try out the example compiler (oberon0), you can follow the instructions here: https://github.com/lboasso/oberon0. You just need a JVM >= 8 and the oberonc compiler: https://github.com/lboasso/oberonc