37 points Rochus 3 days ago 10 comments
Micron is not my first langage design. I first built Oberon+, a modernized and unified Oberon, in order to under stand, by implementing it and by porting real systems to it, what Wirth’s design actually gives and where it fails. The systems ported to Oberon+ included the 2013 Project Oberon System and different versions of Oberon System 3. I then explored the opposite direction with Luon, a higher-level language for managed application progamming. Micron is the synthesis of this and my 30 years experience with C/C++ in systems programming.
The goal of Micron is to use the same language for boot code, device drivers, an operating system kernel, and ordinary applications, without requiring a garbage collector or routing machine access through a separate, unchecked system dialect (such as Oberon's SYSTEM.ADR/GET/PUT which operates on LONGINT). The language supports explicit memory layouts, signed and unsigned integer types, pointer operations, and direct calls to C without wrappers. One of its central design choices is language levels. Each module declars the level and thus the feature it needs, ranging from code that requires neither stack nor heap to garbage-collected objects. A module can import only modules at the same or a lower level. For example, a kernel module declared at level 1 cannot accidentally acquire a dependency on heap allocation through an import. Other features include generic modules, structural interfaces, and compile-time procedures. Much of what would require a preprocessor in C is expressed through typed language features.
There is a working compiler, interpreter, and IDE, along with a free textbook (http://software.rochus-keller.ch/micron-textbook.pdf). The book explains both how the language works and the reasons behind its design. Its systems-programming section walks through a port of Wirth and Gutknecht’s Project Oberon operating system to Micron, cross-compiled and linked into a single executabl that runs on an emulated RISC-V machine.
The examples also include ports of a Smalltalk-80 VM, Scheme 9, and the original P4 Pascal compiler. The compiler and interpreter implement the language specification; native backends and tooling are still work in progress, and the current native code generation prioritises simplicity over optimisation.
For more information see https://github.com/rochus-keller/Micron/blob/master/Readme.m....
andsoitis 3 days ago | parent
I've always been super interested in Oberon (due to my Pascal / Object Pascal / Delphi heritage) and even tried things like A2 (https://en.wikipedia.org/wiki/A2_(operating_system)) but never fully got into the boat.
Micron makes me excited to try your latest incarnation.
Rochus 3 days ago | parent
andsoitis 3 days ago | parent
The examples subdirectory (https://github.com/rochus-keller/Micron/tree/master/examples) contains:
- a Smalltalk-80 implementation,
- the original 1976 P4 Pascal compiler,
- the Scheme 9 virtual machine,
- the Project Oberon System running on the host,
- and the Micron System described in the textbook, the migrated Project Oberon System natively running on RISC-V.*Rochus 3 days ago | parent
berkeleynerd 3 days ago | parent
Rochus 3 days ago | parent
HexDecOctBin 2 hours ago | parent
Rochus 2 hours ago | parent
jsrcout 46 minutes ago | parent
chasil 14 minutes ago | parent
Seymour Cray also designed the CDC 6600, which had a much more immediate impact on IBM et al.