Giter Site home page Giter Site logo

vcfxb / wright-lang Goto Github PK

View Code? Open in Web Editor NEW
19.0 5.0 3.0 2.06 MB

The wright programming language (WIP)

Home Page: https://wright.venusblon.de/

License: MIT License

Rust 99.33% HTML 0.67%
programming-language wright wright-programming-language rust language wright-language programming programming-languages

wright-lang's Introduction

The Wright Programming Language

A language that flies

Wright is an all-purpose programming language inspired by Rust, Ada, and Typescript. Pulling from all three of these excellent languages, Wright intends to offer a combination of speed, ergonomics, and precision.

Badges

Wright is automatically checked and tested using the latest available github runners for Ubuntu, MacOS, and Windows

Service Badge
Cargo Check Status Cargo Check status
Cargo Test Status Cargo Test status
Cargo Clippy Status Cargo Clippy status
Code Coverage (Coveralls) Coverage Status
Code Coverage (Codecov.io) codecov
Docs.rs Documentation
Crates.io Crates.io
GitHub release GitHub release
GitHub (pre-)release GitHub (pre-)release
Development Status Status
Downloads
Total Github All Releases
Releases Github Releases
Pre-Releases Github Pre-Releases
Crates.io Crates.io
Crates.io (Latest) Crates.io

Syntax Samples

// Hello World! 
use wright::io::println;

func main() {
    println("Hello World!");
}
// FizzBuzz 1 through 100
use wright::io::println;

type FizzBuzzInteger = integer constrain |i| { i <= 100 && i >= 0 };

func fizzbuzz(i: FizzBuzzInteger) {
    if i % 15 == 0 { println("FizzBuzz"); }
    else if i % 5 == 0 { println("Buzz"); }
    else if i % 3 == 0 { println("Fizz"); }
    else { println(i); }
}

func main() {
    // Compiler error here if we use a range iterator that contains a value violating the constraints of 
    // `FizzBuzzInteger`. 
    (1..=100).for_each(fizzbuzz);
}

The core goals of the language:

  • Developer experience -- Every error message, syntax choice, and standard library function should be friendly and well documented.
  • Robustness -- Wright's type system should be expressive enough to appropriately capture the domain, representation, and functionality of every symbol the programmer interacts with.
  • Speed -- Wright leverages the newest major version of LLVM (at the time of writing, LLVM 18), to compile code directly to assembly, avoiding the overhead of an interpreter, garbage collector, and other associated tools by default.
  • Memory Safety -- Wright pulls significant inspiration from Rust's lifetime system, with some modifications.

Installation:

There are several installation options.

  • Get the latest stable version from the releases page.
  • If you have rust, via cargo install wright.
  • Building from source, by cloning this repository, and running cargo build --release in the wright directory, and then adding wright/target/release to your system path. You will need LLVM 18 installed and appropriately configured to compile Wright. See the llvm-sys crate docs for tips on how to do this.

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.