Ruby syntax – Shell power – Go binaries.
In a world of software aboundance, agents create your favorite languages.
Will they work? maybe.
Will it burn the planet? perhaps, in the meantime, we’ll have great companies.
Can we escape this? In a world currently dominated by software, unlikely.
In a future where code will be written by agents, do we even care about languages? maybe not.
Warning
In case it’s not clear enough, Rugo is an agent product, driven by Opus 4.6.
Treat it like a ☢️ experiment, totally subject to break.
Rugo stands on the shoulders of giants:
- Ruby (syntax, blocks)
- Go (compilation, structs)
- Crystal (spawn concurrency)
- V (try/or error handling)
- Zig (inline catch)
- Bash (shell fallback, pipes)
- BATS (test runner)
- Rust (inline tests alongside code).
- Elixir (Lambdas)
use "http"
# Fetch something from the web
body = http.get("https://httpbin.org/get")
puts body
# Shell commands just work
ls -la | head -5
# Functions
def greet(name)
puts "Hello, #{name}!"
end
greet "World"
# Lambdas — first-class functions
double = fn(x) x * 2 end
puts double(5) # 10
# for..in with string interpolation
scores = [90, 85, 72]
for score in scores
if score >= 90
puts "#{score} → A"
else
puts "#{score} → B"
end
end
# Hashes and compound assignment
counts = {}
words = ["hello", "world", "hello", "hello", "world"]
for word in words
if counts[word]
counts[word] += 1
else
counts[word] = 1
end
end
for k, v in counts
puts "#{k}: #{v}"
end
# Error handling
hostname = try `hostname` or "localhost"
puts "Running on #{hostname}"
# Raise errors from your own code
def connect(token)
if token == nil
raise "token is required"
end
end
result = try connect(nil) or err
puts "Error: " + err
end
# Concurrency with spawn
task = spawn http.get("https://httpbin.org/get")
puts task.value
# Parallel execution
results = parallel
http.get("https://httpbin.org/get")
http.get("https://httpbin.org/headers")
end
puts results[0]
puts results[1]
# Go stdlib bridge — call Go packages directly
import "math"
import "strconv"
puts math.sqrt(144.0) # 12
# Error handling with Go bridge
n = try strconv.atoi("not a number") or 0
puts n # 0
# Inline tests — ignored by rugo run, executed by rugo rats
use "test"
rats "math.sqrt returns correct value"
test.assert_eq(math.sqrt(144.0), 12.0)
end
go install github.com/rubiojr/rugo@latest
rugo script.rg # compile and run
rugo build script.rg # compile to native binary
rugo rats script.rg # run inline tests
rugo emit script.rg # print generated Go code