Calypso is a mostly imperative language with some functional influences that is focused on flexibility and simplicity.
Note that this code is very work-in-progress. Contributions are welcome (and encouraged!), but it's not recommended to use this in production unless you're ready for some serious pain. Or code that just doesn't work.
The following example is an implementation of FizzBuzz that goes until a number specified in the CLI arguments of the program, or 100 if that is not present. Note that this is currently psuedocode and may change.
import standard.process.Args
fn main(args: Args) ->
args
|> _.get(0)
|> _.unwrap_or("100")
|> uint.from_string
|> _.unwrap_or(100)
|> fizzbuzz
|> _.each(&println("{}", &1))
fn fizzbuzz(max: uint): [string] ->
1.to_incl(max).map(fn n ->
case do
15.divides(n) -> "FizzBuzz",
3.divides(n) -> "Fizz",
5.divides(n) -> "Buzz",
_ -> n.to_string
end)
The MSRV (Minimum Supported Rust Version) is currently Rust 1.66.1.
Calypso is automatically tested on:
- x86_64 linux, Rust 1.66.1
- x86_64 linux, latest stable
- x86_64 linux, latest nightly
as well as manually tested on x86_64 linux with the latest stable build of Rust
Calypso is developed and tested on these platforms:
- Arch Linux, latest stable
- I'd hope there's more in the future...but I don't currently have the infra to test those :(
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
crates.io statuses
I'm currently holding various crates related to Calypso. These will actually be used but they are being held so that no one uses them for malicious purposes or confuses anyone.
Note: A version number of
0.0.0
indicates an unreleased crate.
Crate Name | Version | docs.rs Status |
---|---|---|
calypso |
||
calypso_base |
||
calypso_error |
||
calypso_diagnostic |
||
calypso_filety |
||
calypso_opt |
||
calypso_parsing |
||
calypso_repl |
||
calypso_util |
For the status of SaturnVM crates, see its README.
Docs for the main
branch can be found here.
SaturnVM is the VM I'm writing for Calypso. It's meant to be mostly standalone but at the moment there may be some connections or dependencies between it and Calypso. SaturnVM's top-level crate can be found in libs/saturnvm
and some of its subcrates will be found in libs/
under the name saturnvm_*
. The calypso_vm
crate will probably be a Calypso-specific interface to SaturnVM.
For more information, see its README.
The logo was modified from an image by Freepik on Flaticon. The original image can be found here or in logo-base.svg
in the assets repository.
Thanks goes to these wonderful people (emoji key):
HTG-YT 📖 ✅ |
Reza 🐛 |
This project follows the all-contributors specification. Contributions of any kind welcome!