« first day (1465 days earlier)      last day (3364 days later) » 
00:00 - 21:0021:00 - 00:00

12:13 AM
@Doorknob I've made some progress on the elevator thing... the controller ain't done yet.
 
wrong ping?
I have no idea what this whole elevator thing is :P
 
okay, wrong ping I guess.
Somebody wanted updates.
¯\_(ツ)_/¯
 
12:47 AM
Should have added primality testing earlier so I could join in the pair-golf. But even still it slightly loses to CJam :/
 
 
2 hours later…
2:38 AM
My family just paid $185 to submit Financial Aid applications to several colleges through College Board's CSS Profile.
Something about "financial aid application" and "paid $185" doesn't sound like they should be in the same sentence.
 
 
4 hours later…
6:42 AM
0
A: Sandbox for Proposed Challenges

Sp3000Choose the Smallest Unchosen king-of-the-hill Upon seeing the Keep your distance! challenge, I was reminded of similar party game involving numbers. Every round, each player chooses a single positive integer. The winner of that round is the player who chose the smallest integer nobody else chos...

 
 
1 hour later…
7:46 AM
@PhiNotPi Rainbolt I think
 
8:05 AM
Gotta badge 'em all!
user image
3
 
8:16 AM
Hmm seeing Kolmogorov reminded me... it's been pretty quiet in terms to simple challenges and we're not getting MathJax any time soon, so maybe...
 
@Sp3000 I'm a bit annoyed that they just seem to completely ignore the unanimously negative feedback on that decision. :/
 
:/ yeah...
Oh well, code blocks it'll have to be
(just wished things happened as quickly as it did with Stack Snippets)
 
8:54 AM
someone upvoted me , I got a bronze badge for 10 votes, then he revoked back the upvote
I still have the bronze badge :D
 
XD nice
 
9:07 AM
@Optimizer only tag badges can be revoked, but now you won't get another Nice Answer badge until two answers of yours hit score 10
 
oh is it ?
 
@MartinBüttner Hm... Marbelous doesn't have negative integers does it? Or was it something about twos complement?
 
Well you can interpret the bytes however you want. :P but it doesn't have negative numbers any more than Brainfuck
 
Well it doesn't really change the challenge, so I've made it nonnegative
 
so is 0.199999996 a valid answer for 0.2 ?
@Sp3000 ^
 
9:20 AM
Yes
 
ok
 
Fast!
 
9:40 AM
people just upvote without even looking at the answer ?
 
Do we have a meta post about taking input as already existing variables?
(because that wasn't exactly the type of input I had in mind)
 
that whole answer is completely wrong
he just read the first half of your question and saw A1 A2
the input methods are wrong, the function definition is not complete.
 
hi
please tell me if there are any problems with codegolf.stackexchange.com/questions/45257/counting-k-mers
 
"You may preprocess the input"
Oh boy, fun times
Now I wish I did well on my assignment last semester because my suffix tree implementation has bugs :/
 
10:18 AM
@Sp3000 it says "You can preprocess the input to decompress it before starting the timing."
I didn't mean any other preprocessing
 
... oh, right
 
I edited it to make it clearer
 
Sorry, I somehow had the impression that you could preprocess it and encode it in some way, then decompress that. Oops :/
 
:)
 
... I cbf learning the O(n) suffix tree algorithm :D
 
10:35 AM
@Sp3000 cbf?
 
Can't be bothered
 
effing bothered
huh, Pyth does not have abs ?
 
Oh?
Interesting...
 
:/
 
I guess you can do the sadface tS,T_T for 6 bytes...
 
10:43 AM
wutt
 
(assuming the variable is T)
 
no variable
20 byte expresstion
what all are the ways to get absolute value in python ?
 
I wonder if you can use $ to do abs
I still don't get how $ works
 
like this : PythPy$PythonPython$thPyth
and it would be more than 33 bytes if I use that.
 
$Pnot=abs$!_10 lol
Yeah definitely too long
 
10:52 AM
you can directly do stuff like
$abs$_10
 
Actually you can't, I just tried that :/
 
in the online one ?
 
abs
Pprint("\n",neg(10))
Is what you get
 
lol
 
I don't think the online one lets you use $ for security reasons
 
10:53 AM
yeah, it doesnt
 
But as far as I can tell I can't think of a shorter way of getting abs without repeating the expression... hm...
^^_10 2 .5
lol I guess there's that
 
lol
6 bytes
 
11:19 AM
the J comment is a little mysterious to me
anyone here understand J?
and/or the comment?
 
When in doubt, I just consult the vocab list
 
@Sp3000 thanks.. he ran it and it gets to k =2 :)
which I suspect won't be a winning entry
 
 
1 hour later…
12:32 PM
@PeterTaylor waving hands: when you cast charm person, can a spell be cast with the gesture you choose for you opponent? if so, who chooses the spell?
 
12:42 PM
@Doorknob I think you can call this a consensus ;)
 
8 vs -9
ob
 
@Optimizer I think the -9 are mostly for the other points, that tips don't belong on the site at all. that's why I added the new answer which specifically addresses the CW thing. if someone disagrees with that, I think they should explicitly add an answer that says "Tips should be CW" (and just that)
 
12:58 PM
@MartinBüttner It's like returning rand(5) if you have a rand(7). It could take longer than any time.
 
@randomra I still don't understand. What's wrong with rand(MAX_INT)%n?
 
Every possible permutation must be returned with the same probability
 
oh, right, so that's biased with MAX_INT is not a multiple of n
then floor(rand_double()*n)
 
@PeterTaylor Thanks for the dupe link. I can't tell whether you have impressive re-researching skills or just an impressive memory :P
 
probably both :P
 
1:04 PM
don't think that will be uniform either
you might just say that any rand is considered O(n) and uniform
 
@randomra why not?
 
because double has 2^32 or whatever state, you can't divide it to 7 even batch
 
@randomra but, yeah that should work
@randomra did you mean O(1) though?
 
yep, O(1)
 
 
1 hour later…
2:17 PM
Zgarb is like the CH of bite-sized, but interesting, code golf
 
bite-sized ?
 
as in small
 
Nice question indeed :P
 
Anyone have any other questions/concerns about Codémon? I'm planning to transfer it to main some time later today if nothing serious comes up.
 
2:34 PM
@MartinBüttner I think that since a spell must be cast if you complete a sequence, that person casts a spell. But since you control only one hand, I assume that the controlled mage has the ability to choose which spell.
@Sp3000 I remembered that question and then read through the list of KotH to find it.
 
@PeterTaylor makes sense. if you don't mind another question... the rules state that you can target a creature that is about to be cast (using the example of an elemental). with the other creatures, of course, you don't know which creature is being cast, since the spells are all suffixes of one another. can you just say "the creature you're about to cast" or do you have to name a specific one and hope that's the one the opponent chooses?
 
I think that needs an implementer's ruling. "The creature you're about to cast" sounds reasonable to me.
@Geobits FWIW I asked those questions because I thought of them, but I haven't upvoted the question as ready to post because I still haven't fully understood it.
 
k, thanks
 
So there may be other things that I would find unclear if I sat down to write an answer.
 
Understandable. I'm going to post example submissions (a CW non-competing one and a semi-serious one) along with the challenge, so that should help. Not that it's ideal to rely on that to explain things, but it's hard for me to look at the spec with fresh eyes. If you see anything else, just let me know.
 
2:50 PM
@Geobits I just started reading your sandbox post
I'll give it the ol' "can a dummy understand it" look through.
 
Cool. I figured not everybody had gotten to it yet, since I posted on a weekend.
 
I was just letting you know so I didn't waste my own time reading it just to have you post it halfway through lol
 
I should have just sandboxed it for half an hour and posted it Saturday night :P
 
@Geobits: When HP drop to zero => When HP drop**s** to zero
Each monster know three battle moves => Each monster know**s** three battle moves
Each type has a direct attack, a weaker attack with effect = Each type has a direct attack, a weaker attack with effects
 
Thanks! I knew I could count on you for a spelling/grammar check ;)
 
2:55 PM
(or "with an effect")
and a sole effect move
Uh maybe I should just edit?
 
New challenge idea I'm working on: real-time hovercraft battles.
 
@Rainbolt By all means, if you want to proofread-edit it :)
 
Ok. Real quick then: "a weaker attack with effects" or "a weaker attack with an effect"?
 
@PhiNotPi More information needed. Sounds interesting.
an effect IMO
Since no attack really has more than one.
I love this question: Why don't airlines load their passengers like freight? All other issues aside, people object to being treated like cargo (worse than they already are). Plummeting ticket sales are a good disincentive...
 
Does it explain later on in the post how long burn and poison last?
Or do they just last until end of battle?
Oh, and confusion too
 
3:03 PM
@Rainbolt Until the battle's over. I thought it was in there, let me check.
All effects, including attack up, etc.
 
You have it covered
I mean, if it lasts until the end of battle you don't need to cover it
@Geobits If you start a Codemon at 100 attack, and you subsequently fight for 100 rounds and you spend your bonus points on attack, would you have 200 attack?
You maxed it out at 149 for some reason
 
@Rainbolt one point every two rounds
(and you can't use the 50th point, because the tournament is over by then)
 
@MartinBüttner Oh, I missed the "two". Thanks!
If teams are tied for first, do they have to endure another 100 rounds? Even if there are only two of them?
We need to get the members of this site communicating with JSON. It's just so much easier.
 
3:23 PM
Yes, another 100 rounds, even if there are only two. 100 rounds doesn't take very long between two entries.
 
@Geobits Do we get 32 kilobytes or 32 kilobits of disk space?
I'm assuming you meant bytes in both places.
 
32 * 1024 bytes, yes.
 
3:37 PM
Blaaaaah cannot believe I just read all of that. Eyes hurt :(
 
3:48 PM
0
A: Sandbox for Proposed Challenges

PhiNotPiReal-Time Hovercraft Battle king-of-the-hill Hovercrafts are cool. Hovercrafts with rail guns are even cooler. In this challenge, you will write a program to controller a battling hovercraft. The hovercrafts in this game obey the laws of physics. A hovercraft with no acceleration will conti...

 
3:58 PM
@Geobits ^ Current hovercraft battle idea.
 
Does the railgun have recoil to "kick" the hovercraft when fired?
Sounds fun, though, especially if the physics are done well :)
 
I was thinking about recoil.
The physics have to be done well.
I'll add recoil..
 
Geez. My manager is trying to account for the 29 hours per developer per three weeks that are unaccounted for.
Talk about squeezing for time. At my last job, 80% accounted for was good
If I have to account for 100% of my time every three weeks, I'll be spending ten minutes per day just double checked that my numbers add up to 8 hours.
 
So about 2 hours a day?
 
Yes. So if I close two bugs at two hours each, and complete one task at two hours, and that is my day, then I have lost two hours.
I could log impediments like "Had to respond to email about an issue the customer was facing. 30 minutes." but where does it end? Should I log an impediment about logging impediments?
 
4:16 PM
Hearing things like that make me like my job more. Thanks for that bright spot on an otherwise dull Monday.
 
I love my job. If I brought this up to my manager he would listen. I just haven't fully developed what I want to say to him yet.
I usually spout things here that are half thought out.
 
Sure, I just meant that things like that literally never come up here.
 
4:57 PM
I never really realized how many questions I have sitting in the sandbox.
I counted about 20.
Maybe I should try to get as many of them ready as possible, then post them all at once.
 
5:18 PM
For some reason, I don't see PPCG working very well with a high question traffic.
"Remember that challenge I posted 30 minutes ago? Three whole people found it before it flew off of the front page!"
 
@Geobits In Japanese, is Kage just a literal translation of Shadow or does it have some specific connotation? (like shade or something)
 
AFAIK, it's mostly just shadow. It's become famous for ninja-ranks and bad fiction, but I don't know any other common usage. Not an expert, though.
 
at least I got an answer for my kmer challenge!
I wonder how high the best answer will get
 
5:46 PM
@MartinBüttner For the CTF challenge: Do you think it would be better to send players a map that differentiates opposing teams, or just a map that identifies your team and "everyone else" so that every enemy looks identical.
 
not that I am bitter about my snake challenge.. yet :)
 
@Rainbolt If you're able to remember state well (I don't know the specifics of the challenge), I like the differentiating option. More strategic options if you know that team A likes to defend and team B is stupid.
 
You can remember state. So you would enjoy the additional complexity brought about by knowing who is who?
Because if you know that information, not using it becomes detrimental
 
I agree with that, but don't see it as a downside. If your goal is to make it more interesting then that will do it. If you're trying to lower the entry barrier, go the other way.
 
Alright thanks. We go with complex map.
Which turns out to be nice because I can also use it for display
I think I'll make a separate process for the GUI though. Last time I built it into the controller. I think this time I will spit the map out and let someone else decide how to display it.
Should I make people write a separate program for the Flag Holder?
 
5:54 PM
So, if an individual is holding the flag it runs program A but once it's taken it runs B?
 
Pretty much. At any given time you are either holding your own flag or not, so you should behave differently.
That said, I don't think this will work well. Because what if you are holding the enemy flag?
Now you have three bots
 
I dunno, it seems that could be handled in a single program. if(holding)... Separating them seems like a bit of overhead.
For three bots I'd have to duplicate all the map-reading code, etc, or build a library :(
 
Ok. I think I'll ask for moves like java LazyWolf 1 0, where the first integer is hasFlag and the second integer is hasEnemyFlag
 
Can you hold multiple enemy flags at once?
 
That depends. If you are holding your own flag and you capture an enemy's, you score instantly and their flag starts a respawn timer.
If you don't have your own flag, then you can't score, so you could in theory start capturing a ton of flags and hold onto them.
 
5:59 PM
So, keep my flag at home while capturing, then bring them all back and hand them to the flagholder?
 
someone on your team holds your flag. They are like a moving base.
 
Probably not the best strategy :)
Oh, I thought you'd said something about allowing them to pass it around between members.
By "at home" I just meant surrounded by a bunch of defenders, though.
 
I thought about that and decided that instant scoring would be simpler
No need to pass now. If I am holding our flag and you are holding the enemy flag and we are on the same team, we score.
 
Oh, much simpler. I like it.
 
I'm thinking about making the flag holder have 0% survival rate. If he runs into an enemy he just dies.
Hopefully that will put points onto the board.
 
6:02 PM
Sucks to be that guy.
 
If your entire team has your back then you have to feel like a king.
 
So does this run for X turns, or until everyone is dead?
 
You'll respawn after X turns, and then game will end after Y turns.
And by respawn I mean the people on your team who are still alive will have a baby, because that makes more sense.
 
Sure, I have babies during CTF matches all the time.
2
 
 
1 hour later…
7:05 PM
hmm
trying to handle @randomra's tricky question
@randomra are you about?
 
@Lembik what alphabet is allowed in your substrings question?
 
@feersum just printable ascii
(I should maybe define that too)
 
really? because your example has only A,G,C,T
it makes a big difference
 
@feersum not quite.. it has lower case of those and N and >
at least
@feersum you can of course look and see the whole input in only a few seconds
@feersum and so optimize your code based on the result
 
I would hard-code the N part as a special case, were I to do this challenge
 
7:19 PM
and > ?
 
whatever
 
and lower case a,g,c,t
(> only occurs once so my point was silly)
 
So for clarity, can we optimize for this input, or should it be applicable to any printable ascii input?
 
needs more specifications
 
@Geobits here is the problem.. you can optimize for this input by precomputing the answers and printing them out at run time
this is not what I wanted
I gave an answer in the comments which I hope is satisfactory
did you get a chance to look at it?
 
7:27 PM
Four back-to-back pings? Seriously?
 
:)
@feersum how would you address the problem of people over specializing to the input?
 
is that a problem?
 
@feersum yes because their code can just print the answers
which ruins the whole competition
 
but what kind of data do you want it to work for?
 
@Lembik if the test file would have been random ascii, you could have answered 'no'
 
7:29 PM
data with only 4 letters? random ascii noise? English text?
 
@feersum the chromosomes at that web site I linked to
@feersum did you see answer to randomra in the comments?
 
No.
 
but now dont think there is a good answer
 
"That's a very difficult question to answer. To do this robust I could have given a training example and kept a secret test example. As I didn't, can we compromise and say you can use hgdownload.cse.ucsc.edu/goldenPath/hg38/chromosomes/chr3.fa.gz to hone your code but you shouldn't use anything specific about the data I have given you to test on? Chromosome 3 will be very similar to chromosome 2 so it should work well for optimization. "
that's my best effort
@randomra true! Except random input behaves in boring ways :)
 
@Rainbolt I'd prefer being able to differentiate teams.
 
7:31 PM
@randomra you are of course free to specialize your code at runtime
 
specialize code at runtime ??
 
I'd like to be able to distinguish a brawl between two enemies from loads of instances of one team just clustered together in defence
@Geobits thanks
 
@feersum for example look to see what the input alphabet is, the frequency of letters etc
or any other feature which you feel should effect how the code runs
 
as it stands the challenge will be 90% about input sanitization since the main task is very simple
 
@MartinBüttner That's a good point. The reaction to a huge cluster would vary significantly based on whether it was one team or two clashing teams.
 
7:41 PM
@feersum do you mean my task?
 
ofc
 
@feersum what sort of sanitization did you mean? Sorry I am being dim..again
 
removing blocks of N, and maybe newlines (it's not clear whether those should count as characters)
 
@feersum newlines don't count as characters. I tried to make this clear in the question
@feersum but I think there is more algorithmically to it potentially
there was a comment to this effect in the sandbox
although it is possible that my tight time limit of 1 minute might make very sophisticated methods run out of time
which would be a shame
 
@Lembik where in the question does it mention newlines?
 
7:46 PM
"You should use hgdownload.cse.ucsc.edu/goldenPath/hg38/chromosomes/chr2.fa.gz as your input and ignore newlines. Your code should, however, be case sensitive. "
 
@PhiNotPi I believe there's an old-ish sandbox proposal for a KotH on an ice sheet, which is a bit similar to your hovercraft idea... except there, it was only about pushing, and not about inflicting damage
 
@feersum in case you are interested.. the full histogram of single characters is {'A': 36905447, 'a': 34885766, 'c': 24191191, 'g': 24289179, 'G': 24161724, 'h': 1, 'C': 24126990, 'N': 1645291, '2': 1, 'T': 36965508, 't': 35022424, 'n': 10, 'r': 1, '>': 1}
the h,r and 2 are just from "chr2"
the lower case n is more of a mystery
@feersum I updated the question to address the discussed we just had
I hope it is helpful
@randomra does it help clear things up?
 
8:04 PM
@Lembik yep
 
@randomra I am very pleased
 
@Geobits Are you around? I need some assistance with Java
 
What's up?
 
I've fleshed out the Shuffle an Array sandbox proposal to the series of challenges on randomness I had in mind... all sorts of feedback are very welcome:
1
A: Sandbox for Proposed Challenges

Martin BüttnerRandom Golf of the Day code-golfrandom I intend to run this as a little series of challenges revolving around the topic of randomness - potentially as a 9-hole golf course. In this case, I'd maintain a leaderboard across all challenges in the series, and offer a large bounty to the person co...

 
@Geobits I want every player in my game to have an id that represents their team. However, I can't wrap my head around how to give them an id that they can't manipulate.
 
8:12 PM
You mean manipulating what other people see their id as?
 
If you create a parameter-less constructor in the parent class, then it will be called by default when the child class is constructed. But I need to create a parameterized constructor and force it to be called. But then I'm writing code for the submissions and that kind of sucks.
 
KOTH submissions should be functions imo
Making it too objecty is the problem
 
@feersum I'm way ahead of you. Your goal is to write a function called "getMove()" and I'll be passing you everything you need in order to do that.
 
So the only interaction is with this one function. Then what's the problem?
 
Have people call getMyId() if they want their id, make no setMyId().
 
8:16 PM
You passed in mutable data?
 
@Geobits Thanks that solves it. I knew it was something simple...
 
If I'm writing a function getMove() only, does that mean no other helper functions?
Or do you mean a class that implements getMove()?
 
@feersum The problem is that I want as many people as possible to actually exist in Java, because the JVM will already be running and that will save processing time. The games slow down to an excruciating crawl when I have to instantiate and communicate with, for example, Python processes.
@Geobits I was gonna do it the same way I did the last one. You can either be called via command line, or you can inherit from the base Player class in Java.
 
I understand, you do not want to start a new process, but don't see how that affects anything
 
@feersum If you "cannot see how starting a process affects anything" then you are blind.
 
8:20 PM
no...I can't see how starting a process affects whether you would give mutable game data to the player
 
@feersum I have to maintain another two dimensional array just to identify what team each player is on. I can also make it a property of Player and not have to worry about that. But if I make it a property of Player, I can't have anyone messing with that property besides me.
 
how 2 dimensions?
you could even have it as a bare field of player, if it's marked final
 
That's probably neater
 
much
 
@feersum Two dimensions because I'm trying to represent a game board with teams scattered around the board.
 
8:27 PM
so you have getPlayerAt(x, y) or whatever
 
Really just want to get his team.
protected String toMapString() {
    StringBuilder sb = new StringBuilder();
    for (ArrayList<Tile> row : tiles) {
        for (Tile tile : row) {
            if (tile.hasPlayer()) {
                sb.append(tile.getPlayer().getTeamId());
                sb.append(" ");
            } else {
                sb.append("  ");
            }
        }
        sb.append("\n");
    }
    return sb.toString();
}
 
The contestants have to parse strings? :\
 
Probably to keep the same protocol between Java and outside processes using arguments.
 
^ That
 
I see
 
8:32 PM
If your language has split(' ') and split('\n') then you should be a happy camper.
 
If all data is passed is strings, then data hiding is no issue at all
 
Part of me really wants to change that to sb.append(tile.hasPlayer()?tile.getPlayer().getTeamId()+" ":" ");
and then change the variable/method names to single characters
 
You know, it's weird how lengthy code almost looks ugly now. I am struggling not to take your first suggestion.
 
it seems split is of no use here, as the player id may consist of whitespace..
 
Who said that the player id may consist of whitespace?
 
8:36 PM
you are representing a grid, right?
 
Yes
Oh, I see lol
 
and it's probably important which column someone is in
sb.append("  ")
is all there is to distinguish
 
I didn't understand the "a player name may consist of whitespace" bit
 
Hacky fix - assign a character as invalid team id meaning empty space.
 
I should probably use commas and semicolons instead
 
8:39 PM
Weren't you saying something about JSON earlier? Mapping numbers on a grid is perfect for JSON :P
But yea, comma/semicolon/colon works.
 
Yea, this does seem fitting
In JSON, a 3 by 3 map with only two teams would look like {map:[[" ","1","1"],[" ","1","2"],["2"," ","2"]]}
 
For the record, I was being sarcastic. Please use something more like ",1,1;,1,2;2,,2"
 
Well, Javascript could absorb the entire input with "JSON.parse()". Haskell (read), Python (eval), Java(getJSONObject), and C# can too.
But I guess comma/semicolon delimited is simple enough.
Lol C# calls it a "JavaScriptSerializer". It makes no reference to JSON at all.
Oh, but there's also a JsonReaderWriterFactory
 
I thought all the JSON libraries for Java were third party?
I mean, they're common libraries, but...
 
import org.json.*;
I missed that part. But it's not so bad
 
8:51 PM
Yea, I'm not saying it's a huge burden, but if somebody happens to not have it installed, it kinda sucks.
 
hand-parsing would be a lot easier than installing a JSON library for 1 task
 
@MartinBüttner I think my hovercraft idea is very different than the iceberg one.
 
probably is
just reminded me of it
with momentum and velocity and all
 
I need to do some physics research: I hope that a lot of it will be "perfectly calculated".
 
you mean you want to solve everything exactly?
shouldn't be too hard
let me know if you need some help
 
8:59 PM
A hovercraft with no acceleration can be solved exactly, but I don't know how to do that for an accelerating hovercraft.
 
00:00 - 21:0021:00 - 00:00

« first day (1465 days earlier)      last day (3364 days later) »