Giter VIP home page Giter VIP logo

pizza's Introduction

Pizza - An esoteric programming language

Pizza is an interpreted, esoteric programming language based around the concept of, well, Pizza. Programs in Pizza are written as a series of recipes followed by an order. For example:

(>pepperoni_no_cheese<)
  dough * 1
  sauce * 1
  pepperoni * 65
flip pepperoni_no_cheese.

(note: at this point in time, only the REPL is available, so recipes must be condensed to a single line)

defines a recursive function that, upon each call, prints a capital 'A'. To execute the function for the first time, call it with order pepperoni_no_cheese..

Building

To compile the program, simply type ./build from the base directory. Make sure not to Ctrl+C out of the REPL if you want to delete compiled files. If you need to exit, just cause a syntax error.

By the way, it's an absolute pain to use Makefiles for OCaml and I'm too lazy to learn ocamlbuild, so that's why I'm using a shell script in case you were wondering.

Ingredients

Whenever you're cooking yourself a pizza, it's important to know what each ingredient tastes like. The table below describes each ingredient in depth:

Ingredient Return value/weight Taste
Dough n None
Sauce -n None
Mozzarella 0 if true, 1 if false Takes 1 character of input and compares it against n (ASCII)
Pepperoni -n Prints n (ASCII)

Instructions

To cook your pizza, you need to know how to put these ingredients together. The following section describes how to do so in detail:

Recipe format:

  • (>name<) ... flip. or

  • (>name<) ... flip other_name. (cooks another recipe if the weight of the pizza is 0)

Ingredient lists:

When listing your ingredients, make sure to specify the amount of it (n), like so: sauce * 5

Orders:

Orders follow a very simple syntax: order your_order.

pizza's People

Contributors

nv-vn avatar

Stargazers

Tobias Hattinger avatar  avatar Hady Mahmoud avatar Spencer Smith avatar Bence Fabian avatar Sean Rapp avatar  avatar  avatar

Watchers

James Cloos avatar  avatar

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.