Awesome
<img src="https://raw.githubusercontent.com/calypso-lang/assets/main/logo/logo.png" alt="Calypso logo" width="250" align="right"/>Calypso
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
<!-- ALL-CONTRIBUTORS-BADGE:END -->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
- 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.
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_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
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):
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> <!-- prettier-ignore-start --> <!-- markdownlint-disable --> <table> <tr> <td align="center"><a href="https://github.com/HTG-YT"><img src="https://avatars.githubusercontent.com/u/39023054?v=4?s=100" width="100px;" alt=""/><br /><sub><b>HTG-YT</b></sub></a><br /><a href="https://github.com/calypso-lang/calypso/commits?author=HTG-YT" title="Documentation">📖</a> <a href="#tutorial-HTG-YT" title="Tutorials">✅</a></td> <td align="center"><a href="https://www.mbiz.co.id/"><img src="https://avatars.githubusercontent.com/u/17718201?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Reza</b></sub></a><br /><a href="https://github.com/calypso-lang/calypso/issues?q=author%3Atbmreza" title="Bug reports">🐛</a> <a href="https://github.com/calypso-lang/calypso/commits?author=tbmreza" title="Tests">⚠️</a> <a href="#maintenance-tbmreza" title="Maintenance">🚧</a></td> </tr> </table> <!-- markdownlint-restore --> <!-- prettier-ignore-end --> <!-- ALL-CONTRIBUTORS-LIST:END -->This project follows the all-contributors specification. Contributions of any kind welcome!