Yolk

Numerical computing for Yolol.

WhatWhyHowDevelopmentLicenseContributionCredits

Warning: Yolk is currently in development. Things may change at any time!

What is Yolk?

Yolk is a domain-specific language that transpiles to Yolol.

Yolk specializes in working with numbers and arrays.

Why should I use Yolk?

Convenience

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]

Simplicity

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

Efficiency

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.

How do I get started?

Learn the Yolk syntax by checking out some examples or by reading the language specification.

Try Yolk online with Yolk Web.

Development

Requires Git and Rust nightly.

```bash

Set nightly as default

rustup default nightly

Clone the repository

git clone https://github.com/averycrespi/yolk.git && cd yolk

Build and run tests

make ```

License

Licensed under either of

at your option.

Contribution

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.

Credits

Logo derived from: Egg by David from the Noun Project