« first day (1310 days earlier)      last day (3648 days later) » 

7:02 AM
alert("sup");
 
7:25 AM
@CapricaSix, plz see my question
 
@sabbir - You're trying to procure help from a robot ?
 
What happens if I have multiple <script> tags that all try to load the same JavaScript file ?
Does it load it again. Or does it recognize that the script has been loaded?
 
7:41 AM
@Schoening - Depends on your server, if the script is cached as it should be, it would just return a 304 Not Modified
 
Cool. Thanks @adeneo :)
 
@adeneo love your avatar
 
Yes, I'm quite handsome
 
Yes, with that...slender nose.... mmm
 
7:49 AM
Mmm. Like fine wine.
 
@adeneo I love your collections of images of Mr. Burns :D
 
btw, I'm a new guy here :D I've been having some fun helping people out and such
 
@SomeGuy - I have hundreds, I always download when I come across images of Monty, but that one is just linked in
 
I used to have an account but I forgot about it. I've been using this new one every since
 
8:06 AM
Hi, I'm building a website and I want to add languages support, my question is if its possible to have a file that holds all languages' strings (e.g. Welcome in english Welkom in german etc etc) and to fetch these string according to which language the user wants to see
 
Just to be sure here.. If I write something like this inside a closure:
var camera = 0;
this.camera = camera;
Whenever I change this.camera. var camera will also change right?
 
One way to find out would be to try it
But no, I don't think so
 
No. I guess that doesn't make sense. I try it now. I guess I need a "change variable" method inside the closure
 
Depends on what you're actually trying to do
If you want to alias this.camera as camera, just use var camera = this.camera; inside
 
The problem is that camera has to be changed occasionally. And camera is needed inside some callbacks where this.camera would become useless
 
8:18 AM
var that = this;
 
Good point! So then I can change this.camera and that.camera will get updated?
 
I'd really need to see more code to be able to answer
But assuming that this.camera becomes useless because this changes, then yeah, that.camera would work fine
 
Way to much code. I try it out on a jsfiddle and tell you.
@SomeGuy works fine. Thanks! jsfiddle.net/Schoening/C28dd
 
@Schoening - right now it's just a primitive value, an integer, so changing one variable does not change the other, that only happens if both variables reference the same object etc.
 
Makes sense. that = this fixed my issue tho :)
 
8:29 AM
That's because it's an object, and now you're referencing the same thing
 
This stuff is so cool ^^ hehe. Its fun to write game engine plugins in JS
 
Hi !
Hey fellas
my wifi is running on 150mbps mode
powering 5 devices.
am trying to transfer a 14gig virtual box image from my laptop to desktop
the max speed i am getting is 5mbps (both of them have ssd's and latest propietrary driver), server is node.js.
any clue why so slowius ?
 
8:48 AM
Hi
I haven't used an image editor on mobile .. I would like to know, a few things... What happens when the mobile screen size is 320*460 and u have an image like 128*160 or 1024 * 768 . does they all fit to screen or like object-fit : cntain
 
@vein 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.
 
 
1 hour later…
10:06 AM
The last message was posted 1 hour, 2 minutes ago.
@AbhishekHingnikar ^
 
@AbhishekHingnikar Just keeping you informed on the status quo
 
Hey Good After Noon/Good Morning
 
Does anyone use sublime text on linux? when i go to packages folder, everythings zipped up and i have to extract to edit
 
@Connor yes
 
10:21 AM
@samitha when i go to packages folder, everythings zipped up and i have to extract to edit
 
Here using it in Ubuntu
I didn't get it
are you trying to install it ? using a zip
 
no, dw
 
I started doing that:
Sorry for downvotes people who gave answers. I appreciate your effort, but find your answers not useful given the duplicate answers, and would rather see people go read the more detailed answers in the duplicate. — Benjamin Gruenbaum 37 secs ago
 
@BenjaminGruenbaum I basically had to do the same yesterday
I know you're just trying to help that's why I haven't down-voted your answer, which I should have done, the javascript tag quotes: — Connor 19 hours ago
 
@BenjaminGruenbaum why this is for ? github.com/angular/angular-seed
 
10:49 AM
forking
 
11:01 AM
could somebody give me a hand with this custom jquery slider?
0
Q: How can I implement jQuery or CSS3 to animate these, slides to give the effect of them moving from left to right.

UzumakiDevI have these slides I want to come in from the left or right. I have tab buttons that equal the number of tabs. I've given them unique data attributes: var i = 0; $('.tab').each(function () { $(this).attr('dt', i); i++; }); My slides also have unique attributes so I can compare ...

please
well... it's not quite sliding at all yet.
 
morning everyone :)
 
morning
 
11:35 AM
Mornin @Qantas94Heavy
What's up?
 
11:54 AM
Hey, anyone here decent with angular directives? I'm creating a directive to help deal with drop downs, user clicks a link, a drop down appears and if a separate drop down is already open it closes. I have the drop down working when you click them but I am not sure where/how to keep track of if another drop down is already open, would this be in the controller specified in the directive object or maybe in the directive function itself or maybe using an html attribute?
 
@RafaelSeidalinov 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.
 
What are your favorite functions in JavaScript?
0
A: Is there a way to create a bound function providing it's arguments inside an array?

Aadit M ShahThere are quite a few ways to do this. Method 1: setTimeout extra parameters Did you know that you can pass setTimeout extra parameters just like you can do with call? setTimeout(func, 1000, 1, 2, 3); However suppose you have an array of arguments instead: setTimeout(func, 1000, [1, 2, 3]);...

 
morning
 
12:15 PM
@rafaeloliveira 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.
 
 
1 hour later…
1:36 PM
K, found an interesting-ish question to answer, that's enough for today
4
Q: Named arguments and the arguments object in JavaScript

user3649693Recently I started learning JavaScript through Nicholas C. Zakas' book Professional JavaScript For Web Developers and I came across some questions that I could not solve by myself. As the title says, that's all about named arguments and arguments object in JavaScript functions. E.g. we have thi...

 
1:49 PM
ive started reading john resig's secrets of a javascript ninja
ive really started to like javascript in the last couple months
 
2:05 PM
Whenever I encounter this I hate JS a little bit...
!!> [1,2] == [1,2]
 
@ThiefMaster false
@IanShannon 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.
 
Yeah, not having a native value comparison can be a PITA at times
== is not very useful in general
 
2:26 PM
@bfontaine 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.
 
@EazyTutor 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.
 
Hi Guys... I need a help with PhoneJS
 
3:03 PM
Hi guys!
 
Is it considered ok to inject a jQuery object into the link method of an angular directive? I know I have access to the actual element wrapped in a lite jQuery wrapper but I don't like having to keep using element.parent().parent() etc. I'd like to just use jQuery but have it injected in rather than globally accessing it
 
3:23 PM
github.com/joyent/node/issues/7642 Anyone who can voice their support, I would really appreciate it. Even a simple "+1 I'd use this" would help.
 
@copy dynamic recompilation ftw
feed stuff right for the jit.
 
It's really cool that he's going for high speed
But it's making the code read like the Linux kernel or something
Probably justified in this case
Considering you don't want to create a function that runs slower than the original
 
Yeah, speed is super important for that part of Bluebird, it's one of the most important places.
 
I'd rather .bind() have that property :d
 
3:37 PM
It doesn't though
20
A: Why is bind slower than a closure?

Benjamin GruenbaumMost of the time it does not matter. Unless you're creating an application where .bind is the bottleneck I wouldn't bother. Readability is much more important than sheer performance in most cases. I think that using native .bind usually provides for more readable and maintainable code - which is...

:/
 
posted on May 18, 2014

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); try { var pageTracker = _gat._getTracker("UA-3727700-1"); pageTracker._trackPageview(); } catch(err) {} Love you, Massimo.

 
4:39 PM
hi
please help me to remind a feature that i had installed on my system and help me to see my design result without need to refresh the browser
hello
nobody is here
 
How would we know what you had installed in your system once
 
so i want a feature on my system to help me see my design preview without need to refresh the page
 
Why do copy speeds between hard drives with a USB adapter vary so much?
One moment they're copying at 30MB/s then they're copying at 200KB/s
 
I am converting psd to html
so to do my job fastly
i need to see my design result very quickly
 
Because they have to move the read head to a different place if big files are fragmented or you're copying many small files
 
4:43 PM
i hate to spend time to refresh the page
 
Okay that makes sense
 
sooo
what should i have to search in google
hello
is there anybody to help
 
> design preview without need to refresh the page
 
4:59 PM
@Shea also, windows sucks at estimating times.
 
Interestingly, file transfers over a (file sharing) wireless network are a consistent 30MB/s.
 
Are you sure you're using USB3?
 
I don't think so
It's a USB hard drive adapter, I'm not sure if it supports it
But tbh, USB3 is new to me
Okay yes, it's USB3
I'll do an experiment, and connect the USB adapter to a different laptop, and transfer the files through the network, just as soon as my current batch of files are done copying
 
5:18 PM
@BenjaminGruenbaum Done
 
5:29 PM
How come that objects that are passed to other objects stay referenced. But primitive values like numbers are just "copied" ?
http://jsfiddle.net/Schoening/RaUCX/
 
5:41 PM
Because primitives are handled by value and objects are handled by reference
 
by reference value you mean
 
Not sure what you mean by reference value
 
Passed by reference means this would work:
var x = {x:5};
(function(a){
    a = {x:10};
})(x);
console.log(x.x); // 10
 
Oh I see what you mean
Inventing your own jargon like that :)
 
@Schoening, @Meredith gist.github.com/Zirak/7713141
 
5:51 PM
I'll give that a read in a bit, thanks
 
@Zirak thx
 
@Meredith wait what?
 
@Zirak That was very informative
 
6:07 PM
@BenjaminGruenbaum I'm not even sure, I've been awake for so long
 
@OrtomalaLokni 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.
 
lol
I've read "This PLT Life" for nth time
and it's still so goddamn funny I'm crying
 
A tumblr-thingy full of gifs?
 
6:34 PM
@İnekŞaban 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.
 
@CapricaSix Thank you! I read them already :)
Don't worry.. If I have a question it's mostly really a trivial question about UX or that sort of things
@CapricaSix I assume you're a bot?
 
@İnekŞaban not always
 
@TonyCronin Not always a bot you mean?
 
yes
 
Understood :)
Ah.. I think there's a typo in the rules Caprica posted.
There are times when the room gets carried away with images or oneboxes, but this is no excuse to make a habbit of it.
should be
 
6:40 PM
what is your question?
 
There are times when the room gets carried away with images or oneboxes, but this is no excuse to make a habit of it.
 
it's a funny room, the denizens (the regulars) are experts.
but capricious
 
@TonyCronin For the moment I'm just hanging out in the room :) but if I have a question it's really about opinions for most of the time
 
super, me too.
where do you hail from?
 
Umm.. I see from the transcript :P
From Italy :)
 
6:42 PM
I'm from ireland
 
Is that bot usable or it's just there to salute you?
Nice.. I have a friend from Ireland that I met at a hostel :)
 
@xdevel 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.
 
just salute
 
ok :)
@CapricaSix There you go. It'd be nice to know your creator
 
!!tell İnekŞaban help
 
6:44 PM
@İnekŞaban Information on interacting with me can be found at this page
 
Ah.. so I can interact with him...
 
@Zirak. help I know nothing.
 
And I guess I saw a command in action
 
@CapricaSix Are you...a real person.... or a robot.....
 
or rather the more I learn the less I know
 
6:46 PM
!!> eval(Array(400).join("4/n++/n++/n-4/n/++n/++n+")+3,n=2)
 
@copy 3.141592653099677
 
@TonyCronin Buy "The Little Prince", "Catch 22" and "Sophie's World", disconnect from the internet, reconnect when you've finished
@KevinTomiyoshiYang See the link posted above.
 
!!> while True: print('hello world')
 
@İnekŞaban "SyntaxError: missing ( before condition"
 
Ah..that's Python...
 
6:47 PM
@Zirak thanks man, working through the ninja and object oriented javascript as I type. I've had enough now I think.
 
Surprisingly, the bot in the js room evaluates javascript
4
 
lol
 
@Zirak. that xhr idea for the project I was talking about the other night, looks like a runner. but my JS is nowhere near good as it needs to be.
 
@Zirak Yes. I got confused because I'm coding in Python and at the same time writing in this room... sorry
:)
 
back to the books
ttfn
 
6:51 PM
!!> for(x=5;--x;) { console.log('hello world') }
 
@İnekŞaban Maximum execution time exceeded
 
I knew that :)
 
@İnekŞaban "SyntaxError: missing ) after condition"
@İnekŞaban "undefined" Logged: "hello world","hello world","hello world","hello world"
 
What is the de facto database used by Javascript/NodeJS users (you)? Do you follow the hype or are you still with the good ol relational db's?
 
What's the data?
Is the data a table?
Is it a dictionary?
Is it a graph?
Is it a list?
 
6:57 PM
@Zirak I'm speaking in general
 
Doing NodeJS means you're already in the hype
 
Part of NoSQL is the outcry that modelling all data "in general" into one type of data store is wrong
We used to have "all data is a table"
 
I'd use Postgres for the base, Redis for caching etc.. but there's a base where I start from :)
 
Reddit sounds like an effective caching mechanism
So you just pick relational, because you're comfortable with that? Even though you data may be a dictionary?
 
@Zirak I mainly work with Python so that is almost true. Regarding the use of a relation database it's because it feels easier (for me) you have an increment id, availability, consistency etc
I'd use NoSQL for the data I can risk to lose
There are ways to have consistency, transactions and availability with NoSQL dbs, but you lose all the advantages of using a NoSQL solution
 
7:02 PM
What
We must be living in two different worlds
 
But maybe the Javascript guys have other use cases
 
@copy :/
 
@BadgerGirl :(
 
It must be the 80s all over again
Because I could swear we've had had non-relational data stores for some time now...and they're stable, have high availability, and have all those nice features
I must be delusional
 
About what non-relation ds are we talking about?
I think it all depends on what your numbers are
 
7:05 PM
Let's take for instance LevelDB
 
@BadgerGirl @copy y u sad folks
in Lounge<C++>, 22 mins ago, by Bartek Banachewicz
okey lads here's the thing vagina jokes are funny but I have Numerical Computations assignment due tomorrow
here my life is more terrible
 
(and let's of course ignore all the problems popular relational solutions like MySQL have)
(because I sure as hell never lost data on that)
 
@İnekŞaban wait what
TIL NoSQL = unreliable
 
Oh yes, Cassandra of course crashes every 4 minutes
 
@BartekBanachewicz Because we don't have any cats. :(
 
7:08 PM
@BadgerGirl hm? ohwell.
 
Not to mention ElastiSearch which acts just like a NoSQL solution. That's a horrible piece of software
 
@Zirak Unrelated, but this is cool: cr.yp.to/cdb.html
 
Berkely DB? Child's play
@copy Looks interesting
 
so say I have the image data (idata) from getImageData and I also have the x,y,height,width of an area I want to get an average of..
function average(x,y,w,h) {
    var r=0,g=0,b=0,i=0;
    for( var xLen = x + w; x < xLen; x++ ) {
        for( var yLen = y + h; y < yLen; y++ ) {
            var o = x * 4 + y * 4 * image.width;
            i++;
            r += idata[o];
            g += idata[o+1];
            b += idata[o+2];
        }
    }
    return { r: r / i | 0, g: g / i | 0, b: b / i | 0 };
}
why doesn't this work?
 
Computation's off?
 
7:12 PM
possibly?
working on speeding up this: codepen.io/rlemon/details/kGnJe
 
how duz I use
No image
halp
 
We're talking about moderate sized projects. You don't use ElastiSearch to power your entire website. If I do however plan to power your website with NoSQL and the user list isn't countable with my fingers, I prepare yourself to build custom queries to avoid problems deriving from the "eventual-consistency" philosophy. It's true, not all NoSQL solutions sucks, but they have to trade a bit of performance in change of consistency. There was one that looked promising, I'll try that when I find it.
 
@Zirak huh?
 
@rlemon I'd move image access to a separate function. Those index computations can get tricky
 
@İnekŞaban Do you have data to back it off?
Because there are tons of modern sites that would beg to differ
Ever heard of Yahoo? Github? ebay?
 
7:18 PM
> they have to trade a bit of performance in change of consistency.
 
I'm busy with coding but I'll find it for you. You don't have to ask for data anyway.. There is ton of data on the net already.
 
@rlemon It's not obvious how to run that
 
@İnekŞaban in the "MongoDB is webscale" youtube video-kind-of sources?
 
it doesn't work :/
the codepen one does
 
@Zirak Yes. I wonder why hospitals (as an example) still use relational dbs.
 
7:20 PM
Because they were written in the 50's and their software was never touched since
 
because people working on goverment contracts are hardly adapting to new tech
there.
 
@BartekBanachewicz No. Personal research and posts from different expert programmers and professors.
 
personal research is certainly the best source
also academia yes.
 
Besides, some governments have OpenData movements which do offer nosql backends
 
according to academia we should all be using Lisp.
 
@İnekŞaban and @Zirak called you out on said "posts from expert programmers"
we're all expert programmers
 
What I'm trying to say is that hyphenated NoSQL solutions don't do you any good. As an example, if you use MongoDB you suck
 
@İnekŞaban Most complaints I've seen about nosql wasn't directed at LevelDB or neo4j, but were people who got angry because MongoDB is icky and they're confused as to where's phpmyadmin with its nice tables
 
LevelDB and some others have a chance though
 
"Have a chance"?
 
7:23 PM
he gave them one
 
They've had a chance, and they're good
 
@İnekŞaban you know, it surprisingly (or not so surprisingly) sounds like "mongodb is webscale" video.
and other than FUD, you're not really bringing anything new to the table
 
@Zirak I've left Phpmyadmin a long time ago. I use the terminal for everything and MongoDB doesn't scale on performance benchmarks. It has "eventual consistency" for a reason.
As you mentioned, the others are fine
 
which benchmarks
 
Have you noticed when I mentioned MongoDB?
 
7:25 PM
also ^
 
> Most complains I've seen about nosql [...] were people who got angry because MongoDB is icky
 
@Zirak I also wrote "I've left Phpmyadmin a long time ago. I use the terminal for everything"
 
Congrats
I'm very proud
 
If I followed the hype I'd just stick with MongoDB
 
Have a cookie
 
7:26 PM
That's to say I'm not that crappy type of user
 
But you did fall into the category of "judges NoSQL based on MongoDB"
 
what i'm trying to improve is getColor (line 59)
function getColor(x,y,w,h) {
    var r=0,g=0,b=0,i=0;
    for( var _x = 0; _x < width; _x++ ) {
        for( var _y = 0; _y < height; _y++ ) {
            if( _x < x || _x > x + w || _y < y || _y > y + h ) {
                continue;
            }
            var o = _x * 4 + _y * 4 * image.width;
            i++;
            r += idata[o];
            g += idata[o+1];
            b += idata[o+2];
        }
    }
    return { r: r / i | 0, g: g / i | 0, b: b / i | 0 };
}
 
Argument over?
 
why should I have to loop the entire image data every time?
I know the start and the length.
 
7:27 PM
@Zirak I didn't, but many suck.
Yes, lets stop it here for God's sake
:)
 
On the other hand, all relational databases are godsent
 
10 mins ago, by Bartek Banachewicz
@rlemon I'd move image access to a separate function. Those index computations can get tricky
 
that still doesn't answer my question
just says move it
 
@Zirak mongodb is web scale
 
@rlemon IOW "structure your terrible code if you want to debug it reasonably" :P
 
7:28 PM
@Zirak Never said that. They're actually ass-slow if you don't know to use them right.
 
nothing personal, but fuck numerical for loops forever
 
how is that function not reasonable? it is a demo.
 
And the user who got itchy about the MongoDB Phpmyadmin thingy are the same users who can't use a relational db
 
@İnekŞaban That reminds me of some other piece of database technology...
 
@rlemon it's using numerical for loops and has logic mixed with boundary checks.
 
7:29 PM
and that is what i'm trying to avoid. and what would you suggest besides for loops?
 
@BenjaminGruenbaum And Erlang is terrible
 
Still trying to find that NoSQL db that got my attention
It was made by a turkish-american professor as far as I remember
 
@rlemon image.range(x,y,w,h).reduce((pixel) => ...) also shouldn't that divide by total pixel count, instead of by incrementing i?
 
@rlemon In one fiddle you're iterating over 0..width, in the other over 0..w
 
@Zirak it is
 
7:32 PM
@copy in one i'm going over x..x+w and in one 0..w and checking bounds.
checking bounds works.
 
@rlemon Those are different variables
 
@BartekBanachewicz i'm trying to increase performance
that would be slower
 
I wish array functions were faster
for now for is fastest
 
@rlemon You could extract 4 * image.length to a yMultiplier variable
 
7:33 PM
@rlemon code your own image-based reduce
anyway wait
yeah lol that will probably be slow
because of TURBO LEXICAL SCOPE
FWIW I also did my image processing using raw loops, but it still makes me cringe
 
@BartekBanachewicz yea I wish I could use some of the sexiness but unfortunately it is still too slow for canvas animations.
 
if only we could compile other languages to javascript
 
@BenjaminGruenbaum Totally
 
A fully ACID compliant NoSQL db
 
7:38 PM
My pants are creamed
 
@Zirak I'm eating
 
My pants?
 
Döner Kebab
Damn not that
Wth is that haha
 
@rlemon console.assert(y + h < height); console.assert(x + w < width); fails
Disregard what I said earlier
 
Here you go
 
7:44 PM
Looks good, now I'm hungry
 
@BenjaminGruenbaum It's $2,70 but'll say you're a friend :P
 
Are you from Turkey?
 
My father is from Turkey :)
 
Germany?
 
It's nice because I get free food xD
 
7:46 PM
Ah cool, I've been to Turkey several times, lots of fun and delicious Kebab.
 
@BenjaminGruenbaum Rome, Italy :)
Though I'm born in The Netherlands
 
Ah, I was in Rome 3 years ago, very beautiful city :)
 
@BenjaminGruenbaum That's cool!
 
Have two good friends from Rome
guys who run gamepix.com , and one that works for Microsoft
 
from
 
7:48 PM
Really? Yep, I know many great italian programmers :)
I actually live 3 km from Rome's center and in front of one of the city's principal subway, so I always see many turists coming throughout the day.
 
Rome is spectacular
 
@Zirak Yeah :)
I came here like 3 years ago with little to no money and never went back
Do you guys think it's a good idea to validate forms with Javascript/HTML5 and disable the form's submit to browsers without Javascript?
Even my phone supports Javascript
 
Not sure why you'd disable your form if your user doesn't use javascript
Like what's the point
 

« first day (1310 days earlier)      last day (3648 days later) »