« first day (103 days earlier)      last day (4847 days later) » 
00:00 - 21:0021:00 - 00:00

12:02 AM
"It's not a bug: it wasn't designed to do what you're trying to do." -- Doug Steele, Microsoft Access MVP, July 2002
Pretty much the best answer to any question about Access, ever.
 
that's awesome
 
Annoying answeres to easy javascript questions saying "use jQuery" lovely.
 
I'm beginning to dislike jquery, just because of the number of people who use it as an excuse not to learn to do things intelligently
 
:) For intelligent code we have such things as underscore.js.
 
12:14 AM
David: that sounds unintelligent in itself...
 
whats an easy absolute method?
 
Math.abs?
 
I was thinking something simpler :p
 
x<0?-x:x?
 
hiya, can you guys do me a favour and load typeofnan.com/lab/mxhr-stream
try both buttons and tell me browser + performance :) ?
 
12:29 AM
FX4beta 6756ms vs 5296ms
Although the latter one froze my browser for around 2 seconds
 
ok, sounds odd but interesting. never played with ff4 so far
 
top one 27902ms in chrome :S
 
does this behavior repeat when loading again ?
 
21626ms for bottom
 
yes, the second one doesn't allow for any page refreshes as it seems
it only updates the images twice, at first a few lines and then all of them
the upper one shows more progress
 
12:32 AM
@david: whats the first?
@IvoWetzel: can you please reload the site and try again
 
@jAndy i posted both, in 2 messages, 27902 vs 21626
 
Chrome dev, 4807ms vs 1647ms
 
top: Loaded in: 7487ms (refresh: 5254ms) bottom: Loaded in: 4330ms (refresh: 4043ms) chrome stable
 
Firefox really does not perform all that well in dynamic image creation :(
 
@jAndy Now they stream in nicely but its 6091ms vs 8447ms
No speed difference in latest Chromium trunk
 
12:38 AM
The standard deviation on running a badge is huge
4s ~ 10s
 
Yes, server is not deflating data atm. Looks like safari/chrome perform much better than FF/Spidermonkey anyway
 
Classic has a higher average but smaller sd. Where as multi-xhr has a smaller average but higher sd.
 
@IvoWetzel: does Chromium mean the OS or the browser?
 
Is answereing javascript questions referencing _ bad? Is there anyway for me to use map/filter/reduce without relying on a whole library?
 
@jAndy Chrome 8.0.552.224 on Win7, top 33675ms bottom 18661ms. Trying IE6...
 
12:41 AM
@jAndy Browser
 
@Nathan don't try IE6 ! The horrors. The horrors!
 
@Nathan Great! Come back next year with the IE6 results :D
 
@Raynos doesn't draft ECMA something have map/reduce?
 
@Nathan: IE < 9 won't work since there is no support for base64 encoded images
 
@Nathan there are array.reduce, .map, .filter but that's not crossbrowser
 
12:42 AM
which the site is using
 
@jAndy ahah. IE6 -> 51768ms on top, (Not Responding) on bottom :D
 
@Raynos: whats the problem in using a library? I guess they all marshall the request through the native version if available
 
oh no! now it has a whole bunch of broken <img>s after 41830ms, on the bottom
 
@Nathan: no IE<9 support !
 
Opera 11, Windows, 2021ms vs 1920ms.
 
12:45 AM
In javascript/jquery, If i want to remove a portion of a string, what would I use? The .trim() method just removes whitespace.
 
@jAndy ie9 on win7: 30841ms / Error on Page.
 
@Gallen: in general, .substring & .slice do help there
@Nathan: whats the error ?
 
@jAndy thanks!
 
"Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; InfoPath.2)
Timestamp: Thu, 27 Jan 2011 00:47:43 UTC


Message: Object doesn't support this property or method
Line: 5
Char: 452
Code: 0
URI: http://www.typeofnan.com/js/supply.min.js?v=5
"
 
@jAndy there's no issue with that. The issue is answering javascript questions but relying on a library that is not jQuery in your answer :)
 
12:49 AM
@Nathan: is that the default IE9 UA string ?
 
@jAndy guess so
oh my bad this is IE8
sorry
 
@Nathan: wondered about the MSIE8.0 in the ua :p
 
Off-by-one error.
 
:kitten quote off one
 
Never heard anything quoteworthy about that.
 
12:51 AM
-.-
:kitten quote off
 
> "There are 2 hard problems in computer science: cache invalidation, naming things, and off-by-1 errors." - Leon Bambrick
 
@Raynos thanks for this yesterday, jsperf.com/dot-vs-bracket-technique
just saw it now
 
@Loktar basically no difference :)
 
yeah
but there IS a difference :P
lol but yeah none to mean anything
*not enough rather
 
there is a difference when dealing with the closure compiler on advanced
 
12:54 AM
Although bracket does consistantly have more ops. so its slightly more efficient to write jQuery("selector")["css"]("foo", "bar")["attr"]("id", "foobar")["hide"]()
 
it will shorten the dot notation, but will not change the string
 
@david you can use the closure compiler comments to tell it to behave rather then making your code ugly :)
 
what do you mean by ugly?
 
friend and I were just talking about it, and I was under the assumption that bracket notation was a sort of eval :? so then I read the spec and realized i was wrong, and its really just a matter of preference. Oh well got some other good info out of the discussion.
 
jsfiddle.net/Raynos/dzGdp How do I make getClosest better?
@david look at that line above .name( is better then ["name"](
 
12:58 AM
@Loktar: some old'ish opera versions have a poor performance with bracket notation, but thats really a while ago
 
@Loktar bracket notation to me is a property getter on associative arrays so object["key"]. It just so happens everything is an object and every object is an "associative array"
 
@Raynos that's highly subjective. I'd certainly prefer strings to multiline closure specific comments right the way through your source
 
yeah a friend of mine was using it for that, he was throwing a var in to reference a property
 
@david I'm not saying closure comments are good. I'm just saying strings are bad. There both evils. I guess strings is the lesser of evils
 
i'm not advocating strings, i'm just saying you need to be consistent.
you can't do var x = {}; x.test = "hello"; alert(x["test"]);
that's perfectly valid js, but will break when you try to compile it with closure
 
1:03 AM
@david sure can. Not so close to each other. But it's fine to use x.method and x["string"] for data vs methods
 
it's more of an issue when you do var x ={"a":1, "b":2}; alert(x.a);
 
@david your problem is using the closure compiler carelessly :)
 
@jAndy Firefox 3.6's perf with ["foo"] is worse than .foo, as well
 
@gsnedders: define worse
 
@jAndy It becomes obvious in a micro-benchmark testing it.
 
1:05 AM
Well when do you use ["foo"]? Only if you need to
 
@Raynos so you're saying i'm using it wrong by being consistent? o_O would you prefer mixing and matching dot and bracket notation, and adding in comments to deal with closure?
 
I actually try to avoid brackets whenever possible. Only usecase for me is when I need to access a property by variable
 
yeah i pretty much always avoid them, jandy i think thats really the only time you should
dot notation is just cleaner imo
 
@david not for the same object. you shouldnt do x.a and x["a"] but passing in variables to x[var] or using ["string"] in some parts of the code on some objects and .field on other parts is fine. You should handle closure's aggresiveness differently. Having to resort to using ["string"] everytwhere is painful
 
i agree, my comment was that you need to be careful if you want to do that and use the closure compiler
@Raynos I think you're assuming things that aren't true, I don't use bracket notation at all.
I like allowing closure to rename my lengthy property names to single letters
 
1:14 AM
@david still I'm sure you can pass in a global list of do not shorten as a comment somewhere at the top or bottom.
 
you can create extern files yeah, you need to use them for stuff like jquery to stop it shortening those methods
but that's still a stupid way to go about it, because it means closure can't shrink your code as much as it would otherwise be able to. It's easier, and more efficient to just use dot notation.
 
w3c validator is bugged...
Fails to display both the tidied version and the outline... at random
GREAT
Using an online JS indenter for HTML, Firefox exploded
No, my whole system exploded
Switch to a lower run level? No chance
 
1:38 AM
@IvoWetzel try mashing f5 or ctrl+r a little harder.
 
No chance, nothing did respond
the whole OS froze
 
sounds like an optimal user experience then!
 
at some point it eventually decided to tell me that Firefox isn't responding
 
YOUR COMPUTER IS BROKE. GO OUTSIDE AND GET SOME FRESH AIR FOR A WHILE.
 
Well in the worst case... I still have reisub :P
 
1:43 AM
Holy cow I got like -6 things crossed off my list today :(
 
 
1 hour later…
2:59 AM
no one is on the css room - i have one question about css
how can I add a background-color to an h1 tack, but to color the LINE of text not the box
like the "welcome to channel 4" on this site channel4.com
 
add display:inline; to the style you're applying
h1 tags are block by default
alternatively you could add float:left; or right to it
 
is not working
a tried on by one dislpay/float, and both together,
 
can you link to a live example?
 
no sorry
@david it is working here http://jsfiddle.net/akurtula/FSY7b/
so I gues is my fault somewhere
 
3:22 AM
yeah, i was hoping you'd have an example i could test with an inspector, to see if your setting was getting overwritten somewhere
 
one last thing, I think I found the error, at the moment, my h1 is position:absolute, if I delete this, the css works, but not with position being absolute, is there a work around is? or is this another error in my part?
thanks
 
Anyone watching the HTML5 talk on Facebook/livestream right now?
 
@aurel you may need to wrap the h1 in an absolutely positioned div, rather than absolutely positioning the h1 itself
 
@jon3laze any non facebook link?
 
3:27 AM
@david fantastic - it works perfectly
thanks a lot
@jan3laze, thanks for the link
 
3:52 AM
er, i have an sql table with a single column, ID, int, not null, identity, autogenerated starting at 1.... how do i insert a new record? o_O
 
@david why only one column? also mssql or mysql?
 
mssql
because it's just used as a grouping id atm, doesn't need any other information other than each row being a different group
ended up just doing SET IDENTITY_INSERT ON, insert, SET IDENTITY_INSERT OFF
 
yeah i'm not sure it's possible any other way :P
 
4:09 AM
Kinda odd... I'm not sure if i should feel it's a flaw on my part, or a flaw in the language :S
 
4:35 AM
wow
so this perf test jsperf.com/dot-vs-bracket-technique safari is WAY slower
comparing bracket notation to dot
in IE9 dot notation is 65% slower
so crazy
 
 
4 hours later…
8:30 AM
is it posible to float a h1 tag around and image? (if I use a p tag - just float the image and the p tag- done)
 
9:18 AM
Good Morning
 
9:31 AM
hi everyone
 
10:11 AM
Let's say I have a page with a large amount of data on. The data is in state X and if the user makes a change (A) then the page will tell the server by ajax and the server will return the new state X + A to the user. If another user makes a change (B) then the server will return the new state X + B to them. The server is now in X + A + B and neither user is aware of this. How do you handle such situations?
 
10:29 AM
Hi.
@ircmaxell :O it's weird... I know why but... seems weird to see you saying the good word @ the good time.
It is morning !
 
11:08 AM
0
Q: How to keep a multi-user ajax web application in sync with the server.

RaynosI have a web page that shows a large amount of data from the server. The communication is done via ajax. Every time the user interacts and changes this data (Say user A renames something) it tells the server to do the action and the server returns the new changed data. If user B accesses the pa...

Anyone have any opinions?
 
 
1 hour later…
12:33 PM
I don't get jsperf.com/dot-vs-bracket-technique… only V8/Carakan's behaviour makes any sense…
 
@gsnedders Most are so close it doesn't matter, but woah, Safari Nitro!
 
@gsnedders well you can see IE9 is being stupid and ignore that one :)
 
@YiJiang IE9 is really odd too
In Carakan's case both scripts compile to literally identical bytecode. The difference there is just random uncertainty.
 
@gsnedders for the rest I assume the engine can inline optimise foo["bar"] better then foo.bar by a very minimal change. Something like requiring one less Opcode?
 
@Raynos Why could it optimize foo["bar"] any better than foo.bar? They're semantically identical.
 
12:37 PM
Apart from safari & IE9 there similar
@gsnedders the implementaiton of the parser prefers one of the other?
 
@Raynos Parse-time isn't relevant in benchmarks like that
 
I think its just random error margins for all but safari & IE9
I can imagine safari forgetting to JIT foo["bar"].
And I can imagine IE9 just being bugged
 
1:01 PM
It's an odd choice of bytecode-representation for both Saf and IE9, though
 
1:45 PM
@Shikiryu Fair enough... :-D
 
@ircmaxell Does London please you ?
 
quite well (well, I'm outside of London now, but close enough)
user image
4
 
@ircmaxell That's... not a real book is it?
 
:-D
Look at the author's name
 
@ircmaxell Hahaha
 
1:52 PM
Ok, meeting time
later
 
2:31 PM
Hi to all today
I'm back
jeje
This is the last problem with the str replacement
1
Q: Javascript Replace All words Unsafe Javascript

Daniel G. R.Hi, Im trying to replace each textnode of the DOM tree using the next method (jquery + javascript): //Replace each word objective with reposition in each controll of the actual jquery object jQuery.fn.replaceEachOne = function (objective, reposition) { var regExp = new RegExp('([\\s]'+obj...

 
2:54 PM
Which is worse: for...in loop on an array without hasOwnProperty or extending Array.prototype ?
 
3:40 PM
@Shikiryu meh. you shouldnt need to use hasOwnProperty on native objects. That's like checking undefined === true in case someone overwritten undefined
 
Don't blame me, blame the almighty @IvoWetzel
 
almight @IvoWetzel It's wrong to enforce .hasOwnProperty on native objects. If we never assume the enviroment then we should check for undefined and we should check other paranioa aswell.
 
4:10 PM
ahola
aloha*
testing chat scrolling in FF4
 
Hi
 
no more flashing crap
ftw
oh i found alpha firebug that works on FF4 beta getfirebug.com/releases/firebug/1.7X
 
If you want to test the chat, please go to the Sandbox
 
/wave
 
@Ryan 1.7 is a bit dodgy
 
4:56 PM
Hello, is anyone able to help me with the following question: stackoverflow.com/questions/4818019/…
 
@Raynos I know I am beating this to death, but check out the jsperf now, jsperf.com/dot-vs-bracket-technique safari is over 90% when using bracket notation vs dot. Just thought that was pretty interesting, on the flipside, IE9 is slower when using dot notation.
*90% slower.
 
 
1 hour later…
6:06 PM
@Loktar I commented on that already :) Caring about the difference for reasons other then style, readability or maintenance is a horrible micro optimisation and thus evil. From a purely academic approach it is interesting to see the differences.
 
yeah totally agree, just really surprised at how safari and IE9 fared and varied so much.
 
6:36 PM
I could need some testers one more time for typeofnan.com/lab/mxhr-stream
browser / os / performance
if anyone is in the mood, please :p
 
Chrome 8.0 Win 7 64 - Classic Loaded in: 42174ms Multipart XHR Loaded in: 6897ms
 
@jon3laze: thank you
 
@IvoWetzel I linked JS garden in a SO answer :).
1: Loaded in: 13198ms 2: Loaded in: 2746ms
 
Chrome 10 dev Win xp Classic - Loaded in: 30157ms XHR - Loaded in: 5223ms
 
stable chrome ubuntu.
@jAndy make a runTest button that triggers both one after the other and prints our browser / os / performance. Like 2 minutes to code and the easier it is the more data you get :)
 
6:48 PM
great, looks better than yesterday
 
Refresh 1: 11669ms 2: 2270ms
 
@Raynos: 2 minutes.. whooaa. thats a long time!
 
@jAndy are you sure your not fiddling the data? :P
@jAndy make some comparisons with stuff like $.load, head.js and require.js
 
@Raynos: hard to do. none of those libs can load images or stylesheets afaik
I'm creating only a library for transfering data, thats actually a different "layer" from what normal script-loaders do
on mobile phones it has an even bigger impact using mxhr, really cool stuff
The thing that really annoys is that IE < 9 does not support base64 data images. There is a workaround using MHTML / CSS trickery, but whooaa really tricky
 
@jAndy fork IE8, fix it, leave a pull request.
 
7:01 PM
yay if someone slows down earth rotation for 3 hours/day I'm gonna do it
 
7:25 PM
just make a "this site optimized for IE 11" badge for your site
 
7:54 PM
@jAndy wow @jAndy your website's homepage is doing to CSS what 1995 did to powerpoint presentations!
 
@Greg: nah, I want to work on the site so badly, but I just don't have the time
but thanks anyway !
 
speaking of websites... IE sucks
 
just put some word-art in, it'll be fine
 
well.. yea maybe I also like a "IE? go to hell" - badge more than Nathans suggestion
 
any idea why the navigation link text wraps in IE <9 ? bonsaiden.no.de
 
8:01 PM
@IvoWetzel sorry no, but can I ask you about the way you are programming the site?
 
How do you guys organize large amounts of jquery code, assuming your already using the plugin pattern and basic closures?
 
Hm. VIM -> Node.js -> Express -> Jade / LESS
 
@MarkRogers I tend to use namespaces
@IvoWetzel specifically, how you achieve links that change the URL, without reloading the page? I have only managed to do that with window.location.hash
 
@MarkRogers: I always try to keep filesizes small, I like to split up things in several small files
 
@Greg HTML5 history API
i.e. pushState, onpopstate
 
8:03 PM
@jAndy sure but my small files are starting to pile up. I wondering if there's a larger architectural style I should aiming for
 
@IvoWetzel ah, I wasn't aware html5 had that functionality. So IE browsers are out of the question for your site?
 
Well the url doesn't change nicely
 
@greg - yeah I need to do more namespaces that can't hurt
 
It's completely unobstrusive
 
@MarkRogers I wrap the initialisation logic into one namespace, load it with document.ready ... then everything else in its own namespace
@IvoWetzel can search engines spider through the html5 history api?
 
8:05 PM
@Greg - I do a lot of that already. I'm just wondering what's the next level after that
 
@Greg Uh, they don't have to. It's just plain links on the site, they will find it without any JS
 
@MarkRogers possibly loading content only when needed ... apart from that I don't do anything else
@IvoWetzel oh yes I just noticed that.
@IvoWetzel thanks for introducing me to the api
 
@Greg Beware implementations are buggy...
Only FX4 and Chrome10 Trunk manage to get it right
Current Chrome is buggy like...
 
@IvoWetzel the project I'll be using it on won't be for a few months... then it'll take a couple of months ... then chrome might have caught up?
maybe I'll leave it for now...
 
Maybe there is a fix, dunno
problem is that if you go forward again chrome does a full reload
instead of just changing the url
But it might only be broken in certain versions
maybe a regression in the dev build I've got installed
Opera11 and IE9 still have no support for it at all
 
8:22 PM
I don't really mind about Opera... no one uses it.
 
@gsnedders You hear that!
anyways, IE9 only focuses on Performance...
 
IE9 ... psh. None of my sites have all the juicy bits in IE
If people are viewing the internet in IE, they won't miss not seeing the sexy CSS you have in your site anyway
 
I know
IE9 doesn't even have transitions...
but hey! We got 3d animations
indeed
 
@MarkRogers using OO helps. I have a plugin that feature detects for pages specific javascript functionality and loads the classes that I need on that page. Also inlining page specific javascript cleans up some smaller files
 
the Chrome bug was only in that particular dev build
 
8:28 PM
@Raynos - Sure I use plenty of OO, but server side languages have Domain driven design, 2/3 tier design, and a number of other overarching architectural styles. It just doesn't seem like javascript has a larger style like that, but javascript applications are getting larger and more plentiful all the time.
 
btw: Why the hell does Opera render the text smaller -.-
 
@Raynos - BTW, I just read the rest of your response, good advice.
 
so how do you fix wrapping text... you replace \s with &nbsp;...
 
Why does Opera have such a small userbase?
its not a bad browser
 
Well for an eternity they had commercials in there and sold it
 
8:33 PM
personally, I say it's on par with Firefox now
(in 2nd place)
 
Gnah
Chrome and Firefox render pixel perfect the same
Opera...
 
@Greg I agree, but browser diversification scares me
 
Font in Opera sucks
Smaller, different spacing etc.
 
@IvoWetzel fonts in firefox suck for me
 
OS?
 
8:34 PM
windows 7
 
@MarkRogers Another good thing to do is seperate your dev code from your production code. Use lots of little files, use namespaces, packages. Seperate them logically and then use a packager/minifier to dump them all into one big file.
 
Ubuntu here, hm, FX4 beta?
 
@IvoWetzel beta 7
 
@Raynos - I do so, with YUI minifier. It took me a little bit to integrate into visual studio but it works great.
 
@Greg Ah yes, good old font rendering issue
Thanks to Win7's broken Direct2D APIs
 
8:37 PM
@MarkRogers then your going to have to do your own architecture. There is no in build thing. Look at what people do with node.js and emulate it in the browser
 
Wonder if MS will deploy a patch when they release IE9
Otherwise they won't have Text acceleration :P
Because if they switch it on, it will look just as bad as in FX
 
@Raynos what is node.js?
 
awesomeness :P
 
Go through the talk section, start watching
 
What are everyone's personal browser preferences?
 
8:41 PM
do any of you guys use node.js in your commercial work?
 
1) Chrome, 2) Firefox, 2) Opera, 4) Safari, 5) IE
 
Chrome > Opera > FF > Safari > IE
 
Firefox for Browsing, fire it up keep it running, Panorama is awesome <3 Chrome for development
 
I just love the JS speeds within chrome, mostly in relation to when Im doing anything with canvas.
 
oh lol, it's a server-side javascript framework, that's funny. I guess it makes integration easier, but javascript isn't always the best tool for everything
 
8:44 PM
Panorama is available as a chrome extension
 
@Greg Did that make any progress? Last time I checked it was more like "lol"
 
@MarkRogers serverside javascript :). You'll be suprised how good node.js is.
 
@MarkRogers Well, it works great
 
@IvoWetzel I've only seen the videos, not sure if it is actually usable... but then again, I find the whole idea just a fad...
 
I find it hard to beleive anyone who has touched JS in the last year has never heard of it. Its has been really hyped.
 
8:45 PM
@MarkRogers I would If it wasnt for beuaracuy.+spelling. Seriously how do I spell that?
node.js is too young to be trusted by big companies.
 
bureaucracy
 
but i'd happily write an browser MMO in it
 
I work for a big company, the US gov :P. I just make sure to stay on top of things.
 
Yeah, I mean it sounds like a great idea, but the server-side people and the business people would think your crazy.
 
Yeah nodeJS is so promising for games
 
8:47 PM
@MarkRogers its faster then php & rubt back ends. Tbh I think node.js could replace php.
 
i made an overhead shooter in it a while back
 
indeed - Ryan Dahl mentioned himself he wouldn't use node in production code right now
 
ASP.Net has its niche of being byte code and having the entire .NET framework behind it
 
@jAndy I guess everyone would say that of his own work :P
 
but that was a few month ago, I guess the biggest problem is there are just not many nodejs coders right now
 
8:48 PM
Damn I need to get back to coding nodeJS
 
@Loktar I did a multiplayer asteroids thing with it
 
@IvoWetzel put it online... NOW
 
bleh i cant get mine to start now
 
Let me check whether I reinstalled node after my last linux reinstall
 
make sure your browser doesn't have web sockets turned off :P
also: The networking modell sucks, would need a remake to get rid of high ping effect
 
8:52 PM
hah nice
sucks i keep getting error loading index.html
will have to debug at home
 
@IvoWetzel it crahsed half way through. Mine runs on chrome. Your served died somewhere
 
I blame browsers
 
I like the philosophy :p
 
"my shop isn't making any money" ... "I blame the customers" ...
 
speaking of which... FX beta just exploded again
@Greg Well it worked fine in Chrome 8 or so, then every other versions it goes boom, especially the Audio stuff is horrible broken
Might be nice for a background track
 
8:57 PM
@IvoWetzel in my Chrome8 it says "SERVER OFFLINE"
 
but for sound effects every 100ms
 
I didn't get any audio !
 
@Nathan Hm, either it's the WebSockets, which I doubt or it has problems with dyndns
One of my friends mentioned that once, that he couldn't connect in Chrome
 
finally
my paths were screwed
havent worked on that in like a year
jan 09
its blue vs red
not sure if shooting works still
 
ahhh now that effect is loud
 
00:00 - 21:0021:00 - 00:00

« first day (103 days earlier)      last day (4847 days later) »