Showcase
Real applications built with Wyn — proving the "1 language for everything" claim.
wyn-grep — File Search Tool
Fast recursive file search with regex patterns and colored output. ~90 lines of Wyn.
wyn
fn grep_file(path: string, pattern: string, show_ln: int) {
var content = File.read(path)
var line_num = 0
for i in 0..content.len() {
if content[i] == "\n" {
var line = content.substring(line_start, i)
line_num = line_num + 1
if Regex.match(line, pattern) {
println(path + ":" ${line_num} + ":" + line)
}
}
}
}bash
$ wyn-grep "spawn" sample-apps -n
sample-apps/web/server/main.wyn:123: spawn handle_request(...)
sample-apps/sysadmin/portscanner/main.wyn:54: spawn scan_port(...)Web Server — Zero Dependencies
A full web server with routing, templates, SQLite, and concurrent request handling. No npm install. No pip install. Just wyn run server.wyn.
wyn
fn main() {
Web.get("/", 1)
Web.post("/api/users", 2)
Web.templates("templates")
var db = Db.open("app.db")
var server = Http.serve(8080)
while true {
var req = Http.accept(server)
spawn handle(req, db) // concurrent
}
}Snake — Terminal Game
Playable Snake game in the terminal. Random food placement, collision detection, score tracking. ~110 lines.
Port Scanner — Concurrent I/O
Scans 11 ports concurrently using spawn. Finishes in ~1 second instead of ~11.
wyn
for i in 0..11 {
spawn scan_port(host, ports[i], results, i)
}System Monitor — sysmon
Full terminal dashboard with CPU, memory, disk, and process monitoring. Real-time updates with keyboard navigation.
All source code is in the sample-apps directory.