« first day (1595 days earlier)      last day (3242 days later) » 
00:00 - 14:0014:00 - 00:00

12:08 AM
0
A: Sandbox for Proposed Challenges

BrainSteelStacking Pythagorean Triangles Sandbox note: I do not know whether or not this problem is trivially solvable. If it is not difficult enough, it is simple to rewrite this as a code-golf. A cursory glance tells me this problem is quite interesting from a mathematical standpoint. code-challengegeo...

 
12:55 AM
Huh. I was thinking today, and I was just about to ask chat if anyone had considered a kind of swarm intelligence KOTH, and here I am, looking at a SI KOTH idea. It sounds awesome, by the way.
 
 
1 hour later…
1:58 AM
Hey, markdown question
I want to do several collapsable regions
but naturally, that isn't possible with stack overflow
Should I do hidden text with >! or code blocks?
 
Depends what you're using it for, I guess
In the extreme case, if you have a ton of stuff, there's always the stack snippet option
 
2:14 AM
I don't like stack snippets
I find them intrusive and annoying
2
the only exception are for challenges that run in the snippets
@Sp3000 have you read the code bots 3 spec in the sandbox?
if you haven't that's fine, I just want to pass something by you
 
Nope sorry, been a bit busy this week so I haven't really checked the sandbox at all
 
I'm considering what should be allowed, and what shouldn't
so, bots have multiple threads of execution
should I be allowed to stop an opponent's thread?
 
"The bot lives in a 2D toroidal word" world? (skimming spec now)
 
thank you
 
If you can stop an opponent's threads, does that mean eventually you might be able to stop them from doing anything?
 
2:25 AM
yes
 
I guess you could try testing a bot whose sole purpose is to screw over everyone else by stopping threads, and see how well that goes
 
its tough to test bots, because I don't have truly competitive bots
 
Hmm yeah, that is a problem :/
Other than that, is Copy the only other attack?
 
Start could be
 
Hmm okay. Well I'm kind of thinking no because I can imagine it being abused, but I think it might be good to get some other opinions as well
 
2:35 AM
is it all that different than figuring out what line the bot is executing it and writing a stop to that line?
well, thank you for talking through it
I actually think I'm going to allow it
 
Ahaha no problem, sometimes the best way to debug is by talking to a rubber duck :)
 
@Lembik i started on the problem, you can see my brute forcers here, you can notice a similarity between the dp code and the recursive setup. solve1* are for the original problem, and solve2* are for the proposed generalisation ideone.com/33Ug8a
 
0
Q: Code Bots 3: Parallel Programming Antipatterns

Nathan MerrillWelcome back! I'm excited to present the 3rd CodeBots challenge. This one has been a long time in the making. This challenge will be split up in 3 sections: the short version, the long version, and additional details. The Short Version Each competitor will write a 24-command program. These b...

 
3:27 AM
0
A: Sandbox for Proposed Challenges

fridgefishKOTH Simpleton's Chess Introduction Disclaimer: The word "simpleton" is not meant to offend anyone who is simple or anything else. Don't take it personally, please. Do you find chess complicated? Is it difficult to remember all the pieces and how they move? Fear no more simple humans, as toda...

 
The Mr. Robot pilot is incredible. Best pilot I've seen in a long long time.
Here's episode one: rainiertamayo.com/mrrobot/…
 
3:53 AM
is there a general consensus that golf entries can use non-printable characters?
 
4:06 AM
solve2d() is analogous to the N=165 code and has all the same optimisations
 
So, I did a thing that some of you might enjoy trying to decipher
 
5:01 AM
Is there a suitable tag for most points rather than shortest points (usually bytes)?
I first thought KotH, but the tag description states "... the submissions interact with and compete against each other in some form of game".
 
@Rainbolt You got me to watch that pilot. Wow. Thank you.
@CzarMatt Do we need a tag for that? Usually, things like that are kind of lumped into code-challenge, which is broad enough to cover such things. Or are you talking about code-bowling?
 
5:27 AM
@BrainSteel Strictly speaking, a tag relating a particular scoring mechanism of say, X minus the number of bytes in your code.
But you're right, probably don't need a tag for that.
 
5:46 AM
@MitchSchwartz thanks!
 
 
1 hour later…
6:52 AM
1
Q: How to get a solution to a puzzle having a function that gives the next possible steps in Haskell

MJ GalramI'm solving the Brigde and torch problem in Haskell. I wrote a function that given a state of the puzzle, as in which people have yet to cross and those who have crossed, gives back a list of all possible moves from one side to the other (moving two people forwards and one person backwards). m...

 
why does that have an upvote... :/
 
Hi everyone
 
Hello!
 
Hi
 
@Doorknob How are you doing guys? :)
 
6:56 AM
@Katenkyo Pretty good, how about you?
 
@Doorknob Pretty tired, but up for some for some code writing ! :)
Actually, up to write my controller for my Summoner War. It will be over soon ! \o/
 
Ooh, that one looks interesting!
 
Thanks ! But pretty hard to prepare everything well ^^'.
 
Yeah, king of the hill is a tough one to do well :)
 
And as there's a lot of datas, I want to do a good API that will provide everything you could imagine :2
@Doorknob Yeah, didn't think it would be so hard before I started it ^^
 
7:12 AM
It's fun, though! And I learned quite a bit from writing one of my KotH controllers (it helps that it was in C++, which is a language I had almost no experience with when I wrote it ;) )
 
@Doorknob I should learn C++ one day, I love C and I think It could be interesting
 
hi all
 
Actually, mine is in java, and I already did a game working on local networks with this language, so there's not a lot of thing to learn ^^'
@Lembik Hi !
 
7:25 AM
@Katenkyo learn nim instead :)
it rocks
the only problem is the current lack of users afaict
we should have a nim day where all the answers have to be in nim :)
 
I think it'd prefer getting more into Lua, I see more use
But the idea of secured data is great
 
@Katenkyo nim is great if you like python but hate how slow it is
or if you just like high level languages I think
@Katenkyo of course aren't you meant to learn rust rather than C++ :)
 
7:40 AM
@Lembik Never wrote in Python :)
@Lembik I don't know rust ^^'
Oh, nevermind, heard of it.
 
@Katenkyo you are missing out! Python is great in many ways (and terrible in a small number :) )
 
@Lembik Yeah, but it wasn't something I learned from studies, and I prefered to learn lua when I had free time :)
 
8:15 AM
@MitchSchwartz Hi.. I tried out your great new code.... it is interesting how the performance varies when you change N_MAX
@MitchSchwartz I posting a more difficult version as the previous one was clearly too easy :)
 
8:40 AM
is it acceptable to say I will give 100 dollars to the red cross if someone comes up with a closed form solution for my new problem?
 
@Lembik Only if you consider the red cross as being me
 
@Katenkyo :)
 
0
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 ...

 
hopefully this is more tricky :)
 
8:58 AM
Hum, actually, the way I coded my controller for summoner wars could be easily adapted for a different format than 1v1, could be fun, will have to try that once finished :D
 
I don't know what most of those words mean :)
@Jakube will you improve your answer or should I just accept it now?
well.. I just accepted it :)
 
@Lembik Which words?
 
summoner wars , 1v1
I assume the former is a game?
 
It's a koth i'm actually dev'ing called Summoner War ^^
 
ok
 
9:12 AM
Specs aren't perfect on the sandbox, some things have to be re-written :3
 
@Min_25 codegolf.stackexchange.com/questions/42299/… is another related problem that you might find interesting
 
I hate math :'(
 
9:45 AM
it would be nice to visualize my boggle-board solution but can't find a tool for it :/
 
@Lembik each j has 1 minute, or there is 1 minute total?
 
@randomra Try one of the 2D languages, like SnakeEx?
 
@MitchSchwartz each j gets one minute
@MitchSchwartz I almost added a bit saying I would give 100 dollars to charity if anyone came up with a closed form solution for this :)
@randomra we need more nice visualisation challenges I feel
@randomra leverage some people's 3d rendering skills :)
 
Ideally I would like something like this:
maybe I can link SnakeEx, and people can click through the matches
 
10:06 AM
@Lembik is my j=2 code fast enough on your computer?
 
@MitchSchwartz yes! :)
@MitchSchwartz I was waiting for you to post that rather than me
but I did have a question.. it takes a very different amount of time to get to 30, say, depending on the pruning. If you get there quickly, does it that mean you don't have enough information to then go on to 100, say?
what I mean to say is, is exactly one threshold always the right answer?
 
we keep the information needed for N_MAX and discard the rest
 
@MitchSchwartz ok.. but did you mention a 2 pass idea at some point?
I can't quite remember
 
after completion there is not enough information for N_MAX+1
 
got you
 
10:12 AM
multiple pass would be for binary search to keep choosing different N_MAX values and starting over, so that the person running the program doesn't have to adjust N_MAX manually
 
ok got you
do you think Min_25 has now left PPCG or might he still be around?
 
he mentioned that he would try the joy of X one
 
@MitchSchwartz oh great!! Are you in separate email contact? I didn't see that comment here
 
no, he mentioned in chat
 
oh ok... I must have missed that. In any case, I can't wait to see what he comes up with
 
10:16 AM
22 hours ago, by Min_25
About the Matrix problem, I will try it. :)
@Lembik so do you want me to include j=1 code in my answer?
since each j has its own time limit, it seems a bit superfluous
 
@MitchSchwartz no need as you say.
@MitchSchwartz of course an even harder coding challenge would be code that worked well for different j's I suppose
rather than one script per j
thanks for finding the relevant part of the chat re: Min_25
 
well generalising my code in that way is doable but there is no point since it gets slower and slower
 
@MitchSchwartz good point
@MitchSchwartz I did mention how much slower your code is in pypy than cpython to the pypy people
 
oh ok
i'm not very familiar with pypy
i had before experienced a similar thing with psyco
 
it seems you have found a worst case for a tracing compiler so it's likely they can't do much sadly
 
10:29 AM
0
Q: Schrödinger's Laser

DoorknobFed up with experimenting on tiny domestic animals, Nobel prize-winning Edwin Schrödinger has decided to find the nearest laser and shoot it at things instead. Because... science! Description You will be given two points that the laser passes through and the size of the laser, and you must dete...

 
10:53 AM
@MitchSchwartz you are winning ! :)
 
oh i only just noticed my dyslexia
N_MAX and MAX_N
 
:)
you have quite a lot of time spare ....
 
never enough though :)
 
:)
 
now that's funny
 
10:57 AM
it would be nice if one could use the closed formula for j =1 somehow to speed up j > 1
 
i did not notice that you switched the two words until checking the message history
 
:)
 
11:17 AM
@Lembik did you have any other questions about how the dp works
it has many similarities to the recursive brute forcers that i wrote
solve1b() and solve2b()
 
colors.rgb("blue") yields "#0000FF". colors.rgb("yellowish blue") yields NaN. colors.sort() yields "rainbow"
6
 
What the fuck...
 
seems like a good golfing language
 
I love the >2+2 =>DONE
 
My personal favorite is the floating point NaN :)
 
11:26 AM
It's pretty funny y
 
@MitchSchwartz I still haven't written it out top down in math yet. I plan to do that then I may come back to you if that is OK
 
sure no problem
actually, your "in math" got me thinking, maybe i can write it concisely and include it in the answer
the 1,0,0,-1 part seems a bit annoying to write though
 
@MitchSchwartz that would be very nice
 
11:41 AM
$ b \in (1,0,0,-1) $ would be interpreted as equivalent to $ b \in (1,0,-1) $
 
there is always a multiset if you need it
In mathematics, a multiset (or bag) is a generalization of the concept of a set that, unlike a set, allows multiple instances of the multiset's elements. The multiplicity of an element is the number of instances of the element in a specific multiset. For example, an infinite number of multisets exist which contain elements a and b, varying only by multiplicity: The unique set {a, b} contains only elements a and b, each having multiplicity 1 In multiset {a, a, b}, a has multiplicity 2 and b has multiplicity 1 In multiset {a, a, a, b, b, b}, a and b both have multiplicity 3 Nicolaas Govert de Bruijn...
 
would you think \sum_{a \in {0,0}} 1 $
pressed enter when trying to press shift
$ \sum_{a \in \{0,0\}} 1 $ equals 1 or 2?
 
you can edit previous lines in chat
 
i know but wasn't sure if 2 minutes would be enough
 
the problem is the notation ...maybe $\{\{0,0\}\}$ ?
basically you need to say upfront what notation you are using.. there isn't really a standard one
 
11:48 AM
you don't think there's a consensus on whether my expression equals 1 or 2?
 
@MitchSchwartz I don't think there is a consensus on the right notation to use for a multiset
 
oh, that
well i was using tuples to begin with anyway, until you mentioned multiset
$ \sum_{a \in (0,0)} 1 $ equals 1 or 2?
 
2
 
ok
thanks
 
np
@MitchSchwartz oh and .. in case you were interested.. the j = 1 answer is asymptotically 2/{pi n) :)
I suspect the j = 2 answer is C/n^{3/2} for some C asymptotically but I don't know what that C is
so it's a guess currently
 
12:03 PM
cool :)
 
do you use irc?
actually. I have to go
chat later
 
@Doorknob hmm, all those things kinda make sense, except RANGE(1,5) and maybe +2 too... and I'm not really sure about 2+2
 
@Lembik i think i wrote this correctly, without including the base cases: $ f(a_1,a_2,b_1,b_2,s,t,u) = \sum_{a \in (-1,1)} \sum_{b \in (-1,0,0,1)} f(a,a_1,b,b_1,s-a_2b_2,t-a_1b_2,u-ab_2) $
i'm not sure that is clarifies anything though
and yeah, i idle in a few freenode channels but they're pretty inactive
 
@aditsu I wrote up a quick explanation (there are also some interesting theories in the Discussion section at the bottom), but yeah, those made the least sense to me too.
 
well actually, #esoteric is active
 
12:09 PM
@Doorknob oh, YOU wrote that??? haha
 
yep ^.^ (I'm KeyboardFire basically everywhere except SE)
 
@Lembik whoops, i forgot to include n in the above
 
I didn't check the user names
oooh! I get it now
2+2 actually does 2+=2
oh, everything is explained now, and a couple of typos are fixed too; I wonder when that happened, as the timestamps in the page history don't seem to make sense
I guess their clock is running on UTC+17min
@Doorknob alright, so now it all makes sense, we should implement it!
 
haha, PPCG challenge time? :D
@aditsu Ahhh, that makes much more sense.
 
@Lembik the base case should be to make sure that (s,t,u) are consistent with (a1,a2,b1,b2) -- i.e. s == a1*b1 + a2*b2, t == a2*b1, and u == 0, and return a 1 if that's true, otherwise 0
 
12:21 PM
I'm not sure if it can make a nice challenge.. I just think it would be fun to implement
 
12:49 PM
0
Q: A new javascript KOTH challenge, Fastest gun of the west!

VajuraSometime ago i wanted to make a KOTH challenge, but i wanted it to be more interactive and easier to test, i didnt really come up with anything good. But then i saw this awesome thing Red vs. Blue - Pixel Team Battlebots from calvins-hobbies. Essentialy it pulled the code directly from the answer...

 
@NewMetaPosts Hum, it isn't in the sandbox, but is a sandbox in itself
 
Isn't the above meta question supposed to be in the sandbox?
 
@CoolGuy Yes it is, I'm glad i'm not the only one to notice x)
 
It's like CH has done with snippet-koth. If it's pulling directly from answers, the real sandbox isn't helpful for testing that.
 
@Geobits Ho, didn't think about testing this part !
 
12:55 PM
Damn, I like KOTHs but I don't know JS :(
 
@CoolGuy Js is pretty simple, it's a really basic function-oriented language
 
Yea, he first asked about it here.
 
If you know a little bit of OOP you'll be able to use it :)
 
@MitchSchwartz looks good
 
I used Python copy.deepcopy and it was more than 100 times slower than a manual deepcopy...
 
12:57 PM
@randomra that seems quite buggy!
 
@Katenkyo I know Java (not much) and C. (And some python3). Which one of these is the most similar one to JS?
 
@CoolGuy err...none of them really
sorry
I suppose C is furthest
 
@Lembik not sure yet why
 
@CoolGuy Java will be helpful for the OOP side :)
 
maybe someone should make a map of languages where distance on the map is some distance in terms of the languages
 
12:58 PM
the class is a couple lists and ints
 
@Lembik Basically, you already could sort the languages in categories
 
@BrainSteel Haha no problem
 
Object-oriented , Imperative, Stack-Oriented
Pretty everything else is sub-categories
 
languages made just for PPCG :)
 
They usually fall under those 3 categories :)
 
1:02 PM
You forgot chicken oriented :P
 
@Geobits it's stack oriented :D
 
@CoolGuy javascript kinda imitates java... but only superficially
 
What about function-oriented?
 
@aditsu No it doesn't. It only got the name JavaScript because the name it had before was not very marketable.
 
@Katenkyo No, stacks are chicken-oriented.
 
1:05 PM
@Rainbolt it does.. many method names, Math, Date and stuff are similar, but the type system is completely different
 
ooh right.. functional languages didn't get a look in!
poor old Haskell
 
@CoolGuy Function-oriented is a type of Object-Oriented, or OO is a type of FO, I can't tell
 
and C.
 
@Katenkyo neither
 
@aditsu Well yea, find me a language that doesn't have a Date and a Math class in stdlib that is popular in the work environment.
 
1:06 PM
@Lembik It's kinda like
 
@Katenkyo why do you say that?
 
@Rainbolt it's not about having them, but about using the same syntax and naming
 
I have to go again.. bye
 
@Lembik If you handle the concept of Object Oriented, you can handle the Function Oriented one, and vice-versa
@Lembik Bye
 
> A common misconception is that JavaScript is similar or closely related to Java. It is true that both have a C-like syntax (the C language being their most immediate common ancestor language). They also are both typically sandboxed (when used inside a browser), and JavaScript was designed with Java's syntax and standard library in mind. In particular, all Java keywords were reserved in original JavaScript, JavaScript's standard library follows Java's naming conventions, and JavaScript's Math and Date objects are based on classes from Java 1.0,[117] but the similarities end there.
 
1:08 PM
@aditsu C#'s syntax is closer, and by naming I'm assuming you mean camelCase? It is not exactly unique to JavaScript and Java
 
Depending on how much you trust Wikipedia ;)
 
Oh, I stand corrected lol
The guy I just listened to at Visual Studio Live lied
 
@Rainbolt As I assume Visual Studio is a buggy IDE, this guy must have been Buggy too :)
@Geobits I think it's pretty accurate
 
There's also this:
> The change of name from LiveScript to JavaScript roughly coincided with Netscape adding support for Java technology in its Netscape Navigator web browser. The final choice of name caused confusion, giving the impression that the language was a spin-off of the Java programming language, and the choice has been characterized as a marketing ploy by Netscape to give JavaScript the cachet of what was then the hot new web programming language.
 
@Rainbolt no, I mean things like array.length, "foo".charAt(1), Math.floor(2.7), new Date().getYear() etc - you can literally copy them between java and js and they work the same
 
1:11 PM
@Doorknob about ur last (and not the first) warrant , u must know that , im not here to flag or offend people , i know many of my posts got flagged / downvoted / vlosed under diverse reasons by (not fortuitously) same persons always . so regarding you position as moderator , u have the right to take any directive u want , but be sure that -I m not gonna change my behavior- thanks .
 
@aditsu Weren't many of those things just lifted from C libraries (and adjusted slightly to match naming conventions)?
 
Is HTML/CSS knowledge required for learning JS?
 
No
 
@CoolGuy Not at all
 
@Geobits I don't see anything there that looks like C
 
1:14 PM
JavaScript as I understand it has two major uses. Node.js (and probably other things like it) allows it to be a server, and you can just write server side code in JavaScript (this is the half that I am not familiar with). The other major use is for client side code in a web browser.
 
@Rainbolt By the way, JS function starts by lowerCase, and C# functions start by UpperCase no?
 
Syntax and naming conventions are not the same
 
oh ok.
I guess I'll look into it later.
 
C# and Java share a syntax, and JavaScript and Java share a naming convention
 
@Rainbolt Yeah, but usually, following the same syntax imply following the naming convention
 
1:16 PM
@Geobits that's a good quote, I was mainly referring to the "JavaScript was designed with Java's syntax and standard library in mind" part
 
Syntax means semicolons, line breaks, using parentheses to call a function, etc.
 
Yea, the syntax is similar (enough to throw even more fuel on the fire that they were trying to copy Java for popularity's sake), but the god-awful prototyping system makes me puke.
 
I'm trying to write JS at the moment. Just found out that if(array) proceeds as if array is true, even if the array is empty.
I don't mind the effort of debugging if I can find out at the end that it was my fault
 
@trichoplax The easiest way to write js is to never trust that any comparison will make sense :P
 
lol I'm learning this...
 
1:19 PM
Stay paranoid ;)
 
if(array.length) works, but I wasted a lot of time finding that out the hard way
Oh well :)
 
an easy way I found to write js is to write java and compile it using gwt :)
 
I'm sad that google decided to can the Dart-as-a-separate-thing idea. They recently said they're not even working on making it do anything except compile to js.
 
I've never heard of Dart
 
I've been meaning to check it out, but I never have.
 
1:28 PM
I've played with it a bit, but nothing very serious. It's not perfect, but I like it far more than js.
I'd hoped that they could use their google-power to disrupt things more, but they backed down on "fragmenting the web" ><
 
@trichoplax if (array.length !== 0)—readability > succinctness. Also avoids annoying bugs like yours.
(of course, PPCG has the opposite motto) ;)
 
I think he wanted !== there, but yea, that's the proper amount of paranoia.
 
Ah, right
 
Wait a second, so is equality in JS checked with three equals signs?
 
=== is strict equality, == type-coerces first.
== leads to all sorts of weirdness. My recommendation: always use === and !==.
 
1:35 PM
4 equal signs checks for scope equality
 
We already went over this, hehe
How many =s did it eventually end up becoming again?
 
that's why I said it
5
 
That's.. interesting
 
5 equal signs checks for identity
 
And ====== is just never true
 
1:36 PM
so, only the exact same variable ===== itself
lol
 
@Vioz- Start here:
2 days ago, by Lembik
does it really have === ??
 
@Vioz-:
2651
Q: Does it matter which equals operator (== vs ===) I use in JavaScript comparisons?

bcaspI'm using JSLint to go through JavaScript, and it's returning many suggestions to replace == (two equals signs) with === (three equals signs) when doing things like comparing idSele_UNVEHtype.value.length == 0 inside of an if statement. Is there a performance benefit to replacing == with ===? ...

 
@Doorknob Since I'm working on a KotH answer rather than a golf that's a good point - I'll include the !== 0 (so I can read it myself, if nothing else...)
 
how many js equal signs does it take to change a lightbulb?
 
Trick question, lightbulb is immutable and can't be changed.
 
1:37 PM
One: lightbulb = ...
 
in Tavern on the Meta on Meta Stack Exchange Chat, May 17 '13 at 2:17, by Doorknob
I made a joke :D
Q: How many Stack Overflow users does it take to change a lightbulb?
A: 9. One to ask the question, five to close it as Off Topic, and three to delete it. :P
3
 
so true
 
You forgot the one or two that comment about how it's not off topic and the quickly inserted spam answer.
 
it applies to many if not most on-topic questions
 
The code for my KotH answer doesn't seem to be getting any closer to working, but it is getting longer and longer
8
 
1:57 PM
@trichoplax Same here, I have some here I can't understand
 
@Katenkyo For a KotH? Which one?
 
00:00 - 14:0014:00 - 00:00

« first day (1595 days earlier)      last day (3242 days later) »