Open source. In alpha. ↗

Osprey.
Logic, in flight.

Your logic. Your handlers.

Declare what your code needs with algebraic effects. Choose the handler that makes it happen.

save-draft.py
# osprey: flavor=python
@effect
class Drafts:
    def save(path: str, text: str) -> Result[int, Error]: ...

def saveDraft():
    match perform(Drafts.save("draft.txt", "Ship it.")):
        case Success():
            return "Saved"
        case Error(message=message):
            return f"Retry: {message}"

@handler(Drafts)
class disk:
    def save(path, text):
        return writeFile(path, text)

@handler(Drafts)
class offline:
    def save(_path, _text):
        return Error(message="offline")

def main():
    print(f"{disk(saveDraft)} / {offline(saveDraft)}")
Saved / Retry: offlineOUTPUT

Three uncompromising flavors. No lock-in.

INFERRED TYPESEXPLICIT EFFECTSCOMPILED WITH LLVMOpen source. MIT licensed. ↗

01 / A different way to connect

Your logic stays.
The implementation changes.

Save a draft. Handle success or failure. Keep storage outside the function.

One handler writes to disk. Another simulates being offline. Swap the handler; keep the logic.

Understand algebraic effects ↗
See the handler change. Hear the story. Explore the code →

Osprey is alpha software. Native control effects support single-shot resumption; full scoped effect rows and reusable continuations remain in development. Current support →

02 / Less ceremony. More intent.

A language that leaves
room for your thinking.

Types that follow your thinking

Inferred static types, immutable data, and exhaustive pattern matching. Expected failures remain visible as Result values.

Explore the type system ↗

Three flavors. No lock-in.

Default, ML, Python. Each uncompromising. All share Osprey’s types, effects, and compiler. Choose per file; mix all three in one project.

Find your syntax ↗

Concurrency that reads directly

Native fibers and channels keep concurrent work in ordinary functions. Choose the default allocator, tracing GC, or reference counting for your native build.

Follow the fibers ↗

Arithmetic with a stated policy

Integer overflow asks an Arith handler for the region's chosen behavior. Wrapping and saturating helpers make that choice explicit.

See arithmetic effects ↗

03 / Take it into the world

One language.
A wider horizon.

Compile through LLVM to native programs, WebAssembly, or application logic for native mobile hosts.

Build for the capabilities of your target. Unsupported dynamic control effects are rejected on WebAssembly and mobile.

Real measurements, open benchmarks ↗

04 / Bring your Python thinking

Port your Python.
Put the computation on the GPU.

Keep def, lambda, and f-strings. Port computation into Osprey’s Python flavor with inferred types and checked effects. Keep Python libraries through explicit interop.

GPT-2 is the worked port: one Tensor effect, a CPU handler, and a GPU handler using Metal or OpenCL. The handler decides where the arithmetic runs.

Port with Python flavor ↗
examples/gpt2/python/model.pyPython flavor
# osprey: flavor=python
def product(a, b, rows, inner, cols):
    """a [rows, inner] times b [inner, cols]; the handler aborts on failed work."""
    return perform(Tensor.mat_mul(a, b, rows, inner, cols))
make gpt2 FLAVOR=python BACKEND=gpuTRY IT

Python flavor is Osprey source; porting requires adapting Python’s dynamic behavior. Shared tensor storage across Python interop is planned. GPU kernels are not fused; GPT-2 generation is not faster than CPU. Measurements and source →

05 / From language to application

Shared logic.
Native feel.

Issue Inbox puts its model, updates, UI layout, GitHub decoding, and SQLite commands in shared Osprey modules. SwiftUI and Android widgets render the application.

  • Browse and search GitHub issues
  • Save issues, notes, and priorities
  • Restore your inbox from SQLite

Actual simulator and emulator captures. Also verified on a physical iPhone. Native hosts provide rendering, SQLite, HTTPS, and lifecycle services.

Your next idea starts here

Give it wings.

Start with a small program. Make the behavior your own.

Start in your browser

Explore the language without installing anything.

Open Playground ↗

macOS / Linux

brew install nimblesite/tap/osprey

Windows

scoop bucket add nimblesite https://github.com/Nimblesite/scoop-bucket
scoop install osprey

Native compilation requires clang (LLVM 15+). Installation guide → · Contribute on GitHub ↗