What • Why • How • Development • License • Contribution • Credits
Warning: Yolk is currently in development. Things may change at any time!
Yolk is a domain-specific language that transpiles to Yolol.
Yolk specializes in working with numbers and arrays.
Yolol doesn't support arrays, so each element must be a separate variable.
// Yolol
a_0=1 a_1=2 a_2=4 a_3=8
Yolk handles array expansion so that you don't have to.
// Yolk
let a = [1, 2, 4, 8]
In Yolol, applying element-wise operations to an array is repetitive and error-prone.
// Yolol
a_0=1 a_1=2 a_2=4 a_3=8
b_0=a_0^2 b_1=a_1^2 b_2=a_2^2 b_3=a_3^2
// Result: b_0 == 1, b_1 == 4, b_2 == 16, b_3 == 64
In Yolk, element-wise operations are powerful and concise.
// Yolk
let a = [1, 2, 4, 8]
let b = a ^ 2
// Result: b == [1, 4, 16, 64]
Yolk's syntax is simple and beginner-friendly.
// This is a comment!
import a
define b(c, d) = c + d
let e = 0
export f
Yolk provides the same operators and precedence as Yolol.
let number = 1 + 2 * 3
// Result: number == 7
Yolol chips are slow and have a limited amount of space.
Yolk uses SSA form to aggressively optimizes your code, making it faster and smaller.
Learn the Yolk syntax by checking out some examples or by reading the language specification.
Try Yolk online with Yolk Web.
Requires Git and Rust nightly.
```bash
rustup default nightly
git clone https://github.com/averycrespi/yolk.git && cd yolk
make ```
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Logo derived from: Egg by David from the Noun Project