« first day (1625 days earlier)      last day (3314 days later) » 

12:00 AM
I am at 0
 
I just put in some random numbers to see if it worked for any size, and it does
oh...
screenshot?
check the console
 
yeah
else debugger;
:D
 
wut?
line?
 
148
 
oh, lol
woops
try again
 
12:02 AM
isn't it smarter if the bottom level is vertical and perpendicular to the top level
btw it works now
 
@ziGi what do you mean? L shaped?
 
T Shaped
I think I still can't understand the concept exactly
because light blocks and dark blocks go over the red dot
but some light blocks go under
some light blocks crash your dot
 
imagine it in the 3d world: some blocks go behind it, some go before it
 
I understand that
but isn't it logical from players intuition that dark blocks go behind
 
you need to look at the bottom screen aswell
 
12:04 AM
lighter blocks go on top
and medium blocks crash your dot
I do look
but the only thing I do is that when I see a "half-block" I move the dot in the appropriate screen
btw you did something and now I cannot move the bottom dot
 
the concept is really counterintuitive, and personally I don't think this idea will ever go anywhere, but someone was willing to give me 50€ for this, so I don't care
 
yep
 
@ziGi ?
 
try to move left or right
it doesn't work
but I see you put the "j" so you can understand where the strings end :D
funny
I don't know I kind of don't like the structure of it
I mean it's kind of ok
but it seems you can make it much more object oriented and understandable
especially the map rendering is awful
why don't you make the levels 2 dimensional arrays
of different size
if you want 2x2
then just make
level = [
    [0,0,0,0,1,0,1,0,0,0],
    [0,0,0,0,0,0,1,0,0,0]
];
and the rendering part seems a bit overcomplicated
maybe I don't get the idea
 
12:32 AM
 
the local JS conf ended. Afterparty now. Many beers have been had
also, I added logic to my custom templating language in between talks; @{if condition} ... @{else} text here... @{/if}`
 
12:54 AM
@ziGi I just wanted to get my 50€ as quickly as possible, and so I just typed what my brain told me to type, I wasn't in the mood to make a well-structured minigame. Now I'm just polishing a few details to make it presentable
 
I see
ok then
 
1:07 AM
@copy
 
did the time just change for everyone? I'm GMT+1, but the time changed from 2 to 3, not as I would have expected from 1 to 2...
wut?
 
dude
this is so trippy
I was sure it was quarter to two 15 minutes ago and now I saw it's 3 in the morning
and I was like
I've been coding for 1 hour without even knowing
 
had the same feeling: "what have I been doing the last hour?"
 
haha quite strange
I forgot about it
 
also: "oh shit it's 3am, I should be sleeping!"
g'night
 
1:12 AM
see ya
 
1:40 AM
Being hit by 2 DST-related bugs in the same module on the same day :P
 
2:29 AM
Hows everyone doing tonight?
 
2:50 AM
@Asher good, you?
 
Its going good.
Thanks. What are you up to?
Any good discoveries?
 
@Asher Erlang has filtermap, which is very useful: erlang.org/doc/man/lists.html#filtermap-2
 
@Asher I just found out that there is a cat cafe in Munich. I will be going there next week with this guy ^
 
3:06 AM
yeah? filtermap... is that similar to the javascript idea .map? most likely something different.
okay, lets see... there's no way I'm going to be able to top those posts.
I've been looking over some new debuggin ideas. that and writing.
Let me guess you met him on a javascript chat? :)
 
Yes, but don't tell anyone
 
user2620028
Yeah... that would be embarrassing for us..
 
the 99.9% of us? I keep telling myself maybe I'm just confused. Its a good thing except if your debugging.
If I was a rockstar developer... this would all be easy. except I'm not.
@copy
 
user2620028
yeah.... too bad im not a ninja
 
ninja x 2??
 
user1596138
3:18 AM
@HatterisMad o/
 
user2620028
super ninja
 
user2620028
or mega ninja like a bad guy in a power rangers movie
 
user2620028
don't pretend like you don't know what i am talking about
 
wait why can't I change my pass? Okay seriously, does anyone know of a way to debug a problem that is like this... I want to learn how to do a DBSCAN algorithm? or maybe a relative of OPTICS?
I think the answer is take it easy and learn everything?? or am I just leading myself on?
look I've seen powerrangers... just not the whole show.
You guys are funny.
Its just watching TV and programming... seriously???
 
user2620028
you know what im talking about
 
3:29 AM
I have no idea what @Asher is talking about
 
Not really. I was looking for a way to do clustering differently.
CALL ME AN IDIOT.
there are details and superman over here isn't helping.
 
user2620028
IDIOT
 
fine... powerrangers! I'll even where a hat if I have to.
 
@Asher <asher id="10t">
 
user2620028
psh they have watches
 
user2620028
3:30 AM
nice
 
doesn't work on my computer.
So upset with you.
<img ="idiot.svg">
addition matters.
Its not like 500 years from now the log for this website will still be around. So how do we debug that?
Dont take everything seriously?
Maybe its wrong to think like this.
 
3:52 AM
The problem with the above is what if you where in blue and didn't want to be eaten by red or the other way around?
 
You change your coordinates
 
 
3 hours later…
user2620028
6:42 AM
How to check if a .querySelector() finds its html element successfully?
 
user2620028
Mdn claims that you can === null to find out if it is null but i have no luck with that.
 
7:01 AM
@HatterisMad mdn is right, you can also just if it since it's falsey and DOM elements are always truthy
 
user2620028
I tried both of those and didn't get expected results haha
 
make a fiddle
 
user2620028
7:20 AM
worked just fine this time - jsfiddle.net/089ej1jx
 
user2620028
must have had a typo that jshint nor i caught
 
9:14 AM
Hello ?
 
user2620028
good bye
 
monring
 
 I want to access the name but i could not acccess, I tried like this

 console.log(data.stdinfo[0].name);//error

 [ { stdinfo:
     { name: 'Sheila',
       age: '15',
       year: '2014'},

    subj:
     { subjectid: '8852858',
       subjectname: 'Math'},
       ud: { studentid: '0005' } },
  { stdinfo:
     {  name: 'Jack',
        age: '14',
       year: '2014' },
    subj:
     { subjectid: '8852858',
       subjectname: 'Math'},
       ud: { studentid: '0006' } },
  { stdinfo:
     { name: 'Jean',
 
@jemz data[0].stdinfo.name
also seems malformed, missing terminating } for each entry
 
9:29 AM
data[0] is undefined ?
 
5 mins ago, by CSᵠ
also seems malformed, missing terminating } for each entry
 
user2620028
 
@CSᵠ, I don't know why is it malformed that is the return from the server, I am using the node.js mysql-client
 
nvm, didn't catch one, blame formatting !
 
@HatterisMad,why it works for you ?
 
user2620028
9:35 AM
!!magic
 
(∩ ͡° ͜ʖ ͡°)⊃━☆゚. * ・ 。 ᵀᴴᴱ ᴳᴬᴹᴱ
 
what is nvm?
 
user2620028
DAMMIT
 
user2620028
nvm means nevermind
 
@jemz dude @HatterisMad even laid it on paper for you
 
9:35 AM
ok thank you
 
user2620028
@jemz i would have to see a fiddle of your exact code you are trying to find out why it is not working for you
 
Just started looking at keystone.js for a CMS system I've agreed to set up, does anyone have any negative experiences with it? I really like what I've seen so far in terms of flexibility but I'm not looking for an echo chamber so mainly interested in hearing reasons why I shouldn't use it :)
 
user2620028
@ivarni this is a fairly inactive time for this room, and i don't have any experience with it. Prime time for activity in this room will be in about 4-5 hours from now. That would be the best time to ask in case no one sees your message when they wake up.
 
9:50 AM
@HatterisMad I realize that, but in 4-5 hours I'll be well on my way through a couple of sixpacks :)
timezones, gotta love them
 
user2620028
hahaha yeah im on that time schedule too. They get up when i want to be winding down
 
user2620028
i am +7, where are you at
 
Norway, so +1
 
user2620028
hahaha ah so you are starting early then
 
aye, it's my easter vacation
just passing time while working on this side project really
wasn't really expecting an answer, asking was more of a long-shot
 
9:56 AM
@HatterisMad, it works fine now :)
 
user2620028
@jemz better than i can say for my code lol
 
user2620028
@ivarni damn i forgot it was eastern weekend lol
 
well, technically it's next weekend I guess
I just like taking time off work
 
10:12 AM
!!summon 29074
!!live
 
@SecondRikudo I'm not dead! Honest!
 
!!refresh
!!summon 29074
@rlemon?
!!summon 1
 
surprise surprise
 
@BenjaminGruenbaum ?
This question gave me cancer
 
eep
I'm having a hard time figuring out the usecase.. screenscraper?
 
10:30 AM
 var verifyLogInAuth = function(user){
  if(user === null){
    var error = new Error("Username or e-mail doesn't exist");
    error.code = 1100;
    Promise.reject(error);
  }
  Promise.resolve(user);
}
I should make this sync but I'd like to handle this together with my promise...
Any good tutorials on Promises? I'm having serious trouble.
 
I smell the deferred antipattern again, also you're not returning anything.
 
exports.logIn = function(username, password) {
  return findAccount(username, password).then(verifyLogInAuth).then(generateSession);
}

var findAccount = function(username, password) {
  var where = {$or: [{username: username},{email: username}]};
  return User.find({where: where});
}
Nevermind
That answer was already removed
Tip for anyone: Write a blog post on how to do promises the right way for beginners like me(there should be quite a few)
 
10:50 AM
@GabrielTomitsuka There's a great one on html5rocks
 
@BenjaminGruenbaum Should I leave that as a Promise or make it a simple return? Because it's not async, but I want to chain it.
 
@SecondRikudo Thanks
 
@GabrielTomitsuka You can leave it as sync
If it isn't the first promise in the chain, it doesn't have to return a promise.
Returning a value is fine
But you still do need to return something.
 
@SecondRikudo Oh ok.
 
10:52 AM
Calling Promise.reject() or Promise.resolve() doesn't do anything on its own
 
var verifyLogInAuth = function(user){
  if(user === null){
    var error = new Error("Username or e-mail doesn't exist");
    error.code = 1100;
    return error;
	}
  return user;
}
 
No, you don't return an error
You either throw it, or explicitly return a rejection
 
throw new?
 
throw error
or
return Promise.reject(error)
 
Oh right. Thanks!
var verifyLogInAuth = function(user){
  if(user === null){
    var error = new Error("Username or e-mail doesn't exist");
    error.code = 1100;
    return Promise.reject(error);
	}
  return Promise.resolve(user);
}
Now it's right?
 
10:56 AM
Yeah
 
Thanks a lot, really. I think I finally understood Promises.
 
is it okay to declare variable inside forloop ?


for(var i = 0; i<data.length;i++){

var id = data.id; // is this okay here ?




}
having var id ?
 
@jemz Yeah.
But wouldn't data.id always be the same in that context?
In that case, it may actually be better to declare it outside of the loop
 
ok thank you
if we put var id ? in the for loop ,it doesn't matter creating the variable id everytime my loop runs ?
 
@jemz No, it doesn't.
Creating a variable is cheap.
 
11:02 AM
Ok thank you
 
@jemz It will work. Did you consider using for(var datum in data) {?
 
Or if it's an array, data.forEach(function (datum) { ... })
 
yes it works, I just ask if it is a good practice to put var inside the forloop
 
@jemz Again, depends.
If it's something that changes every iteration, yes, it's fine.
For example
for (var i = 0; i < data.length; i++) {
    var datum = data[i]; // That's OK
    ...
}
In your case, it looks like id will be set to the same thing over and over, which is pointless.
 
@SecondRikudo, Thank you I understand what you mean.
 
11:15 AM
Hello @BenjaminGruenbaum !!

I am asked to state the two versions of the Knapsack problem and their differences. Could I formulate it as followed??

The Knapsack problem is the following:

There are $n$ items, where the ith item has a benefit of $v_i$ and it has weight $w_i$. We want to pick some items so that we maximize the total benefit while keeping the total weight of $W$.

The difference between the integer and the fractional version of the Knapsack problem is the following:

At the integer version we want to pick each item either fully or we don't pick it. At the fractional version w
 
One last question. Let's say that my promise returns user. How can I run user.authenticate? For example return user.create().then(this.authenticate) or something like this.
 
11:38 AM
Okay, I'll use spread and a workaround.
 
@GabrielTomitsuka Hmmm
Currently, function(user) { return user.authenticate(); }
With ES6: user.create().then(user => user.authenticate())
 
@SecondRikudo Yep, that's what I'm doing now.
@SecondRikudo Meh, I'm using Node v0.12.1. Does it work on v0.12.1?
 
Don't think it does on node yet.
Although you should look into babel
 
11:58 AM
!!urban ttyl
 
@towc ttyl talk to you later
 
@SecondRikudo lol
 
@BenjaminGruenbaum XD
 
> If you implement browser prefix properties you should always include the non prefix version, it's common sense, all browsers at some point drop the prefix, it's happened so many times people should know better, this is nothing new or strange, it's common practice.
 
The bible quotes and his name killed me XD
 
11:59 AM
This is right though
 
it may have been the first time someone "ttyl"ed me
 
@BenjaminGruenbaum Yeah
Browser prefixed functions exist for the sole purpose of not soiling standard names with incomplete implementation
 
> Appreciate your thinking and comments. Nonetheless, millions of web pages have lost the box shadows and opacity effects in one fell swoop.
 
Quietly okay with a bunch of sites losing drop shadows and opacity.
 
truly tragic
 
12:00 PM
The whole point of it is being removed once it's completed.
 
It's just so dramatic
 
@phenomnomnominal NOT ENOUGH BEVEL AND EMBOSS! NEEDS MOAR BEVEL AND EMBOSS!!!
 
> Certainly my thinking represents a myriad of small time web page builders that never imagined their handwritten - image by image, table by table code, would be suddenly rendered obsolete.
I'm laughing out loud
 
OMG WONT SOMEONE THINK OF THE BOX SHADOWS
 
> The end result is the same - the effects are GONE and it represents an aggregate loss of hundreds of hours of work (in our case and OTHERS), that needn't have happened.
 
12:01 PM
> never imagined their handwritten - image by image, table by table code,
XD
 
@SecondRikudo ...wurt
 
I'm surprised no one pulled the "This is not Java" argument on him
 
is that some april fools joke?
 
@AwalGarg If it was it was very belated
 
xD
 
12:03 PM
> HONESTLY, it's just plain senseless destruction of a set of attractive visual effects that should be ALLOWED to be seen....
 
@BenjaminGruenbaum what an amazing restraint the people there showed. If he'd shown up here and started with that, he'd be trolled to no end pretty quickly.
 
where did you get this @SecondRikudo this is priceless
 
why digging up a 3 years old retarded bug report ? for the laugh
 
sunday should last atleast 48 hours :D
 
@BenjaminGruenbaum @BoltClock posted this in the HTML room XD
 
12:04 PM
pin it :D
 
We talked about it in the meeting, stars is enough :)
Speaking of which, no reason for the room meeting conclusions to still be pinned.
 
@BenjaminGruenbaum *are :p
nice bug report
 
are, yeah. I'm coding and shit :D
 
Actually "stars is enough" could be correct there
Because he's referring to the action of placing stars
 
*starring
 
12:11 PM
@AwalGarg Yeah, stars is still okay there
 
no. I am right. kthnxbye :P
 
nope, can't admit that.
 
hmm, why did that ping me?
 
Because magic
 
Hahaha
 
12:18 PM
haha nice
 
I think everything pings him
 
lol
 
reading numpy code is really frustrating
 
...FINE!
you know I can mute pings :p
 
@BenjaminGruenbaum You're porting it to JS, right?
 
12:20 PM
Yeah
 
@AwalGarg Don't do it!
 
Is the code not well-written?
 
wtf is wrong with people against github :(
 
Who's against Github?
@BenjaminGruenbaum Have you used CrowdFlower.com?
 
China apparently
 
12:23 PM
some chinese people, they are ddosing github like hell.
 
It's more the state than the people I think
 
@BenjaminGruenbaum It seems like I have access to that because of the Github Student pack and it seems potentially useful for ML work
 
GitHub didn't want to censor some stuff China didn't like, China blocked github but that hurt chinese devs so much they had to open up again, and now they're DDoSing to try to force GitHub to censor a repo, at least that's how it looks to me
 
it is really stupid and shameful
 
Ugh, it's 1.30 and I can tell I'm not writing good code but I need to get this done.
 
12:26 PM
@SomeGuy no, sorry.
 
Oh, it's not like I need help with that or anything
 
@SomeGuy the mechanical turk (amazon) is super cheap and useful - the problem is that for TipRanks's domain not just anyone can tag documents
 
Oh, right, you guys probably need someone with a little more knowledge than the average Joe
 
i compare the chinese government as a spoiled kid
 
You need to be a stock market investor to know the terminology - our people in QA doing that are pretty smart. For example the guy dealing with mis-tags has a BSc in Physics from a really good place and stock market experience.
 
12:27 PM
@AwalGarg China sucks.
 
yeah all their population is weaponized
 
Our QA isn't "programmers--" it's just different.
 
what are they ? :D
 
haha programmers-- :D
fun fact: I only got to know what QA means last week when I wrote my second test :P
 
@BenjaminGruenbaum Hahaha
 
12:35 PM
 
I forgot how relaxing writing rainbow art was codepen.io/MateiGCopot/pen/MYxrEo
 
uhm ... jQuery is less relevant nowadays
 
lol
 
12:50 PM
@GabrielTomitsuka HOW DO I INSTALLL!!!
 
@AwalGarg <script src="https://raw.githubusercontent.com/cbrandolino/jQuery-basic-arithmetic-plugi‌​n/master/jquery.basic_arithmetics.min.js" /> hehe
 
but it is saing $ not defines/?
 
> I found myself with a number in my variable, wanting to add it to another number.
^ man... must have been awful, the terror, the tears :((
 
@BenjaminGruenbaum ROFL
 
12:54 PM
@BenjaminGruenbaum xD
 
> The power is real. Also the performance much greater than potato - github.com/cbrandolino/jQuery-basic-arithmetic-plugin/issues/3
rolf
 

« first day (1625 days earlier)      last day (3314 days later) »