From Esolang
Jump to navigation Jump to search

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.
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)