Print 'A' 1000 times with BrainFuckTips for golfing in brainfuckHow to shorten this J code? (Or write shorter code in another language)BrainF***-optimize a series of numbersVerify Brainfuck programImplement multiplication by a constant with addition and bit shiftsBrainf*** subprograms with unique outputsConvert Brainfuck to a Non-Golfing LanguageConvert Brainfuck to MarioLANGBetter way to read multiple int in C than scanfHow can I shorten this multiple assignment in Lua?Brainf*ck Loop Problem

Unrecognized IC Package Style

Is there a term for the belief that "if it's legal, it's moral"?

Would a 7805 5 V regulator drain a 9 V battery?

In the US, can a former president run again?

Why things float in space, though there is always gravity of our star is present

Why is it easier to balance a non-moving bike standing up than sitting down?

Definition of 'vrit'

Is Newton's third law really correct?

Unable to import binding 'SforceServiceBinding' with the Summer 19 Tooling API WSDL

Why is Havana covered in 5-digit numbers in Our Man in Havana?

What is that ceiling compartment of a Boeing 737?

Why are there no file insertion syscalls

I found a password with hashcat but it doesn't work

How to best clean this sealed rotary encoder / volume knob?

How to take photos with a yellowish tone and point-and-shoot film camera look?

Counterfeit checks were created for my account. How does this type of fraud work?

Why isn't my calculation that we should be able to see the sun well beyond the observable universe valid?

Predict the product from the reaction

Is there any possible way to get these hearts as Adult Link?

The Amazing Sliding Crossword

Why there is a red color in right side?

Why is it 出差去 and not 去出差?

Why do you need to heat the pan before heating the olive oil?

Print the new site header



Print 'A' 1000 times with BrainFuck


Tips for golfing in brainfuckHow to shorten this J code? (Or write shorter code in another language)BrainF***-optimize a series of numbersVerify Brainfuck programImplement multiplication by a constant with addition and bit shiftsBrainf*** subprograms with unique outputsConvert Brainfuck to a Non-Golfing LanguageConvert Brainfuck to MarioLANGBetter way to read multiple int in C than scanfHow can I shorten this multiple assignment in Lua?Brainf*ck Loop Problem






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








2












$begingroup$


What is the best BrainFuck code (in terms of code size) to print 'A' 1000 times ?



My approach is:



  • set 'A' to p[0]

  • set 255 to p[1] to display 255 'A', 3 times

  • set 235 to p[1] to display 235 'A'

This is not effective but I cannot find a way to use tow counters simultaneously like a multiplication



Is there a better approach than a multiplication ?










share|improve this question









New contributor



Nelson G. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






$endgroup$







  • 3




    $begingroup$
    This is a good place to start. Welcome to Code golf! :)
    $endgroup$
    – FryAmTheEggman
    9 hours ago






  • 2




    $begingroup$
    I think you want to just use a nested loop, but I don't know BF very well. Have you seen Brainfuck tips? Also probably the esolangs page on Brainfuck constants would be a useful resource here.
    $endgroup$
    – Jonathan Allan
    9 hours ago






  • 3




    $begingroup$
    I think you should clarify best BrainFuck code. Are you in search of most readable, most elegant, using the least amount of + characters or simply highest brevity?
    $endgroup$
    – Jonathan Frech
    8 hours ago










  • $begingroup$
    @Jonathan Allan: Yes, that's the purpose of this question : How to use a nested loop. It's a fascinating language close ASM but I don't understand some aspects
    $endgroup$
    – Nelson G.
    7 mins ago

















2












$begingroup$


What is the best BrainFuck code (in terms of code size) to print 'A' 1000 times ?



My approach is:



  • set 'A' to p[0]

  • set 255 to p[1] to display 255 'A', 3 times

  • set 235 to p[1] to display 235 'A'

This is not effective but I cannot find a way to use tow counters simultaneously like a multiplication



Is there a better approach than a multiplication ?










share|improve this question









New contributor



Nelson G. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






$endgroup$







  • 3




    $begingroup$
    This is a good place to start. Welcome to Code golf! :)
    $endgroup$
    – FryAmTheEggman
    9 hours ago






  • 2




    $begingroup$
    I think you want to just use a nested loop, but I don't know BF very well. Have you seen Brainfuck tips? Also probably the esolangs page on Brainfuck constants would be a useful resource here.
    $endgroup$
    – Jonathan Allan
    9 hours ago






  • 3




    $begingroup$
    I think you should clarify best BrainFuck code. Are you in search of most readable, most elegant, using the least amount of + characters or simply highest brevity?
    $endgroup$
    – Jonathan Frech
    8 hours ago










  • $begingroup$
    @Jonathan Allan: Yes, that's the purpose of this question : How to use a nested loop. It's a fascinating language close ASM but I don't understand some aspects
    $endgroup$
    – Nelson G.
    7 mins ago













2












2








2


0



$begingroup$


What is the best BrainFuck code (in terms of code size) to print 'A' 1000 times ?



My approach is:



  • set 'A' to p[0]

  • set 255 to p[1] to display 255 'A', 3 times

  • set 235 to p[1] to display 235 'A'

This is not effective but I cannot find a way to use tow counters simultaneously like a multiplication



Is there a better approach than a multiplication ?










share|improve this question









New contributor



Nelson G. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






$endgroup$




What is the best BrainFuck code (in terms of code size) to print 'A' 1000 times ?



My approach is:



  • set 'A' to p[0]

  • set 255 to p[1] to display 255 'A', 3 times

  • set 235 to p[1] to display 235 'A'

This is not effective but I cannot find a way to use tow counters simultaneously like a multiplication



Is there a better approach than a multiplication ?







code-golf tips brainfuck






share|improve this question









New contributor



Nelson G. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.










share|improve this question









New contributor



Nelson G. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








share|improve this question




share|improve this question








edited 6 mins ago







Nelson G.













New contributor



Nelson G. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








asked 9 hours ago









Nelson G.Nelson G.

1174




1174




New contributor



Nelson G. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




New contributor




Nelson G. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









  • 3




    $begingroup$
    This is a good place to start. Welcome to Code golf! :)
    $endgroup$
    – FryAmTheEggman
    9 hours ago






  • 2




    $begingroup$
    I think you want to just use a nested loop, but I don't know BF very well. Have you seen Brainfuck tips? Also probably the esolangs page on Brainfuck constants would be a useful resource here.
    $endgroup$
    – Jonathan Allan
    9 hours ago






  • 3




    $begingroup$
    I think you should clarify best BrainFuck code. Are you in search of most readable, most elegant, using the least amount of + characters or simply highest brevity?
    $endgroup$
    – Jonathan Frech
    8 hours ago










  • $begingroup$
    @Jonathan Allan: Yes, that's the purpose of this question : How to use a nested loop. It's a fascinating language close ASM but I don't understand some aspects
    $endgroup$
    – Nelson G.
    7 mins ago












  • 3




    $begingroup$
    This is a good place to start. Welcome to Code golf! :)
    $endgroup$
    – FryAmTheEggman
    9 hours ago






  • 2




    $begingroup$
    I think you want to just use a nested loop, but I don't know BF very well. Have you seen Brainfuck tips? Also probably the esolangs page on Brainfuck constants would be a useful resource here.
    $endgroup$
    – Jonathan Allan
    9 hours ago






  • 3




    $begingroup$
    I think you should clarify best BrainFuck code. Are you in search of most readable, most elegant, using the least amount of + characters or simply highest brevity?
    $endgroup$
    – Jonathan Frech
    8 hours ago










  • $begingroup$
    @Jonathan Allan: Yes, that's the purpose of this question : How to use a nested loop. It's a fascinating language close ASM but I don't understand some aspects
    $endgroup$
    – Nelson G.
    7 mins ago







3




3




$begingroup$
This is a good place to start. Welcome to Code golf! :)
$endgroup$
– FryAmTheEggman
9 hours ago




$begingroup$
This is a good place to start. Welcome to Code golf! :)
$endgroup$
– FryAmTheEggman
9 hours ago




2




2




$begingroup$
I think you want to just use a nested loop, but I don't know BF very well. Have you seen Brainfuck tips? Also probably the esolangs page on Brainfuck constants would be a useful resource here.
$endgroup$
– Jonathan Allan
9 hours ago




$begingroup$
I think you want to just use a nested loop, but I don't know BF very well. Have you seen Brainfuck tips? Also probably the esolangs page on Brainfuck constants would be a useful resource here.
$endgroup$
– Jonathan Allan
9 hours ago




3




3




$begingroup$
I think you should clarify best BrainFuck code. Are you in search of most readable, most elegant, using the least amount of + characters or simply highest brevity?
$endgroup$
– Jonathan Frech
8 hours ago




$begingroup$
I think you should clarify best BrainFuck code. Are you in search of most readable, most elegant, using the least amount of + characters or simply highest brevity?
$endgroup$
– Jonathan Frech
8 hours ago












$begingroup$
@Jonathan Allan: Yes, that's the purpose of this question : How to use a nested loop. It's a fascinating language close ASM but I don't understand some aspects
$endgroup$
– Nelson G.
7 mins ago




$begingroup$
@Jonathan Allan: Yes, that's the purpose of this question : How to use a nested loop. It's a fascinating language close ASM but I don't understand some aspects
$endgroup$
– Nelson G.
7 mins ago










1 Answer
1






active

oldest

votes


















6












$begingroup$

The method you seem to currently be using is 39 bytes:



>>+++[<-[-<.>]>-]++++[<----->-]<-[-<.>] (not including getting the A) (Try It Online!)



(loop 3 times, each time set the counter to 255 and print that many times, then subtract 20, subtract 1, and print that many times)



However, it is much shorter to loop 4 times and print 250 times each time:



>>++++[<------[<.>-]>-] (23 bytes).



If your cells are unbounded (I'm assuming they're 8-bit otherwise you probably wouldn't try using 255 for golfing):



>>++++++++++[<++++++++++[<..........>-]>-] (42 bytes).






share|improve this answer











$endgroup$












  • $begingroup$
    this seems to assume 8-bit cells, though...
    $endgroup$
    – John Dvorak
    9 hours ago






  • 1




    $begingroup$
    @JohnDvorak: The question mentioned setting cells to 255 as a part of the most effective solution the OP could think of. That seems like a pretty clear indication of (ab)using 8-bit cell wrapping.
    $endgroup$
    – randomdude999
    9 hours ago










  • $begingroup$
    @JohnDvorak What randomdude999 said, but I did add a method using 10x10x10 in case the cells are unbounded.
    $endgroup$
    – HyperNeutrino
    9 hours ago











Your Answer






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',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);






Nelson G. is a new contributor. Be nice, and check out our Code of Conduct.









draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodegolf.stackexchange.com%2fquestions%2f186971%2fprint-a-1000-times-with-brainfuck%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









6












$begingroup$

The method you seem to currently be using is 39 bytes:



>>+++[<-[-<.>]>-]++++[<----->-]<-[-<.>] (not including getting the A) (Try It Online!)



(loop 3 times, each time set the counter to 255 and print that many times, then subtract 20, subtract 1, and print that many times)



However, it is much shorter to loop 4 times and print 250 times each time:



>>++++[<------[<.>-]>-] (23 bytes).



If your cells are unbounded (I'm assuming they're 8-bit otherwise you probably wouldn't try using 255 for golfing):



>>++++++++++[<++++++++++[<..........>-]>-] (42 bytes).






share|improve this answer











$endgroup$












  • $begingroup$
    this seems to assume 8-bit cells, though...
    $endgroup$
    – John Dvorak
    9 hours ago






  • 1




    $begingroup$
    @JohnDvorak: The question mentioned setting cells to 255 as a part of the most effective solution the OP could think of. That seems like a pretty clear indication of (ab)using 8-bit cell wrapping.
    $endgroup$
    – randomdude999
    9 hours ago










  • $begingroup$
    @JohnDvorak What randomdude999 said, but I did add a method using 10x10x10 in case the cells are unbounded.
    $endgroup$
    – HyperNeutrino
    9 hours ago















6












$begingroup$

The method you seem to currently be using is 39 bytes:



>>+++[<-[-<.>]>-]++++[<----->-]<-[-<.>] (not including getting the A) (Try It Online!)



(loop 3 times, each time set the counter to 255 and print that many times, then subtract 20, subtract 1, and print that many times)



However, it is much shorter to loop 4 times and print 250 times each time:



>>++++[<------[<.>-]>-] (23 bytes).



If your cells are unbounded (I'm assuming they're 8-bit otherwise you probably wouldn't try using 255 for golfing):



>>++++++++++[<++++++++++[<..........>-]>-] (42 bytes).






share|improve this answer











$endgroup$












  • $begingroup$
    this seems to assume 8-bit cells, though...
    $endgroup$
    – John Dvorak
    9 hours ago






  • 1




    $begingroup$
    @JohnDvorak: The question mentioned setting cells to 255 as a part of the most effective solution the OP could think of. That seems like a pretty clear indication of (ab)using 8-bit cell wrapping.
    $endgroup$
    – randomdude999
    9 hours ago










  • $begingroup$
    @JohnDvorak What randomdude999 said, but I did add a method using 10x10x10 in case the cells are unbounded.
    $endgroup$
    – HyperNeutrino
    9 hours ago













6












6








6





$begingroup$

The method you seem to currently be using is 39 bytes:



>>+++[<-[-<.>]>-]++++[<----->-]<-[-<.>] (not including getting the A) (Try It Online!)



(loop 3 times, each time set the counter to 255 and print that many times, then subtract 20, subtract 1, and print that many times)



However, it is much shorter to loop 4 times and print 250 times each time:



>>++++[<------[<.>-]>-] (23 bytes).



If your cells are unbounded (I'm assuming they're 8-bit otherwise you probably wouldn't try using 255 for golfing):



>>++++++++++[<++++++++++[<..........>-]>-] (42 bytes).






share|improve this answer











$endgroup$



The method you seem to currently be using is 39 bytes:



>>+++[<-[-<.>]>-]++++[<----->-]<-[-<.>] (not including getting the A) (Try It Online!)



(loop 3 times, each time set the counter to 255 and print that many times, then subtract 20, subtract 1, and print that many times)



However, it is much shorter to loop 4 times and print 250 times each time:



>>++++[<------[<.>-]>-] (23 bytes).



If your cells are unbounded (I'm assuming they're 8-bit otherwise you probably wouldn't try using 255 for golfing):



>>++++++++++[<++++++++++[<..........>-]>-] (42 bytes).







share|improve this answer














share|improve this answer



share|improve this answer








edited 9 hours ago

























answered 9 hours ago









HyperNeutrinoHyperNeutrino

20k440152




20k440152











  • $begingroup$
    this seems to assume 8-bit cells, though...
    $endgroup$
    – John Dvorak
    9 hours ago






  • 1




    $begingroup$
    @JohnDvorak: The question mentioned setting cells to 255 as a part of the most effective solution the OP could think of. That seems like a pretty clear indication of (ab)using 8-bit cell wrapping.
    $endgroup$
    – randomdude999
    9 hours ago










  • $begingroup$
    @JohnDvorak What randomdude999 said, but I did add a method using 10x10x10 in case the cells are unbounded.
    $endgroup$
    – HyperNeutrino
    9 hours ago
















  • $begingroup$
    this seems to assume 8-bit cells, though...
    $endgroup$
    – John Dvorak
    9 hours ago






  • 1




    $begingroup$
    @JohnDvorak: The question mentioned setting cells to 255 as a part of the most effective solution the OP could think of. That seems like a pretty clear indication of (ab)using 8-bit cell wrapping.
    $endgroup$
    – randomdude999
    9 hours ago










  • $begingroup$
    @JohnDvorak What randomdude999 said, but I did add a method using 10x10x10 in case the cells are unbounded.
    $endgroup$
    – HyperNeutrino
    9 hours ago















$begingroup$
this seems to assume 8-bit cells, though...
$endgroup$
– John Dvorak
9 hours ago




$begingroup$
this seems to assume 8-bit cells, though...
$endgroup$
– John Dvorak
9 hours ago




1




1




$begingroup$
@JohnDvorak: The question mentioned setting cells to 255 as a part of the most effective solution the OP could think of. That seems like a pretty clear indication of (ab)using 8-bit cell wrapping.
$endgroup$
– randomdude999
9 hours ago




$begingroup$
@JohnDvorak: The question mentioned setting cells to 255 as a part of the most effective solution the OP could think of. That seems like a pretty clear indication of (ab)using 8-bit cell wrapping.
$endgroup$
– randomdude999
9 hours ago












$begingroup$
@JohnDvorak What randomdude999 said, but I did add a method using 10x10x10 in case the cells are unbounded.
$endgroup$
– HyperNeutrino
9 hours ago




$begingroup$
@JohnDvorak What randomdude999 said, but I did add a method using 10x10x10 in case the cells are unbounded.
$endgroup$
– HyperNeutrino
9 hours ago










Nelson G. is a new contributor. Be nice, and check out our Code of Conduct.









draft saved

draft discarded


















Nelson G. is a new contributor. Be nice, and check out our Code of Conduct.












Nelson G. is a new contributor. Be nice, and check out our Code of Conduct.











Nelson G. is a new contributor. Be nice, and check out our Code of Conduct.














If this is an answer to a challenge…



  • …Be sure to follow the challenge specification. However, please refrain from exploiting obvious loopholes. Answers abusing any of the standard loopholes are considered invalid. If you think a specification is unclear or underspecified, comment on the question instead.


  • …Try to optimize your score. For instance, answers to code-golf challenges should attempt to be as short as possible. You can always include a readable version of the code in addition to the competitive one.
    Explanations of your answer make it more interesting to read and are very much encouraged.


  • …Include a short header which indicates the language(s) of your code and its score, as defined by the challenge.


More generally…



  • …Please make sure to answer the question and provide sufficient detail.


  • …Avoid asking for help, clarification or responding to other answers (use comments instead).




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodegolf.stackexchange.com%2fquestions%2f186971%2fprint-a-1000-times-with-brainfuck%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

Ласкавець круглолистий Зміст Опис | Поширення | Галерея | Примітки | Посилання | Навігаційне меню58171138361-22960890446Bupleurum rotundifoliumEuro+Med PlantbasePlants of the World Online — Kew ScienceGermplasm Resources Information Network (GRIN)Ласкавецькн. VI : Літери Ком — Левиправивши або дописавши її