MCPcopy Index your code
hub / github.com/Wafelack/orion

github.com/Wafelack/orion @0.1.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.1.0 ↗ · + Follow
171 symbols 674 edges 30 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Orion


Orion is a lisp inspired statically typed programming language written in Rust


Install

  • Download binary from the releases.
  • Run cargo install orion-cli

Examples

Factorial

(define factorial (lambda (n) {
    (var toret 1)
    (var i 2)
    (while (<= i n) {
        (set toret (* toret i))
        (set i (+ i 1))
    })
    (return toret)
}))

More or less game

(math:initRng)
(define toGuess (math:rand 1 100))
(var guessed 0)
(var tries 0)

(while (!= guessed toGuess) {
  (set tries (+ tries 1))
  (set guessed (static_cast "int" (input "Input number: ")))
  (if (< guessed toGuess) {
    (print "More !")
  } {
    (if (> guessed toGuess) {
      (print "Less !")
    })
  })
})
(print (+ "Well done, you found the number in " (+ (static_cast "string" tries) " tries")))

Documentation

The standard library docs are available on the wiki

:construction: The GETTING_STARTED.md is currently work in progress.

Performances

Ackermann(3, 3) - 500 runs

Language Total Average Median Amplitude
Nixt 63145ms 126ms 121ms 134ms
Orion 4398ms 8ms 8ms 13ms
Python 1.1e-4ms 2.24e-7ms 2.12e-7 3.77e-7ms

Pushing 1000 numbers to an array - 500 runs

Language Total Average Median Amplitude
Nixt 6602ms 13ms 12ms 29ms
Orion 5473ms 10ms 10ms 22ms
Python 5.44e-5ms 1.08e-7ms 9.98e-8ms 1.61e-7ms

Core symbols most depended-on inside this repo

len
called by 93
src/lib/interpreter/interpreter/stdlib/collections.rs
scan_tokens
called by 44
src/lib/lexer/lexer.rs
parse_tokens
called by 44
src/lib/parser/parser.rs
eval
called by 40
src/lib/interpreter/interpreter/interpreter.rs
eval_scope
called by 34
src/lib/interpreter/interpreter/interpreter.rs
eval_call
called by 31
src/lib/interpreter/interpreter/interpreter.rs
identifier
called by 29
src/lib/interpreter/interpreter/interpreter.rs
add_child
called by 18
src/lib/parser/node.rs

Shape

Method 105
Function 57
Class 6
Enum 3

Languages

Rust100%

Modules by API surface

src/lib/tests/interpreter.rs37 symbols
src/lib/interpreter/interpreter/stdlib/math.rs18 symbols
src/lib/lexer/lexer.rs13 symbols
src/lib/interpreter/interpreter/interpreter.rs10 symbols
src/lib/tests/lexer.rs9 symbols
src/lib/parser/parser.rs9 symbols
src/lib/interpreter/interpreter/boolean.rs9 symbols
src/lib/parser/node.rs8 symbols
src/lib/interpreter/interpreter/stdlib/collections.rs8 symbols
src/lib/interpreter/interpreter/stdlib/fs.rs7 symbols
src/lib/interpreter/value.rs6 symbols
src/lib/interpreter/interpreter/stdlib/sys.rs5 symbols

For agents

$ claude mcp add orion \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact