« first day (1583 days earlier)      last day (3262 days later) » 

12:47 AM
@xnor I think you weren't online earlier... I'm planning to throw out a huge bounty as a test run for your meticulous-python-golfing proposal. I'm taking suggestions for the question to bounty.
 
@MartinBüttner oh, thanks for that
 
(I'm thinking Optimizer's Chinese Shrines, or my Scale up a Diamond Tiling... I'd also like Chinese Checkerboards, but I can't bounty that before tomorrow night or Monday morning, and I want to post the bounty earlier)
 
I had been thinking of putting a bounty on De Bruijn sequences, though not having attempted it, I don't know how hard it is
 
ah okay
 
i'm personally actually not as much of a fan of optimizing ASCII arts in Python because of how cumbersome its string manipulation is, but that's just me -- perhaps that's just the reason to put a bounty to encourage it
 
12:50 AM
Sp3000 suggested ascii art with symmetries might be a better testing ground because it allows for more different approaches
 
i see
that definitely is true
 
also a conceptually simpler challenge might help in getting more people to participate in the brawl :D
 
the magic thing would be something that's both conceptually simple and have a lot of potential approaches to optimize, and it's not clear when an optimum is reached, but that's the holy grail of code gold questions
 
indeed
if you can think of/find anything, let me know
 
I think the options you listed are good
i'm also a fan of Sp3000's suggestion of Fifteen Puzzle
i have a preference against chinese checkerboard because i've already looked at sp3000's solution, which gives me an advantage
actually, do you know how you'd deal with improvements on posts?
 
12:59 AM
what do you mean? if someone takes your post, golfs out two bytes and posts it as a separate answer?
 
yes, or just posts a comment
 
well if he posts a comment, you'd edit it into your post and compete with the shorter score
if someone reposts your answer with a trivial golf (and I notice) I'd probably award it to you instead of them
in general, I'd hope for people's sportsmanship
 
ok, that sounds reasonable
 
if, say, you and Sp find the shortest solution collaboratively in chat, you let me know and we'll sort something out
if you're worried about people stealing your ideas, don't post until just before the bounty ends
 
i wasn't worried about people being mean and stealing ideas, but being nice and giving unsolicited improvements :-)
 
1:04 AM
I think if they're doing that they're well aware that they're increasing your chances of getting the bounty
@xnor Out of chinese shrines and diamond tiling, which one would you prefer?
 
just from first impressions (having tried neither), I'd prefer diamond tiling
the scaling up thing is novel, so there's more room to search for new approaches
 
Morning challenge idea: A dove/hawk (rabbit/wolf) style evolution simulation where you control the animals with all having only individual memory. Your goal is to keep the ecosystem stable/alive.
This could be either a single player game or a multiplayer cooperative KotH (players all get the same score in a match). Both version would be with a controller.
 
hmmm... do I post a weird 450 rep bounty to get my screenshot, or do I post a 500 rep bounty and hope that I don't get more than +50 rep overnight :D
 
1:19 AM
wow, you have almost as much rep as the next two users combined
 
the next milestone is 2*Doorknob :P
 
@MartinBüttner Do you have a collection of nice rep-numbers?
 
My next milestone is 8,604.
 
@PhiNotPi you will need some downvotes if you want a screenshot :)
 
1:23 AM
got the screenshot... sorry for the weird bounty... I couldn't take the risk :D
@Sp3000 bounty posted on diamond tilings
 
You're at 44,449
 
it's okay, I've got my screenshot ;)
also, I just noticed that I missed 33,333 apparently... could have sworn I got all of those.
 
Time for a 11,116 rep bounty.
 
I wouldn't mind if you put a couple grand of that on some of my questions.
 
1:28 AM
I've got 5,555 6,666 8,888 11,111 22,222 44,444 as well as all multiples of 10k (and also 24k for some reason)
@randomra btw, I'd love to see a Retina answer to that diamond challenge as well ;)
 
There you go.
 
@MartinBüttner will check it out, I'm looking for good Retina tasks, the Chinese Checkers wasn't too interesting, concatenating lines in reverse order was the most interesting part
@PhiNotPi Martin hasn't collected much badge since...
 
I chopped off some badges for extra realism.
 
not enough I'm afraid ;)
 
Courtesy of Chrome's "inspect element"
 
1:36 AM
@PhiNotPi opps, I just assumed you didn't, I remembered 13 gold, but apparently Martin collects them quickly
 
One time I made it look like a Wanted poster.
 
@randomra Lab Rat Race finally hit 10k views a week ago or so, and then there was Voronoi.
anyway, I should get some sleep.
 
Are you sure about that last statement?
Sleep tight, don't let the Pyth bugs bite.
 
@PhiNotPi I like the voting koth, thought about it, and here is why I haven't felt like writing a code (just to give some feedback):
ExpectantBot is optimal if you assume bots vote randomly, any improvement would assume some kind of strategy from enemy bots. If most bot would be "strong" you could do this without checking the bots but currently the "random logic" bots outnumber those and you would have to know what they do (which is slightly against the rules) to make a considerably better bot than ExpectantBot.
@MartinBüttner I'm already up :P
 
@randomra Since it does appear that most bots are effectively random, it is going to be pretty hard to beat ExpectantBot.
I think Strategic Voting is starting to wind down. There were no answer updates today (except for some trivial things which didn't actually affect the code).
I'm looking forward to Catch-the-Cat.
 
1:50 AM
@PhiNotPi you can beat Expectant by adding a little more chance for bigger total payoff votes, but finding the proper amount/function is just trial&error as it depends on the rest of the bots
 
2:32 AM
can anyone explain the shape of the board in catch cat?
I don't know what a toroidal hexagon looks like
 
3:22 AM
@feersum haven't read the specs, but with even number of rows&columns you can fold it into a torus just like a normal squared grid
 
 
2 hours later…
5:01 AM
I just fully golfed the diamond tiling with a fixed scale-up of 2... :'(
and now I realized scale size is input too...
 
5:15 AM
awww
 
5:27 AM
@feersum toroidal just means the edges connect. go off the top to reach the bottom, off the left to reach the right.
 
5:44 AM
@Sparr but with a hex grid, there are not simply 4 sides?
it would probably clear if it said what the coordiante system is
 
this does, by the way, give a topological torus
 
6:00 AM
@isaacg you won
0
A: Can numeric input/output be in unary?

randomraYes, but only if that is a standard representation in your language Receiving input in a format your language is not prepared for makes input conversion major part of the challenge but some other language might take advantage of the specific representation. I think this answer could be applied ...

if you want to merge some stuff, do it, then I will delete mine
or keep/edit mine if it makes sense to you
 
@randomra I've incorporated some of your ideas into my post.
 
6:44 AM
@feersum I expect the map to appear rectangular, so that two of the directions extend the same distance.
a hexagon shaped map made of hexagonal cells with edges that wrap is... unusual and not an easy shape to visualize.
 
 
1 hour later…
8:09 AM
0
A: Sandbox for Proposed Challenges

xnorGraph planarity code-golf Given an graph, determine whether it is planar, meaning that it can be drawn in the plane without edges intersecting. See: planarity testing. Input: An undirected graph without self-loops in whatever format you find convenient (adjacency matrix, list of edges, bit-stri...

 
8:36 AM
^ I wonder how large grid you need so that you can put the points of a planar graph to integer coordinates on it (in a way that the layout would be planar).
 
Hi PPCG! I just got the yearling badge!
 
Hi Square!
Actually.... that's not quite accurate. What would a unihedron be?
 
0
A: Sandbox for Proposed Challenges

xnorHook length product code-golf A Young diagram is a collection of square boxes in left-justified rows and top-justified columns. For each box, all the spaces above it and to its left are occupied. XXXXX XXX XXX X The hook length of a box is the number of boxes in its hook, which consists of it...

 
8:51 AM
@NewSandboxedPosts Hook length looks like a nice simple golf
 
yes, it's really a lot more straightforward than all the background implies
 
Oh, you're accepting unary counts. Interesting... I wonder if that makes it any easier for general languages
 
9:06 AM
@Sp3000 for array based languages I would think so
definitely helps for J
 
in Maid Café (メイド喫茶), Apr 26 at 16:16, by Unihedron
I'm just as real, except in a dimension of my existence, you all don't exist.
 
D:
 
9:31 AM
I have an announcement to make.
My name is now appropriate.
 
10:24 AM
in*
 
11:04 AM
@randomra how much in J ?
 
11:15 AM
@Optimizer 26
 
fully golfed ?
 
mostly golfed, but I haven't checked other methods
how long in CJam?
 
I have 2 23 . 1 takes unary, 1 takes row lengths
 
then I'm fine with 26, will check the row lengths method later
but the unary seems to suit well J
 
hmm
 
11:29 AM
I've been stuck on 216 for diamond for the past 3 hours :(
 
hgjd
 
Ascii art isn't my favorite, but python-only challenges are
 
is it the "speak a random thing" day ?
 
@xnor ha, yet another diamond tiling related challenge ;)
 
11:38 AM
hook length is diamond tiling related ?
 
@MartinBüttner where?
 
well, diamond tilings of hexagons are essentially isometric renderings of 3D young diagrams
 
ah, right
 
11:56 AM
0
A: Sandbox for Proposed Challenges

KatyaFlash Cards Viewer code-golf In this challenge, your goal is to produce a flash card viewer. Since this is a Code Golf challenge, it won't be a particularly featureful flash card viewer - in fact, it'll be the bare minimum a flash card viewer can be. We'll implement the following features: Re...

 
has someone done a Java-wrapper for Python KotH before? or was it just the other way around?
 
I only know about arbitrary-language wrappers for Java KotHs
 
:(
 
@Katya eeeehm, coincidence?
 
I would like to write my KotH in Python, but I don't think there would be many entry in only Python
 
12:06 PM
@MartinBüttner its not. My jenga KOTH idea on chat here was also converted to sandbox by someone else..
@randomra more than cjam
 
@MartinBüttner Maybe............ ;-)
 
@Optimizer that would be more PvP than KotH
 
@randomra who knows. maybe some format can be made .. (or CJam gets stream support)
 
Pyjnius seems to be doing what I need
 
Python + Java seems odd though... at that point you might as well just do the KotH via stdin/stdout and allow all languages
 
12:11 PM
@MartinBüttner programs shouldn't keep memory between round
 
can be done
 
and launching the program at every turn takes a lot of time (like 0.1 sec/launch)
@Optimizer what do you mean?
 
@randomra you answered it.
 
:/
or trust in programs/submitters a lot...
^ maybe I will go in that direction
and I can do a test run where I check if they answer only based on the stdin
 
wow. 50mbps connection feels so luxurious
 
12:25 PM
Just golfed isaac's down 3 bytes, so now I need to take off another 2 :P
 
12:52 PM
@BrainSteel do you wanna have a look and see if you can beat this? ^
if ? would continue to work after returning EOF, I'd have 13 I think :/
anyone know a tool to create a gif where each frame is just some ASCII text?
like the ><> animations @Sp3000 includes occasionally
 
he would know, right ?
 
I think his method was specific to ><>
(like included with the interpreter or something)
@Sp3000 I think you'll need a bit more than 2 bytes now ;)
 
Hah, I'm working on it :P
Also, my method for ><> gifs was frame-by-frame Adobe Flash, actually
 
450 bounty is too much.
 
@Sp3000 D:
 
1:05 PM
specially when we have already had python-only bounties in past
but no other language-only bounties yet
 
I think Martin's disappointed :P
 
by what?
 
that xnor hasn't posted yet ?
 
That I didn't have some awesome tool for GIF making :P
 
@Sp3000 oh yeah, indeed :D
 
1:09 PM
you can screen record then convert to stop motion
 
Wait did isaac forget to update? I don't see how the new one is 195, even after spaces -> tab
 
@Optimizer hm yeah looking into that right now
 
@Optimizer i'm working on it!
 
@Sp3000 Forgot to update'
 
1:32 PM
oh, I've got a challenge idea: Fission programs without portals are generally invariant under (toroidal) translation and rotation (since all components that depend on a direction have versions for all four directions). so the last step when golfing in Fission is to find the shortest version by minimising the number of lines and rotating as many spaces as possible to the end.
so the challenge would be, given a Fission program (just a string really) find the shortest equivalent version under correct rotations and shifts.
I might wait with posting that until Fission 2.0 though... I'm really hoping C0deh4cker publishes his changes one of these days
 
0
Q: Supersonic domino tilings

DennisTask Write a program that reads two integers m and n either from STDIN or as command-line arguments and prints all possible tilings of a rectangle of dimensions m × n by 2 × 1 and 1 × 2 dominos. Dominos of an individual tiling have to be represented by two dashes (-) for 2 × 1 and two vertical ...

 
Good morning everybody!
 
Ni hao!
 
'Allo!
 
@MartinBüttner That sounds like a neat challenge! Though, it seems like the kind of thing that would attract 10 bruteforced solutions and 1 or 2 clever ones. That's not necessarily bad :) And I'll try to shorten that fission code, but I can't promise anything :)
Howdy!
 
1:49 PM
@Dennis so the product of m and n is always less than 65 ?
 
Yes, I wanted compact representations to fit in 64-bit registers.
 
ok
wow, is 70 bytes too long ?
 
For what?
 
yours
 
The fastest-code challenge? Go nuts.
 
1:51 PM
oh wait. Its fastest code !!
2
damn, 10 minutes of my life wasted
 
"... free (as in beer) ..." Ah, the best kind of free.
 
@Dennis the 1 hour limit is crazy big then. my cjam 70 byte solution can do 1 hr for the 64 test case
 
I didn't want to leave solutions unscored if I could avoid it.
And processing time is cheap. :P
 
So even the native bruteforce approach is not an invalid entry then :P
 
Wanna post the very first fastest-code CJam submission?
 
1:55 PM
it won't win
 
So? You used to answer code-golf question using JavaScript.
:P
 
and I switched to CJam.
will not make a similar mistake :P
 
Good point.
 
though, let me run it for some 50+ numbers on the java version
 
2:08 PM
1 less character on diamond.
There's so many more opportunities for golfs in a non-golfing language. It's a lot of fun.
 
2:56 PM
2
Q: Cryptographic hash golf

DennisThis challenge is a search for the shortest implementation of a hash function that is collision resistant, i.e., it should be infeasible to find two different messages with the same hash. As a cop, you try to invent and implement a hash function finding the best compromise between code size and ...

1
Q: Cryptographic hash golf (robbers)

DennisCompanion thread of Cryptographic hash golf As a reminder, here are the rules for robbers from the main challenge: Task Crack any of the cops' submissions by posting the following in the robbers' thread]: two messages M and N in I such that H(M) = H(N) and M ≠ N. Scoring C...

 
3:09 PM
0
A: Sandbox for Proposed Challenges

PhiNotPiOutput every halting program The goal of this challenge is to (eventually) output every possible halting program in a language of your choice. At first this may sound impossible, but you can accomplish this with a very careful choice of execution order. Below is an ASCII diagram to illustrate ...

 
3:24 PM
Man, CPython takes about 10 seconds just to calculate the number 2^(2^30)
 
@BrainSteel got it down to 12
(same idea, different layout)
:21934506 input is in range 2^2^30, but the time limit is on 2^2^20
 
Ah right, that's why I'm getting confused :P
 
@MartinBüttner I tried something totally different, and it's currently 20 bytes. I thought I had a good idea but it got out of hand. I'm submitting it separately because I can't shake this feeling that it's golfable and we need more Fission in PPCG :)
 
I think the first line of it is pretty neat, but the rest of it is... ehh...
I finally found use for J and teleporters though!
 
3:29 PM
nice :)
I had a neat idea for using 4 teleporters the other day, but it wasn't worth it
 
Does CarpetPython's submission invalidate the no builtins rule?
 
I'm starting to get the feeling that they make the code cool (see: harder to read) but they rarely really improve byte count.
 
Does seeding the random number generator involve a hash? I think it would.
 
@BrainSteel I was able to save a lot with teleporters in Fissile Numbers
at some point it gets hard to route your atom paths around each other
also, when you're not golfing, they're useful for modularising your code
 
hi.. anyone mathematically inclined about?
 
3:31 PM
just have separate blocks that perform a task each and join their inputs and outputs with teleporters
 
Oooohhh, yeah, I forgot about that. Yeah, if you construct a bunch of independent parts that work, that is super useful. Probably not so much in the little golfs.
@Raphael What's your question?
 
hi
 
@BrainSteel posted the 12 byte version
 
I want to calculate the probability that the inner product of two vectors of length 10 is 0 by enumeration (that is not using math :) ). In the first vector the prob that each element is -1 is 1/2 and the prob that it is 1 is 1/2
 
3:38 PM
Oh, that's cool! Very compact.
 
In the second vector the elements are -1,0,1 with prob 1/4, 1/2, 1/4
I can do this easily if the probs had been 1/3,1/3,1/3 but how do I do it when the probs are not equal?
I am sorry if this is really obvious :(
 
That is a good question.
Hmmm...
 
maybe I should set it as a code-golf challenge :)
 
I just cracked CarpetPython's answer, I think.
 
but then I wouldn't understand the answer :)
 
3:42 PM
It's a good thing we have a somewhat established precedent for writing explanations for the things we do :D
 
@Lembik Do you mean by a method that doesn't involve evaluating all the possibilities and their respective probabilities?
 
@BrainSteel :)
@trichoplax evaluating them all is fine.. How exactly do you do that?
when the probs are not equal
 
There's a lot of possibilities.
 
@trichoplax I don't think this is higher math :) I am just confused
there are 3^10*2^10
so not too many
 
Well, more than is doable by hand. And doing that feels like cheating.
 
3:43 PM
60466176
sorry I meant write code to do it
 
@Lembik If you just want to brute force it, you just go through each possibility and add its probability if it meets your criterion
 
this is programming question
 
There's got to be a more elegant solution though, right?
 
I would hope so :)
 
The following number should be a collision with CarpetPython's example of 5.
 
3:45 PM
@trichoplax so iterate over all 60466176 possibilities and for each where the inner product is 0, calculate the probability of getting that number of 0's in the second vector ?
and add some tiny probability to some sum?
 
@PhiNotPi what does that relate to?
 
@Lembik I don't understand why you say "calculate the probability of getting that number of 0's in the second vector"
 
The hash-golfing Cops and Robbers.
 
@trichoplax what do I add each time I get 0 inner product?
@PhiNotPi ok :)
 
3:46 PM
@Lembik The probability of that combination of vectors being chosen
 
@trichoplax right but how do I calculate that?
if someone could show me some code that might make my life easier :)
 
If A.B = 0, calculate p(AB) = p(A)p(B) since they are independent.
 
what is p(B) though?
where B is the one with -1,0,1 values with uneven probs
 
Well, if <x,y> = A1 + A2 + A3 + ... + A10 you can find the probability of each AN being a certain number, and then find the probability of the sum being 0.
 
the probability of choosing B from all the possible -1,0,1 vectors
 
3:48 PM
@trichoplax right but explicitly.. say I have got to 1,1,1,1,1,0,0,0,0,0 for example in my exhaustive enumeration
what is that prob?
 
p(1,1,1,1,1,0,0,0,0,0)=p(1)*p(1)*p(1)*p(1)*p(1)*p(0)*p(0)*p(0)*p(0)*p(0)
 
is it (1/4)^5 * (1/2)*5 ?
 
I believe so
It's a long time since I used probability though
 
ok so that is the part where I said you had to calculate the prob of having that many 0's
 
Provided they are chosen independently
 
3:50 PM
they are :)
 
Ah OK - but it's not just whether they are zero - you could have just 1s and -1s and still get a zero result, right?
 
yes!
that is 100% true
so basically it seems I need to do some calculation for every pair of vectors I iterate over and then add some potentially tiny probability to a sum
it seems a fragile method :) Say, I increase the size of the vectors to 15 for example
 
Yes. That's brute force. If you can think of any other way it will almost certainly be much faster
 
thanks
 
Is it worth stepping back a level in case there's an easier way of approaching this? What is the context?
 
3:56 PM
@trichoplax I would really like to extend codegolf.stackexchange.com/questions/42299/… to cases where the probs are not equal
but I feel the PPCG community may be bored of too many similar questions :)
so I thought I would do it myself
is @Jakube still around these days?
 
Jakube was just in yesterday
 
4:14 PM
hi
 
4:45 PM
back from the dead
 
@Optimizer Dennis used fff o.O
@BrainSteel nice work with the 15 byte version. the end of the explanation isn't entirely correct though: the empty K negates the energy, leaving it at +1, such that the ~ gives 0, not -2.
 
5:05 PM
It does?! I swear, this language has some arbitrary rules. I'll fix that :D Thanks!
 
they gave me more reputation for bein foul mouthed , thats generous
 
5:26 PM
@BrainSteel yeah I have no clue how he came up with some of the rules, but they definitely make for an interesting language ;)
 
Oh, it's tons of fun to try to do things with it. There are some things I feel are sorely needed, though. A general energy negation operator would be awesome.
 
Ahaha Rule 0, nice
 
@BrainSteel lol yeah
I made a list of component ideas this morning
that was number one :D
@Sp3000 oh he actually uses Mod[#^2,256] so it's even every multiple of 16 that collides
 
5:45 PM
Haha, I'd like to see that list!
 
I'm sure that even if the rule was fixed, you could probably have a long initial board which results in the same as a short one when cut down
 
@BrainSteel:
- Swap sign of energy
- Copy energy to mass
- Copy mass to energy
- Read and write integers to and from energy
- Repurpose lower case letters. Two options:
1. Keep functionality, but change values to `0` to `25`.
2. Ditch them entirely to make room for 26 new components. In this case, one of them could be `'` with an offset of `-32`.
- Delay component.
- Debug component.
@Sp3000 yeah there are a lot of other collisions as well. if he had used a more elaborate hash to obtain rule, initial condition and the number of steps, it would have been much harder.
another solution is to take two multiples of 99 that don't differ in the first 128 bits
then the rule doesn't matter
@BrainSteel I've patched a debug component into my interpreter already. It was absolutely necessary for Fissile Numbers.
 
Hmm in hindsight mine's pretty easy too. Will rethink in the morning :/
 
whenever an atom passes a `, I get some output like Atom at (1,1): [116,0]. Direction: ^
 
Those would all be so useful. I approve this list :D
Yeah, there's only so much -t can do.
I'm a fan of ditching the a-z and making room for 26 components.
 
5:54 PM
yeah, I rarely use that
@BrainSteel I'll suggest all of those to him, but I want to see his update first :/
 
For the two golfs I've done, -t did an okay job pointing out where I screwed up (which is frequent)
Is he still actively developing it?
 
> I actually didn't think anyone was using Fission so I never bothered completing my changes. Since I now know that at least one person is using it, I'll go back and finish making changes (and fix this bug you reported, thanks!).
> I have had a massive set of local changes for a long time that I never pushed as they weren't finished. They somewhat change the way the language works so I was hesitant to do so. I think that I'll push those in a new branch while I finish working on them and let people see what they think of the new Fission. It modifies some components and adds others.
 
Oh, great! Hopefully a few from the list make it :)
 
6:19 PM
@MartinBüttner I stopped golfing that after looking at Pyth :P
Is it good time to post another AAoD ? Or should I wait for monday prime time ?
 
no clue
 
6:49 PM
you know what ?
This can probably be golfed to around 35 bytes. I am trying to figure out how .. — Optimizer May 27 at 12:37
nailed it!
 
what does Array {}* do ?
 
fold
surely, you've used that before to get element differences or something?
 
oh.. :/
 

« first day (1583 days earlier)      last day (3262 days later) »