« first day (1892 days earlier)      last day (2954 days later) » 

7:00 AM
@Mego I'm amazed at how much detail the developers actually put into the game.
 
Anonymous
@El'endiaStarman It started as a jam game and then turned into the greatest April Fools not-prank of all time
 
0
Q: Make a Strawpoll

MaltysenStrawpolls are great, and we use them in chat all the time for getting opinions on things. But they're kinda annoying to make since you need a webbrowser to make them, and everyone knows that I access PPCG only through SE APIs and curl. So I want you to write some code that uses Strawpoll's API t...

 
Hi guys! How is it going?
 
@Katenkyo o/
 
gnight all!
 
7:13 AM
@zyabin101 Oh, you're missing an arm, here take one of mine -> \
@Maltysen Good night!
 
@Maltysen How to de-memo-ize?
 
@KennyLau By cleaning the datas, but why would you need that?
 
How to?
Because y(7) returned False, but I made some change so that y(7) should return True, but it still returned False
because y is memoized
in Pyth
 
user image
3
 
@KennyLau If it isn't some code in prod, you could just restart the program (freeing all its memory)
Else, you could also do y[7]=nil (or an equivalent ;)) and force him to re-compute it
 
7:20 AM
like, pyth auto-memo-ize all my functions
 
@Quill Are you breakfasting? ^^
@KennyLau Hum... I don't think it does, or never heard of that
 
@Katenkyo Just click debug
I worked around that now, so it's not a problem now
but still
 
@KennyLau Can't help any further ragarding to pyth, was saying general things
 
oh ok
 
@Katenkyo It's 5pm here; bit late for breakfast
 
7:29 AM
3
Q: Help me sort my socks!

CarmeisterI have a pile of clean socks that I want to sort into pairs. Unfortunately, I can only take socks from either end of the pile, not the middle. Further, I can only remove socks from the pile a matching pair at a time. My strategy is to first split the pile into one or more smaller piles. I think s...

 
@Quill hum forgot you were in... Australia if I recall?
 
@Katenkyo Yes
@Quill *5:30, 5pm is NT
 
anyone speaks pyth?
 
@KennyLau Harry Potter does
 
...
 
7:43 AM
brings up cheatsheet
@KennyLau kinda
 
let's say I want to write this
 
BTW, cheatsheet is here for future reference
 
def y(b):
 z = 0
 for ...:
  if ...:
   z += y(...)
 return z
this would need a local variable
but i can't find one.
at all
 
BTW, in chat, to format code just paste it in and do a Ctrl+K
Or just indent everything by four spaces
 
maybe i would need to work around it
 
7:47 AM
Also, z starts at 0, you can just do a sum
Do you have any more details
 
z must be local
look at the self-reference
 
@KennyLau ?
 
look at the self-reference
maybe i would need to workaround like this
def y(b):
 return add_all(map(... if ... else 0 , ...))
 
Probably
 
so there's no local variable
*jots down in notes*
***testing***: testing
 
7:50 AM
Many languages have no variables
 
**testing**: testing
*testing*: testing
testing
 
ಠ_ಠ just read the markdown spec
 
hi @KennyLau
and all
 
hi @Lembik
 
if anyone can read and comment on meta.codegolf.stackexchange.com/questions/2140/… that would be great
@KennyLau thanks for looking at my sandboxed question.. is it all clear now?
 
7:56 AM
V all_chat_users p"hi"
do all of us here know how to do matrix product?
 
@KennyLau you mean by code?
or by hand?
 
by hand
 
I can't imagine everyone knows
 
then teach us there :p
 
7:59 AM
nice
 
added
@KennyLau one issue with my question is that I don't specify how the input should be given
any suggestions there?
 
@Lembik This type of math is generally teached to you when yo'ure around 18, so our younger members should not know it^^
 
@Katenkyo makes sense. Hopefully my link will help
or they can google :)
@Katenkyo any suggestions for how I should specify the input?
 
@Katenkyo Wait seriously?
 
@Lembik The fact that it is linked to a specific domain (electronics) can't really help the one who read it to go in and thinks he's gonna be ok with it ^^
 
8:02 AM
thought it was only senior high level
 
Try to find an exemple unrelated to a specific field
 
@Katenkyo ok
 
@MarsUltor And how old are you when you're in senior high? should be 17-18 right?
 
In Australia it's 15-17
 
@Katenkyo how about this new link?
gcseguide.co.uk/matrices.htm 14-16 in the UK it seems
 
8:05 AM
@Lembik the input is fine that way
@MarsUltor I though youw ere speaking about the last hyear only. But Yes, depending on your field, you won't learn it until the last year of high, or the first year after
I learned it at 15-16 because I was studying mechanics and electronics, but I know lots of people who didn't know what a matrix was when I was in my first year of IT (high +1 year)
 
@Katenkyo sorry I don't quite follow. What do you mean the input is fine? I don't specify it yet
and is the new matrix-vector product link ok?
 
@Lembik Your examples shows what it is ^^
I'm reading it
@Lembik Perfectly fine!
 
the thing is that I need to test the code. So I suppose the code needs to take some standard input format so I can do that
@Katenkyo thanks :)
also.. does anyone want to actually try it out quickly.. please
hi @MartinBüttner
 
@Lembik allowing all type of 2D arrays as input, weither it is by a parameter or a string should be ok
 
@Katenkyo how would I test that code?
 
8:10 AM
the format [[0,1],[2,3]] would be standard
 
ok
that isn't actually the format in the question
if you look closely
I should edit it to make it that
 
Also, maybe the could fit?
Submissions are ranked upon how fast they can be
 
input format editted
the score is the largest n you can get to in less than 30 seconds
@Mego I would love a critical eye on meta.codegolf.stackexchange.com/a/8872/9206 please
 
@Lembik This is ranking them on how fast they are ^^'. Gonna read the tag wiki to see if fastest-code is only for complexity ranking
 
@Katenkyo ok thanks
 
8:17 AM
@lembik As long as you use the same set of input for everyone, you could use fasteset-code
 
@Katenkyo thanks
are fastest-code and code-challenge mutually exclusive?
that is can you have both?
 
@Lembik means isn't any other category IIRC
 
"A code challenge is a competition for creative ways to solve a programming puzzle with an objective winning criterion not covered by other scoring tags (e.g. code-golf). "
 
I clarified the input format
ok.. I just need one person to write some code to try it out please
then I will post it
 
@Lembik Argh horrible formatting
 
8:27 AM
Guys
Should I learn 05AB1E?
 
@Lembik (I mean I think you should turn the declaration of P and the expected result into code blocks)
@KennyLau Learn any language you want to
 
i mean
would you recommend me to
 
yes
 
cool
 
9:22 AM
@MarsUltor better?
hi @Optimizer
 
@Lembik Yeah
 
@MarsUltor hooray. Any other problems please let me know
or if you would like to try it out, even better!
 
@Lembik I have no idea what you're supposed to do though
You may want to LaTex-ify sum(exp(-x^T P x), x in Z^n)
 
@MarsUltor that's a bad sign!
@MarsUltor LaTeX-fied. I didn't know how to center it
better?
@MarsUltor could I try to explain to you what needs to be done maybe and that will help me add explanation to the question
 
9:41 AM
looks again
Oh, that's a transpose
 
yes!
 
How are you supposed to calculate the infinite sum?
 
@MarsUltor it only needs to be accurate to 5 decimal places
 
how does it even converge
 
it converges because almost all the terms in the sum are tiny
and they decrease exponentially in size as the terms in x get big
so one naive way is just to try vectors x with small elements in absolute value
e.g. -1, 0, 1
@MarsUltor does that make sense?
 
9:46 AM
Yes
 
great!
is Mars Ultor something I should know about?
@MarsUltor have you done much math?
 
@Lembik Yes
 
10:03 AM
thanks :)
 
I had to reset my beloved Firefox. Mom broke it ;(
 
@zyabin101 they do that :)
anyone know what time of day the math ppcg users arrive?
unless some are already here of course
hi @feersum
 
@Lembik Which math PPCG users?
 
@zyabin101 some people on ppcg are really good at math
I am hoping for comments on my sandboxed challenge
 
@Lembik Which ones, exactly?
 
10:13 AM
@zyabin101 I think xnor, feersum and maybe others
 
@Lembik Let me do a transcript lookup.
 
But
this is simple math
the optimization is more important
> correct to at least 5 decimal places
^ That's probably gonna be the biggest obstacle in optimization (doing as few calculations as possible)
 
thanks!
 
0
A: Sandbox for Proposed Challenges

Kevin CruijssenGym Exercise Let's do an exercise together, shall we? Simply follow the movements of the stickman. What stickman you ask? The one we are about to create! Make a program that outputs the following nine stick-figures with an interval in between: @ \@/ |@_ \@/ _@| @/ |@| \@ \@/ /|\ | | |...

 
@zyabin101 No, just go on the info screen
Maybe not
 
10:20 AM
can you see any reason why I shouldn't pose the question now?
 
@Lembik ?
 
there was a typo :)
 
feersum hasn't talked in chat for 6 days
 
I mean move the sandboxed question to main
@MarsUltor thanks
 
xnor has a spike in activity in ~3 hours, but he's online for the longest in ~15 hours
 
10:21 AM
@MarsUltor aha!
hi @xnor .. when you arrive I would be grateful if you could take a look at meta.codegolf.stackexchange.com/a/8872/9206
what time zone does that put him/her on?
 
@Lembik America, my guess EST
 
@MarsUltor good point
 
(Assuming they're active for the longest starting at 5pm)
 
@Lembik What's up?
 
@feersum I was hoping you might take a look at meta.codegolf.stackexchange.com/a/8872/9206 please
my last question has -3 so I am trying to avoid that :)
 
10:31 AM
What do we do when we moved a sandbox question to the main?
Keep it in the sandbox?
 
@KennyLau Delete it
 
I see
Then why is there 917 answers?
 
@Lembik I can't tell at a glance how computationally expensive it is (whether enough for fastest code)
How did you generate the examples?
 
@feersum I have written code myself and it is very slow when n gets to 9 or 10
@feersum what I actually did is create random matrix M with -1, 1 entries and then computed I + M^T M which we know is positive definite
@feersum I wasn't sure which tag was right.. do you think fastest code?
 
As opposed to what?
 
10:35 AM
@feersum code-challenge
I guess fastest-code.. let me change that
 
@KennyLau A lot are abandoned
 
...
such fate
 
@feersum does it look ok as it is ?
 
@Lembik is e normal exponential or 1x1 matrix exponential?
 
@MarsUltor oh I don't quite understand that question . e is a number around 2.7
@MarsUltor normal exponential
the exponent is a just a number remember
so it's just e^y where y is a number
 
10:43 AM
@Lembik As far as I can tell
 
@feersum great! Thanks
I will be very impressed if anyone gets to 12.. but then I am often impressed by ppcg people
 
(doesn't make a difference, but probably good to clarify)
@Lembik Dennis almost certainly will
 
@MarsUltor I look forward to it!
just added the rules for a tie.. someone always asks that
 
^ I made a handicap system.
Currently it only has Pyth, but soon it will include other langs as well.
 
ven
ahoy
 
10:51 AM
It seems pop-cons have come out of favor. Is this considered a bad question now?
 
@muddyfish I like good pop-cons but I might be in the minority
 
@ven Arrr!
 
hi @ven
 
I found while viewing the Sandbox. Someone should synonymise to .
 
@zyabin101 Maybe suggest that in a meta post?
 
11:01 AM
Well, the tag doesn't exist, so...
@El'endiaStarman That's what the point of the meta post was, though: that should change.
 
Oh - if it's only in the Sandbox, could it just be edited by hand?
 
@Doorknob Someone can tag a question by forgetting the hyphen, then anyone with enough rep to synonymise tags would connect it to .
 
@zyabin101 Except that's never happened, ever. So why would you expect it to happen?
 
There are 25 results in the sandbox:
 
just retag them
or leave them if theyre too old
 
11:04 AM
@trichoplax none of those are tags
 
@Doorknob Uhh...
 
hello high rep people.. would you be able to take a look at meta.codegolf.stackexchange.com/questions/2140/… please? I am thinking of posting it in a couple of hours
 
You're not asking us to clear the screen between frames are you?
or replace chars
 
@Doorknob I tried searching for tag:codegolf and got zero results, which made me hope there were none, but tag:code-golf also returns zero results. Some of the 25 results for codegolf are instances of [tag:codegolf] in the wording (not real tags but I might tidy up the recent ones anyway).
 
@trichoplax well, that's just laziness. In practice, given tag autocompletion and the rep requirement for creating tags, that wouldn't appear in the main site post.
 
11:10 AM
We would be prudent to shut down the site until we can figure out how all spelling errors can be prevented.
 
@Doorknob True - I'm not at all worried about them finding their way onto main as actual tags. It's just that if you want to view all code-golf sandbox posts these ones won't show up in the results. Very minor problem...
 
@feersum ALL of them!
 
@feersum jQuery
Well, it probably needs a userscript
 
@feersum That one Ctrl-Enter thing...
 
@Doorknob Turns out only 1 is recent enough to seem worth changing. I now feel I have accomplished a negligible improvement to the sandbox. Yay!
 
11:15 AM
@trichoplax \o/
 
We could make a Stack App that works like: select spelling error, press Ctrl-Enter, and compose a meta question using the tool that appears.
 
Let's call that plan Z...
 
Or a comment, if the selection is in the question content. Or even an edit (if enough rep).
 
Hi, I have a question - I posted a question in the sandbox yesterday, and received an upvote and some comments. When can I post it on the main site?
 
11:23 AM
@Lembik If you have any more MathJax figures in future challenges, you might find mathurl.com useful.
 
@mIllIbyte If you've fixed any issues mentioned in the comments, you should be okay.
 
@MarsUltor - Thank you
 
@Lembik Will the time taken vary significantly for matrices of the same size but different values? If so it might be worth specifying how many matrices of a given size will be tested, and whether the best or worst or average time will be used to determine if under 30 seconds is achieved.
 
11:41 AM
0
Q: Stretch the word

mIllIbyteThe input is a word of lowercase letters not separated by whitespace. A newline at the end is optional. The same word must be output in a modified version: For each character, double it the second time it appears in the original word, triple it the third time etc. Example input: bonobo Examp...

 
11:52 AM
@NewMainPosts It's only nine minutes and zero upvotes. Well done!
(9 / 0 = complex infinity)
Mars Ultor is in rooms:
2016 Programming Puzzles & Code Golf Moderator Election
Cheddar
Jelly
Pytek
SOX (originally SOOF)
The Quest for Tetris
Arcturus
AvocadOS
Esoteric Programming Languages
The Nineteenth Byte
The 2nd Monitor
The Nth Monitor
VSDiagnostics
@MarsUltor That's a lot.
 
@zyabin101 Fixed.
 
12:06 PM
@trichoplax Thanks!
@trichoplax Isn't that dealt with at "our score is simply the size of the largest matrix for which I get a correct answer in less than 30 seconds when averaged over 5 runs." ?
I edited it to make it a little clearer
posted
 
@Lembik I just wasn't sure if you were going to use more than one of each size
 
@trichoplax I hope I made that clear now
thanks for reading the question
I hope some people come up with good answers now!
 
@Lembik Yes the edit makes it crystal clear
 
@trichoplax great!
now I get to bet myself with what number will get up to :)
I am going for 11
 
I couldn't guess...
 
12:17 PM
I am usually wrong :)
 
Good luck!
 
thanks
added math tag
 
Woo, got my first gold badge awarded yesterday.
 
woohoo :)
 
ven
GG
 
12:20 PM
0
Q: A tricky infinite sum

LembikThis challenge is write fast code that can perform a computationally difficult infinite sum. Input An n by n matrix P with integer entries that are smaller than 20 in absolute value. When testing I am happy to provide input to your code in any sensible format your code wants. The default will b...

 
It is enabled on all repos by default now.
 
12:34 PM
What is the fastest way to find all of the feed bots' jokes?
 
@Lembik One issue I didn't think of before - "correct to 5 decimal places" isn't a good way to specify precision
 
@feersum oh.. can you explain?
 
Since it could require calculating arbitrarily many places, e.g. if the answer was .4999999 and you wanted to calculate 1 decimal place
Sorry bad example
 
you did confuse me :)
 
I meant like .4500001
Is it .4 or .5?
 
12:41 PM
isn't 0.45 correct up to 5 decimal places in that example?
 
Try to be a little less dense guys
 
@feersum ?
 
What I mean is, you don't know the answer until you've calculated 7 places.
 
@feersum No, .450000 == .45
 
I wasn't literally asking if it's .4 or .5.
 
12:42 PM
@QPaysTaxes No
.4500001 rounds to .45
 
@feersum you don't know your answer is correct up to 5 decimal places until you have computed it to 6
 
What's the difference?
^^
 
that is true.. is that the problem you see?
 
@Lembik The point is, you don't know it is accurate to 1 decimal place
 
You only need n+1 digits for n digits precision
@feersum Why not?
 
12:44 PM
@feersum I think I am being dense, sorry. Is .4500001 a good example for what you are talking about?
 
@Lembik Anyway, the right way to specify it is to have a maximum error
e.g. the calculation must differ by no more than 5e-6 from the true answer.
 
I don't mind changing it to that
 
@Lembik yes .450001 is the fixed example
 
@feersum There is nothing wrong about saying '5 digits precision' though.
 
@MarsUltor There is.
 
12:45 PM
@feersum How?
 
If I ask you to calculate 1 decimal place
 
@feersum in the .450001 I still don't see the problem. The only correct answer up to 5 decimal places is 0.45000
 
and you know the answer is .450000 +/- 1e-6
Then you don't know the 1st decimal place.
 
ok I see that problem
 
@Lembik My example is asking for 1 place not 5.
 
12:46 PM
@feersum Hmm, okay
 
@feersum ok.. your point is clear now. thank you
changed the question and made it less accurate at the same time
5 might have been too much
of course now you are morally obliged to provide an answer :)
or at least upvote the question!
I wonder why no votes...
 
There should be an automatic leaderboard for fastest-code challenges.
 
@zyabin101 that would be good
the problem is that I have to run the code
as otherwise there is no fair comparison
and we don't have a ppcg online compute account yet :)
@zyabin101 but first there should be some code to run!
an upvote! Thank you
@feersum thank you for pointing out that difficulty by the way
 
@Lembik Just create a GitHub repo where everyone can add their code and run it using a CI (Travis, AppVeyor etc.). Each push and PR is built automatically and the timing results are in the Log.
You don't need a server or PC and it's free and fast. Plus, all prerequisites someone needs can be installed automatically.
 
1:08 PM
Wow!
 
But sometimes it may not be accurate enough
 
1:27 PM
I've been able to measure down to 1ms accuracy in the new Precise worker with Travis. Of course, as with any timing, there have to be enough test runs to make the difference significant (and in fact measurable). It doesn't matter if a new worker is faster or slower, it always has the same architecture, thus all programs will run slower or faster. After all, the relative times count (an objectively faster program always wins against a slower one, given enough test runs).
The actual time resolution in workers is much lower than 1ms, but I didn't test it.
 
1:44 PM
who pays for the cpu time?
 
Enterprise users
 
how much free cpu time do you get
is there a number of cpu hours?
 
@Lembik Travis gives 40 minutes per one build in a build matrix.
 
and you are allowed to run your code and not just compile it with travis?
I don't know the system at all
 
1:59 PM
@Lembik Uhh... docs.travis-ci.com
 

« first day (1892 days earlier)      last day (2954 days later) »