« first day (117 days earlier)      last day (1125 days later) » 

3:46 PM
@Riley sorry I didn't respond earlier. Yeah, I think that's a pretty good idea, I'm just not sure which way is best. TBH the command line flag stuff is the least fun part of writing bflack to me.
How about -s for "script"? So ruby brain-flak.rb -sa code.flak -f input.txt
That'll give +1 for the a flag.
That seems pretty good to me, the only question is what do when the mandatory flag isn't there.
Maybe STDIN?
 
4:06 PM
@DJMcMayhem I looked into it more, and you don't actually have to require it. I've seen people talking about flags in sed counting as 1 because you normally you use -e, so -re is only +1. But sed will run just fine without -e.
So you could have to flag -s just mean normal execution.
It wouldn't hurt to ask around and make sure what I saw is still valid meta.
 
Really? Huh. That seems kinda cheaty to me
 
4:21 PM
What is the shortest known code for a top two swap? It is not on the wiki. "({}<({}<>)><>)<>({}<>)" is the best I could do, but I think it can be shortened.
(Also can be done on one stack with "(({}({}))<({}[{}])>[({})])")
 
4:34 PM
@MegaTom TBH I'm not really sure. @WheatWizard might know
 
@DJMcMayhem That should be added to the Stack Operations wiki page.
 
4:52 PM
@MegaTom Yeah, that's not a bad idea. There's a lot of things I've been meaning to change about the README and the wiki. Maybe I'll actually get around to it this time, haha
 
Also, did anyone ever make a prime checker?
 
I did, and it didn't work so Dennis came up with one in like half as many bytes, lol
9
A: Is this number a prime?

DennisBrain-Flak, 112 108 bytes ({}[()]){((({})())<>){{}<>(({}<(({}[()])()<>)>)<>)<>{({}[()]<({}[()]<({}())>)>{(<()>)}{})}{}{}}}<>{{}}([]{}) Try it online! How it works Initially, the first stack will contain a positive integer n, the second stack will be empty. We start by decrementing n as foll...

 
5:21 PM
@MegaTom 20 characters: (({}({}))[({}[{}])])
 
That's genius
 
5:39 PM
I knew there had to be a way to combine at least two of the three "sections" from this one (({}({}))<({}[{}])>[({})])
I don't think there is a way to mix the other one in though.
 
@Riley thank you! That helps my new one stack multiplication!
({<({}[()])>(({}({}))[({}[{}])])}<{}{}>)
 
@MegaTom Here's another 2 bytes off that: (({}){([()]({}({}))[({}[{}])])}<{}{}>)
 
2 more bytes to tie with my other answer...
 
5:57 PM
@MegaTom That is proven optimal
there cannot be one in less than 20 characters
Oh actually your example is not optimal
Here's mine
 
Here's another 2 off for a total of 36: (({}){(({}({}))[({}[{}])()])}<{}{}>)
That matches the one on the wiki, but only uses one stack.
 
here's my one stack version
 
@WheatWizard that's exactly the same as the one I came up with :)
 
Oh cool
well its optimal
I did a computer search and found none smaller than 20
 
I had a feeling it was.
How long did that take?
 
6:05 PM
Took me 14 hours one my laptop
@1000000000 and I have made a much better proof finder and we are working on prving the square algorithm optimal
however we lost power so our server has been down for a couple of days
 
That's not bad. I tried doing something like that in brainf*ck but it took too long. The matching brackets must save a lot of time.
 
They save quite a bit of time. You can construct a very nice context free grammar to block suboptimal programs as well which is really helpful in computation time
 
Nice, I was just brute-forcing every valid program and checking the output.
 
6:47 PM
Should we answer this question in Brain-Flak?
401
Q: Showcase your language one vote at a time

Helka HombaIn this experimental popularity contest users will be able to showcase their favorite programming languages. However, the amount of code they are allowed to write is dependent on the number of votes their answer has received. How This Works An answer to this question with N votes (upvotes minus...

 
6:57 PM
I don't see why not.
 
Ok I'll get one started if no one else objects
 
Go for it!
 
0
A: Showcase your language one vote at a time

Wheat WizardBrain-Flak Factoid: In Brain-Flak a one is shorter than zero and multiplying by seven takes more characters than multiplying by eight.

Its up
 

« first day (117 days earlier)      last day (1125 days later) »