Skip to content

A blazinlgy fast πŸš€ transpiler written in rust πŸ¦€ that fixes (pun intended) your problems

License

Notifications You must be signed in to change notification settings

RedstoneMedia/pissfix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

59 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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 πŸ’»πŸŒŽβœ…
  • Powerful type system, supporting generics πŸ¦ΎπŸŽπŸπŸ€–
  • Supports functions, anonymous functions, variables, loops, conditional statements and "dot chains" πŸ€―πŸ’­
  • 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

  1. Pissfix uses right-to-left associativity. This means that a - b + c is the same as a - (b + c), not (a - b) + c ↩

About

A blazinlgy fast πŸš€ transpiler written in rust πŸ¦€ that fixes (pun intended) your problems

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published