Skip to content
Projekte

Über uns

[WIP NOT READY] Yo (柚) - A programming language that's LLM-friendly to write and human-friendly to read

Programmiersprachen und Laufzeitumgebungen

So werden diese Zahlen gemessen

What you can do

  • Ownership and borrowing — values by default: one owner, a move at the last use, an explicit .clone(); &T/&mut T references whose types carry their origin, checked at compile time like Rust's borrow checker; Rc/Arc for explicit sharing.
  • Memory safety by default — raw pointers, FFI and inline assembly need pragma(Pragma.AllowUnsafe);; yo unsafe-report lists the unsafe surface.
  • Explicit allocators — a global allocator by default, or one argument at the creation site.
  • Formal verification — requires/ensures contracts and refinement types proved at compile time by Z3 (yo verify), with a counter-example when one fails.

Gemessener Sternzuwachs

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
Verlauf wird gesammelt

Nettoänderungen in überlappenden Zeiträumen, keine Tagessummen. Fehlende Messwerte bleiben leer. Sterne zeigen Interesse, nicht Qualität.

README.md

Original

Yo

Yo logo

English | 简体中文

Work in Progress :) Not Ready!

https://shd101wyy.github.io/Yo

Written by models. Checked by the compiler. Read by people.

Yo is a compiled systems language designed for LLMs to write safe, correct and fast programs, and for people to read them. It compiles to C11 and lets your C compiler finish the job. The compiler is written in Yo and builds itself.

Youyou, the Yo panda

The name comes from 柚 (yòu), the pomelo, and is my daughter's nickname. The mascot is Youyou (柚柚), a panda hugging a halved pomelo.


Features

  • Ownership and borrowing — values by default: one owner, a move at the last use, an explicit .clone(); &T/&mut T references whose types carry their origin, checked at compile time like Rust's borrow checker; Rc/Arc for explicit sharing.
  • Memory safety by default — raw pointers, FFI and inline assembly need pragma(Pragma.AllowUnsafe);; yo unsafe-report lists the unsafe surface.
  • Explicit allocators — a global allocator by default, or one argument at the creation site.
  • Formal verification — requires/ensures contracts and refinement types proved at compile time by Z3 (yo verify), with a counter-example when one fails.
  • Compile-time evaluation — first-class types, and functions with comptime parameters run in the compiler.
  • Explicit capabilities and async/await — I/O, allocation and failure are parameters of the functions that use them; async is a compiler transform over Io, on a single-threaded event loop.
  • Parallelism — threads and an owned worker pool, each thread with its own event loop, separate from async.
  • C interop — c_include(...) and extern(...) bind C headers and symbols.
  • One way to write each thing — no operator precedence, no function overloading.
  • Build system and packages — yo init, yo build, dependencies in yo.toml, WebAssembly targets.
  • Tooling for agents — yo context (the language guide for the installed version), coded diagnostics with yo explain and yo fix.
  • Language server — yo lsp, used by the VS Code extension.
A compile-time factorial in Yo; the editor hover on result shows comptime_int = 120

Installation

# macOS / Linux
curl -sSL https://shd101wyy.github.io/Yo/install.sh | sh
# Windows (PowerShell)
irm https://shd101wyy.github.io/Yo/install.ps1 | iex

The script installs a prebuilt compiler (under ~/.local, or %LOCALAPPDATA%\Yo on Windows), plus clang and git if they are missing. curl -sSL https://shd101wyy.github.io/Yo/install.sh | sh -s -- --help lists its options: a specific --version, a --prefix, or --from-source on platforms without a prebuilt bundle (NixOS, Alpine). Manual setup of the C toolchain, upgrading and WebAssembly: INSTALL.md.

Install with an agent

Paste this into Claude Code, Codex, Cursor or another coding agent:

Install the Yo programming language (https://github.com/shd101wyy/Yo) with its official installer:
  macOS/Linux:          curl -sSL https://shd101wyy.github.io/Yo/install.sh | sh
  Windows (PowerShell): irm https://shd101wyy.github.io/Yo/install.ps1 | iex
If it needs sudo to install system packages, ask me. Then make sure `yo` is on my PATH and `yo --version` works.
Before writing any Yo code, run `yo context` and read all of it: it is the language guide for the installed version.

The agent installs Yo and loads the language guide that matches the installed compiler, which it needs because Yo is not in its training data.

Quick start

yo init my-project
cd my-project
yo build run          # prints: Hello, world!

yo init writes a manifest (yo.toml), a build.yo, sources, tests, and an AGENTS.md/CLAUDE.md that point coding agents at yo context. The entry point, src/main.yo:

{ println } :: import("std/fmt");

main :: (fn() -> unit)({
  println("Hello, world!");
});

export(main);

yo build test runs the tests, yo fmt formats, yo --help lists every command. yo --lang zh-CN (or YO_LANG=zh-CN) switches the CLI to Simplified Chinese.

Documentation

Contributing

See CONTRIBUTING.md for the dev environment, the build loop and the test suites. LLM-assisted contributions are welcome.

License

Apache License 2.0 with LLVM Exceptions

Ähnliche Projekte entdecken

Wird geladen…