Implementations

We use a C implementation for our Nock interpreter. But building a Nock interpreter in another language is a fun exercise. Check out our community Nock implementations, shown below our official C implementation. (Note: the community implementations were written for a slightly older version of Nock, Nock 5K. The current version is Nock 4K.):

Table of Contents

C Implementation

The actual production Nock interpreter. Note gotos for tail-call elimination, and manual reference counting. More about the C environment can be found in the runtime system documentation.

Clojure

From Matt Earnshaw:

C#

From Julien Beasley:

Groovy

From Kohányi Róbert:

Haskell

From Steve Dee:

Hoon

JavaScript

From Joe Bryan:

Python

From James Tauber:

Ruby

From T.J. Corcoran:

Rust

From Peter McEvoy:

Scala

From Steve Randy Waldman:

Scheme

From Kohányi Róbert:

Swift

Last updated