« first day (1804 days earlier)      last day (3039 days later) » 

4:00 AM
Is this the second challenge of mine that you've done that for? :P
 
No this is the first time I've had to solve a captcha
 
Answered too quickly or something? :P
 
Yeah
Also congratulations on Fanatic @CᴏɴᴏʀO'Bʀɪᴇɴ
 
:D Thanks!
I knew you got yours so it was only a matter of time
Oh, and my rep is 5,467
 
I'm still amazed how crazy Onion Knight was
 
4:03 AM
I know.
 
I expect to wake up to a mortarboard haha jk
 
rofl
 
Doesn't look that crazy to me
 
Have you seen the requirement?
for the onion knight badge
 
4:04 AM
Yes
 
How would anybody guess that???
But congrats @quartata.
 
¯\_(ツ)_/¯
 
And @TimmyD and a couple others.
@quartata I will admit, being the first to get that does make you cool. :P
 
2
Q: Atbash Self Palindromes

Cᴏɴᴏʀ O'BʀɪᴇɴConsider the following transformation: A|B|C|D|E|F|G|H|I|J|K|L|M Z|Y|X|W|V|U|T|S|R|Q|P|O|N Where A ⇔ Z and L ⇔ O, e.g. There is an interesting property that some words share. When some strings are translated to their atbash-equivalent, said translation is the original word reversed. I call the...

 
Thank you @NewMainPosts.
 
4:15 AM
@AlexA. What was it?
 
@Calvin'sHobbies Have 3 anonymous non-users upvote you but can't because they aren't users
 
^
 
Or something like that
 
Or logged out.
Just three anon upvotes.
And the edward edwards one was collect a bounty when there was another answer that could also earn the bounty.
 
0
Q: Use what you know: Your take on Diceware

JosephIf you're not familiar, Diceware is a method for creating passwords using an ordinary die from a pair of dice as a hardware random number generator. For the sake of fun, let's ignore anything about the security of computer's random number generators. Write a script or program that outputs a ra...

 
grc
4:20 AM
^ seems trivial - essentially four bytes in J: ?5$6
 
Thank you @NewMainPosts.
 
hello all!
 
Hello...
Bai
 
I really dislike that it's possible to answer a question after it has been closed. ಠ_ಠ
 
thanks @Dennis
 
4:31 AM
@ThomasKwa Why did you say I was missing a byte?
...
 
I see 10
 
There's a nine byte answer
 
Oh.
That was... confusing.
 
qJrz0_XJG
 
You could have said "there's a golfier version" :P
What the heck is J
 
4:32 AM
First occurrence in code: assigns the J variable
 
Oh that's the weird variable that's A
 
Subsequent occurrences: returns the value of J
 
Ah.
gotta go
 
bai
 
/me waves to @quartata
 
4:34 AM
@quartata is afk for reasons unknown...
 
@ThomasKwa I wish there was a variable that was (set to new value and return old value every time)
or maybe a variable that had a dedicated single-char command to set it
 
@ThomasKwa I'll change it tomorrow when I have time to change the links and the explanation
 
hello!
 
I knew J did something weird but I did not get that is what it did
 
4:42 AM
@quintopia I was going to say the same! I GOT NINJA'D
 
I saw you say hello and figured out that you were about to say it. I NINJA'D YOU ON PURPOSE.
 
4:59 AM
@quintopia Be patient.
@TanMath It's only been six hours.
 
@ThomasKwa I'm pretty sure he posted that just to ninja TanMath. :P
 
@TanMath is it fine if I clear up your spec a little?
 
@quartata 1.5min off WR
 
I'll take that as a yes
@orlp what WR?
a game speedrun?
 
smw 96 exit I presume
I stopped watching because I had to go do something
 
5:20 AM
how would one use the Pyth invariant operator I? I'm not understanding the args <pfn> <any> <n-1:any>
i'd like to use it on a single-arg function that is not a built-in
 
@xnor Can you L it?
 
i think so, but i'm not seeing how to use I on a named function either
 
I think pfn means you do yI<arg><arg>
 
oh, the func comes first
is this done because it wouldn't parse otherwise?
 
I don't know
Yeah, I think it's easier that way
If, say, M came first, then the arity would be unknown until it found the function to map by.
 
5:29 AM
thanks, that works, but it's long
 
what are you making?
 
trying to bifrucate the atbash palindrome: codegolf.stackexchange.com/questions/68757/…
i need to name the func, it won't take an anon func as a pfn?
 
I haven't ever used I, but I suspect so.
_IsXBrz0G) is 10 bytes
 
@ETHproductions Wow, took me a while to get back to this. 3/(x+y) converges to sqrt(3/2), and yes, 4/(x+y) converges to sqrt(2). My guess is that 5/(x+y) will converge to sqrt(5/2).
Aaaand YUP. It makes sense, though, when you consider that a = k/(a+a) has a unique solution: a = sqrt(k/2).
 
well, +/-, but i assume your initial conditions take care of that
 
5:37 AM
@xnor Yeah, it's always positive.
 
@Zgarb I'm trying to separate your integers but they're proving to be rather difficult to get apart.
 
I love ingrish.
 
grc
5:55 AM
@xnor stop breaking all my answers >:(
 
that one test case makes the problem so much harder
 
@grc fwiw, I got the same thing for word chains, but one byte worse handling the empty case
today is the day of lots of posted solutions that handle all the test cases but still fail the spec
 
lel
RIP site integrity
 
@xnor If you're going to break three of my answers at once, could you at least do it before 3:00?
:P
 
6:02 AM
What has xnor been doing?
 
Shouldn't f(1,8,1,7) be True because the king immediately captures the pawn? I think there's a subtlety where pawn row 7 cannot be treated as row 6 if the king captures immediately. — xnor 10 mins ago
 
grc
ruining everyone's answers
 
Applies to all answers.
 
grc
(or helpfully pointing out missed cases)
I think lambda x,y,p,q:q-q/7>=max(y-1-(6<q<y),x-p,p-x) would fix it but not sure yet
 
Dammit xnor.
 
6:03 AM
well, we know one question that won't be winning the Green Jersey: meta.codegolf.stackexchange.com/a/7962/20260
2
 
I think truncating the king's y coordinate at 7 is sufficient, but it's way too late to test.
 
Quit being so smart and helpful all the time. >:(
 
See? I can't even English.
 
Ɠ_Ɠ
 
New Jelly emoji?
 
6:05 AM
It won't replace \o@, but it's a nice companion
 
Nice try, bot.
 
@DigitalTrauma FYI I deleted your comment and replaced it with one that doesn't mention Stack Overflow. SO would be pissed if they knew we told that person to post that question there. :P
 
6:22 AM
Perfect response for badly spec'ed challenges: w33.imgup.net/Whatthefucd4e9.jpg
 
Anonymous
6:38 AM
I finally fixed permalinks in Seriously's online interpreter \o/
 
Anonymous
Now I get to edit a bunch of old permalinks because I changed the format /o\
 
@AlexA. fair enough :)
 
Anonymous
@orlp you speedrun smw?
 
@Mego ye I hold WR
in the 'I don't speedrun it' category
 
Anonymous
6:42 AM
Nah I beat you there :P
 
Anonymous
Oh you're talking about agdq
 
6:58 AM
@ThomasKwa thanks!
 
grc
@TanMath I think the last two test cases are still wrong
 
@grc huh?
 
grc
here's my output:
>>> f(['cancel', 'loitering', 'gnocchi', 'improv', 'vivic', 'child', 'despair', 'rat', 'tragic', 'chimney', 'rex', 'xylophone'], 'attic')
[['attic', 'child', 'despair', 'rat', 'tragic', 'cancel', 'loitering', 'gnocchi', 'improv', 'vivic', 'chimney'], ['attic', 'cancel', 'loitering', 'gnocchi', 'improv', 'vivic', 'child', 'despair', 'rat', 'tragic', 'chimney']]
>>> f(['cat', 'today', 'yoda', 'artistic', 'cute', 'ewok', 'kilo', 'to', 'otter'], 'attic')
[['attic', 'cat', 'today', 'yoda', 'artistic', 'cute', 'ewok', 'kilo', 'otter']]
 
7:10 AM
@grc you are right..
I am in big trouble
@Mego could you help me?
 
Anonymous
@TanMath Whatcha need?
 
@Mego Thannks for supporting me on the main site...
My problem is I messed up my testcases
And everybody is already angry...
 
Anonymous
Just fix them
 
what should I do?
 
grc
relax
we're not angry lol
 
Anonymous
7:12 AM
^
 
^^^
 
Anonymous
In a week nobody will remember that they were messed up
 
@Mego but e erybody is angry already...People are going to have to change their answers again
 
Anonymous
Not if you keep the spec and just fix the test cases
 
grc
user81655's is correct to the spec
 
Anonymous
7:14 AM
Granted, we're going to be really busy next week, what with graduation and everything
5
 
;)
@Mego whose graduation now?
 
grc
mine is wrong to both the spec and the test cases because I misread the post
 
Anonymous
@TanMath Ours, of course
 
ha!
now, you sure I shouldn't just take out the "print all multiple output sequences" part?
 
you're kidding right? I thought we were graduating tomorrow!...all this prep for nothing :/
 
grc
7:16 AM
@TanMath the spec is fine - just fix up the last two test cases
 
Anonymous
@quintopia By Valve time, it is tomorrow
 
guys...it is on March 1!
@grc but people do not like it...
 
@Mego ah. so we're graduating right around the time HL3 comes out?
 
Anonymous
@quintopia And Dota 3
 
grc
we've already graduated - there are just a few caching problems
5
 
7:18 AM
@Mego I'm holding my breath. Should be okay, right?
 
Anonymous
 
cache in your chips for graduation. (there should be an award for PPCG in general when it graduates, for like, longest beta period or something)
 
grc
@Mego pity that site's cache control is only set to 10min
 
Anonymous
@quintopia We're 5th-longest
 
Anonymous
(currently)
 
7:25 AM
> Sending primates into space helps NASA test new ways to get rid of monkeys
 
7:45 AM
@Mego so...totally doable then, right?
 
grc
@quintopia are you suggesting we campaign for the graduation of the four older beta sites?
 
How do I do memoization in Ruby?
I'm trying to test a function that may require more memory than God since it every call k calls k-1 and that calls k-2 all the way down.
 
Anonymous
@Sherlock9 Someone did it in the gamma function golf
 
Anonymous
I just don't remember how it's done
 
Thanks for the clue
 
7:58 AM
> may require more memory than God
I like this. :P :D
 
Thanks :D
@Mego, there is no Ruby answer to the gamma function golf
 
Anonymous
@Sherlock9 Then maybe it was another one of my challenges, lemme look
 
Anonymous
Hmm, nope, there is a Ruby answer but it doesn't memoize
 
Anonymous
14
Q: Is there a convention for memoization in a method call?

KostasI want to avoid reevaluation of a value in method call. Untill now, I was doing this: def some_method @some_method ||= begin # lot's of code end end But it ends up quite ugly. In some code, I saw something like the following: def some_method @some_method ||= some_method! end privat...

 
grc
use Python :D
@functools.lru_cache()
 
8:13 AM
Since when did programming languages do memoization for you?! o.O
 
Anonymous
@El'endiaStarman Since Python 3
 
Anonymous
import this
 
@grc The alt text is heresy.
 
grc
8:32 AM
@mınxomaτ Yes it is. I bet all 20 of them could be shorter in Perl.
 
@grc I have already written an answer to the question I'm working on (Bernoulli again) in Python. I wanted to try writing one in Ruby
Welp, the following did not work
def e(m)
@e||=begin                                                                                                                s,p=0r,1;m.times{|k|a=m-k;s+=p*e(k)/-~a;p=p*a/-~k};1-s
end                                                                                                                            end
But yeah, Python 3's memoization is a godsend
 
Anonymous
9:08 AM
Damnit you're gonna make me test more stuff
 
I've already posted it
 
Anonymous
Yeah but I'll have to test it to verify
 
Anonymous
Which means actually remembering how to invoke Ruby code
 
Well, if you have any Ruby tips for this answer: codegolf.stackexchange.com/a/68787/47581 let me know
 
Anonymous
Remind me again how to invoke Ruby functions?
 
Anonymous
9:14 AM
I'm running it on 49, it should finish around when we graduate
 
For lambda rockets b=->m then use b.call(m)
Why did you start with 49?
 
Anonymous
Is b.call(m) any different than b[m]?
 
Anonymous
And I started with 49 because the previous Ruby answer started being invalid around there
 
9:27 AM
Wait, I can use b[m]? Let me check
Well, I'll be darned
 
 
1 hour later…
10:35 AM
hi all. slightly random question for the python gurus.. If I have a zip file and want to rename all the .pdf files in it. Can you do that entirely from within python by some python module magic?
 
10:51 AM
hmmm.. zipfile appears to be terrible.. oh well
 
Is it just me or does oeis not have a sequece for the amount of occurences of '1' in the decimal representation of n?
 
@overactor that seems odd
@overactor it's a very simple sequence however
what do you want to know about it?
 
@Lembik Nothing really, I was just searching thorough oeis a bit
 
@overactor oeis.org/A000120
I now wonder why you didn't find it :)
 
@Lembik That's the binary expansion
 
11:00 AM
oh you want decimal!
sorry
no one worries about decimal :)
it's a very boring sequence :)
 
@Lembik :'(
 
humans lost out to computers a while ago
 
11:24 AM
I like how perl has a part of the distribution specifically for thanking the creators of perl. See: perlthanks
>compgen -c perl
perl
perl5.16
perl5.18
perlbug
perlbug5.16
perlbug5.18
perldoc
perldoc5.16
perldoc5.18
perlivp
perlivp5.16
perlivp5.18
perlthanks
perlthanks5.16
perlthanks5.18
 
0
A: Sandbox for Proposed Challenges

Christian IrwanStitch me a picture (A modification of http://codegolf.stackexchange.com/posts/42348) The following python script cuts the picture to many pieces: #!/usr/bin/python import sys import random from PIL import Image origname = sys.argv[1] im = Image.open(origname) width, height = im.size wi...

 
12:10 PM
Hey @Sp3000, is it alright if I post a 57-byte Ruby version of your Shotgun Numbers answer here codegolf.stackexchange.com/a/47345/47581?
This is my potential answer, btw: ->n{n.downto(2).map{|i|a=n%i<1?1:0;n+=a*i*(n/i%2*2-1)};n}
That a bit is because multiplying by True doesn't work in Ruby. Darn Ruby and not allowing implicit conversion of bool to int
 
12:53 PM
2
Q: Definitive policy about answers not meeting the challenge specification

Martin BüttnerThis question has been asked so often, I have no idea what our actual policy is: Almost-correct answers Should answers that break the rules be deleted? Should we flag and delete Not an Answer posts? Can we stop flagging poor answers as "not an answer"? What should count as "not an answer" here?...

 
0
A: Sandbox for Proposed Challenges

Trang OulConvert Salesforce 15-character case-sensitive ID to 18-character case-insensitive code-golf string In Salesforce CRM, every object has 15-character alphanumeric ID, which is case-sensitive. However, tools used for migration and integration may or may not support case sensitivity. To overcome t...

 
@Sherlock9 Er sure? I think there was an awesome several-byte saving thing suggested by xnor which I never added because I wanted xnor to, maybe I should actually put that in some day...
 
@Sp3000 Thanks. Posted.
 
Added a comment to my own post, which I'll one day update...
 
I just looked at it. That is really clever :D
Right, I'm going to implement that as well, if you don't mind
 
1:13 PM
Go for it, might be good to link to xnor's chat post though :)
 
@Sp3000 I don't think so. Comments can only be edited in first minutes of their existence (however, when the editing period ends, is a secret).
 
Ah, syntactic ambiguity. I meant updating the post, not the comment :P
 
1:38 PM
hi all
is there any language in which you can easily rename files within a zip file? I was hoping you could do it in python but it seems python fails on that front. The zipfile module is very poor.
maybe it's a coding challenge :)
I assume it's hard in pyth :)
 
@Lembik I don't know. For now, you can just unzip, rename the unzipped copy, and zip back, but that's awfully expensive for source code. And I think the message is better suitable for Stack Overflow
 
@zyabin101 thanks. I just asked here because people are brainy and nice :)
on SO they will close it as I haven't shown them code :)
 
2:05 PM
Congrats @Doorknob for hitting 30k rep!
14
 
@Doorknob (^_^)/ Join the hype!
 
2:33 PM
@AlexA. @FlagAsSpam (and others) - for clarification, 10+9*8-7+654*3-21 is a valid full program in PowerShell. Save it as a .ps1 file, and then double-click it from the desktop or launch it via command-line (e.g., powershell.exe foo.ps1), and it'll output 2016 and exit. If you just double-click it, it may blink too fast for you to see, but it'll be there. PowerShell is this really goofy REPL-not-a-REPL, shell-not-a-shell, language-not-a-language ... thing.
 
Why not just label the answer "Powershell" then? It doesn't work in Java, so it isn't "language agnostic" as it was labelled when I saw it yesterday
Oh, it's been edited since yesterday
 
2:53 PM
Reading some of the comments on main make my head spin. Arguing about the difference between "output" and "print"? Arguing that "output" implies "full program"?
 
@Rainbolt Try meta Kappa
 
@zyabin101 I have no idea what that means
 
@Rainbolt Kappa generally means (on Twitch) sarcasm or trolling. So I didn't really mean you to try asking on meta.
 
@zyabin101 My university didn't have fraternities
 
@zyabin101 Yea, I looked up Kappa and saw that it meant light-hearted trolling, then I read your comment again, and still had no idea what you were saying
I guess I need more coffee
 
3:08 PM
One of my university's fraternities got their charter revoked a couple days ago.
 
What for?
 
Not quite sure.
The national organization revoked it before the university did.
The two rumors floating around are drugs and/or sexual misconduct.
I've read the actual letter revoking the charter, it just uses the words "risk management policy violations" a lot.
And it also mentions the words "sketch cash" but I have literally no idea what that is referring to.
 
3:24 PM
@PhiNotPi Under-the-table monies used to pay Saturday Night Live actors?
 
3:39 PM
@PhiNotPi sounds like a cautious way to condemn a nigh-criminal organization so as not to trigger even worse PR issues
 
3:56 PM
As much as I complained about Mathematica's graph layouting last time, sometimes it actually does magnificent work out of the box:
 
That is very cool
 
that said... this works well up to depth 12:
and then this happens for 13:
 
I recognize the numbers now. Do we have a Collatz tree challenge, or are you just messing around?
Oof
 
@Sherlock9 it's for a first-term C-programming tutorial which I'm organising.
(not producing those graphs. but the graph will go into the exercise sheet for visualisation of the problem.)
 
Very cool
 
4:01 PM
just for lulz here is depth 30:
 
@MartinBüttner ok ok ok ok ok ok ok ok ok ok ok ok WTF
 
or without the labels:
 
Where's @eNpzyc8vys7LTwIADjsDPw==? Kappa
 
okay, enough pictures for now...
 
@MartinBüttner Wow, that's a big graph.
 
4:02 PM
@MartinBüttner that is pretty sparse, isn't it?
 
I wonder if you can use an H-tree layout with many missing branches?
 
@Sherlock9 you could, but I'm not sure how to tell Mathematica to do that :P
oh damn, it has some really nice built-in layouts
 
Just idle muttering. It would be cool, but I haven't the faintest idea how to go about that inside or outside of Mathematica
Such as?
 
let me quickly create a grid, so I don't have to post each one separately
user image
3
in the end I was mostly impressed by the first one, because that's actually useful
some of the others do look neat though
(click for larger version)
I'm sure the others give great visualisations for other types of graphs though
(and I've only included about half of them)
 
4:27 PM
@Doorknob You beat me to 30k! Pretty close though...
 
@MartinBüttner The thumbnail here kinda looks like a partially finished Bob Ross painting.
 
@DigitalTrauma Don't call his name! He will know!
 
4:44 PM
 
0
Q: Print 1 to 15, using different printers

Stewie GriffinMaking a versatile integer printer is nice and all, but writing a single code that prints a lot of different numbers is cumbersome. Wouldn't it be easier to make a script that outputs a number, but also gives you a new script to get the next number? Challenge: Write a code that outputs a single...

 
remind me how to escape backticks within inline code blocks?
 
@MartinBüttner I should remind myself to star those pictures and ask for some sample code to try this myself
 
hi`hi
 
@quintopia Surround the block in double backticks.
 
4:59 PM
Double backticks work.
 
Or use <code> tags.
 
<code>probably doesn't work in chat....</code>
 
How about \\`?
Well, \`
 
Thank you @NewMainPosts.
 
> 131238 bytes
pretty great IMO
 
5:10 PM
I didn't even notice how big it got, because it is just one line of code!
 
This is a surprisingly tricky challenge
 
@Sherlock9 it's a simple option: GraphLayout -> "..." (e.g. "RadialEmbedding" for the first one)
 
@MartinBüttner Regarding deleting answers that break the spec where the spec is to blame, I think another way out would be to allow asker edits/clarifications/judgments to be overruled when this would happen. But this opens a can of worms about challenge ownership. What do you think?
 
@flawr, I think you could have saved some thousand bytes if you didn't go for the -10 bonus =P
 
5:26 PM
@MartinBüttner I understand and have read your answer there, I wanted to get your thoughts on overruling rules changes
 
I don't think it's a good idea. Yes, rule changes are annoying, but in rare cases they are a good idea. If a rule change can save a broken challenge but invalidates two answers, I'd rather have those two answers fixed/deleted than having them add clutter to the valid answers.
 
@MartinBüttner Thanks
 
@xnor but I don't see how that's different from what I've said in that answer, and how your suggestion is different from your comment on that answer ;)
 
i can't remember a link, but i remember a question where a new user posted a popular question, made a ruling/change that would invalidate some answers, then someone else went and outright edited the spec to roll back the question
i'm not aware of there being any meta guidance about doing that
 
challenge ownership is definitely something we haven't really sorted yet
 
5:37 PM
@GamrCorps \o/ Thanks!
 
5:48 PM
Could someone test this in Jolf, for me? It doesn't work on IE. z+t5
 
0
Q: Letters, Get Moving! Pt. 2

geokavelThe first Letters, Get Moving! was very popular, but had limited participation. This one will be easier to solve, but hopefully involve some tricks in golfing. You are given a string of only lowercase letters. For each letter, with position in the alphabet m, move it so it becomes the mth letter...

 
@CᴏɴᴏʀO'Bʀɪᴇɴ 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
missing spaces
 

« first day (1804 days earlier)      last day (3039 days later) »