Sunday, March 02, 2008

Still More JanusNode

Snag's recipes are fun, so why not get a machine to replace him? It's the 21st century. Enter JanusNode.

I've only gotten to the titles so far, but here's what was done.

I made myself a folder and some files:



The only line in the Recipe file is

100 Subject(Recipe1) < assign(RecipeIngredient1,Animals) 100 > < assign(RecipeIngredient2,RecipeIngredients) 100 > < assign(RecipeMethod1,RecipeMethods) 100 > < assign(RecipeMethod2,RecipeMethods) 100 > < assign(AdjOne,adjectives) 100 > < assign(AdjTwo,adjectives) 100 > < assign(SpiceOne,RecipeSpices) 100 > < assign(SpiceTwo,RecipeSpices) 100 > < assign(PrepOne,RecipePreparations) 100 > < assign(PrepTwo,RecipePreparations) 100 > < assign(NameOne,FamousPeople) 100 > < loadTextDNAfile("0RecipeSupport1") 100 > < chooseTextDNA(title) 100 > return 100 return 100

That looks pretty complicated, but it's simple enough. What it's doing is setting up variables and not printing anything: all the assembly of text will happen in the 0RecipeSupport1 file. Every < assign(RecipeIngredient1,Animals) 100 > has the same form, and the only things you want to change are the variable name (first thingie in the round brackets) and the name of the file it draws from (second thingie in the round brackets). Why are we setting up variables? Because we want to be able to repeat the names of our ingredients if we like when 0RecipeSupport1 runs.

(The zero in 0RecipeSupport1 is there so that JanusNode ignores it until another instruction references it; otherwise every line in it would fire IN ADDITION to the Recipe file, resulting in variables not filling right and so on.)

I also needed files in the BrainFood folder. Below is a screenshot of every file I altered to get started:



Ed and S are files in the "Irregulars" folder and are used when you have a word like "candy" and you want to add an "ed" or "s" on the end and the stupid thing requires a respelling instead of just taking a letter on. The 0RecipeSupport1 and Recipe files are in the TextDNA folder and everything else is in BrainFood.

So far I've made files for RecipeIngredients, Preparations, Spices, and Methods, meaning lists of ingredients, completed preparations (like pie), spices, and methods of cooking. I'm also borrowing elements from FamousPeople and Animals in my Brainfood folder, but I didn't have to touch 'em to use 'em.

The only lines in 0RecipeSupport1 are:

100 Subject(title) < CapitalizeNext() 100 > < get(RecipeMethod1) 100 > "ed" 100 < CapitalizeNext() 100 > < get(AdjOne) 30 > < CapitalizeNext() 100 > < get(RecipeIngredient1) 100 > "with" 100 < CapitalizeNext() 100 > < get(AdjTwo) 30 > < CapitalizeNext() 100 > < get(RecipeMethod2) 100 > "ed" 100 < CapitalizeNext() 100 > < get(RecipeIngredient2) 100 > "s" 100

100 Subject(title) < CapitalizeNext() 100 > < get(NameOne) 100 > "'s" 100 < CapitalizeNext() 100 > < get(AdjOne) 30 > < CapitalizeNext() 100 > < get(RecipeIngredient1) 100 > < CapitalizeNext() 100 > < get(PrepOne) 100 >

100 Subject(title) < CapitalizeNext() 100 > < get(NameOne) 100 > "'s" 100 < CapitalizeNext() 100 > < get(AdjOne) 30 > < CapitalizeNext() 100 > < get(RecipeIngredient2) 100 > < CapitalizeNext() 100 > < get(PrepOne) 100 >


These just generate titles. The output is, warts and all (I think my machine is too fast for JanusNode):

Abbie Hoffman's Crackpot Eggplant Croquette

John Lennon's Potato Sauce

Dressed Available Dromedary with Homemade Cacciatored Almonds

One of the Spice Girls's Banana Sorbet

Al Gore's Pumpkin Pasta

Steve Jobs's Applesauce Pasta

One of the Spice Girls's Arugula Pudding

One of the Spice Girls's Seething Millet Cooler

Buttered Gilamonster with Physical Crisped Raisins

Thomas Jefferson's Vast Garbanzo Quiche

Paul McCartney's Nude Cheese Quiche

Al Gore's Eggplant Stew

Oprah Winfrey's Date Granola

's Orange Bagel

Your best friend's Ape Stew

Steve Jobs's Elephant Sprinkles

The queen of England's Adorable Buzzard Guacamole

Buttered Aoudad with Marinated Broccolis

Crisped Salamander with Roasted Carrots

Crisped Salamander with Chilled Asparaguses



The youngest sister from the Brady Bunch's Nut Muffin

Ross Perot's Competitive Cabbage Pretzel

Leonardo DiCaprio's Mouse Consommé

Ludwig Wittgenstein's Quagga Candy

Paul McCartney's Oryx Sushi


Leonardo's Mouse Consomme flakes out and shows weird characters because I had an accented consommé in Brainfood and JanusNode is xenophobic.

2 comments:

Anonymous said...

No I know why Janusnode escapes me. It has something to do with code, which is about as transparent as cuneiform to me.

The recipes are good.

Righteous Bubba said...

I'll do something easier soon.