1 unstable release

0.0.1 Jan 16, 2023

#27 in #numeral

27 downloads per month

0BSD license

94KB
2.5K SLoC

Rever

Rever is an experimental programming language trying out different ideas at the same time. These ideas include:

Its syntax is inspired by Janus, Pascal, Rust, and Haskell. It's in the same syntax family as Crunch and similar languages.

Installation

First, install Rust. Then, either download the ZIP file for this project and unzip it, or git clone this project, whichever you're most comfortable with.

Once that's done, you can start playing around with the REPL by running

cargo run

As of now, the interpreter can only do math, define procedures, and print to the terminal. Try some of the examples in the examples/ folder!

What is reversible computing?

Reversible computing is a special type of computation where any steps taken can be trivially reversed. This paradigm helps to reduce the amount of code by half in some cases, and to perform inverse actions "for free", such as when compressing/uncompressing, encrypting/unencrypting, compiling/uncompiling, etc.

Reversible computers can still do all the same things irreversible computers can, but they tend to produce extraneous data called "garbage". Garbage is a by-product from computing a reducive operation, but by itself isn't relevant to the programmer's goals. Usually it gets thrown away, but it can be useful to keep around when undoing a computation, such as decompiling or decompressing.

Rever only has reversible operations and encourages programmers to do any garbage handling themselves. Please keep in mind that although Rever makes every attempt to keep garbage to a minimum, it cannot guarantee that the code you write will not be garbage. In order to reduce any uncertainty regarding this, we recommend assuming that any and all code is garbage.

What's Rever like?

Check out SYNTAX.md and the example programs in examples/ to see more.

Thank you

Like many of my personal projects, Rever is a labor of love. If you like it or would like to see it grow, you can make a donation at my Ko-fi account.

Dependencies

~4.5MB
~58K SLoC