RiptideRiptide
Download Riptide SDKInstall Riptorch
Menu
Raya playground

Write Raya. Run it here.

65 lessons, from hello world to exact maths, Riptide's maths libraries (arrays, calculus, FFT, statistics, number theory, topology, knots, orbits and more) and the CPU's matrix unit. Most run live in your browser: Raya compiled to WebAssembly, with real 64-bit integers. A few need the native Raya VM, and for those you see exactly what they printed.

57 run in your browser 8 recorded on the native VM Raya SDK 0.0.1

Hello, Raya

Runs in your browser
hello.ray
You changed the code. Running your own edits needs the Raya compiler, which comes online with our live kernels. Until then: copy it and run raya run main.ray on your machine, or press Reset to run the lesson.
Output

        
What you can do with Raya

A familiar language, then further.

Raya is a typed language with classes, records, patterns and null safety, plus additions for code that has to be fast and right. These are the parts worth knowing, each with a lesson above.

Sound null safety

A type without ? can never hold null, and the compiler proves it. Flow analysis promotes a value once you check it.

Try it →

Sealed classes and patterns

Exhaustive switch expressions over sealed types, destructuring of lists, maps, records and objects, and guards.

Try it →

Records and generics

Return several values without a class; generics keep their types at run time.

Try it →

Data classes

One line gives ==, hashCode, toString, copyWith and JSON, with no code generator and no build step.

Try it →

Value classes

@pragma('raya:value'): small immutable types with no identity, kept in registers by the compiler. Vectors, money, colours cost nothing in a hot loop.

Try it →

Exact maths

64-bit integers that never round, BigInt at any size, and geometry tests rewritten so they only add and multiply.

Try it →

Async and streams

async/await, Future.wait, and streams made with async* generators.

Try it →

Isolates and shared memory

Real threads with Isolate.run, and, on every Raya build, one shared field for the whole process with a real Mutex.

Try it →

SIMD and the matrix unit

Float32x4 becomes one NEON instruction on arm64, plain loops are vectorised, and the VM drives the CPU matrix unit for exact int8 and int16 matrix multiply.

Try it →

Native executables, LLVM inside

raya compile exe builds ahead of time on every core, and hands numeric loops to LLVM when that makes them faster.

Try it →

Code push for iOS

Ship a fix to an iOS app built with Raya without a new App Store build: verified bytecode patches, no new machine code.

Read how →

A whole maths stack

Riptide's own libraries in Raya: NumPy-style arrays and linear algebra, FFT and signal, sparse, spatial, special functions, statistics, arbitrary precision, computer algebra, topology and more.

See every library →

Thousands of packages

raya add collection: packages from the registry convert to Raya as they download, so the ecosystem works on day one.

Read how →

The raya command

raya run main.rayRun a program on the VM, with hot reload while you develop.
raya compile exe main.rayA native executable, compiled ahead of time on every core.
raya compile wasm main.rayWebAssembly for the browser: how the lessons on this page run.
raya compile shared lib.rayA C shared library (.dylib / .so) other languages can call.
raya add collectionAdd a package (raya get, raya pkg; raya pub still works).
raya test · raya analyze · raya formatTests, the analyzer and the formatter.

Browser lessons were compiled with raya compile wasm and their output checked against raya run on the VM line for line before they were published. Recorded lessons show what raya run (or a raya compile exe build) printed on an M1 Pro MacBook Pro. WebAssembly GC needs a current browser: Chrome or Edge 119+, Firefox 120+, Safari 18.2+.

Keep going

Two more playgrounds.

Evelyn

Apps written in Raya, running live: state, layout, animation, gestures, painting, data classes and theming.

Open the Evelyn playground →

Riptorch notebooks

import riptorch as torch: autograd, training, exact integer maths and four matmul precisions in a notebook.

Open Andromeda →

Raya, in full

The language, the benchmarks against C and C++, and what we have built with it.

About Raya →