« first day (500 days earlier)      last day (4451 days later) » 

12:44 AM
Hi thomas - i just solved my issue ! :) if i see you in here some time ill show you how i solved it :) encase you were curious. Cheers
 
hey
 
Can anyone help me with my countdown timer?
Please*
 
wats wrong with it
 
I want to make it better
Its shows time like this ATM

01:25:05

I want it to be like this:

1 hour, 25 minutes and 5 seconds
 
12:50 AM
click this
use option 2
that should explain how u convert it
 
 
4 hours later…
4:23 AM
I just had a great idea... I'll invite prostitutes to the Christmas Ball!! =D
 
4:43 AM
planning things a bit early, are we? :)
 
4:54 AM
planning makes perfect :D
 
GGG
proposing perfectly planned prostitute parties? Perplexed.
 
indeed
 
GGG
puzzling.
 
5:10 AM
that's the whole point...
invite unsophisticated prostitutes to a formal event...
it'll cause chaos... and be funny as hell
it's been done =[
Andrew Jackson was a boss
 
5:27 AM
I have began dissecting jQuery to only use parts I need. I think that'll speed things up about 600%
jQuery's hide function:
if speed is set, just pass everything to the animate function
otherwise do 24 lines worth of loops to set one thing's style to "display: hide;" (without easing or any animation whatsoever)
is jQuery trolling us?
and this doesn't even make any sense imo:
`if ( speed || speed === 0 ) {`
basically, if speed is 0, instantly hide it anyways through the animation function, and make all of those loops in the else statement completely pointless???
 
6:16 AM
somewhere, resig is still laughing about all that
 
GGG
6:29 AM
@andrewjackson if I had Andrew Jackson's steez I'd have classy prostitutes at every event. I'd probably also host MMA matches between the prostitutes, and have different classes such as chickenweight, hookerweight, milfweight, etc.
also congratulations/apologies for dissecting jq
 
that's a lot of hookers... we'd have to use jQuery to sort through all of those different classes, and display them in a pretty UI, to enable utilizing the hide function on their lingerie and clothing. as a benefit, we would loop through each one hundreds of times and really get our money's worth.
 
GGG
I think jquery and hookers will work out wonderfully, actually... Hookers love chasing dollars.
$("#hookers")
 
I've got $20 right here! ;)
 
GGG
@andrewjackson how much trouble does jq go through to get $(20) --> [20]?
 
6:44 AM
Just woke up, read the recent messages and thought I'm still asleep dreaming. Apparently I'm awake. :D
 
probably about and 6 iterations and 300 lines of code
do I dare count?
 
GGG
@OctavianDamiean no you're in the matrix ;p
 
A very weird kind of Matrix though. :D
 
GGG
dude i don't know what part of the matrix you're from but there are tons of hookers round these matrix parts
 
ever have those dreams where you realize your dreaming, so you concentrate all of your energy on making a naked woman appear, and instead you get your half naked mother with no shirt/bra on, and then you wake up in sweat and slightly ashamed and scared and wondering what this means?
no? just mean?
yaaaaaa.... I'll just keep those dreams to myself, but in my defense, it's not like that's what I wanted.
 
GGG
6:52 AM
the first part yeah
not so much the second part ;)
 
I was sure that was normal, but I better go see someone about that just in case.
 
GGG
well to be fair whenever i try to summon ppl in dreams i sometimes get the wrong person, but it's never been my mom
i figure that's just the way it goes
or you get someone and they change into someone else after a little while
i also find it really hard to keep any sense of time during a dream
 
I wonder if it has anything to do with my mom walking around the house without a shirt/bra on in my childhood. hmmm
 
GGG
yep i bet that would actually do it
 
GGG
6:55 AM
instead of summoning naked women you should try to get someone specific
 
that usually works... personally, I like flying
 
GGG
flying is dope but i always feel like i'm cheating by riding on some invisible thing
 
ya, like there's always some rules to moving a certain direction
like you gotta move your body a certain way to move a certain way...
 
GGG
yeah exactly... and it's hard for me to suspend disbelief while flying so it can wake me up...
 
I wanna try moving anywhere I want just by thinking it, I can't ever do that
 
GGG
6:58 AM
no that would be cool
like controlled blinking
 
moving at the speed of thought
the earliest dream I can remember is flying
two dudes set relationship status to single within minutes of each other on Facebook...
I post a screenshot asking if they happened to be dating each other...
lol shitstorm
/my-night-is-complete
 
GGG
hahah awesome
 
7:47 AM
wow
This room is priceless.
 
any one know jqury ui ?
dialog ? box ?
 
what about it?
 
8:04 AM
@Ravi the documentation knows it pretty well, but shoot anyways
 
8:24 AM
Hi
 
Hello :)
 
http://jsperf.com/jquery-dumb-hide
I'm going to hurl
 
@andrewjackson: add some ticket to jQuery github :)
 
they specifically make hide(0) slower on pupose
if ( speed || speed === 0 ) {
the source of the hide function is the most grotesque thing I've ever seen
did some research, it has to do with adding it to the animation queue to work with delays
 
uh...
they could use vanilla js inside their own functions :/
display = jQuery.css( elem, "display" );
could be better like this: display = elem.style.display;
 
8:40 AM
I 100% times 1000 agree with that
 
and I don't think there is any cross browser issue with this
 
the way the have it, it's just fails safes inside fail safes of fail safes
 
	// For internal use only.
	_data: function( elem, name, data ) {
		return jQuery.data( elem, name, data, true );
	},
oh really?
 
lmao wtf??
 
that's just one more function call for nothing
oh right, they add this true
that's just abstraction over abstraction over abstraction...
 
8:42 AM
*facepalm*
isn't jQuery among the fastest of the frameworks?? if that's true, this is sad.
 
yeah :/
I don't get it
I mean
 
http://mootools.net/slickspeed/
these are all outdated though
 
they could be way faster
yeah, jquery 1.7 got some great speed from what I heard
 
It must have something to do with loading/compiling times
personally, for an all ajax project designed to never need to reload the page, I wouldn't mind it loading a little slower.
plus there's browser cache
but I wouldn't want to rely on cache
 
yeah
uh? depending on the project, I definitely would
from what I remember, jQuery is in like 80% of browsers' cache
for an offline website app though, I'd just use the appcache :3
hey look
			if ( this.length ) {
				data = jQuery.data( this[0] );

				if ( this[0].nodeType === 1 && !jQuery._data( this[0], "parsedAttrs" ) ) {
					attr = this[0].attributes;
					for ( var i = 0, l = attr.length; i < l; i++ ) {
						name = attr[i].name;

						if ( name.indexOf( "data-" ) === 0 ) {
							name = jQuery.camelCase( name.substring(5) );

							dataAttr( this[0], name, data[ name ] );
						}
					}
					jQuery._data( this[0], "parsedAttrs", true );
				}
			}
they use sometimes .data, sometimes ._data...
 
8:50 AM
doesn't make much sense, and all so they don't have to right an extra "true"
 
this ._data function is definitely useless :/
 
jQuery._data( this[0], "parsedAttrs" ) would look like jQuery.data( this[0], "parsedAttrs", undefined, true )
it would be nice to have no perf difference for somefunction({'varname':'something'});
 
?
oh between several arguments and just one object?
 
well, the whole point of _data is to avoid having to write "undefined, true" for some arguments
 
8:53 AM
yes... it would be nice to be able to just use objects, however the browser would need to construct a whole new object that way
 
I'd like to run some regex to replace the _data calls with data and adding some "undefined, true" to every call, and just perform some benchmarks
it does construct a new object, btw
deleted
 
yes, but that way would be an extra object
 
is constructing a new object way more expensive?
 
you'd still have to construct arguments for the object we pass
 
yep, my bad
I said something stupid :p
 
8:55 AM
have no clue, all I know it's it's just an extra step
I'll do a jsperf
 
there is the cost of declaring several variables for the arguments object, where there is only one object on other side... but that seems micro optimization :/
not sure where this is going :p
 
yes, but anything you wouldn't have to do for arguments, you would still have to do for objects plus some with the naming
jsperf.com/objects-for-arguments just as I thought =[
it's still extremely fast, but with just arguments is twice as fast because it's half the objects to construct
 
yeah :(
 
longer varnames made just a slight difference though, which is good
 
yeah it doesn't really matter
 
9:03 AM
I mean... it's not like our apps need to be the speed of light though. lol
 
variable names can be as long as they want, it still takes as much space in memory
 
it could potentially make a difference when executing a long sequence of code, but for things like events it's okay
 
yeah, but a 70% difference is still huge :/
 
ya, but look at the operations per second
 
btw, for custom events, you'd better use objects :p
or
I need a jsperf for this
to compare transferring a json stringified object as simple argument, instead of a full object
the cost of stringifying and vice versa should be more... I'm stupid sometimes
 
9:05 AM
Oh my gosh! The jQuery hide function is from 87% to 100% slower than raw JS?
Jeez!
 
it's not the transfert that costs, it's the object construction
 
yes, that's insane
yes less objects means faster code
 
Seriously ... screw jQuery.
8
 
I guess that's key here
starred lol
 
28 mins ago, by andrewjackson
did some research, it has to do with adding it to the animation queue to work with delays
 
9:10 AM
so for my design pattern, I'm going to use just straight arguments for anything that will ever go through a loop and I'll allow objects to be passed as a single argument for functions involved in short sequences of code triggered on events
 
@OctavianDamiean: the worst is when they use custom jQuery functions such as .css inside their API (inside of elem.style.*, which is way faster/cross-browser)
@andrewjackson: all events pass objects IIRC btw, default events do (MouseEvent, etc). You should also do it for your custom events
 
well, I mean more like, for my own functions that I defined that are executed within an event function
 
so, the DRY principles doesn't do it for you guys? yes .hide() is slow (considering the trivial use-case without the need for an animation queue), but .style.display = 'none'; needs wrapping or else it's not smart (think in the long run, maintainability etc - DRY).
 
that can't be right
 
@Joel: I somehow agree, but I don't see how display = elem.style.display is any worse than display = jQuery.css('display'). The DRY concept still applies. As well as maintainability, etc.
 
9:14 AM
poor terminology there
it's not "smart" it's "safe"
smart would be not sacrificing speed
 
@FlorianMargaine i was just referring to the jsperf. didn't do a full backlog, sry
 
@FlorianMargaine You kiddin' right?
They really do that?
 
They do.
 
fml ...
 
look at the hide function
fml ?
 
9:17 AM
jQuery burns through speed like a democrat burns through money
 
@FlorianMargaine would still consider the internal use of .css() to be better than using .style. - see the discussion complaining about ._data() vs .data()
 
@FlorianMargaine fml stands for fuck my life
 
@FlorianMargaine if anything, they should use a compiler to replace the trivial cases that do not have cross-browser concerns
 
@OctavianDamiean ya... fuck your life
 
@OctavianDamiean: a quick google search showed me that, but I couldn't replace it in this context, which is why I asked you... :x
@Joel: yeah, I see your point...
it's just
 
9:19 AM
@FlorianMargaine fml because I'm forced to use a fair amount of jQuery in a project ...
 
you're within the library, you're thinking about maximum efficiency, the jQuery codebase is not that huge
@OctavianDamiean: bah, I'm doing the same... using Drupal :)
 
@OctavianDamiean how many devs?
 
@Joel Two more.
 
@FlorianMargaine no, you think DRY and collaboration friendly. more devs means you really have to start reusing code. see my comment on using a compiler though
@OctavianDamiean are they js purists?
 
there are limits though... DRY is a concept that must not restrain you from writing fast code
 
9:22 AM
@Joel Sadly they aren't. :(
 
@FlorianMargaine yes, it is
@FlorianMargaine this is not a premature optimization, but for quality, DRY is so much better
 
and it's a concept, it must not hinder you and you must think carefully about its limits
and in jQuery, I do think they're going overboard with it for DRY's sake
 
@OctavianDamiean then is guess you'll have to bite it ;)
@FlorianMargaine did you compare with the minified code?
 
It's just a concept.
hm
no, I didn't ;o)
but I don't think the minified code takes out the DRY principle for performance sake
it wouldn't minify otherwise...
if it adds some code everywhere to make it faster
but... that's a concept of compiler that's actually a good idea
 
@FlorianMargaine @FlorianMargaine nor did i - but i consider DRY to be waaay better than this optimization (yes, i know, it affects performance in a loop) - and that can be taken care of by the compiler ("minifier" whatever)
 
9:25 AM
hello everyone
 
not a minifier, but something that allows you to write clean, DRY code, and then when it "compiles", it replaces functions calls with inline code
thus, reducing the functions calls, which is, IIRC, the worst performance hit
 
@FlorianMargaine try closure compiler
 
that's what I'm developing
 
it does that?
tch.
 
my concept is that jQuery shouldn't be done in the browser, it should done in the editor.
 
9:27 AM
@FlorianMargaine it does stuff like that, at least on advanced. not that i double checked the compiled/minified code
 
ok :)
@andrewjackson: good idea.
the js code is just plain old js after your compiler then
 
@FlorianMargaine you can't have it. it's mine! lol
 
no jquery internal function anywhere
yeah don't worry, I haven't got enough time :')
 
@FlorianMargaine also, this doesn't consider the animation queue, which is a usable feature (not intended for performance)
 
@Joel: my example didn't take this into account
I didn't say anything about the hide function overall because of this
it's a feature, of course it's going to take longer
 
@andrewjackson: but have you looked at how closure compiler does this? It doesn't do it well enough that you have to write your own compiler?
@Joel: thanks, looking
 
@andrewjackson don't write your own compiler plx - improve upon existing and save the world! =)
 
@FlorianMargaine never even heard of it, but that's only a feature to my code editor, not the reason I'm making it
 
@andrewjackson: then don't reinvent the wheel... use it if you can :/
 
pfft I'm trying to make a living, not be a hippy
 
9:32 AM
exactly :)
time is money
if you use it, your feature is done.
 
@andrewjackson and what makes you money writing stuff that i can use for free already? can you beat stuff that is written by google engineers and used by google internally?
 
@Joel: great link :-) have to check perf with jQuery compiled/non-compiled :p
 
@Joel you would love to trick me into telling you what I have up my sleeves, wouldn't you? lol
momma didn't raise no fool. lol I don't go blindly into projects hoping to get something out of it, I do have a plan. enough said. lol
 
@andrewjackson trick? ok, your client pays you lacking knowledge of closure (as you lacked it too, until now), but you could at least sell your client something that google has produced and use your time better - otherwise you'll sell subpar code and your client will find out about closure in time
 
@Joel: jQuery is not compatible with Closure compiler
 
9:35 AM
@Joel see, the problem with that is that I'm my own boss and I always will be.
 
@andrewjackson: I do think it's a waste of time to reinvent the wheel when it's been done and tested already
 
I'm an entrepreneur, a dying breed. I'll take my chances.
 
you won't reinvent a server module for every node.js app you write just to add an HTTP server.
 
@FlorianMargaine that might be - i heard they switched to uglifyjs that seems to (byte size wise) produce results that are equal or better. no promises on performance on either though
 
@Joel: yep, uglifyjs just minifies without doing any more
closure compiler in advanced mode affects performance as well
 
9:38 AM
silly fools, with mine it'll NEVER even be expanded, so there's nothing to minify. can you fathom that?
oh no, I've said too much
 
@FlorianMargaine i'd love it if advanced mode could save the world. i already use closure, but afraid of advanced mode, since i must write many, many more tests to make sure it really works for me
 
no, but seriously... technology on a the logical end can still go VERY far
 
@andrewjackson are you saying that you write your own optimizations?
@andrewjackson i mean inline optimizations all the time?
 
chat.stackoverflow.com/transcript/message/2772388#2772388 Do you think he knows that Douglas Crockford said the ECMAScript community is thinking of implementing some Coffeescript syntax and stuff ?
 
9:39 AM
it's more like it's own language that get compiled
it's javascript, but it's not
that's not even the half of it though
 
@andrewjackson: what kind of license will you have for your compiler? :)
 
you actually read those things? lol
 
yep
if your library is GPL, there may be chances I won't ever use it
 
idk yet, I'll have an attorney figure that out
 
@andrewjackson ok, but if you compile to javascript you could use closure compiler as a last optimization step =)
 
9:42 AM
but the question mainly is: will it be opensource or closed source?
 
impossible. it's a web based text editor.
 
@DieVarDump Doug should probably do something else instead of proposing bullshit like that.
 
never used CoffeeScript, is it that bad? I heard some good things about it (clean syntax, allows to avoid common JS pitfalls...)
 
which is why DRY js is exceedingly important
 
9:43 AM
@OctavianDamiean It was not a proposition but an assertion
 
Oh, I see.
 
oh... Closure Compiler is web based too??
with an API??
 
He think that CoffeeScript is hard to use, because you have to make code, compile, use
 
I may consider for early versions to just fill in the gaps
 
But he likes some parts of the syntax and stuff it implements
 
9:46 AM
@andrewjackson a friend of mine wrote his master's thesis on distributed text editing. have a look?
@andrewjackson damn, didn't check - it's in swedish =(
@andrewjackson Closure Compile Service
@andrewjackson but you can download the .jar and execute it on your own server
 
I don't like the syntax and neither do I understand its use.
 
quick view and translate? am I a wizard? lol
 
@andrewjackson: "The page you requested was too large to translate."
:(
hm btw, I've got a question
 
9:49 AM
what happened to Google converting to HTML?
 
if I do the following :
function stuff() {
    for (var i=0;i<10;i++) {
        var j = 42;
    }
    j === 42 // is that true?
}
another way to ask the question is: is a for loop considered as block scope for variables?
 
no
j === 42; //->true
 
thanks :)
 
iirc lol
 
well that's what I think too, but I always declare a variable out of the for loop just in case
 
9:54 AM
(function stuff() {
    for (var i=0;i<10;i++) {
        var j = 42;
    }
    console.log(j === 42); // is that true?
})();
 
I'm just not sure it's useful at all -_-
 
f12 in chrome, copy paste into console, it says true
so I recalled correctly =]
 
alright, nice x)
aaaaand
 
Isn't i++ (pre and post-incrementing) discouraged?
 
it actually makes sense
 
9:55 AM
well, there's no block scope in js
 
a for loop is just something that takes your code and runs it many times, but the block scope is not changed at all
 
@OctavianDamiean not sure about in JS, but it is in PHP so I use ++i in both
 
I generally use i += 1
 
@OctavianDamiean: I read somewhere about this, but I still see people using i++ everywhere (and not just bad developers)
 
@OctavianDamiean at least Mr. Crockford says so ;)
 
9:56 AM
Oh, right! That is where I read it.
 
i +=1 is less readable than ++i, though
 
there's actually a pretty big performance boost in PHP for using "++i" on large loops
afaik
 
@andrewjackson: really?
 
once again, iirc lol
 
@andrewjackson Why that?
 
9:56 AM
which I usually do
 
from what I know it's not about performance, but rather about operator precedence
 
I never read why it was, I just read that it was. lol
 
All I know it does is this.
18
A: Simple for loop not working

Octavian DamieanYou are missing a semicolon at the end of break. ;) And even with the semicolon it will not work as you'd expect it to since it will count from 0 to 2. You have to write it like this to get only 1 2. <?php for($a=1;$a<10;++$a) { if($a==3) break; print"$a "; } ?> Note...

 
@andrewjackson ++$i yeah, but ++i will result in a Infinite loop :p
 
also, javascript.info uses post-decrement most of the times, it seems
which is confusing ;o)
 
10:00 AM
what? this doen't do an infinite loop:
(function () {
for (var i=0;i<10;++i) {
console.log(i);
}
})();
 
You said in PHP ^^
 
oh, yeah lol
I thought "++i" in PHP would be a syntax error...
now that I think about it, I think I have actually had infinite loops in PHP with that little mistake
those are nasty to track down when you forget about them
 
php in this regard is very similar to javascript - people like to pretend that they do not need to learn either one to use them
 
ooh, the "wtf did just happen" - moment when some infinite looping occurs... gotta love it
 
Still better than running into a heisenbug ...
 
10:05 AM
haha, yup
"dammit, where did it go?" ;)
 
console.log...
console.log...
console.log...
console.log...
console.log...
 
This skeleton fiddle is for people that want to use the Bootstrap framework in their fiddles. Just fork it and fiddle around.
 
10:27 AM
@OctavianDamiean why linked to a specific version of the js but not css?
 
That is the best one can do at the moment. Bootstrap is not yet on any of the major CDNs like jQuery and others.
Once it is, the Skeleton will be useless because I guess the jsFiddle guys will implement it as an official option.
Currently Bootstrap itself is on CDNJS but the CSS isn't. :(
 
10:46 AM
hello people, is there an issue with using window.onkeypress = function in ie7/8
?
 
@FlorianMargaine thanks, must be my code then :(
 
@Finnnn: but from my experience, I'd rather use keyup
 
\o\
/o/
\o\
 
yeah, read that after I wrote my q. Have changed,
 
10:51 AM
hello @Raynos :)
 
Hello Raynos.
 
posted on February 28, 2012

On 10th and 11th of May the second edition of Mobilism will take place in Amsterdam. Like last year, it will concentrate on all aspects of the mobile web. For this edition we’re happy to welcome Heiko Behrens, a programmer and author for over ten years now focusing on mobile. He will share his thoughts on mobile frameworks and how to get the best results out of them. The Mobilism lin

 

« first day (500 days earlier)      last day (4451 days later) »