« first day (1378 days earlier)      last day (3762 days later) » 

09:00
@Sp3000 had another idea for a CJam submission last night, but I had to go to bed... I'll try writing it up now
I suppose SO might be relevant... in the sense that everything is on SO even though it annoys them
of course the most helpful SE in the world is.....
@MartinBüttner Good luck :P
(can anyone guess?)
Codegolf, clearly. Never have I learnt that you can do exec("print(1);"*9)
I don't even know which languages that is in!
09:01
Python :P
oh :)
I just tried it
why do both print("hello") and print "hello" work in python 2?
Putting parens around the "hello" does nothing
It's like doing 1+1 and (1)+1
ah ok
so the answer is... tex.stackexchange.com
That one's pretty good, yeah
let me provide proof :)
232
Q: Create xkcd style diagram in TeX

AlexanderThe unique style of the diagrams at xkcd has an informative but nice hand-drawn touch. I guess they are actually drawn by hand but just recently on our partner site for Mathematica someone asked how to draw a similar diagram such as this one with Mathematica's plot functions (xkcd-style-graphs). ...

163
Q: How can we draw a Christmas tree with decorations, using TikZ?

Stefan KottwitzI would like to use TikZ for drawing a christmas tree. Here's a start, I used the lindenmayersystems library for drawing a tree: \documentclass{article} \usepackage{tikz} \usetikzlibrary{lindenmayersystems} \begin{document} \begin{tikzpicture} \draw [color=green!50!black, l-system={rule set={S ->...

etc.
09:06
@user2179021 I prefer the original on mathematica.SE
where else on the internet can you say "please show me amazingly clever ways to draw this picture I found on the internet"
and get a fully worked out solution provided in hours :)
@MartinBüttner ok but did you have this on mathematica.SE too? tex.stackexchange.com/questions/147268/join-the-dots-hannukah :)
lol not bad
it's awesome! :)
did you scroll down to the animated versions?
Funny you linked that, didn't Martin post this? codegolf.stackexchange.com/questions/39728/…
aha :)
poor answers though :(
09:09
:(
yeah unfortunately :(
@user2179021 also "answer", not "answers"
one of them is my reference implementation
true!
Actually there is something curious about codegolf.se
I've been contemplating a bounty a couple of times, but so far bounties have never given me any good answers.
there appear to be few active answerers but questions hit a huge number of views
compared to SO for example
I suppose this is something to do with the ratio of questions to viewers
so we know stats for that?
well SO just gets so many questions that they are pushed the active pages of tags really quickly, whereas here people actually use the front page and don't miss any question
also, due to that and being a smaller site, it's easier for questions from PPCG to make it into the HNQ
09:13
ah.. the HNQ
a very interesting point
stackoverflow.com/questions/26428253/… would have fitted in fairly well here I now realise
It's not very language-agnostic though, cos lots of languages don't have files
(well I guess that'll be one way to annoy the GolfScript/CJammers)
:)
when they are annoyed I assume the shout "]-!"
or something similar
s/the/they
GolfScript can do just about everything by cheating and calling out to Ruby. But that's more an artifact of the way string parsing is implemented than a real part of the language.
Oh right, I forgot there's that. I guess for the same reason Pyth would be fine too then
09:39
done
0
A: Unscramble the Source Code

Martin BüttnerCJam, size 51 Code main(int argc,char* argv){printf("Hello, World!");} Output 59 2229222139722292222223199710335725111032222222333337251122553372511222222221397357223333112319231925923192319222559 This should be more crackable than it looks.

Ahaha nice
I was a bit annoyed by the lack of braces in quotes, so I decided to go for something else that everyone recognises ^^
The good thing is that it's longer than my Python submissions! :D
lol yeah
as I said, I think it's crackable, so this one is more intended as a nice puzzle than a serious submission
someone should update the backlog...
also the robbers thread could use a leaderboard, but I think I might be leading so if I add it myself I look like a dick
updating the list on the cops thread now
nice, SAS has been cracked! :)
damn, my output was too long
09:55
Ahaha yeah it has :P that's good
fixed my submission
There seem to be 7 cops missing from the index
@PeterTaylor I'm currently editing
I hope my edit goes through after yours now :P
My edit has been submitted. I removed a few cracked ones.
yeah I know, I got a notification
phew did go through
10:13
Martin, you're learning CJam, aren't you? Is there any reference material other than the interpreter's source code?
there's sourceforge.net/p/cjam/wiki/Operators and sourceforge.net/p/cjam/wiki/Variables (plus a couple of other pages on the wiki, but these are the most useful)
also, reading through the tickets once helps, because there are a few bugs and one or two undocumented features mentioned there
let me know if I can help (although you'll probably know more about it than I do, just from analogy with GS)
I'm looking at ,/*#%CEffGIKs . I can't see what the fs can be used for: there's no {} to define a block.
One of them might be fs, but what about the other?
f can be used without a block
e.g. [1 2 3]4f+ is [5 6 7]
yes
10:25
So it can bind the previous argument and the following thing into a block which it then maps?
yes, it basically turns abfc into a{bc}%
very convenient! :)
(my favourite usage of that is to map a block onto a 2D array: f{f{...}})
oh, and I should mention, if a is not an array, but b is, then abfc gives you b{a\c}%
so 4[1 2 3]f+ would also yield [5 6 7]
but compare 2[1 2 3]f# == [2 4 8] vs [1 2 3]2f# == [1 4 9]
scratch that part about the 2D array, I messed that example up, and it's not relevant to you right now anyway
I'm looking at the other Lua one right, now because the first one was so simple: codegolf.stackexchange.com/a/41117/8478
I've got this: x=_ for i=_,_ do _ end print(_) .. blanks are to be filled from (())*+++.01111257=xxxxx
hm, I think this is near impossible without brute force
looking at the parentheses and operators, I guess there's something like (+)*(+) in there... but that's about it.
10:49
If the last step was * you could probably factorise the number without its decimal place
If :P
{{13, 1}, {113, 1}, {751, 1}}
I do have 751... coincidence? probably
It'd be funny if Marbelous won
lol yeah
I've added the new defaults to the code golf tag wiki: codegolf.stackexchange.com/tags/code-golf/info
someone please review them, I'm sure the writing could be improved
@Doorknob you can unpin that message now
I think if Dennis really wanted it, his new CJam answer is uncrackable
most likely, it's something like "..."Jb"..."Bbma
that leaves 24!*2 permutations
I suppose the value does give you a clue for the ratio between the two numbers, but it's still pretty tough
Okay, I think the two numbers might be n*{118038011,71756985} for integer n
the trouble is that n is anywhere between 50k and 500k
actually n is more likely between 500k and 5M...
bloody hell, there is also a second pair or base integer: {51265187,31164836}
then again if n is that large the last few digits are not significant, so the solution is probably very degenerate. it could be doable after all.
12:06
@MartinBüttner You should block people from arguing RLE, base64, etc, are existing encodings.
hm, right... feel free to suggest a better wording. of course I mean character encodings like code pages, unicode and stuff
I think it should be an encoding that an existing compiler/interpreter really supports. But I'm not sure what to do with TI-Basic
Or people will end up with inventing esoteric encodings
the wording at the end is a bit better
I think i'll just remove any mention of encoding in the bit at the top
12:23
@user23013 You've already got that program to crack Dennis's first submission.
I can't be bothered to write on for his second one, but do you want to adapt yours based on my assumptions above to see if it finds any solutions?
Er... I'll have a look maybe a few hours later
k
what did you write that in?
C++
with __int128
"That moment when you log on in the morning and see 30 red notifications"
12:34
lol
I've made a lot of progress on my logisim homebrew CPU.
It's currently calculating prime numbers.
It's currently at 109.
I'm going to try to speed it up some more. It's currently executing one instruction every twelve clock cycles.
 
1 hour later…
14:09
hi
Hey.
What's up?
the explanation is in the comment :)
Are you Lembik? I'm not familiar enough with SE to understand why you're user2179021 here and Lembik there :P
@undergroundmonorail yes!
hello :)
are you interested in the challenge?
I'm interested but I'm not very good at algorithms and stuff. I'm better at writing slow, terrible code that is very small ;)
14:14
:)
you could put that on your resume :)
I would, if it wasn't for the fact that I'm bad at that too. I'm just better than I am at real programming B)
(no i wouldn't haha)
@user2179021 I've made a bunch of progress on the Property X question, I think.
I'm currently trying to figure out how to get a zero-width space onto my clipboard in Linux, so I can make a post on a forum without :) being turned into <img src="styles/default/xenforo/clear.png" class="mceSmilieSprite mceSmilie1" alt=":)" title="Smile :)">, haha
You can probably do it with AutoHotkey
14:19
Does AHK do Linux? I've never checked.
I don't know.
Damn, I finally got a zero-width space and it turns out the forum is smart enough to make it a smiley anyway.
(Actually, one of my previous attempts worked, too. I just couldn't tell because, you know, zero-width.)
Oh, hey, I did it in a way easier way. :[i][/i])
That just reminded me... on one forum I use, there is a weird bug which allows people to insert HTML into the page. For example, cause the rest of the page to be bolded instead of just their own text.
You don't have to say "on one forum I use". There's no shame in liking Neopets :)
(maybe you're not talking about neopets but that bug exists there, too)
lol
I wasn't talking about neopets.
14:27
Why not?
I remember being a kid on the neopets boards, amazed at threads full of people injecting <marquee> without a closing tag. As they nested, each one went faster and faster (since they were moving at a constant rate inside another element that was also moving). It was incredible.
I must be a programmer. I couldn't remember if you capitalized "foo" in "Here's a list: foo, bar, baz.", so I went to google and looked it up. Pretty sure most people don't say "element" there. :P
I wonder what happens when you combine <marquee> and <blink>.
@PhiNotPi You summon Cthulhu.
Element? It's surely the first node instead ;)
@PhiNotPi The 90s called. They don't want their anything back, they just thought you were trying to summon them.
14:33
Ahh, the good old days of Web 1.0.
This is actually some genuine Web 1.0 content right here: perso.cgocable.ca/lasertank/ltank_en.html
Why did I even click on that link? :(
(Finally handed in my assignment about 7 hours late, now I can unscramble some more code guilt-free)
Not enough frames :P
@Pj
@PhiNotPi tell me all!
I'm just sad that <blink> doesn't work at all in Chrome anymore.
14:37
@PhiNotPi what sort of progress?
@Geobits how sad? :)
@user2179021 Progress on which thing?
"PhiNotPi
@user2179021 I've made a bunch of progress on the Property X question, I think."
You got me overexctied :)
@Geobits :(
Well, I was trying to find a fast way to test for the Property X, but I can't tell if it's actually an improvement over what other people are doing.
14:41
ah ok
I can try to walk you through what I was doing.
please do!
did you notice I added a new bounty too?
Let's say that we have a 4x8 matrix we want to test for the property (the answer, found by brute force, should be no)
@MartinBüttner How did you get those two pairs of numbers? I didn't find a solution with either one in either order, in all subsets of those characters.
Yes I noticed the bounty.
1 0 0 1 1 1 0 1
1 1 0 0 1 1 1 0
0 1 1 0 0 1 1 1
1 0 1 1 0 0 1 1
First, cut off the end to make it a square matrix.
1 0 0 1
1 1 0 0
0 1 1 0
1 0 1 1
Invert this matrix.
14:46
@user23013 I took the tangent of the output.. and then Mathematica has Rationalize which gives you a rational number that is accurate up to some precision. those two pairs are the only reducible pairs that give the correct arctangent for all the relevant digits
both of those are too short for the 24 characters we have though
they only need 12 or 13 characters
-1  1 -1  1
 1  0  1 -1
-1  0  0  1
 2 -1  1 -1
that means, you need to multiply both by a number around 1e6 to use up all 24 characters
Multiply this by the original
but because those added digits aren't significant, so there will be a lot of solutions that aren't actually exact multiples of those two numbers
@PhiNotPi you can't! they don't fit
14:48
but by iterating over multiples, you might be able to find a pair that works
Yes, they do, you just have to multiply in the right order.
 1  0  0  0  0 -1  1 -1
 0  1  0  0  1  2  0  1
 0  0  1  0 -1 -1  1  0
 0  0  0  1  1  2 -1  2
@PhiNotPi OK :)
Now, a solution is obvious, it does not have this property.
Because notice how column #7 contains only -1, 0 , and 1.
Which means that, in the original matrix...
The expected output is more accurate than the two numbers generated from strings
what do you mean?
14:51
Columns 1&3, and 4&7 add up to the same vector, which they do.
oh so the matrix does have property X?
Yes it does.
@user23013 would you mind sharing your C++ code?
Actually that is what is expected.
@MartinBüttner was that meant for me?
14:52
I think I accidentally said that it shouldn't up above.
@user2179021 no
too many user2*'s in here... fix your name already! :P
2
so how do you get 1&3, and 4&7 from the final matrix?
14:53
I meant there is unlikely to be many solutions simply because it isn't accurate. It can only have many much different solutions
not really
the least significant 10 characters or so don't affect the result
Out of the extra columns (5-8) column 7 contains only -1,0, and 1.
118038011000001 71756985000000 ma returned 1.0245778622239616
There is a 1 at location 1&3, and a -1 at location 4. The column itself is included in the set with the negative numbers, so it becomes 4&7.
(Column 7 is [1 0 1 -1])
@PhiNotPi this is an interesting claim! I am slightly worried that your method doesn't use the fact that the matrix is cyclic does it?
14:55
Not yet, no it does not.
@user23013 I see... hmm...
and we know that testing if the matrix has property X is np-hard for general 0-1 matrices
@PhiNotPi so your method can't work in poly time for general matrices
but maybe you aren't claiming poly time?
how expensive is the last step after the inversion and multiplication?
Here's the catch: there doesn't need to be a single column that contains to -1,0,1, it can be a sum of columns.
That is where it breaks poly-time.
ok that's good :)
@user23013 if you try with arbitrary numbers generated by strings and base conversion you can swap out the last couple of characters or so... so it is more accurate than I thought, but there is some degeneracy
14:57
but you seem to have decreased the size of the problem a lot!
@PhiNotPi, the problem with matrix approaches is that the elimination in the matrix inverse can use one column more than once.
still there might be many solutions for different multiples of the two numbers.
Cracking Dennis' CJam one?
Why is this a popcon? o.O
Because it needed a win criterion for it to not break any rules here. Really, it should have been on SO.
15:01
hi @PeterTaylor
@MartinBüttner I think my code is ugly. But here it is: pastebin.com/LuHutgMZ
@PeterTaylor what's your current best guess for how far one can go with my challenge?
@user23013 try starting at i=1000000
@PhiNotPi I quite liked the idea :)
I think... it might be possible to prove that a score >=2 is impossible.
hold on... I'm thinking
15:04
@MartinBüttner Why? I just searched for more possibilities, not less.
@PhiNotPi I would be very interested to see that (I don't believe it I should say)
@user23013 Oh did that search actually complete?
oh okay, never mind then
It is much faster than I expected
15:05
and you tried both pairs with both possible assignments between number and base 11/19?
hm, that's kinda odd
well or maybe it isn't
because there are some inaccurate possibilities
if it's that fast, you could start including +/-1 off each multiple in the search
(also, just to be sure, did you test the code with some string and numbers where you know it should find a result?)
@user2179021 The big issue with brute-forcing it is memory consumption. Even if one switches to a Bloom filter approach for detecting duplicates, it needs on the order of 2^(2n) bits. So I think that 32/x is about the limit without getting into disk-backed operation.
@PeterTaylor if the problem is really space rather than time, is it possible to use a time-space tradeoff algorithm for computing F_0?
if you had an array of length n you could computer F_0 in T.S =O(n^2) I think
where T is time and S is space
But I've borrowed and improved Suboptimus Prime's iteration order idea and managed to check all 24-bit Lyndon words in under 12 minutes.
15:09
I tested. But random arrangements are unlikely having such a big common divisor
and I am ignoring log factors
Has anyone written a clustering challenge yet?
What's F_0?
@user23013 what do you mean by random arrangements?
F_0 is the number of distinct elements
15:10
I mean, generate a pair of numbers yourself
oh.. err.. we just want to know if any two elements are the same
there are slightly better algorithms for that I think
oh I know what you mean
Trying to do Dennis' by brute force and I feel like I'm playing higher or lower
Yes, it could be split into multiple parts with recalculation to keep it all in memory. That's complex, but it might allow you to extend n by a bit and keep the running time semi-reasonable.
@PeterTaylor arxiv.org/abs/1309.3690 has some algorithms that might be helpful
15:12
Or doing statistics on the rejections might allow a quick-reject which passes over to a slow disk-backed check only for a few thousand words.
@user23013 btw, the reason I suggested starting at 1000000, is that lower multiples result in numbers that are too small to use up 24 characters
so it would reduce the search time by almost a third, I suppose
@PeterTaylor that sounds like a potentially more practical idea
There are some possibilities he didn't use every character, like some space characters
@PeterTaylor oh the paper I sent you is not that relevant. It assumes a read only array. But we don't want to store all the possible sums
@PeterTaylor sorry about that
So it will also print result if some characters are not used
15:15
@user2179021 It also assumes a function whose domain and codomain are the same.
that's not true
the array is indexed 1..n and the values in the array can have any value
it uses a hash function that hash from the range of the values to 1..n
a random hash function
Oh, I may have read too much into "This algorithm is based on a new time and space efficient algorithm for finding all collisions of a function f from a finite set to itself that are reachable by iterating f from a given set of starting points."
it is a little hard to extract the algorithm from the paper I will grant you
@user23013 good point
but the main problem is that we don't have a stored array of all the possible column sums
15:17
so I guess all we can do is try small offsets?
But I've found the 33 byte Ruby one
hmm.. it's an interesting problem. How quickly can you detect duplices in 2^n elements using << 2^n space
duplicates
@user23013 finally :)
well.. more than 2^n here
if only SO was any good :)
When I saw that "Polygon Traversal" post just now, I thought "that's an interesting title"... and then I saw the tags and though "uh oh..." ... and then I opened the question :(
15:19
1.0245778620649317 :/
@Sp3000 what are you trying?
Playing higher or lower with your suggestion of "..."Jb"..."Bbma
It's going surprisingly okay... I think
@Pey
@PeterTaylor n = 32 would be very interesting in any case. In fact I would be interested to see a sequence of the optimal values
my guess is n=32 will give a score over 2
@user23013 how do I compile that code?
g++ -std=c++11 -O3 file.cpp throws tons of errors about prev and next being ambiguous
Ah... I compiled without c++11
15:28
oh okay
that gives only warnings, good
@user23013 can I run the dfs<24,11> call in a loop to test multiple numbers, or would that cause any problems?
No problem. It will restore any state changed
@user23013 I found something
how do I know where one string stops and the other starts though?
I didn't write that code. It was looking for strings with only exact length at the beginning. Then I changed a little bit after that failed.
lol
I've got three results now, but no idea where one stops and the other starts, or which one is first ^^
You can save the depth into a variable in if(maxdepth==11)
15:40
I think I've got it
the Bb one in the inner loop is displayed first
okay, the result I found wasn't accurate enough
Here's my progress so far....
So we take the original matrix:
1 0 0 1 1 1 0 1
1 1 0 0 1 1 1 0
0 1 1 0 0 1 1 1
1 0 1 1 0 0 1 1
And do the chop, invert, and multiply thing to get a new matrix:
1  0  0  0  0 -1  1 -1
0  1  0  0  1  2  0  1
0  0  1  0 -1 -1  1  0
0  0  0  1  1  2 -1  2
Now, so far, every part of Property X has been conserved: any combination of columns with the same sum in the original give the same sum in the new matrix.
Compare 1&4 vs. 3&5 and 1&3 vs. 4&7.
15:52
so combinations of columns which don't give the same sum still not give the same sum?
d/so/do
Edit: I think they would still give different sums.
okay, I've got it spit out the right CJam code now, so I can test the candidates more easily
well we need that property don't we?
we if and only if
not just if, if you see what I mean
grrr... we need if and only if
I clarified what I meant by no.
15:55
Now, what we do next is the interesting part.
you already seem to have reduced the size of the problem a lot
We take the original matrix and swap column 4 and 8.
The exact columns don't matter, just one column is in the square part (1-4) and one isn't (5-8).
1 0 0 1 1 1 0 1
1 1 0 0 1 1 1 0
0 1 1 1 0 1 1 0
1 0 1 1 0 0 1 1
Property X is conserved by swapping columns.
yes it is
15:57
Then, we do the chop, invert, and multiply thing again.
 1.0  0.0  0.0  0.0  0.5  0.0  0.5  0.5
 0.0  1.0  0.0  0.0  0.5  1.0  0.5 -0.5
 0.0  0.0  1.0  0.0 -1.0 -1.0  1.0  0.0
 0.0  0.0  0.0  1.0  0.5  1.0 -0.5  0.5
is there a simple proof why the copy, invert and multiply preserves property X?
I am worried about @PeterTaylor's earlier point
chop
I haven't proven it yet.
But, I think, if Peter were correct, then we would actually be able to prove that scores >= 2 are impossible.

« first day (1378 days earlier)      last day (3762 days later) »