伟大的英国蛋糕


21

我听说有人生日那天很自私,要求所有人都做蛋糕,而且没有分享的计划!🎂

今天一定是某人的生日,所以为什么不给他们烤蛋糕呢。使用您喜欢的编程语言制作可口的蛋糕,并带有一条漂亮的“生日快乐”消息作为输出。(我建议厨师!)

你的蛋糕应该

  • 模仿现实世界的食谱(如果可以链接,那就太好了!)
    • 适合制作蛋糕的换行分隔成分列表
    • 用新行分隔的方法步骤列表
    • 服务多少人
  • 保持尽可能接近正确的配料比。
  • 投放时最少输出“生日快乐”。

最好的蛋糕是:

  • 美味 -由于这是一场,因此社区将决定什么是美味
  • 个性化 -尝试向特定人员发送自定义生日快乐消息。(如果找不到PPGC用户,为什么不名人?)
  • 平衡 -尝试使用适当数量的食材以达到食谱准备的食用量。1000 eggs, serves 1对于一个服务可能只是一个却有点 巨大的

    绝对巨大!

  • 奇特的 -您不仅可以烘烤基本的海绵,例如还可以加一些糖霜,毛毛雨,佐料,装饰品等。
  • 视觉吸引力 -图像在源代码中如ascii或在输出中都很好。毕竟是第一个“字节”。

而且,不要忘记,好的面包师不会偷工减料,不能正确地做事。(不要只使用无操作代码使它看起来像食谱,然后打印,确保您的代码有意义)。我鼓励选民以负面的态度看待这些食谱。

祝您烘焙愉快!

在此处输入图片说明


3
嘿,为了我的辩护,我以为你们都一定要给我一些!
Beta Decay 2015年


没关系,我只是在开玩笑;)
Beta Decay

也许它应该也已经秘密的
六。

@close选民:我列出了所有程序都应满足的3个标准和“法官”可以用来投票的6个标准。我想念什么?
James Webster

Answers:


21

ECMAScript 2015,可投放10个

Don  =([_])=> alert(_.replace(/^.*(?=, )/,'Happy Birthday'))

ReadMoreAbout  =classic=  victoria  =sandwich=  on  =bbcgoodfood=      ~`

⚠  Remember that OCR technologies aren't perfect, and that scanning old,
⚠  smudgy recipes does not always go as smoothly as we'd expect or hope.
⚠  This recipe is not wonderful, but please, thoroughly enjoy making it.

`

try/* to do this properly! */{
  // Link to recipe:
  bbcgoodfood.com/recipes/1997/classic-victoria-sandwich
  'Makes 10 slices'

  Ingredients:
    ForThecake:
      - 200 | grammes | castorSugar
      - 200 | grammes | softenedButter
      -   4 | whole   | eggs
      - 200 | grammes | self-raising_flour
      -   1 | tsp     | bakingPowder
      -   2 | tbsp    | milk

    For_theFilling:
      -  100 | grammes | butter, softened
      -  140 | grammes | icing.sugar, sifted
      -    a | drop    | vanilla- extract (optional)
      -  240 | grammes | jar.good-quality_strawberryJam
      -                  icingSugar, to.decorate

  Method:
    1. ^`Heat oven to 190C/fan 170C/gas 5. Butter two 20cm sandwich tins
         and line with non-stick baking paper. In a large bowl,
         beat all the cake ingredients together until you have a smooth, soft batter.`
    2. ^`Divide the mixture between the tins, smooth the surface with a spatula
         or the back of a spoon, then bake for about 20 mins until golden
         and the cake springs back when pressed. Turn onto a cooling rack
         and leave to cool completely.`
    3. ^`To make the filling, beat the butter until smooth and creamy,
         then gradually beat in icing sugar. Beat in vanilla extract if you’re
         using it. Spread the butter cream over the bottom of one of the sponges,
         top it with jam and sandwich the second sponge on top.
         Dust with a little icing sugar before serving.
         Keep in an airtight container and eat within 2 days.`

  * HappyBirthdayǃ
} catch (cake) {
  Don`t drop that! It's your cake, Uncle Chris! This cake is one day late – sorry about that.
`}

有效的ES6代码;没有弯路!

它可以在Firefox Developer Edition中使用。

都是有效的代码;将try只会赶上ReferenceError造成不被定义的变量。


这是一个很好的答案。这就是我想要的。😆–
James Webster

5
显然⚠应7.成为ECMAScript中一个有效的注释字符
user253751

@immibis是的,绝对是:-)
牙刷

23

高炉

受mbomb007答案的启发,我把它们做成了蛋糕。

恐怕我丢失了食谱(它在这里附近的某个地方,但是我可能不得不打破自己的规矩以张贴便笺);这是成品。

                                    +
                                    [
                       (
               )                    )             (
                       )           (o)    )
               (      (o)    )     ,|,            )
              (o)     ,|,          |~\    (      (o)
              ,|,     |~\    (     \ |   (o)     ,|,
              \~|     \ |----(o)->++|+\<]>,|,     |+.
              |`\-----|`\@@@-|-@@@@\.-@@@\~|[++>-\ |-
             -\-|-o@@@\ |@@@<]>@@@@|.\@@@|.\@@@o+|+\++
            ++|+\@@@@@|+\@@@|+\@@@@\.|@@@\-[@@@@@\-|o-- 
           ->@\+|@@@@@\<|@@@]>|@@@@@@@@@@|+\@@@@@|+\@@o.
          [->+|+\+@@@@@@@@@@|<]@@@@@@@@@@\>|@@@@@\+|+@@@.
          +@@@@@@@@@@@@@@@@@\+|@@@@@@@@@@|+\@@@@@@@@++++.
          @@++@@@@@@@@@@@@@@|+\@@@@@@@@@@@@@@@@@@@@+++++
          +.@@@++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@o@@.-@
          --@@--@@-@@@@@@@@@@@@@@@@@@@@@@@@@@@@-@@-@@--@
          --@@.-@@@@---.@@@@--@@@@@-.+[@@@@@o---@@@>+<:]
          >::::::+::::::++@@.::@@@:::::@@@@:::::@@:::::%
          %%::::::::::::@@::::::@:::::::@@::::::::::::%%
          ::%%%::::::::::@::::::::::::::@::::::::::%%%::
       º# ::%::%%%%%%:::::::::::::::::::::::::%%%%%::%::##º
     º### ::::::%%:::%:%%%%%%%%%%%%%%%%%%%%%:%:::%%::::: ###º
   º##### ::::::%:::::%%::::::%%%%:::::%%::::%:::::::::: #####º
  º###### `:::::::::::%:::::::%:::::::::%::::%:::::::::' ######º
 º########  ``::::::::::::::::::::::::::::::::::::''  #########º
  º##########   ```::::::::::::::::::::::::::'''   ###########º'
    `º#########-[---->+<]>++.[-->+++<]>..+++++++. ###########º'
      ` º#################################################º '
          ` º#######################################º '
             ` º#################################º '
                   ` º######################º '

输出:

happy birthday 007

非常方便,它适用于James Bond,但要到11月11日才能使用。


1
哇...........很好!
mbomb007'9

干净的Brainfuck吗?它似乎对我不起作用...
RedClover

16

Python 2,服务0

首先,对不起,这不是一个现实世界的蛋糕。

但是,它是有史以来最好的游戏之一,《传送门》。

此食谱基于Intelligence Core所说的成分。

""" Happy Birthday, Chell!
* * * * * * * * * * * """
# Here are all the ingrediants for portal cake
candles = 1 # There is most certainly only one candle for her.
fish_shaped_dirt = 32 # There isn't an official amount of dirt to add, 32 seems like a nice number.

#Full of lies
lie = float('inf')

serves = None

# Show the tester the documentation on how to use this
print __doc__,

# Now, we are going to repeat these steps until chell stops lying.
while lie:
    # She did it again, so now we need to do the whole thing once more.
    print "\r",
    # Check how many candles her cake will have
    if candles:
        # We had better take them away from her. Maybe it will stop her lying so much
        candles = 0
    else:
        # Maybe if we give her a candle, she will listen
        candles = 1
    # See, her chances of lying go down when we give her candles!
    lie -= candles
    # Add the fish shaped dirt. But ONLY if we're giving her a candle.
    print chr(fish_shaped_dirt)*candles,
    # Add all the other rubbish
    print __doc__[25:],
    #Flush it into the relaxation vault
    import sys
    sys.stdout.flush()
    # Wait and ask her if she liked it.
    import time
    time.sleep(1)

输出量

 Happy Birthday, Chell!
 * * * * * * * * * * *

其次是

 Happy Birthday, Chell!
  * * * * * * * * * * *

然后无限期地重复


8
蛋糕是一个谎言。
orlp

1
我想投票,因为我喜欢Portal,但按照我自己的标准,我不能!即使我可以吃一个不是谎言的蛋糕,它的味道也很糟糕。污垢不利于进食!
James Webster

6
这是胜利。
詹姆斯

1
您甚至没有使用最好的食材。1大黄就火了,鱼形饼干,一本关于如何杀死一个人用裸手等
mbomb007

它的份数为0。您永远无法做出足够的份子来进行份量。因此,当我说这听起来很棒
Blue

16

Brainf ***

我喜欢不需要烘烤的冰淇淋蛋糕。另外,这是我的生日,所以不要告诉我我可以吃哪种蛋糕。

Buy an ice cream cake:
    +   +   +    +   +   +
    |   |   |    |   |   |
[-]-[------->+<]>-.[--->++++<]
|><>+.-[++>-----<]>..+++++++++
|><.-[---->+<]>++.+[->++<]>.-[
|><--->+<]>--.+++++++++.++.---
|><---------.----.---.+[--->+<
|><]>+++.-[---->+<]>+++---+++|
then serve it.

我喜欢假装是>+<]>鱼形饼干。


1
我认为这值得+1来匹配4/5“最佳蛋糕”标准。我给你投票,但是绝对cut corners可以买蛋糕。😞–
詹姆斯·韦伯斯特

我也可以个性化它,但这会使蛋糕大两倍。它看起来也不是很好。
mbomb007's

我目前正在尝试使蛋糕看起来更奢侈:P
James Webster


@mikeTheLiar我想您最近没有玩过Portal或未阅读食谱?再次阅读:theportalwiki.com/wiki/Core_voice_lines#Cake_core
mbomb007 2015年

8

,服务2

对于那些生日口味更全球化的人来说...

Our dessert tonight: " Birthday " Dosa!
(adapted from vegrecipesofindia.com/masala-dosa-recipe-how-to-make-masala-dosa-recipe)

1 cup rice: ("mmm, rice")
1 cup ukda chawal: [don't know what that is but it sounds good]
1/2 cup urad dal: ["dal" means lentils in Hindi]
1/4 cup poha: ["poha" is another kind of rice]
1/4 tsp methi seeds: ("!")
salt to taste: ["Happy" time]
water as needed: [you'll need some water]

Are you ready to cook? Yes? OK then:

1. rinse the rice and urad dal separately first.:
2. soak the ukda chawal, rice and poha.
3. in another bowl soak the urad dal-methi in enough water.
4. grind the urad dal with methi to a fine and fluffy batter.
5. grind the rice and poha to a smooth batter.
6. mix both the rice and urad dal batter with salt.
7. cover and let the batter ferment for 8-9 hours.

is it Ready? Y(es) or N(o)

Answer should be: y.
    take batter out and:

1. heat a flat cast-iron griddle and smear some oil on it.
3. spread the dosa batter in a circular way on the griddle; add some oil on top.
4. flip and cook the other side.
5. serve dosa hot with coconut chutney and sambar. (yum)

Recipe serves ___:
           `(?<=2) ?`
Actually, it serves exactly 2--half feR "ME" and half feR:_" YOU"!
Yeah! Happy birthday  !

输出量

Happy Birthday 2 YOU!

或者,如果您做饭:

生日多萨

现在我饿了。


1
Dosa面临与烹饪相关的挑战吗?听起来很熟悉... ;-)
蒂姆·佩德里克

为“现在我饿了” +1。非常感谢,我现在也很饿。
2015年

根据记录,我也不知道ukda chawal是什么。
Alex A.

1

主厨,任职16人。

基于。我在网上找不到口译员,因此我严格遵守此处的规范。

“高尔夫球”版

"Happy" Birthday Cake.

This recipe was recovered from an *erm* ANCIENT cave, in which the culture consumed enormous amounts of eggs and water, and did so through their caves. Modern ingredients have been added in an endevour to make the cake better.

Ingredients.
48 teaspoons 2% milk
1 cup butter
1 l semisweet chocolate
73 eggs
2 teaspoons vanilla extract
1 cup sugar
1 teaspoon baking soda
5 teaspoons salt
24 g happiness
3 teaspoons water
8 ml corn starch
32 g space

Cooking time: 25 minutes.

Pre-heat oven to 162 degrees Celsius.

Method.
Put 2% milk into the mixing bowl. Add happiness to the mixing bowl. Put eggs into the mixing bowl. Add happiness to the mixing bowl. Put vanilla extract into the mixing bowl. Combine vanilla extract into the mixing bowl. Combine vanilla extract into the mixing bowl. Combine salt into mixing bowl. Add happiness to the mixing bowl. Add corn starch to the mixing bowl. Put vanilla extract into the mixing bowl. Combine vanilla extract into the mixing bowl. Combine vanilla extract into the mixing bowl. Combine salt into mixing bowl. Add happiness to the mixing bowl. Add corn starch to the mixing bowl. Put 2% milk into the mixing bowl. Add happiness to the mixing bowl. Add happiness to the mixing bowl. Add happiness to the mixing bowl. Add sugar to the mixing bowl. Put space into mixing bowl. Put happiness into the mixing bowl. Remove water from the mixing bowl. Combine vanilla extract into the mixing bowl. Add happiness to the mixing bowl. Put vanilla extract into the mixing bowl. Combine vanilla extract into the mixing bowl. Combine vanilla extract into the mixing bowl. Combine salt into mixing bowl. Add butter to the mixing bowl. Add happiness to the mixing bowl. Put space into the mixing bowl. Combine water into the mixing bowl. Remove water from mixing bowl. Remove water from mixing bowl. Add happiness to the bowl. Put space into the mixing bowl. Combine water into the mixing bowl. Remove water from mixing bowl. Remove semisweet chocolate from mixing bowl. Add happiness to the bowl. Put vanilla extract into the mixing bowl. Combine vanilla extract into the mixing bowl. Combine vanilla extract into the mixing bowl. Combine salt into mixing bowl. Add happiness to the bowl. Put 2% milk into the mixing bowl. Add happiness to the mixing bowl. Add happiness to the mixing bowl. Add sugar to the mixing bowl. Put eggs into the mixing bowl. Add happiness to the mixing bowl. Put eggs in mixing bowl. Add happiness to the mixing bowl. Add happiness to the mixing bowl. Put happiness into the mixing bowl. Put happiness into the mixing bowl. Remove sugar from the bowl. Remove baking soda from the bowl. Put space into mixing bowl. Put vanilla extract into the mixing bowl. Combine vanilla extract into the mixing bowl. Combine vanilla extract into the mixing bowl. Combine salt into mixing bowl. Add happiness to the mixing bowl. Add salt to the mixing bowl. Put eggs into the mixing bowl. Add happiness to the mixing bowl. Add butter to the mixing bowl. Add water to the mixing bowl. Put space into the mixing bowl. Add baking soda to the mixing bowl. Liquefy contents of the mixing bowl. Serves 16.

输出:Happy Birthday, me!

这是每个步骤的说明:

"Happy" Birthday Cake.

This recipe was recovered from an *erm* ANCIENT cave, in which the culture consumed enormous amounts of eggs and water, and did so through their caves. Modern ingredients have been added in an endevour to make the cake better.

Ingredients.
48 teaspoons 2% milk
1 cup butter
1 l semisweet chocolate
73 eggs
2 teaspoons vanilla extract
1 cup sugar
1 teaspoon baking soda
5 teaspoons salt
24 g happiness
3 teaspoons water
8 ml corn starch
32 g space

Cooking time: 25 minutes.

Pre-heat oven to 162 degrees Celsius.

Method.

Put 2% milk into the mixing bowl.               48
Add happiness to the mixing bowl.                +24= 72 (H)

Put eggs into the mixing bowl.                  73
Add happiness to the mixing bowl.                +24= 97 (a)

Put vanilla extract into the mixing bowl.       2
Combine vanilla extract into the mixing bowl.   *2 = 4
Combine vanilla extract into the mixing bowl.   *2 = 16
Combine salt into mixing bowl.                  *5 = 80
Add happiness to the mixing bowl.                +24=104
Add corn starch to the mixing bowl.             +8 =112 (p)

Put vanilla extract into the mixing bowl.       2
Combine vanilla extract into the mixing bowl.   *2 = 4
Combine vanilla extract into the mixing bowl.   *2 = 16
Combine salt into mixing bowl.                  *5 = 80
Add happiness to the mixing bowl.                +24=104
Add corn starch to the mixing bowl.             +8 =112 (p)

Put 2% milk into the mixing bowl.               48
Add happiness to the mixing bowl.                +24= 72
Add happiness to the mixing bowl.                +24= 96
Add happiness to the mixing bowl.                +24=120
Add sugar to the mixing bowl.                   +1 =121 (y)

Put space into mixing bowl.                     32      ( )

Put happiness into the mixing bowl.              24
Remove water from the mixing bowl.              -3 = 21
Combine vanilla extract into the mixing bowl.   *2 = 42
Add happiness to the mixing bowl.                +24= 66 (B)
Put vanilla extract into the mixing bowl.       2
Combine vanilla extract into the mixing bowl.   *2 = 4
Combine vanilla extract into the mixing bowl.   *2 = 16
Combine salt into mixing bowl.                  *5 = 80
Add butter to the mixing bowl.                  +1 = 81
Add happiness to the mixing bowl.                +24= 95 (i)

Put space into the mixing bowl.                 32
Combine water into the mixing bowl.             *3 = 96
Remove water from mixing bowl.                  -3 = 93
Remove water from mixing bowl.                  -3 = 90
Add happiness to the bowl.                      +24=114 (r)

Put space into the mixing bowl.                 32
Combine water into the mixing bowl.             *3 = 96
Remove water from mixing bowl.                  -3 = 93
Remove semisweet chocolate from mixing bowl.    -1 = 92
Add happiness to the bowl.                      +24=116 (t)

Put vanilla extract into the mixing bowl.       2
Combine vanilla extract into the mixing bowl.   *2 = 4
Combine vanilla extract into the mixing bowl.   *2 = 16
Combine salt into mixing bowl.                  *5 = 80
Add happiness to the bowl.                       +24=104 (h)

Put 2% milk into the mixing bowl.               48
Add happiness to the mixing bowl.                +24= 72
Add happiness to the mixing bowl.                +24= 96
Add sugar to the mixing bowl.                   +1 = 97 (d)

Put eggs into the mixing bowl.                  73
Add happiness to the mixing bowl.                +24= 97 (a)

Put eggs in mixing bowl.                        73
Add happiness to the mixing bowl.                +24 = 97
Add happiness to the mixing bowl.                +24 =121(y)

Put happiness into the mixing bowl.              24
Put happiness into the mixing bowl.              +24= 48
Remove sugar from the bowl.                     -3 = 45
Remove baking soda from the bowl.               -1 = 44 (,)

Put space into mixing bowl.                     32      ( )

Put vanilla extract into the mixing bowl.       2
Combine vanilla extract into the mixing bowl.   *2 = 4
Combine vanilla extract into the mixing bowl.   *2 = 16
Combine salt into mixing bowl.                  *5 = 80
Add happiness to the mixing bowl.                +24=104
Add salt to the mixing bowl.                    +5 =109 (m)

Put eggs into the mixing bowl.                  73
Add happiness to the mixing bowl.                +24=97
Add butter to the mixing bowl.                  +1 =98
Add water to the mixing bowl.                   +3 =101 (e)

Put space into the mixing bowl.                 32
Add baking soda to the mixing bowl.             +1 = 33 (!)

Liquefy contents of the mixing bowl.            Converts the mixing bowl to characters

Serves 16.                                      Outputs the contents of the first
                                                16 bowls.

难道不是拼写成“幸福”,还是名字必须是一种特定的方式?
科尔

抱歉,在我的密码键盘上写过。我忘记了自动更正功能。
Conor O'Brien 2015年

我还尚未运行,但我认为你已经在1一切搅拌碗,然后试图输出16
詹姆斯韦伯斯特

@JamesWebster细则中指出,该Serves N语句输出在每碗的成分从1到N
康纳尔奥布莱恩

是的,但是您只用了一个碗。2-15碗是空的/不存在。
詹姆斯·韦伯斯特
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.