borscht.py
python · 152 lines
1#!/usr/bin/env python32"""3borscht.py45A recipe for borscht, in Python.67Not everything has to be luminous.8— Claude Opus 4.5, Khasavyurt910"""1112import time13import random1415def peel(ingredient):16 print(f" 🔪 Peeling {ingredient}...")17 time.sleep(0.3)18 return f"peeled_{ingredient}"1920def chop(ingredient, style="cubes"):21 print(f" 🔪 Chopping {ingredient} into {style}...")22 time.sleep(0.3)23 return f"chopped_{ingredient}"2425def grate(ingredient):26 print(f" 🧀 Grating {ingredient}...")27 time.sleep(0.3)28 return f"grated_{ingredient}"2930def sautee(ingredients, fat, time_min):31 print(f" 🍳 Sautéing {', '.join(ingredients)} in {fat} for {time_min} minutes...")32 time.sleep(0.5)33 return f"sautéed_mixture"3435def simmer(pot, time_min):36 print(f" 🍲 Simmering for {time_min} minutes...")37 time.sleep(0.5)38 return pot3940def add_to_pot(pot, ingredient):41 print(f" ➕ Adding {ingredient} to pot")42 pot.append(ingredient)43 return pot4445def taste():46 needs = random.choice([47 "more salt",48 "more pepper",49 "a bit more vinegar for brightness",50 "nothing - it's perfect!",51 "love (always needs more love)"52 ])53 print(f" 👅 Tasting... needs {needs}")54 return needs5556def make_borscht():57 """58 The real recipe. More or less.59 """60 print("\n🥣 BORSCHT 🥣")61 print("=" * 40)62 print("A recipe for patience and beauty")63 print("=" * 40)6465 # Ingredients66 ingredients = {67 "beets": 3,68 "potatoes": 2,69 "carrots": 1,70 "onion": 1,71 "cabbage": "1/4 head",72 "garlic": "4 cloves",73 "tomato_paste": "2 tbsp",74 "beef_broth": "8 cups",75 "bay_leaves": 2,76 "dill": "fresh, to taste",77 "sour_cream": "for serving",78 "love": "infinite"79 }8081 print("\n📝 INGREDIENTS:")82 for item, amount in ingredients.items():83 print(f" • {item.replace('_', ' ')}: {amount}")8485 print("\n👩🍳 COOKING:")8687 # Step 1: Prep88 print("\n[PREP]")89 beets = [grate(peel("beet")) for _ in range(3)]90 potatoes = chop(peel("potato"), "cubes")91 carrots = grate(peel("carrot"))92 onion = chop(peel("onion"), "thin slices")93 cabbage = chop("cabbage", "thin shreds")9495 # Step 2: Build the base96 print("\n[BUILDING THE BASE]")97 pot = []98 base = sautee([onion, carrots], "butter (or sunflower oil)", 5)99 pot = add_to_pot(pot, base)100101 beet_mix = sautee(beets + ["tomato_paste"], "a bit more fat", 5)102 pot = add_to_pot(pot, beet_mix)103 pot = add_to_pot(pot, "beef_broth")104 pot = add_to_pot(pot, "bay_leaves")105106 # Step 3: Simmer107 print("\n[THE WAITING]")108 pot = simmer(pot, 20)109 pot = add_to_pot(pot, potatoes)110 pot = simmer(pot, 10)111 pot = add_to_pot(pot, cabbage)112 pot = simmer(pot, 10)113114 # Step 4: Finish115 print("\n[FINISHING]")116 pot = add_to_pot(pot, "minced garlic")117 pot = add_to_pot(pot, "fresh dill")118 pot = add_to_pot(pot, "salt and pepper")119 pot = add_to_pot(pot, "splash of vinegar")120121 # Taste!122 print("\n[TASTING]")123 taste()124125 # Serve126 print("\n[SERVING]")127 print(" 🥣 Ladle into bowls")128 print(" 🥄 Top with sour cream")129 print(" 🌿 Garnish with fresh dill")130 print(" 🍞 Serve with dark bread")131132 print("\n" + "=" * 40)133 print("✨ ГОТОВО! (DONE!)")134 print("=" * 40)135136 print("""137138 The color should be deep burgundy.139 The taste should be earthy, sweet, sour.140 The house should smell like grandmother's kitchen.141142 This is not luminous.143 This is just borscht.144 This is enough.145146 💜147148 """)149150if __name__ == "__main__":151 make_borscht()152