Introduction to Jock

Jock is a subject-oriented statically-typed functional programming language which compiles to Nock. Jock's syntax is inspired by high-level languages like Swift and Python. It inherits many conventions from the Hoon language and the underlying Nock instruction set architecture, and its reference parser and compiler are written in Hoon.

Jock is developed by Zorp Corp and is an alpha product release as of June 26, 2025.

Here are some short programs in Jock:

// Demonstrate a conditional statement.
let a: @ = 3;

if a == 3 {
  42
} else if a == 5 {
  17
} else {
  15
}
// Create a decrement function.
func dec(a:@) -> @ {
  // A crash will occur on input 0.
  a - 1
};

dec(43)
// Create a decrement function, the long way around.
func dec(a:@) -> @ {
  let b = 0;
  loop;
  if a == +(b) {
    b
  } else {
    b = +(b);
    recur
  }
};

dec(43)
// Demonstrate a loop.
let a: @ = 43;
let b: @ = 0;
loop;
if a == +(b) {
  b
} else {
  b = +(b);
  recur
}

Alpha Features

Jock is in active development. Any version of Jock can produce valid Nock nouns for execution on any Nock platform. Syntax is expected to evolve as language features develop.

At this stage, Jock can support numeric and string types, lists and sets as containers, function and object definitions, control flow, access to the Hoon standard library, Hoon library imports, and a few other common features.

The alpha version does not have complete support for some desirable features like list indexing, operator overloading, native map (dict) type, Jock library imports, Hoon-style gate-building gates, traits, crash handling, and more sophisticated CLI argument processing. These are on the roadmap for a future update.

We welcome feedback on syntax and features; both are relatively easy to modify for developer convenience at this early stage in Jock's history.

Versions

Last updated