@shd101wyy/yo
v0.0.8
Published
**Work in Progress. Not Ready!**
Maintainers
Readme
Yo
Work in Progress. Not Ready!
A multi-paradigm, general-purpose, compiled programming language. Yo aims to be Simple and Fast (around 0% - 15% slower than C).
The name
Yocomes from the Chinese word柚(yòu), meaningpomelo, a large citrus fruit similar to grapefruit. It's my daughter's nickname.
Features
- First-class types.
- Compile-time evaluation.
- Homoiconicity and metaprogramming (Yo syntax is inspired by the Lisp S expression).
- Closure.
- Async/await (Stackless coroutine & Cooperative multi-tasking).
objecttype with Non-atomic Reference Counting and Thread-Local Cycle Collection.- Compile-time Reference Counting with Ownership and Lifetime Analysis.
- Thread-per-core parallelism model (see PARALLELISM.md).
- C interop.
- etc.
Screencast From 2026-01-09 23-05-16.webm
Language Design
For the design of the language, please refer to DESIGN.md.
Installation
The Yo language is currently distributed as an npm package:
$ npm install -g @shd101wyy/yo # Install yo compiler globally
$ yarn global add @shd101wyy/yo # Or using yarn
$ pnpm add -g @shd101wyy/yo # Or using pnpm
$ bun install --global @shd101wyy/yo # Or using bunIt exposes the yo command in your terminal.
There is also an alias yo-cli for yo command in case of naming conflicts.
Run yo --help or yo-cli --help to see available commands.
Code examples
Check the ./tests and ./std folders for code examples.
Hello World
open import "std/libc/stdio";
main :: (fn() -> unit) {
printf("Hello, World!\n");
};
export main;Development
The Yo compiler is written in TypeScript and uses Bun as the runtime.
Please install nix and direnv before proceeding.
The dev environment is defined in shell.nix. You can also manually install the dependencies listed in the file.
Setup
$ cd Yo
$ direnv allow . # Run this command to activate the nix shell.
# You only need to run it once.
$ bun install # Install necessary dependencies.Run the following command to watch for changes and build the project:
$ bun run devRun the following command to build the project:
$ bun run buildTest the local yo-cli:
$ bun run src/yo-cli.ts compile src/tests/examples/fixme.yo
# There is also a `yo-cli` script in the project root for testing:
$ ./yo-cli compile src/tests/examples/fixme.yoEditor Support
A VS Code extension is available here that supports basic syntax highlighting. No LSP yet.
Vim / Neovim: a minimal syntax file and a usage README are available in
vscode-extension/syntaxes/. See vscode-extension/syntaxes/README.md for installation steps,ftdetectexamples andhome-managersnippets.
