« first day (1501 days earlier)      last day (3454 days later) » 

12:22 AM
@AwalGarg I had my maggi
 
12:46 AM
^ Guess who room :D
 
user2620028
you?
2
 
user2620028
Your girlfriend?
 
user2620028
1:06 AM
Whomever she is, she is very beautiful
 
Reverse searched it
looks like its Lady Gaga
 
user2620028
1:40 AM
seriously?
 
user2620028
dafuq she was ever attractive?!
 
@darkyen00 Why were you up at such peculiar times?
 
2:16 AM
Pat Quinn died yesterday :(
 
user2620028
Pat Quinn died yesterday?! are you serious???
 
user2620028
@Kendall Oh i thought you meant the governor of illinois O.o
 
Never even heard of the guy
 
user2620028
he is the first illinois governor i could name for a long time that has not served a prison sentence :P
 
2:28 AM
murica
 
user2620028
but i think there are charges pressed against him lol
 
@KendallFrey You mean "Chicago".
 
user2620028
lol - actually springfield
 
Springfield is the capital, but Chicago is the real power in the state.
(I grew up in Illinois)
 
 
2 hours later…
4:34 AM
!!> ....
 
@underscore "SyntaxError: syntax error"
@underscore "SyntaxError: missing ; before statement"
 
!!> 1 == 1
 
@underscore true
 
!!> 1 === '1'
 
@underscore false
 
4:36 AM
!!> 1 === parseInt('1', 10)
 
@underscore true
 
4:51 AM
@underscore If you're going to mess around with the bot, do it in the sandbox room.
If you just want to evaluate code... you've got a console for that.
 
Folks, I have a personal project, which I'm using as an excuse to dabble in web dev. I'm not new to programming per se, though. I write a lot of low level C code.
One of the questions that I have is whether to learn/investigate jQuery, or to invest more into learning the standard-issue JavaScript. This is only for a personal project, so there is no legacy code and no external pressure.
 
First you learn Javascript then go for jQuery. Since you have no pressure
I'm not saying that you can't learn jquery without JS, but ultimately to understand events and delegation and bla bla you have to come back to JS
 
@argentum47 Are there major web sites (the size of Amazon, Microsoft, you get the idea) that use jQuery?
 
yeah
most of them use it.
 
jQuery is definitely a solid tool, and will almost certainly speed up your ability to get a project running
 
4:57 AM
@argentum47 afaik, jQuery is not a part of StackExchange's stack
 
The downside is many people only ever learn jQuery, and therefore have a hard time understanding where jQuery ends and where Javascript begins
 
@Retsam In my cursory understanding, jQuery is syntactic sugar on top of JavaScript. Not that it makes it less useful.
 
I am not a fan of jQuery either. It was built to be a library for easy dom manipulation cross-browser I guess, and then they started merging things into one function. Example deprication of live and putting everything in .on
 
@NickAlexeev That's part of it, but it's more than that; there's a lot of things that jQuery does thats somewhat hard to do in vanilla JS.
I think jQuery gets more hatred than it deserves, probably; it's not a bad tool at all, but 1) it tends to be associated with mediocre programmers, just because it's so accessible, and 2) it can really be overkill in a lot of cases.
 
Was jQuery originally intended as an abstraction layer to even-out differences between browsers? Back in the browser wars days.
 
5:02 AM
@NickAlexeev Partially. Though I've always thought the "query" bit was the main point.
 
some-what, because IE has ways of doing things differently. attachEvent instead of addEventListener to start
 
The ability to use CSS selectors to find arbitrary DOM elements is huge; (and it's now possible in Vanilla JS, mostly, but wasn't for quite awhile)
 
@Retsam JavaScript has (or had, past tense) a stigma of mediocre programmers attached to it. (As does Visual Basic.)
 
@NickAlexeev Well, yes. But we have to feel superior to someone, don't we?
Other developers look down on JS devs, JS devs look down on jQuery devs... the great circle of condescension.
 
@Retsam As long as a code writer swears on Code Complete 2 that he will not cut corners, and realizes that sociopath maniacs will be reading his code, we'll be fine, and there will be no need for condescension.
 
5:18 AM
After working for 10-11 hours how do ya ppl comeback home and learn something new like Scala or Clojure
 
'morning
 
5:48 AM
morning guys
anybody familiar with Emscripten here? Where am I suppose to fire the commands mentioned here? Which directory? kripken.github.io/emscripten-site/docs/compiling/…
 
6:22 AM
0
Q: Error while building sample C/C++ project using Emscripten

Rahul DesaiI am following the instructions provided here. I got an error while compiling the smaple project "bullet" that comes with Emscripten. Here is the log: Initially I fired the command emconfigure configure inside the sample project but I got an error: C:\Program Files\Emscripten\emscripten\1.25.0...

 
why you do this!
 
?
Sorry I am new to this. I followed the steps mentioned in the documentation.
 
I don't even know it. I was asking the use case
shouldn't C:\Program Files\Emscripten\emscripten\1.25.0\\emconfigure" be C:\Program Files\Emscripten\emscripten\1.25.0\emconfigure"
no
nevermind
 
WindowsError: [Error 2] The system cannot find the file specified there must be some files missing.
 
6:34 AM
the file is there, I checked it
 
then the path may be wrong
 
the path seems correct to me
I also tried
C:\Program Files\Emscripten\emscripten\1.25.0>emconfigure tests\zlib\configure
same error
I could see the files emconfigure and configure in the places that they should be
 
./test/bullet or test\bullet ?
 
test\bullet
its Windows 7 that I am using
 
works?
 
6:46 AM
nop
 
where is the link which you followed, I mostly see in the docs ./emcc a.bc b.bc -o project.js or python ...py
 
under "Integrating with a build system"
 
why do they start with ./emconfigure
 
no idea bro
they are using ./ because they are assuming it to be Linux platform
 
7:01 AM
doesn't tests/bullet have .configure file!
 
it has configure file, not .configure
 
emconfigure tests\bullet\configure
wait let me check if there is an IRC channel
 
IRC channel?
 
wait I need to install java for that chat to work
 
7:09 AM
ew
@RahulDesai if you have a irc client add this server sand.mozilla.org and /join #emscripten
irc.lc/mozilla/emscripten/t4nk@@@ check this link, might work without java
 
ok
that link is loading
I am in now
 
the room seems very empty
ah, ok.. I see you
 
anyone here messed with
array of arrays
[ [ 'Grocery', 'grocery' ],
  [ 'Drugstores', 'drugstores' ],
  [ 'Discount Store', 'discountstore' ] ]
How do I grab the lowercase values from here, so like the second value of every array within the array
 
a[0][1], a[1][1], a[2][1] to start with
 
@tejas-manohar myArray.forEach(smallArray){ console.log(smallArray[1]); }
 
7:21 AM
@Rahu Desai isn't foreach really inefficient ?
 
^ this will work for no matter how many smallArrays you have in your code
 
better to do something w/ for() and .length?
 
@tejas-manohar its not in this case I believe
 
efficiency kinda matters for me
 
write and check in jspref
 
7:22 AM
oh
 
yeah, do that
 
morning all
 
oh ok
 
i use a "prompt" on click event to get an object name
 
@argentum47 nobody is listening there :/
 
7:24 AM
is there any reason why it could call itself automatically? (something like click on the prompt = click on the caller)
 
I see it. some rooms are so inactive :(
 
lol
data['categories'].forEach(arr) {
  categories.push(arr[1]);
}
why am i getting
Unexpected token {
for that .forEach(arr) {
wtffffff
/Volumes/Storage/Repos/Authored/domain-to-category-cli/lib/yelp.js:32
data['categories'].forEach(arr) {
^
SyntaxError: Unexpected token {
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at requireDir (/Volumes/Storage/Repos/Authored/domain-to-category-cli/node_modules/require-dir/index.js:112:33)
at Object.<anonymous> (/Volumes/Storage/Repos/Authored/domain-to-category-cli/index.js:8:11)
well the indenting on the ^ didnt work
 
grrrr... don't paste long lines of junk in the chat
 
tl;dr
 
7:26 AM
A memory leak is visible only when continuing to run the program over long periods of time causes steadily rising memory usage. An initially high memory usage does not mean it is leaking. You have to see the memory usage continue to go up and up and up over time to know you have a leak. — jfriend00 1 hour ago
 
@pikini 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.
 
You doing in wrong
 
What?
 
forEach(function(arr) { })
 
0
Q: Memory leak in a simple api web service in nodeJS

pikinivar url = require('url'); var http = require('http'); var downloader = require("./downloader"); http.createServer(onRequest).listen(8080); function onRequest(request,response) { if(request.method=='POST') handlePost(request,response); else handle...

 
7:27 AM
forEach expects a callback function
 
I dont remember the exact syntax
google it
 
data['categories'].forEach(function(arr) {
          categories.push(arr[1]);
        })
 
o ok
np
got it
 
why is that emscripten so fuc*ed up?
 
maybe because its c++
 
7:31 AM
I was able to convert a single C file
but the instructions provided for building projects are not clear
 
@tejas-manohar you could use a map if you want to make a new array out of it
catagories = data['catagories'].map(function(arr) { return arr[1] })
 
@argentum47 what does IRC stand for?
 
Internet Relay Chat I guess. its a protocol like http, ftp,
 
I see
 
you can write irc://irc.freenode.net , in firefox that would fireup your irc client
 
7:36 AM
ok
 
what was the website that cited specification for different things like email smtp etc.
 
hey would someone sanity check me
those two files
patelbros.com,nolensville,tn
walmart.com,nashville,tn
peiwei.com,brentwood,tn
rainalbany.com,albany,ny
kasaindian.com,san francisco,ca
that CSV
this result - pastebin.com/6fN4ZVHe
the result implies data.businesses[0] was found for term 'patel' and 'raina' instead of 'patelbros' and 'rainalbany' respectively
but their categories are never listed?
anyone know the reason for this?
 
I am sitting on a chair listening to people say "A spambot is something that stops a spam"
 
lolololol
 
shoot me, on the face
 
7:49 AM
@argentum47 read my code, might do that :P
 
im damn lost, that is so simple whats going on
that lookup function makes me think
"In order to understand recursion, one must first understand recursion"
 
no you have to find the repeating step.
 
Suppose you have an ajax call setup, and you want to make two calls, each with different post data. Could you make those two calls simultaneously without having to write the code for the ajax call twice?
 
7:51 AM
morning :-)
 
@argentum47 wait did you actually find issue w/ my code?
 
@MarekPavelek 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.
 
no no, I am looking if I can understand it, I suck at reading codes
 
o ok
np
@Rahul Desai ideas? you really helped last time :)
@argentum47 if its really hard to understand via just pastes, i can send you a zip of project?
prob not woth the work on ur part lol
 
nopes.
 
7:55 AM
nopes to which?
sending zip?
or not too much work?
 
yeah
nopes: sending zip
 
Is it possible to make same ajax call twice with different post data without having to write all the code for the ajax call twice?
 
yes
 
wrap it into the method mate
 
can you give an example?
 
7:57 AM
is JavaScript demanded in your country? What JS framework companies wants? AngularJS? Knockout? ...
 
we are democratic.
 
function postSth(postData){
  return $.ajax(...)
}
 
ok
im lost
 
Would this also work:

var postdata = ["post data 1", "post data 2"];
var i = 0;

while (i < 2) {
// execute code with postdata[i]
i++;
}
 
Learn a for loop, dude
 
8:02 AM
how would you manage "cross browser" addeventlistener?
Something like :
if(element.addEventListener){
    element.addEventListener("click",function(){});
}else{
    element.attachEvent("click",function(){});
}

or is it some other "better" way to do this?
 
or use Array#forEach
 
yea for loop is better
 
@Julo0sS jQuery ;-)
 
but it will work :)
 
i know how to use a for loop, i just prefer while loops
 
8:02 AM
@ray9209 ... why?
 
@JanDvorak and without jquery...?
^^
 
@Julo0sS actually, that's exactly why you would want to use jQuery
 
@Julo0sS ... then use that. It's attachEvent("onclick", ...) though
 
they're simpler, easier to read/maintain; and I don't think there's any performance differences between either one
 
@ray9209 There most definitely are performance differences.
 
8:04 AM
@SecondRikudo well, i could declare my own function "addListnr" and write this code into it... no real "need" to include jquery...
 
when exactly is a chat.so.com/mssages/ack fired.
 
"simpler" ... maaybe to master. But that's only because there's nothing to master. "easier to read" ... no.
 
jQuery's events are a wrapper around native events, they can't have the same performance.
 
@SecondRikudo who cares about 1 ms?
 
@JanDvorak mousemove does.
 
8:05 AM
@SecondRikudo what do you mean? jQuery is faster with events than js native events?
 
@Julo0sS No, but jQuery is better with cross-browser events.
 
i'm ok with you on that
 
@SecondRikudo for loops execute faster when looping through an array?
 
And it's likely that if you need cross browser events, you also need cross browser other stuff
 
@SecondRikudo then you better write efficient code. JQuery isn't that slow.
 
8:06 AM
@JanDvorak I never said it was
 
@JanDvorak every ms counts :)
 
I just said that performance isn't the same.
And it depends on what you write.
 
@ray9209 actually... false
 
@JanDvorak 1ms makes a lot of difference when you need something to be 60FPS
It's over 6% of processing time you throw away
 
i need it to be as efficient as possible, that's why i try to avoid including libraries such as jq...
 
8:07 AM
@SecondRikudo jQuery doesn't have nearly that overhead, though
 
@JanDvorak I don't know, and I didn't do the benchmarking.
 
honeypot
 
I'm merely saying that it's not the same.
 
@Julo0sS premature optimisation is the root of all evil
 
@Julo0sS what kinds of browsers do you need to support?
 
8:08 AM
@JanDvorak what u mean by premature optimisation?
@SecondRikudo opera, ff, ie8+, chrome, and safari
 
@Julo0sS Thinking about how everything should be the fastest possible before it's even working.
 
@Julo0sS spending 15 minutes of research to save 1 ms will pay off in... 900 000 calls
@Julo0sS IE8 supports addEventListener
 
@SecondRikudo everything's working, that's why i'm tryin to make it work faster & cross browser now
@JanDvorak no it doesnt
@JanDvorak 9
does
 
@Julo0sS With that browser stack, the function you posted above is fine, no jQuery required.
 
@Julo0sS then I don't support IE8
 
8:10 AM
Also that ^
 
@JanDvorak x)
@SecondRikudo i know but what u do then when you know that the final users may be working on a "dinosaur" computer...?
 
if (UA == "Internet Explorer") {
exec "Uninstall Internet Explorer"
}
 
@Julo0sS You use jQuery...
 
this is the problem in my case, otherwise i would have worked with jquery from the beginning
 
Because that's exactly what jQuery does well
 
8:11 AM
900 000 calls = 4 hours of animation at 60 FPS
 
@JanDvorak xD
 
@Julo0sS go with jQuery
 
Only much later down the road, after it's being used, you can start analyzing and understanding where your performance bottlenecks are.
 
everything i need is now done with 100% js and no jquery,
I will first finish it this way, and THEN i'll re-write the code with jquery
too late to go back now
 
8:12 AM
@Julo0sS then you'll be wasting time twicce
 
thrice
 
What I usually do with a DOM heavy application is make a separate object for DOM manipulation, that uses jQuery
And then when I need to change the way I do DOM manipulation, I change that object, and I'm done :)
 
cool @SecondRikudo
 
An abstraction layer between you and jQuery
 
8:14 AM
@SecondRikudo here my objects are all defined without jq... that won't be such a hard job to translate it from js->jq
 
@Julo0sS It will if you have to do it in more than one place.
 
@SecondRikudo u have an example?
@SecondRikudo i don't
 
Also, you know, just because you include jQuery in one place, doesn't mean you have to use it all over the place
@Julo0sS Let me whip something up.
 
@SecondRikudo i use it everywhere on the "website application", but i do not use it on THAT particular page which is the "cross-browser" problem ;) (that may sound stupid heh^^)
 
can I learn clojure or scala , for just a change.
 
8:18 AM
sure
 
I can't decide which one will be profitable, from a business point of view, like employ-ability for instance. After working 10-11 hours a day, I can squeeze in 1 or 2 hours more
 
function DomManipulator() {}

DomManipulator.prototype.querySelector = function(selector) {
    return $(selector);
};

DomManipulator.prototype.addClass = function(element, class) {
    element.addClass(class);
}

// .......


var d = new DomManipulator();
var input = d.querySelector('input');
d.addClass(input, 'active');
This is a small scale example
(It's also badly written because I did it on the fly)
Later, if you want to get rid of jQuery, you only need to change DomManipulator
This is most effective in apps that have a crapload of DOM manipulation
 
Or you could just replace $ with your own definition of $ that does lookup through jQuery object
It is a little demented, but it would be a way to check if replacing jQuery with dom lookup would cause damage with minimum change to the code
 
8:33 AM
@Neil That would cause unexpected behavior for other people on your team, or future developers.
If you do that, please consider making an object of your own.
 
@SecondRikudo thx for example ;)
 
@SecondRikudo It's not the type of thing you would change and leave half-changed
I thought that was clear
 
@Neil It's exactly the type of thing that would get changed and left half-changed.
 
@SecondRikudo Only if you would do so. I wouldn't
 
@Neil It's the kind of thing that would end up as a hack that other people rely on.
 
8:46 AM
@SecondRikudo Only if you commit the change
If I did that kind of thing, I would do so to prove it works. If it did, before committing anything, I would formalize the change, and use your DomManipulator or something to that effect
Don't know if I would use directly document.querySelectorAll, because in case there were problems, would be nice to quickly fall back to jQuery
Programmers can't make use of what they don't have
 
haha funny.. placecage.com
 
documentcloud.github.io/underscore/docs/… what happens if I don't pass the context ?
 
@argentum47 Try
 
0
Q: x editable with nestable tree

Dhanush Balaiam using this xeditable http://vitalets.github.io/x-editable/ using this nestable http://dbushell.github.io/Nestable/ my nestable code is , <div class="dssd" id="nestables" style="width:100%"> <?php Yii::app()->globals->fnsselTree(0,isset($gxed)?$gxed:array()); ?> </div> my xeditable html...

 
@darkyen00 nice
@darkyen00 ...non-veg? :(
@darkyen00 o_O Who's she?
 
9:28 AM
@rlemon I solved the problem with the answer written here: stackoverflow.com/questions/27111414/…
 
@steo rlemon is afk: home time! @Loktar link me the audio when I get home
 
@CapricaSix Ye, I saw the message from yesterday and posted a reply otherwise I'll forget to :)
 
@AwalGarg haaaiii
 
Hi guys I need to know is it possible to know whether a file(say word) is open before uploading it using ajax
 
9:34 AM
@argentum47 hi bro!
@SomeGuy kk
 
I see a lot of Indian looking guys at SO chat. feels cool
 
So I used Windows 8 first time, ewwwww.... just ew! I "wish" 8.1 be better.
 
:D
what windows metro sexual looks offers was brought by ubuntu years back. Only the Flat UI looks a little good.
 
So much crazy-ism in that OS...
 
Hi guys I need to know is it possible to know whether a file(say word) is open before uploading it using ajax in js
 
9:37 AM
Hey guys. I need a way to put certain pieces of a string in an array and place them next to the ones they were next to at the start. If you paste the big part at the top in the textarea then you'll notice the '5A 5B' etc. being apart from the area's they should be next to.

I know they're in the hold variable but i'm not sure how to make them appear specifically next to their right area(Like they are next to the right one in the paste)
http://jsfiddle.net/b9jfbbs5/3/
 
@argentum47 metro.. heh, you tell me yourself how much time do you spend staring at those metro tiles? We use applications, and that is all we care about. Navigation, accessibility is what should be made better, not cool looking flying tiles.
And anyways, they are not even "cool" looking.
They get super boring in 2 minutes.
 
@user1386579 no
 
I guess the way I can do this is to check for all the str+int's with indexOf?
@JanDvorak Could you perhaps push me into the right direction like you did with a different issue yesterday? :P
 
body-checks David
 
Which function would I require to do so? I was thinking of RegExp maybe?
Then when being sure it's a word character+int I could push it into an array
 
9:48 AM
Better keep a single array of all stuff and never separate
 
hold on what?
 
So in that case I have it already, which is the 'hold' variable in my fiddle?
 
yep
 
Then how would I make sure the text would appear next to the right area? I'd say strip it but how would it know where the Id's should show up at?
In the paste it's always '5A' and then '<...' then ends with '...>' and '5B' again
 
@rlemon Wow. That's incredibly brutal
 
9:53 AM
@SomeGuy rlemon is afk: home time! @Loktar link me the audio when I get home
 
@rlemon That's true! I love Wikipedia!
 
@SomeGuy Typical Indian (female) student.
 
@JanDvorak I guess i've stripped it correctly by using .text() although now i'm stuck with appointing them to the right area, any ideas?
 

« first day (1501 days earlier)      last day (3454 days later) »