Talk:Chef
Chef / Portal ?
I found a description of Chef on wikipedia and something clicked in my head. In the video game "Portal" released by Valve Software on the "Orange Box", there is a cake recipe hidden in the game. Fans will know what I'm referring to. I wonder if there is any possible way this recipe might be Chef code? Hopefully someone familiar with the recipe will respond. -- Jordan 2/22/08
- I don't know anything about Portal but if I found the correct recipe, it already violates Chef with its xx/xx amounts of something. It doesn't use Chef syntax and it has nothing but list of ingredients, which even in correct Chef format would do no computations. --Keymaker 19:28, 23 February 2008 (UTC)
IF/ELSE in Chef?
Hello, recently started playing with Chef and was wondering if there was a way to compare a Variable (its value) that i popped off the stack if it is equal to the value of another variable.
What I want to do is something like this:
Put a into 1st mixing bowl.
Put b into 1st mixing bowl.
Put c into 1st mixing bowl.
Mix the first mixing bowl well.
Fold X into 1st mixing bowl.
PSEUDO:
if (X == a) do {}
else if (X == b) do {}
else if (C == c) do {}
else do {}
I couldn't really figure out how to do something like this with the looping feature of Chef. Any help would be appreciated. Thanks. --OND 23 November 2019.
- There is no way to create a proper if statement (except for checking if a variable is not exactly 0). You can utilize subtraction this way and the if check, so you have a possibility of equality checking that presumes. --Palaiologos/MENACE (talk) 11:29, 23 November 2019 (UTC)
- Thanks, yeah that's what i was dreading. I basically can only check for inequality by doing subtraction. Which doesn't really help because I needed a if (){do stuff} else {do other stuff}, but this way i basically only get the if part. I am trying to write/generate a Chef Quine, but kinda got stuck with this. --OND 01:13, 24 November 2019 (UTC)
stdin with non-numbers?
The spec appears to say that you can only read numbers from STDIN, is that correct? Treeplate (talk)
My app
Waluigi. This recipe prints a Waluigi lol Ingredients. 87 g haricot beans 97 eggs 108 g lard 117 cups oil 105 ml water 103 g red salmon 105 g dijon mustard Method. Put dijon mustard into the mixing bowl. Put red salmon into the mixing bowl. Put water into the mixing bowl. Put oil into the mixing bowl. Put lard into the mixing bowl. Put eggs into the mixing bowl. Put haricot beans into the mixing bowl. Liquefy contents of the mixing bowl. Pour contents of the mixing bowl into the baking dish. Serves 1.