A modern programming language with Ruby-like syntax
Multi-paradigm, interpreted and compiled. OOP + functional with elegant syntax, pattern matching, metaprogramming, and 5 execution backends.
# Classes with inheritance
class Animal
def initialize(name, sound)
@name = name
@sound = sound
end
def speak
puts "#{@name} says #{@sound}!"
end
end
class Dog < Animal
def initialize(name)
super(name, "Woof")
end
end
rex = Dog.new("Rex")
rex.speak # Rex says Woof!
Designed for developer happiness with powerful capabilities
OOP with classes, inheritance, mixins, and traits. Functional with lambdas, closures, curry, and pipelines. Use whatever fits best.
Clean, expressive syntax inspired by Ruby. Blocks, string interpolation, ranges, postfix conditionals, and everything you love.
Tree-walking interpreter, bytecode VM, native AOT compiler, JavaScript transpiler, and WebAssembly. Run anywhere.
HTTP server, JSON, TOML, crypto, database, file I/O, networking, async/await, actors, fibers, and much more built-in.
REPL, debugger, formatter, linter, LSP server, and package manager. Everything you need for a productive workflow.
Convert existing Ruby, Python, and Crystal code to Koder automatically. Migrate your projects with minimal effort.
Syntax highlighting, code completion, diagnostics, formatting, and go-to-definition. First-class editor support.
Comprehensive test suite across lexer, parser, interpreter, and stdlib. Rock-solid reliability with continuous testing.
Explore the language through real code examples
# Hello World
puts "Hello, Koder!"
# Variables and string interpolation
name = "World"
puts "Hello, #{name}!"
# Classes with attr_accessor
class Person
attr_accessor :name, :age
def initialize(name, age)
@name = name
@age = age
end
def greet
"Hi, I'm #{@name}, age #{@age}"
end
end
alice = Person.new("Alice", 30)
puts alice.greet # Hi, I'm Alice, age 30
# Lambdas
double = -> (x) { x * 2 }
puts double.call(21) # 42
# Pipeline (method chaining)
result = (1..20).to_a
.select { |n| n.odd? }
.map { |n| n ** 2 }
.reject { |n| n > 100 }
.reduce(0) { |sum, n| sum + n }
# Curry
add = -> (a, b) { a + b }
add5 = add.curry.call(5)
puts add5.call(3) # 8
puts add5.call(10) # 15
# Higher-order functions
def compose(f, g)
-> (x) { f.call(g.call(x)) }
end
increment = -> (n) { n + 1 }
add1_then_double = compose(double, increment)
puts add1_then_double.call(5) # 12
# Blocks and yield
def repeat(n)
i = 0
while i < n
yield(i)
i += 1
end
end
repeat(3) do |i|
puts "iteration #{i}"
end
# Value matching with case/in
status = 200
case status
in 200
puts "OK"
in 404
puts "Not Found"
in 500
puts "Server Error"
end
# Array destructuring
point = [10, 20]
case point
in [x, y]
puts "x=#{x}, y=#{y}"
end
# Guards
score = 85
case score
in n if n >= 90
puts "A"
in n if n >= 80
puts "B"
in n if n >= 70
puts "C"
else
puts "F"
end
# Hash patterns
config = {host: "localhost", port: 8080}
case config
in {host: h, port: p}
puts "#{h}:#{p}"
end
# Type matching
case 42
in Integer
puts "It's an integer"
in String
puts "It's a string"
end
# method_missing — dynamic dispatch
class Ghost
def method_missing(name, *args)
"Ghost: #{name} called with #{args}"
end
end
g = Ghost.new
puts g.hello("world")
# Ghost: hello called with ["world"]
# Dynamic proxy pattern
class LoggingProxy
def initialize(target)
@target = target
end
def method_missing(name, *args)
puts "[LOG] Calling #{name}"
@target.send(name)
end
end
# send — dynamic method invocation
class Calculator
def add(a, b) = a + b
def sub(a, b) = a - b
end
calc = Calculator.new
method = "add"
puts calc.send(method, 10, 5) # 15
# respond_to? & instance_variables
puts calc.respond_to?("add") # true
puts calc.respond_to?("fly") # false
# HTTP Server with routing
app = HTTP::Server.new
app.get "/" do |req, res|
res.html "<h1>Welcome to Koder!</h1>"
end
# JSON API endpoint
app.get "/api/hello" do |req, res|
res.json "{\"message\": \"Hello!\"}"
end
# Dynamic path parameters
app.get "/greet/:name" do |req, res|
name = req[:params]["name"]
res.html "<h1>Hello, #{name}!</h1>"
end
# POST with body
app.post "/api/echo" do |req, res|
res.json req[:body]
end
# Custom status
app.get "/teapot" do |req, res|
res.status 418
res.text "I'm a teapot"
end
puts "Listening on http://localhost:8080"
app.listen 8080
Get Koder up and running in seconds
# Clone and build
$ git clone https://flow.koder.dev/koder/koder-lang.git
$ cd koder-lang
$ cargo build --release
# Install
$ cp target/release/koder /usr/local/bin/
# Run a file
$ koder run hello.kd
# Interactive REPL
$ koder repl
# Parse and inspect AST
$ koder parse hello.kd
# Lex and show tokens
$ koder lex hello.kd
Everything you need to learn and master Koder
Install Koder and write your first program in minutes.
Complete syntax reference, types, operators, and control flow.
30+ built-in modules: HTTP, JSON, crypto, database, async, and more.
Track all releases, new features, and breaking changes.
Source code, issues, and contributions on Koder Flow.
50+ example programs covering all language features.