8000 GitHub - cjrcoding/rvrs-lang: A minimal, ceremonial language that flows into Cardano. Smart contracts written in your voice.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

cjrcoding/rvrs-lang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RVRS Logo

🌊 Rivers (RVRS)

RVRS Version Badge

“Not all contracts are code. Some are rivers.”

RVRS is an experimental smart contract language for Cardano.
It treats code as ritual. Every contract is a flow: deliberate, symbolic, and evolving.

RVRS is written in Haskell, fully custom, and compiles to an Intermediate Representation (IR) designed for Aiken.
It is still forming. Still flowing.


✨ The Core 6

These elemental constructs shape every ritual:

  • flow: A container of purpose and invocation
  • source: A declaration of origin, a variable spring
  • delta: A transformation, a shift in state
  • branch: A decision point — a fork in the current
  • mouth: A voice — the moment the contract speaks
  • echo: A return, the final reflection

These are the riverbed. The rest flows from here.


✅ Built So Far (v0.9.0-alpha)

RVRS now supports typed declarations, scoped evaluation, branching, flow composition, and evaluation tracing.

🌐 Language Features

  • ✅ Core 6 syntax and flow-based semantics
  • ✅ Expression parsing + arithmetic and logic ops
  • ✅ Flow-to-flow calls with argument passing
  • ✅ Typed delta and source declarations (delta x: Num = 5)
  • ✅ Scoped variables, shadowing, and purity by default
  • ✅ Echo-based return system and optional mouth tracing
  • ✅ Multi-flow files, main entrypoint, and standard rituals

⚙️ Runtime + Infra

  • ✅ AST → IR lowering pipeline
  • ✅ IR evaluator with scoped flows and error tracking
  • ✅ Static typechecking of expressions and declarations
  • ✅ Source, IR, and typecheck test runners:
    • RunAll: full test suite
    • RunIRTests: IR-level tests
    • TestTypeCheck: type inference and type error tests
  • ✅ Standard library merging via stdlib.rvrs
  • ✅ Developer docs, guides, and module maps

🧪 Sample Flow

flow giveDiscount {
  return 0.1
}

flow computeTotal {
  source base = 100
  delta discount = call giveDiscount
  source total = base - (base * discount)
  mouth "start"
  echo total
}
mouth: start  
echo: 90.0

🔁 Why Aiken First?

RVRS is designed to compile into Aiken, Cardano’s strongly typed smart contract language.

  • Structured Output: Aiken gives RVRS a clear, functional target
  • Faster Dev: Easier than writing directly in Plutus Core
  • Type Safety: Aiken’s type system complements RVRS
  • Ecosystem Fit: Great dev tools and growing Cardano community

📂 See examples/transpilation for sample flows and Aiken targets.


🔮 What’s Flowing Next

  • Full expression-level type enforcement
  • Type-safe flow argument validation
  • Return type inference and enforcement
  • Traceable error logs and assertion flows
  • REPL mode for interactive rituals
  • Aiken backend integration

📖 Documentation


🎨 Philosophy

RVRS is a language of calm. A language of meaning.

  • Symbolism over syntax
  • Readability as ritual
  • Clear evaluation and flow
  • Inspired by rivers, nature, and the act of naming

👤 Created by Carlos Javier Rivera

Dev Log Button

About

A minimal, ceremonial language that flows into Cardano. Smart contracts written in your voice.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  
0