Code Monkey home page Code Monkey logo

orchid's Introduction

logo Orchid

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

Usage

The standalone interpreter can be built as the binary target from this package. The language tutorial and standard library documentation is at www.lbfalvy.com/orchid-reference. Embedder guide and Rust API documentation are 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 the nighly rust toolchain. Go to one of the folders within examples and run

cargo run --release

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.

orchid's People

Contributors

lbfalvy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

orchid's Issues

Specification

Write a full specification of the language that can be used as a reference for coding, writing tutorials and assessing the impact of updates

builtin library ergonomics

Currently the prelude is defined in a manually specified source loading function. This does not scale, defining an STL like this is essentially impossible. A datastructure for encoding file trees manually in Rust values is needed.

Improve error reporting

Error reporting at the moment is pretty terrible. There are some immediately obvious things we can do to improve it.

  • fix broken code locations
  • check for missing names before execution

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.