I'm attempting to solve a programming golf style programming puzzle. I need to write an 18 character phrase in Chef in less than 32 "lines" of code. In this case, a line counts as an ingredient or an instruction.
The most straightforward way of doing this is to declare an ingredient for each character and put each ingredient into a baking dish. Unfortunately for what I'm trying to do, that takes too many "lines" of code. (I'm limited to 32 and I want to print a 18 character phrase. 18*2 + title + serves command + headers = 40).
Here are things I tried:
So I had the idea of just using large numbers that would span multiple unicode chars. But when I print it out, I get garbage. So then I had the idea to just stream my characters by reading off each byte of a large number at a time and popping them into a baking dish in a loop. Unfortunately, there doesn't seem to be a way to do with the operators I have (the basic four arithmetic operators). I tried taking a number, dividing by 256, multiplying by 256, and subtracting that from my original number to get the least significant byte, but then discovered that Chef uses floating point (that is the number doesn't change).
There are no logical operators. There's no comparison operators. Any idea on what I can try next to print out an 18 character phrase in less than 32 "lines" of code? (Putting commands on the same line doesn't help. It still counts the same).