2023-09-15 12:37:10 +01:00
2025-09-03 16:05:26 +02:00
2025-04-15 00:34:45 +02:00
2025-09-09 16:30:49 +02:00
2025-01-15 11:32:37 +01:00
2024-02-24 00:31:00 +00:00
2023-05-28 23:19:13 +01:00
2025-02-03 12:01:21 +01:00
2025-11-21 18:56:30 +01:00
2025-09-16 22:54:22 +02:00
2023-05-28 23:19:13 +01:00
2025-11-21 18:56:30 +01:00
2024-02-24 00:31:00 +00:00
2023-09-15 12:37:10 +01:00
2025-07-12 00:46:10 +02:00
2025-08-01 18:32:55 +02:00

logo Orchid

An experimental lazy, pure functional programming language designed to be embeddable in a Rust application for scripting.

Usage

Updated language tutorial, standard library documentation, embedder guide and Rust API documentation coming soon.

Design

The execution model is lambda calculus, with call by name and copy tracking to avoid repeating steps. This leads to the minimal number of necessary reduction steps.

To make the syntax more intuitive, completely hygienic macros can be used which are applied to expressions after all imports are resolved and all tokens are namespaced both in the macro and in the referencing expression.

Namespaces are inspired by Rust modules and ES6. Every file and directory is implicitly a public module. Files can export names of constants or namespaces, all names in a substitution rule, or explicitly export some names. Names are implicitly created when they're referenced. import syntax is similar to Rust except with ( parentheses ) and no semicolons.

Try it out

The project uses both the stable and nightly rust toolchain. Run the examples with

cargo orcx -- exec --proj ./examples/hello-world "src::main::main"

you can try modifying the examples, but error reporting for the time being is pretty terrible.

The name

Orchids and mangrove trees form complex ecosystems; The flowers persuade the tree to grow in different ways than it normally would to provide better support for their vines, and kill fungi and other pests. The metaphor is about vines growing on a tree and moving branches into more optimal positions for other vines.

Contribution

All contributions are welcome. For the time being, use the issue tracker to discuss ideas.

Unless we agree on different terms, by contributing to this software you declare that you have created or otherwise have the right to license your contribution, agree to license it publicly under the general noncommercial licence included in this repository, and grant me (the owner of the project) a permanent, unrestricted license to use, modify, distribute and relicense your contribution.

You retain ownership of your intellectual property to ensure that the copyleft protections cementing the noncommercial availability of the code are preserved.

About the license

This software is free for noncommercial use. If you would like to use it for commercial purposes, or distribute your derivative work under a license that permits commercial use, contact me for a separate license. These licences are provided on a case-by-case basis with any limitations and compensation we agree on.

I generally appreciate the ethos of free software, and particularly the patterns used in copyleft to cement the guarantees of the licence. However, I don't think commercial entities fit that ethos, and I think they should be addressed separately rather than attempting to ignore the inherent unfairness towards contributors.

My intent with the custom license included in this project is to enable the strong guarantees of copyleft towards noncommercial users, while leaving commercial users to engage with this project and its possible future ecosystem in a commercial way; if you intend to profit off my work, the barest cash flow should justify shooting me an email and agreeing on a simple temporary profit sharing deal until you figure out your business model, and the cash flow of a full scale business should more than justify dedicated attention to the software you rely on.

The clause about identifying marks is intended to prevent another pitfall of open-source, wherein Linux distros borrow entire codebases, break them, and then distribute the result under the original author's name. If would like to package Orchid, I'd be delighted if you would talk to me about making it official, but if you would rather operate independently, you should present your project as the rogue derivative work that it is rather than borrowing the original project's identity for something its owner has no control over.

Description
Reference interpreter and standard library for the Orchid programming language but a lot cooler than the original since it has networking!
Readme 2.8 MiB
Languages
Rust 100%