« first day (1606 days earlier)      last day (3238 days later) » 
00:00 - 23:0023:00 - 00:00

12:30 AM
-1
Q: A different challenge

lucs100A Different Challenge... Write a program that multiplies three numbers given in this format by the user: X,Y,Z Where X is the first number, Y is the second number, and Z is the third. Return something sarcastic if it the user doesn't use that format The winner will be the one who uses the most...

 
 
2 hours later…
2:06 AM
Should I make a "Tips for golfing in TI-BASIC" question?
I don't know how many other people will have tips, but the few I have could be a useful resource (that is, if anyone else actually wants to golf in TI-BASIC).
 
 
2 hours later…
4:43 AM
I'd love to see some tips for that, I haven't coded in it in a long time.
 
5:02 AM
0
Q: Tips for golfing in TI-BASIC

Thomas KwaWhat general tips do you have for golfing in TI-BASIC? I'm looking for ideas which can be applied to code-golf problems and which are also at least somewhat specific to TI-BASIC (e.g. "remove comments" is not an answer). Please post one tip per answer.

 
Prepare to have your mind blown. TI-BASIC has a few really strange optimizations.
 
5:24 AM
@MitchSchwartz fair enough
 
5:34 AM
0
A: Sandbox for Proposed Challenges

JamesBuild a Rorschach Generator 2 possible challenges: 1. Help a poor struggling game dev write some code to quickly and efficiently generate a Rorschach inkblot. Using your language of choice, generate a Rorschach inkblot. You may use any method of generating a random seed. The generated image ...

 
 
2 hours later…
7:18 AM
Hi everyone !
 
 
1 hour later…
8:45 AM
Rocket bots looks funny :3
 
9:20 AM
@Katenkyo , Is there a way to know if slots are filled in that KOTH?
Like if( slot[i][j] == "^") /*Do something*/
 
@CoolGuy Yours, yes, But I didn't find a way to know for your opponent's. I asked it in the comments, just waiting for an answer
Hooo, for the rockets xD
yes, you have a Rocket[][] given at each turn
 
How do I check it?
 
map[i][j]=null if no rocket
and map[i][j].getDis() to check if it's ^ or v
 
ok Thanks.
What's the coordinates of the top left corner and the bottom left of the grid?
 
looks like rocket aren't null if empty, it's X
I think it is [0][0] for top left, and [8][0] for bottom left
you start at [-1][6-8]
 
9:26 AM
ok
 
Going to eat ! See ya
 
Bye
 
 
1 hour later…
10:35 AM
Quick poll: any creative ideas for the title of a challenge about atomic chess? ;)
 
Kamikaze chess?
Because your pieces all hold bombs and try to take out as many opponent as possible by exploding themself?
 
11:00 AM
Is there a simple way of implementing Haskell's group in Pyth (used as the lambda of a map)? As in "abbcaaab" -> ["a","bb","c","aaa","b"]
`"abbcaaab" -> "abcab" would be even better.
 
does haskell have regex?
 
It does, but I've never used them.
 
because you could use something like replace("([a-z])+","{1}")
(not sure about the syntaxe, never used haskell)
(and long time didn't used regexp x))
Hum, more like replace("([a-z]){1}+","{1}")
 
I was hoping to do it in 5 chars of Pyth. :)
 
ho, I've read it the other way x)
 
11:10 AM
.g is close, but not quite
 
Yes, .g effectively sorts the string, then does what I want.
 
"([a-z])\1+","\1" would be the regexp if you need it one day :)
but for pyth buil-in, I can help, dunno the pyth :p
 
could be shortened to "(.)\1+","\1"
but still too long I think :)
 
11:30 AM
@Doorknob Finally, I wasn't for from the chosen title ^^
 
:P
 
1
Q: Explosions on a chessboard

DoorknobAtomic chess is a (very fun) variant of chess in which every capture causes an "explosion," destroying the captured piece, the piece doing the capturing, and all non-pawns in a 1-square radius. The goal of this challenge is not to play an entire game of atomic chess, but simply to simulate what h...

 
But it makes me wanting to play atomic chess x)
sounds like a funny game
 
It is very fun. I actually learned about it from other users from SE; we have a chatroom where we play all sorts of variants of chess with each other.
I also like antichess, where the goal is to lose all your pieces :P
 
Actually, I don't know if I owuld like to play chess virtually, I always prefered playing with a chessboard and all ^^
@Doorknob Ho, sounds tricky to lose your king !
 
11:35 AM
@Katenkyo Well, there's a rule that if you can capture a piece, you must. So it gets pretty interesting!
 
@Doorknob Ho, well, makes things easier !
Sounds funny too !
 
yep :P
 
I will try to make some of my friends playing such chess variant :)
 
Ho, there's a lot of progress since the last time I looked at neural networks !
@MartinBüttner Some of those pictures are truely beautiful ! Oo
 
12:09 PM
@Sp3000 got 33 bytes without a marker
 
for?
 
stretching words in retina
r+`((?=\4)((?<!\3)(.))+\n)(.)
$4$1
and it still seems golfable
 
What is an RNG?
 
@Sp3000 u+*HnHhGGzhz is 12 bytes, but still too long
 
I saw "RNG" here: If any bots use RNGs, then each matchup will be 1000 duels instead.
 
12:15 PM
random number generators
ah, found an alternative without RTL mode, but still in 33 bytes:
+`(?=(.))(((.)(?<!\4.))+\n)\1
$1$2
 
@CoolGuy As said by Martin, it is a Random Number Generator. In java, it means using the class Random or Math.random() :)
 
ok. My upcoming bot using Math.Random()..... I'll post the bot soon....
 
Haha, just for the pleasure of multiplying the number of fights by 1000 :D
 
@Katenkyo Posted :-)
 
12:31 PM
@CoolGuy Haha, and by reading your bot, I realised I did LinkedList.add() instead of addFirst/push >_<
fixed :)
 
@MartinBüttner You can have backreferences in a lookbehind!?
 
@Katenkyo , In fact, when I was creating the bot, I used add and was baffled why I was having ArrayOutOfBoundsExceptions. Then I looked at other bots and realized that add needs to be push. :-)
 
@CoolGuy It's logic to use push in fact,elements are retrieved head to tail, first to last element of the stack.
So, as we're adding the first element in first, with add it would be at the bottom of the stack è_é
we're trying to use it FIFO instead of LIFO
 
12:51 PM
uwaaaa, writing an intership report is soooooo boring
@CoolGuy Your sniper might be one of the best submission, maybe the best one.
 
Says who?
Other bots has beaten sniper
 
@Katenkyo intership report should actually be interesting. At least it sounds so.
 
@Sp3000 why not?
 
@Katenkyo Do you have intraship reports too ?
 
@Optimizer It should be interesting to read, not to write
Writing in french is so boring, I would prefer writing it in English :/
@Optimizer intraship?
 
1:07 PM
You still did not get the pun/joke ?
 
@CoolGuy Wow, must do simulations so !
@Optimizer looks like i'm too tired to get it
 
inter ship vs internship
 
wow, didn't see the typo x)
Just did an other bot for rocket, it shouldn't do less than 3 points/match :)
 
Looks like I got an automatic bounty on a question where both answers had 3 votes. I wonder what is the tiebreaker?
 
@feersum Hum... Age?
 
1:18 PM
Mine was newer
 
Maybe the other one was +4/-1, so it would be the fewer down votes as main breaker
 
SE surreptitiously watches your typing pattern while answering. To decide tiebreakers, it uses whichever answerer matched the "in deep thought" typing profile better.
 
@feersum hm the FAQ says "If two or more eligible answers have the same score (if their scores are tied), the oldest answer is awarded the bounty."
was the other answer posted before the bounty was offered?
 
It lies, then
probably
 
which question?
 
1:21 PM
Wasn't the other answer present before the bounty started?
 
@Geobits you got ninja'd haaaard
 
9
Q: Probabilities - how high can you go?

LembikI previously asked a question for how to compute a probability quickly and accurately. However, evidently it was too easy as a closed form solution was given! Here is a more difficult version. This task is about writing code to compute a probability exactly and quickly. The output should be a ...

 
>:(
 
@feersum yep, Mitch's answer was posted two days before the bounty started
so there is no tie to begin with
 
it's 7 days+ 1 before auto-attribution
so you posted just after the bounty was set, and he posted before :)
 
1:22 PM
@MartinBüttner I don't even know if we can call that a ninja anymore. Even a tortoise would have won in that much time.
 
That's what I get for actually looking up the question before asking.
 
@Optimizer Funny that I just posted a bot called Tortoise
 
"oldest" seems like a weird tie breaker though. since this only happens if both posts have the same votes it means the newer answer must have been gathering upvotes faster. wouldn't that indicate the newer answer is likely better?
 
@MartinBüttner it looks like better=/=winner
 
If they were posted days apart, that's a good point. If they were posted minutes apart, then the "newer" one could be saying the same thing, just a bit slower.
It would make more sense (to me anyway) to just split it between tied answers.
 
1:28 PM
hm yeah, although it would be weird because splitting bounties is impossible manually
@Geobits with a rule like "if the difference is less than a day, the older wins, if the difference is more than a day, the newer wins" this could be the basis for an interesting KotH...
 
in Pyth, is there a better way to get the minimum of two numbers than hS,
doesn't look like it
@isaacg overload .m and .M for simple min and max please :)
 
@MartinBüttner I tried on Regex101 and the other flavours didn't seem to allow it
 
well yeah, backreferences are variable-width, so it only works in .NET
 
 
1 hour later…
3:08 PM
So apparently CheckIO just started closed beta for Empire of Code. Looks like programming games are all the rage nowadays (not that I mind!)
 
That looks cool!
 
3:36 PM
Seems like you can either wait for your building to build, or use a speed boost to insta-complete. Where do you get speed boosts? Well solve this programming problem...
 
With GS, how can I add all the numbers on the stack together?
I tried {+}do, but that gives me an error: undefined method `+' for nil:NilClass
 
{+}*? Might need to wrap the numbers in an array first
 
]{+}*. you might need to get rid of the empty string at the bottom though: ](;{+}*
any reason you're learning GolfScript and not CJam?
 
@Sp3000 Worked great!
@MartinBüttner I might learn that later, but GS seems like fun. I know they're basically the same, except CJam has more features, but it's better to start at the start line.
What about getting a range of two numbers?
 
3:48 PM
Thanks!
 
CJam isn't really harder to learn though (probably even easier, because you can print the stack at any time with ed). it also has the more intuitive type system I think. (just my two cents though)
 
ed's a very good reason
 
of course you can implement your own ed in GolfScript with something like {]_p~}:ed;
 
ooo my first answer http://codegolf.stackexchange.com/a/52066/41711
Is it alright? Am I following the format ok?
 
0
Q: Analyzing Earthquakes

ZgarbBackground The Random Domino Automaton is a toy model for earthquakes, inspired by cellular automata. In this challenge, your task is to simulate a simplified version of this model, and collect data out of it. The automaton is defined on an array A of k bits, representing a fault line on which ...

 
4:00 PM
wow these questions are cool
 
@Phase just replace 1 10 with ~ and voila, the code does get the numbers from STDIN
 
@MartinBüttner for each number or one ~ for both?
 
one ~ for both. STDIN is pushed onto the stack in GolfScript, and ~ is just eval
 
4:28 PM
Would it be possible to describe a meta-golfing-language that takes any existing language and shortens its syntax?
I remember old BASIC implementations where any keyword could be represented by an abbreviation as long as the abbreviation was not ambiguous, and if it was ambiguous then it would just choose in alphabetical order
so PUT and PRINT could be entered as PU and PR, and just P would evaluate to PRINT
 
I know GS uses while, do, if, & until. You could shorten those down to the first letter.
 
CJam more or less does
not the first letters, but single characters
 
yeah, I'm thinking of something generic
that could be applied to any language
would probably say something about whitespace, too
 
Like this I'm guessing?
 
something like that, yeah
I continue to be moderately annoyed at the features of "golfing" languages that are purely syntactical, not actually architectural.
A stack based language with a lot of implicit operands and casting and operation overloading is a great idea and awesome for golfing.
Taking that language and removing all whitespace and cutting every operation down to a single character... that's a different ballgame.
 
4:44 PM
I'm more annoyed at the ones which are like "Hey, this takes about 20 bytes in this language, let's make it a builtin"
 
If all operations are printable ASCII characters, there can be at most 95 of them, which forces the language designers to make interesting compromises about what to make a built-in.
Two-char built-ins are cheating though ;)
 
@Sp3000 Are you attempting the Earthquake challenge?
 
Maybe tomorrow if xnor hasn't demolished it by the time I get back home :) I need to head off soon
 
I've got it working now
but I feel like 410 bytes is much too long for this
 
5:00 PM
Definitely too long :P I'd guess at sub 200 or so
Oh you need to do several time steps, maybe a bit more than that
 
My way of checking adjacent cells including wrapping is waaaay too long
 
CJam answer at ~50 bytes = too lazy for me to do JS
 
thankfully I just found a very short way of doing this :D
 
My totally ungolfed reference implementation is 336 bytes of Python, if I strip some of the unnecessary whitespace.
 
this puzzle doesn't seem that bad
javascript abuse though ha ha
 
5:05 PM
That's bad news for me :(
I found a short way of getting the magnitude, but in doing so I lose which cells are adjacent
 
5:21 PM
I've got sub-200, and I think it's correct
 
@Sparr reminds me of goruby, some info here: ruby.janlelis.de/…
 
@Zgarb 95 builtins is actually quite a lot, when you include overloading. + can do integer addition, list concatenation, etc.
 
As a few people have noted, our questions per day stat has dropped rather dramatically over the past few weeks. How do we feel about a weekly community competition to write challenges?
 
hi
I think more people should upvote MitchSchwartz's awesome answer codegolf.stackexchange.com/a/51979/9206
just saying :)
@BrainSteel I blame me!
well.upvote or convert to b****fuck :)
 
You know, there are other 5 letter words that start with b that are commonly censored... :P
 
5:36 PM
@Vioz- k, I think I'm going to leave this here for a bit, and post it in the morning :) GL
 
@BrainSteel :)
 
How do you do <= or >= in GS?
 
@B****Steel ?
 
that's a nice gesture @Lembik , thanks
 
@MitchSchwartz my pleasure!
 
5:41 PM
@Lembik Hahahaha, that's even worse that BrianSteel :P
It looks like Area 51 just went down?
 
@Phase >! and <!
 
My nicknames just get worse and worse.
 
Area 51 works fine for me. Maybe you're on a government list?
 
@MartinBüttner Thanks!
 
5:42 PM
I'm getting a 503
 
@BrainSteel :)
@MitchSchwartz and it worked ! :)
 
it turned out to have a very nice structure for golfing, such that the processing of the first string and the processing of the second string are very similar, so they can be done with almost the same code
 
i found a flaw with javascript ._.
er
with my javascript
my random function is not very random ha ha
 
6:17 PM
@BrainSteel If we delete these two lines of code, the problem is solved: CalvinsHobbies.Remove("Writing challenges"); CalvinsHobbies.Add("Minecraft");
3
... but a weekly competition works well too.
 
Weekly challenges sound like a great idea! Until you have to actually do them weekly. Then they turn into fortnightly challenges, then get abandoned altogether.
5
 
I wonder how you obtained such foresight
 
These things... they just come to me.
 
I have an idea!
Idea: Remove "duplicate" as a close reason.
 
if(a[r]) {for(d=r+1;d<k&&a[d];c++,a[d++]--);for(d=r-1;d&&a[d];c++,a[d--]--);o[c]++}
blugh =.= I don't see a way to shorten this piece for the earthquakey thing
 
6:22 PM
Is that space necessary?
 
...
dies
i mean the for loops specifically :P
a search left and right for more 1s, then set them to 0 and increment until you reach a 0
and then increment the correct magnitude counter
 
Can you take a[d++]-- out of the loop? Put it between ); and save the comma.
 
yeah <_<
 
Or take c++ out instead, so they'll execute in the same order.
Same with the second loop I guess.
 
a fair 226 bytes
so far
f=(k,t)=>{a=new Array(k+1).join(0).split('').map(parseFloat);o=a.slice(0);for(t;t--;){c=0;r=Math.‌​floor(Math.random()*k);if(a[r]){for(d=r+1;d<k&&a[d];c++)a[d++]--;for(d=r-1;d&&a[d]‌​;c++)a[d--]--;o[c]++};a[r]=a[r]?0:1;}return o;}
creating a 0-array in javascript is remarkably hard
i ended up with 0s as strings and that was not what i needed ._.
I still don't see golfy JS yet. But I think, as far as JS goes, it's pretty efficient given the fact that the golfed random I tried to use failed ._.
 
6:28 PM
Can you initialize/set r inside the if? Like if(a[r=Math.floor(Math.random()*k)])?
 
You're too good at this
wait no that might not work
 
Hmm. Yea... scope. Can't remember js scope rules.
 
that and I think it'd return null
or not return anything or however you say it in JS
so it'd be like a[;];
javascript is never pretty when golfed
 
Also, I don't know about js rules on precedence, but in Java I'd use & over && in most cases.
 
a bitwise and
intriguing
 
6:34 PM
Java's a bit more type-strict, though, so I don't know if it will interpret it here as d<(k&a[d]) for example.
 
@Compass Have you looked at this challenge for creating JS arrays? I don't know JS myself, but it may be useful.
 
... wow @_@
hmm
though that might fill it with 0 strings
must test
 
Pfft, like there's a difference between strings and numbers in js anyway >_>
 
it works!
and there is!
"0" = true
0 = false
saved me a few chars!
< 200 whee
 
The type system of JS sounds horrible.
 
6:41 PM
everything is a string!
except when you interpret it as a number!
 
@Compass if 0=='0' then there's no difference ;)
 
5 characters!
agh the waste!
i could do "0"-0 but that's a waste of 2 characters!
 
6:54 PM
Man, reading Fry's solution to this makes me realize how complicated the problem was in my head..
 
Yeah, conceptually it seems complicated, but in actuality it's a random increment, then a propagate left and right
if 1
 
7:22 PM
@Compass You could change Math.‌​floor(Math.random()*k) to Math.random()*k|0.
 
4
Q: More is less and less is more

DennisAnybody can make the output of a program bigger by adding characters, so let's do the exact opposite. Write a full program, an inner function or a snippet for a REPL environment in a language of your choice that satisfies the following criteria: Running the original code produces x characters ...

 
7:38 PM
I'm not sure I understand this logic:
> Considering that this task is trivial is some languages and downright impossible in others, this is a popularity-contest.
 
@Geobits There is a rather boring 2 byte GolfScript solution.
So that would win almost instantly.
 
Yea, I guess I get not making it a straight golf. Something like a rosetta-code leaderboard would be cool, though.
 
Didn't Optimizer make a snippet for that sort of thing?
 
@Geobits Where is that comment?
 
@Rainbolt In the newest question (link above my message).
 
7:43 PM
Oh, I was looking for a comment lol
 
7:54 PM
@feersum I think you've won
 
I'm away for 20 minutes and miss my chance to put in 11-11...
 
oh right...popularity contest haha
 
Wouldn't that not work? 1-11 < 11-11
 
it counts chars, no value
-10 has 3 chars
 
Oh right. I forgot about that
 
7:56 PM
i don't see a way to do anything shorter arithmetically
a binary operator requires 2 digits on either side lest a single digit be deleted
and unary + and - don't seem to work for a+bc or a-bc
since deleting a can't create something with more digits
 
8:25 PM
-2
Q: Procedural mothership

Filipe TeixeiraThis challenge involves procedural creation of motherships like the ones in bullet hell games. The code should accept a seed as input and will generate a design for a mothership. The design should be symmetric, like some pixel art ships draw by hand below: The ship can be oriented left, righ...

0
Q: Grid crossing sequence

xnorIf you take a sheet of graph paper and draw a sloped line that goes m units right and n units up, you cross n-1 horizontal and m-1 vertical gridlines in some sequence. Write code to output that sequence. For example, m=5 and n=3 gives: Possibly related: Generating Euclidian rhythms, Fibonacci...

 
Today on PPCG: golf Bresenham's Line Drawing Algorithm ^^
 
@Sparr I thought that algorithm doesn't use every cell the line crosses?
 
It has to find every cell to draw the line.
 
bresenham's basically draws a line by deciding between moving right or up and right for each step
(for a line in the first octant)
 
8:48 PM
5
Q: Output the Iccanobif Sequence

mbomb007Write a program or named function that will output or return the sequence up to the nth integer in the Iccanobif sequence, documented on OEIS as A014258. Note that only the zeroth element in the sequence (0) will be printed if n is zero. The sequence is generated by starting like the standard Fi...

 
9:30 PM
One of our testers is funny:
[‎6/‎23/‎2015 4:28 PM] Rainbolt:
Would you expect a time for each report, or one time for all reports?
[‎6/‎23/‎2015 4:28 PM] Timothy Tester:
One time for all reports
[‎6/‎23/‎2015 4:28 PM] Timothy Tester:
And in the darkness bind them
 
one report to rule them all, one report to find them; one report to bring them all, and in the darkness bind them; in the land of @Rainbolt where the shadows lie
 
9:43 PM
How do you assign blocks to things in CJam?
 
@Phase Do you mean like :F to use F like a function?
 
yes
{+}:add; 1 2 add
 
{}:F works just like in GolfScript.
The only valid identifiers in CJam are A to Z.
 
ah, that explains it
 
1
Q: A Weekly Challenge Competition

BrainSteelI mentioned this in chat a bit ago, and got somewhat varied feedback. I thought I'd go ahead and ask a meta question to gauge the community's overall thoughts. As a few people have noted, our questions per day stat has dropped rather dramatically over the past few weeks. How do we feel about a we...

 
10:45 PM
@Doorknob did you just declare the fortnightly challenge dead? :(
 
lol, yes, yes I did
19
Q: Graduation update: it's election season!

PopsI'll start off by addressing the elephant in the room. It's been the better part of a year since the announcement that Code Review was graduating. In all those months, there haven't been any visible indications of change from us on the team. There are a few reasons for that, but they all come dow...

Incentive for weekly challenges: catch up to them ^ :P
 
For a moment I thought the impossible had happened
 
That's what happens after so long on life support. Someone decides to pull the plug ;)
 
maybe we should just have a drive to post stuff from the Sandbox?
 
That's not a bad idea.
 
10:49 PM
there's a good number of well-written challenges there that just need touching up and posting
i'm particularly guilty of this
 
@xnor I'm definitely up for that
 
I think people are hesitant to claim abandoned challenges
so an event could break through that hesitation
 
I have a few sandbox ideas that I haven't got round to yet but do intend to post eventually. There are several which I would be happy for someone else to take over if they'd like to - just post a comment asking if I'm attached to it.
 
I think we can all safely point the finger at @PhiNotPi for "old sandbox posts" :P
 
(I'm actively working on the ants so that one is mine)
I have a few old sandbox posts that weren't viable - I guess I should tidy those up so we can see what we've got left
I have a rival commitment at the moment because Open Source has just started private beta
 
10:54 PM
Oh yeah, I just made an account there. Interesting idea, interesting to see how it'll work out as a SE site.
 
I've got two old entries; a sub battle and a bland code challenge. One is a bit tricky, the other is just laziness.
 
It seems to have plenty of activity so far
Bring on the bland questions!
I'm working on some bland questions of my own
 
@trichoplax that went through area51 really fast
 
It's vertex covering. I haven't bothered to write a simple one to find good test case sizes.
 
I've got a bunch of over-ambitious KotHs in the sandbox but there are also a few other challenges that are awaiting either a stack snippet or a reference solution
 
10:57 PM
@Geobits I wonder how many sandbox posts are only a good test case away from posting to main. Could we have a way for people to request someone else make test cases? Then people who want to volunteer can look at the list and write test cases for one they like
 
That's the term I was looking for in re to my sub battle: "overly ambitious KotH" :D
@trichoplax I'm not sure how that would work in practice, but maybe.
 
Also maybe anyone who has a sandbox post they've forgotten for a while but still want to work on could edit to bump them and ask for feedback
 
I've been trying to nudge Gareth into posting his highly voted code golf...
 
@MartinBüttner yeah the activity on it is also very high and I'm expecting it will breeze through to public beta, but I still want to work hard to make sure of it - I'd really like it to be a thing
 
00:00 - 23:0023:00 - 00:00

« first day (1606 days earlier)      last day (3238 days later) »