Pissfix π
Pissfix is a blazingly fast π programming language that transpiles to a "interesting" and not well known programming language called "Postfix". Postfix is a stack-based language that uses reverse Polish notation to express arithmetic expressions. Pissfix allows you to write code in a more intuitive and readable way πββοΈπ.
Pissfix is written in Rust π¦, which is also blazing fast π and memory safe ππΎ.
The transpilation time on a medium sized program just takes a few microseconds πππ±.
Pissfix is an amazing language β¨ with tons of upsides, such as:
- Easy to learn and use π§Ύπ
- Compatible with any platform that supports Postfix π»πβ
- Supports functions, anonymous functions, variables, loops, and conditional statements π
- Has a rich set of built-in operators and functions π°π ±
- Allows comments that carry over to postfix π¬β‘οΈπ
- We do what's right1 πππ
Example
Here is an example of how to write a function that computes the factorial of a given number in Pissfix:
fun factorial(n: Int) -> Int {
product = 1
while n != 0 {
product *= n # This does the thing
n -= 1
}
product
}
The transpiled Postfix code would look like this:
:factorial(n :Int -> :Int) {
1 product!
{
n 0 !=
not breakif
product n
* # This does the thing
product!
n 1 -
n!
} loop
product
} fun
As you can see, Pissfix code is much more readable and concise than Postfix code π.
Usage
To transpile a Pissfix file to a Postfix file, you can use the following command:
cargo run --release -- input.piss -o out.pf
Contributing
Pissfix is an open source project and welcomes contributions from anyone who is interested. You can report issues, suggest features, or submit pull requests on the github repository.
License
Pissfix is licensed under the GNU GPL v3.0 License.
Footnotes
-
Pissfix uses right-to-left associativity. This means that
a - b + c
is the same asa - (b + c)
, not(a - b) + c
β©