« first day (1763 days earlier)      last day (3073 days later) » 

Anonymous
3:00 PM
Conjecture: the only way to have 4/9 in a 3x3 is with a rotation of Martin's 4/9 solution
 
I've got a python solution for it if it ever gets unholded:
On the spot! Will you try for the other bonus? — jose_castro_arnaud 17 hours ago
 
110
011
000
 
Oops
1
A: Quine Pride Parade!

quintopiaAubergine, 7*24+1-9=160-140=20-30%=14 bytes -a1+a1=oA=Bi-BA:bB=iaooo o o o I am a quine written o o in Aubergine, and o o very proud of it! o o o oooooooooooooooooooooooo (removethis) The (removethis) is not code, but is just there to protect ...

 
Anonymous
@NathanMerrill Good catch. I modify my conjecture to be a rotation/reflection of yours or Martin's solutions
 
conjecture:
any 3x3 square with 4 squares filled in and no 3-in-a-row can be tiled without any 3-in-a-row
 
Anonymous
3:04 PM
100
001
110
3
 
@Dennis nice J solution, I completely forgot about _&q: and used __{:@q:]
also, what is the "sock avatar" next to Dennis's regular avatar in the chat?
 
Anonymous
Another user with the same username
 
Anonymous
Presumably another of Alex's socks
 
Anonymous
3:07 PM
:P
 
Anonymous
The greatest mystery of PPCG is who @ಠ_ಠ belongs to
 
isn't ಠ_ಠ a normal user? if not I place my bets on Alex
 
@Mego it's not a mystery to everyone ;)
 
Anonymous
We're 90% certain @ಠ_ಠ is a sock of somebody's, because it has only made one post, for the sole purpose of getting chat privileges
 
Anonymous
@MartinBüttner Yeah well the mods aren't gonna spill the beans, so us peasants normal users have to figure it out for ourselves
 
3:10 PM
ah
 
Anonymous
It's a common belief/joke that it's Alex, but we have conflicting evidence
 
what evidence?
 
Anonymous
At one point Alex claimed it, but , so...
 
@MartinBüttner that's a rotation of mine
 
oh, right
 
3:12 PM
010
101
010
 
hah, neat :)
 
Anonymous
@NathanMerrill The inverse of that (except the middle square) also works, I believe
 
@Mego yeah, because it's a rotation of the trivial solution
 
Anonymous
True
 
@Mego any circle on a square grid should work
 
Anonymous
3:13 PM
So either it's a circle or one of the two tetrominos who don't have a side of length 3
 
Anonymous
(square and z)
 
01110 10001 10101 10001 01110
 
ctrl+k
(for multiline + code formatting)
anyway, your pattern contains 111
 
Yeah
 
Anonymous
So circles only work on 3x3
 
Anonymous
3:16 PM
With 4x4 you get diagonals
 
yeah
 
So how to do multi-line on mobile?
 
Anonymous
01100110
10011001
10011001
01100110
 
Anonymous
Interesting
 
Question: can I post a non-competitive answer if it's interesting?
 
3:17 PM
there's a meta on that i think
 
This discussion males me want to play Unruly on Tatham's Puzzle Pack
 
Anonymous
@VoteToClose Non-competitive how?
 
^
if it outright ignores the winning-criterion, no
if it just happens to be in a non-competitive language or simply worse than the best answer in the language (but still golfed, say), then that's fine
@Mego and invalid ;)
 
I wrote a quine for the "output the PPCG logo", but for when it was a popcon. I've since then still made it a quine that still follows criteria, but golfed it down a bit.
 
Anonymous
@MartinBüttner That was me testing the 4x4 circle
 
3:20 PM
@Mego My language keeps not wanting to use Unicode and I don't know why :/
 
Anonymous
@VoteToClose I don't see an issue with that. I mean, people use Java for answers.
 
Oh, hey, the pinned star-bait message is gone! :D
 
Anonymous
@VoteToClose for now
 
D:
Oh, dammit, new criteria makes my quine not follow the guidelines. -.-
I always spend time on questions, then realize I'm doing it wrong.
 
Anonymous
@anOKsquirrel Have you tried turning it off and on again?
 
3:23 PM
@Mego yeah, and duct tape
 
Anonymous
@anOKsquirrel Go for the wd-40, then
 
@VoteToClose with that particular question you only have yourself to blame for wasting time on a bad challenge ;)
 
@Mego That too. I even used glue
 
Anonymous
On a serious note, got a github link or pastebin that I can look at?
 
yes, I'll make a pastebin. the GH version is the current stable one
 
3:24 PM
Interestingly, I accidentally pushed it at some point. See: github.com/VTCAKAVSMoACE/Vitsy/blob/master/examples/PCG
 
Anonymous
Github is preferable
 
@Mego yeah, but it's all on master and such :/
 
Anonymous
@anOKsquirrel So?
 
0101
1100
0011
1010
 
I dunno
i'll make a gist
 
3:25 PM
Why are we posting binary?
 
2
Q: Maximal tiling without any 3-in-a-rows

MrTiYou are given an arbitrarily large grid, where each square can either be off or on (think Game-of-life type board). You need to tile such a grid to maximize the number of "on" squares without there being any 3-in-a-row of "on" squares. A 3-in-a-row can be horizontal, vertical, or diagonal. 3-i...

that's why
 
Because it's an interesting 4x4 solution, that is inverse-quarter-turn-symmetric
 
Actually it demonstrates the relation to ellipses
 
@NathanMerrill how many valid 5/9 non-wrapping blocks are there, and we can tile the plane with them?
 
3:29 PM
Since it's identical to
1100
1010
0101
0011
you can see the two interlocking boats
 
Oh wait
 
@quintopia are we talking about different problems?
 
Invalid
 
3:30 PM
Secret quotes + images = a bad time
 
But the original wasn't I just translated it wrong
 
no, you translated it correctly
if you tile the original you also get diagonals
 
okay, I ruined the binary number.
 
>! Does this work in chat?
No, it doesn't. :c
 
spoiler?
 
3:32 PM
Yeah, spoiler quotes and images don't work together.
The image just suddenly appears when you highlight over it instead of a smooth fade.
Heh, I just noticed this in the edits for the PPCG logo question:
 
Anonymous
@anOKsquirrel gist.github.com/Mego/bf8908ead49b4c51d9c0 works fine for me. I'm guessing the issue is with terminal input - try cating from a file
 
It takes a file name, not a program
 
Can we all give this answer some love:
1
A: Sprocket Science: Animating a Chain Drive System

TFeldC# Not golfed at all, but works (I think) Uses Magick.NET to render gif. using System; using System.Collections.Generic; using System.Drawing; using System.Drawing.Imaging; using ImageMagick; namespace ConsoleApplication1 { class Sprocket { public float x,y,r; public bool clockwise; public do...

It's the only answer and it's so fannncy.
 
Anonymous
$ cat test.py && echo && echo && cat test.py.txt && echo && ./test.py test.py.txt
#!/usr/bin/env python3

replace_chars = {
    'à': ' 0'
}

def char_replace(code):
    result = ""
    for char in code:
        if char in replace_chars:
            result += replace_chars[char]
        else:
            result += char
    return result

with open('test.py.txt',encoding='utf-8') as f:
    print(char_replace(f.read()))

àbcd
 0bcd
 
ohh, I forgot the encoding part in open
 
Anonymous
3:43 PM
Wow I expected that to be shrunk
 
Anonymous
Yeah it matters
 
Anonymous
Unless your locale encoding is utf-8 (hint: it almost certainly isn't)
 
@Mego Nathan got an answer bringing the upper bound down to 7/12
 
@Mego lemme try again, without file io
 
Anonymous
@MartinBüttner Neat
 
Anonymous
You may find that helpful
 
welp, I can't see why it would make a difference (because I'm dumb)
 
Anonymous
Hmm?
 
I can't tell if it's file IO or my code
 
Anonymous
It's probably the file IO
 
Anonymous
3:49 PM
Make sure you always specify the encoding
 
Anonymous
Otherwise it'll assume something like Latin-1, and do one char per byte
 
Anonymous
Rather than recognizing and handling multibyte sequences
 
StandardCharsets.UTF8
 
@Mego I specified the encoding, and I tested it with the -i flag. Doesn't seem to work right
 
Anonymous
3:51 PM
@anOKsquirrel I don't know what the -i flag is
 
@Mego interactive
 
Anonymous
Oh
 
gives a shell after program runs
 
So, for this question, how would we scramble MC code?
16
Q: Find the Interweaved Source Codes (Cops)

EridanThis is the cops' thread. For the robbers' thread, go here. Introduction For this Cops/Robbers challenge, the cops will write output-producing programs and interweave them together. It is the robber's job to pick apart the cops' programs to produce the desired outputs. Cop rules The cops may ...

 
Nope! It's my terminal. I feel really dumb now :/ I used IDLE to check
@VoteToClose Minecraft you mean?
 
3:52 PM
Yes.
 
I have a really good idea for the cops
take an interpreted language that prints errors to stdout
have one program produce a syntax error
and interweave it with a normal program
ah wait "program must not contain errors"
nevermind
 
Idea: for MC input, use signal strength. 0-15 = 0-F
 
@NathanMerrill his proof for 7/12 is the same as yours for 6/9
(and the tile we've used to prove 6/9 is also assumed to be non-wrapping)
 
yeah, I misunderstood
 
3:56 PM
@anOKsquirrel I use command blocks, which means I have to interweave source code and block position.
 
@VoteToClose hmm
@Mego I'm on Wandoze, Locales: generation makes no sense to me
 
Anonymous
@anOKsquirrel Don't use IDLE :P
 
@Mego I use gitbash
 
Anonymous
Cygwin
 
same thing, right?
 
Anonymous
3:58 PM
Ahahahahahahah
 
Anonymous
Ahahahahahahahahahah
 
Anonymous
No
 
Anonymous
 
Anonymous
(That's IDLE with 2.7, but it's the same for 3.x)
 
it works in IDLE, but not in git bash.
 
Anonymous
4:00 PM
 
0
A: Sandbox for Proposed Challenges

TheNumberOne Ant Wars king-of-the-hill Parts of this challenge are based off of Ant Queen of the Hill Contest. Objective To conquer the ants of the world ... or have the biggest army of ants. To do this, you start with a single queen. The queen can create worker ants by using food gathered by itself o...

 
Anonymous
^^ That would be why
 
Anonymous
Go away sandbox you're in the way of my carrots
2
 
lol
YES THANK YOU
 
Anonymous
 
Anonymous
4:01 PM
That's what Cygwin looks like
 
i know
THANK YOU YES
 
Anonymous
Use it
 
:D
I did
 
Anonymous
And it worked?
 
Anonymous
4:02 PM
Good :)
 
Anonymous
Let this be a lesson to you: one cannot program with bash alone
 
Anonymous
You need a full POSIX environment
 
Anonymous
Because POSIX is da bomb
 
@NathanMerrill I can't seem to fit 10 into 4x4 either. It's probably not too hard to prove, but an exhaustive search with some code should be quickest.
 
4:09 PM
0
A: Sandbox for Proposed Challenges

VoteToCloseOutput the Current Time [CATALOG] code-golfdatetime Challenge You must output the current time continuously (until cancelled by an interrupt), once every second, by any of the following means: It must be in 24-hour or AM/PM format. If it is the former, it must be spaced out with colons (i....

 
I wonder you could find an analytic solution for the upper bound in a 3xN matrix, and then just let N->infinity.
 
for a 3xN you only have to keep track of the last 2 columns, so you can do an exhaustive search
or do you want to tile with it?
 
@randomra no
@randomra I'm not following that
 
@randomra Thanks. :) How does 1+/@,0=i.|] work? I can't seem to figure out how 1+/@, is parsed.
 
@Dennis ((+/)@,)
adverbs & conjunctions are LTR, with the same priority
 
4:18 PM
Oh, right. Thanks!
I always have trouble combining +/ with the rest of my train.
 
Anonymous
choo choo
 
if it is on the right, you need parens
@MartinBüttner you can find all optimal solutions for 3xk (k=1..N) in O(N) by greedily keeping the best entries from the 3xk's with distinct last 2 rows
 
1
Q: Golf yourself a beer

BasIt's friday! Which means it's time for beer! Sadly though, today we will be golfing beer instead of drinking it. :( Challenge Output a beer and drink it. The amount of sips you take changes your output. Sips Your program should take one input string. This string can solely consist out of conc...

 
but I guess you know that, just didn't understand what I tried to say
 
oh I see, I hadn't thought of that, but I did think about how to reuse the previous results
 
4:27 PM
Hey guys
 
Hello. :D
 
yo is one of the math geeks here
 
Oh, @El'endiaStarman!
 
Anonymous
I'm here
 
I'm trying to explain to myself why shuffling a latin square first by rows then by columns is not a way to uniformly generate random latin squares
 
4:39 PM
2
Q: Title Keywords in Context

JohnEThis challenge is based on a problem described in D. Parnas, On the criteria to be used in decomposing systems into modules, and elaborated upon in J. Morris, Real Programming in Functional Languages. Write a program or function which takes a list of book titles from stdin or as an argument, in ...

 
when I look at the wiki: en.wikipedia.org/wiki/Latin_square
the number of valid latin squares of N = 5 is 161280
while 5!^2 (the number of possibilities from two permutations) is 14400
so clearly it can't be uniform - it can't even generate all possible latin squares of size 5
but I fail to see why
 
@randomra actually, I'm not sure it's necessarily true, that an optimal 3xN solution builds on an optimal 3x(N-1) solution.
 
@MartinBüttner what problem?
 
Anonymous
@orlp I'll ponder it in the shower
 
Nathan's binary matrix problem. Scroll up a bit, I'm on mobile right now ;)
 
4:43 PM
"given an arbitrarily large grid of on/off switches (think game of life), what pattern of switches will maximize the number of "on" switches without there being exactly 3 "on" switches in a row?"
?
 
Anonymous
Yep
 
is it rows only?
or columns as well
 
I've got another problem idea and it's the Josephus problem again. Given the size of the circle, the steps to elimination, and p your position at the start, either determine when you are eliminated (by saying if you are the something-to-last eliminated or your the something-th survivor) or would you survive if e people were eliminated from the circle
 
Anonymous
Horizontal, vertical, diagonal
 
Anonymous
And >= 3 is forbidden
 
4:44 PM
everything on
done
 
Anonymous
That's >= 3
 
only exception is for n = 3
 
Bye guys
 
oh
>= 3 is forbidden
 
Anonymous
Meaning if you take a series of 3 squares that are in a horizontal, vertical, or diagonal line, no more than 2 may be on
 
4:45 PM
well solutions for N = 1 and N = 2 are all on obviously
 
Anonymous
Yeah
 
N = 3 is everything on except one diagonal
no, 6/9
 
Anonymous
Sorry, was thinking about tiling still
 
xxo
xox
oxx
 
@MartinBüttner on one of the optimal solutions with every possible last 2 column
 
4:47 PM
in general, 3xN can't have more than 6
 
Anonymous
If you tile a 3x3 square in all 8 directions, 5/9 seems to be the maximum
 
Anonymous
@orlp ?
 
3xN has 3 rows
each row may at most have 2 on switches
3x2 = 6 thus optimal
 
you have to keep a list of the ~2^6 solutions (with every possible ~2^6 ending)
 
Anonymous
Right, I'm still on tiling
 
4:49 PM
OH
it's 3 in a row
never mind
as in consecutively
 
Anonymous
Yes, as in no 3 linear points
 
Anonymous
So this is invalid:
 
Anonymous
100
010
001
 
nah I get it now
 
Anonymous
If you add in the restriction that you can't have 3 off in a row either, it's tic-tac-toe :P
 
4:52 PM
did any of you guys bruteforce 3x6?
 
Anonymous
Not yet
 
I'll do that then
 
Anonymous
Also: hexagonal tiles, with triangles as filler where needed to make a rectangular grid
 

« first day (1763 days earlier)      last day (3073 days later) »