Giter VIP home page Giter VIP logo

pissfix's Introduction

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 ↩

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.