# OSL

> OSL is a readable, typed programming language that compiles to Go and ships as one native executable.

This is the Markdown version of https://osl-lang.org/. Every page of the OSL docs has one: add .md to its path. https://osl-lang.org/llms.txt lists them all.

Write it top to bottom like a script, check it like a compiled language, and ship it as one executable. Types come first, blocks are parentheses, counting starts at one, and failure is a value you can see.

```osl
string[] crew = ["Ada", "Grace", "Linus"]

for i, name in crew (
  log `${i}. Hello, ${name}!`
)

def shout(string text) string -> text.toUpper() ++ "!"
log shout("one binary, no runtime")
```

Output:

```text
1. Hello, Ada!
2. Hello, Grace!
3. Hello, Linus!
ONE BINARY, NO RUNTIME!
```

## Install

```bash
curl -fsSL https://gosl.mistium.com | sh
```

You need a Go toolchain to compile. The programs you build don't need Go or OSL to run.

## Learn

A course that takes you from your first line to threads, generics and Go interop.

- [Learn OSL](/learn.md)

## Build

Step-by-step projects: build a real program from an empty file.

- [Build](/build.md)

## Packages

Every package in the standard library, each with a tutorial and its full API.

- [Standard library](/packages.md)

## Reference

The language, its built-ins and its tools, laid out for looking things up.

- [Reference](/reference.md)

## Try it

The playground at https://osl-lang.org/playground compiles OSL in the browser. The compiler's source is at https://git.rotur.dev/osl/.go.
