« first day (1590 days earlier)      last day (3247 days later) » 

12:00 AM
 Are you enjoying yourselves?
 
I am. Though I haven't seen Brian in a while..
 
I have dug a hole that I shall live my life in.
You can add it to the list of coordinates, if you like :P
 
How big is the hole :P
 
1x1.
 
I'll let you add that..
 
12:02 AM
@BrainSteel I would at least double the size.
 
It's my hole.
There's a room at the bottom of it.
Kinda.
 
1x1 = 1x1x1 in my mind.
 
12:15 AM
@Calvin'sHobbies Would memory (yes, the children's game) be a good code challenge?
Each program would have limited memory.
 
As a koth?
 
The scripts wouldn't directly compete against each other. But I would still use a controller to run the submissions.
 
Maybe it would work. But an optimal algorithm might be simple
 
What if the memory was volatile (or most of it)?
 
12:31 AM
@Calvin'sHobbies Haha thanks. I didn't lose anything important when I died though I don't think
I'm still tossing up what to do - either a redstone museum or a giant hopper sorter
Will join after brunch, only just got up
 
@TheNumberOne How would that work. (what if the mem were shared?)
@Sp3000 Alright. (I stole your cobble for my iron golem farm)
 
Ahaha go for it
btw somewhere down in my mine is a zombie spawner, if you want to use that for something
(Loot: 3 saddles, 2 records, and the usual)
 
Xp farm maybe
@BrainSteel I'll be back in 20min or so
 
12:56 AM
I'm back
@Calvin'sHobbies ^
I still haven't picked a name yet.
Perhaps "magnanimous_phi"
or "glorious_phi"
"pseudogravity"
 
There was a theme, and then "pseudogravity"...
I'm going to eat.
 
"phi_official" for extra officialness
 
There's nothing better than a "just in case I become famous" username.
 
phigman_not_pigman
 
How many people are online?
 
1:04 AM
I just logged out, so... 0?
 
I'll be on in an hour or so, getting food :)
 
Is CH around anywhere?
 
0
Q: Draw a Spinning Pinwheel

TNTRemember those fun pinwheels that you blow on and they spin round and round? Let's code one! A pinwheel will have the set of characters \ | / _ drawing its center and arms. One possible pinwheel could look like this: | | |_ ___ ___|_| | | | But what's a pinwheel...

 
@PhiNotPi I'm back and about to get on. Choose youe name so we can deal with the whitelist thing
 
Any preference for my name?
 
1:11 AM
indecisive_phi
 
> magnanimous_phi
 
@PhiNotPi PhineusPi
 
That's your username? magnanimous_phi ?
 
yep :)
 
1:17 AM
please let this work
 
ahhhh yisssss
 
Did it work?!
 
I'm in.
Was all of this built since yesterday?
 
1:20 AM
AW HEEL YEEH
 
wow I missed a lot of cool stuff
 
mostly me playing longer than I ought to
 
Random fact: I actually started with 2 sheep
 
Though Sp did do the sheep and redstone building ;)
 
So... I guess I should start my own house thing somewhere?
 
1:23 AM
Sure. do whatever
 
I did mostly mining, so I don't have much to show except loot
 
@PhiNotPi If you find a hole in the ground in an otherwise flat plain, there's where I've set my claim for land :P
 
And put it on the board if you find a desert
 
I'll reappear there, safe in my hole
Board?
 
You'll see
 
1:24 AM
:O
Are you familiar with DynaMaps?
 
Yeah I want glass :(
 
I'm standing on a miniature mountain near CH's house.
 
It's a real-time MC world map that shows the explored world and the location of each user
Open in a browser
You can also submit chat messages to the people playing, IIR
Requires some kind of mod, I think MCMMO
 
We'll see. (I forget if I can easily add mods)
 
1:27 AM
Well, I'm stuck up on a hill during nighttime...
 
I should have given you a bed..
 
no bed 4 me
 
That's what the sheep were for :(
 
I could probably find some sheep
 
I killed a couple of those sheep for a bed.
I have a few wool
 
1:28 AM
I made like 10 beds :P
 
I found a massive swarm of sheep, but it's down on the ground on not on my hill.
 
Might you guys make a new room for the MC server?
 
We could.
 
Or we could use MC's actual chat feature...
 
1:30 AM
@Sparr Getting tired of hearing us talk about it? :P
 
You could run to Calvin's house and hope a creeper doesn't follow :D
 
@PhiNotPi That
 
I'm not actually following along, but having to scroll so far up to find earlier ppcg chat is a little bothersome
 
We should have done that in the first place, really :) so no worries
 
1:35 AM
@BrainSteel Join us in the MC server chat room
@Doorknob Do you play Minecraft?
 
@AlexA. No:
May 11 at 19:41, by Doorknob
But yeah, Nethack is the only game. All other games are just reskinned versions of Nethack.
 
Fair enough. :P
 
I would make a PPCG Nethack room, but I would probably be the only one in it. :P
 
Yeah...
 
2:21 AM
I play nethack!
 
yay \o/
Are you doing Junethack?
 
I don't actually know what that is.
 
Ooooh.
 
I am, but don't have much time for it this year. Haven't even ascended once yet. -_-
 
3:02 AM
0
Q: Find a winning strategy in Reachability game

codeycamachoConsider a two-player game as a bipartite graph G = (S1 U S2, q0, k) with: two finite set of nodes S1 and S2 with S1 ∩ S2 = ∅; Si, i = 1, 2 is the set of nodes owned by player i, q0 ∈ S1 is the initial node of the game k ⊆ (S1 x S1) U (S1 x S2) U (S2 x S1) U (S2 x S1) A reachability game (G, ...

 
 
6 hours later…
9:02 AM
@TheNumberOne Ok, I'm gonna do a new simulation=)
 
 
1 hour later…
10:09 AM
@TheNumberOne Updated it=)
 
10:53 AM
@Dennis have you tried burrows wheeler in CJam?
 
11:41 AM
@Dennis Also I'm not sure about your time limit. How do you implement the inverse even faster than the forward transform? It seems that the forward transform is something like O(N² log N) whereas the inverse is O(N³ log N). For a 1k character string, the CJam online interpreter computes the forward transform almost immediately, but needs 2-3 minutes for the inverse.
(I think the Java interpreter could do it in under a minute... but still...)
@trichoplax I have my doubts that we'll auto-graduate once we get there. ;)
 
@MartinBüttner I have. BWT and its inverse took 15 seconds together.
 
in the online interpreter?
 
That's with 1,000 characters in the online interpreter.
 
huh
how many bytes?
 
1,000.
 
11:51 AM
your code... :P
 
But yes, the inverse is a lot slower using a naive implementation.
Efficient ones do not require sorting to compute the inverse.
 
ah okay
do you want to require those efficient ones?
 
I'm fine with either one.
The efficient one would be a lot longer in CJam. Not sure about other languages.
 
the inefficient one takes 5 seconds in the Java interpreter
 
15 seconds was for the inefficient one, btw.
 
11:55 AM
hm, interesting
so how long is your code for the inefficient implementation? ;)
 
38 bytes. Didn't try to golf it.
1.3 s with Java (any direction).
 
o.O
"Didn't try to golf it" :D
I already golfed mine and I'm at 43 :D
 
burn
 
Haha.
I hadn't actually tried implementing the inverse before writing up the sandbox post. I remembered the inverse being a lot faster, but the footnote is confusing in its current state.
@MartinBüttner I've reworded the confounding sentence and raised the time limit to 10 minutes.
@Optimizer Did you try fixing your spell checker?
 
12:22 PM
hm, 42... I'd probably have to implement a different algorithm to bring it to 38 "without golfing" -.-
@Dennis are you up for golfing the Visual Long Division challenge today?
 
@MartinBüttner Not sure if I'll have the time.
I hope I will.
 
k
well I can wait with posting it until tomorrow
but if someone's around who'd give it a try I might post it today
 
12:53 PM
@MartinBüttner Yikes. I think I can explain the speed difference between our BWT inverses.
What kind of input did you try?
 
a very repetitive one
 
Yep, that's it.
 
"ProgrammingPuzzles&CodeGolf"1000*1000<
 
I used a random string, so the comparisons were easy.
'a999*'b+500m> is still under 5 seconds with Java.
2 minutes 5 seconds with the online interpreter.
 
yeah that sounds about right
 
12:59 PM
'a499*'b+250m> takes less than 20 seconds. I'll go with 500 characters then.
And post that as a test case.
 
hm, saved another byte... still 41 :/
I wonder whether we're even remotely doing the same thing :P
 
@MartinBüttner We probably are. Would you mind verifying the new test cases?
Also, is the indentation broken for you as well?
Doesn't look as it does in the editor.
Fixed the identation. Now it looks broken in the editor. :/
 
1:19 PM
it's the mathjax bug
won't happen once you paste it on main
@Dennis test cases are looking good
 
@MartinBüttner I'll go ahead and post it then.
 
sure
I'll post mine too
 
1
Q: Visual Long Multiplication

Martin BüttnerThere is a nice way to perform long multiplication for two integers without having to do anything but counting, which occasional gets shared around the internet. You write the digits of each number as a bunch of slanted lines, with the two numbers at a 90 degree angle. Then you can simply count t...

1
Q: Burrows, Wheeler and Back

DennisBackground The Burrows–Wheeler transform (BWT) is a reversible permutation of the characters of a string that results in large runs of similar characters for certain types of strings such as plain text. It is used, for example, in the bzip2 compression algorithm. The BWT is defined as follows: ...

 
1:54 PM
CJam's j is nifty. I've implemented a search for the longest common subsequence of two strings for Rearranging Words.
Didn't help me for the challenge, but sure was fun to try.
 
Should have been called 'Wheeler-Burrows'
 
many things should have been called different names
 
2:15 PM
@MartinBüttner @isaacg's Pyth answer uses the same idea I used for computing the inverse. Saves at least 5 bytes in your code, bringing you down to 37.
 
I got it off of wikipedia.
 
I meant how to deal with the space.
 
Oh, that. That was luck.
 
4 bytes, that is.
 
JNV
Hi, I have a question. Would a brainfuck text generator be well-received? (Generate a brainfuck program that outputs a string)
 
2:21 PM
Code golf? Code challenge on shortest BF?
Sounds fun, though I'm not sure if it's been done before.
 
JNV
Actually I was thinking of both. Is it possible to change the winning conditions of a code golf?
 
A code-golf is defined as one where the primary win condition is the shortest program length. What were you thinking of?
 
JNV
Like, if the outputted program contains while loops, subtract 15 bytes.
 
The are a lot of code golf questions with bonuses or penalties.
 
JNV
Oh, okay. Thanks.
 
2:39 PM
But that would encourage people to just but an useless [] at the end of their otherwise loopless code. Giving a bonus to actually good solutions might be preferable.
 
@Dennis Oh I didn't even look at the table generated from the iBWT... so they are all just cyclic permutations
that make sense
36
 
Yes, 36. Your approach sorts at the end.
 
16
Q: Brainfuck Golfer

JiminPOne of easiest code written by a programming language is a program printing sequence of characters (ex. "Hello, world!"). However, some esoteric programming languages like Brainfuck, even this simplest code is quite annoying to write. Your task is to write a program (don't have to written in bra...

 
I had l:LS&L{$L\.+}L,(*:e<1>LS+_,,\fm<$Wf=?.
 
oh so you just computed both
I wonder whether that's shorter
 
2:45 PM
Yeah, that's why I kept saying both took the same time. :P
You reuse a lot of stuff in your code.
 
yeah, saves one byte
 
JNV
3:14 PM
I just got the association bonus because I reached 200 rep. However for some reason I also got it on Code Golf SE, I'm pretty sure 'association' bonus should be for other SE sites. Am I right? Should I post in Meta SE or Meta Code Golf?
 
No, association bonus is for all sites.
 
ninja'd
 
JNV
Including the site that first got 200 rep? That kinda seems weird.
 
 
1 hour later…
4:31 PM
In what way are dentists and sysadmins alike? They both have root access.
3
 
4:54 PM
0
Q: Each step of the Levenshtein distance

LoovjoIn this challenge you will write a program that takes two newline-separated strings, s1 and s2, as input (STDIN or closest). You can assume that the length of s1 will always be smaller than 30 and bigger than the length of s2. The program should then output each step in the levenshtein distance f...

 
5:17 PM
Um, am I meant to be able to reopen vote on my own meta question? I just pressed it to double check and it worked, which seems wrong:
10
Q: Do any of you golf for a living?

trichoplaxI'm just curious about whether any of you have a real-world use for your golfing skills. I'd also be interested to hear if you know of golf-related jobs even if you aren't involved in them, or if you have areas of your life where golfing has been required for practical purposes.

@MartinBüttner @Doorknob is this a bug to be reported or is it meant to be like this on meta?
@JNV My guess is that you will get association bonus on all sites except PPCG when you pass 200 on PPCG. You won't get association bonus on PPCG until you pass 200 on a different site. However, if reaching 200 on PPCG triggers an increase on another site that takes that site over 200, then you will get association bonus on PPCG for exceeding 200 on the other site.
Chain reaction...
 
@trichoplax I think that's by design
 
@JNV It appears my guess is incorrect - I just double checked by looking at your profile and you do indeed get the association bonus on PPCG without needing to exceed 200 on another site first.
@MartinBüttner Wow. That's totally unexpected. Do you know if it is just meta or main too?
 
@trichoplax No, I'm also pretty sure that the association bonus is just given for all sites. I remember jumping from 200 to 300 on SO and back then I wasn't active on any other site.
@trichoplax likely on main as well
 
@MartinBüttner I just realised this - just posted to retract my earlier comment :)
 
oh right, overlooked that
 
5:29 PM
@MartinBüttner I can see you're answering in order - no problem
 
2
Q: Why I am able to open and close my own question?

Somnath MulukI am not able to upvote or downvote my own post. And it's fact. This question Why can I vote to close my own question? gives some idea regarding closing question. If I post a dupe on accident, and someone points it out, and realize my mistake, I can help correct mistake by voting to close my qu...

 
Thanks - makes sense now
 
6:34 PM
hi
any brave people willing to run some python code that kills my system ? :)
I can't work out why the drive thrashes when I run python code that uses too much RAM
even though I have swap off
 
6:54 PM
1
Q: Calculate a probability exactly

LembikThis task is about writing code to compute a probability exactly. The output should be a precise probability written as a fraction in its most reduced form. That is it should never output 4/8 but rather 1/2. For some positive integer n, consider a uniformly random string of 1s and -1s of length ...

 
hi @MartinBüttner
 
hi all :)
@MartinBüttner I added some things according to your suggestions
perhaps not everything you suggested :)
 
yeah, test cases would be really helpful actually
 
I added n = 1 :)
 
7:09 PM
Wouldn't it be 1/2?
Since there's a 1/2 chance for B to be 0?
 
argh!
thanks
I should go and do something else :)
 
okay, I think I've got results. coming in...
 
my brain is hurting
@MartinBüttner results for my problem already??
 
wow!
 
7:11 PM
oh wait
"You can use any language which has a freely available compiler/interpreter/etc. for Linux." can't submit I guess :/
(did it in Mathematica)
 
hmm
I hate to deny you!
the only problem I can't run your code
 
I think there's a free trial
 
is mathematica your only language that you use these days?
 
but there are enough Mathematica users around PPCG to double check the code
@Lembik no, but the only one I would enjoy solving this problem in :P
 
@MartinBüttner ok I changed the rules just for you :)
 
7:16 PM
@Dennis no.
 
@Lembik there, you got me to answer one of your challenges ;)
 
@MartinBüttner I am very pleased! :)
@MartinBüttner I did also wonder if one could write code to minimise the number of operations needed to compute the probability
a sort of super optimiser
 
@Lembik one can write all sorts of code ;)
 
:)
@MartinBüttner I meant more if that could make an interesting question on ppcg
 
maybe, but it sounds pretty tough
 
7:20 PM
you have seven = eight at the moment :)
I am sure it is very tough to get an optimal result
but do you think it would be tough to make any progress at all?
 
@Lembik I do?
 
but here are the first seven results:
8 169801/2097152
 
oh right
 
:)
 
@Lembik I don't think I have the combinatorics knowledge to be able to tell
 
7:21 PM
@MartinBüttner nor me.. I was hoping one could get the computer to do the thinking :)
 
@Lembik if you trust my results, feel free to use them as test cases
 
thanks!
 
(although it would be best if you wrote your own reference implementation)
 
your approach is interesting
I didn't think of doing it your way at all
my method would have added lots of probabilities
 
isn't that the most naive way possible?
 
7:23 PM
I think mine is more naive :)
iterate over all possible strings and add the probability of each string pair when you get two zero inner products
it involves adding lots of small numbers
 
7:51 PM
useful math trick: multipying probabilities is the same as adding the logarithms of the probabilities.
I've used this for graph traversal involving highest-compounded-probability
 
I don't understand pyth at all... how do I set n = 5 say in that answer?
@Sparr good idea
 
8:09 PM
my favorite challenge ever
from a defunct company's job application website
 
:)
 
Now that it's entirely offline, I'm thinking of posting it to the sandbox
here's the gist of it:
start with an array containing one string of bits. [1001000111101010011001001]
 
good idea!
 
choose one bitstring from the array (the only one, the first time), flip each bit with probability 20%, append the new bitstring to the array. now we have [1001000111101010011001001,1010000001110010111101000]
now, choose one of those two at random, do the 20% bit flip again, append the results
 
post it! :)
 
8:12 PM
keep doing this until you have 100 such bitstrings, each having been generated by doing a random 20% bit flip on one of the previous ones
ok, now, here's the challenge. I give you a shuffled array of those 100 bitstrings. You are supposed to give me back the highest probability family tree that would produce them.
 
sweet
 
8:49 PM
ok, sandbox post will come to the attention of the bot momentarily
 
0
A: Sandbox for Proposed Challenges

SparrBitstring Family Trees This challenge is reproduced from memory and my own solution, from a challenge that was posted in the job-application section of http://itasoftware.com before they were bought by Google. I reached out to ITA and Google a few years ago, after the acquisition, to ask to re-p...

 
9:07 PM
within a factor of 2 of Pyth, and no horizontal scrollbar. I think I can live with that.
although I feel like I should be able to find a tensor product that takes care of all the mapping and flattening
 
9:45 PM
@MartinBüttner thanks for the bounty
 
:)
@Sparr is there actually an efficient solution for that?
 
Hi, all. I'm not dead, but I have a new job and I've had family stuff keeping me busy too.
 
10:03 PM
Welcome back :)
 
10:13 PM
I'm delighted to hear that you're not dead :)
 
 
1 hour later…
11:25 PM
@MartinBüttner so what did you think about your meticulous golfing experiment?
 
I would have liked to see more participation, but your code was amazing. :)
 
i definitely enjoyed optimizing the code i had
but i think the advantage was in finding the right overall strategy
and i suspect people didn't want to switch to that strategy because it would feel like copying, no matter how they improved the code
 

« first day (1590 days earlier)      last day (3247 days later) »