EXPERIMENTAL PROTOTYPE

What OO did for programming,
RO does for ML.

RO-Lang is a Representation-Oriented language. It treats data and representations as core objects that you manipulate mathematically. Stop wiring neural networks by hand; let the compiler build the graph.

See How it Works Read the Manifesto

A New Way to Think

Move from explicit instructions to continuous spaces.

Object-Oriented (Legacy)

  • int + int = int (Standard math)
  • word + word = word (Dumb concatenation: "hello" + "world" = "helloworld")
  • image + image = ? (Crashes)

Representation-Oriented

  • int + int = int (Embeddings map to numeric concepts)
  • word + word = word (Semantic math: King - Man + Woman = Queen)
  • image + image = image (Semantic overlay: Person + Glasses = Person w/ Glasses)

Functions are Networks.

In RO-Lang, you don't write logic for complex tasks. You define the signature and provide the data.

Under the hood, RO-Lang spins up a multi-headed PyTorch FeedForwardNet, dynamically generating VAEs (Variational Autoencoders), categorical heads, and continuous embedding spaces tailored exactly to your types.

  • → All types (`RInt`, `RString`, `RChar`) are embeddings.
  • → Unsupervised clustering happens implicitly.
  • → Caching is automatic.
from rolang.decorators import learnable
from rolang.rtypes import RInt, RString

# 1. Define the interface and data
@learnable(train_epochs=32, data=fizzbuzz_dataset)
def fizzbuzz(i: RInt) -> Union[RInt, RString]:
    pass # The compiler writes the rest!

# 2. Under the hood: 
# RO-Lang dynamically generates a PyTorch
# graph with RInt inputs, and Union-compatible 
# categorical/embedding output heads.

# 3. Execution runs the forward pass:
result = fizzbuzz(RInt(15))
print(result) # RString("fizzbuzz")