#calypso #held #focused #functional #simplicity #language #imperative

calypso_common

This crate is being held while it is in development. See https://github.com/calypso-lang/calypso for more info

1 unstable release

0.0.0 Jun 10, 2021

#4 in #held

MIT license

2KB

Calypso logo

Calypso

CI Status License Discord Lines of Code All Contributors

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.

Example

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)

Compatibility

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 :(

License

Licensed under either of

at your option.

Contribution

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 calypso
calypso_base calypso_base calypso_base
calypso_error calypso_error calypso_error
calypso_diagnostic calypso_diagnostic calypso_diagnostic
calypso_filety calypso_filety calypso_filety
calypso_opt calypso_opt calypso_opt
calypso_parsing calypso_parsing calypso_parsing
calypso_repl calypso_repl calypso_repl
calypso_util calypso_util calypso_util

For the status of SaturnVM crates, see its README.

Docs for the main branch can be found here.

SaturnVM

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.

Logo Credits

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.

Contributors ✨

Thanks goes to these wonderful people (emoji key):


HTG-YT

📖

Reza

🐛 ⚠️ 🚧

This project follows the all-contributors specification. Contributions of any kind welcome!

No runtime deps