« first day (836 days earlier)      last day (4098 days later) » 

user1125394
9:01 PM
o doen't work ^
 
Sam
@cab and why doesn't it work? Did you look at the console (about:debug). as far as I know, Android's browser is Webkit based too. Not sure if it has V8, too.
 
@Neal ... because using a radix is good practice?
 
@RyanKinal ehh. Idk... I hardly ever use it. also in the OPs case they were all int strings.
 
Right, but if one of them starts with 0, then it will be parsed as hex
 
9:06 PM
o boo. thats true... :-\
ehhh
 
Always. Use. A. Radix.
 
why not...
 
Always.
 
rolled back to revision 2....
 
!!> parseInt('08');
 
9:08 PM
@Oleg 8
 
!!> parseInt('080')
 
why r people continually getting the 'fuck me, right?' meme wrong.. is anyone else noticing that? or is just changing in a stupid way..
 
bot ded?
 
seems so
 
Huh... maybe it's just in particular engines?
!!/live
 
9:09 PM
It's alive.
 
RIP @SOChatBot
 
@rlemon walks away for 5 minutes and we kill the bot....
 
lol
 
user1125394
@Sam jsfiddle.net/Cqwxh gives Invalid Date
 
Chrome now always assumes radix 10?
 
9:10 PM
I was just testing that myself
 
"The ECMAScript 5 specification of the function parseInt no longer allows implementations to treat Strings beginning with a 0 character as octal values."
 
Huh. Well what do you know.
 
!!/live
 
@rlemon Y U NO MAEK SENSE!? Could not understand live
@rlemon I'm not dead! Honest!
 
O_o
Also, was I wrong about hex? Was it actually octal?
 
9:12 PM
!!> parseInt('080')
 
@Neal 80
 
ugh. y am I getting pings for every fucking message....
 
@RyanKinal boo ur wrong
 
SUPER ANNOYING
 
@Neal ... with ES5
 
9:13 PM
@RyanKinal lol
@rlemon that is odd. what do you mean?
 
Just sayin'...
 
!!> parseInt('08')
 
@Neal Just tried it in IE8...
 
@FlorianMargaine 80
 
9:15 PM
@RyanKinal and?
 
@FlorianMargaine 8
 
>> parseInt('080')
0
>> parseInt('060')
48
 
!!> parseInt('0x45')
 
@Neal 69
 
hehe. that was not on purpose
I am 5....
 
9:16 PM
I spent 10 minutes yesterday laughing at conDOM, so you're not alone.
 
Sam
!!>'use strict'; parseInt('060');
 
@Sam 60
 
@FlorianMargaine oh by the way I still managed to fail the implementation of that throttler we were talking about the other day...
I guess I'll put up a question on that on SO.
 
wth....
 
9:19 PM
Public Service Announcement: The "Always use parseInt with a radix" requirement is now mostly a myth (IE9+, Chrome)
 
I removed the random addition you made to your question. If you want to add an answer, then add an answer in the answers section.... — Neal 18 secs ago
@RyanKinal w00t! :-D
@RyanKinal not FF?
 
I haven't tested it yet :-P
 
ahhh
 
Mostly because I fucking hate starting Firefox when I haven't used it in a while.
 
@RyanKinal what about parsing 0x-prefixed strings?
 
9:20 PM
shrug
haven't tested it
 
!!> parseInt('0x47');
 
Ask the creators of the scanner.... Not us... We cannot make a whole API for a random barcode scanner.... — Neal 5 secs ago
 
@Oleg 71
 
m59
lol that was easy!!
var menu = document.createElement('ul');
var div = document.createElement('div');
var title = document.createElement('h1');

var options = ['div', 'menu', 'title'];
var elems = {menu:menu, div:div, title:title}
ordElems = [];

for (elemName in options) {
	ordElems.push(elems[options[elemName]]);
}
for (elem in ordElems) {
	context.appendChild(ordElems[elem]);
}
 
5 mins ago, by Neal
!!> parseInt('0x45')
 
9:21 PM
It seems FF is still busted
... but I'm only on FF 15
 
@Neal I would have pointed him at a MODBUS specification
 
@m59: Please don't use for..in for arrays!
 
Aaaand I should stop trying to watch this video while there's testing to be done.
 
@rlemon idk what that is :-\
 
m59
oops
 
9:22 PM
!!> eval('console.log("Hello World")')
 
@IvoWetzel "undefined" Logged: "Hello World"
 
@ThiefMaster I have heard that so many times.... but why?
 
Anything on Array.prototype will be included in the iteration
 
Yep. FF is still busted.
 
m59
I think performance wise it's a little sillier.
 
9:23 PM
@ThiefMaster ahhh yes. forgot abt that
@RyanKinal booo
 
Additionally sometimes you might not have arrays but DOM Node Lists which contain a TON of stuff in their prototypes by default. E.g. when iterating over any of the selector/class/tagname etc. query methods
 
!!> eval("eval('eval(\"\'foo\'\")')");
 
@rlemon "SyntaxError: Unexpected identifier"
 
user1125394
function parseDate(d){
	var x;
	if ((x = new Date(d)) != 'Invalid Date'){
		return x.toGMTString().split(/ ?gmt/i)[0];
	}else{
		return d.replace('T', ' '); //stupid android
	}
}
 
(And hence, I'm cancelling stars on the PSA)
 
9:24 PM
PSA?
service announcement?
 
Public Service Announcement
 
!!> 'use strict'; eval('aaa');
 
who's
where
 
@Oleg "ReferenceError: aaa is not defined"
 
What did rlemon miss?!?!?!?!
 
9:24 PM
Is there a library/jquery specific room?
 
pointless to have one
so ask here
 
@rlemon Neal called into question the rule "always use a radix with parseInt"
 

 jQuery

This room is often empty cept rlemon. he's always here.
 
1 message moved to recycle bin
I hope your joking but I can't look at that without being ill.
 
Well, just let me find that page again...
 
9:26 PM
Frozen + Gallery + no owner === screw that room right to hell.
 
:mourns the loss of the CSS room:
 
@rlemon lol
 
Yikes @Oleg
 

CSS

Questions and discussions about Cascading Style Sheets (CSS) a...
iz here
iz here and query
 
9:27 PM
So this jQuery room was created as sort of a dickish slight against rlemon?
 
@rlemon Wow... it's... still there. And vaguely active.
 
@ZachShallbetter eh? rlemon created it
 
Maybe I should hang out in there again.
 
No wait he ddnt
 
It's titled "This room is often empty cept rlemon. he's always here"
 
9:28 PM
@Raynos did.
 
Abstraction libraries abstract the APIs not generally the core language. jQuery is still written in Javascript abstracting many of the APIs available from the browser(s)
 
He wrote that himself?
 
jQuery room - ofc I created it
 
wait no rlemon made it
sorry rlemon
 
I made the jQuery room and CSS rooms
 
9:29 PM
Is that directed at me?
 
y u kill room?
 
@rlemon ^ that
 
room was pointless
people still came here
so I killed it
 
it would be like backbone having it's own room or require.js having it's own room
 
9:31 PM
If people come here for those questions why grind on them for not being purists?
 
stupid
 

jQuery

if( awesome ) return "not awesome";
hehe. just for kicks.
 
I don't grind on anyone for not being a purist. I grind on people for taking shortcuts and being stupid lazy SOBs
 
\o/
 
HAH, fair enough
 
9:32 PM
> I don't know Javascript so I use jQuery. So far so good! but this is broken so help me fix it.
then replace jQuery with whatever copy-paste abstraction / script they are using
 
That's the great and terrible thing about javascript. It requires little effort to get into it but takes a lot to get great at it.
I sit at my machine every day trying to figure it out and I'm not even close to being there yet.
 
@ZachShallbetter just like women (sometimes)
 
Sam
!!s/javascript/life/
 
That's why this room is great.
 
@Sam Invalid command /s/javascript/life/
 
9:36 PM
!!/s/javascript/women
 
@Neal Y U NO MAEK SENSE!? Could not understand `s/javascript/women`
@Neal Invalid command /s/javascript/women
 
-_-
 
@Sam That's the great and terrible thing about life. It requires little effort to get into it but takes a lot to get great at it. (source)
 
booo
 
!!s/javascript/life/
 
9:36 PM
@RyanKinal @Neal Y U NO MAEK SENSE!? Could not understand s/life/women @Neal Invalid command /s/javascript/women (source)
 
That's how you do it, folks ;-)
Of course, it hits the wrong message now
 
@SOChatBot haha.... btw now im seeing sex instead of life.... oy...
 
Sam
LOL
 
!!s/about javascript/about sex/
 
@Neal Y U NO MAEK SENSE!? Could not understand s/life/sex
@Neal @SOChatBot haha.... btw now im seeing sex instead of sex.... oy... (source)
 
9:37 PM
-_-
 
haha oy... how do i specify a message?
 
You write a more specific regex
 
@Neal That's the great and terrible thing about sex. It requires little effort to get into it but takes a lot to get great at it. (source)
 
ahhh there we go.
 
Aaaaand done here. Going home...
 
Sam
9:39 PM
!!/choose "JavaScript" "Sex" "Both"
 
@RyanKinal haha I have another hour of work. yay
and baaack to it
 
@Sam Sex
 
duuuh
 
@Sam All of the above.
 
@Sam JavaScript
 
9:39 PM
@Sam Both
 
Sam
:C not bad.
 
I can understand inheritance in sex, but how do you do closures?
 
According to the articles linked this is not true. and I quote, "The !important value appended a CSS property value is an automatic win. It overrides even inline styles from the markup. ". - I'm just playing devils advocate - I will test this now. and NullPointer + articles are correct for Chrome + Windows at least. jsfiddle.net/rlemon/J7HyR see here. — rlemon 4 mins ago
Interesting this is being debated. Can anyone test another browser to see if it acts differently?
 
@rlemon I see green chrome (sorry)
 
yea
!important trumps all
ok - someone see red in there? Thats the browser I wanna know about
 
9:42 PM
Let me try that on IE5.5
 
And it's green on IE5.5
 
@tereško you argue that inline trumps !important but that is never the case
 
Would be strange if it looked red on Midori.
 
9:44 PM
only !important trumps !important
your test case is invalid.
your inline code there is on an element where no !important is defined.
 
Green on IE, FF, Chrome, and Opera. Windows 7.
 
I am in a mood:
 
bah
removed answer
yay I was right about something in CSS!
Woo! (this never happens)
 
9:48 PM
@Neal Coward
 
Haha SO is read-only
@Zirak :-P I am.
And now I cant change anything due to RO
 
oh boo hoo
 
it isnt fully RO yet
cannot change out of CW
 
@MisterPhilip I like the overall design. no complaints there. misterphilip.com but the loading kinda sucks.
I see "blips" of elements before they are hidden
instacode.linology.info see how the entire page "fades in" after load? maybe try this to spice things up
^ constructive crit from a random stranger.
 
yar, I was lazy at the time and just did an onDomLoad
 
9:51 PM
Hi @MisterPhilip how are you?
 
good @Neal - you?
 
@MisterPhilip well change it to opacity 0 then load after domload
@MisterPhilip im good and tired
 
@MisterPhilip no complaints - I just started thinking about shit like this for my own development. Now i'm noticing it a lot more
 
@Neal - then the user without JS wouldn't be able to see it, no?
 
@MisterPhilip hence <noscript> was created :-P
 
9:52 PM
@rlemon - understandable. I can be a stickler for other sites, but get lazy on my own ;)
 
LOL WTF:
It is indeed QR Code.... What is Monkey Business?? Do you have a link by any chance?? — Tony 25 secs ago
ha!
@Zirak ^
 
var style = document.createElement('style');
style.textContent = "body { opacity: 0; }";
style.id = "removeMe";
document.head.appendChild(style);
window.onload = function() {
    setTimeout(function() {
        document.head.removeChild(document.getElementByID('removeMe'));
    }, 3000);
};
^ working js or no js
this is in the head btw
applies the stylesheet before body is parsed.
 
@rlemon look at you being all fancy
 
after everything is loaded removes the stylesheet
 
@rlemon why do u need the timeout?
 
9:55 PM
SyntaxError but you get it :P
 
ehhh
 
@Neal visual effects. Simulated loading.
 
haha. "simulated"
 
@rlemon NEEDS MOAR LOADING ICON
 
9:57 PM
no, what it needs is the modem sounds playing in the bg
 
lol
it seems like the css "content: ... " doesnt work in FF
is that true?
Hmmm now it seems to work... maybe ::before and ::after just do not work?
wait... it does...
 
@rlemon What's the advantage vs. document.body.style.opacity = '0'; ?
 
I have a stylized div::after { ... } and it does not seem to work in ff... but whatever.
@Oleg u ddnt give what we r comparing to...
What is the difference between and monkeys? @Oleg
:-P
 
@Oleg because then I need to know what the initial value is
 
10:01 PM
@Neal I referenced another message...
 
@Neal it's less then 3%
 
this way I just append a new sheet
 
@tereško haha
Ok then.
 
var tmp = window.getComputedStyle(document.body).opacity;
 
@Neal well .. it is .. according to your genome
 
10:02 PM
why does that remind me on
 
but thats a bit much
 
@rlemon point taken
 
1 message moved to recycle bin
@jAndy hurt my eyes... sorry...
 
hehe
 
@tereško what is?
 
10:03 PM
3% difference
 
@tereško btw what and what?
 
3 mins ago, by Neal
What is the difference between and monkeys? @Oleg
 
Neal asked " What is the difference between Monkeys "
Teresko answered " < 3% according to your genome"
 
10:05 PM
@tereško I am very confused...
 
Not surprising
runs
 
that seems to be your natural state
 
@tereško it does doesn't it?
 
!!> var oleg = soChat.querySelector('@Oleg'); oleg.parentNode.removeChild(oleg);
 
@Oleg "ReferenceError: soChat is not defined"
 
10:09 PM
>_>
o/
 
@Oleg what r u trying to do?
 
to leave
 
so leave...
 
oh, there's a link for that...
 
@Oleg yes, yes there is. and you can also just exit the window...
 
10:15 PM
!!> /abc/g
 
@Zirak "/abc/g"
 
huh, weird. Thought I didn't handle that
[Nice going](https://github.com/Zirak/SO-ChatBot/blob/master/source/codeWorker.js#L118), past me. Something was probably ommitted...what about
!!> Infinity
 
@Zirak handle what?
 
@Zirak null
 
@Neal Code-eval passes messages between the worker and the window in JSON. RegExps (and many other things) don't have a JSON representation, so I had to take special care of these things.
 
10:18 PM
ahhh haaaaaa
 
Like you can see above. `Infinity` is not a valid JSON thing, so when you convert it to JSON, you get `null`:
!!> JSON.stringify(Infinity)
 
@Zirak "null"
 
!!> NaN
 
@Neal "null"
@Neal "NaN"
 
hmmmmm
 
10:28 PM
Quick question:What is "(function(window, undefined) {});" supposed to mean to the browser?
 
is there stuff in the function, or just exactly that?
 
There is stuff in the function, that is a snip from jQuery's source code
 
Where in the source?
 
Look at the end
That anonymous function get called with some parameters
 
... it looks like it's redefining undefined.... which is really strange.
 
10:31 PM
Yeah, it's just making sure window is window and undefined is ACTUALLY undefined
 
The undefined thing is a trick for minifiers
 
@Zirak Oh, yeah. Good point.
 
m59
			var elements = {
				listsMenu : this.return_listsMenuMarkup(allInfo),
				listsDescs : this.return_listsDescsMarkup(allInfo, listsMenu, this)
			};
is it possible to pass the first var into the second function like that?
 
undefined = 'hello'
(function (window, document, undefined) {
  // undefined here is actually `undefined` }
)(window, document);
 
m59
listsMenu
 
10:33 PM
@m59, nope
 
m59
sigh, so I need to set the vars outside of that and then add them in?
 
@phenomnomnominal Also a good point
 
Oh. Any way to attach a var to the window as soon as possible?
 
m59
thanks
 
10:36 PM
@Machinarius, what do you mean? You can just not have the var as long as you're not in a closure... but it's a bad idea.
 
I mean, i want some vars defined in a couple external js files to be available to a specific js file (Not using AMD). The code does not touch the DOM in any way to it should be safe to call it before onDomReady fires
 
user1125394
!!> parseInt(Infinity)
 
@cab "NaN"
 
This is throwing syntax error unexpected string. What would cause that?
var dirObj = {
'right' : [ { right:-150 }, { right:50 } ],
'left' : [ { left:-150 }, { left:50 } ]
};
 
@Machinarius that sounds messy. Any way around that "requirement"?
 
10:40 PM
@ZachShallbetter It's perfectly fine, the problem is somewhere else.
A few lines before it, usually.
 
@fencliff To be more specific i want to have my Knockout model on one file, a LocalStorage backend and a third file with some code to kickstart the KO engine
 
Well that doesn't really help much, it's still a bad design to depend on global variables across source files.
 
@fencliff Any suggestions? This is for a Single page application with no server whatsoever
 
var mymodule = (function(myModule) {
  myModule.stuff = "hello";
  myModule.func = function() {
    return console.log("BANG!");
  };
  return myModule;
})({});

var root = exports !== null ? exports : this;
root.myModule = myModule;
@Machinarius, when I export modules I do something like that?
 
oh damnit thanks, I forgot to close a variable.
 
10:48 PM
@phenomnomnominal so that anonymous function is calling itself and assigning its result to mymodule, which then is attached to a global object if it exists. Am i right?
 
Yeah man
 
@phenomnomnominal That'd throw a reference error if exports doesn't exist
@AmaanCheval ah sorry, I completely forgot about you.
 
Anybody ever created courses on codeacademy? Their "support" site blows, and I'm not sure if they're cool with including external JS files in the courses.
 
iframes?
 
root = typeof exports !== "undefined" && exports !== null ? exports : this;
 
10:51 PM
@rlemon you talkin' to me?
 
@Zirak dude, you actually blow my mind.
 
Good night people!
 
 

« first day (836 days earlier)      last day (4098 days later) »