Ursa
A friendly, stable, general-purpose programming-language
Ursa helps you write code that will last a long time: a simple, general-purpose programming language that is easy to pick up and will work the same way long into the future.Latest release notes.
The first release for four months! Version 0.2.17 includes a brand new interpreter, which is iterative, not recursive, modelling Ursa’s control flow and stack explicitly. This will allow us to use JavaScript generators straightforwardly to implement Ursa generators, coming soon!
A quick note: it’s been so long since the last release because I’ve been busy with other things. In a way that’s bad, but in a way it’s good, because it means that work on Ursa is still proceeding reasonably quickly in terms of how many hours it takes, just not in “calendar time”. Hopefully I’ll be more productive for the next few months.
Examples and Demo
Code
print("hello woods!")
Result
Output
Code
let fac = fn(x: Int): Int {
if x == 0 {1} else {x * fac(x - 1)}
}
fac(6)
Result
Output
Code
let sum = fn(l: List<Int>): Int {
var tot = 0
var i = 0
loop {
if i == l.len() { return tot }
tot := tot + l.get(i)
i := i + 1
}
}
sum([10, 30, 50, 5, 5])
Result
Output
Code
let my_range = gen(n) {
var i = 0
loop {
i := i + 1
if i <= n { yield i - 1 } else { return null }
}
}
for i in my_range(5) { print(i) }
Result
Output
Result
Output
Find Ursa examples on Rosetta Code and add more!
Join us in our Matrix space! we have rooms for general discussion, newbies, and the web site.