« first day (1288 days earlier)      last day (3563 days later) » 

12:00 AM
I'm about to post my Manufactoria primality test challenge. Any final comments on the sandbox post? meta.codegolf.stackexchange.com/a/1933/2867
 
one sec
 
i'll look at it
 
I don't know Manufactoria but it sounds good to me
 
i have no opinion, after reading that
 
Note Martin's comment on the question - would it be easier to make it an esolang code golf rather than a game code golf?
 
12:04 AM
sounds good
 
I'm guessing you already saw that but does it need clarifying?
 
@githubphagocyte my comment is a bit outdated and has been addressed, I think
 
I added the esolang as a submission option for those who wouldn't be able to fit a solution on the grid.
 
Does the faster website linked to use the game rules or the esolang rules?
 
The fast-testing website was an amazing find.
It uses the game rules.
 
12:06 AM
Is the esolang just to encourage more entries then?
 
yes, pretty much
 
There's not a simple objective way of defining what is not permitted in the esolang?
In order to prevent it having an advantage
 
Creating stuff in Manufactoria is hard, so I wanted an option that had more space to work with.
 
I don't know either or what problems the difference causes so that's all the questions I can offer...
If you can say something like "the following 2x2 configuration is not permitted in the esolang, to ensure compatibility with the game" then it might avoid arguments later
 
I haven't really used the esolang either.
It was just suggested that I add support for it.
 
12:11 AM
As long as you're prepared for unexpected loopholes then :)
It sounds like both will be interesting, even if the rules are slightly different, so go for it
 
How about adding this sentence: "It is preferred that you use the actual game for submitting your final solution, as to ensure fairness."
 
Does that mean you exclude finished entries from being over 13x13?
If someone makes a 30x30 would that simply not be a valid entry?
 
I'll just not add that sentence.
 
I guess if your reference implementation already fits on 13x13 there's not really much need for more
Unless someone comes up with a long thin solution that is the least blocks but still longer than 13
 
I think it's good as-is.
 
12:16 AM
You can never predict all the loop holes anyway - you just exclude old ones and see which new ones emerge...
 
I posted the question.
 
How long do they take to show up?
 
I don't know.
I was honestly surprised that this challenge was possible on the 13x13 grid.
I almost want to create a show-off-your-skills Manufactoria popularity contest, though I don't know if that would be on-topic.
 
Without knowing the language I don't know how impressed to be, but it certainly sounds surprising
I think a popularity contest would be good if it was restrictive
 
You should really check out the game to see how it works.
 
12:25 AM
Not just "any program" but a specific challenge that still allows a degree of flexibility and creativity
 
The basic description is that it is a 2D programming language that uses an instruction pointer and a queue as memory.
 
I might at some point. I'm busy trying to debug my alphabet tree checker for now...
 
Each cell contains an instruction like "write blue and move to the left" or "read the first symbol, if it's red move up"
 
Similar to a cellular automaton but only processing one square and using that do decide which to process next? Anything like Langton's Ant?
 
It is called a queue automaton
Yes, it's pretty much one cell at a time
You you want to see my solution in action?
Or should I keep it a secret until somebody else solves it?
 
12:34 AM
An example answer generally encourages new answers, I think
As you said it should be beatable it should just provide something to compete against
 
Here is a link, using a URL shortener because it exceeded the character limit for chat: [removed URL]
lol, it doesn't work
 
loading... very slowly
 
don't try, it is a broken link
 
http:// pleasingfungus .com/Manufactoria/?lvl=32&code=g12:2f3;b9:3f2;p10:3f5;r13:3f0;r11:3f0;q11:2f5;y1‌​0:2f2;p12:3f3;y6:11f2;b6:9f2;q7:11f5;p7:9f5;r7:6f2;c7:7f2;c7:8f1;c7:10f1;c7:12f1;‌​p8:6f1;p8:8f0;p8:9f3;g8:10f2;q8:7f5;c8:12f0;q9:6f0;g9:7f1;q9:8f4;r9:
9f0;q9:10f7;r9:11f3;p9:12f4;y10:6f2;r10:7f2;q10:8f7;r10:10f3;y10:11f3;c10:12f0;q‌​11:6f3;p11:7f7;p11:8f4;b11:9f1;c12:6f2;c12:7f3;y12:8f0;r12:9f3;y12:10f3;c12:11f2;‌​p13:11f2;r13:10f3;q13:9f3;r13:8f2;q13:7f2;c13:6f3;p14:7f6;p14:8f7;g14:9f0;y14:10f‌​2;c14:11f2;p15:8f1;c15:9f1;c15:11f1;q15:10f5;g16:11f1;q16:10f6;r16:9f2;b16:8f1;q1‌​6:7f4;p17:10f2;p17:9f1;
c17:8f1;c17:7f0;c11:5f3;c18:6f3;c18:7f3;c18:8f3;c18:9f3;c18:10f3;c18:11f3;c18:12‌​f3;c18:13f0;c17:13f0;c16:13f0;c15:13f0;c14:13f0;c8:5f2;c9:5f2;c10:5f2;p13:13f7;q1‌​6:6f2;c17:6f2;g16:5f0;g15:5f0;q14:5f4;g14:4f3;c13:5f0;c12:5f0;c12:4f3;&ctm=Prime?‌​;Input_is_a_series_of_N_blues.__Accept_iff_N_is_prime.;b:x|bb:*|bbbb:x|bbbbb:*|bbb‌​bbbb:*|bbbbbbbbb:x|bbbbbbbbbbb:*|bbbbbbbbbbbbbbb:x;13;3;0;
yeah, that is going to be hard to copy+paste correctly.
 
12:41 AM
I had a go - had to add in the last colon of the first third manually
 
I'm still trying to fix the buddhabrot
but this happened
 
looks like a lithograph
 
There's no such thing as "fixing" a fractal - you simply make another fractal
 
:D
well I'd call it "fixing" if what I want to be a buddhabrot isn't a buddhabrot
okay guys, C++ quiz time...
 
I expected long run time, not long load time for a 13x13 grid...
 
12:46 AM
how can int((x-.6)*512)*2, where x is a float give me a negative odd integer
 
It looks similar but dimmer
 
@githubphagocyte I think I'm reducing many iterations below zero, so I get colour underflows
 
Overflow switches parity, right?
 
it shouldn't
I hope?
 
Does the game load slowly for you? pleasingfungus.com/Manufactoria It doesn't really load slowly for me.
 
12:48 AM
Maybe my connection is just not working
 
loaded
 
No I got muddled - overflow maintains parity
adding one switches from odd to even, just like normal
So multiplying by 2 will give you even regardless of overflow
 
yup
I would hope so
 
Is it an error somewhere else?
you didn't #define 2 -3 ?
 
12:51 AM
:)
 
but there is an error somewhere else
but fixing that error doesn't fix my output
 
Are you taking the approach of incrementing always and decrementing on failure to escape?
 
And you're not iterating backwards, just repeating the same iteration sequence again?
Could I have a glance at the code?
I'm trying to debug my alphabet tree checker but hitting a wall
 
I'm trying to
unsigned short RD(int i,int j){
#define f(a)for(a=0;++a<DIM;)
static int z;float x=0,y=0,m,n,k;if(!z){z=1;f(m)f(n)GR(m-DIM,n-DIM);};return BL(i,j);
}
unsigned short GR(int i,int j){
float x=0,y=0,a,k,p=0;if(i<0)f(k){a=x*x-y*y+(i+256.0)/512;y=2*x*y+(j+512.0)/512;x=a;if(x*x+y*y>4)break;BL(int((x-.6)*512)*2+p,(y-1)*512);if(!p&&k==DM1){x=y=k=0;p=1;}}else{return BL(i,j);}
}
unsigned short BL(int i,int j){
static float c[DIM][DIM],p;p=i%2;if(i<0&&(i/=2)>-DIM-1&&j<0&&j>-DIM-1){c[j+DIM][i+DIM]+=p*2+1;}if(i>0&&i<DIM&&j>0&&j<DIM)return log(c[i][j])*90;
it's currently also way too long, but I want to get it working first
 
12:55 AM
Ugh... I've been working on python for hours - seeing condensed c++ makes my head spin lol
 
basically, in BL I'm now packing the increment/decrement in the parity of i
(and then I divide i by 2 again)
 
yes no point thinking about golfing until it's correct
 
and in GR if p isn't set yet but k reaches the last iteration, I reset k,x,y to 0 and p to 1
i would HOPE that this executes the exact same code again, but now with odd parity which should decrement exactly the same pixels
 
+=p*2+1
 
wait, I need to subtract p
(in GR)
 
12:58 AM
I'm looking at BL
 
YES!
that was it
in GR, when calling BL, I need to subtract p instead of adding it
 
so it's always incrementing more instead of decrementing on the second pass
 
no it's decrementing the wrong pixels
the decrement was always offset by one x coordinate
meh, I'm getting a lot of noise in the result though
 
But how does it decrement if BL only uses addition and p is positive?
 
p is negative
 
1:00 AM
d'oh
thanks...
 
as I said a couple of days ago, C++ (and similar) has the worst modulo semantics for negative numbers
 
yes it's noisy but that's definitely a buddabrot now
nice one!
 
now how do I golf that down o.O
I think there are a few unnecessary checks in BL
 
first things first, up the iterations and see if the noise goes away...
 
and I have 25 spare characters in RD for a define
@githubphagocyte I'm on it ;)
 
1:02 AM
I actually liked the "lithograph" one better, but that may be my personal taste in fractal art.
 
How far over the character limit are you?
 
reasonably :D
BL is at 187, GR at 145
so a define alone won't do it
maybe I should just ditch the logscale
 
That's only 5 characters though, right? Or would you lose the *90 too?
 
that would be *4 then. but I meant in order to lose the noise
 
You mean it would still be there but in the low values where we can't see it?
Will it overflow?
Can you cap it?
 
1:09 AM
currently weird stuff is happening
 
Do you just have two cases for Blue? i and j both negative or both positive?
 
no unfortunately not
 
nevermind then...
 
I need to scale up the buddhabrot, or it would look too small... but that means some points within radius 2 are out of bounds
hm still noisy
 
Yes you'd ideally need to start points over the whole range even if only incrementing in the zoomed area
 
1:13 AM
I do
which is why I filter them out before incrementing
 
I don't think you need to worry about zooming though - if you can get this down to 140 then even a small buddabrot would be amazing
Is the image 4*4 if you don't zoom? Or 2x2?
I don't know how complex numbers work in c++. Would using them directly make things better or worse?
 
the main problem is the declaration
the type is complex double
the operations might be simplified though
hm it might actually be shorter
SPLASH
no clue what happened there
 
Looks great but not buddabrot...
Looks like the decrementing is missing again - there's antibuddabrot creeping in
Can you try it without any zoom to see what it looks like?
 
yeah, I'll try
 
Can you even avoid translating the origin to the centre?
If you leave the origin at the left and just translate it down to the middle you'll have half of a symmetrical fractal, and you might be able to use that to display the whole thing
translating it later probably won't save you anything though
just thinking aloud...
 
1:21 AM
well I do need the translation, but I'd need fewer sanity checks in BL
 
sanity checks are for sane people
 
I think we're well beyond sanity checks now...
 
@PhiNotPi sanity checks are for segfaults
I call it...
...the eye of buddha
 
Your earlier one, the most buddabrot like, had a horizontal discontinuity too
Is that the edge of the region where you start iterations from?
 
possibly
let me think
 
1:25 AM
How much did not zooming save you?
 
nothing yet, I haven't removed the sanity checks so far
might well be on the order of 30 to 40 bytes though
(in BL)
yes, the square is my array of starting coordinates
let me fix that
that also removed the the eye shape
 
filled it in with white?
 
no
I'll show you in a second
 
Which bit is the eye?
 
there's this eye shaped region with a hard boundary in addition to the square
anyway
that's an exponential colour scheme to try to remove the noise
 
1:32 AM
I like the fact that this includes the entire radius 2 region
It seems more complete
 
I can easily increase that to chebyshev distance 2
i.e. the entire square
 
Isn't it 4x4 at the moment?
 
well yes, that's chebyshev distance 2 from the origin
 
you lost me. That sounds like the same thing
 
well I can extend the noise to the entire square
instead of having black corners
 
1:35 AM
Ah right
How did you exclude it?
You just terminate the iteration?
It wouldn't cost many iterations to increase the radius as the points are all headed out at speed by this point. How would it affect your characters?
 
the way I did it now a few, but I can just replace the 4 with an 8, that should be enough
also, without zooming, BL is down to 88 characters
 
More than enough
so you can add a define to BL and use it in RD or GR?
 
well, I need to change the functions of BL and GR, then I can define something in GR and use it in BL
 
0
A: Proposed Question Sandbox - Mark XIV

William BarbosaDraw the Stickman Wars The Stickman wars happened long ago, when Earth's dominant species was made of nothing but sticks. Historians regret the fact that there were no painters or cameras back then, we could use some pictures of that war in today's history books. That's where your coding powers ...

 
they don't need to come before you use them
 
1:39 AM
down to 82
no?
awesome
then I've got enough spare characters now
 
no - it's a preprocessor step so by the time you get to runtime they are all defined and all the replacement is done
I'm not the person to take c++ advice from but I did use that in one of mine and it worked fine
How long is it taking to run at the current iteration count?
 
well I just thought the preprocessor would also make just one pass through the file
@githubphagocyte a couple of seconds
 
actually so did I - I was surprised that it worked and made up the explanation afterwards...
I'm going to go back and look at my code as I'm doubting myself now
 
okay, RD at 139
haven't used my space in BL yet
GR is 177
that should work
saved 10 characters by golfing
@githubphagocyte no it doesn't work
 
Just found my code where I thought I'd done that and it's not the order I thought it was... :(
 
1:47 AM
got it
RD 139
GR 121
BL 140
 
Can you simply switch the code from one function with another? Is that what you were suggesting first of all?
woo hoo!
 
@githubphagocyte yes that's what I did
wait lol, there's some really old useless code in RD
 
How many iterations is it for a couple of seconds run time?
 
1024
I can't really seem to change that without breaking something though, because it's in a define, which I use for other things too
 
So 1e6 would take overnight?
 
1:49 AM
with the spare characters in RD I might be able to get that working though
@githubphagocyte possibly
the problem is...
I'd need to fiddle with the colour scale afterwards
and that's no fun if it takes so long
RD down to 127
 
Could you just change the increment to 1000 (ignoring the byte count for now) just to judge the right colour scale?
 
123
@githubphagocyte no
oh
 
Would that be a poor estimate?
 
I see what you mean
well I can't tell if that's a reasonable estimate to be honest
 
A course image but an idea of how the colours should be arranged
 
1:51 AM
I don't think the pixel intensities will scale linearly with iteration depth
 
Actually no, you're right
The detail is finer in higher iteration images precisely because the longer paths are restricted to much narrower areas. It wouldn't help at all.
Actually though, overnight is an overestimate. 1000 x a few seconds should be an hour or so, right?
Depending on how many seconds is a few
Are you running it in release mode?
 
3 to 6 seconds I'd say
lol
g++
but I don't have optimisation flags on
good point
 
sorry I'm stuck with visual studio terminology - if I stick with c++ I'll look at trying something more cross platform
 
hm, about 3 seconds now I think
 
So about 2.5 hours for a 1M run
 
1:55 AM
@githubphagocyte actually I also use VS for proper C++ development
but for individual files like PPCG stuff, I just use g++
@githubphagocyte if it scales linearly
currently the only option I have is to scale the starting point density along with it
 
Most longer runs will terminate early, so it should scale less than linearly, right?
 
but with the recent savings I might be able to avoid that
@githubphagocyte yes, the problem would be a squared scaling from the starting points
 
I'm forgetting there are two different things - the number of iterations and the number of starting points.
 
hm it's odd
if I just turn up the iteration depth, it looks more like that earlier splash image again
OOOOOH
 
With the same number of starting points, you should still get more increments, right? Because some of the non-escaping ones will become escaping ones, and each of these will contribute more than the current escaping ones due to taking much longer paths
 
1:59 AM
I know why
my relooping is hardcoded to 1023 iterations
 

« first day (1288 days earlier)      last day (3563 days later) »