← All projects
Project record1 mention
Originally shared on Hacker News

Micron

Micron ("MicroOberon") is a lean, statically typed, modular systems programming language that combines Oberon's simplicity and explicit module structure with C's low-level capabilities and interoperability. It is designed to use one language for boot code, device drivers, an OS kernel, and ordinary applications without requiring a garbage collector, with explicit memory layouts, language levels (from code needing neither stack nor heap to garbage-collected objects), generic modules, structural interfaces, and compile-time procedures. It is not memory-safe like Rust or Go but is safer than C, with explicit unsafe parts and an optional GC at level 5. A working compiler (micc, with x86, ARMv7, and RV32 native backends plus a C99 transpiler), interpreter, and IDE exist, along with a free textbook; examples include a Project Oberon OS port running on an emulated RISC-V machine, a Smalltalk-80 VM, Scheme 9, and the original P4 Pascal compiler.

Last shared
01 / The problem

What it addresses

Low-level systems work typically requires a garbage collector or routing machine access through a separate, unchecked system dialect, preventing one language from covering boot code, device drivers, an OS kernel, and ordinary applications.

02 / Source history

Shared over time

Each entry reflects what was shared on that date. Details may have changed since then.

  1. Micron

    Micron ("MicroOberon") is a lean, statically typed, modular systems programming language that combines Oberon's simplicity and explicit module structure with C's low-level capabilities and interoperability. It is designed to use one language for boot code, device drivers, an OS kernel, and ordinary applications without requiring a garbage collector, with explicit memory layouts, language levels (from code needing neither stack nor heap to garbage-collected objects), generic modules, structural interfaces, and compile-time procedures. It is not memory-safe like Rust or Go but is safer than C, with explicit unsafe parts and an optional GC at level 5. A working compiler (micc, with x86, ARMv7, and RV32 native backends plus a C99 transpiler), interpreter, and IDE exist, along with a free textbook; examples include a Project Oberon OS port running on an emulated RISC-V machine, a Smalltalk-80 VM, Scheme 9, and the original P4 Pascal compiler.

    Problem: Low-level systems work typically requires a garbage collector or routing machine access through a separate, unchecked system dialect, preventing one language from covering boot code, device drivers, an OS kernel, and ordinary applications.

    Posted by @Rochus · Original source ↗

    Story title · @Rochus · · Source ↗

    Show HN: Micron – Oberon with the Power of C

    Submitted URL · @Rochus · · Source ↗

    https://github.com/rochus-keller/Micron

    Source text · @Rochus · · Source ↗

    https://github.com/rochus-keller/Micron/blob/master/Readme.md

    Source text · @Rochus · · Source ↗

    http://software.rochus-keller.ch/micron-textbook.pdf

    Source text · @Rochus · · Source ↗

    I have been developing Micron (for "MicroOberon"), a lean, statically typed, modular systems programming language that combines Oberon’s simplicity and explicit module structure with C’s low-level capabilities and interoperability.

    Source text · @Rochus · · Source ↗

    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

    Source text · @Rochus · · Source ↗

    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.

    Source text · @Rochus · · Source ↗

    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.

    Source text · @Rochus · · Source ↗

    There is a working compiler, interpreter, and IDE, along with a free textbook

    Source text · @Rochus · · Source ↗

    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.

    Source text · @Rochus · · Source ↗

    The examples also include ports of a Smalltalk-80 VM, Scheme 9, and the original P4 Pascal compiler.

    Source text · @Rochus · · Source ↗

    Micron is not memory-safe in the sense of Rust, Go or Java, but it is considerably safer than C, and the unsafe parts are explicit and easy to find. It is first and foremost a systems programming language. An optional GC is available at level 5 of the language.

    Source text · @Rochus · · Source ↗

    The current micc has three native backends (x86, ARMv7, RV32) and a C99 transpiler.