SlaveCode LogoSlaveCode.
Academy
RoadmapProblemsSystem Design
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
SlaveCode LogoSlaveCode.

Standardize your coding journey. From basic academy courses and guided roadmaps to advanced system design, company interview prep, and real-time coding arenas. The all-in-one platform to master algorithms and prove your engineering excellence.

Learn & Practice

  • Academy
  • Problems
  • Roadmap
  • System Design

Compete & Tools

  • Arena
  • Contests
  • Compilers

Legal & Support

  • Report an Issue
  • Privacy Policy
  • Terms of Service
  • Contact Us

© 2026 SlaveCode. All rights reserved.

Wren

Wren

Wren is a small, fast, class-based concurrent scripting language

Master Wren with
Interactive Learning

Elevate your Wren skills through 119 curated exercises across 0 core concepts. Master problem-solving with a structured learning path designed for modern developers.

Wren

About Wren

Wren is a small, fast, class-based concurrent scripting language. Think Smalltalk in a Lua-sized package with a dash of Erlang and wrapped up in a familiar, modern syntax.

  • Small. The VM is under 4,000 semicolons of readable and lovingly-commented C.

  • Fast. A smart, single-pass compiler produces tight, efficient bytecode.

  • Class-based. Classes and objects are front and center.

  • Concurrent. Lightweight fibers are built into the language.

  • Scripting. Embeddable, no dependencies, a small standard library, and an easy-to-use C API.

The VM

The heart of Wren is the VM. The Wren Virtual Machine is the core of the language and executes all Wren source code. It is just a library, not a standalone application. It’s designed to be embedded in a larger host application.

You can find Wren embedded in such projects as:

  • TIC-80 - a fantasy computer for making, playing and sharing tiny games (similar to PICO8).
  • DOME - a cross-platform framework for making games.
  • luxe - a cross-platform, rapid development game engine for making games.
  • Wren Console - a Wren REPL and CLI written largely in Wren itself.

You can even embed Wren inside your own projects. For Exercism purposes the host application we'll be using is Wren Console - allowing us to run and test our Wren scripts from the terminal.

Why Wren?

Wren was originally created by Bob Nystrom of Crafting Interpreters fame. He has more than a few languages under his belt, but he explains specifically what led to the creation of Wren:

There are a few scripting languages used for embedding in applications. Lua is the main one. TCL used to be. There’s also Guile, increasingly JavaScript, and some applications embed Python. I’m an ex-game developer, so when I think “scripting”, I tend to think “game scripting”.

Lua is nice: it’s small, simple, and fast. But—and I don’t mean this as a criticism—it’s also weird if you’re used to languages like C++ and Java. The syntax is different. The semantics, especially the object model are unusual. Anyone can get used to 1-based indexing, but things like metatables really show that objects were bolted onto Lua after the fact.

I think there’s room for a language as simple as Lua, but that feels natural to someone with an OOP background. Wren is my attempt at that.

Trying it

You can give it a quick try inside your web browser (without installing a thing). If you want to experiment with Wren wrapped up in a slick UI you might take a look at Wren Playground.

Key Features of Wren

Familiar

Wren uses a familiar, modern syntax familiar to many coming from JS or another C-like language.

Small

Wren's VM implementation is under 4,000 semicolons of readable and lovingly commented C code.

Fast

A single-pass compiler, tight byte-code, and compact objects keeps Wren fast on it's feet.

Concurrent

Lightweight fibers let you organize your program into a flock of communicating coroutines.

Embeddable

Easily embedded, no dependencies, a small standard lib, and easy-to-use C API.

Class-based

Many scripting languages lack (or have unusual) object models. Wren places classes front and center.

Track icon

Familiar

Wren uses a familiar, modern syntax familiar to many coming from JS or another C-like language.

Small

Wren's VM implementation is under 4,000 semicolons of readable and lovingly commented C code.

Fast

A single-pass compiler, tight byte-code, and compact objects keeps Wren fast on it's feet.

Concurrent

Lightweight fibers let you organize your program into a flock of communicating coroutines.

Embeddable

Easily embedded, no dependencies, a small standard lib, and easy-to-use C API.

Class-based

Many scripting languages lack (or have unusual) object models. Wren places classes front and center.

Dive into Wren practice challenges

Hello World
Hello World
Level 1

SlaveCode's classic introductory exercise. Just say "Hello, World!".

Leap
Leap
Level 1

Determine whether a given year is a leap year.

Two-Fer
Two-Fer
Level 1

Create a sentence of the form "One for X, one for me.".

Accumulate
Accumulate
Level 2

Implement the `accumulate` operation, which, given a collection and an operation to perform on each element of the collection, returns a new collection containing the result of applying that operation to each element of the input collection.

Armstrong Numbers
Armstrong Numbers
Level 2

Determine if a number is an Armstrong number.

Bank Account
Bank Account
Level 2

Simulate a bank account supporting opening/closing, withdraws, and deposits of money. Watch out for concurrent transactions!