A tribute to Dan Ingalls

Harding Smalltalk

A modern Smalltalk dialect that compiles to native code. File-based, git-friendly, and designed for modern tooling.

example.hrd
# Define a Point class with x and y slots
Point := Object derive: #(x y)

# Add methods using the >> syntax
Point extend: [
    self >> moveBy: dx and: dy [
        x := x + dx
        y := y + dy
        ^ self
    ]

    self >> distanceFromOrigin [
        ^ ((x * x) + (y * y)) sqrt
    ]
]

# Create and use a Point
p := Point new
p x: 100 y: 200
p distanceFromOrigin println
Scroll to explore

Smalltalk's wisdom, modern tooling.

Pure Smalltalk

Message passing, late binding, everything is an object. The essence of Smalltalk preserved.

Native Compilation (future)

Compiles to Nim -> C -> machine code.
Fast, efficient, no VM required.

File-Based & Git-Friendly

No image files. Source code lives in .hrd files you can version control and diff.

Multiple Inheritance

Full support for multiple inheritance with conflict detection. Compose behaviors.

Green Threads

Cooperative multitasking with first-class Process objects. Built-in scheduler.

Nim Interop

Call Nim code directly. Access the entire Nim ecosystem and C libraries.

What you need to know.

Feels Familiar

  • Message syntax: unary obj size, binary 3 + 4, keyword at:put:
  • Cascade messages with ;
  • Blocks are proper closures with non-local returns
  • Everything is an object
  • Collection messages: do:, select:, collect:

What's Different

Smalltalk Harding
Period required Optional - newline works
Double quotes for comments Hash # for comments
Single quotes for strings Double quotes for strings
Image-based File-based, git-friendly

Install Harding Smalltalk.

Build from Source

git clone https://github.com/gokr/harding.git
cd harding
nimble local

Requires Nim 2.2.6+

Quick Start

harding                    # Start REPL
harding script.hrd       # Run a script
harding -e "3 + 4"       # Evaluate

Use --loglevel DEBUG for verbose output.