« first day (1329 days earlier)      last day (3508 days later) » 
00:00 - 23:0023:00 - 00:00

12:07 AM
Hi everyone.
Midterms get over in 6 hours :)
 
 
2 hours later…
1:50 AM
0
Q: What's a string?

GeobitsIf a challenge says that input will be in the form of a string, what is acceptable? Various languages have different ways of implementing strings, so here's what I've "borrowed" from Wikipedia: In computer programming, a string is traditionally a sequence of characters, either as a literal co...

 
2:03 AM
Gotta love perldoc: o - pretend to optimize your code, but actually introduce bugs
 
 
2 hours later…
3:41 AM
Is the pop con voting situation really that hopeless?
 
how hopeless?
 
That voters will upvote pretty pictures regardless of the spec of the question.
 
I wonder if PCCG and other SE sites with similar voting considerations might benefit from a reddit-like age/votes sort method
 
You mean to combat FGITW?
 
yep
 
3:52 AM
You raise a good question:
Is voting off because one answer randomly gets a lead?
 
as to pretty pictures, that definitely happens, especially if the question goes on HNQ(?)
 
Or is there some systematic way that people vote for things that are out of line with the community's idea of quality?
 
a big problem is when people outside the community cast a large fraction of the votes
2
 
Do we have stats on where votes come from?
 
I don't think that we do, but one of the 10k rep folks could answer better, probably
 
3:54 AM
I've definitely noticed some questions where I get a ton of rep from a mediocre answer -- that's gotta be HNQ
Ironically, it's often low-quality low-effort questions that often attract these
 
 
2 hours later…
6:07 AM
0
A: Sandbox for Proposed Challenges

RodolverticeThinking about the Box outside of the Box Everyone has heard about the 9 points 4 lines challenge, where the goal is to connect all the points on a 3x3 grid with only 4 straight line segments, and without lifting your pen. It has been proven that it is simple to calculate the minimum number of ...

 
6:36 AM
hi @Sparr
 
7:24 AM
@Sparr see this question and answers meta.codegolf.stackexchange.com/q/1987/8478
It's a shame that people are giving advice questions such a hard time. Any ideas what we can do about it, other than constantly educating people in comments that these are perfectly acceptable questions? Maybe for a while pre-emptively post a comment on such questions that they are fine?
 
7:45 AM
@Flonk They don't have a spec either. I mentioned it because there might be some overlap in people who participate here and people who would like to participate in the IOCCC. But one size doesn't fit all, and it's good that there are other contests for people who don't like the PPCG setup.
 
 
2 hours later…
9:22 AM
@MartinBüttner a preemptive comment sounds good, if someone can get in there early enough. With a link to meta to back it up?
 
Yes. Basically, I should have something like posted the comment (that I posted now) right when the question was asked.
 
I'll be distracted by the Worldbuilding private beta for the next week or so, but after that I'll try and spot such questions early.
 
ah, did that start?
how is it going?
don't we have a tag for challenges involving web requests? o.O the only thing I can find is which has only been used once, and the recent which is very specific.
 
We're on day 2, and question and answer rates are looking good.
 
@Geobits 7 bytes?!!??!!?
 
9:38 AM
@VisualMelon FIGHT!
(and get rid of that full program version ;))
 
I'm down to 209
if you insist :P
 
also, Geobits didn't count static
(so you don't have to either)
 
charAt() just be a real pain in java, for golfing or otherwise
 
Hello
I want to get some feedback for a challenge idea.
 
go ahead :)
 
9:49 AM
I found some interest in the Zeckendorf representation of natural numbers.
Naturally, fiddling with integers makes good code golf.
Knuth defines a Fibonacci-multiplication on Zeckendorf-represented naturals.
I though about doing a challenge where people have to implement this (and possibly other) operations.
The interesting part is to figure out how to implement the operations efficiently / with fewer bytes than your opponent.
 
This is indeed partially related.
The fun thing is that the Zeckendorf-representation is unique and that the multiplication defined by Knuth is associative, commutative and monotonous
so indeed useful
I just wonder what format would suit the challenge
 
does it not just yield the product of the two numbers?
 
No
 
oh okay
 
9:53 AM
The Fibonacci-product is related to the multiplication but is slightly different.
 
well, sounds good in principle. I'd suggest you write up a draft in the sandbox
 
o
k
 
Jawohl, Herr Büttner
 
10:02 AM
Anyway, I highly suggest to read "Knuth: Selected Papers on Fun & Games"
A really nice book with very good typography.
 
oh, that's actually quite affordable
 
The hardcover edition is very beautifully bound though,
buying the paperback edition is an insult to the typography inside.
 
heh
I should put that on my list then
 
It's a part of a multi-volume series of selected papers.
All beautifully bound and typeset.
 
@Geobits 197bytes
argh, just seen another, oh well
 
10:19 AM
Wow, you're not too far from Python and Bash now.
 
seriously, what was going through my mind when I wrote --r>=0 ?!?!
 
@VisualMelon I dunno, maybe pink unicorns?
 
@FUZxxl that's certainly one possibilty
 
Or some variation of that leitmotif
 
10:51 AM
@Rainbolt regarding Puzzle Pirates, as far as I'm aware the scoring rules are unknown, so you'd have to impose your own idea of what it's doing (i.e. how combos are treated, what a grain bonus is worth, a whole load of constants etc.)
 
 
2 hours later…
12:35 PM
comes on, sees Puzzle Pirates
ooh, i hit 3k rep!
 
12:58 PM
@VisualMelon An approximation of the Bilging scoring system has been compiled by players: yppedia.puzzlepirates.com/Bilge_scoring
I imagine the same applies to the other basic puzzles
But quite frankly, I can run like 30 copies of puzzle pirates simultaneously. So I could easily load up five bots and say go.
If I got bots for all of the puzzles, I could run a ship by myself.
 
woah
and eventually you can accumulate enough PoE to buy a sloop!
and then you can have a single-sloop fleet manned by a robo-crew
 
@cjfaure I had a War Frigate that was pure black.
 
@Rainbolt I had a sloop, but only because I raided my sister's account xD
 
PhiNotPi (I think) recently mentioned partifcle physics for a challenge.
I thought a bit about that.
I think drawing Feynman diagrams would be too complicated to get right.
Which mainly leaves doing something with combining the particles of standard model.
Which is more fun with quarks.
My first idea was, given a list of quarks check if they form a valid Hadron and print some properties (charge, mass, meson/baryon/antibaryon). But that might be a bit too trivial, unless you need to actually print the name of the Hadron (which would make it a bit kolmogorov-y).
 
1:08 PM
The alternative would be: take a range of masses and a range of charges and output all valid quark combinations to form hadrons with these properties. How does that sound?
 
There are clearly some numerical issues affecting some of my favourites. E.g. X19 looks very different in the JS port and in the Java version, and this impacts a lot of the pairings with it too.
@MartinBüttner, complicated. At the very least there's binding energies to take into account.
 
X26, X3, alternating (1,0) is interesting
@PeterTaylor one could simplify ^^
hm, and incentre and circumcentre create rectangular grids
 
1:23 PM
I added test cases to the RLE challenge. Any important edge cases I missed?
0
A: Sandbox for Proposed Challenges

Martin BüttnerRosetta Stone Challenge: Run-Length Encoding v2.0 rosetta-stone code-golf string compression The goal of a Rosetta Stone Challenge is to write solutions in as many languages as possible. Show off your programming multilingualism! The Challenge We've done run-length encoding before but only co...

also, wow, did you see this constructive argument? meta.codegolf.stackexchange.com/questions/2196/…
 
@cjfaure I had 2 Dhows, lots of Sloops, and a Merchant Brig and Cutter, sailing is the good life ;) it's disheartening when you do a little bit of maths and work out that getting a part time job and paying for stuff is much quicker than actually playing the game for progressing, but sailing is all the fun
 
@VisualMelon meh, i was waaaay younger xD
Also it was when it was still a 14 and above game
 
the only reason it's 13 and above is being it has a 'drinking game'
 
@VisualMelon back then it was filled with literal pirates xD
wow, browsing through the starred list and "has anyone seen CJ lately?" my absence was noticed? :P
 
yep
I thought Doorknob even superpinged you after that?
 
1:41 PM
@Visual 187
 
lovely :D
 
If static imports aren't fair, I'll need to add 3 bytes back in :(
 
hmmm, I don't know, are they? isn't it basically like aliasing a function without counting the aliasing?
 
If the point of "write a function" is to write something that could be dropped into any code, then using it seems unfair. If the point is to shove everything that doesn't need to be in the function out of it, then it seems okay.
I don't know what the default is, but I've seen both approaches at times.
 
no I think I'd prefer the former. the function should work by itself (if put in a class, obviously), without the need for any other code outside the function
 
1:46 PM
K, will edit
 
thanks
 
Idea - a golfing language in which any unrecognized name is expanded into the most likely name that has it as a subtext
 
Bug fixed. My hack for degenerate cases was missing an abs.
 
"most likely" just being the most used name in the scope that fits the type
 
What do you call a validator that is simply invalid all the time?
 
1:48 PM
rejector?
 
Lol I like that
 
asian parent
 
boolean isValid(){return false;}
 
Was hoping for one that would auto generate the client side script
But I'm having trouble Googling it
Oh I know
I'll make it a required field and then hide the field.
It's no big deal if they open up the HTML and find it. They'll just end up at a custom error page.
 
forms have an onSubmit, if you put "return false;" in it, it'll just do nothing
you can put a "you suck" alert in before the return ;D
 
1:51 PM
I don't have access to the form where I am
 
;_;
it should also work on the submit input
 
The best I could do is add some jquery to the page that finds the form
There's probably a billion ways to do it but I was hoping for one that wouldn't give the next guy a headache
 
Ah, now that's a satisfying bandaid: "I'll just slap some jQuery on it"
 
Honestly I would if this wasn't code behind
Inserting jquery into the page from the code behind... how would you even begin to find that?
 
@Geobits instructions unclear, stuck writing ticket system in Java.
 
1:54 PM
ummmm guys... some of you can delete vote right? codegolf.stackexchange.com/a/37971/8478
since doorknob's not around...
 
oh my
 
Flag it not an answeer
 
Don't forget to flag it anyway so he can just delete the user if he'd like to.
 
Enough of them will trigger a delete
 
No, flag it as offensive/hate speech.
 
1:56 PM
Errr
I already flagged NAA
 
:D
 
We need to be consistent to get rid of it
 
i flagged both, sorry mods :c
 
As long as everyone flags the same way, that's all that matters
 
Both fit, but the offensive/hate one gets rid of it faster IIRC
 
1:56 PM
I flagged it as offensive/hate speech.
 
There's a third one...
 
yeah i already downvoted and flagged
i'm also flagging hate speech :3
woah this guy just got 6 downvotes in less than a minute
 
I've never seen the "You may only flag posts once every 5 seconds" popup before now. Nice.
 
One down!
 
@Geobits same
 
i'm keeping a tab open on their answers, in case they answer another question
 
I'm pretty sure he's hit an answer-ban by now.
 
@cjfaure front page? (ajax)
 
@MartinBüttner both that and the obvious
another one down!
 
both down
 
2:00 PM
yay
 
nice, that's three more helpful flags for me :D
 
Jan Dvorak deleted both of his answers
 
good guy Jan
 
I brought it up in Tavern on the Meta
 
lol, "not an answer"... that was cute
 
2:02 PM
hehehe :3
 
aaaaand, user deleted
 
Haha
 
@Geobits grr! I'm going out now, so I'll have to return with a vengeance later
 
I'm pretty much at the wall with mine, so if you can bring yours down that far I may just end it there and concede the win :D
Maybe
 
I'd love for you guys to end up in a tie
it's probably also the fiercest golfing battle I've seen so far that hasn't been for the winning score :D
 
2:06 PM
What is this 'winning score' you speak of? ;)
 
Besides, I've got to justify mine being the highest-voted answer somehow.
 
FGITW?
 
Probably, but if put in that position I should at least try to stay competitive, right? It looks bad to have an answer on top that's not golfed down as much as it can be.
OT: The chat flags that show up from time to time are hilarious when taken out of context. Just random blurbs of obscenity from across the network.
 
@Geobits sure
@Geobits I find most of them don't even seem obscene out of context
I tend to ignore them because in 4 out of 5 cases I can't judge out of context whether it was a justified flag or not
 
2:10 PM
Yea, just... weird. Every now and then I click through, but some people must just be real sensitive.
 
apart from the guy with the chaplin beard, it's really quiet on PPCG today
 
The latest I saw was "Christian nutbags in the 50s". From EL&U o.O
 
I'd post meta.codegolf.stackexchange.com/a/2210/8478, but so far it's been quietly ignored in the sandbox :D
@Geobits saw that too, but didn't have an opinion about it... seems like something that could have been written in a conversation where everyone involved knew that it was meant jokingly
 
Yep. I hardly ever do anything but read them, but I find it amusing either way.
 
true ^^
 
2:18 PM
TADAH!
CustomValidator cv = new CustomValidator();
cv.ClientValidationFunction = "return false;";
How simple was that XD
 
On what scale?
 
from 8 to 4
 
8 being?
 
8
 
2:19 PM
green
 
and 4 being?
 
So I win?
 
This sounds like a scale for green beans
 
2:20 PM
^ That's a scale for green beans (and it doesn't make much sound)
 
since yesterday I've been typing less instead of ll in my console every. single. time. what on earth...
 
2:35 PM
Shouldn't J/K/APL do fairly well on the word search? I don't know any of them, but "array-based language" sounds like just the tool for the job.
 
ah, very nice, @Geobits, love the *9 trick ;)
 
3:03 PM
hmm, I didn't want to do the multiplication instead of comparison because of overflows
 
I thought about that, but concluded that it was less likely than a normal hash collision, so nothing to worry about. It'll overflow, sure, but what are the odds of it overflowing to exactly zero?
 
>0 ;)
well, by shamefully stealing the *9 idea I'm at 190
kind of embarrassed I didn't see that myself, TBH
 
Yea, like I said in the comment, I'd looked at it before, but it wouldn't work. It was probably at some point in golfing where I was doing something differently and it would end up costing me bytes.
 
this particular question isn't a great measure of language golfing suitability
 
Obviously. If it was, Java would be beating C# by more :P
 
3:19 PM
we're even with essentially the same algorithm!... and I might have to leave it at that for the time being
this same code can be C&Ped into who knows how many other languages ;)
 
3:29 PM
@MartinBüttner I've been thinking about optimal RLE and . . . do you have any ideas?
 
3:42 PM
@MartinBüttner I made sure to read all the way to the bottom of that question you linked, after I realized I had upvoted the top two voted answers :)
 
@Geobits I think this is nearing a horrible conclusion, I'm at 189 bytes :S
hang on....
(n%9)%3==n%3...
back to the IDE...
nooo, that doesn't help
 
4:18 PM
@SohamChowdhury ideas for what exactly?
 
You know, for doing stuff like ab5{3a2{c5b}d}fe etc.
Recursion?
Bot started.
!
^ Oh, sorry for that, meant to try it in my bot test room.
 
oh right, that's not relevant to the question though. or are you already looking at the potential follow up?
if so, Peter Taylor suggested dynamic programming which sounds like a good idea.
I posted the rosetta one now
0
Q: Rosetta Stone Challenge: Run-Length Encoding v2.0

Martin BüttnerThe goal of a Rosetta Stone Challenge is to write solutions in as many languages as possible. Show off your programming multilingualism! The Challenge We've done run-length encoding before but only considered runs of a single character. Of course, we can sometimes make even greater savings if w...

 
4:50 PM
I've seen that.
Yeah, I was thinking dynamic programming too.
 
If one bug directly causes another bug and the connection between them is super obvious, would it be correct to mark it as a duplicate?
Extremely oversimplified example:
Bug One: I can't install the product.
Bug Two: I can't get to the Home page.
 
can you mark it as stupid?
(to answer your question, yes I'd probably do that)
 
@Visual Legit 187 now :P
 
5:06 PM
one more view! :)
 
@Geobits I hate you. Huaarrrrrghh!
I might have to resign, I'm meant to be re-building a website
 
I'm meant to be doing things, too. But Friday :D
 
5:45 PM
hi @MartinBüttner
hi @Geobits
 
hi @user2179021
 
hi @Sparr
I was hoping to see your improvement to the drunk walk!
 
I've got it sketched out
just have to write the logic
justhalf replied to my post about it as well
if I don't get around to it in the next couple of days, I'll just send him the sketch and let him cement his victory :)
 
cool!
I currently can't work out what the winning entry in codegolf.stackexchange.com/questions/37620/… is actually doing :)
it seems very clever
 
I don't know if I have the patience to actually write the logic for my drunk walk idea
I might just make two 400-entry lookup tables
 
5:54 PM
it sounds pretty cool I have to admit
think of the fame :)
 
@user2179021 hm?
 
@user2179021 does your edit distance problem specify the max string length?
 
@user Just so we're on the same page, there are probably billions of outputs for k=10 with that string. Is that the intent?
 
@user2179021 also, your sample data link has expired
 
Well, a million or so anyway ><
 
6:08 PM
@PeterTaylor, really cool, any combination of Mittenpunkt and Clawson Point is stunning by the way.
 
18 hours for the edit distance bounty?
so soon!
 
Prerelease is tomorrow for MTG. I am excite!
 
@Geobits Well there can never be more than 1024
@Sparr ah.. it has expired! :(
 
@user2179021 also, I think I've got a solution to that problem that's going to get a score of 100...
 
@Sparr well I am about to upload the test!
 
6:15 PM
@user 1024? How did you come to that number? I can get 1024 by inserting 9 digits in any two places, without doing anything else.
 
oh... my mistake. I was counting 2^10
I got that wrong
hmm
it can't be more than 2^20
but I am not sure what it actually is
 
With insertions only, I can see (2^k)*(length+1)
But yes, it can't be more than 2^20 with the single digit constraint.
 
right
and probably much less than that
 
That's still a million strings :P
 
grr .. wikisend isn't work
working
is there anywhere else I can upload a 20k text file?
 
6:17 PM
@user2179021 see my room invite?
20k? gist.github.com ?
 
would it make sense for SE to have it's own paste provider? ignoring the fact that there are already too many paste providers
 
I could've sworn I saw something about that on meta.se, but I may be wrong.
 
anything that allowed me to upload a file instead of having to copy and paste would be great
 
I have private server space which I maintain with a few friends, so I can even throw my zero-content domain-name at people when I send them things
 
@Geobits I think it's neat that these two come out the same in terms of byte length:
while(i-->0)
for(;i-->0;)
 
6:34 PM
Yea, I always end up using for so I can easily add something in the init/post areas if need be.
 
Oh that's a good idea. Cuz you get a free semicolon.
Could you not use the post area as a free statement?
i.e. put something in there to avoid having to use a semicolon?
 
hi @Geobits
I see someone added an answer and then deleted it
any ideas why?
 
@user From their edit when they deleted it:
> Edit: Ah, dangit. Because the numbers aren't padded, this currently produces incorrect output.
So it just didn't work.
 
@Geobits oh thanks!
I notice they used a built in levenshtein function
is that normally allowed?
seems like a bit of a cheat
 
I believe the "built-in" loophole goes back and forth between allowed and not allowed on the meta post for standard loopholes. I like to say it explicitly if banned, personally.
 
6:48 PM
right
until whitespace has some useful libraries of course :)
 
At risk of being starred for the fourth time, I will say it again: If your challenge can be solved by a built-in function of some language, it probably wasn't a very original challenge to begin with.
 
@Rainbolt makes sense.. mine can't :)
 
@Rainbolt True, but if it can be solved with 3 builtins put together cleverly, that's a whole different story. Allowing/banning them makes a big difference there.
 
Muahahaha. We have a drop today, and zero bugs. ZERO.
@Geobits Keyword was cleverly. Cleverly is good.
 
Agreed, but it still makes a big difference in score whether you have to write your own implementation or not.
 
6:54 PM
@Geobits fixed. thanks
 
7:13 PM
oh dear... oh dear oh dear...
wow that is not good
 
@overactor Clawson point goes well with a lot of others.
 
7:31 PM
Are programming puzzles even on topic on this site any more?
 
my question is a programming puzzle!
 
@user2179021 Linky?
 
7:45 PM
Haha! I just asked a tester if he trusted me and he looked absolutely horrified.
Maybe tomorrow I should offer him twenty dollars to pass a bug without looking at it. Just to see what he does.
 
@Geobits I have to ask, for my sanity, does your program work for grids of height 1 ?
 
Should I create a challenge that allows people to choose a partner?
For example, a Warthog in Halo has a driver and a gunner. You really need both to kill a lot of people. I want to apply this to a challenge.
 
8:03 PM
0
A: Sandbox for Proposed Challenges

blutorangeWell, I suppose my last suggestion was way too complex, so here's something else. Blade Competition (Simple Card Game) Certain RPG's include mini games that are quite a bit simpler than board and card games such as chess and poker, not too hard to implement and understand, but still complex e...

 
@Visual Yes
 
@MartinBüttner sorry I can't make examples now but I can provide that computes the levenshtein distance if that would help
 
That's a challenge. I'm talking about a puzzle (maybe the two are not mutually exclusive). You don't necesarilly "win" at solving a puzzle.
 
@Rainbolt oh I see.. are those allowed?
 
It's in the title of the site
@user2179021 And I just asked that question, so I probably can't answer it.
 
8:07 PM
I know :)
but you seem to need a winning criterion
 
You win if you solve the puzzle
 
fair enough
 
Ah! I found one:
16
Q: When is a giraffe not a giraffe?

Jeppe Stig NielsenI hope this kind of "riddle" is ontopic in Programming Puzzles & Code Golf. Give an example of a situation where the C# method below returns false: public class Giraffe : Animal { public bool Test() { return this is Giraffe; } } Rules: The code lines above must not be changed in any...

Are things like that still on topic here, or are they a relic of the past?
I just noticed the date of Aug 2013. That and all of those upvotes seem to imply that yes, they are still well-received here.
Papa John's pizza is half off today. Promo code is RANGERS7
 
@Geobits so inputs "hh", "horses" returns falsy?
 
I haven't tried those specifically, give me a min.
Yes
 
8:21 PM
I'll have to question my sanity then
 
I changed it a bit so that it only works with newline-terminated though, so it depends on what you mean by "single line". I asked Martin if that was fine, he said yes. You should do the same and save yourself some 7 bytes or so ;)
Technically I tried it with 'hh' and 'horsey\n'
 
ah, ok, I was wondering if that was a thing, I am sane, put the champagne away
wait a minute, I'm sure "Assumes grid is newline-terminated." wasn't there when I refreshed... clearly I'm not off the hook yet
 
9:03 PM
I don't understand how the input is indexed in codegolf.stackexchange.com/q/37984/18487
 
9:13 PM
@Rainbolt I replied. let me know if it helps, or if it's a dud.
 
9:27 PM
@AndoDaan What is the {-1,-1} in the first example, where 1={-1,-1}
Is that its "offset from the central element"?
 
@user2179021 I am SO CLOSE to a solution to your edit distance problem
@user2179021 I'm getting 2884 edits, which is wrong, but sooooo close
 
@Rainbolt yes so if the cell at 2,2 has value 1 then you should replace that value by the one at 2+(-1), 2+(-1)
 
Which element is the center element in a 2 by 2 set of cells, such as
1 2
3 4
 
@Rainbolt ah you have to take cell by cell.
if you take cell 1,1 and look at it neighbours you see:

434
212
434
 
I'm not making the connection here. I think you are relying on my ability to parse your examples for the rule, instead of stating the rule.
Oh well. Someone else probably understands it.
 
9:37 PM
I'll see if others have the same issues, and I'll try and reformat the explanation to something more understandable then.
 
9:53 PM
damn
got a perfect score on @user2179021's restricted memory challenge, except I'm stuck on the algorithm for actually printing out my edits
this is one of those cases where I want to post a solution that violates the rules of the challenge
because I've spent hours on it, and there's nowhere else to post it
 
I would post it with a disclaimer. If people like it, you'll get the rep, but you won't win.
 
10:13 PM
0
A: Restricted memory optimization

SparrPython, 100 I did manage to calculate the edit distance perfectly in the allotted memory limit. Sadly, this entry violates two rules of the challenge, in letter if not in spirit. First, I have not actually stored my data in 1000 32-bit ints. For 10000-character strings, my program creates two 1...

I could fix both of the problems if I had a few more hours, but I don't :(
@user2179021 ^
 
00:00 - 23:0023:00 - 00:00

« first day (1329 days earlier)      last day (3508 days later) »