Wednesday, September 9, 2009

Revelations

Mr. Mendacious D sends along a link to a programming language called Chef. Here's a Hello World written in Chef:
Hello World Souffle.

This recipe prints the immortal words "Hello world!", in a basically brute force way. It also makes a lot of food for one person.

Ingredients.
72 g haricot beans
101 eggs
108 g lard
111 cups oil
32 zucchinis
119 ml water
114 g red salmon
100 g dijon mustard
33 potatoes

Method.
Put potatoes into the mixing bowl. Put dijon mustard into the mixing bowl. Put lard into the mixing bowl. Put red salmon into the mixing bowl. Put oil into the mixing bowl. Put water into the mixing bowl. Put zucchinis into the mixing bowl. Put oil into the mixing bowl. Put lard 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.
Now that's pretty funny. At the same time I couldn't help thinking "Isn't that a lot to do to get Hello World?"

Well.

Here's what it takes to get JanusNode to type "Lieutenant Commander Scarsdale-Coachmen the Obsolete Humpback Whale" less what fills out the variables - lists of picked-over words - and a little chunk of code it relies on to make fake words.
100 Subject(SillyNames) honorifics 10 < CapitalizeNext() 100 > { TextDemonCapitalizeFakeWord 100 | FirstNames 100 < backspace() 100 > "-" 100 < backspace() 100 > < CapitalizeNext() 100 > FirstNames 100 | words 100 | syllables 100 < backspace() 100 > words 100 | words 100 < backspace() 100 > syllables 100 | honorifics 10 | FirstNames 100 | FirstNames 100 < backspace() 100 > syllables 100 | syllables 100 < backspace() 100 > FirstNames 100 } < CapitalizeNext() 100 > { TextDemonCapitalizeFakeWord 100 | FirstNames 100 | words 100 | words 100 < backspace() 100 > "-" 100 < backspace() 100 > < CapitalizeNext() 100 > words 100 } { "the" 100 < CapitalizeNext() 100 > jobs 100 | "the" 100 < CapitalizeNext() 100 > Animals 100 | "the" 100 < CapitalizeNext() 100 > adjectives 100 < CapitalizeNext() 100 > jobs 100 | "the" 100 < CapitalizeNext() 100 > adjectives 100 < CapitalizeNext() 100 > Animals 100 | "" 100 | "" 100 } return 100
100 Subject(SillyNames) < CapitalizeNext() 100 > { TextDemonCapitalizeFakeWord 100 | words 100 | honorifics 10 | FirstNames 100 } < CapitalizeNext() 100 > { TextDemonCapitalizeFakeWord 100 | FirstNames 100 | words 100 } { "the" 100 < CapitalizeNext() 100 > jobs 100 | "the" 100 < CapitalizeNext() 100 > Animals 100 | "the" 100 < CapitalizeNext() 100 > adjectives 100 < CapitalizeNext() 100 > jobs 100 | "the" 100 < CapitalizeNext() 100 > adjectives 100 < CapitalizeNext() 100 > Animals 100 | "" 100 | "" 100 } return 100
100 Subject(SillyNames) < CapitalizeNext() 100 > { TextDemonCapitalizeFakeWord 100 | FirstNames 100 < backspace() 100 > "-" 100 < backspace() 100 > < CapitalizeNext() 100 > FirstNames 100 | words 100 | syllables 100 < backspace() 100 > words 100 | words 100 < backspace() 100 > syllables 100 | honorifics 10 | FirstNames 100 | FirstNames 100 < backspace() 100 > syllables 100 | syllables 100 < backspace() 100 > FirstNames 100 } < CapitalizeNext() 100 > { TextDemonCapitalizeFakeWord 100 | FirstNames 100 | words 100 | words 100 < backspace() 100 > "-" 100 < backspace() 100 > < CapitalizeNext() 100 > words 100 } { "the" 100 < CapitalizeNext() 100 > jobs 100 | "the" 100 < CapitalizeNext() 100 > Animals 100 | "the" 100 < CapitalizeNext() 100 > adjectives 100 < CapitalizeNext() 100 > jobs 100 | "the" 100 < CapitalizeNext() 100 > adjectives 100 < CapitalizeNext() 100 > Animals 100 | "" 100 | "" 100 } return 100

11 comments:

herr doktor bimler said...

Things were so much simpler in MY DAY when we only had ASSEMBLY LANGUAGE.
For human interaction, I mean. It goes without saying that there was also Pascal for the rest of the time when we were dealing with computers.

fish said...

I code exclusively in LOLCODE.

You can see Hello World is much easier:

HAI
CAN HAS STDIO?
VISIBLE "HAI WORLD!"
KTHXBYE

Mendacious D said...

Assembly is for NOOBS. Real coders use binary exclusively.

That being said, the Fibonacci numbers with caramel sauce is, actually, a viable recipe, although I suspect Snag would be more than happy to try out some of the other examples.

Substance McGravitas said...

1

Another Kiwi said...

1 is the loneliest number Subby.

Substance McGravitas said...

10 can be as bad as 1, it's the loneliest number since the number 1.

fish said...

You're way off base two.

Another Kiwi said...

All them 1's and 0's. They deserve each other in my view.

herr doktor bimler said...

Apparently the least lonely number is 23. It is always in the swing of things at parties while 1 is off in the corner feeling morose.

mikey said...

That whole "1 is the loneliest number" narrative is demonstrably a load of raccoon crap.

I have found that, if I attend a party, and I retreat to a mostly private area, take out one (1) number and light it, I immediately have like fourteen friends...

Thank goodness I have ducte tape

Substance McGravitas said...

Dammit.