Glutton

From Esolang
Jump to navigation Jump to search

Glutton is an object-based stack-based language created by User:CubixThree. In it, you prepare dishes made with ingredients, similar to Chef, however with one major difference: someone's actually eating this stuff.

There are six major points I'd like to cover:

  1. Ingredients
  2. Food
  3. Drinks
  4. Control Flow Plates
  5. Body State
  6. Body Functions (yes I said that)

Then we'll get to stuff like syntax and all that.

Ingredients

Ingredients make up food. You set them when you define food. Ingredients are in three groups: flags, operators (ops for short), and things I like to call gramounts, or "gram amounts," or simply "grams" for short. Call them whatever you want, but I will refer to them as gramounts from now on.

  • Flags are sets of two preset Boolean variables related to the body state, that are set to TRUE when the true flag is eaten, and set to false when the corresponding false flag is eaten. Having the same kind of false and true flag in the same dish will do nothing. They will cancel out.
  • Operators are, well, operators. Boolean operators, arithmetic operators, and so on.
  • Gramounts are like flags but change based on the value... in grams. Geddit? They are values that you set in grams, and once these are set and eaten, they will change the body state appropriately. There are negative and positive gramounts. Since you can't have negative grams, the gramounts do all the negative work for you and complement each other. Pepper complements sugar, for example. (See the lists in each section below for all the gramounts.) However, you can't have negative and positive gramounts in the same food dish, as they will taste bad and throw an exception.

Ingredient Types

Flags

Flags are defined like this:

Food Name: flags(Example Flag, Example Flag 2)!

Here is a list of flags that I thought of:

True Flag False Flag What they do:
Example Example Example
Example Example Example
Example Example Example
Example Example Example
Example Example Yeah I haven't really gotten to this yet :/

Operators

Operators are defined like this:

Food Name: ops(Example Op, Example Op 2)!

By the way, did you notice that in this language everyone is YELLING! Yep, the line break is an "!" so it may get a little loud. That's because in an actual restaurant, people yell a lot in the kitchen. And definitely not because I made it up...

Anyway, here is a list of operators:

Operator What it does Notes
Rice Addition. Note that there is no subtraction because you can simply add a negative number.
Mold Multiplication. Why would you eat mold?! Oh well, this guy's daring.
Division Pie Division. I ran out of ideas by the third one. Ah well, what can you do. At least mold was somewhat interesting. FREAKING MOLD.
Division Pie 2.0 Modulo. Okay now I'm just being lazy.
Aeration NOT logic operator. There. I'm adding fricking SCIENCE.


Processed Ingredients

Processed ingredients are ingredients that you can define. It's like the next level of definition. First you define ingredients, then you put those ingredients in the food. (And no, I'm not going to go to the length of defining factories and bakeries and all that jazz. Maybe in a future update. ;) ) To process an ingredient, the syntax would go like this:

process [type] {
    @Code
}!

Where [type] is either flag, op, or gram. Things that go in place of "Code" can be:

flag
op
gram

When the person eats food, the flags will be set first, then gramounts, then the operators will be performed. You can have a dish with any combination of these three types and it would still work.

Dishes are for control flow. If you have two plates of spaghetti in front of you, which one would you choose? Well, you'd probably pick pseudorandomly because otherwise you'd never get spag. In the subject's case, he can't pick pseudorandomly because he's the computer. How would a computer decide which plate to pick on its own? Exactly. That's why this guy likes bigger plates more than smaller plates and will eat from them first. So you can pretty much order your dishes any way you want, and he will still eat from the biggest one. That means a dish labeled with 5 will be eaten before a dish labeled 1. Because of the fact that the dishes can be ordered in any way you want, for this reason I have proposed that you can set the table. This means you are declaring every plate and food right from the get go. You can also process your ingredients, which lets you define custom ingredients (yes, I'll get to those in a second). This is also at the beginning, but comes before setting the table because 1 that's first in logic and 2 ingredients always come before making the food.