Révo Programming language

Lobsters Hottest Tools

Summary

Revo is a programming language featuring clean data flow, error-as-values, compile-time execution, and fiber-based concurrency. It is built using Zig and offers optional typing with strong inference.

<p><a href="https://lobste.rs/s/towfrz/revo_programming_language">Comments</a></p>
Original Article
View Cached Full Text

Cached at: 09/03/26, 02:04 PM

# revo Source: https://revo.lung.fyi/ ``` ⣄⠔⠄⡨⣀⣹⣥⣣⡚⣿⣓⣾⣫⣷⠮⡧⣬⣬⣑⢤⠤⡉⣿⡥⣂⢟⣕⡴⠬⠆⠸⡈⡆⠀⠀⠀⡋⠄⠂⠨⡆⠀⠠⠃⡀⠀⠀⠈⢰⣿ ⠩⣽⢟⢭⠶⢷⢵⣻⠿⢍⣟⡅⡧⡭⣽⡯⡯⣶⠭⣽⡢⠱⢿⢧⠓⢥⠨⠧⠉⣡⠐⠀⢑⣀⠂⠈⠆⡅⠀⡀⢥⠤⢁⠀⢣⠀⠀⢘⠽⡏ ⠬⡓⣼⢟⢜⡧⣷⣇⣧⡷⢯⣿⣿⣿⡶⣭⠍⣯⣻⢥⠞⣮⣬⣩⠅⢏⠆⠁⡀⠌⢩⡁⢁⠅⠡⢀⠠⠀⢉⢈⠀⠀⡅⠀⡇⠀⠀⠃⠭⣯ ⡎⣟⣵⠅⣾⢭⣿⣾⣯⣿⣿⢿⣿⣿⣿⣿⣧⡳⣥⢜⣟⡤⠉⣁⢧⢨⠌⡂⠀⠒⠬⡪⣊⠄⠀⠘⠀⠢⡁⠀⡀⠅⠅⠀⡄⠀⠈⠀⢕⡟ ⡕⣧⡗⠎⠷⣯⣿⣿⣷⣿⡻⢵⣿⣿⣿⣭⣿⡿⣟⣇⡧⣿⡭⢨⠫⠮⠄⠖⠀⠆⠦⠕⠁⠅⠀⠆⡁⠁⡀⠀⠄⡉⠁⠀⠄⡀⡂⠀⢼⣇ ⠃⣶⣯⠢⡗⣟⣿⡿⣿⣯⢿⣷⢾⢿⣛⣿⣿⣯⡻⣾⡾⣾⢵⣏⣩⠅⠅⠥⠀⠃⠠⠅⠃⠀⡈⠀⠭⠅⠀⠀⠁⠔⠀⠀⢂⠅⠅⠀⠽⡇ ⠱⣻⣻⡥⢫⢯⢿⣷⣷⣿⣿⢾⢿⣷⢯⣉⣟⣟⣾⣿⠳⣿⣇⣃⠯⠘⠔⡇⠒⠅⡖⠁⠄⠡⠑⣀⠀⡁⠀⡀⠃⠈⠀⠀⠅⠀⠀⠂⣋⡇ ⢂⠵⣓⣿⣍⢯⢯⡯⣟⣝⠷⣟⢝⣋⡏⣧⠯⣿⣿⢯⣼⣯⡂⡂⣟⡧⠐⣅⠂⠥⠏⠀⠂⡅⠅⡁⠁⠄⠠⠊⠀⠨⠀⢈⠀⠄⠉⢘⡟⡆ ⡥⣯⢌⡤⢽⣗⣏⠗⢿⣻⡭⡞⡷⣭⢿⡻⡯⡟⣕⣾⢽⢯⡭⠂⡍⠀⠏⠀⢌⠴⠂⠊⡄⢗⠂⠰⠀⠤⠣⠀⠀⠀⠁⠀⠀⠀⠅⠀⢕⡽ ⠵⡭⡩⠋⠽⣽⡛⡹⢯⠍⡛⡏⣯⢟⠟⠿⣩⣳⡿⡟⢗⣭⡤⡯⠁⡬⠠⠂⢄⠂⢤⠀⢖⠀⠀⢀⠂⢖⠀⠘⠀⠀⠂⠡⢤⠠⠀⠀⣫⡿ ⠀⢰⡇⢂⣃⠙⣧⡵⡙⠇⡷⠶⡷⠶⡟⡙⣩⡌⠯⡺⡍⡲⡸⣆⠼⠅⡱⠌⠡⠂⢄⣠⠃⠀⠀⡂⠈⠂⠠⢀⠀⠀⠀⠔⠀⠂⠂⠀⠨⣯ ⡔⠰⠼⣝⢪⢋⢋⠣⣧⡦⣦⡁⡭⠽⡛⠁⡫⢡⡄⠿⡫⣕⣔⢳⠌⢡⡸⠁⠁⠂⣠⡇⠀⠀⠀⠍⠈⠄⠀⠀⢀⠀⠔⠆⠁⠈⠠⠀⡹⡏ ⡖⣠⠄⠀⠯⢜⢨⠊⣒⢡⠨⡀⠢⢭⠴⡊⢕⠐⣄⡓⡾⠋⠗⠉⢀⠚⠀⢃⠂⠥⠲⠀⠀⠀⠄⠐⠀⠀⠐⠀⠁⠄⠱⠁⠊⠈⡀⠀⠊⣽ ⠀⡉⠒⣃⠰⡀⢁⠘⡉⠪⠋⡲⡅⠍⡎⡪⢣⠽⢭⠍⡥⠁⠂⡰⠠⣄⠥⠐⠀⠣⠄⢀⠐⠁⡀⠀⢐⠐⠀⠠⠁⠂⠄⠠⠀⠁⡀⠐⣫⡟ ⠐⢔⠁⠀⠬⠑⠗⠴⠀⠢⡁⢌⠅⢘⠓⡛⠈⡀⠄⠆⠠⠠⠢⢂⠕⠷⠈⢀⠈⡒⠄⠂⠀⠀⠈⠀⡀⠡⠈⠀⠆⡐⠀⠀⠓⠀⠀⠀⢐⢼ ⡀⠀⠈⠐⠠⠀⠀⠁⠁⠣⢀⡁⡄⠂⠔⠂⠂⢉⠁⡌⠄⠜⠈⠡⠐⠀⡐⠀⢨⠀⠁⠀⠀⡀⠍⠄⠠⠁⠀⠠⢄⠈⠀⠀⡄⠀⠀⡀⠒⣸ ⢘⠉⡒⠤⠌⢀⠑⠕⠀⠄⠄⠄⠀⠄⠑⠉⠨⠀⠄⠀⠂⠃⠀⠀⠈⠄⠄⠠⠈⠀⠀⡀⠠⠁⢠⠁⠁⠀⠐⠱⠀⠀⠀⡐⠀⠉⠄⠀⢸⠾ ⠀⠘⠈⡀⠈⠀⠈⠨⠐⠠⠠⠐⡀⡄⢠⠀⢀⠨⠀⠃⠀⠀⡁⡠⠀⠩⠀⠂⠁⠀⠀⠀⢒⡄⠊⠀⠀⢀⠈⠁⠀⠀⠀⠆⠘⠁⠄⠀⠄⣿ ⠄⡄⠀⠈⠠⠀⡀⠀⠀⠄⠀⠂⠀⠀⠄⠀⢀⠁⠁⢁⠁⠆⠀⠀⠀⠀⡀⠀⠈⠀⡀⠀⠱⠀⠀⠀⠀⠂⢄⠈⠀⠀⡀⡨⠠⡀⠠⠀⠄⡼ ⠠⠀⠁⠊⢀⠀⠠⠁⠁⠂⠂⡄⢄⠐⡀⢀⠊⠂⡀⡁⡀⢀⢀⠠⠀⠄⠂⠡⠠⠁⠀⠀⠀⠂⠀⢠⠒⠀⠀⠀⠐⠢⠀⢀⠀⠀⠄⠄⣿⣿ ⠁⠋⠙⠊⠐⠕⠁⡂⠈⠅⠠⠈⠐⠀⠈⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡠⠀⠉⠀⠐⠀⠀⠀⠀⠀⣈⠀⠀⠀⠀⠈⡂⠈⠀⠀⠘⠌⢀⠥ ⠀⠀⠀⠀⠔⠔⠀⡀⡉⠀⠀⠀⠂⠠⠠⠀⠄⠄⠀⣀⢀⠀⡈⠀⠌⡐⠈⠈⠀⠀⠀⠀⠅⠀⣐⠉⠄⠀⠀⣂⠠⠁⡈⠀⠄⠄⢀⠣⢶⢿ ⠄⠀⠀⡁⠀⠄⠀⠀⠁⠈⠀⠈⠀⠁⠀⠁⡀⠁⠀⠁⠀⠀⠀⡀⠀⠀⠀⠀⠀⠠⡀⠑⠀⠀⠎⠀⢬⢠⠀⢂⠠⠢⠠⠈⡐⠸⠀⡐⣹⢷ ⠩⠥⠂⠆⡆⢠⠀⢄⠀⣀⡀⣄⠀⢈⠀⠀⣀⡀⡀⡀⠄⡄⠡⠀⠐⠀⠑⠀⠀⠁⠒⠒⠉⠡⡀⠈⠈⢀⠥⠈⠀⠀⠀⠀⠈⣞⣏⣿⡏⣿ ⠾⠝⠷⢿⣯⣿⠧⡧⠭⠣⠭⡭⡮⢭⠶⠶⠶⠦⣗⡶⠽⠭⣿⣶⠷⠵⠮⠽⠿⠮⠿⢷⡶⣖⡷⠲⠞⠷⠾⢿⢷⣿⣿⣿⣿⣯⢇⠟⡧⢈ ``` ## pipes clean data flow without nesting. things flow from top to bottom. ## errors-as-values `nil` and booleans are replaced by atoms. you can't use a value without handling an error. all crashes are explicit. (WIP) aided massively by pattern matching, `?`, `orelse`, and `:unwrap()`. ## everything is an expression no statements. everything (really) always returns a value... but the code still looks procedural. ## comp execute any (really) expression at compile time. any script can be compiled into bytecode and get any value baked in. ``` revo compile script.rv revo script.rvo ``` the compile-time VM does not differ from the runtime one. ## procedural macros along with an AST-substituting macro system, this lets you just get an iterator over the raw ast tokens, run any code to transform them, then return back a table of the new ast. ## pattern matching destructure and branch in place. you will be using atoms and tuples. they are beautiful solutions to their problems. ## fibers i made all your blocking code become non-blocking by just adding a `spawn` before it. ## tables represent everything. used for: - module exports - arrays - maps ## convenient typing the type system is optional, but very well-integrated. untyped code works just fine, but typed code is faster and gets optimized better (and ensures code correctness at compile-time!). most of your code is going to be inferred automatically. ## first-class tests they're just closures and they fail when you return an error. the `?` postfix operator propagates errors, giving you a pretty simple experience. ## get the latest release is hosted at github releases (https://github.com/if-not-nil/revo/releases). however, this project is rapidly changing. i recommend you build from source instead. ## install from source you need zig (https://ziglang.org/download) `0.16.0` to build revo. i also recommend the anyzig (https://github.com/marler8997/anyzig) version manager. ### linux/bsd/mac/etc ``` git clone https://github.com/if-not-nil/revo --recursive && cd revo git submodule update --init --recursive zig build --fetch zig build -Doptimize=ReleaseSafe # =ReleaseSmall for a ~1mb executable # =ReleaseFast for a ~5%-10% performance gain (harder to report bugs on) cp ./zig-out/bin/revo ~/.local/bin/revo revo ``` #### windows > [!NOTE] > some features are unavailable on windows. i recommend using WSL with the steps above. ``` git clone https://github.com/if-not-nil/revo && cd revo zig build --fetch -Doptimize=ReleaseFast mkdir "C:/tools/revo/bin" copy ./zig-out/bin/revo C:/tools/revo/bin # now add it to PATH by doing: # - Win+S -> `env` -> -> "Environment Variables" -> "Path" -> "System Variables" # - add new at "C:\tools\revo\bin" -> click ok -> reopen your terminal revo ``` ### tools - `repl` run `revo` to open the repl. run `:h print` to see the documentation for the `print` function. `:q` to quit. - `lsp` diagnostics, highlighting, etc. in your editor! bundled by default with your revo. how to use in your text editor (https://revo.lung.fyi/editors/) - `tree-sitter` gives most editors revo syntax highlighting support. usage & installation (https://revo.lung.fyi/editors/) | doomy/tree-sitter-revo on codeberg (https://codeberg.org/doomy/tree-sitter-revo) ### editors - `vs code` (https://revo.lung.fyi/editors/#vscode) - `neovim` (https://revo.lung.fyi/editors/#neovim) - `helix` (https://revo.lung.fyi/editors/#helix) - `zed` (https://revo.lung.fyi/editors/#zed) - `emacs` there is a literate emacs plugin with setup instructions at Emacs.org (https://github.com/if-not-nil/revo/blob/main/Emacs.org) ### made with revo - please submit a project via issues/email/discord. ### credits revo is licensed as MIT (https://revo.lung.fyi/LICENSE.txt) ~ isocline (https://github.com/daanx/isocline) by daanx - MIT ~ lsp-kit (https://github.com/zigtools/lsp-kit) by the zigtools team - MIT

Similar Articles

revo, the programming language

Lobsters Hottest

Revo is a new programming language that features clean data flow without nesting, errors-as-values, everything as expressions, compile-time execution, and procedural macros.

Revalvo

Product Hunt

Revalvo is a local-first workbench for prompt engineering and LLM evaluation that allows running prompts against multiple models in parallel, scoring responses, versioning prompts, and batch-testing datasets.

Zro

Product Hunt

Zro is a product that offers private inference for coding agents, allowing secure and private AI-assisted code generation.