Crates.io | ullage |
lib.rs | ullage |
version | 0.1.0 |
source | src |
created_at | 2019-05-11 09:47:38.412341 |
updated_at | 2019-05-11 09:47:38.412341 |
description | The Ullage Programming Language |
homepage | |
repository | https://github.com/iwillspeak/ullage |
max_upload_size | |
id | 133432 |
size | 272,382 |
A statically-typed compiled language defined by a simple grammar.
It is now possible to write simple programs. The following program computes 9 factorial:
fn fact(n: Number): Number
var acc = 1
var i = 1
while i < n
acc = acc * i
i = i + 1
end
acc
end
print fact(9) # => 362880
You can also mess around with constant strings:
# FizzBuzz
#
# Implementation of the legendary `FizzBuzz` algorithm.
fn fizzbuzz(n: Number): String
(print 'fizzbuzz') if mod(n, 15) == 0 else
(print 'fizz') if mod(n, 3) == 0 else
(print 'buzz') if mod(n, 5) == 0 else
print_num(n)
end
The main build is performed by cargo
. For running the functional
tests and benchmarks you'll need Python. The suggested process is to
use the build.sh
script:
$ ./build.sh
will build the compiler target/release/ullage
.$ ./build.sh test
will build the compiler and run the test suite
from specs/
.$ ./build.sh bench
will run the benchmarks from spec/bench/
.Ullage is open source, under the MIT License.
if
blocksString
typeclang
- macOS linker default