グレートブリティッシュケーキオフ


21

誰かが誕生日にとても利己的で、みんなにケーキを要求し、共有する予定はなかったと聞いています!🎂

今日は誰かの誕生日になりますので、ケーキを焼かないでください。お気に入りのプログラミング言語を使用して、おいしい「Happy Birthday」メッセージを出力としておいしいケーキを作成します。(シェフをお勧めします!)

あなたのケーキは

  • 現実世界のレシピを真似します(リンクできるなら、素晴らしい!)
    • ケーキを作るのに適した改行で区切られた成分のリスト
    • メソッドのステップの改行区切りリスト
    • それが何人の人々に奉仕するか
  • できるだけ正しい成分比に近づけてください。
  • 提供される場合、最小限の「Happy Birthday」を出力します。

最高のケーキは次のとおりです。

  • おいしい -これはので、コミュニティはおいしいものを決定します
  • パーソナライズ -特定の人にカスタム誕生日メッセージを焼き付けてみてください。(PPGCユーザーが見つからない場合、有名人はいませんか?)
  • バランスの取れた -レシピが準備するサービングの量に適した数の材料を使用するようにしてください。1000 eggs, serves 1一食分はたぶんほんの少しだけ 大きく巨大で

    絶対に巨大です!

  • Outlandish-基本的なスポンジ以上のものを焼くことができます。たとえば、アイシング、霧雨、ソース添え、飾りなどを含むことができます。
  • 視覚的に魅力的 -画像はasciiとしてのソースコードでも出力でも優れています。最初の「バイト」は、結局のところ目です。

そして、忘れないでください、良いパン屋は角切って、適切に物事をしません。(no-opコードを使用してレシピのように見せてから印刷し、コードの意味を確認するだけではありません)これらのレシピを否定的に見ることを投票者に奨励します。

ハッピーベーキング!

ここに画像の説明を入力してください


3
ねえ、私の防衛では、私はあなたがすべて私にいくつかを取得しようとしていると思いました!
ベータ崩壊


いや、大丈夫、冗談だよ;)
ベータ崩壊

たぶんそれも手に負えなかったはずです?
Vi。

@close有権者:すべてのプログラムが満たすべき3つの基準と、「ジャッジ」がケーキに投票するために使用できる6つの基準をリストします。私は何が欠けていますか?
ジェームズウェブスター

回答:


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


これは良い答えです。これは私が探していたものです。😆
ジェームズ・ウェブスター

5
明らかにはECMAScript 7で有効なコメント文字になるはずです
。– user253751

うん@immibis、間違いなく:-)
歯ブラシ

23

BF

mbomb007sの回答に触発されて、私はそれらをケーキにしました。

レシピを紛失したのではないかと心配しています(それはどこかにありますが、投稿するために角を切る際に自分のルールを破る必要があるでしょう)。これが完成品です。

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

出力:

happy birthday 007

ジェームズボンドにとっては便利ですが、11月11日まで機能しません。


1
うわー。
mbomb007

それはきれいなBrainfuckですか?それは...私のために動作するようには思えない
RedClover

16

Python 2、0を提供

まず第一に、申し訳ありませんが、これは本当の世界のケーキではありません。

ただし、これは史上最高のゲームの 1つであるPortalです。

このレシピは、インテリジェンスコアが成分と言っていることに基づいています。

""" 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
ポータルが大好きなので投票したいのですが、自分の基準ではできません!嘘ではないケーキを食べることができたとしても、ひどい味がするでしょう。汚れは良い食事にはなりません!
ジェームズウェブスター

6
これは勝利です。
ジェームズ

1
あなたも最高の食材を使用していませんでした。1 rhuBARBの火、魚の形をしたクラッカー、素手で誰かを殺す方法に関する本など
mbomb007

それは0を提供します。あなたはそれを十分に作ってサービングをすることはできません。したがって、これが素晴らしい
ブルー

16

Brainf ***

焼く必要のないアイスクリームケーキが好きです。また、私の誕生日ですので、どんな種類のケーキを食べられるか教えてください。

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

>+<]>は魚の形のクラッカーのふりをするのが好きです。


1
これは、4/5の「ベストケーキ」基準に一致する+1に値すると思います。投票をしますが、間違いなくcut cornersケーキを買うだけです。😞
ジェームズ・ウェブスター

私もそれをパーソナライズできましたが、それはケーキを2倍大きくするでしょう。また、見た目も良くありませんでした。
mbomb007

私は現在、ケーキの外観は、より贅沢な作りで、外出先を抱えている:P
ジェームズ・ウェブスター


@mikeTheLiar最近Portalをプレイしたことがないか、レシピを読んでいないと思いますか?もう一度お読みください:theportalwiki.com/wiki/Core_voice_lines#Cake_core
mbomb007

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
ドーサは料理関連の挑戦ですか?おなじみのように聞こえます... ;-)
ティムペデリック

「今、お腹がすいた」ための+1。どうもありがとう、今もお腹がすいています。
拍手

記録のために、私はまたukda chawalが何であるか見当がつかない。
アレックス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.

それは「幸福」と綴られていないか、名前は特定の方法である必要があるか?
コール

申し訳ありませんが、私のコードパッドで書いた。自動修正をオフにしていたことを忘れていました。
コナーオブライエン

出力16にしようとし、その後、私もまだ、これを実行していないが、私はあなたが1つのミキシングボウルにすべてのものを持っていると思う
ジェームズ・ウェブスター

@JamesWebsterスペックはと言うServes N文の出力全て 1からNまでの各ボウル中の成分
コナー・オブライエン

ええ、しかし、あなたは1つのボウルだけを使用しました。ボウル2〜15は空です/存在しません。
ジェームズウェブスター
弊社のサイトを使用することにより、あなたは弊社のクッキーポリシーおよびプライバシーポリシーを読み、理解したものとみなされます。
Licensed under cc by-sa 3.0 with attribution required.