These are chat archives for Codewars/

Nov 2017
Nov 23 2017 16:02
Hello. Could anyone help me with this code pls? I got Server Execution error. But it worked fine in Repl (the online Editor). Thank you.
function dirReduc(arr){
var opposite = {
return arr.reduce(function(dirs, dir){
if (dirs[dirs.length - 1] === opposite[dir])
return dirs;
}, []);
Nov 23 2017 16:34
The execution server has been down all day for me. Probably doesn't have anything to do with your code : )
Fernando Balandran
Nov 23 2017 16:42
Same here, just tried submitting something it worked yesterday. And got server error. I don't know why the status page says all green.
Nov 23 2017 22:03
Hi guys,
Someone to provide a bit of help on the "Builder of things" in python?
I currently have just on last problem with the can.speak part: the function provided use the name argument that has to be used actually with instead and I do not find a way to achieve that.
I explored the function object and found a way to retrieve the arguments name that match a variable in a larger scope, but all the fields are "read only". I tried to wrap the function in another one where I wanted to eval("{} = self.{}".format(varName)) but that failed...
Currently, the only way I manage to pass the test is by defining the variable name in the outer scope, but it really pains me... :/
Any input?
eval("{0} = self.{0}".format(varName)), of course
Nov 23 2017 22:21
"defining the variable name in the outer scope", meaning by hand... really lame... xD
Fernando Balandran
Nov 23 2017 23:30
Is Thing object defined in the preloaded section?
Nov 23 2017 23:30
@Blind4Basics yes, that's the one ugly part about that kata
in JS you also have to do an ugly thing and it just screams ugly over the whole thing because of how the other parts are handled