« first day (303 days earlier)      last day (939 days later) » 

15:17
@Christopher Hello from the Third Stack!
Ok so you understand how Miniflak works right?
Yeah Brain-Flak without some operators
<> and [] (and the subsets)
Ok the crutial thing to remember is that Miniflak does not have arbitrary access to its stack. Any access must be determined at compile time.
Wait what.
So you cannot access the stack pre-compile?
15:20
In Brain-Flak you can write a program to take n off the stack and remove the nth element from the stack
Ok. But in Mini you can't
yes precisely
Also you can't cycle stacks correct?
15:21
The problem is that that functionality is really useful for quines
Do you know the general quine strategy?
Encode half of it and print both halves?
Ok yes
The problem with that for miniflak is that you cant perform an operation on every element of the stack because of the lack of random access, so decoding is not really possible
can? Or can't?
15:23
(there is a way but its not simple and really slow)
Ok dang. That is interesting
Instead we write an encoding function
This works just like a dictionary in an other language
So it has the values of {}[]() in it
15:25
No not quite
we have that too but that is later
Oh yay.
this is a chunk of code that takes n off the top of the stack and replaces it with the nth character
Is there a way to get input? I cannot find one.
what?
Input to what?
Input for the program (aka , for bf)
Double checking I am not blind
15:27
Are you using TIO?
or desktop?
Yes
(TIO)
just put it in the input box
That makes sense.
there is no way to take input once the program has started
So the input just is the start of the stack. Sounds good and please continue
15:29
Ok so we are going to write a function that takes n and gets the nth character
Do you know how an if works in Brain-Flak
If top of stack is not 0 run this
Like in BF
I should probably tell you that <...> while banned is the same as ([...]){}
Clever
The iff idiom is (({})){(<...>)}{}
this will run ... once if the tos is truthy and no times iff it is false
15:31
Do you get how that works?
Starting to decode it
Ok I'll give you a bit
pops stack and adds it twice then while stack is not zero evaluate foo and push 0. Pops stack
This is really cool
15:34
another important idiom is not ({}<(())>){((<{}{}>))}{}
this will take the logical not of the TOS
Do you get that one?
Ok I have to take a short break to move
Ok I will keep working on understanding
Wow this is making my head hurt.
Ok I'm back
Understanding the idioms is not crucial, it is a good idea but they do what I claim they do.
Can you help me understand this. What I got from the first half was you added the result of popping the stack and adding one then evaluate to 0
Ok ({}<(())>) will put a 1 under neath whatever is on top of the stack
That is what I figured
The next part was the real problem
@WheatWizard (Totally didn't just run that to realize what it did)
15:44
{((<{}{}>))} is a modified if, if the tos it will replace both the tos and the 1 with zeros
So if the tos is true we will get 0 0 but if it is false we will get 0 1
so {} removes the extra zero on top
That is clever
Ah makes sense
I think it is one of the few programs proven optimal in Brain-Flak
anyway we can make a composite of the two idioms if x == 0 do ... with (({})<(())>){((<{}{}>))}{}{(<{}...>)}{}
So logical not of input and then the if
exactly
I like this language
15:47
:D
Is there a number limit?
Nope! :)
Yes! Going to answer challenge
Wait. Must infinite loop first
Ok so we can use this new idiom to create our lookup table/function
15:50
All we have to do is implement the following psuedo code
x--
if x == 0 push thing
x--
if x == 0 push thing
x--
if x == 0 push thing
x--
if x == 0 push thing
x--
if x == 0 push thing
Clever. Side question. Should `(()){(()){}}` print
4...
3
2
1
No
that will loop without end
That was the idea. Ohhhh,
So it will never show the stack
I wanted it to always loop but if it always loops you never see stack
15:53
yeah just like you can't take input any time you can output any time either
Curse you challenge!
Ok I'm going to go get lunch with a friend. Hopefully that will give you some time to digest what I have said and give me some time to figure out how I hope to explain the rest.
Ok I will be on later today
Around 5:00 PM EST roughly
If you have questions now, I can answer a few.
Thanks for all the help. (P.S I gave you a few deserving upvotes on some challenges)
@Riley Thanks but I have to eat lunch (lasagna brought from home)
16:37
@Christopher I have graph theory then so I will definitely be available then
 
3 hours later…
19:16
@WheatWizard 115 bytes :)
@Riley Good job, I think you win, I'm not coming back from that
That's as far as I'm going to be able to go with it. There is probably a way to shave off a few bytes, but I've already spent way too much time on it.
> I'm not coming back from that
I couldn't help myself
19:39
113 bytes not quite the same as yours.
Yeah I moved ()() when I didn't have to but otherwise they are the same
Okay. I figured it was something like that.
20:04
@Riley 111
@DJMcMayhem Prependix or Appendix? Dependix
@Christopher My laptop's battery is going to die before 5 so I wont be able to help you with anything until I get back to my dorm around 10:00 EST.
@WheatWizard Did you ever figure out why -d isn't working on TIO?
I misspelled something in my code.
I fixed it but it has not been pulled.
Nice. I could definitely used it for this/
20:13
-d still works @df and output with -d doesn't work
you can do things like @dh, @dv and @dc
We could also ask Dennis to pull
20:27
@WheatWizard Oh wow
That sucks
I can help you now. I still have 10%
Sadly I have some work to get done :(
20:40
@WheatWizard Is there still a way to print ASCII (wrapping)?
Craneflak will do it
other than that no
How do you print any ascii?
-A
-a to take in ASCII
-c to do both
Thanks
Did Brain-Flueue ever have an interpreter that would print ASCII
Nevermind. It isn't going to work anyway
20:47
How do you use flags in tio?
Click "Arguments", click "add". For example: TIO
Thanks
@Riley good challenge for first answer in Mini-Flak?
@Christopher I'd go through a bunch of examples on the wiki and solve them without looking at the snippet.
21:09
@WheatWizard 103 bytes
@Riley Ok thanks. Uhh i think i broke everything
([()]) should push -1 to stack right?
@Christopher Yes
You have the arguments open. Hit remove on the left.
WHAT. Lamest problem ever
21:15
If you open Debug, you can see why that happens.
Thanks
Using mini-flak is hard
Cuz i cannot cycle stack
I am trying to make a counter
For checking equality
({}[{}]) <- subtraction
Yep
Hmm. To multiply first i will figure out cycling x,y -> y,x
Do you want me to tell you?
Yes/no
I want to figure it out but I don't know if i can
a hint?
Wait
nvm. idea
Actually a hint would be nice
21:28
@Riley You are a madman. I don't think I can beat 100 but I will try.
My idea failed as it needed me to be able to cylce x,y to y,x...
I meant do you want to know how to cycle x,y to y,x
Is there a builtin? If not a hint would be what i need
I was really happily surprised when ({}[][]) happened to produce the number I was looking for at end.
bultin? miniflak only has 6 builtins
it is quite short
21:30
@WheatWizard Ok fine give me it
(({}({}))[({}[{}])])
It is also the best know cycle in Brain-Flak as well
Gah!
Half way trough my code i forgot what each section does
Nov 30 '16 at 0:16, by Wheat Wizard
Brain-Flak Syndrome: The act of forgetting what your code does before you've even written it.
NOO
I thought what i had was working
But the first number cannot be odd
Here is a hint for multiplication. {...} will evaluate to the sum of the values of the iterations.
21:43
What i have so far
That will find n*2^m
probably not what you wanted
Each time you run you're doubling the second item on the stack
also remember if you want to manipulate the second item you can always just do ({}<...>)
well actually ({}[(...)]{})
What's the shortest 2^n we have? (Stack clean or not)
It seems like it should be shorter than multiplication, but I can't beat 36
Sorry, 34
Crap
I meant n^2 haha
I've got (({})){({}<(({}))>[()])}{}{}({{}}) but that's not stack clean and only two shorter
^ 1000000000 and I have proven that is the shortest program that squares a number
21:50
Damn
It is imo the most beautiful brain-flak program ever written
I don't even understand how it works
I have to go but I would love to explain it later. It is really cool
It is beautiful though
So I guess n^2 == n + 2 * sum(0, n-1)
Or in other words, n^2 == n + 2 * triangle(n-1)
Ooooooh
That actually makes sens
If you rotate the triangle upside down and attach it to the other triangle, you'd get a polygon of NxN-1 so then you just add N to fill out the top row
Exactly!
21:59
Oh, an even simpler explanation: n^2 == triangle(n) + triangle(n-1) which is well known
That's truly incredible, how did you first find it?
22:47
hmmm
hmmmmmmmmmmmmm
23:02
YES! ({}({} ({}...) ([{}]))([{}])) allows you to manipulate the third item on the stack. Only problem is it makes the 2nd and third item negative. Fixing that :P
({}([{}] ([{}...]) ([{}]))([{}])) NOW DOES IT. Super happy. It lets you change the 3rd stack item. @WheatWizard
@Riley any ideas on golfing that?
Ofc the new problem is getting the first stack item :P
23:59
@Christopher ({}(({}( ... )[{}]))[{}]) lets you manipulate the third item. This addes 1 to the third item: TIO

« first day (303 days earlier)      last day (939 days later) »