Nockchain
Stay Updated
Nockchain is programmable
sound money that scales.

Introducing Jock: A Friendly Programming Language for the Nock Ecosystem

Today, the alpha release of Jock brings practical, Swift-like programming to Nock

We’re excited to share another milestone in our long-term vision for the NockApp ecosystem.

There is now an accessible programming language that compiles to Nock. We call it Jock.

Enthusiasm for Jock has been building since we first floated the idea back in 2023.

We shipped a developer preview in October, and since then we’ve made great progress.

Under the leadership of Neal Davis, former Computer Science faculty at the University of Illinois, Jock has grown from a rough idea to a reasonably robust alpha.

Jock is to Nockchain what Solidity is to Ethereum: It provides a familiar, high-level syntax for composing and evaluating Nock, lowering the barrier to entry for developers curious about the Nock ISA but hesitant about its alien aspects.

When Nockchain transitions from Dumbnet to Smartnet, we expect Jock will become the primary tool for writing provable software applications. 

Introducing Jock

Jock is a subject-oriented, statically-typed functional programming language. Its syntax takes inspiration from modern languages like Swift. This allows you to write clear, concise, and maintainable code that compiles to the minimal, verifiable Nock ISA.

Jock was built on a few core principles:

  • Subject-Oriented Execution: Every statement rewrites the running noun, which provides referential transparency and aligns perfectly with Nock's semantics.
  • Approachable Syntax: By modeling its syntax on popular, modern high-level languages, Jock flattens the learning curve for developers new to the Nock ecosystem.
  • Direct Nock Compilation: Jock compiles directly to raw Nock nouns with no hidden runtime, ensuring that your programs are as efficient and auditable as the underlying ISA.
  • Seamless Hoon Integration: Jock provides a foreign-function interface to the Hoon standard library, giving developers access to a rich set of existing tools and functions.

Limitations and Next Steps

This is an alpha release, and we want to be transparent about its current state. You should expect some rough edges; things will break, and some operations may be inefficient. The language currently lacks a type system, has little syntactic sugar, and lacks critical performance optimizations like caching.

However, the path to a feature-complete Jock is clear, and we're excited to build it in public. Any valid Nock executable will be provable on-chain, and Jock is being designed to be the premier language for generating that Nock.

Anyone planning to build applications on Nockchain should begin exploring Jock today.

Getting Started

Jock programs are built using hoonc, the NockApp compiler. Here’s how to run your first "Hello, World" program.

  1. Download and build hoonc, which is part of the Nockchain repository.
  2. In a separate directory, download the Jock language repository.
  3. Copy the hoonc executable from nockapp/target/release to the root of your jock-lang directory.
  4. Build jockc, the Jock compiler:
make jockc
cp ./target/release/jockc .
  1. Run the “Hello World” JockApp:
./jockc ./common/hoon/try/hello-world --import-dir ./common/hoon/jib

This will output the message “Hello World” along with logging details from the compilation process. You can examine the source code at /common/hoon/try/hello-world.jock. For a more detailed guide, check out the full documentation.

Open Source Contributions Welcome

  1. We encourage you to make contributions to the Jock language or its tooling. You can find the repositories at github.com/zorp-corp/jock-lang and github.com/sigilante/jojo.
  2. If you wish, send a direct message with a mailing address to @JockNockISA after your Pull Request is approved and merged.

Neal wants to mail a couple exclusive Jock stickers to the first 8 contributors of non-trivial improvements!

(What counts as non-trivial? Neal will be the judge, but we're looking for something more than a typo fix. For example, implementing caching to improve compilation speed, adding a useful new type like a Path, or building a solid JockApp demo would definitely count!)

Get Involved