Crates.io | orion-cli |
lib.rs | orion-cli |
version | 0.1.0 |
source | src |
created_at | 2021-01-31 12:37:14.582192 |
updated_at | 2021-02-03 11:32:45.222903 |
description | A lisp inspired strongly and statically typed programming language |
homepage | |
repository | https://github.com/wafelack/orion |
max_upload_size | |
id | 348854 |
size | 925,805 |
Orion is a lisp inspired statically typed programming language written in Rust
cargo install orion-cli
(define factorial (lambda (n) {
(var toret 1)
(var i 2)
(while (<= i n) {
(set toret (* toret i))
(set i (+ i 1))
})
(return toret)
}))
(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")))
The standard library docs are available on the wiki
:construction: The GETTING_STARTED.md
is currently work in progress.
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 |
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 |