Welcome to XCODX Online Compiler
Quick Start:
Ctrl+Enter Run code
Ctrl+S Save / Download
Ctrl+L Clear output
Select a language and start coding.
Welcome to XCODX Online Compiler
Quick Start:
Ctrl+Enter Run code
Ctrl+S Save / Download
Ctrl+L Clear output
Select a language and start coding.
Pony is an actor-model language with a type system that mathematically rules out data races: its reference capabilities tell the compiler exactly which code can read or write each object, so concurrent programs that compile are free of races by construction, with no locks and no stop-the-world garbage collection pauses. Designed by Sylvan Clebsch and developed openly since 2015, Pony found early adopters in low-latency stream processing, notably Wallaroo Labs' data platform. It compiles through LLVM to fast native code. The language is niche but intellectually rich, and this page removes the setup cost entirely: your Pony program compiles and runs in a live terminal with output from every actor streaming as it executes.
actor Counter
let _env: Env
let _name: String
new create(env: Env, name: String) =>
_env = env
_name = name
be count_to(limit: U32) =>
var i: U32 = 1
while i <= limit do
_env.out.print(_name + " says " + i.string())
i = i + 1
end
actor Main
new create(env: Env) =>
env.out.print("Actors starting...")
let a = Counter(env, "alpha")
let b = Counter(env, "beta")
a.count_to(3)
b.count_to(3)
Pony's natural audience is developers studying concurrency theory: its reference capabilities (iso, val, ref, and friends) are the most complete industrial implementation of capability-based race prevention, making it a common case study in graduate PL seminars alongside Rust's borrow checker. Engineers building low-latency financial or streaming systems evaluate it for lock-free actor pipelines, following Wallaroo's example. It also serves language designers mining ideas, and Rust programmers who want to compare how two different type systems achieve data-race freedom test equivalent snippets here.
Yes, though Pony makes it deliberately explicit: stdin is accessed through env.input by registering an InputNotify object whose apply method receives data asynchronously as you type into the live terminal. There is no blocking read-line call, because blocking would violate the actor model; input arrives as messages, like everything else in Pony.
If it compiles, it is free of data races: reference capabilities ensure no two actors can simultaneously hold mutable access to the same object. Pony is also exception-safe in the sense that behaviors cannot crash the whole program with unhandled errors. It does not prevent logical race conditions like message-ordering assumptions, only memory-level races.
Programs are built with ponyc, the reference LLVM-based compiler, as a single-file compilation that automatically includes the built-in standard library packages you import, such as collections and time. The corral package manager and third-party dependencies are not available in the sandbox, but standard library coverage is sufficient for actor experiments and algorithm work.
main.ponyplain text — no highlighter ships for this languageno standard input constructactor Main
new create(env: Env) =>
env.out.print("Hello from Pony!")
env.out.print("Welcome to XCODX Online Compiler!")
The Pony compiler streams each build phase to stdout with no redirection. Those lines are filtered out of the output pane so only your program prints.