| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Original HTTPS Page] |
Welcome to the CRISP Language Foundation β the home of the CRISP programming language and its ecosystem.
CRISP (Creative Rust Implemented Scripting Paradigm) is a modern, expressive scripting language inspired by Perl and built on Rust's safety and performance. With small touch of C and Python, it aims to bring together the best of all four worlds.
The CRISP Language Foundation exists to:
| Project | Description | Status |
|---|---|---|
| CRISP | The main interpreter and language implementation | π Active |
| CRISP-mode | Emacs major mode for CRISP | β Stable |
# Clone the repository
git clone https://github.com/CRISP-lang-foundation/crisp.git
cd crisp
# Build from source
cargo build --release
# Install
cargo install --path .# hello.csp
say "Hello, World!";
crisp hello.cspcrisp
>>> say "Hello, World!";
Hello, World!fn fizzbuzz(n) {
for i in 1..n+1 {
if i % 15 == 0 {
say "FizzBuzz";
} else if i % 3 == 0 {
say "Fizz";
} else if i % 5 == 0 {
say "Buzz";
} else {
say i;
}
}
}
fizzbuzz(20);
class Animal {
fn new(name) {
self.name = name;
}
fn speak() {
say self.name + " makes a sound";
}
}
class Dog extends Animal {
fn speak() {
say self.name + " barks!";
}
}
let dog = Dog.new("Rex");
dog.speak(); # Rex barks!
let numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
let evens = numbers
|> filter { |n| n % 2 == 0 }
|> map { |n| n * n };
say evens; # [4, 16, 36, 64, 100]
# Quadratic Equation Solver
# Usage: crisp quadratic.csp
say "Enter coefficient a:";
let a = float(readline());
say "Enter coefficient b:";
let b = float(readline());
say "Enter coefficient c:";
let c = float(readline());
let d = pow(b, 2) - 4 * a * c;
if d > 0.0 {
let x1 = (-b + sqrt(d)) / (2 * a);
let x2 = (-b - sqrt(d)) / (2 * a);
say "Roots: x1 = " + x1 + ", x2 = " + x2;
} else if d == 0.0 {
let x = (-b) / (2 * a);
say "Double root: x = " + x;
} else {
let real = (-b) / (2 * a);
let imag = sqrt(-d) / (2 * a);
say "Complex roots: " + real + " Β± " + imag + "i";
}
We welcome contributions! Here's how you can help:
Details can be found here in CONTRIBUTING
Run the test suite:
cargo testRun specific tests:
cargo test --test integrationCRISP language is dual-licensed under:
You may choose either license at your option.
git clone https://github.com/CRISP-lang-foundation/crisp.git
cd crisp
cargo buildcargo run -- --debugcargo build --release| Version | Status | Notes |
|---|---|---|
| v0.1.7 | β Stable | Feature enhancements |
| v0.2.0 | In motion | New features |
| v1.0.0 | π Planned | First stable release |
"Perl's expressiveness, Rust's safety."
CRISP brings together the best of both worlds:
If you like CRISP, please consider:
Made with π¦ by the CRISP Language Foundation
CRISP is a scripting language that combines the expressiveness of Perl 5 with the safety and performance of Rust. Best from world of Python, Perl, Rust and C.
The CRISP Programming Language - A comprehensive guide to CRISP, a modern scripting language inspired by Perl and built on Rust's safety and performance. Free ebook under CC0 license.
This organization has no public members. You must be a member to see who’s a part of this organization.
Loadingβ¦
Loadingβ¦
| Back | FazBrowse Home | New Git URL |