« first day (1128 days earlier)      last day (3834 days later) » 

9:00 PM
the fact that you came back and apologized (even if that is sarcasm, I can't tell) and didn't just come back and call us all dicks makes me wanna just forget the ordeal ever happened.
 
@user1972934 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.
your slate is clean :)
 
@user1972934 I missed you too :(
 
@BenjaminGruenbaum so, how hard would it be to attach an event to that?
 
It just returns a normal dom element, still the same addEventListener you'd use before
 
9:02 PM
also @user1972934 a lot of people mis-interpret closed questions as 'don't ask this question'.. the one here might actually yield results on SuperUser or another like site.
 
Hmm
 
@rlemon thanks! and yeah i got it
 
gah finally got my program to output a 2x2 PNG file with 2 black pixels and 2 white pixels
my head hurts :/
PNG is hard
 
for (var i = 0; i < types.length; i++) {
    (function (i) {
        create[types[i]] = function (props, style) {
            return create(types[i], props, style);
        };
    }(i));
};
 
9:08 PM
@Doorknob I just use a library someone made, it's usually easier :P
 
Why's there an IIFE there?
 
Try removing it and see what functions remain :)
 
@BenjaminGruenbaum I know, there are many for Ruby which is what I'm using, but I want to make my own :P
 
@Doorknob sounds fun :)
 
@BenjaminGruenbaum Oh nm, I already see
 
9:09 PM
@Doorknob how come?
 
a = []
for (var i = 0; i < 5; i ++) {
    a[i] = function() { alert(i) }
}
a[0]() // alerts 5
 
It's the loop/closure problem
 
@Shea ^
@Adil to learn, and for fun :)
 
@Doorknob i see
 
Yeah, i changes so then all functions will end up creating the last one the list
 
9:11 PM
@BenjaminGruenbaum you're really good at this. I didn't know you bind events with that.. I was going to try $d.onlick = function() { }; lol
..onclick. haha
 
ohh wow
Washington IL about an hour and a half ago
 
we had those pass through here
 
:O
 
no tornados near my house fortunately
tons of hail though
 
9:12 PM
Oh my god
 
@RUJordan it's almost like it's part of my job :P
 
it is like 12 degrees (c) here. but we are getting some heavy winds tonight so the weather report says
 
we're supposed to be getting heavy snow in london soon
 
@BenjaminGruenbaum touche :P
 
joy
 
9:14 PM
@rlemon Holy shit
 
ikr
more pictures in this comment
 
Yeah, I saw those. Makes me actually feel sad
 
it is horrible. I can't imagine how that community must be coping
man I wish I knew where more of you lived.
I can't help but get the personally worried feeling that someone I know might have been in that.
 
how do you do this
function(){}.bind(this)
in coffee?
actually, doesn't coffee sort this out for you?
 
@connor.js (->).bind this
 
9:21 PM
@Doorknob yeah, isn't coffeescript supposed to make like the _this thing?
 
@BenjaminGruenbaum jsfiddle.net/aKm7h/1 can you explain alert.bind()? I didn't know alert() was an object? Or something? I'm not sure =x
 
how do i do that?
 
has anyone used crafty.js before?
 
@RUJordan all functions are objects
 
@RUJordan .bind takes a function and returns another function with the arguments prefixed.
 
9:22 PM
everything is an object
@connor.js umm... I have no idea; I've barely ever used it
 
ok
 
Calling CoffeeScript Coffee, is like noobs calling JavaScript Java
 
@Doorknob EVERYTHING (null,undefined,string,bool and number may or may not be included - shipping and handling costs apply, long distance call fees may apply depending on your plan, the presenter is not a real doctor)
 
I don't understand, would alert("Hello") have worked without a bind()?
 
@RUJordan no, because then the alert would execute immediately
 
9:24 PM
@RUJordan event handlers accept functions . In JavaScript you can pass functions around just like any other object.
 
This is all quite confusing, yet not really.
 
Read "The Good Parts" :) I think it'll help you
 
I will :) I want to convert it to kindle format so I can take it on the train with me
 
omg I just remembered we have a service man in Illinois......
:?
like we sent him there on Thursday ...
 
@Shea I suppose you're right, apart from the fact that coffeescript and coffee are both good
 
9:30 PM
Haaa this is so cool, I can bind an array function herpButton.addEventListener("click",c[10]); I knew this was a good learning idea
 
@RUJordan yeah sure, why 10 though?
 
is "Vanilla" javascript just raw javascript?
 
Oh, the 10 corresponds to the counter
 
@RUJordan it's this framework vanilla-js.com
 
9:34 PM
It means on 10 seconds, trigger this function
Haha that's funny
 
Hah, a bug I posted 3 years ago got fixed. Funstuff.
Hello :) I transcode filenames in hebrew, The "Replace all messy characters" option turns all Hebrew characters to "_" characters This is not a biggy, unmarking this option solves the problem (but also keeps me from enjoying it) Perhaps teach the name processing function not to remove language characters but to remove other chars such as %#@! and so on... or maybe have a second checkbox for this situation running Ubuntu 10.04, Gnome 2.30, SoundConverter 1.4.4 Great program btw, ty
SoundConverter
Low / Fix Released
^ nice one
 
someone type some javascript
oh and don't put a semicolon
 
@Pekka웃 there are Paul Irish's tutorials that are really good, is Chrome ok?
 
@BenjaminGruenbaum that goes in the right direction, yeah
 
ohh god doesn't everyone else here just hate PHP
:P
 
9:44 PM
@Pekka웃 So that one - there is "The Breakpoint" with Addy Osmani that's pretty decent. There are also a bunch of video tutorials. Generally Addy Osmani and Paul Irish are the ones that make the most dev tools tutorials.
There are fair ones for Firebug, but generally I think the Chrome dev tools are better.
 
@BenjaminGruenbaum that looks great. Although what I'm looking for is one step below that - for completely clueless people who have never even looked in the error console
 
There's an html5rocks thing, lemme find it
4
A: Chrome Developer Tools: Best resource for learning advanced features?

Benjamin GruenbaumAddy Osmani did an excellent series on the chrome dev tools, you can find some of it here. I think that if you read it (and watch the videos), I've found them very useful, if you read them, you're pretty much covered. I included some additional useful resources. Addy Osmani Tutorials and videos:...

Ooh @Pekka웃 the other answer is good discover-devtools.codeschool.com this is really basic
That's the one I meant to find - it's the one with Paul Irish where he does the basic stuff.
 
@BenjaminGruenbaum that's great, thanks!
I'll be using that
 
No problem :)
full of songs and weird stuff too ^^
 
bot in room that evals js code
 
9:52 PM
@Doorhandle what about it?
 
throw new Error('HA-ha');
try { 'I have try and catch genious' } catch (spellingError) { } //phew
 
lol
@BenjaminGruenbaum are you a mod?
 
@Doorhandle no of course not...
 
@BenjaminGruenbaum so the bot basically tells you the output of JS code
I meant like room mod
 
9:55 PM
@Doorhandle Your inability to articulate your thoughts is amazing.
 
You moved post :P
 
Did you make a bot? You're asking about our bot?
 
My bot
It's running in this room right now :P
 
is there an opposite of _.pluck in underscore? where it returns everything bar the arguments?
 
@BenjaminGruenbaum here is all the code: var blob = new Blob(["self.onmessage=function(e){try{e.data = e.data.replace('return', ''); postMessage('Well, the answer is OBVIOUSLY ' + eval(e.data) + '.');}catch(err){}}"], {type:'text/javascript'});
var w = new Worker(window.URL.createObjectURL(blob));
var t = document.getElementById("input");
var b = document.getElementById("sayit-button");
setInterval(function(){
var j = document.getElementsByClassName("username").length; var curUser = document.getElementsByClassName("username")[j - 1].innerText;
 
9:56 PM
@connor.js pluck is teh silly and it's because we don't have ruby cool notation.
while(true){}
 
Don't worry my bot catches those things
Non-asynchrous
It has a web worker.
 
right, but now your bot is stuck ^^
while(true){}
 
So it doesn't freeze the page, though
I just restart the console
Like i just did twice
 
Also, I can make AJAX requests from it right now and post messages on your facebook.
Just so you know.
 
I dont have a facebook
Making revive command
 
9:58 PM
Gmail, whatever.
 
I mean will revive itself when stuck
Lol, my SO isn't connected to any mail
It's lone
Well it is, but...
 
Is it running?
 
yes
Type 3+6
or something
 

« first day (1128 days earlier)      last day (3834 days later) »