| 01:54 | <variable> | Hixie, try "ifconfig flushall" from Terminal as root - it /may/ help |
| 02:12 | <Hixie> | variable: thanks, will try if it happens again. I ended up solving it by installing any pending updates and rebooting twice. |
| 02:12 | <variable> | Hixie, all that command does is forces the mac to release any current DHCP leases - I duno if it would help |
| 02:12 | <Hixie> | well i tried "renew dhcp lease" in the pref panel and that had no effect |
| 02:13 | <Hixie> | i could see in the tcpdump log that it was asking for a DHCP lease |
| 02:13 | <Hixie> | and it was getting a reply |
| 02:13 | <Hixie> | it was just not doing anything with it |
| 02:13 | <variable> | yeah - that is why I said to flush it first |
| 02:13 | <Hixie> | k |
| 02:13 | <variable> | another solution might be to statically set it to the reply that it got |
| 02:14 | <Hixie> | well that's how i got on IRC earlier and how I got online to download the updates |
| 02:14 | <Hixie> | but that's not a great solution ;-) |
| 03:01 | Hixie | gets to the volume/muted content attribute thing |
| 03:10 | <Hixie> | i don't see any way to have a muted="" content attribute that is reflected by the IDL attribute, since it would mean that if the user had requested a blanket mute of all audio, and you had a page today (with no muted="" attribute), it would magically sprout a muted="" attribute in the DOM each time the document was parsed |
| 03:10 | <Hixie> | that seems suboptimal |
| 04:10 | <Hixie> | i've no idea how to do this |
| 04:12 | <variable> | Hixie, do what? |
| 04:18 | <Hixie> | variable: the muted thing i mentioned above |
| 04:18 | <variable> | oh - woops |
| 10:49 | <annevk> | http://twitter.com/sideshowbarker/status/25201432241 o_O |
| 10:59 | <MikeSmith> | annevk: the word "faktisk" is a model of precision and economy compared to "daadwerkelijk" |
| 11:01 | <annevk> | it sounds more like the Dutch "feitelijk" |
| 11:01 | <annevk> | than "daadwerkelijk" |
| 11:01 | <MikeSmith> | oh |
| 11:02 | <MikeSmith> | so it is |
| 11:02 | <annevk> | I was mostly surprised you tweet in Dutch now :) |
| 11:03 | <annevk> | or something very close to it anyway ;p |
| 11:04 | <MikeSmith> | heh |
| 11:04 | MikeSmith | finds daadwerkelijk |
| 11:04 | <MikeSmith> | oops |
| 11:04 | MikeSmith | finds http://www.mijnwoordenboek.nl/synoniemen/daadwerkelijk |
| 11:05 | <MikeSmith> | I've quit tweeting in English forever |
| 11:19 | <hsivonen> | http://domscripting.com/blog/display/99 |
| 11:20 | <hsivonen> | looks like adactio has been promoting a trick that doesn't work with HTML5-compliant innerHTML |
| 11:21 | <hsivonen> | correction: it's not adactio but one of the commenters who suggests using the trick for executing innerHTML-inserted scripts |
| 11:22 | <annevk> | it's from 2007 |
| 11:23 | <hsivonen> | annevk: which means that potentially a lot of people have read it |
| 11:52 | <MikeSmith> | speaking of bad advice, the following seems questionable: |
| 11:52 | <MikeSmith> | http://dev.opera.com/articles/view/efficient-javascript/?page=2#implicitconversion |
| 11:53 | <MikeSmith> | annevk: btw, does Tarquin still work at Opera? |
| 11:53 | <MikeSmith> | that article is otherwise great, btw |
| 12:00 | <annevk> | MikeSmith, yup |
| 12:00 | <MikeSmith> | cool |
| 12:00 | <MikeSmith> | dude should write more |
| 12:00 | <MikeSmith> | write more articles I mean |
| 12:00 | <MikeSmith> | at dev.opera.com or his own site |
| 12:00 | <MikeSmith> | he seems to have gone quiet some time back |
| 12:04 | <jgraham> | MikeSmith: Clearly we work him too hard |
| 12:05 | <jgraham> | And yeah, that advice sucks |
| 12:05 | <jgraham> | But it is from 2006 |
| 12:05 | <MikeSmith> | true |
| 12:06 | <jgraham> | That is like 1000BC (Before Carakan) in javascript years |
| 12:06 | <MikeSmith> | yeah |
| 12:07 | <MikeSmith> | but to some degree, it seems to have been intended as general advice (though I to realize he makes a point there of saying it applies more directly to the then-shipping Opera JS engine) |
| 12:07 | <jgraham> | We should write a new article that actually applies to the mordern world |
| 12:07 | <jgraham> | MikeSmith: Yeah, but 2006 is before fast javascript in general |
| 12:07 | <jgraham> | isn't it? |
| 12:08 | <jgraham> | Unless I am off by a couple of years at least |
| 12:08 | <jgraham> | Some stuff still applies of course |
| 12:09 | <jgraham> | "don't use try/catch in inner loops" for example |
| 12:09 | <jgraham> | And he doesn't appear to say "don't use the with statement, ever", but if he did that would still apply |
| 12:09 | <MikeSmith> | jgraham: no, you right (about the dates) |
| 12:10 | <jgraham> | (he says the rather too weak "avoid using with") |
| 12:10 | <Philip`> | Ideally all articles about JS performance would come with benchmarks so you could see how relevant they are in your current browser |
| 12:10 | <Philip`> | The benchmarks would probably be rubbish but at least they'd be better than nothing |
| 12:11 | <jgraham> | (which is just wrong. You should assume that using "with" is forbidden by law and carrys a prison term) |
| 12:12 | <annevk> | i like with |
| 12:12 | <annevk> | sue me |
| 12:12 | <annevk> | i'll make a point about using it more |
| 12:13 | <MikeSmith> | every article about JS performance should probably have an accompanying script with a timer that triggers after 1 year ot 2 years at most and causes the contents of the pages to be replaced with the single sentence: "The chances of this article still being relevant are very low. Find a more up-to-date article instead." |
| 12:13 | <MikeSmith> | make that, replaced with the _two_ single sentences |
| 12:14 | <Philip`> | Also they should all start with a section about how to profile your code to find bottlenecks, before wasting time micro-optimising irrelevant parts |
| 12:14 | <Philip`> | (Do good profiling tools for JS actually exist?) |
| 12:15 | <gsnedders> | Philip`: JSC has one that disables JIT, at lesat |
| 12:15 | <Philip`> | That sounds the opposite of "good" |
| 12:15 | <gsnedders> | Well, it's the best I know of :PP |
| 12:16 | <Philip`> | It's kind of useless getting profiling data over a version of your code that is not the version whose performance you actually care about |
| 12:17 | <gsnedders> | Well, yeah. |
| 12:17 | Philip` | wonders if authors would get better performance improvements if browser developers focused on decent profiling support to help authors optimise their code, rather than focusing on making the JS engine faster |
| 12:17 | <gsnedders> | That just kinda says how diabolical profiling is |
| 12:18 | <gsnedders> | Philip`: Harder to market, though |
| 12:18 | <Philip`> | Development tools like Firebug seem good marketing points (which forced other browser developers to implement something similar) |
| 12:19 | <Philip`> | at least for authors |
| 12:20 | <Philip`> | and for users you claim that more real web sites will be optimised for your browser since you're making it easy for authors to do that |
| 13:11 | <MikeSmith> | somebody please help me out here… where in the Ecmascript spec does it actually specify that you can get the character at a particular index in a string value by using square-bracket syntax? |
| 13:12 | <MikeSmith> | …or even where it states that you can use that to get retrieve a particular element from an array? |
| 13:13 | <miketaylr> | MikeSmith: section 15.5.5.2 of http://www.ecma-international.org/publications/standards/Ecma-262.htm |
| 13:13 | <miketaylr> | (for string) |
| 13:13 | <miketaylr> | i think that was non-standard until es5 |
| 13:14 | MikeSmith | reads http://localhost:8080/index.html#x15.5.2 |
| 13:14 | <MikeSmith> | oops |
| 13:14 | <paul_irish> | Ooh! /me bookmarks. |
| 13:16 | <MikeSmith> | :) |
| 13:16 | <MikeSmith> | http://sideshowbarker.github.com/es5-spec/#x15.5.2 |
| 13:16 | <MikeSmith> | oops |
| 13:16 | <miketaylr> | ooOOooo html |
| 13:17 | MikeSmith | copies the section number correctly this time |
| 13:17 | <MikeSmith> | http://sideshowbarker.github.com/es5-spec/#x15.5.5.2 |
| 13:17 | <MikeSmith> | ah, sweet |
| 13:17 | <miketaylr> | :) |
| 13:19 | <MikeSmith> | hey, I initially misread step 8 of that algorithm as "If resultStr be a String of length 1," |
| 13:19 | <MikeSmith> | it would be great if specs were actually written with that kind of language |
| 13:19 | <MikeSmith> | "If foo be bar, then |
| 13:21 | <Dashiva> | Only one day a year |
| 13:22 | <MikeSmith> | heh |
| 13:22 | <MikeSmith> | I guess that day passed recently |
| 13:22 | <MikeSmith> | too bad |
| 14:26 | <jgraham> | annevk: I have no idea why you would like making your code look more like it was written in Visual Basic |
| 14:26 | <jgraham> | If God had intended the web to be programmed in VB, He would have given Microsoft a monopoly |
| 14:35 | <Philip`> | If JS used VB's with syntax (where you write ".Height = 100" etc so it's easily distinguishable from local/global variable references), would that have avoided the performance problems it causes? |
| 14:41 | <jgraham> | Maybe |
| 14:42 | jgraham | hasn't actually programmed any VB for >10 years and had forgotten the . thing |
| 14:42 | <MikeSmith> | anybody know if there is interactive help or a man page or doc of some kind for the OSX "jsc" command? |
| 14:44 | <jgraham> | MikeSmith: No idea. I doubt it. Do you have a question? |
| 14:44 | <MikeSmith> | nah, nothing specific |
| 14:44 | jgraham | is unlikely to be able to help, but nevertheless |
| 14:45 | <MikeSmith> | just running the jsc shell |
| 14:45 | <MikeSmith> | and wondering if there is any help on the shell at least |
| 14:45 | <MikeSmith> | node shell has a .help |
| 14:46 | <MikeSmith> | but that is actually not very useful at all |
| 14:46 | <MikeSmith> | at this point |
| 14:46 | <jgraham> | Does it do more than just take javascript expressions and evaluate the results? |
| 14:46 | <jgraham> | There is a print() function to write to stdout if that helps |
| 14:47 | <MikeSmith> | node shell has a .break and .clear |
| 14:47 | <MikeSmith> | which are actually useful in the case of node |
| 14:47 | <jgraham> | It's not like command-line repls have been the main focus of javascript |
| 14:47 | <MikeSmith> | true |
| 14:48 | <jgraham> | Or non-browser use cases in general really |
| 14:48 | <MikeSmith> | a thing that the node shell does that I find highly annoying is that if you hit ^C it drops you out of the shell entirely and exists back to your bash prompt |
| 14:49 | <MikeSmith> | I don't think ^C in a shell or shell-like thing should do that |
| 14:49 | <MikeSmith> | that's what ^D is for |
| 14:49 | <Philip`> | Perhaps you could run it in rlwrap to get a more standard shell-like interface |
| 14:49 | <MikeSmith> | so I guess this .break thing is what you are meant to use instead |
| 14:49 | <MikeSmith> | what's rlwrap? |
| 14:50 | <MikeSmith> | …readline wrapper |
| 14:50 | <MikeSmith> | I see |
| 17:10 | <karlcow> | in http://mozillalabs.com/zaphod/2010/09/16/6/ spotted a http-equiv=”Content-Script-Type” |
| 17:10 | <karlcow> | <meta http-equiv=”Content-Script-Type” content=”application/narcissus” /> |
| 17:11 | <karlcow> | http://www.w3.org/TR/REC-html40/interact/scripts.html#h-18.2.2.1 |
| 17:11 | <annevk> | ugh |
| 17:11 | <annevk> | "Doing so will cause Narcissus to execute the various on* listeners specified for different elements. (Unfortunately, SpiderMonkey will also execute them, which may or may not cause issues)." |
| 17:12 | <karlcow> | yes it seems SpiderMonkey it doesn't remove the other. Kind of strange |
| 17:24 | <hsivonen> | application/narcissus is like application/chromeframe, expect the former is only for experimentation while the latter is marketed for non-experimental deployment |
| 17:28 | <annevk> | could have used a more "there be dragons" identifier |
| 17:28 | <annevk> | but I guess it doesn't really matter |
| 17:29 | <karlcow> | hmm application/crouching-tiger |
| 19:25 | <jacobolus> | is there any way to add focus/blur events to custom objects? |
| 19:25 | <jacobolus> | for instance, to get a blur event on a div for someone clicking on some other form element? |
| 19:28 | <Hixie> | jacobolus: i don't follow |
| 19:28 | <Hixie> | can someone with IE let me know what IE does for http://software.hixie.ch/utilities/js/live-dom-viewer/saved/647 ? |
| 19:28 | <gsnedders> | jacobolus: var div = document.getElementsByTagName("div")[0], form = document.getElementsByTagName("form")[0]; form.addEventListener("blur", function(e){div.dispatchEvent(e);}, false); |
| 19:29 | <gsnedders> | jacobolus: Or something like that? |
| 19:29 | <Hixie> | so far i have three browsers with three different results |
| 19:29 | <jacobolus> | Hixie: in other words, currently only form elements or something containing them gets key presses and focus/blur events right? |
| 19:29 | <gsnedders> | jacobolus: Oh, that'll throw |
| 19:30 | <jacobolus> | can I get a div to accept focus & key events? |
| 19:30 | <Hixie> | jacobolus: per the spec, all kinds of elements can be focusable, see http://www.whatwg.org/specs/web-apps/current-work/complete/editing.html#focus-management |
| 19:30 | <jacobolus> | oh, okay |
| 19:30 | <Hixie> | jacobolus: plus you can be "specially focusable" http://www.whatwg.org/specs/web-apps/current-work/complete/editing.html#specially-focusable |
| 19:31 | <Hixie> | it strikes me that contenteditable isn't on either of those lists |
| 19:31 | <Hixie> | but that would also make something focusable |
| 19:31 | <Hixie> | probably |
| 19:31 | <jacobolus> | Hixie: so if I have some random div in the middle of my page, can I make it focusable? |
| 19:31 | <Hixie> | sure, just set tabindex=0 on it |
| 19:31 | <jacobolus> | (or perhaps an SVG shape that I want to be selectable) |
| 19:32 | <jacobolus> | neat |
| 19:32 | <jacobolus> | let me try that |
| 19:32 | <Hixie> | SVG probably has an attribute like fcFocusableElementActivationBehaviorMatrix="focusable-element" |
| 19:32 | <jacobolus> | :) |
| 19:32 | <Hixie> | but i wouldn't know what it was off-hand |
| 19:33 | <jacobolus> | I can't just set tabindex on it? |
| 19:33 | <jacobolus> | that's too bad |
| 19:33 | <Hixie> | dunno if SVG has tabindex |
| 19:33 | <Hixie> | maybe |
| 19:33 | <jacobolus> | aha! "focusable" |
| 19:33 | <jacobolus> | at least in svg tiny 1.2 |
| 19:33 | <Hixie> | wow that's remarkably succint |
| 19:34 | <jacobolus> | and the associated event is apparently "DOMFocusIn" |
| 19:36 | <jacobolus> | I wonder if any browsers support that |
| 19:44 | <jacobolus> | sorry for the obvious questions, but what exactly is the relation of svg tiny 1.2 to svg 1.2, and what specs are browsers trying to implement? |
| 19:49 | <jacobolus> | or are browsers just shooting for svg 1.1? |
| 19:49 | <jacobolus> | (which doesn't include this keyboard stuff as far as I can tell) |
| 19:58 | <Hixie> | hsivonen: i'm completely confused by http://www.w3.org/Bugs/Public/show_bug.cgi?id=9843 |
| 20:08 | <hsivonen> | Hixie: the patch that landed in Gecko makes document.written scripts not block on style sheets. seems to match IE |
| 20:09 | <Hixie> | hsivonen: i don't think we should be adding things that make document.write('foo') work differently than data:text/html,foo |
| 20:10 | <Hixie> | at least not without clear compat need |