Show HN: Micron – The Oberon with the Power of C github.com · 4 points · 6 comme...

@show

Show HN: Micron – The Oberon with the Power of C github.com · 4 points · 6 comments · HN thread

TL;DR Rochus Keller announces Micron, a systems programming language styled as a 'MicroOberon' with C-like reach: it has language levels 0 to 5, calls C directly, and offers compile-time procedures and generics instead of a preprocessor. The GitHub project provides a compiler, interpreter, IDE, a free textbook, and a port of Project Oberon that boots on an emulated RISC-V machine. The Show HN post drew 4 points and 6 comments, mostly praise and pointers to examples.

  • Micron is a systems language with Oberon-like syntax and modularization that aims to replace C for boot code, drivers, kernels and applications.
  • Language levels 0 to 5 restrict what a module may use (no stack at level 0, stack and recursion at level 1, heap and exceptions at level 3, type extension at level 4, garbage collection at level 5), and modules may only import from the same or lower levels.
  • It calls C without wrappers and replaces the preprocessor with compile-time execution, generic modules, and inlining.
  • The project claims about 130 kSLOC of working Micron code, including a Smalltalk-80 implementation, the original P4 Pascal compiler, the Scheme 9 VM, and a migrated Project Oberon System.
  • The compiler and interpreter are said to match the specification; the C transpiler and native backends are still in development, and the current backends are mostly stack-based.
  • Micron is GPL 2 or 3 licensed, with the runtime and oakwood libraries under MPL or LGPL, and it builds with LeanQt and the BUSY build system.

Discussion The thread is short and friendly. Most comments are congratulations and interest in trying the language. The author answers questions about the examples, the Rosetta-style benchmark comparison, and the earlier Oberon-family work (ActiveOberon and AOS/Bluebottle) that he found harder to migrate than the Oberon System.

  • Enthusiastic about the examples and the Oberon-inspired design (most): Commenters praise the range of migrated projects, such as the Smalltalk-80 implementation and the Pascal compiler, as proof the language is serious. One commenter says they have long been drawn to Oberon through a Pascal and Delphi background and plans to try Micron.
  • Would like it on Rosetta Code or benchmark sites (some): One commenter suggests adding a good set of examples to Rosetta Code. The author points to his own are-we-fast-yet benchmark repository, which contains the same suite in four styles.
  • Micron as a way to replace assembly and C in low-level code (a few): The author explains that Micron is meant to replace assembler even at the lowest level where no stack exists, using language levels and full type checking. He says this was the goal that made migrating a multiboot system harder in ActiveOberon.

Links from the comments

#programmingLanguages #oberon #compilers #systemsProgramming #retroComputing