37
\$\begingroup\$

Write a program that, for the numbers 1 through 255, prints out BF code that will produce the given number in some byte of the array, plus a newline.

For example, the first four lines of the output could (and most likely will) be:

+
++
+++
++++

The winner will be the smallest: source code + output (in bytes).

Clarifications & Revisions:

  • BF programs use wrapping cells.

  • The output BF program must terminate with the only non-zero cell being the cell containing the number.

  • Programs must be output in ascending order.

  • Outputting a program for 0 is optional.

  • Negative data pointers are not allowed. < at the first pointer will do nothing. (leave a comment if it would be more appropriate to have it throw)

\$\endgroup\$
  • 1
    \$\begingroup\$ @JoKing The entire output is counted. \$\endgroup\$ – Mason Aug 11 '19 at 3:37
  • 2
    \$\begingroup\$ Oh I see, you're saying that the code doesn't have to end on the output cell \$\endgroup\$ – Jo King Aug 11 '19 at 3:44
  • 1
    \$\begingroup\$ Would have been useful to get references as to what "BF" exactly refers to in your context, i.e. esolangs.org/wiki/Brainfuck_constants or else, etc. \$\endgroup\$ – HolyAvengerOne Aug 11 '19 at 18:11
  • 3
    \$\begingroup\$ @Mason Would +>++++++++++. be a valid program for the input 1? \$\endgroup\$ – Jonathan Frech Aug 12 '19 at 3:45
  • 7
    \$\begingroup\$ +1 for a dual-constraint challenge where you have to balance golfing the BF output versus golfing the code to output the BF. An interesting twist ☺ \$\endgroup\$ – Chronocidal Aug 12 '19 at 10:57

18 Answers 18

16
\$\begingroup\$

Perl 6, 224 + 3964 = 5834 4188 bytes

map {say (.[0]~'['~.[3]~'>'~.[1]~'<]')x?.[1],'>'x?.all,.[2]}o*.min({$_>>.abs.sum+6*?.[1]})>>.&{<- +>[.sign>0]x.abs},classify({0+|(grep(*%%1,(((256 X*^4)X+.[0]%256)X/-.[3]))[0]*.[1]+.[2])%256},[X] |(^27-13 xx 3),-7..-1){^256}

Try it online! (may timeout. Change the ^27-13 to ^25-12 to speed up slightly at the cost of some extra output)

Outputs the shortest code in the form *>[*>*<]>*, where each * is a certain number of +s or -s. There are some extra tweaks like removing the loop if it is not needed, as well as trailing >s.

As far as I can tell, the output is the most golfed for this particular format.

Explanation:

([X] |(^27-13 xx 3),-7..-1)        # Define the search space as the cross product of:
                                        # -13 to 13 for:
                                            # Initialisation     +++>
                                            # Change in target   [*>+++<]
                                            # Last change        >+++
                                        # And -7 to -1 for the change in start [-->*<]
  .classify({                  })  # Group them by calculating
                  (256 X*^4)                         # Each of the multiples of 256
                 (          X+.[0]%256)              # Plus the initialisation
                (                      X/-.[3])      # Divided by the change in start
      grep(*%%1,                               )     # Filter out the whole numbers
                                                [0]  # And take the first value
          # This is the amount of times the inner loop will execute
          # Being Nil, converted to 0 if it is an infinite loop
      *.[1]              # Multiply by the change to the target cell
           +.[2]         # And add the final section
     (          )%256    # And modulo the whole lot by 256
                     +|0 # And floor it just to keep the .0 out
classify(                   ){^256}     # Take the corresponding groups in order
   .map(                             )  # And map each to
        *.min({                    })   # Find the minimum by:
               $_>>.abs.sum             # The sum of the absolute values    
                           +6*?.[1]     # Plus 6 if it loops
      >>.*{                   }    # Then map each value to
           <- +>[.sign>0]          # + or - depending on the sign
                         x.abs     # Repeated by the absolute value 
   {                    }o              # And pass this to the next code block
    say                       # Print
        (.[0]~'['~.[3]~'>'~.[1]~'<]')             # The loop section
                                     x?.all       # If it is needed
                                           ,.[2]  # And the final part

| improve this answer | |
\$\endgroup\$
14
\$\begingroup\$

Brainfuck, 77 75 73 + 32894 = 32967 32969 32971 bytes

++++++[->+++++++<]>+>++++++++++>+[>+[-<<<.>>>]<<.>[->+>+<<]>>[-<<+>>]<<+]

Try it online!

output is the simplest possible

+
++
+++
++++
...

explanation:

++++++[->+++++++<]>+ set cell 2 to 43 (ascii of plus)
>++++++++++ set cell 3 to 10 (ascii of new line)
>+ set cell 4 to 1
[
    >+ increment cell 5
    [
        -<<<.>>> decrement cell 5 and print a plus (content of cell 2)
    ] until cell 5 == 0
    <<.> print a new line (content of cell 3)
    [
        ->+>+<< move value of cell 4 to cell 5 & 6, setting cell 4 to 0
    ]
    >> goto cell 6
    [
        -<<+>> move it's value to cell 4, setting cell 6 to 0
    ]
<<+ increment cell 4
] exit when cell 4 goes beyond 255 because cell contains C uchar meaning 255 + 1 == 0
| improve this answer | |
\$\endgroup\$
  • 11
    \$\begingroup\$ That's what I wanted to see - a BF code producing another BF code! \$\endgroup\$ – Dhruv Saxena Aug 12 '19 at 13:41
12
\$\begingroup\$

Malbolge, 28 743 bytes + 7 166 of output

Not too creative, ain't it? I'm going to work on golfing this bad boy.

D'`;qp"~~5|3VU6/AQ?br)ML&\[)5h&g|ezyQ,_N)9xwponmlk1RQ.Okdihg`&%]E[`_XWVzZSXWVUNrqpPONGLEDCgG)E>=a`_^>=<|49870T.t2+*NMLKJkj('~%${Ay~}|{t:98765srqpRQ.Okdihg`&%$#"!~^W?[ZSRvVUTMRQPImlkjihgf@E>=<`@?>7};43WVUTSRQPO/.-m%*#G'&}|#zy?>=<;:9876tsrqpRQ.Okdihg`&%$#"!~}|{zZYR:u8TMRQPImlkjihgfedcbB;:^>7};43WVUTSRQPONMLK+k)('~%${Ay~}|{t:9876543210/.-Njibgf_%cba`_AWVzyxXWVUTS5Ko2NGkKDCBfedcbBA@?>=6|4X8765.Rs10/.'K+k#('~D$dc!x}v<tyxqvunm3210Qgfkjc)Jfe^$\a`Y^W{zyxXQ9OTMq4JOHlFEJIHGF?cCB;_"!7<5Y9yx05.RQPO/(n&J*j"'~De#"!~w|{t:987onmlk1ong-Ndiha`&^F\[!_AWVzZYR:u8TMRQPImlkEDIHGF?c=BA:?8\};43WVUTSR21q/.'&%I#('~%|B"!~w|uzyxwp6Wmlkpi/POedchg`&dcba`Y^W{zyS;WPt7SRQPONMLEDhH*FE>=a`_^]\6|4X8765.Rs10/.'K+k#('~De#"!~w|{t:xwvXnm3qSohgfe+*)(Ie^$bDZYX]\UyY;WPUNrqpon10FKDIBf@ED=<`:9>7[;4381U54-s+*Non,%*#GFE%e{A!~}_{tyr8vunmlk10/.-,+cha`_%cb[Z_X|\[=Sw:PUTMqQ3IHlLKDIBA@dcb%$@?>=6Z4z2165.R210/(LKJ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rLKJn10LEDhBG@?>=<`@?>7};43WVUTSt,10)(L,+k#('~De#"!~w|{t:987654321Rhmlejib(fe^$Ea`_^WVUy<;WPUTSRKJImMLEJIBf)?D=<;_^]\[|:9216/S3210/on&Jk)"!~}CBA@?>=<;:xwYonmrqjonmf,jcha`&dFbaZ~^W?[TSXWVONrRKJOHMLEiCHAFE>C<`@?>7};43WVUT432+q/.'K+k#('~De#"!~w|{t:9876543210/.fNjiha'e^$Ea`_^WVUy<;WPUTSRKJImMLEJIBf)?D=<;_^]\[Z{9216/S3210/on&Jk)"!~}CBA@?>=<;yxwvutsrqponmfNjiha'e^$Ea`_^WVUy<;WPUTSRKJIm0FEi,BG@?>=<`@?>7};43WVUTSR2+q/.'K+k#('~De#"!~w|{t:98765432poQPlkdib(f_dcbaZ~AWVUy<;WPUTSRKJImMLEJIBf)?D=<;_^]\[|:9216/S3210/on&Jk)"!~}CBA@?>=<;:9wYonmrqjonmf,jcha`&dFbaZ~^W?[TSXWVONrR4o2NMFEDCgfedcbaA@"!=6Z4z2165.R210/(LKJIHGFE}e#"y?wv{zs9wYutsrk1oQgled*hg`H^c\"`Y^W{zyxwvuUTS5Ko2NGkKDCBfedcba`_?>=6|4X8765.Rs10/.'K+k#('~De#"!~w|{t:xwvXnm3qSohgfe+*)('&%FbaZ~^W?[TSXWVONrRKJOHMLEihgfedcbBA@?>=6|4X8765.Rs10/.'K+k#('~De#"!~w|{t:9wvXnm3qSohgfe+*)('&G]\aZ~^W?[TSXWVONrRKJOHMLEihgfedcba`@?>=6|4X8765.Rs10/.'K+k#('~D$#"!x}|{zs9wvXnm3qSohgfe+*)('&G]\aZ~^W?[TSXWVONrRKJOHMLEihgfedcba`@?>=6|4X8765.Rs10/.'K+k#('~D$dc!x}v<tyxqvunm3210/.Oejchg`&^F\[!_AWVzyxwvutsrq4JINGkEDCBfFE'C<;:^!=<54381Uvu32+*N.-m%*#G'&}|#zy?>=<;:9wYotsrqji/gOejchg`&^Fba`Y^W{zyxwvutsS54JINGkEDCBfFE'C<;:^!=<54381Uvu32+0/.-&Jkj('~%${Ay~}|{t:987654lkpi/gOejchg`&^Fba`Y^W{zyxwvutsS54JINGkEDCBfFE'C<;:^!=<54381U54-s+*Non,%*#GFEDCBA@a}|uzyxwpo5Vlkjing-kdLbg`&%$#"!~}@?UyY;WVONrLKJn10LEDhBG@?>=<`@?>7};43WVUTSRQPq/.-&J$#('~De#"!~w|{t:9876543kjongfe+ihgfe^$Ea`_^WVUy<;WPUTSRKJIm0/EJIBf@E>=<`@?>7};43WVUTSR2+q/.'K+k#('~De#"!~w|{t:9876543210QPlkdib(f_dcbaZ~AWVUy<;WPUTSRKJImMLEJIBf)?D=<;_^]\[Z{9216/S3210/on&Jk)"!~}CBA@?>=<;:9wYonmrqjonmf,jcha`&dFbaZ~^W?[TSXWVONrRKJOHMLEiCHAFE>C<`@?>7};43WVUTSR2+q/.'K+k#('~De#"!~w|{t:9876543210QPlkdib(f_dcbaZ~AWVUy<;WPUTSRKJIm0/EJIBfeEDCB;:^>7};43WVUTSRQ+q/.'K+k#('~De#"!~w|{t:987654321Rhmlejib(fe^$Ea`_^WVUy<;WPUTSRKJIm0FEi,BG@?>=<`@?>7};43WVUTSRQ+q/.'K+k#('~De#"!~w|{t:987654321Rhmlejib(fe^$Ea`_^WVUy<;WPUTSRKJImMLEJIBf)?D=<;_^]\[ZYz2165.R210/on&Jk)"!~}CBA@?>=<;:xwYonmrqjonmf,jcha`&dFbaZ~^W?[TSXWVONrRKJOHMLEiCHAFE>C<`@?>7};43WVUTSRQPq/.-&J$#('~De#"!~w|{t:98765432poQPlkdib(f_dcbaZ~AWVUy<;WPUTSRKJImMLEJIBf)?D=<;_^]\[ZYX21654-,+O/on&Jk)"!~}CBA@?>=<;yxwvutsrqponmfNjiha'e^$Ea`_^WVUy<;WPUTSRKJIm0/EJIBf@E>=<`@?>7};43WVUTSRQPq/.-&J$#('~De#"!~w|{t:98765432poQPlkdib(f_dcbaZ~AWVUy<;WPUTSRKJI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NrR4o2NMFEDCgfedcb%$@?>=6Z4z2165.R210/(LKJIHG'&}e#"y?wv{zs9wYutsrk1oQgled*KJfe^$bD`YX]VzT<XQVUNrqponml/EDCBAFE>b<A:9>76Z4z870/.R2+0/.'&%I#"'&%|BAya}|{ts9wvXtsrkj0/.-,dLhgfe^$bDZYX]\UyY;WPUNrqponmlkjiIHG@(D=a;_9>7654X81w/.-,+O/(L,+k#"!E}e#"y?`_{zsxwp65432pong-kjcb(I_%cbD`YX]Vzg

Try it online!

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ But whyyyyyyyy? \$\endgroup\$ – Joshua Aug 12 '19 at 17:40
  • \$\begingroup\$ @Joshua bowling, my boy \$\endgroup\$ – Kamila Szewczyk Aug 12 '19 at 17:55
  • \$\begingroup\$ It's not really golfed, but have an upvote anyway. Was the source code tool assisted/generated? \$\endgroup\$ – Ethan Aug 13 '19 at 14:39
  • \$\begingroup\$ /*I actually confused answers*/ Yeah. \$\endgroup\$ – Kamila Szewczyk Aug 13 '19 at 14:42
  • \$\begingroup\$ Idea behind this one is the same like this one: codegolf.stackexchange.com/questions/189358/is-it-double-speak/… \$\endgroup\$ – Kamila Szewczyk Aug 13 '19 at 14:43
10
\$\begingroup\$

Stax, score 4751 4783 (812 bytes + 3971)

ç♥←ħòqε↓F"QS₧9(2╤↑▌T~│áZk♣☺nàK╬l•▼2≡→fZ⌂▼├▄<ÖΘá6≈¡K"B∩₧∟µ#°ôQí⌡B2ô§↕*∩)V╕EôD=)O╥T⌠û◘¬dⁿ┤☻∞ô↓♫√○¬z.â\²╕ùHÑ~≡M√☻:EzLƒ→B{O◙ΔΦ_S┼╤g°▓─+dï-┌└α½╥ôRù♠3f½⌐▀Pösúô₧f☻■Aε→τΓ£╒fε▬▬►EÜ%¬╧←y═←{╤╒öú5Ñ╡♀^α☺╨▼$kEÑ■µjh≈↕█Cªü←Z#∟gV↓►S3≥╟╗K‼╞.N|⌠↨╣}5H↕ê;±↓♣≤Tj█'x╒·±ΩßL;ª$Å÷ÑPIδ`◘▌╦┼╡<√▌{òE√PPQ/h@8kq/ÖΓb6╡]≈╤æ░╣{┌‼¢ÜαT├#ΓCN∞*╬⌡↕ÜVX←Ä)◘ù⌂ëøön╗)ôö∙╬⌠☻↨F¢X╓Sż9¡φö^⌂iøFB/┌º▼┤3¶☼Zëôû⌡ôΣfcäéi╣⌠"↨√$,.ë═┴↨Φz⌡τ¢S╜{╨)z:╦@}♦*│P±Æ1x╒ΦP▄◄·╢∙xF╢cá<T╗7;▐≤←÷╛╢;½▲§║│≈⌂ƒ*'F♂☼ùrT╞·╨nG∙=♦`;á$≥┼Ω▬≡aû┼☺╥ò♥R╧╖█▓uìf↕ñ∟φÖ♣°≥←▐G▀╗┘┴÷a*▐♂9╝┬çG─⌠ñ≈☻K·⌐α⌠╡↑!≤≡¡qßτú=Θ≤C░°¡ƒ╛>╨RP○v¡I♦◘╣ô6â₧scÉ♀╣+HO┌☼<♀»?£┴≥ï½.ohaë║ëb┼âù²┌─┬]░ΘQ¥τ┘q▼$v╞Ñ╒æ±tXƒ♪>SC▌LVWª■z↑¶ßΩû↕'L╓BÅï;↑ΦB2.G╞╜&╓π♥1¥0^B0ª≤5e|☼τ5╩╘µåΩ╬◙☻xª└í∞$┐☻∙d▼}╒R⌠AU@Ω♥δÇi0î┴ ↕ù‼☼ƒ┌Aw£╧à7û«W3ùΦ╚A)P○♥Xn⌂øôEΦGB≥╢g[∟a(◘&¥◙─♂→A@┴ö≡↕9PZK║î⌂eóë≥─Åⁿ1‼╢▀ó╙ª▲╒π╗tΣ4○√;■<ä║äqñ8╠T/»q\→↔1ç°ΘZδV♀EçZ▄g┤Å╤ ┴àúJ║wµ$▄«N

Run and debug it

I started with the optimal published programs.
I used some regex-fu, to limit it to the shortest programs that use at most 2 cells. Then I trimmed any trailing < or > characters. I think this is a possibly conservative way to ensure that there are no extraneous non-zero cells at program termination. Then I ran it through an experimental stax program I wrote to generate stax programs for fixed kolmogorov-type output.
This program works by repeatedly applying string replacements. At each step, it looks for >1 length substring that occurs most frequently and replaces it with an unused character.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ @JoKing: I think I addressed the extraneous non-zero cells. It cost over 200 bytes in brainfuck program size, but I made it almost all back in compressability. \$\endgroup\$ – recursive Aug 11 '19 at 14:06
9
\$\begingroup\$

Charcoal, 707 698 410 + 3627 = 4334 4325 4037 bytes

UT≔”}⊞J5±)↷γ²⁼⎇⦃<✂f^⊗L…¬⁻←«θ↥v⊙^≔¶υSψVτ16⁷·9I⌕↘;⦃@Pmt↙ |TL ‹.bE^↷Am⟧←⪫✂«GIχ¤⟲V⁻PÀ$χ¹'$↙‖%S³6◧N=$kHIpQ×ïu|%÷I↖➙⁸≔Wλ¹ê8⌕dNK‽3H∨↥γh➙↘⊙⊕“~Oj↨-⬤…⊟⁺§◨CB℅P⌕KNEAR№K⬤X"¬S⎇⧴V⁻±6⁼✂kι×CÀ⊞‴≡w↓γ=`→P5η1C⊖OSoNυs⊘$M↙êαη↖φ¡¿:θ-γ“rJW%E(7<w¤Uφ´ρHπ←SX↔τ↧%<Tº⎇0gθμ↓⌕;σw⌈pL;Y↘YΠ⊙>ξLzλ↓⁸ι⎚|⌕ΠP″M³⧴⬤¦➙⟧⌕/δ;↥⁻ºJK⌊≡<⊖λ✳Jκ⟲➙ξ⭆|^Σ*βMπ⍘⊟;ÀU÷‹⭆◧�ωκ?σηkYOδO/Bº?lAnaK{*Kaκ◨+↧aSφ0q‖B/φx⊘⌕«³ψü✂‹º≡/yc⁴&J↙S²~⎇z§‖$SP≧”θG↘←¹⁴+⮌⪪θ⸿↑Fθ§⁺+-ι⌕-+ιG→↙¹⁴-

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

UT

Turn off space padding.

≔”...”θ

Assign a large compressed string consisting of @JonathanAllen's answers for -128..-15 but with + and - signs transposed.

G↘←¹⁴+

Draw a triangle of +s of side 14, which generates the correct results for 1 to 14. The cursor is left in the bottom corner, although the trailing return on the compressed string will move the next output to the next line.

⮌⪪θ⸿

Split the large string on return characters and print each substring in reverse order, thus generating the results from 15 to 128.

Move up a line so that the result for 128 is overwritten by the negated result for 128.

Fθ§⁺+-ι⌕-+ι

Loop through the string transposing + and - back again so that they generate the correct results for 128 to 241.

G→↙¹⁴-

Draw a triangle of -s of side 14, which generates the correct results for 242 to 255.

| improve this answer | |
\$\endgroup\$
5
\$\begingroup\$

Jelly, 1224 + 3716 = 4940 bytes

⁾+-ẋ€Ɱ14ZY€U0¦j“6VⱮ×ė7¬(Ị¢ẋṀⱮM⁵Ѭkbvœ⁸½ẋƓ0⁽ṖçḟŻßɓẉḷ0Ƙ¥@ⱮZĊⱮ{ṫṇØ"ỵðẓ⁵!ḳqḄƬiỴƥṇØm@ɗẆḅƥƲ⁴ŀ-5¦€ÑɓZĖ/gPṄḌ!ẹ$ḞıƒĿỵ⁷£Q.%¦ẊiUı-M⁹ƈxṁ,CsḲtÆƇỴṄĿiæEṛⱮẒʠþƘ%ƘƙṾ ('ȥ€½⁵ḥ+,þ@ẇ&ạV|ĊuAYḃfṖƘLƥQtPƬivxHj)Ṇɓ5JṘØẓæĿøɗjḥrñþa®OṅḍṪ¥=ɼġċṫßṬỌƈrUẉçŻ½\=]€ʂ_ⱮṖ¥Ƥȥ6SṡÆcạdn;ṅⱮDɦ⁹ṢAy)~Ḷ`ẒẓMTİṂḋ|ẉ]Wɠ¿⁾Ṣ|ḷ6hẸƒⱮQ1ẏƝC@Ŀ!ʠ⁽ṃ@ƓŒQ3@ƝḊñçcZ\¥3Z¤~çD>ċọuⱮȦAẈⱮ%L3Æ¢ḞtĖė!ƇtñṪɓẓ¥Fṅ⁵shB'wṪẸ¦ṄÞṭ³ʂḶƊ³iȧṂRœŒƤ\r1Çwi6ŀỵɼḃa⁵Ṣ_Q⁸Ẹ'{|\+Æ®|ḤcʂÑ/Ɓz¶ɦÄ!ʂ"Ẋ ẓĠĠ⁷⁵QƝ¶%ṙƇḋ[^j&W×*°ḳçʂSżḊⱮ⁻IȦṄXȥlẋḅ7;⁺ḃİÞÆðLX¢1K£€Ä&X½VȮ(;Q£ḞḢ¹zG+ṅ¹LḥW³ḅd@^ẊḶJ¹T8ṛ($ȧṢzq,Ṫ⁻ȥ{Ṛ"Ḍ®Ä8QḋþɼȮhỵB"Ḍ⁶ȧZ⁵ẒNɓḃȧ¶Ƒð$Ẇ/"Eṭ*I:ØḃL}<KȦ+ṣ¥x&Ṇ£Œṫḋġ0lİḍ¿H£(ỌƝ×^Ḃ°⁽⁼UƭĠḥkQð7ṫƤżȷƘxjƑRḣqƒ$HƬ7ḳ-JµnṇṣðXŻİẉbSu×]bṾ0ƊHßçQh⁸°ƒɦSCñ_⁾ʂC⁼Ġø⁵SAʋƊİ¡⁴ÄḋẸḶwȧZẈĠ7rṀẏẉṖa¤ɱELƝȧẈṣṄk]d⁹øṇÞṡ.ạtƥṢḅ⁺ṂLpÑƘṄṡḍ⁵,Ǥ$Ọ8ṛuṚvAṖÑ1!vƤD3߶ʂа]EÞUĠ€ḋḲ⁸¬r`YḊ0ṙ5ċmṅȯ*ɲU÷pƭẉṭȦB¹ɦSNɱ)]ĠṾʋ³Øḟ23ṭð#ẆuẎṬṫVɠ(ỊỊQɼF}ịƒ$Ẏ_Ṡ'ḳOLc?ṾŀẊẎṆ⁵p"VẏAȮ⁴ⱮȦ®e®Ɱi"ÇJẊ4ñḍḲY]ḌḌẓ⁺ƙ"iṄḅoLṙfOS&}HGɼĖİĠḷuḃ³ṡıḳỊẹzq⁶ƈ£ċHZɱ.#⁶ḟUṗŀȮṘḶḲ]@¶+ḊĖ8ĖṆɗçŻŀ®ṭẇƓḄḷıM@⁷²36ɲṗ¡ḂḊ'Ṿ⁵ėƙṘ-⁺µʠṡṂ[_¤ḥṢ]ṘÐḤ½ḟ4ȷ}E¹Ṙb⁹ḅḢ¹hƬZ§Ẏẹ÷Æ$ḅoĖẉ⁹ịJ.ȥḊẋʋṄȯ1<ẎṄḲṛœ"æ)ḥ8)ḤlñA⁾%⁶LỴ⁶M4Ṙ\`ỵƊȥŀƒ⁷ḌƬƙḳƑ⁴vʂ⁻ðQpñḷḳṄœ>ṪỴƭƙɓ3[&Ḅzḅ<⁾µİṪȧ⁹C>ẹ{ẈÐlC&j?LṆṛ⁽æȤið<⁽$Ḋ7⁻FṡḅɓɱḂJoPŻẆṃṛḂ¹ẓð[1eƘ2T⁶ḟɼ7P~©ṚṙE8RƒṬẹLœẇẸịøḷ*⁾²ÄƓy€VƈɱNSẏẓѶpƲḞḅX⁹ọaœ<aỴTĠ^ðƑṙẊḅOḥŀG4ị¤ÑėÐịʠɗ=YṚċẋĠżẉịṪṁtḳṪ{ṬṃıızD/ĊvȤpḣðСþfÞ⁶ỵỊµṅḷÄ÷Vẇ\Ạ$-§OẠn^ȯfẎlḊd⁶ni¥ẓɱn¶’ṃ“¶><-][+”¤⁷

A full program.

Try it online!

How?

Almost entirely compression of current bests on esolangs which leave only a single non-zero, with trailing tape moves removed. There is probably a way to evaluate a subset of BF programs such that they will terminate and yield the shortest solutions that'd beat this naive program. There may well also be a way to beat this by a smarter pattern-based or factorisation-building program.

⁾+-ẋ€Ɱ14ZY€U0¦j“ ... ’ṃ“¶><-][+”¤⁷ - Link: no arguments
⁾+-                                - list of characters ['+','-']
    €                              - for each:
   ẋ                               -   repeat
     Ɱ14                           -   mapped across [1..14]
        Z                          - transpose
         Y€                        - join each with newline characters
           U0¦                     - reverse the rightmost
                                   -   (now we have ["+\n++\n+++\n ...","... \n---\n--\n-"]
                                ¤  - nilad followed by link(s) as a nilad:
               “ ... ’             -   a really big number compressed as base 250
                       “¶><-][+”   -   list of characters ['\n','>','<','-',']','[','+']
                      ṃ            -   decompress - use as base 7 digits [1,2,3,4,5,6,0]
              j                    - join (the list ["+\n++...","...--\n-"]) with that
                                   - implicit print
                                 ⁷ - a newline character
                                   - implicit print
| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Fixed up the offenders (and removed trailing tape moves) \$\endgroup\$ – Jonathan Allan Aug 11 '19 at 7:24
5
\$\begingroup\$

SuperMarioLang, 231 + 32894 bytes

)
))++>(>+)*>[!((&(>[!*>-)-[!([!
===+"="==="=#===="=#="====#==#
+++<(       )    !+< !  ( <
+===+ (   - .    #=" #===="
>[!+( (   !(<
"=#++ (   #="
- (++ !.))    )))            <
) +++ #======================"
+ +++
+ ++!
!+<=#
#="

Try it online!

This sure can be golfed more, as the output is the most basic for brainfuck, but it took me all day to write this answer (my three children leave me little time to spare) and I'm proud that at least I managed to achieve this.

| improve this answer | |
\$\endgroup\$
4
\$\begingroup\$

Python 2, 70 + 8428 = 8498

-2 Bytes Thanks to A__!
-20 Bytes Thanks to Jonathan Allan!
-229 Bytes by putting the number in the second cell
-1000ish bytes by switching from 16 to 9

p='+'
i=1
exec"print[p*i,i/9*p+'[>'+p*9+'<-]>'+i%9*p][i>20];i+=1;"*255

Try it Online!

Output

| improve this answer | |
\$\endgroup\$
4
\$\begingroup\$

Ruby 271 + 5363 = 5634

1.upto(255){|n|r=n>(o=n>128?256-n:n)??-:?+;puts o>20?(s=o.to_s(i=(3..9).find{|i|!(s=o.to_s i)[1..-2][s[0]]}).bytes;s[-1]+=s[0]%8;(s[1,9].reverse.map{|c|(c-=s[0])<0??-*-c:c>0??+*c:?-}*?>+'[>'+?+*(s[0]%8)).tr(n>o ?'+-':'','-+')+'[-<'+?+*i+'>]<<]'+(s[-1]>s[0]?'':?>+r)):r*o}

Try it online!

Converts each value to the smallest base which doesn't contain a zero its initial digit at any other place, and then converts from that base. Values greater than 127 are calculated as their inverses.


Non-Wrapping, 221 + 5888 = 6109

1.upto(255){|n|puts n>20?(s=n.to_s(i=(3..9).find{|i|!(s=n.to_s i)[1..-2][s[0]]}).bytes;s[-1]+=s[0]%8;s[1,9].reverse.map{|c|(c-=s[0])<0??-*-c:c>0??+*c:?+}*?>+'[>'+?+*(s[0]%8)+'[-<'+?+*i+'>]<<]'+(s[-1]>s[0]?'':?>+?-)):?+*n}

Using the same approach as above, with non-wrapping cells.

Try it online!

| improve this answer | |
\$\endgroup\$
4
\$\begingroup\$

JavaScript (Node.js), 691 + 3627 = 4318

Using the same approach as @Neil's Charcoal answer, and therefore also based on @JonathanAllan's Jelly answer.

_=>(a=require('zlib').inflateRawSync(Buffer('bZXRsQMhCEX/0wpDB4yNOPbfxoMLKLAvs8lyQBEBDf2I9MHXf+I3X/f9hCJVsckdBgH3gih8YHT80Kpj01zQ7dUZb9osZ0Fzfvra+qiCl6GaqTB9vTdvNn2TjiaVjvBQKG5mHS/mMBGrywc1Vl2eIzqbwFPReVjJo1+I3mLfbAOYY201Sm491vaxDM+Vh9WSaJtgfBDYUHQeVrKkqzMEaYMrWpgbMS7MtIlIry3DgztWahbqNPElykKItD4e1hgN8qyrHA1CJ/dC5Imz3WS5PeDKDdGKDvS8WqBq+reSd4lH2Gtjcr9W95ydm/8kcaaRPsNpMiHS1kjW8qWAOsFmWEdHeiw/kenG1zdqzR0bVXhy0VKVPQVesFNloU4TI5nsp4qzunLytsCheK4B2Gz0UeXobM+M3Q2NcXhx+GlF389GH53eWr31utUf90W02MVu89LZs45IhP/Qc6jx9dYoCs8W1d4vKHHO8wJ9l8y4Vd614g788IzrViKArok/CmguX/KLqSl+c7h3STZcxUYVnvwH','base64'))+'')+`
--[>-<--]>-
`+[...a.split`
`].reverse().map(s=>s.replace(/[-+]/g,c=>c>','?'+':'-')).join`
`

Try it online!

| improve this answer | |
\$\endgroup\$
3
\$\begingroup\$

brainfuck, 3785 + 4120 = 7905 bytes

-->>>->>->>->>+>>->>->>->>-->+>->>->>->>->+>->>->>->>>+>->>->>->>->>>>-->+>->->>>>>-->+>->->->>>>->+>->->->>>>-->+>>->>>>>-->+>>->+>>>>-->+>>->->>>>->+>>->>>>>->+>>->+>>>>->+>>->->>>>>+>>->->>-->->->+>->+>>>-->->->+>->+>->>-->->+>+>-->+>>>-->->+>+>-->+>->>-->->>+>->+>->>-->->++>+>-->+>>>-->->++>+>-->+>-->->-->->+>+>->+>->>-->->+>+>->+>->>-->->>+>>+>>>-->->>+>>+>->>-->->++++>+>-->+>->>-->->++>+>->+>>>-->->++>+>->+>->>-->->+>+>>+>>>-->->+>+>>+>->>-->->+++>+>->+>>>-->->+++>+>->+>->->>++>->->+>>-->->>++>->->+>>->>>++>->->+>>->>>++>>>-->+>>>>++>>>-->+>+>>>++>>>-->+>>->->++>>>+>>->->->++>>>+>>-->->->++>>>+>>->>->++>>>+>>>>->++>>>+>>+>>->++>>>+>>-->+>->++>>>+>>+>->>+>>>>>>->>+>>>>>->->>+>>>>>-->->>+>>>>>->>>+>>>>>>>>+>>>>>+>>>+>>>>>-->+>>+>>>>>->+>>+>>>>>>+>>+>>>>>->>++>++>>>>>>>++>++>>>>>+>->->+>>>->+>>->->+>>>->+>->->->+>>>->+>-->->->+>>>->+>->>->+>>>->+>>>->+>>>->+>+>>->+>>>->+>-->+>->+>>>->+>->>->+>>->->+>>>->+>>->->+>+>>->+>>->->+>>->++>+>>>>>->->++>+>>>>>-->->++>+>>>>>->>++>+>>>>>>>++>+>>>>>+>>++>+>>>>>-->+>++>+>>>>>+>++>-->+>>>>>>++>-->+>>>>>->++>-->+>>>>>++>->-->+>>>>>+>->-->+>>>>>>->-->+>>>>>->->-->+>>>>>-->->-->+>>>>>->>-->+>>>>>>>-->+>>>>>+>>-->+>>>>>-->+>-->+>>>>>->+>-->+>>>>>>+>-->+>>>>>+>+>-->+>>>>>++>+>-->+>>>>>+++>+>-->+>>>>>++++>+>-->+>>>>>>++>>+>+>>>>->++>>+>+>>>>++>->>+>+>>>>+>->>+>+>>>>>->>+>+>>>>->->>+>+>>>>-->->>+>+>>>>->>>+>+>>>>>>>+>+>>>>+>>>+>+>>>>-->+>>+>+>>>>->+>>+>+>>>>>+>>+>+>>>>->->++>+>->->>>-->->++>+>->->>>->>++>+>->->>>>>++>+>->->>>+>>++>+>->->>>-->->++>++>+>>>>->>++>++>+>>>>>>++>++>+>>>>->>+>>-->+>+++>+>-->->+>>>+>->+>->>+>>>+>->+>->>+>>-->+>+>+>->->+>>-->+>->+>-->->+>>-->+>->+>->>+>>-->+>->+>+>->+>>>>+>>>->+>>>>+>>->->+>>>>+>>-->->+>>>>+>>->>+>>>>+>>>>+>>>>+>>->>+>>-->->+>>>>+>>-->->+>>+>>+>>-->->+>>-->+>+>>-->->+>>->+>+>>-->->+>>->>+>>>->->+>>>+>>>->->+>+>>+>>>->->+>->>+>>>->+>+>->>+>>++>->->+>>>+>>++>->->+>->>+>>>->+++>+>-->->++>++>->->>>->>++>++>->->>>>>++>++>->->>>->->++>+>+>>>>-->->++>+>+>>>>->>++>+>+>>>>>>++>+>+>>>>+>>++>+>+>>>>++>->>+>->->>>+>->>+>->->>>>->>+>->->>>->->>+>->->>>-->->>+>->->>>->>>+>->->>>>>>+>->->>>+>>>+>->->>>-->+>>+>->->>>->+>>+>->->>>>+>>+>->->>>+>+>>+>->->>>++>+>>+>->->>>++>++>-->+>-->->>>+>++>-->+>-->->>>>++>-->+>-->->>>->++>-->+>-->->>>++>->-->+>-->->>>+>->-->+>-->->>>>->-->+>-->->>>->->-->+>-->->>>-->->-->+>-->->>>->>-->+>-->->>>>>-->+>-->->>>+>>-->+>-->->>>-->+>-->+>-->->>>->+>-->+>-->->>>>+>-->+>-->->>>+>+>-->+>-->->>>++>+>-->+>-->->>>+++>+>-->+>-->->>>>->++>+>-->->>>->->++>+>-->->>>-->->++>+>-->->>>->>++>+>-->->>>>>++>+>-->->>>+>>++>+>-->->>>-->+>++>+>-->->>>->->->+>-->+>->+>-->->->+>-->+>->+>->>->+>-->+>->+>>->->+>-->->->+>->->->+>-->->->+>-->->->+>-->->->+>->>->+>-->->->+>>>->+>-->->->+>+>>->+>-->->->+>-->+>->+>-->->->+>->+>->+>-->->->+>-->->++>++>-->->>>->>++>++>-->->>>++>->>+>-->->>>+>->>+>-->->>>>->>+>-->->>>->->>+>-->->>>-->->>+>-->->>>->>>+>-->->>>>>>+>-->->>>+>>>+>-->->>>-->+>>+>-->->>>->+>>+>-->->>>>->->++>-->->+>>->->->++>-->->+>>-->->->++>-->->+>>->>->++>-->->+>>>>->++>-->->+>>+>>->++>-->->+>>-->+>->++>-->->+>>->->>++>-->->-->+>-->->>++>-->->-->+>->>>++>-->->-->+>->>>++>+>>+>>>>>++>+>>+>>+>>>++>+>>+>>-->->>>+>++>+>->->>>>+>++>+>->-->->>>->++>++>->->>>>->++>++>->-->->>>>++>+>->->>>>>++>+>->->>>>++>++>>->-->->>>++>->++>->->>>>++>->++>->->>>>->++>+>->>>>>->++>+>->-->->>>>++>>->->>>>>++>>->->>>>++>->+>->-->->>>->++>>->->>>>->++>>->-->->>>+>->+>->->>>>+>->+>->->>>>++>->>->->->>>+>->>->-->->>>+>->>->->>>>+>->>->->->>>>->>->-->->>>>->>->->>>>>->>->->>>>+>->->->-->->>>>->->->->>>>>->->->++>->->>->>->>+>->->>->>->>>->->>->>->>->->->>->>->>-->->->>->>->>>+++++[>++++++<-]>+[>+++>++>>++>>+++>++>+<<<<<<<<-]>-->>>-->>>>-[>+<---]<[[<]<]<<++[>>[-]--[<+>++++++]+<<<+++>-[>++<<-->-[<++++>-[>--<<++>-]]]<[>>.<<-]>+[>]->[.>]>[<<[<]>>[-]]<<[<+<<<+<<+<<<+<[<]]>>+<<<++]

Try it online!

This code reads a list of values and produces output in the pattern a [> b < c ]> d, where a, b, c and d stand for a number of '+' or '-' characters.

Except for the first and last 15 numbers, it uses the shortest constants from https://esolangs.org/wiki/Brainfuck_constants that follow the specified pattern.

[
Tape: -2 (end of values), [List of values], 0, 0, "\0 [> \0 < \0 ]> \0 \n" (the spaces are only for better readability. 
      Not in the actual string.
      Zeroes are "not printed yet" markers.
      Printed sequences will be prepended by -1.)
List of Values: charCount, class
class: -2 = end of values, 
       -1 = (char "+", offset 3), 
        0 = (char "-", offset 1), 
        1 = (char "-", offset 5), 
        2 = (char "+", offset 7)

Ascii: 
      ] 93
      [ 91
      > 62
      < 60
      + 43
      - 45
]

[values] 
-->>>->>->>->>+>>->>->>->>-->+>->>->>->>->+>->>->>->>>+>->>->>->>->>>>-->+>->->>>>>-->+>->->->>>>->+>->->->>>>-->+>>->>>>>-->+>>->+>>>>-->+>>->->>>>->+>>->>>>>->+>>->+>>>>->+>>->->>>>>+>>->->>-->->->+>->+>>>-->->->+>->+>->>-->->+>+>-->+>>>-->->+>+>-->+>->>-->->>+>->+>->>-->->++>+>-->+>>>-->->++>+>-->+>-->->-->->+>+>->+>->>-->->+>+>->+>->>-->->>+>>+>>>-->->>+>>+>->>-->->++++>+>-->+>->>-->->++>+>->+>>>-->->++>+>->+>->>-->->+>+>>+>>>-->->+>+>>+>->>-->->+++>+>->+>>>-->->+++>+>->+>->->>++>->->+>>-->->>++>->->+>>->>>++>->->+>>->>>++>>>-->+>>>>++>>>-->+>+>>>++>>>-->+>>->->++>>>+>>->->->++>>>+>>-->->->++>>>+>>->>->++>>>+>>>>->++>>>+>>+>>->++>>>+>>-->+>->++>>>+>>+>->>+>>>>>>->>+>>>>>->->>+>>>>>-->->>+>>>>>->>>+>>>>>>>>+>>>>>+>>>+>>>>>-->+>>+>>>>>->+>>+>>>>>>+>>+>>>>>->>++>++>>>>>>>++>++>>>>>+>->->+>>>->+>>->->+>>>->+>->->->+>>>->+>-->->->+>>>->+>->>->+>>>->+>>>->+>>>->+>+>>->+>>>->+>-->+>->+>>>->+>->>->+>>->->+>>>->+>>->->+>+>>->+>>->->+>>->++>+>>>>>->->++>+>>>>>-->->++>+>>>>>->>++>+>>>>>>>++>+>>>>>+>>++>+>>>>>-->+>++>+>>>>>+>++>-->+>>>>>>++>-->+>>>>>->++>-->+>>>>>++>->-->+>>>>>+>->-->+>>>>>>->-->+>>>>>->->-->+>>>>>-->->-->+>>>>>->>-->+>>>>>>>-->+>>>>>+>>-->+>>>>>-->+>-->+>>>>>->+>-->+>>>>>>+>-->+>>>>>+>+>-->+>>>>>++>+>-->+>>>>>+++>+>-->+>>>>>++++>+>-->+>>>>>>++>>+>+>>>>->++>>+>+>>>>++>->>+>+>>>>+>->>+>+>>>>>->>+>+>>>>->->>+>+>>>>-->->>+>+>>>>->>>+>+>>>>>>>+>+>>>>+>>>+>+>>>>-->+>>+>+>>>>->+>>+>+>>>>>+>>+>+>>>>->->++>+>->->>>-->->++>+>->->>>->>++>+>->->>>>>++>+>->->>>+>>++>+>->->>>-->->++>++>+>>>>->>++>++>+>>>>>>++>++>+>>>>->>+>>-->+>+++>+>-->->+>>>+>->+>->>+>>>+>->+>->>+>>-->+>+>+>->->+>>-->+>->+>-->->+>>-->+>->+>->>+>>-->+>->+>+>->+>>>>+>>>->+>>>>+>>->->+>>>>+>>-->->+>>>>+>>->>+>>>>+>>>>+>>>>+>>->>+>>-->->+>>>>+>>-->->+>>+>>+>>-->->+>>-->+>+>>-->->+>>->+>+>>-->->+>>->>+>>>->->+>>>+>>>->->+>+>>+>>>->->+>->>+>>>->+>+>->>+>>++>->->+>>>+>>++>->->+>->>+>>>->+++>+>-->->++>++>->->>>->>++>++>->->>>>>++>++>->->>>->->++>+>+>>>>-->->++>+>+>>>>->>++>+>+>>>>>>++>+>+>>>>+>>++>+>+>>>>++>->>+>->->>>+>->>+>->->>>>->>+>->->>>->->>+>->->>>-->->>+>->->>>->>>+>->->>>>>>+>->->>>+>>>+>->->>>-->+>>+>->->>>->+>>+>->->>>>+>>+>->->>>+>+>>+>->->>>++>+>>+>->->>>++>++>-->+>-->->>>+>++>-->+>-->->>>>++>-->+>-->->>>->++>-->+>-->->>>++>->-->+>-->->>>+>->-->+>-->->>>>->-->+>-->->>>->->-->+>-->->>>-->->-->+>-->->>>->>-->+>-->->>>>>-->+>-->->>>+>>-->+>-->->>>-->+>-->+>-->->>>->+>-->+>-->->>>>+>-->+>-->->>>+>+>-->+>-->->>>++>+>-->+>-->->>>+++>+>-->+>-->->>>>->++>+>-->->>>->->++>+>-->->>>-->->++>+>-->->>>->>++>+>-->->>>>>++>+>-->->>>+>>++>+>-->->>>-->+>++>+>-->->>>->->->+>-->+>->+>-->->->+>-->+>->+>->>->+>-->+>->+>>->->+>-->->->+>->->->+>-->->->+>-->->->+>-->->->+>->>->+>-->->->+>>>->+>-->->->+>+>>->+>-->->->+>-->+>->+>-->->->+>->+>->+>-->->->+>-->->++>++>-->->>>->>++>++>-->->>>++>->>+>-->->>>+>->>+>-->->>>>->>+>-->->>>->->>+>-->->>>-->->>+>-->->>>->>>+>-->->>>>>>+>-->->>>+>>>+>-->->>>-->+>>+>-->->>>->+>>+>-->->>>>->->++>-->->+>>->->->++>-->->+>>-->->->++>-->->+>>->>->++>-->->+>>>>->++>-->->+>>+>>->++>-->->+>>-->+>->++>-->->+>>->->>++>-->->-->+>-->->>++>-->->-->+>->>>++>-->->-->+>->>>++>+>>+>>>>>++>+>>+>>+>>>++>+>>+>>-->->>>+>++>+>->->>>>+>++>+>->-->->>>->++>++>->->>>>->++>++>->-->->>>>++>+>->->>>>>++>+>->->>>>++>++>>->-->->>>++>->++>->->>>>++>->++>->->>>>->++>+>->>>>>->++>+>->-->->>>>++>>->->>>>>++>>->->>>>++>->+>->-->->>>->++>>->->>>>->++>>->-->->>>+>->+>->->>>>+>->+>->->>>>++>->>->->->>>+>->>->-->->>>+>->>->->>>>+>->>->->->>>>->>->-->->>>>->>->->>>>>->>->->>>>+>->->->-->->>>>->->->->>>>>->->->++>->->>->>->>+>->->>->>->>>->->>->>->>->->->>->>->>-->->->>->>->

>>+++++[>++++++<-]>+        31
[>+++>++>>++>>+++>++>+<<<<<<<<-]    93 62 0 62 0 93 62 31
>-->>>-->>>>-[>+<---]       complete string 0 0 91 62 0 60 0 91 62 0 10
<[[<]<]<<                   go to first class cell
++[                         repeat for each value pair
  >>[-]--[<+>++++++]+<      ascii plus
  <<+++                     add offset 3 to value
  >-[                       if not class = "plus 3"
    >++                     change charater to minus
    <<--                    set offset to 1
    >-[                     if not class = "minus 1"
      <++++                 set offset to 5
      >-[                   if not class = "minus 5"
        >--                 set charater to plus
        <<++                set offset to 7
        >-                  delete class value
      ]
    ]
  ]
  <[>>.<<-]                 print char value plus offset times
  >+[>]                     go to next string
  -                         set printed marker 
  >[.>]                     print string
  >[                        if not end of chars
    <<[<]                   go to cell next to next class cell
    >>[-]                   empty two cells right (for exit if)
  ]<<[                      else
    <+<<<+<<+<<<+           reset printed markers
    <[<]                    go to exit if cell
  ]
  >>+                       set empty cell = 1 (for scanning over non null cells)
  <<<                       go to class cell
  ++                        repeat if not end of values
]

brainfuck (the easy way), 41 + 32895 = 32936 bytes

+[>>++++++++++.+[<++++>-]<-<[>.>+<<-]>>+]

Try it online!

+[              start loop (loop until overflow)
  >>            go to newline position
  ++++++++++.   print newline
  +[<++++>-]<-  store 43 (plus)
  <[            for each count
    >.          print plus
    >+          increment next count
    <<-         decrement current count
  ]
  >>+           increment next count
]
| improve this answer | |
\$\endgroup\$
2
\$\begingroup\$

Unofficial Keg 16 + 32895 = 32911 bytes

A baseline solution for a golfing language. This is the simplest I can think of.

ÿï((:|\+$;)_\
')

Try it online!

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ As it stands this needs reversing (although I asked if we may output descending) \$\endgroup\$ – Jonathan Allan Aug 11 '19 at 2:58
  • 1
    \$\begingroup\$ I will wait until OP replied with your query. \$\endgroup\$ – user85052 Aug 11 '19 at 2:59
2
\$\begingroup\$

Ruby 23 + 32895 = 32918 bytes

256.times{|n|puts ?+*n}

As a baseline. This is the simplest solution I can think of.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ 0 should probably be 1 (although I asked if we may output for zero too) \$\endgroup\$ – Jonathan Allan Aug 11 '19 at 2:57
  • \$\begingroup\$ -3: 256.times{|n|puts ?+*n} not that it matters too much... \$\endgroup\$ – primo Aug 11 '19 at 15:11
1
\$\begingroup\$

Retina 0.8.2, 28 + 16640 = 16668 bytes


127$*+128$*-
\+
¶$`+
-
¶$'-

Try it online! Includes output for 0. Just outputs using +s up to 127 and -s up to 255.

| improve this answer | |
\$\endgroup\$
1
\$\begingroup\$

Scala, 95 + 16639 = 16734 bytes

object M extends App{(1 to 127).map(x=>println("+"*x));(0 to 127).map(x=>println("-"*(128-x)))}

Try it online!

A simple answer which obviously is not going to win. Uses only the fact that the - operator (decreasing a byte) wraps back to 255.

| improve this answer | |
\$\endgroup\$
  • 1
    \$\begingroup\$ Scala isn't the best golfing language, but you can save quite a few bytes by just writing a method instead of a whole app, that's allowed under typical golfing rules here. Additionally, instead of printing out the result, it's usually more byte efficient to just return the list. On Try It Online, you can put all the object extends app type stuff in the header and footer, to run your method without counting the irrelevant bytes. \$\endgroup\$ – Ethan Aug 13 '19 at 14:42
  • \$\begingroup\$ In this case, you can save 36 bytes with: tio.run/… \$\endgroup\$ – Ethan Aug 13 '19 at 14:46
  • \$\begingroup\$ 22 bytes \$\endgroup\$ – user Sep 14 at 23:11
1
\$\begingroup\$

05AB1E, score: 4848 (1219 bytes source code + 3629 bytes output)

'+14L×»Â'+'-:•тômG‚ΣP;e3₃ìèÕwƵÜè-½;¨Z±µΛé±V™NkKJžšë₅ušΘ(M₄+ܧ‘мoÕθÚzÇYï#J×¢θýει™₃tQØËв¿U®GƵ´GZ’¯ε¨jjØÛλÄ₅X∍µxθÆvËjS¹∊f˜«VÐZ<ÇĆ’Š2&ØÍäßÍĆlΓV₆ëßê©Œ‡ÛiyĆ=*÷Í´¢‹j,3½íµ'ž4‘û29ôãζм§x…1P|ÛéΣ=~çš5Œ±€Ô“q òǝ?ó¬Æí5¢G‘°êóÿв4LFÍK&zζb2Ó∍æïι8₃4XƵÜÙôt₁‘,Ö…6₅ÞαÇø†c÷Ûλ9…F;ĆA¬iмéλ8ä¶×ƶYΔè¡aû
v=M„ûñ]C₅Õ¶Þ*Ú`Úˆ/₃UιΩW¾eTεvˆ£nYõ¶S¼ÿ{õN9Ω¨£1w‚Ï”Xd;¹OýŒéDнĀvÌ–d=±ΛΣÃÊîD—GR>~ºD‹K¥‘l×yz.éFE1Í©ØM/ƒœOαU‘KΓO‰∍Aм‚œ2нƶþøÌ×¼āHgΩC'Λê¡-߅̾Ā–м–¿<₂δ¡áтgö¬Í~θFíнā‹°ü8[À(xï¸.›*W©¹º₅ÇмδçΛλÉFÕL4†EćÛ´ǝ{тÀ¯†ª™ŽćÉuè¬ƵÀSìFÙη¶1ȸ֛GÜlRv˜jy5mfè∞_åEηŠyo‡xÐ/™¥òÜ#Áx#м6r&₁cÿX۬ƄÌƵ₅∊бγ²Θj∞;6o·¼ýŠΩÚò›c[>ö₅¥=—ªÃ±¿ecSBÐ6Ê!ú¢E¡âìþ߃¿;Ò;„Xoƶ*∍Σǝñ"Tµ†8s®βµ4ìA|«÷γt³+<B¤špTp¸ï7Ëo[>–îiTôó檂?É8zн²ìC1ãl6+ƶå4sЌÚb(°·8ˆ´ˆŸ²ÚÌY3ŸËîÿ‘àUāçh9im„ÝĆm3ŠC×η“åX¨₄|ëPô3O<6Mþ'Ì-s{e`ζQΔ¹œP@l%¥‹èδcsÎcΘÂþ®i₅∞ð¡@`¸¿…BÎN2н>g;ΛSníÐ^Rαθ₆ΣÕ3¹ÐÔCfrQ¦7¨gfŒ|v||þÚÜvz≠pệT˜ǝ=ß·„®¡xи™#?†-Aʒ2åβ₃A¬Ão6ºтõ}Ë.&QηÕ~Δ4€@-5î^a̬.»Èõ4áL¾ò¥n
¶p›éŽžgǝSZγāmεålz₅°dβÂ~λà€Ê%zmŠиˆRη≠éwüǝΛζƵмƶdζ`SÖ₅\≠³äŸj!"(†Üćí“ŠxVöÇe#‡PÏɇ"xð®6ÊεGиe"NÊ›i.k…’Ú8:ǝ/₂ÌÜkãŽo™Áā‚ζΩ«мÁp=}ÂýõλиëÆζиîSÖt¶‚wĀθºd“
₆ŽsLвQ”ÖÜvGõƶiò{÷ÀPy/‹θÑè}¿Á5º˜¯sëØSËƶK_ÍyX∊3Øå4IOθ I+∊ÌñÙçakÞŸŒʒ椱,mεjæ‰O%<ÅtƒVöV=³ÇƶƒC¬‰xðȬM4Ïóä)∍Êfa§õØÂ,“X¾₆₄Ö¦ÈJµÿmȾÎ∍=¡YнŸV!¨J£ü|&¢cUg4e±6w™¼“fÊÙ ,Ž|šP·ùèd}ãŠÅ#GγhYÇN´¼ÁÌMGʒ§Æ1¸‚Δ:j7ΩƵAqá¢<äò´Θ•“-+>][<
“ÅвJs»

Output is a port of @Neil's Charcoal answer, so make sure to upvote him as well!

Try it online.

Explanation:

'+                      '# Push a "+"
  14L                    # Push a list in the range [1,14]
     ×                   # Repeat the "+" that many times as string: ["+","++","+++",...]
      »                  # Join these strings by newlines
       Â                 # Bifurcate it (short for Duplicate & Reverse copy)
        '+'-:            # Replace all "+" for "-"
•тôm...ò´Θ•              # Push compressed integer 18302226724133383998250107335646038608225046109581810887431446835557987256955354954509163336111304735021044106950262344427892947550841899099611054599885158084492762836812161427050275372983896356189873217422270707048679161884382784973706990123491668808316983431947218815813441209357230471947480445527653281307616982417034289994948061000591427114479102114229222423495882782326672492922269629953210111953959859902281658658439835047182218017657439552630082372181376525413759195763958434475193943488791777228373958162363214252781530693967200164833437881609482421594458966138936433283311419810119896020066082377462298326514652481546557215787238749539873039910952003326954299252586309028025200870623285261199142261807190771369911425142504345271105103035478661301795311828767848235694787283635190364512722037791815037475799545052058894119573664059402985074146226606245848663046901585891882552845134633210352731812274795773552227786140415336764040421001184646630833787917147474644077938952053956874031774587527717793206158934471919975714697099518810712871948398923739276321843455690477328633199064849928974478179435369018512187592263559949835435473650276637191671401061097340919482725489354844550472281209666291367830643727358624135371626379451084552903536762775083445643853806852513122856150361979701049267928548063465967555886420646898485890108420374549485423234679327438138302730692296669063696581268627535131608200283731275951916433249161017999011290215932205767570177905442947203826039265793694687731078121685736352831955773450680945121984143563963149079990880719573067270197057276219243821370885160589340870891346257233778661271435191351926058080186177296974642815621539128350975752011448032262905976766027084285390087966682234081285502231618383962136055937741758125210487103109250885525370548106186539295203084216890820183575639032509902729248016346072449636148699098049659529168757116706057794418245039559549604674043961198447420311513558044229534569679723496972989178091506175996419296780639212192856671882116470677803387276814324094247508763467887301684211112080372036284371596072213153957411329532202432808677726223798116216330275138697515009114689489577370759238857602332613821627667530873656034962827810927061440822808985980383150080767015247752949877604372029666921293343149038246728649404223795601960991061986482063744094221616603849190547637439116347239768975065217383194655478092271791087679802480625740835053103772632489195507735140119501008503485917456615266596210333924964188989678201446160111091052524780358620148464886929989973412559470628329156848340802659185674541202787279386158230228148429451357621709967247567009904339076971643378255946241011579618610095231079053137553024558887196808709177094386352264708730475553352082713138948975317023830903305435434148828341201637230241697870602236452176330225025183518037443992277303117971849493548326433875
           "-+>][<\n"    # Push string "-+>][<\n"
                     Åв  # Convert the integer with this string as custom base
                       J # Join all characters together to a single string
s                        # Swap so the triangle of "-" we created it as the top of the stack
 »                       # Join the strings on the stack by newlines
                         # (and output implicitly as result)

See this 05AB1E tip of mine (section How to compress large integers) to understand why •тôm...ò´Θ• is 183...875.

| improve this answer | |
\$\endgroup\$
1
\$\begingroup\$

Rust + -O, 618 576 + 3953 = 4571 4529 bytes

-O to turn on optimizations, otherwise TIO times out because it's too slow. If you're using cargo, use --release instead.

||{let r=|s:&str,n:i64|s.repeat(n as usize);let f=|n:i64|if n<0{r("-",-n)}else{r("+",n)};let w=|n:i64|n as u8 as i64;print!("{}",(0..256).flat_map(|n|(0..9).flat_map(|a|(-9..=a).map(move|b|(a,b))).flat_map(|x|(-9..9).map(move|c|(x,c))).flat_map(|x|(-9..10).map(move|d|(x,d))).filter_map(|(((a,b),c),d)|match(0..256).scan(a,|s,_|if *s>0{*s=w(*s+d);Some(1)}else{None}).sum(){256=>None,r if w(r*b+c)==n=>Some(format!("{}[>{}<{}]{}{}",f(a),f(b),f(d),if c!=0{">"}else{""},f(c))),_=>None}).chain(vec![r("+",n),r("-",256-n)]).min_by_key(|s|s.len())).fold(format!(""),|a,b|a+&b+"
"))}

Try it online!

This generates programs in the shortest of the following 3 forms:

  • +++...
  • ---... (using underflow)
  • a[>b<c]d, where a, b, c, and d are some number of '+' or '-' characters

Full explanation:

// Closure
|| {
    // Repeats a string (shorthand)
    let r = |s: &str, n: i64| s.repeat(n as usize);
    // Formats a constant as a sequence of '+' or '-' characters (depending on sign)
    let f = |n: i64| if n < 0 { r("-", -n) } else { r("+", n) };
    // Wraps an i64 around a u8 cell
    let w = |n: i64| n as u8 as i64;
    // Print the solution
    print!("{}",
        // For rows [0, 255]
        (0..256)
            // ... map each row to its solution
            // For a in [0, 8]
            .flat_map(|n| (0..9)
                // For b in [-9, a] (flattened to `(a, b)`)
                .flat_map(|a| (-9..=a).map(move |b| (a, b)))
                // For c in [-9, 8] (flattened to `((a, b), c)`)
                .flat_map(|x| (-9..9).map(move |c| (x, c)))
                // For d in [-9, 9] (flattened to `(((a, b), c), d)`)
                .flat_map(|x| (-9..10).map(move |d| (x, d)))
                // Calculate result of `a[>b<d]c`
                .filter_map(|(((a, b), c), d)| {
                    // Loop up to 256 times to calculate the number of times X will run in `a[>X<d]`
                    match (0..256)
                        .scan(a, |s, _| {
                            if *s > 0 {
                                *s = w(*s + d);
                                Some(1)
                            } else {
                                None
                            }
                        })
                        .sum()
                    {
                        // Assume infinite loop
                        256 => None,
                        // Finite loop, ends in the value we want, now format the values
                        r if w(r * b + c) == n => Some(format!("{}[>{}<{}]{}{}", f(a), f(b), f(d), if c != 0 { ">" } else { "" }, f(c))),
                        // Finite loop, doesn't end in what we want
                        _ => None,
                    }
                })
                // Append the trivial cases of all '+' or '-' characters
                .chain(vec![r("+", n), r("-", 256 - n)])
                // Find the shortest solution
                .min_by_key(|s| s.len())
            )
            // Join each row
            .fold(format!(""), |a, b| a + &b + "
")
    )
}

Decompressing a solution would definitely be shorter, but this was more fun in my opinion :)

| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

GolfScript, 296 + 3628 = 3924 bytes

12.?:&{{}if}:i{&6base:c[0:x:^:h]25:e*:|"(":a")":b{["x(:x|,,?):e".a/b*"|x=(256%|x<\\|x)>++:|".a/b*"{1{c^):^=.4={;)}{5={b}i}if.c,,^)?1+:e*}do"."^)c,-"\"b"/a*+"!{e):e}i^(:^}i"+"|x="@b/a*"b"/b*"}i"++]c^==~];^):^c,=!6.?,h):h?)e*:e*}do|$)\{+}*!*.e*{c':c'@+~}i&(:&}do];255,{n'c'@)+~{'<>-+[]'1/\=}/}/"":n

Try it online!

The extra byte in the output is a newline for the code for 0, removing it requires more than one byte.

This program passes through 8 916 100 448 256 BF codes, tests if it produces only one number and stores the code. In the end the shortest code for each number is printed. This is not effitient at all, it would take millions of years to end, the estimated number of bytes in the solution assumes the shortest codes are all listed in this esolang page. This doesn't reach the memory limit or any other errors I know, it is just very slow.

12.?:&          # Assign 12^12 = 8916100448256 to &, this represents the current BF code
{{}if}:i        # This will be used to go from {code}{}if to {code}i
{  ...  }do     # Main loop, will be explained later
];              # Clean the stack
255,{  ...  }/  # Go through every number
"":n            # This removes the automatic newline that is printed

What is inside the 255,{ ... }/:

n                      # Newline
 'c'@+                 # For the N-th number push 'cN'
      ~                # Execute the string, this will push the value stored in the variable, it will be an array with the shortest code for N
       {'<>-+[]'1/\=}/ # Translate the array to a BF code

Main loop:

In the main loop there is a BF interpreter that can avoid errors. There are 3 ways something can go wrong:

1 It doesn't halt. This can be avoided by putting an operation limit. Here the limit is 14889 for the numbers 78 and 178, this means that if the code doesn't halt in 14889 operations, it is not one of the optimal codes.

2 Unpaired [ ]. We test if the instruction pointer left the code while searching for the pair. If it isn't necessary to look for the pair (Eg >>]+-), it means that that instruction is not necessary and the code will be replaced by a better one later.

3 The data pointer leaves the tape. We test if it left the tape using the same strategy used above. The tape here is only 25 bytes long, if the code needs more, it means it isn't optimal. The numbers 78 and 178 need 24 cells.

This interpreter doesn't have the , and . operations, so every BF code can be represented by a base 6 number. The problem is that a number can't start with 0, but here it isn't a problem because 0 represents <, which doesn't do anything at the start.

&6base:c                              # Convert & to base 6 and store the resulting array in c.
        [0:x:^:h]                     # Push [0] and assign 0 to x, ^ and h. x= data pointer  ^= instruction pointer  h= operation counter
                 25:e                 # Assign 25 to e, this will be the error variable, if it is 0 something went wrong
                     *:|              # Multiply [0] and 25 to get the tape called |
                        "(":a")":b    # Assign "(" to a and ")" to b
                                  {[  # Start a loop and an array

In this array we will have the 6 functions written as strings for easier manipulation:

op      string
0 <     x(:x|,,?):e
        x(:x                   # Decrement x
            |,,?):e            # Test if the result is within the tape

1 >     x):x|,,?):e            # Same thing as before but with ")" instead of "("

2 -     |x=(256%|x<\\|x)>++:|
        |x=                    # Get the value from the tape
           (256%               # Decrement mod 256
                |x<\\|x)>++:|  # Replace the old value in the array, the \\ is a \ but inside a string

3 +     |x=)256%|x<\\|x)>++:|  # Same thing as before but with ")" instead of "("

4 [     ^)c,-{1{c^):^=.4={;)}{5={(}i}if.c,,^)?1+:e*}do!{e):e}i^(:^}i
        ^)c,-{                                                    }i  # If it isn't the last byte of the code
              1{                       .c,,^)?1+:e*}do                # While the pair has not been found and the next byte to be tested is within the code
                c^):^=                                                # Get next byte
                      .4=            if                               # Is it a [ ?
                         {;)}                                         # Increment the counter
                             {5={(}i}                                 # Decrement the counter if it is a ]
                                                      !{e):e}i        # If the code ends with ] it will be counted as an error and this part solves the problem
                                                              ^(:^    # Move the instruction pointer to the left, later it will be moved to the right and the ] will be read

5 ]     |x={1{c^(:^=.4={;(}{5={)}i}if.c,,^(?1+:e*}do}i                
        |x={                                        }i                # If the current cell is not 0
            1{c^(:^=.4={;(}{5={)}i}if.c,,^(?1+:e*}do                  # Same thing as before but with ( and ) swapped

[ always jumps to the ] and there it decides if the things inside should be executed.

This array is very repetitive, so we replace "x):x|,,?):e" by .a/b*, this copies the code for < and replaces the ( by ). The code for + is also replaced by .a/b*, but the code for ] is a bit more complex. The code for [ and ] will be replaced by:

"{1{c^):^=.4={;)}{5={b}i}if.c,,^)?1+:e*}do"."^)c,-"\"b"/a*+"!{e):e}i^(:^}i"+"|x="@b/a*"b"/b*"}i"++

"{1{c^):^=.4={;)}{5={b}i}if.c,,^)?1+:e*}do"             # Repeated part

."^)c,-"\                                               # Make a copy of it and push ^)c,- under that long string
         "b"/a*+                                        # Replace the b by ( and concatenate the result with the ^)c,-
                "!{e):e}i^(:^}i"+                       # Add this to the end of the string
                                 "|x="@                 # Push |x= and get that original string
                                       b/a*"b"/b*       # Replace the ) by ( and the b by )
                                                 "}i"++ # Push }i and concatenate the 3 parts

Now comes the part that executes these functions, remember that this array was created inside the loop, this means it will be recreated every time it reads a byte from the code.

]                                   # End the array
 c^=                                # Get current instruction
    =~                              # Get the function for it and execute it
      ];                            # Clean the stack, this replaces the ; that would have to be in every function
        ^):^                        # Go to next instruction
            c,=!                    # Is it NOT the last instruction?
                6.?,h):h?)          # Increment h and test if it is within the operation limit. It actually uses 6^6=46656 instead of 14889 to save 2 bytes.
                          e*:e      # Updates e
                              *}do  # Repeats everything if there were no errors

Now we just have to test if the output is valid and store it if it is.

|$                                  # Sort the tape
  )                                 # Separate the last number
   \{+}*                            # Add all other numbers in the array
        !                           # Is the sum 0?
         *                          # This will be the only non-zero cell or 0 if the output is invalid
          .e*                       # Change it to 0 if there was an error
             {        }i            # If it isn't 0 it is the code for some number, let this number be N
              c                     # Push the code
               ':c'@+~              # Store it in the variable cN
                        &(:&}do     # Go to the next code and repeat untill it gets to 0

The codes are tested in decreasing order, that way the shortest solutions will automatically replace the longer ones. The longest code is number 6774727080140 and that's why we started at such a big number.

Here are some versions of the code using other constants so we can see the output (only the found codes are outputted):

Starting at 216, this tests every 3 byte code.

From 6774727080145 to 6774727080135, includes the solution for 117.

30 codes starting at a random number

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.