« first day (649 days earlier)      last day (4309 days later) » 

4:01 PM
@Zirak ?
 
@RyanKinal I guess she means it has the good kind of whitespace
 
Are you looking at (old, crappy) ryankinal.com now?
 
@RyanKinal We are now :p
 
Prepare to have a good laugh ;-)
 
@RyanKinal ohgod.
 
4:03 PM
:-D
 
slicktext.com , more than 40% of the page is dedicated to content! (it's actually 51% (yes, I checked)) That's rare
Having the containing element's id be hero is a nice touch
 
hah, yeah
 
welp time for lunch
 
I'm not actually sure why Matt did that... apparently it's some old design standard or something?
 
Your website's design is awesome. Here, I give you my hat:
 
4:08 PM
I'll let the designer know. I did all the invisible, functional stuff.
 
@Amaan she ?
 
@Zirak sexyfoodtherapy.com?!
 
I just grabbed a g element using getElementsByTagName. How do I access the sub elements of g?
 
@dievardump ROFL
 
4:08 PM
Twitter is down ?
 
@FlorianMargaine I...it's....I can explain! DON'T JUDGE ME
 
Twitter is currently down for <%= reason %>.
 
cuddles ice cream
 
<% what language is that ?
 
Ruby
 
4:09 PM
regains cool @SomeKittens By sub-elements you mean?
 
oh i see!
i was scared if they were using node XD
 
@Abhishek it's not a language, it's a template engine
and twitter itself is written in scala iirc
 
@FlorianMargaine oh yes!
scala x_x
how many languages are actually there ?
over 9000 ?
 
django's default template engine is the same as ejs
developers.twitter.com is on drupal
 
4:11 PM
they're using what they think is the right tool for the right job :)
 
The aim of this list of programming languages is to include all notable programming languages in existence, both those in current use and historical ones, in alphabetical order, except for dialects of BASIC and esoteric programming languages. :Note: Dialects of BASIC have been moved to the separate List of BASIC dialects. :Note: This page does not list esoteric programming languages. A * A# .NET * A# (Axiom) * A-0 System * A+ * A++ * ABAP * ABC * ABC ALGOL * ABLE * ABSET * ABSYS * Abundance * ACC * Accent * Ace DASL * ACT-III * Action! * ActionScript * Ada * Adenine * Agda * Agor...
 
<g id="41" class="point">
<rect height="25" rx="10" ry="10" width="120" x="5" y="5"/>
<text font-family="Verdana" font-size="15" x="10" y="22">Plant Watering</text>
</g>
 
Check that mofo page out!
 
the rect and text elements
 
@SomeKittens elem.children
 
4:12 PM
@Zirak yep :)
 
Gives you direct element descendants (DOM4, browser incompatibility, yada yada)
 
!!/mdn elem.children
 
@Zirak What did you use to get content percentage?
I want to check my actual employer's site :-P
 
4:13 PM
@SomeKittens if you just want the first child, and doesn't support legacy browsers, you can use firstElementChild, otherwise you need to use children[ 0 ]
 
@RyanKinal document.getElementById('hero').getClientRects()[0].width / document.body.getClientRects()[0].width
 
@FlorianMargaine I need both
 
@Abhishek he*
 
@Zirak I get 77%
 
Yeah... I'm not sure how this applies, actually
 
4:16 PM
@FlorianMargaine On slicktext.com ? I get 0.514435..., which is ~51%
 
@Abhishek It's a programming language...
 
you must have a larger screen than I :-)
 
21.5'' :D
 
and #maincontainer { width: 980px; } does it all :)
13" :p
 
0.5149763531266421
 
4:18 PM
Yeah... that depends entirely on resolution and browser width.
 
s/screen/resolution, actually
 
I recommend euthanasia
@RyanKinal Correct, what else?
 
OMG 1.5336463223787167
Just sayin'.
 
you're on mobile or something? :D
 
No, I just made my browser really small :-D
 
4:20 PM
heh, did the same to see if there were some responsive design :p
 
Why doesn't this log anything?
 
but it's just 960px so...
 
it logs for me
 
logs for me too
 
x2 x3
 
4:21 PM
if you're trying in IE, it's completely normal that console.log doesn't work.
 
Chrome
 
People are insane
 
Pretty sweet
 
(non-fiddle) It logs elements, but elements[i].children is undefined
 
4:26 PM
Rendering Difference between FF and chrome is crazy
 
Ah, just did it another (less fancy) way
any quick way to get all the numbers > 16 from an array of numbers?
 
arr.filter( function( el ) { return el > 16; });
 
Sem
Hey guys, I'm searching for a solid way to give an AJAX error from PHP. Is changing the HTTP headers the best way to go?
 
the http status code, you mean?
401: unauthorized, 404: not found, etc.
 
Sem
@FlorianMargaine I think so yes.
 
4:31 PM
The following is a list of Hypertext Transfer Protocol (HTTP) response status codes. This includes codes from IETF internet standards as well as unstandardized RFCs, other specifications and some additional commonly used codes. The first digit of the status code specifies one of five classes of response; the bare minimum for an HTTP client is that it recognises these five classes. The phrases used are the standard examples, but any human-readable alternative can be provided. Unless otherwise stated, the status code is part of the HTTP/1.1 standard (RFC 2616). The Internet Assigned Number...
2
it is a good way, yep :)
don't expect the success callback in jquery to work with this though
 
Sem
@FlorianMargaine A way you use as well?
 
it's a standard way
... literally
 
Sem
@FlorianMargaine Well, do you? :)
 
Sem
@FlorianMargaine And why wont the success callback work with this?
 
4:33 PM
because the request won't "success"
if it's not getting a 200 status, it means the request failed in some way or another
 
Sem
yea, but you can use the error callback right?
 
which is why there are the error and complete callbacks in jquery $.ajax
right
 
Sem
@FlorianMargaine And is it a good idea to have a standard error callback in the ajaxSetup?
 
depends on your use case
if all the ajax requests will have the same error behavior, sure
 
^ and THAT could be a good idea to manage a way to have something like that.
 
Sem
4:36 PM
@FlorianMargaine great, thank you lots for the quick informative answers. Star for you!
 
stars are not for this
they don't give rep or something :)
 
give random upvote to show your respect :D
 
Gold stars here are worth exactly as much as they were worth in 2nd grade.
 
Sem
@FlorianMargaine Stars are for favouriting things right? in this case an answer to my question :)
 
@Sem Nop stars are not favorites, they are for usefull informations (and sometimes funny/amazing ones) according to the current room subject
 
Sem
4:38 PM
@dievardump Wheres the manual?
 
The Manual
(1)Stars are not favourites
(2)Give Zirak more beer
 
You only deserve slaps
 
Sem
@Zirak How about more hair for your moustache
 
glares Do you know how hard it is to grow a moustache as magnificent as mine?
I can get it to burst into flames. Without ever running out.
 
For Zirak Moustache
 
Sem
4:42 PM
Ah well " It is too late to undo this operation " sorry @FlorianMargaine :D
 
For your face
 
and you can reclick on the star to cancel it
 
Reserved words should throw errors when used as properties right? Relevant example: this.export (not sure why any dev would name something that generally but that's another issue...). So why is IE8 the only browser failing that in strict mode?
 
Sem
@FlorianMargaine I receive an error saying what I said in quotes.
 
4:44 PM
!@#$ing browser vendors are such pussies. Just break bad code FFS.
 
@ErikReppen IE8 doesn't have strict mode, and reserved names as properties are possible
 
Even when used with 'this'? It could refer to window.
 
it's when they're declared that it matters
 
Has anyone used a templating engine for JS and PHP?
 
var obj = {
    delete: function() {}
}; // error

var obj = {
    'delete': function() {}
}; // no error
 
4:46 PM
for JS and PHP = ???
 
for might be the wrong word to use
 
42 secs ago, by Florian Margaine
var obj = {
    delete: function() {}
}; // error

var obj = {
    'delete': function() {}
}; // no error
alright
gotta go
cya guys
 
I want to assign the values to variables and then render the templates, in both PHP and JS
 
That makes some sense to me but in this case it's this.delete
this.export = function(){ etc..} specifically
I just thought 'identifier' applied to keyword, var, and property names.
Well, not that you can really define keywords I guess, unless getters/setters in the global namespace count.
 
@RyanKinal what ?
supposed to support what ?
mobile phones ?
 
4:51 PM
It's supposed to support ooooooooooldness
 
anyone know how to use a build profile with require js without actually having to build with r.js?
 
I designed and built it about 10 years ago
 
I'm just pissed. They already nuked XHTML strict by just tossing it into a generic 'standards mode' where crap HTML still doesn't fail like it should and HTML5 strict looks like a vapor spec.
 
GitHub is really getting on my nerves.
 
0
Q: Instantiate TinyMCE via JS ( rather than PHP/wp_editor )

Tom J NowellI have an instance where a tinymce editor is being created purely through js, generating ti via wp_editor in php isn't an option. How would I do this in v3.4+?

 
5:02 PM
2
Q: Average career programmer with no passion: try harder or try related IT field?

Christian LokenThis article really struck a chord with me. Since the first year of studying programming at university I have known in my heart that computer programming is not meant for me but I was afraid to do anything about it and here I am now 12 years later programming with no passion. I am a career prog...

^links to Coding Horror, has question edited/answered by Atwood
 
@FlorianMargaine I'm not seeing fails of x{delete:'something'}
Does use strict fail in a console?
 
(function() { "use strict"; eval = 4; }())
SyntaxError: Assignment to eval or arguments is not allowed in strict mode
 
o/
 
Ran the line in the console, got that (Chrome 20)
 
(function() { "use strict"; window.eval = 4; }())
eval
TypeError: Object 4 has no method 'call'
(in chrome 22)
Better yet:
(function() { "use strict"; window.eval = {call: function() {console.log('lol') }} }())
then type "eval" in the console. As each letter is typed "lol" will log in the console, and pressing enter will log another "lol"
 
5:13 PM
haha, nice
 
(function() { "use strict"; window.eval = {call: function() {console.log('lol') }} }())
TypeError: Object 4 has no method 'call'
ahhh had to refresh
 
yes you have to start clean or this won't work
pausing the debugger before you type 'e' brings you to the InjectedScript.evaluate function with makes use of eval, which is why the console logs "lol" on each keypress from then onwards
 
lol
 
I have a function that won't loop back:

function checkElement(child)
{
parent = child.parentNode;
if (child.nodeName != 'IMG')
{
if (child == parent.lastChild)
{
child = parent.firstChild;
checkElement(child); //doesn't work here...
}
else
{
child = child.nextSibling;
checkElement(child); // but it works here!
}
}
return child;
}
 
what are you trying to do
 
5:18 PM
cycle through nodes to get to the next IMG node
it works until I get to the end
child = parent.firstChild returns the right node
but then it stops
 
It was a very well known trick in France
BEfore He posted his video on the Internet
 
cycle through? as in you want ALL images on the page?
 
Now there is some check to be sure
 
or all images in a container?
or all images as siblings?
 
all siblings
i checked the node index and it resets to zero, but then in doesn't call checkElement(child) again for some reason
yet the other if statement works fine
 
5:22 PM
you know text and whitespace are also nodes
 
that's the reason I have if (child.nodeName != 'IMG')
it detects if it's an img tag and goes to the next if not
and that works
wait... I think it wouldn't work if the last node is an img tag.... I think I need to reset it before the check.
yeah that's it. disregard
 
I wish JavaScript was called something else... it is not like Java..
 
C#script
C-dull
 
Yeah... something with C.... CScript
 
naming conventions taken from java, comma, script
 
5:30 PM
It's actually from C
 
mocha and livescript were good names
 
Agree.
 
C-mol script?
 
I still call it meowser-script in my head
 
so true
 
5:34 PM
C-mol Script? Why?
 
C-mol is the most saddest chord in existence. If you don't know javascript well...
 
Why isn't JavaScript multithreading?
 
Well, there are web workers...
 
Oh... whats that?
 
Because they wanted it event-driven and predictable
web workers are a new feature that allow you to run scripts in parallel, but are really only faster and truly non-blocking if those scripts are solely crunching data
 
5:37 PM
Because they wanted it predictable and event-driven
^my thread took longer to execute
 
heeeeeeeeeeeeeeeee
 
Lol... ;)
 
@RyanJMcGowan jsfiddle.net/3UUpm
that is grabbing children as well.... although it should not be.
i'm confused now.
ugh
 
hey rlemon
I remember you :)
 
Anyone want to review a blog article?
 
5:40 PM
hey userRandomString.... I do not remember you :)
 
Oh ok... you made that PHP counter for me :)
 
ahh
still nothing but ok :P
 
You made that xhr request to start the php and returned the number... anyways ... it might be a month ago
And by the way: Its not userRandomString - its userRandomInteger ;)
 
> A decibel is one tenth of a bel, a seldom-used unit.
Mind blown.
@user1426486 Dude I have to check to see what underwear I put on this morning - Like i'm going to remember ~1month ago
:P
 
@rlemon I got it to work by adding a node after the last. It was the order that I was doing the if statements.
 
5:49 PM
look at mine - albeit it does not work - it is a cleaner way about it methinks. but eh.
 
Im you underwear?
 
well you do ride my ass ;)
jokes
 
There are advantages to blocking in a higher level language. I assume one of the perks of node is that you don't really have to sweat queuing stuff as much as long as JS acts as more of a messenger/event-handler.
 
imo blocking is a pita which we usually try to work around
 

« first day (649 days earlier)      last day (4309 days later) »