Hadron: A JIT-compiled vision of sclang

Discussion & early remarks regarding Hadron

The project recently unveiled in SuperCollider 4: First Thoughts - #159 by lnihlen

From it’s repository on github:

Hadron is a re-implementation of the SuperCollider language interpreter, designed to Just-In-Time (JIT) compile SuperCollider code into machine code instructions.

Hadron compiles blocks of SuperCollider code into machine code for execution directly on the host microprocessor. Balancing against compilation speed, it makes a best effort to pack local variables into processor registers, and to deduce types of variables to “narrow down” the possible types of values to inline and optimize code at compile time as much as can be done on a dynamically-typed programming language.

Having a faster language interpreter opens up several other possibilities for SC development that are potentially exciting.


Looks very exciting !

There’s a directory in the main branch containing several placeholders for sc class files:

  • AbstractFunction
  • Class
  • Function
  • FunctionDef
  • Interpreter
  • Method
  • Object
  • Process

… a class list that is very close to the root definition of sclang.

It seems there are three levels to the sclang kernel…each level including all classes from the previous level:

  • Classes defined in Kernel.sc
  • Classes referenced under Core > Kernel
  • Classes referenced dunder Core