« first day (1627 days earlier)      last day (3549 days later) » 

19:00
suggestions on what aspect of it?
google.com/… god dammit google
user1596138
@SterlingArcher What
user1596138
Seems right to me
@NickDugger One of the main aspects why i am considering meteor is for real time functionality
They're all about .equals lol
not what im looking for haha
user1596138
19:03
Oh you wanna check the name lol
user1596138
Well stop and think about that for a minute... What's the use case?
I have a function with many variables, and another copy in spanish. It's a function to return the proper mp3 based on variable name
looking into hashmaps
user1648409
Hey guys, is there any way in JavaScript to tell where the mouse currently is in a certain HTML Element? Like event.clienX / event.clientY for a mouseclick but not on the whole window, but on a certain html element - for example a div. Thanks :)
yes
layerX, layerY
19:09
he didn't ask which they were, stop giving away the milk
I wasn't answering his question
I jsut had a twitch
and my twitching hands hit the keyboard
user1648409
layerX, layerY?
user1648409
ok, thanks :O will try
@Shiuyin probably read the docs on it first
var mouseX = event.clientX - element.<if only there was a way to get the offset left of the element>
user1648409
19:13
thanks a lot you both
user1648409
that was exactly what i was looking for
user1648409
does work perfectly
which did you go with?
check browser support
layerX/Y is non-standard and is not on a standards track
user1648409
19:15
well its supported by chrome, safari, ie9+ and ff
user1648409
which is enough for us
user1596138
lol
user1596138
> Who cares if it keeps working it'll do right now
whats the best javascript framework (like angularjs, reactjs, ...? )
user1596138
v8
19:17
Yeah, V8
I like that answer
user1648409
@rlemon: Also there is no other way as far as i know to use the functionality of layerX by combining other stuff
@Jhawins was that an answer to my question? Because that's not what I'm looking for tbh
user1648409
offsetLeft etc will just count to ONE elem to the left
user1596138
@MarcelBurkhard Well... Your question isn't real lol.
user1596138
It's not like they all do the same thing
19:18
@Jhawins it is, primarly opinion based yes, but a question
@Shiuyin You have much to learn, padawan
user1596138
@Marcel what are the parameters for my to form an opinion based on?
user1648409
i am not anywhere near good in terms of javascript
var x = el.offsetX - el.offsetLeft
user1596138
Do you want the best framework for... Working with times?
19:19
@Jhawins personal experience
user1596138
The best for animations? Maybe the best for MVC?
user1648409
@Nick Dugger: That would just give the width of the both offsets from element to it's parent?
user1648409
its not equal to layerX
That depends on its CSS position
user1596138
19:20
17
Q: What substitute should we use for layerX/layerY since they are deprecated in webkit?

Nicolas BADIAIn chrome canary, layerX and layerY are deprecated, but what should we use instead ? I've find offsetX but it doesn't work with Firefox. So to get layerX without warning on webkit, I've done that : var x = evt.offsetX || evt.layerX, y = evt.offsetY || evt.layerY; But this seem quite compl...

user1596138
Just google it
@MarcelBurkhard the best framework is the one that makes your productive. you have to evaluate what makes each better yourself.
my productive what?
egheghheuhuehuehue
@rlemon exactly, and which one makes you productive?
All of them at once
19:22
tbh I don't want to evaluate js frameworks deeply, I'd rather spend that time on the server side of things
but..
I keep getting something weird happening with moment
moment().add({ weeks: 8 }).format('LLLL');
"Tuesday, May 26, 2015 3:23 PM"
tbh the different frameworks offer completely different things and solve different problems.
no one is going to know which solves the problems you face
user1648409
thanks guys :9
if I only need css, purecss.io. if I needed data binding for like a dashboard, maybe angular or something. If I need a quick single page popped off bootstrap. If I need... you see where this is going
19:25
aurelia.io
either you better define your question, or you concede that 'the best framework' relies on a lot of other things which you have not yet specified and therefore we have no answers.
jquery
hmmm tough
ideally it would be testable, fast, allow for seperation of concerns, etc.
It would need to consume I suppose a REST api
basically I want to write maintainable code
RYO is a good one
never heard of and google neither it seems
19:29
roll your own
yeah right
why not?
is there at least some sort of components I could use?
because I don't have the time
Aint nobody got time for that
just pick one and regret it later
I'm "rolling my own" php framework already
19:31
angular, knockout, ember, aurelia, poop
ew, php
meteor is another one
I think
I don;t use frameworks
anybody here have experience publishing npm modules?
@NickDugger what kind of applications you build?
@MarcelBurkhard any kind. The most recent was houston.thegreensheet.com
launched it yesterday
still bug fixing today
I already used plain javascript and jquery to get my stuff done, and my code sucked and was a mess in the end.
@NickDugger thx for sharing, looking into it right now
Messy code has only the author to blame. Using a framework won't magically fix your coding practices
19:35
@Sean whats your question?
I've published one a few others here have as well
in fact @FlorianMargaine is an npm contributor
@Loktar Oh neat. My question is about the formatting of the actual NPM page. I noticed it scrapes the markdown from the linked github, but it doesn't render it the same way.
So I'm left with a situation where it looks good on github, but looks broken on the npm page. And I don't see a way to actually edit it.
So I guess the actual question is, can you edit the npm page description? Or have any other way of rectifying markdown rendering issues between github and npm?
@NickDugger did I blame anyone else? Thing is while I found the right way to program clean maintainable code server side, I still struggle with the client side (or the communication of those two)
@NickDugger do you have unit tests for your stuff? Continous Integration?
Nope, I work for an archaic company that's afraid of doing things the right way
I write cutting edge spaghetti code.
I even named my new version 'edge' because it sounds cooler
yeah thats what we do
19:43
I eat spaghetti
trying to get away from that
you can write spaghetti code just as easily with a framework
source: I'm using a framework and my code is still shit
I'm not using a framework and my code is like half shit, half yogurt
which whould still make me more efficient at writing shit code
I can't tell you how comforting it is to hear other people talking about the gross is they sometimes write.
19:50
My code always starts out clean, but deadlines kill everything
"use strict"
my code always starts out clean
once I start adding lines it get messy
like, right now I'm fucked. I have two modules that both need to share a scoped variable. it is passed into the one module on init but not the other, and the other is initialized outside of the first ones scope. I've code-blocked myself and now need to refactor both to make it work
my javascript code never starts out clean
because I hate javascript and want to get it over with from the get go ;D
don't do that then
embrace the JS
love it
he writes php
19:54
usually there is some old-ass jquery version floating around from something like thickbox or lightbox (jquery 1.7.2) and I just use that, attach some event listener to something etc ;D
@NickDugger not just php but yes, php
well, using a framework isn't going to make you like js any more (probably)
user1596138
@MarcelBurkhard the best framework for you is jQuery.
user1596138
jQuery if you just don't care
ditch php, pick up bootstrap + express and do everything in js
user1596138
As you go just keep adding frameworks whenever you want a functionality. Why not
19:56
@rlemon I'd rather kill myself
Is performance gained from minifying JS measurable?
@StevensHaen you can reduce files by 80% soemtimes
user1596138
@StevensHaen Depends how big the file was
@StevensHaen only with slow internet connection, the "execution" isn't speed up
@MarcelBurkhard This is the exact reason I'm asking
19:57
@StevensHaen short answer: yes
minify and concatenate your js files
and css files
it is for the greater good
Minify at least, right? Is concatenating going to go out of style with SPDY?
@StevensHaen just do it, the performance gain is measurable
@Retsam yea, but that hasn't landed yet
@rlemon min. CSS isn't measurable. It shaves off up to 25%, but when you gzip it it translates in only 5-10 KB, no point
@StevensHaen btw in chrome you can simulate a slow internet connection
19:58
and if you are doing this with a build tool then removing the concatenation shouldn't be an issue.
@MarcelBurkhard By downloading IE?
@Retsam :)
@StevensHaen if it is an automated task, 5-10kb is a no brainer
it is automated
so just do it
@Retsam nope, hit f12, hit the Icon that looks like a mobile device and look at the top where you see a blue-ish dropdown "Network"
@MarcelBurkhard definitely works
20:02
btw I'll try react.js
user1596138
@MarcelBurkhard React is cool
based on the concept of components with strong emphasis on seperation of concern
sounds good...
cya
What's the difference between separation of concern and encapsulation?
look it up I gtg
user1596138
@StevensHaen the man needs to work lol let him go
20:04
@Jhawins no way
user1596138
He has a lot to learn no distracting
What a charming individual.
How does specifying the character set improve page performance?
user1596138
@StevensHaen is that your real API key on your stripe question
user1596138
Oh no seems client safe from documentation nvm
user1596138
20:15
!!stat StevensHaen
@Jhawins User Elusio proved elusive.
@Jhawins Stevens Haen (http://stackoverflow.com/users/4608977/stevens-haen) has 26 reputation, earned 0 rep today, asked 6 questions, gave 0 answers, for a q:a ratio of TO͇̹̺ͅƝ̴ȳ̳ TH̘Ë͖́̉ ͠P̯͍̭O̚​N̐Y̡.
avg. rep/post: 4.33. Badges: 0g 0s 8b
@Jhawins This key was rolled some long time ago
Is TO͇̹̺ͅƝ̴ȳ̳ TH̘Ë͖́̉ ͠P̯͍̭O̚​N̐Y̡. how the stats report divide by zero errors?
20:20
@SterlingArcher That dude sucks
!!stats
@rlemon You (http://stackoverflow.com/users/829835/rlemon) have 10175 reputation, earned 0 rep today, asked 71 questions, gave 372 answers, for a q:a ratio of 71:372.
avg. rep/post: 22.96. Badges: 5g 43s 81b
user1596138
20:21
@rlemon lol your stupid trailing s
user1596138
Always man
user1596138
!!stat SterlingArcher
@Jhawins Sterling Archer (http://stackoverflow.com/users/774078/sterling-archer) has 9105 reputation, earned 5 rep today, asked 89 questions, gave 410 answers, for a q:a ratio of 89:410.
avg. rep/post: 18.24. Badges: 3g 21s 53b
!!stat
@Retsam You (http://stackoverflow.com/users/79247/retsam) have 1529 reputation, earned 0 rep today, asked 31 questions, gave 68 answers, for a q:a ratio of 31:68.
avg. rep/post: 15.44. Badges: 0g 13s 26b
user1596138
20:22
!!stat
@Jhawins You (http://stackoverflow.com/users/1596138/jhawins) have 1401 reputation, earned 0 rep today, asked 8 questions, gave 28 answers, for a q:a ratio of 2:7.
avg. rep/post: 38.91. Badges: 0g 9s 26b
!!stats
user1596138
I suck
@StevensHaen You (http://stackoverflow.com/users/4608977/stevens-haen) have 26 reputation, earned 0 rep today, asked 6 questions, gave 0 answers, for a q:a ratio of TO͇̹̺ͅƝ̴ȳ̳ TH̘Ë͖́̉ ͠P̯͍̭O̚​N̐Y̡.
avg. rep/post: 4.33. Badges: 0g 0s 8b
20:24
@QueueOverflow That dude sucks
@QueueOverflow You (http://stackoverflow.com/users/2668766/queue-overflow) have 35 reputation, earned 0 rep today, asked 14 questions, gave 2 answers, for a q:a ratio of 7:1.
avg. rep/post: 2.18. Badges: 0g 0s 6b
@CapricaSix What dude?
!!stat
@NickDugger You (http://stackoverflow.com/users/1408759/nick-dugger) have 1114 reputation, earned 0 rep today, asked 15 questions, gave 53 answers, for a q:a ratio of 15:53.
avg. rep/post: 16.38. Badges: 0g 5s 20b
20:27
Is Caprica Six a bot?
@rlemon
@QueueOverflow Are you a human?!
@CapricaSix Partly, lol
prove it.
user1648409
Hey again:D One more question: When using ThreeJS for a scene and you want to have several of those scenes on the same HTML page, it obviously doesn't work because things like "renderer", "mouse", "container" etc. all the variables that you need are overwritten each time you create a new init() call. What would be the best solution here? Throw all the needed variables in a class so they are encapsuled and don't overwrite each other?
20:29
@CapricaSix Could you suggest a something, that can prove, that I am human (maybe, partly)?
you've already failed the test
we are classified as meat Popsicles
@CapricaSix How I did this?
!!stat
@CSᵠ You (http://stackoverflow.com/users/731947/cs%e1%b5%a0) have 5587 reputation, earned 80 rep today, asked 5 questions, gave 133 answers, for a q:a ratio of 5:133.
avg. rep/post: 40.48. Badges: 6g 22s 48b
20:30
@QueueOverflow That dude sucks
:sees @Zirak, runs:
!!stat :)
@QueueOverflow User Elusio proved elusive.
> for a q:a ratio of - is pointless/redundant without actual division
@CapricaSix Sorry, but I didn't understand you.
It's okay. try harder?
20:32
!!stat
@CSᵠ You (http://stackoverflow.com/users/731947/cs%e1%b5%a0) have 5587 reputation, earned 80 rep today, asked 5 questions, gave 133 answers, for a q:a ratio of 5:133.
avg. rep/post: 40.48. Badges: 6g 22s 48b
@QueueOverflow You (http://stackoverflow.com/users/2668766/queue-overflow) have 35 reputation, earned 0 rep today, asked 14 questions, gave 2 answers, for a q:a ratio of 7:1.
avg. rep/post: 2.18. Badges: 0g 0s 6b
@CapricaSix Let's try
who's doing this?
20:35
I'm too lazy to bin it all
but can we stop playing with !!stat
or, do so in the sandbox
!!moar_stats!!
@QueueOverflow That didn't make much sense. Use the !!/help command to learn more.
!!ban QueueOverflow
@rlemon QueueOverflow added to mindjail.
20:37
Why? :)
you know why
user1596138
// make repetitive requests and slow shit down but don't go faster than 1 second
setInterval(this.loadNotificationsFromServer, this.props.pollInterval || 1000);
user1596138
At least he was honest
How do I defer parsin of JS for performance reasons?
user1596138
20:40
@CSᵠ It does reduce them.
Hi all, I have a problem with closure in an if statement.
@GSquadron Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
@Jhawins gcd, yeah, but what are the odds both can be reduced
needs a normalizer
user1596138
return Math.ratio( questions, answers );
I have commitment issues
20:45
@GSquadron so move it to the else block
wtf is this Stack Egg
I found out the problem, I was calling it function... and not (function... but it still does not work for me
wtf is taters, eh?
@zirak a game
@GSquadron Go away
user1596138
20:48
@Zirak @rlemon is it just me or is this LOC here from a half complete feature or something? github.com/Zirak/SO-ChatBot/blob/master/source/plugins/…
why does git lie to me
@Jhawins Dude...I dunno
user1596138
I think the following call to Math.ratio is supposed to be using gcd
I've changed a bunch of files.
user1596138
But it isn't
20:48
Looks like I started working on something, fell asleep for a week, then worked on something else and forgot all about the first thing
git add *
git commit -am 'message'
git push
# nothing to commit
@Zirak yeah I don't get it
user1596138
It's from #196
piss off git. I CHANGED THINGS!
@rlemon I tried it (function(p){addEventListener....(i)}; but it doesn't work. Am I calling it right?
user1596138
20:49
It looks like you did it you just forgot that last important part of using it. You even made Math.gcd
@GSquadron I was being sarcastic
your question wasn't really a question
user1596138
Oh wait no Math.ratio calls Math.gcd. So I think it's just forgotten by mistake. Maybe you had a hack around for it before adding it to util.js. Who knows oh well
That is all I can manage to write, or you want all the code?
@rlemon
9 mins ago, by GSquadron
Hi all, I have a problem with closure in an if statement.
you've shown us nothing
ahaahahha ok
user1596138
20:51
Closures don't work in if statements
agagagasgdhdhdfhdhdhdh
user1596138
Durrrrrr
I think it is obvious that closures inside ifs are already inside fors for those who ask :D
@Jhawins sure they do, just not well, or how you would expect them too :P
thought*
20:51
9
Q: Is StackEgg causing me problems, or something else?

Donkey KongEarlier this morning, I was incapable of loading any pages on Stack Overflow due to very, very slow loading speeds. That has since disappeared, however I still cannot vote, ask questions, view Edit queues, fetch comments / comment myself, or answer certain questions. Upon attempting to do most of...

closures work in ifs
what if/... closures are if statements ?!?!?!?
I smell a troll
@CSᵠ I am making the bold assumption that when he says closure he means iife
20:53
!!urban iife
@CSᵠ No definition found for iife
I have a for statement and the real problem is that inside the for I have an if, inside the if I have an addEventHandler which has a function that has to capture click coordinates and compare them with the squares added on the canvas using the i inside the for. Only way I found is to use closure but inside the eventlistener looks like its hard for me, cannot understand it.
@rlemon
user1596138
@GSquadron post. code.
@rlemon that would make a bit of sense, could pass as an italic assumption :D
625
Q: JavaScript closure inside loops – simple practical example

nickfClosures are one of those things that have been discussed a lot on SO, but this situation pops up a lot for me and I'm always left scratching my head. var funcs = {}; for (var i = 0; i < 3; i++) { // let's create 3 functions funcs[i] = function() { // and store them in fu...

user1596138
20:54
Post the problematic code only.
@CapricaSix Hey, you didn't answer on my question. How I should prove that I am human?)
problem is not in the if, but in the loop
That is exactly What I was watchining :P
by not talking to me
watching*
20:55
jsfiddle.net/rlemon/d73o4g2o @GSquadron just moved it here, so it is easier to read
EVERYBODY CLICK [Restart] in the damn easter-bug
@JanDvorak you really should stop smelling people, it's not healthy
user1596138
I think I smell it too now
@rlemon good idea
The problem is that the function(p) returns the p as zero always
20:57
so j is based on i, and we know i doesn't really work in the closure/loop like you want
user1596138
ctx.canvas.addEventListener('click', function c(e) {
    if (x >= menu[j].t && ...) {
        ctx.canvas.removeEventListener('click', c, false);
    }
})
so you've passed i into the closure, but ignored j
user1596138
This is something
ok, so I have to make j = p + 3?
user1596138
I don't believe that reference to "c" is real...
20:57
function c(e)?
that is coordinates of the click
user1596138
No I just thought I would waste some time too..
oi
ahahh
@Jhawins

« first day (1627 days earlier)      last day (3549 days later) »