« first day (950 days earlier)      last day (4014 days later) » 

12:00 AM
No, wrote a simple feature test
 
Can I have a look?
 
Not yet :)
 
Been wondering how to test for features. Modernizr seems like overkill for one or two potentially unsupported features
 
Hey guys, why doesn't this alert? jsbin.com/enoraf/2/edit
 
@dylanmaxey it does, refresh
 
12:08 AM
oh, weird but durr
 
lol
 
 
That's IWBTG Gaiden right?
 
Is this allowed in JS for mouse overs:

var e = document.createElement('div').onMouseover = function() { //code };
 
aw, you're doing it in wuss mode
 
12:16 AM
works for onclick but nothing else =/
 
I wanna be the fangame
 
oh the fangame, I checked the gameplays but didn't remember whether it was gaiden or fangame
I've finished only the first IWBTG, gotta play gaiden and fangame sometime
@Dave It is "valid" (apart from // being in the same line of }; but I assume it is not in your actual code), but I assume the assigned function would be stored in e instead of the element.
Seeing as an assignment operation returns the assigned value
 
Me too, also gotta try Boshy
 
ah good point. i tried other ways but won't call the function so i think adding an event listener is going to be best bet
 
oh
and mouseover should be lower case I believe
var e = document.createElement('div');
e.onmouseover = function(){};
 
12:19 AM
@FabrícioMatté don't forget to try this one: copy.sh/iw :P
I'm really bad at level design though
 
oh gawd I won't sleep tonight :D
 
Only one level
 
T isn't shooting oh i see
let's see, guess i gotta jump on those yellow thingies
are there hidden blocks in the upper part or i'm just overlooking something >_>
 
Nope
Yellow thingies
 
each yellow thing gives one extra jump?
 
12:24 AM
Yep
 
just noticed an apparently 3rd jump so that was it lol thanks
 
The minecraft server is nearly done
 
@SimonSarris Woohoo! Details?
 
no IP yet
but sooooon
 
oh, i thought the blue thingy would kill me but it is a save point
 
12:30 AM
Oh lol
 
sorry for the noob question, how should i condition a JS function that i made so it executes only if and onyl if the URL parameter Segment=215
 
Okay, so window.onload is supposed to be triggered after everything is loaded correct? How come within the onload callback, I run alert(typeof(document.getElementById('bodyframe')); and it returns undefined, but if I go to the console and run the same code again as a few seconds pass and it returns the iframe object?
 
@sebas if (/(\?|&)Segment=215(&|$)/.test(location.search)) {}
 
what is.test(location.search))
 
test is a method of a RegExp object
 
12:41 AM
would it work in IE?
 
it should work all the way back to IE6 afaik
 
let me try your code thanks man
 
no worries :P it won't work if you're inside a frame/iframe but in other cases it should do the trick
!!> (/(\?|&)Segment=215(&|$)/.test('?test=1'))
 
@Zirak, coffeeval?
 
bot where are you? nvm
 
12:44 AM
working great fabricio, thanks!
 
no prob :P
damn @copy I miss that last part of 3 yellow thingies 99/100 times
oh got it this time
 
@FabrícioMatté me too.
 
oh my holy so tired
13 more minutes then home time so I can die for 7 hourx
 
starting to get it, have to start jumping the farthest possible, get second thing at reasonable height so jumping forward will grab the 3rd and not sure about the last jump
basically start with the farthest jump possible, then jump low to don't hit the spikes and 2 jumps at middle of the previous jump I guess
alright it is the damn platform killing me now lol
 
Yeah. And whenever you land in the platform stop going right.
And then jump left twice but not too high.
 
12:51 AM
oh thanks, I was trying to jump right still lol :P
 
Is anyone here experienced with girls and approaching them?
 
@DemCodeLines Yes, quite a few people here
For example. @JosiahSouth said yesterday he is very good
 
However, this is the JS room, not middle school.
 
@DemCodeLines I am.
 
If someone is, I'd like to request them to come here for a second
 
12:56 AM
lol
 
haha
 
I'm so joining.
 
Just whip it out man
 
Make it idiot proof and someone will make a better idiot.
 
12:56 AM
protip: Girls like it when you charge at them with a wookie-like scream.
 
LOL
 
NetworkError: 404 Not Found - https://raw.github.com/Zirak/SO-ChatBot/master/master.js
Not good. Not good at all
 
Tweet at GitHub and complain
They're actually pretty good about that
 
Thanks, I'll give it a shot
@github Hey, some things still appear to be down on my profile (pages, gists and raw views): http://github.com/Zirak
 
Okay, so window.onload is supposed to be triggered after everything is loaded correct? How come within the onload callback, I run alert(typeof(document.getElementById('bodyframe')); and it returns undefined, but if I go to the console and run the same code again as a few seconds pass and it returns the iframe object?
 
1:06 AM
I always feel like an idiot after tweeting something.
 
ow damn, I got the orange key, when everything started shaking I thought that spike would drop and I jumped into more spikes lol
alright, passed it again, that was the only stage so far right @copy ? nice work
 
This is pretty cool: osrc.dfm.io
2
 
@FabrícioMatté Yes, thanks
My biggest motivation was to create the game engine though, but maybe I'll find the motivation to make more levels some time soon
 
the engine runs smoothly on my Chrome, good job on that too :D
 
Thanks :)
 
1:13 AM
the level design was pretty good too, only issue IMO is that the last part's difficulty doesn't quite scale with the previous parts, but it is great for an 1-stage game so far :)
 
@Zirak That's only natural.
 
@Zirak ... they.. removed your github?
 
var sum = xs => xs.reduce((a,x)=>a+x, 0);
Hurry up!
 
@FabrícioMatté That's a great feedback. I'll probably make the last part easier and scale slower
 
hey guys, could somebody please tell me what's wrong here? c9.io/jamesson/inventory/workspace/menutest.htm
It's meant to populate the selects from the loop but...
 
1:17 AM
@rlemon No, it's still online. Most things are just down.
 
Alas, zirak, the vile gremlins of github hath stolen thine identity =P
 
@jamesson move the script below the form
 
@rlemon: much messier and less intuitive than the other way
 
documents are parsed top down. you're trying to select elements the page does not know exists yet.
 
1:19 AM
@rlemon: the [perils of learning js from a non-web environment
 
the other way is to wrap it all in a DOMContentReady
 
@rlemon: next time, this doesnt have to be pretty :)
 
my rule is, stylesheets libraries shims all in the head, the rest just before the </body> tag.
 
@rlemon were you among those interested in MC?
I should have kept track of the names :(
 
@rlemon, anyway good to now before I start writing validation :)
 
1:20 AM
I might be. I own it, haven't played in a while. but might be fun to play with people I know.
 
rlemon is one of the sexiest developer in the entire world. And I just say "one of" to be sure you guy's won't kill him because you're too jealous to accept the truth.
 
@rlemon: alas, no work
 
your html is also bad.
you have double closed tags for labels and a </fieldset> with no open tag
 
ugh, I'll just run the bot from the local copy.
 
@rlemon I thought there was a your momma joke coming :(
 
1:24 AM
@jamesson also, you have no id's on the elements you are trying to select.
they are names
 
@Zirak What did you do ?
 
add id values.
 
Preferable something really lame like: Your html is so bad even external iframes run in quirks mode
Your HTML is so bad, it renders correctly on IE5
 
@dievardump Got caught in bit warfare. Lost the war. Now I'm a camel.
!!are you there?
 
wth?
 
1:26 AM
@Zirak No way
 
and you can't append the same element to two lists.
doesn't work that way.
how can one option be in two select lists?! that is crazy talk.
 
@dievardump Precisely, my foreheaded friend. Precisely.
 
rlemon: ty, and, not strictly js but do you know what controls the length of the displayed menu (ie how many items on the screen before we start scrolling?)
 
no clue
apparently a size attribute on the select list
nvm
 
@rlemon:ok, ty again
 
1:32 AM
yea idk how to do that, mdn is no help if there is a way
 
@rlemon, every time I start to worry too much about details I just repeat to myself, "proof of concept" =P
@rlemon: no foreign key constraint functionality in the db? No problem =P
 
0
Q: Improvement on code

MattOkay, I'm just a little newbie in programming just doing it for a past time hobby. I am just recently making a web editor for fun and the way I was doing it (Using PHP) I was told would be a bad way. I also thought about it while I was making it, and in massive sums of data transfer it would be a...

 
> Si miraculum nos struer, illegitimus nautilus
@Zirak, I wonder if it's because they don't like people using the raw files
You should set up a heroku or something to serve them
 
@phenomnomnominal: I'll bite
 
@phenomnomnominal I don't think so. I will move from leeching off of github, but more than just my raw file view is down
 
1:47 AM
@jamesson what you biting about
@Zirak, the report thing is so cool
 
@phenomnomnominal: the latin :)
 
hate to say it but Zirak does seem—as one of the top 33% most vulgar users on GitHub
@jamesson, “If by some miracle we should get it to build, ship the bastard”
 
@phenomnomnominal:ftw
@phenomnomnominal: you may have given me my first tattoo... not
 
room topic changed to JavaScript: A Room with a View. And a Model. And a Controller.: Everything JavaScript | New User? Read rules.javascriptroom.com [ecmascript] [help-me-im-stuck-in-a-tag] [javascript]
 
Nice.
room topic changed to JavaScript: A Room with a View. And a Model. And a Controller.: Everything JavaScript | New User? Read rules.javascriptroom.com [as-car-is-to-carpet] [ecmascript] [help-me-im-stuck-in-a-tag] [javascript]
 
2:04 AM
You know what's a scary file? github.com/mirrors/perl/blob/blead/regexec.c
 
/*
 * 	One Ring to rule them all, One Ring to find them
 &
 *     [p.v of _The Lord of the Rings_, opening poem]
 *     [p.50 of _The Lord of the Rings_, I/iii: "The Shadow of the Past"]
 *     [p.254 of _The Lord of the Rings_, II/ii: "The Council of Elrond"]
 */
Starts out okay
 
:-D
 
Sorry, I spoke too soon. This is scarier: github.com/mirrors/perl/blob/blead/regcomp.c
 
Somebody given me a good reason not to learn Perl. Fashion doesn't count.
 
!!c> do ->
 
2:08 AM
@phenomnomnominal "undefined"
 
!!c> #include <stdio.h>
 
@SomeKittens "undefined"
 
@SomeKittens ?
@FizzyTea What other languages do you know?
 
!!c++> #include <stdio.h> // Kinda ruins the joke
 
@SomeKittens Y U NO MAEK SENSE!? Could not understand c++> #include <stdio.h> // Kinda ruins the joke
 
2:12 AM
@BenjaminGruenbaum I know some Spanish.
 
@FizzyTea It's perl
 
@FizzyTea Does "It inspired PHP" count? I think it does
 
@BenjaminGruenbaum And Ruby.
 
@BenjaminGruenbaum, what's your github name?
 
@FizzyTea do you already know Ruby?
 
2:13 AM
Cheese inspired PHP.
 
@phenomnomnominal Benjamingr , all my repos are in bitbucket though
 
@BenjaminGruenbaum Looked at it, but never written any.
 
@phenomnomnominal ty
@FizzyTea Learn Ruby first
Perl is worth learning though
 
@BenjaminGruenbaum I learnt Smalltalk first, and Ruby seems icky.
But I keep coming across gems like Higher Order Perl, and I think I may have missed something.
 
2:16 AM
Go learn it then, I'm sure you'll learn from it
 
@copy :-) Tried to learn it before and failed quite miserably.
 
@Zirak knows perl iirc
 
@Isaac 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.
 
@FizzyTea You know one general-purpose language already, don't you?
 
@copy I dunno. Like what? Once upon a time C was general-purpose.
 
2:22 AM
Javascript, Python, Perl and Ruby are general-purpose
C, C++, Haskell, Lisp and Go aren't
 
I'd say that JavaScript isn't, not yet.
 
Node is quite stable (Benjamin praises it), but yeah ...
 
F# is much better supported for Windows development for example.
 
JavaScript is general purpose, I don't think anyone argues that, you can create desktop apps with it, do lower level, FS manipulations, etc.
I like F# ^_^
 
Sure, it's general purpose theoretically, but in practical terms it's certainly been sidelined by MS at least. C# > F# > VB > JScript.
 
2:28 AM
Actually I'd argue that's changing
Microsoft is shifting a lot of development into two things right now, JavaScript (TypeScript, etc) and making C# a scripting language
 
I hope so!
 
A scripting language similar to C# could be interesting
 
That's roslyn :)
 
JScript.NET had classes long before CoffeeScript for example. But MS never seemed to have the will to pursue it.
 
@FizzyTea :P
 
2:31 AM
I like the concept of implicit classes :)
I want a modern language to let me be implicit about my variables. I do a=3 I want to language to create a variable a and put 3 there or replace whatever is in a if it already existed.
Why should classes be any different? I just want to write the objects I'm using and have the language understand what classes to make on its own (though that's more of the runtime in JS)
 
@BenjaminGruenbaum so did you even sleep ?
 
@Darkyen no, I do not. I've been coding for like 20 hours straight with compilation breaks
 
@BenjaminGruenbaum Like duck typing?
 
@FizzyTea I don't see why I need a class point to know that {x:3,y:5} is a point.
 
@Darkyen ES now has fat arrow. I think that was the whole point of CoffeeScript. :-)
 
2:34 AM
@BenjaminGruenbaum yo... sleep my friend please!
 
@FizzyTea slim arrow is also nice, and CS has some interesting stuff, it drops the need for var which is silly to begin with and allows more compact pythonic syntax
 
@BenjaminGruenbaum What's svelte arrow?
@BenjaminGruenbaum php doesn't have var. I like var.
 
@FizzyTea why?
 
@BenjaminGruenbaum Readability. Lint warnings.
 
In CoffeeScript -> declares a function, (x) -> x*x is like (function(x){return x*x;}). fat arrow declares a function and sets its this value
So (x)=> x*x is like (function(x){return x*x;}).bind(this) which is very useful a lot of times
 
2:37 AM
@BenjaminGruenbaum Ah, that reminds me of Io. It makes a distinction between methods and functions.
@BenjaminGruenbaum Is that a lexically scoped this?
 
They should really fix this, it should always be bound to the prototype
 
@FizzyTea Bind sets the value of this for future executions of the functions
 
Yeah, but which this?
 
@copy Yeah, if someone wants to use something different they can always just use call
 
@BenjaminGruenbaum No, it should always be correct
 
2:41 AM
Does fat arrow in CS avoid the var that = this stuff?
 
@copy What do you mean?
@FizzyTea Yes, the fat arrow in CS makes var this=that useless
 
bind, call and apply should not have their first parameter
this always refers to the prototype and there's no way to change that
 
@@SimeVidas Fuck yes.
 
@BenjaminGruenbaum Well that's nice. So at any arbitrary depth, this always === the outer this?
 
@copy How does it work in Python? I know you explicitly pass self as the first parameter, is it possible to invoke a method with a different self?
@FizzyTea try it out for yourself if you don't believe it :)
 
2:44 AM
@BenjaminGruenbaum I don't think so, at least not accidentally
 
@FizzyTea speaking of ===, CoffeeScript has is which is ===
 
@BenjaminGruenbaum Hey, I believe you!
 
also isnt which is !==
 
@FizzyTea Yeah, no === in CS
 
@diosteama 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.
 
2:45 AM
@copy I'm not sure what you want to bind this to in JS though
 
Aren't most of the big wins in CS coming to ES though? Spidermonkey already has let and fat arrow and array comprehensions.
And generators.
CS seems like a test environment to me, rather than the real deal.
 
Why do you think they are though?
Because CS did them
 
@phenomnomnominal No, I think devs have wanted these things since before CS implemented them. I think CS has speeded up the process.
 
I think CS contributed to how ES6 looks
 
That's well documented
 
2:48 AM
Kind of like how jQuery contributed to how the new DOM api methods look
 
I think we can all agree that the compile-to set of languages has given ECMAScript the kick up the pants it needed
 
I'm not sure. In some ways CS's focus on classes is a backwards step.
 
So when using git, is it best to commit really frequently?
 
@FizzyTea CS isn't 'class focused'
@twiz it's best to commit when you've made a substantial change
0
Q: onClick function is causing "Uncaught SyntaxError: Unexpected token }" error

William L.I have a problem, I'm trying to dynamically add some html via javascript, and the html has a js function that's supposed to trigger when it's clicked, but I keep getting this error no matter what I do Uncaught SyntaxError: Unexpected token } Has anyone had this problem before? $("#addVeh...

Anyone who was in the data-binding talk, who can tell me what's wrong with what this guy is doing?
 
It has a class keyword.
 
2:56 AM
Well, what I mean is that if you've done a bunch of stuff, your commit message is going to be "Does this and this and this and that"
which I assume is considered bad....
 
@BenjaminGruenbaum You know, function a() {}; a.prototype.x = function() { console.log(this); }; new a().x() will always be the same
 
@copy You'd bind this to a or to a.prototype ?
 
Same for var a = { x: function() { console.log(this); } }; a.x()
To new a()
 
So when I create an object, I also create an implicit binding of all the functions on it and in its prototype to it?
 
Yeah
 
2:59 AM
When I extend it by cloning it, or it becomes another object's prototype, these functions are bound to that object?
 
I'm not sure if my idea is well thought through
 
It's interesting though, while this related bugs that are not solved in a minute are rare among more experienced JS programmers, that doesn't mean it can't be made nicer.
 
I avoid this bugs by not using this.
 
0
Q: Backbone Marionette code improvement 2

user1966211What's a better way to implement the code below? As much as possible, lessen the repeated lines: vent.on("createAccountLayout:rendered", function() { logger.info('createAccountLayout:rendered => CreateAccountLayoutController'); showRegion(['phoneNumberRegion', 'keyboardRegion...

 
!!/choose glee ygotas
I knew it
 
3:05 AM
No. That's cheating.
@phenomnomnominal Thanks.
 
1 message moved to Trash can
ghost
 
@phenomnomnominal RAGE
 
GLEE
I'd so watch a TV show called RAGE if it was just angry people.
2
 
That should probably just be a reality tv show...
well I suppose it kind of is...
But I mean a reality tv show that is real.
 
I'd also watch it if it was just a bunch of teenagers playing RATM covers, in some sort of Glee context.
 
3:12 AM
that would be quite tolerable
 
You're both optimists.
 
I said tolerable
 
I have VERY low TV watching standards
 
@twiz Yeah, that's what I was referring to. :-)
 
ha well I barely watch tv, so actually I probably wouldn't watch anything about angry people
well I watch tv shows, but only via the internet... Its hard to get out of a couch when there is a constant stream of worthlessness delivered straight to you.
at least internet TVing is deliberate.
 
3:19 AM
@twiz, oh god yes, I can't remember the last time I watched actual broadcast TV, beyond the news
Mainly because I don't like waiting months for NZ TV to catch up?
Plus, fuck ads.
 
hahaha
Yea, I really don't understand why any media is released at different times for different parts of the world
well I mean aside from the actual time difference
Probably doesn't make sense to air new shows at 4am
 
user1596138
@BenjaminGruenbaum ??
 
user1596138
@BenjaminGruenbaum For when you get back on... I never said I was good. I said they're easy to get ;). They seek me out instead of the other way around... I haven't asked for a number in over a year, but I get like one a month hahaha. Chicks over here are kind of odd.
 
People use jQuery so retardedly.
SiteSections.getAllSectionNames().forEach(function (className) {
    $('.pageWrapper').removeClass(className);
});
 
3:36 AM
lol
Where is this gem from?
 
Part of our site
 
Very nice, using ES5 forEach :P
 
replacing with this: pageWrapper.removeClass(SiteSections.getAllSectionNames().join(' '));
Anyone got a better option?
 
browser support?
 
it was actually using _.each, i rewrote
but we need back to IE7 haha
 
3:38 AM
Then no, otherwise I'd use classList
 
apparently that's only IE10 though :P
 
I long for the day
We support anything over 1% of users
 
We don't support IE7 :)
IE8 is everyone XP though
 
Blows me away that we still have 0.1% of users on IE6
 
3:42 AM
granmas
 
Yeah
~700 people per day
It makes me sad that there are that many people having such a shitty web experiene
 
4:04 AM
once I was sad
@phenomnomnominal Haha, stackoverflow.com/a/16671672/1348195
You'd figure someone using CS would know how [] works
 
0
Q: Using a variable as a hash key in Coffeescript

allesklarLet's say I have this hash in Coffeescript: exercises = stretchedPrayer: name: "Stretched Prayer" sound: "28-stretched-prayer" bandStretch: name: "Band Stretch" sound: "13-band-stretch" I can correctly get the name of the first exercise with the following code: exercises.s...

Common issue apparently
 
4:40 AM
!!/slidepoop
 
Mar 13 at 1:40, by rlemon
(Random Fact, when rlemon was 13 he pooped on a slide. he isn't proud of it, but he felt it was time to confess. I'm sorry slide.)
 
0
Q: detect google ads width and height

Burhan Ahmedi want to create a javascript which detect google ads width and height when someone click on them like statcounter is there any way i can do this if have created a script which parse width and height of ads when page load but when i change load to click it stop working $('#aswift_0').load(fun...

 
5:16 AM
I'm always surprised at the amount of people who don't distinguish JSON from JS object literals
@Aquarius24 JSON is a data-exchange format you use to in JS to serialize and de-serialize objects. A JavaScript object literal is not JSON. JSON can be serialized from and de-serialized to JavaScript objects, but it's stricter. For another example {"a":3,"b":5,} is a valid ES5 JavaScript object literal but still invalid JSON because of the trailing ,Benjamin Gruenbaum 11 mins ago
 
5:50 AM
@MotaChuha 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.
 
"Motochuha" means fat rat in Hindi language
 
@Mr_Green hey
Is your nick name a reference to reservoir dogs?
 
I didn't understand
 
(well, there isn't a mister green if I recall correctly)
@Mr_Green It's a famous movie by tarantino
 
ohh never heard of that
 
5:59 AM
All the character names are Mr + color name
 
I took it from "Incredible Hulk"
 
ah, cool
 
Mr Green is Hulk
 

« first day (950 days earlier)      last day (4014 days later) »