Bake me a slice of cake

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
5
down vote

favorite












My birthday is in a month, and this is a slice of tasty cake.



 .-""-.
.-" "-.
|""--.. "-.
| ""--.. "-.
|""--.. ""--..
| ""--.. |
| ""--..|
""--.. |
""--.. |
""--..|


In the fewest number of bytes, construct this slice of cake for me. You can print it to STDOUT or return it as a function result.



Any amount of extraneous whitespace is acceptable, so long as the characters line up appropriately.



Rules and I/O



  • No input

  • Output can be given by any convenient method.

  • Either a full program or a function are acceptable.


  • Standard loopholes are forbidden.

  • This is code-golf so all usual golfing rules apply, and the shortest code (in bytes) wins.









share|improve this question























  • @Arnauld Hah, no, that was a mistake on my part when copy-pasting. Let me fix that.
    – AdmBorkBork
    2 hours ago














up vote
5
down vote

favorite












My birthday is in a month, and this is a slice of tasty cake.



 .-""-.
.-" "-.
|""--.. "-.
| ""--.. "-.
|""--.. ""--..
| ""--.. |
| ""--..|
""--.. |
""--.. |
""--..|


In the fewest number of bytes, construct this slice of cake for me. You can print it to STDOUT or return it as a function result.



Any amount of extraneous whitespace is acceptable, so long as the characters line up appropriately.



Rules and I/O



  • No input

  • Output can be given by any convenient method.

  • Either a full program or a function are acceptable.


  • Standard loopholes are forbidden.

  • This is code-golf so all usual golfing rules apply, and the shortest code (in bytes) wins.









share|improve this question























  • @Arnauld Hah, no, that was a mistake on my part when copy-pasting. Let me fix that.
    – AdmBorkBork
    2 hours ago












up vote
5
down vote

favorite









up vote
5
down vote

favorite











My birthday is in a month, and this is a slice of tasty cake.



 .-""-.
.-" "-.
|""--.. "-.
| ""--.. "-.
|""--.. ""--..
| ""--.. |
| ""--..|
""--.. |
""--.. |
""--..|


In the fewest number of bytes, construct this slice of cake for me. You can print it to STDOUT or return it as a function result.



Any amount of extraneous whitespace is acceptable, so long as the characters line up appropriately.



Rules and I/O



  • No input

  • Output can be given by any convenient method.

  • Either a full program or a function are acceptable.


  • Standard loopholes are forbidden.

  • This is code-golf so all usual golfing rules apply, and the shortest code (in bytes) wins.









share|improve this question















My birthday is in a month, and this is a slice of tasty cake.



 .-""-.
.-" "-.
|""--.. "-.
| ""--.. "-.
|""--.. ""--..
| ""--.. |
| ""--..|
""--.. |
""--.. |
""--..|


In the fewest number of bytes, construct this slice of cake for me. You can print it to STDOUT or return it as a function result.



Any amount of extraneous whitespace is acceptable, so long as the characters line up appropriately.



Rules and I/O



  • No input

  • Output can be given by any convenient method.

  • Either a full program or a function are acceptable.


  • Standard loopholes are forbidden.

  • This is code-golf so all usual golfing rules apply, and the shortest code (in bytes) wins.






code-golf ascii-art kolmogorov-complexity






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 2 hours ago

























asked 2 hours ago









AdmBorkBork

25k360217




25k360217











  • @Arnauld Hah, no, that was a mistake on my part when copy-pasting. Let me fix that.
    – AdmBorkBork
    2 hours ago
















  • @Arnauld Hah, no, that was a mistake on my part when copy-pasting. Let me fix that.
    – AdmBorkBork
    2 hours ago















@Arnauld Hah, no, that was a mistake on my part when copy-pasting. Let me fix that.
– AdmBorkBork
2 hours ago




@Arnauld Hah, no, that was a mistake on my part when copy-pasting. Let me fix that.
– AdmBorkBork
2 hours ago










4 Answers
4






active

oldest

votes

















up vote
1
down vote













JavaScript (ES8), 115 112 bytes



Saved 3 bytes thanks to @ovs





_=>`4.-""-.
1.-"6"-.
|06"-.
|603"-.
|060\
|606|
|660|
1066|
706|
670|`.replace(/d/g,n=>''.padEnd(n)||'""--..')


Try it online!






share|improve this answer






















  • 112 bytes
    – ovs
    38 mins ago

















up vote
1
down vote














Charcoal, 40 bytes



F³«↑Fι⸿↑F³¶""--..»↑⁵←F⁴←¶.-"F²«←"-.↓»↓⁵


Try it online! Link is to verbose version of code. Explanation:



F³«


Loop over the three horizontal lines.



↑Fι⸿↑


The lines overlap by an amount depending on which line we're on. This calculates the correct amount of overlap but also moves the cursor to the left of the canvas again.



F³¶""--..»


Repeat three times, move the cursor down one line and then print a third of the horizontal line.



↑⁵←


Print the vertical line on the right and the backslash on the corner.



F⁴←¶.-"


Repeat four times, move the cursor up one line and then print a quarter of the diagonal.



F²«←"-.↓»


Print the other diagonal. (I couldn't find a way of combining the printing with the movement but this is still 2 bytes shorter than the next best way I could find.)



↓⁵


Print the vertical line on the left.






share|improve this answer



























    up vote
    1
    down vote














    Canvas, 77 65 58 54 44 43 42 40 bytes



    "-.*\\\
    2⁸±4⁸+3⁸21*⌐∔13╋5|*:└×┘∔A«3╋03╋


    Try it here!






    share|improve this answer





























      up vote
      0
      down vote














      R, 47+61=108 bytes



      Once again stolen from @DigEmAll's nice answer previously, just compress to gzip and decompress in a 2 part answer.





      cat(memDecompress(readBin('a','raw',61),'g',T))


      Try it online!






      share|improve this answer




















        Your Answer




        StackExchange.ifUsing("editor", function ()
        return StackExchange.using("mathjaxEditing", function ()
        StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
        StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["\$", "\$"]]);
        );
        );
        , "mathjax-editing");

        StackExchange.ifUsing("editor", function ()
        StackExchange.using("externalEditor", function ()
        StackExchange.using("snippets", function ()
        StackExchange.snippets.init();
        );
        );
        , "code-snippets");

        StackExchange.ready(function()
        var channelOptions =
        tags: "".split(" "),
        id: "200"
        ;
        initTagRenderer("".split(" "), "".split(" "), channelOptions);

        StackExchange.using("externalEditor", function()
        // Have to fire editor after snippets, if snippets enabled
        if (StackExchange.settings.snippets.snippetsEnabled)
        StackExchange.using("snippets", function()
        createEditor();
        );

        else
        createEditor();

        );

        function createEditor()
        StackExchange.prepareEditor(
        heartbeatType: 'answer',
        convertImagesToLinks: false,
        noModals: false,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: null,
        bindNavPrevention: true,
        postfix: "",
        onDemand: true,
        discardSelector: ".discard-answer"
        ,immediatelyShowMarkdownHelp:true
        );



        );













         

        draft saved


        draft discarded


















        StackExchange.ready(
        function ()
        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodegolf.stackexchange.com%2fquestions%2f174709%2fbake-me-a-slice-of-cake%23new-answer', 'question_page');

        );

        Post as a guest






























        4 Answers
        4






        active

        oldest

        votes








        4 Answers
        4






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes








        up vote
        1
        down vote













        JavaScript (ES8), 115 112 bytes



        Saved 3 bytes thanks to @ovs





        _=>`4.-""-.
        1.-"6"-.
        |06"-.
        |603"-.
        |060\
        |606|
        |660|
        1066|
        706|
        670|`.replace(/d/g,n=>''.padEnd(n)||'""--..')


        Try it online!






        share|improve this answer






















        • 112 bytes
          – ovs
          38 mins ago














        up vote
        1
        down vote













        JavaScript (ES8), 115 112 bytes



        Saved 3 bytes thanks to @ovs





        _=>`4.-""-.
        1.-"6"-.
        |06"-.
        |603"-.
        |060\
        |606|
        |660|
        1066|
        706|
        670|`.replace(/d/g,n=>''.padEnd(n)||'""--..')


        Try it online!






        share|improve this answer






















        • 112 bytes
          – ovs
          38 mins ago












        up vote
        1
        down vote










        up vote
        1
        down vote









        JavaScript (ES8), 115 112 bytes



        Saved 3 bytes thanks to @ovs





        _=>`4.-""-.
        1.-"6"-.
        |06"-.
        |603"-.
        |060\
        |606|
        |660|
        1066|
        706|
        670|`.replace(/d/g,n=>''.padEnd(n)||'""--..')


        Try it online!






        share|improve this answer














        JavaScript (ES8), 115 112 bytes



        Saved 3 bytes thanks to @ovs





        _=>`4.-""-.
        1.-"6"-.
        |06"-.
        |603"-.
        |060\
        |606|
        |660|
        1066|
        706|
        670|`.replace(/d/g,n=>''.padEnd(n)||'""--..')


        Try it online!







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited 25 mins ago

























        answered 1 hour ago









        Arnauld

        66.8k584281




        66.8k584281











        • 112 bytes
          – ovs
          38 mins ago
















        • 112 bytes
          – ovs
          38 mins ago















        112 bytes
        – ovs
        38 mins ago




        112 bytes
        – ovs
        38 mins ago










        up vote
        1
        down vote














        Charcoal, 40 bytes



        F³«↑Fι⸿↑F³¶""--..»↑⁵←F⁴←¶.-"F²«←"-.↓»↓⁵


        Try it online! Link is to verbose version of code. Explanation:



        F³«


        Loop over the three horizontal lines.



        ↑Fι⸿↑


        The lines overlap by an amount depending on which line we're on. This calculates the correct amount of overlap but also moves the cursor to the left of the canvas again.



        F³¶""--..»


        Repeat three times, move the cursor down one line and then print a third of the horizontal line.



        ↑⁵←


        Print the vertical line on the right and the backslash on the corner.



        F⁴←¶.-"


        Repeat four times, move the cursor up one line and then print a quarter of the diagonal.



        F²«←"-.↓»


        Print the other diagonal. (I couldn't find a way of combining the printing with the movement but this is still 2 bytes shorter than the next best way I could find.)



        ↓⁵


        Print the vertical line on the left.






        share|improve this answer
























          up vote
          1
          down vote














          Charcoal, 40 bytes



          F³«↑Fι⸿↑F³¶""--..»↑⁵←F⁴←¶.-"F²«←"-.↓»↓⁵


          Try it online! Link is to verbose version of code. Explanation:



          F³«


          Loop over the three horizontal lines.



          ↑Fι⸿↑


          The lines overlap by an amount depending on which line we're on. This calculates the correct amount of overlap but also moves the cursor to the left of the canvas again.



          F³¶""--..»


          Repeat three times, move the cursor down one line and then print a third of the horizontal line.



          ↑⁵←


          Print the vertical line on the right and the backslash on the corner.



          F⁴←¶.-"


          Repeat four times, move the cursor up one line and then print a quarter of the diagonal.



          F²«←"-.↓»


          Print the other diagonal. (I couldn't find a way of combining the printing with the movement but this is still 2 bytes shorter than the next best way I could find.)



          ↓⁵


          Print the vertical line on the left.






          share|improve this answer






















            up vote
            1
            down vote










            up vote
            1
            down vote










            Charcoal, 40 bytes



            F³«↑Fι⸿↑F³¶""--..»↑⁵←F⁴←¶.-"F²«←"-.↓»↓⁵


            Try it online! Link is to verbose version of code. Explanation:



            F³«


            Loop over the three horizontal lines.



            ↑Fι⸿↑


            The lines overlap by an amount depending on which line we're on. This calculates the correct amount of overlap but also moves the cursor to the left of the canvas again.



            F³¶""--..»


            Repeat three times, move the cursor down one line and then print a third of the horizontal line.



            ↑⁵←


            Print the vertical line on the right and the backslash on the corner.



            F⁴←¶.-"


            Repeat four times, move the cursor up one line and then print a quarter of the diagonal.



            F²«←"-.↓»


            Print the other diagonal. (I couldn't find a way of combining the printing with the movement but this is still 2 bytes shorter than the next best way I could find.)



            ↓⁵


            Print the vertical line on the left.






            share|improve this answer













            Charcoal, 40 bytes



            F³«↑Fι⸿↑F³¶""--..»↑⁵←F⁴←¶.-"F²«←"-.↓»↓⁵


            Try it online! Link is to verbose version of code. Explanation:



            F³«


            Loop over the three horizontal lines.



            ↑Fι⸿↑


            The lines overlap by an amount depending on which line we're on. This calculates the correct amount of overlap but also moves the cursor to the left of the canvas again.



            F³¶""--..»


            Repeat three times, move the cursor down one line and then print a third of the horizontal line.



            ↑⁵←


            Print the vertical line on the right and the backslash on the corner.



            F⁴←¶.-"


            Repeat four times, move the cursor up one line and then print a quarter of the diagonal.



            F²«←"-.↓»


            Print the other diagonal. (I couldn't find a way of combining the printing with the movement but this is still 2 bytes shorter than the next best way I could find.)



            ↓⁵


            Print the vertical line on the left.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered 22 mins ago









            Neil

            76.9k744173




            76.9k744173




















                up vote
                1
                down vote














                Canvas, 77 65 58 54 44 43 42 40 bytes



                "-.*\\\
                2⁸±4⁸+3⁸21*⌐∔13╋5|*:└×┘∔A«3╋03╋


                Try it here!






                share|improve this answer


























                  up vote
                  1
                  down vote














                  Canvas, 77 65 58 54 44 43 42 40 bytes



                  "-.*\\\
                  2⁸±4⁸+3⁸21*⌐∔13╋5|*:└×┘∔A«3╋03╋


                  Try it here!






                  share|improve this answer
























                    up vote
                    1
                    down vote










                    up vote
                    1
                    down vote










                    Canvas, 77 65 58 54 44 43 42 40 bytes



                    "-.*\\\
                    2⁸±4⁸+3⁸21*⌐∔13╋5|*:└×┘∔A«3╋03╋


                    Try it here!






                    share|improve this answer















                    Canvas, 77 65 58 54 44 43 42 40 bytes



                    "-.*\\\
                    2⁸±4⁸+3⁸21*⌐∔13╋5|*:└×┘∔A«3╋03╋


                    Try it here!







                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited 6 mins ago

























                    answered 2 hours ago









                    dzaima

                    13.4k21652




                    13.4k21652




















                        up vote
                        0
                        down vote














                        R, 47+61=108 bytes



                        Once again stolen from @DigEmAll's nice answer previously, just compress to gzip and decompress in a 2 part answer.





                        cat(memDecompress(readBin('a','raw',61),'g',T))


                        Try it online!






                        share|improve this answer
























                          up vote
                          0
                          down vote














                          R, 47+61=108 bytes



                          Once again stolen from @DigEmAll's nice answer previously, just compress to gzip and decompress in a 2 part answer.





                          cat(memDecompress(readBin('a','raw',61),'g',T))


                          Try it online!






                          share|improve this answer






















                            up vote
                            0
                            down vote










                            up vote
                            0
                            down vote










                            R, 47+61=108 bytes



                            Once again stolen from @DigEmAll's nice answer previously, just compress to gzip and decompress in a 2 part answer.





                            cat(memDecompress(readBin('a','raw',61),'g',T))


                            Try it online!






                            share|improve this answer













                            R, 47+61=108 bytes



                            Once again stolen from @DigEmAll's nice answer previously, just compress to gzip and decompress in a 2 part answer.





                            cat(memDecompress(readBin('a','raw',61),'g',T))


                            Try it online!







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered 11 mins ago









                            J.Doe

                            1,741112




                            1,741112



























                                 

                                draft saved


                                draft discarded















































                                 


                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function ()
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodegolf.stackexchange.com%2fquestions%2f174709%2fbake-me-a-slice-of-cake%23new-answer', 'question_page');

                                );

                                Post as a guest













































































                                Comments

                                Popular posts from this blog

                                Long meetings (6-7 hours a day): Being “babysat” by supervisor

                                Is the Concept of Multiple Fantasy Races Scientifically Flawed? [closed]

                                Confectionery