00:04 | <Hixie> | since the htmlwg is having a meeting, let's have one too. |
00:04 | <Hixie> | anyone have any outstanding action items? |
00:04 | <Hixie> | oh look, we've never assigned any. |
00:04 | <Hixie> | ok, meeting over. |
00:04 | <billmason> | Please come run my company's next monthly meeting. |
00:05 | <Hixie> | my solution to meetings is very simple |
00:05 | <Hixie> | i refuse to attend any meeting that recurrs |
00:05 | <Hixie> | i welcome anyone to book me to any meeting they like, but if it recurrs, i won't go. |
00:06 | <Hixie> | (i also generally refuse action items that i can't do during the meeting) |
00:06 | <billmason> | I think I'll put that on a t-shirt. "i refuse to attend any meeting that recurrs" |
00:07 | <takkaria> | Hixie: a novel approach, but you have to grant a bit of beaurocracy |
00:07 | <Hixie> | why? |
00:07 | <Hixie> | we've managed the whatwg pretty well without any |
00:07 | <jruderman> | billmason: fix the typo first (recurrs -> recurs) |
00:07 | <Hixie> | i was wondering about that |
00:08 | <jruderman> | i have 2-3 recurring meetings every week, each about an hour |
00:08 | <Hixie> | i'm so sorry |
00:08 | <takkaria> | Hixie: just because the w3 is actually a beaurocracy, and to be a valid one, it needs recurring meetings and action item trackers and all that |
00:08 | <jruderman> | hehe |
00:09 | <Hixie> | takkaria: so you're saying i have to allow the w3 to be a valid bureaucracy? |
00:09 | <Hixie> | i'd rather not :-) |
00:09 | <takkaria> | I'm not even saying you should go to the meetings |
00:10 | <takkaria> | I'm just saying that getting html5 the w3c patent review and all that outweighs the silly meetings |
00:11 | <Hixie> | i agree that the patent policy is a useful thing |
00:11 | <Hixie> | the jury's still out on whether the cost of working through the w3c outweighs the benefit of the patent policy |
00:12 | <Lachy> | I have annoying daily project meetings at work, lasting up to half an hour. I hate it |
00:12 | <Hixie> | DAILY?! |
00:12 | <Lachy> | yes |
00:12 | <Hixie> | jeez |
00:13 | <billmason> | I used to be on a project like that. It was one of the reasons I got off of it.... |
00:14 | <bewest> | I'm attempting to use html5lib to process a vml document. vml doesn't support css very well, so if I want to use a common stylesheet to apply styles to both svg and vml documents representing the same thing, I'll need to parse the stylesheet, find all the elements seeming to match any rules, and then translate the properties of applying rules into a dom transformation that will apply the desired styles |
00:15 | <Hixie> | i have three recuring meetings total, one every two weeks which is pretty much the only time i meet my team mates and find out wtf they're doing, one every week which is the campus-wide beer-and-news-and-questions-for-the-management fest, and one semi-annual (or quarterly? i forget) team week, of which i only attend half. |
00:15 | <Hixie> | bewest: so you want a css parser? |
00:16 | <bewest> | yes, among other things |
00:16 | <bewest> | I think the cssutils python package is probably usable |
00:16 | <bewest> | I think I need to use the etree builder with html5lib |
00:17 | <bewest> | when I tried this, etree complains about the doctype before the treebuilder has finished instanciating |
00:17 | <takkaria> | Hixie: what kind of team are you on? are you all web standards-related people or is it just a "misc" team? |
00:17 | <bewest> | (before parsing begins) |
00:18 | <Hixie> | takkaria: i'm in the open source program office. same team that does google summer of code, googlecode.com, etc |
00:18 | <takkaria> | ah, I see |
00:18 | <Hixie> | we're kind of an "odds and ends" team |
00:18 | <Hixie> | but mostly open-source related |
00:19 | <bewest> | can anyone suggest alternative strategies I should try to acheive consistent styling across vml and svg? |
00:20 | <bewest> | does html5lib expect certain versions of etree? |
00:23 | <bewest> | http://dpaste.com/35244/ is the traceback of http://dpaste.com/35245/ |
00:25 | <bewest> | my understanding is that I should be able to get etree to turn a css selector into an xpath |
00:26 | <bewest> | hmmm maybe I should check the treebuilder's source for compatibility hints |
00:31 | <bewest> | Hixie: can you tell your teammates that the svn browser on googlecode breaks the back button? |
00:31 | <Hixie> | it does?L |
00:32 | <Hixie> | aaah |
00:32 | <Hixie> | they changed the interface |
00:32 | <Hixie> | wtf |
00:33 | <bewest> | indeed |
00:33 | <Hixie> | wow yeah, that's annoying |
00:34 | <bewest> | very |
00:34 | <bewest> | makes the interface much less efficient |
00:34 | <Hixie> | seems you can still get to the old interface |
00:35 | bewest | doesn't see how |
00:35 | <Hixie> | go to a file |
00:35 | <Hixie> | choose "raw view" |
00:35 | <Hixie> | and then navigate from that uri |
00:35 | <bewest> | aha |
00:37 | <Hixie> | apparently it's a known bug |
00:37 | <bewest> | if it ain't broke... ;-) |
00:38 | <Hixie> | well, the old ui didn't show revisions |
00:38 | <bewest> | oh |
00:38 | <Hixie> | which apparently was a huge issue |
00:38 | <bewest> | yeah, it's nice to have revisions |
01:46 | <Hixie> | ps. i hate utf-16 |
01:47 | Hixie | grumbles at anne for making the utf-16 disease creep into svg |
01:58 | <Lachy> | Hixie, what's exactly is the UTF-16 disease? |
02:03 | <roc> | http://weblogs.mozillazine.org/roc/archives/2008/01/string_theory.html |
05:14 | Hixie | ponders how to make pushState() work when you cross them when the document isn't active |
05:14 | <Hixie> | consider something like this: |
05:17 | <Hixie> | new browsing context, navigate to A. navigate to B. pushState B1, pushState B2. navigate to C. |
05:17 | <Hixie> | now go back twice, activating B1 and B2 so that the current entry is B1 |
05:18 | <Hixie> | now go back twice again, which puts you on A. |
05:18 | <Hixie> | now jump to the end, which puts you on C. |
05:18 | <Hixie> | now go back one. |
05:19 | <Hixie> | we need both B1 and B2 to fire, but... |
05:21 | <Hixie> | hmm, pushState() as defined doesn't work right at all |
05:21 | <Hixie> | well bummer. |
05:34 | <Hixie> | hmmmmmmmm |
05:34 | <Hixie> | so it seems we need an event to fire when you switch to an entry that isn't a state entry |
05:34 | <Hixie> | then everything is fine |
09:05 | <annevk> | Hixie, hmm, I wasn't the one who added that test, I'm just fixing SVG to be consistent :p |
09:46 | <jgraham> | hsivonen: You might be interested in http://blog.mozilla.com/dmandelin/2008/02/14/wtf-16/ |
09:48 | <hsivonen> | jgraham: thanks. Yeah, UTF-16 is overall a mistake. For some environments (like Java) it is a mistake not worth fixing, though. |
09:49 | <jruderman> | why? because Java is dead? |
09:49 | <hsivonen> | jruderman: no, because having an undisturbed Java-wide consistent UTF is too useful |
09:52 | <hsivonen> | I think roc is right about iterators |
09:52 | <hsivonen> | in general, it is a mistake to let app code index into the string backing buffer |
10:45 | <Lachy_> | annevk, yt? |
10:46 | <Lachy_> | annevk, to address Boris' comment about supporting the same set of selectors in both CSS and Selectors API, should I make that a SHOULD or MUST requirement? |
10:54 | <hsivonen> | hmm. Firefox 2 makes the whole GUI on Mac OS X 10.5.2 unusable |
10:54 | <hsivonen> | for me at least. repeatedly |
10:54 | <hsivonen> | no such problem with minefield |
10:54 | <gsnedders> | working fine here |
10:55 | <gsnedders> | (but admittedly, I don't use Fx much) |
10:55 | <hsivonen> | I guess it is time to migrate my main profile to Firefox 3 |
10:56 | <Lachy_> | annevk, I have added this to the spec. "If the user agent also supports some level of CSS, the implementation must support the same set of set of selectors that are supported by the CSS implementation." |
10:56 | <Lachy_> | I'll check it into cvs later |
12:00 | <annevk> | Lachy, looks good |
12:15 | <hsivonen> | annevk: is the xml-dev thread about slimming XML on your XML5 radar? |
12:16 | <annevk> | no |
12:16 | <annevk> | sounds good though |
12:20 | <annevk> | I got the SVG WG to use 16-bit units btw... |
12:20 | <hsivonen> | nice |
12:21 | <hsivonen> | http://lists.xml.org/archives/xml-dev/200802/msg00149.html |
13:00 | <annevk> | have I got it right that postMessage() can be implemented as in the spec and that whatever extension will come will be on top of that? |
13:01 | <annevk> | or is postMessage() going to be revised soonish, once again? |
13:05 | <zcorpan> | current spec: void postMessage(in DOMString message, in DOMString origin); |
13:05 | <zcorpan> | Hixie's proposal: void postMessage(in DOMString message, in EndPoint endPoint, in DOMString origin); |
13:06 | <annevk> | true, but is that done through overloading or should only the latter be supported? |
13:07 | <annevk> | i guess my real question is what Firefox 3 will ship so we can align with them |
13:36 | <annevk> | http://lists.w3.org/Archives/Public/public-xml-core-wg/2008Feb/thread.html#msg26 |
13:36 | <annevk> | public-xml-core-wg realizing how the Web functions |
13:38 | <Philip`> | Hmm, I get an infinite loop on <table><tr><table> (whereas html5lib and validator.nu don't), and I can't tell that I'm wrong |
13:40 | <annevk> | that's <table><tr></table>, no? |
13:41 | <zcorpan> | <table><tr></table><table> i think |
13:41 | <annevk> | yeah |
13:42 | <Philip`> | The <table> gets reprocessed in "in table" mode, which creates a </table> that gets processed in that mode, which generates implied end tags, and the current node is a <tr> so it generates a </tr>, which gets ignored because it's "in table" |
13:42 | <Philip`> | (and then it generates implied end tags for eternity) |
13:42 | <zcorpan> | Act as if an end tag token with the tag name "table" had been seen, then, if that token wasn't ignored, reprocess the current token. |
13:42 | <zcorpan> | Note: The fake end tag token here can only be ignored in the fragment case. |
13:43 | <Philip`> | It never gets as far as that "if" |
13:43 | <Philip`> | because the act-as-if-</table> never terminates |
13:44 | <annevk> | Philip`, only <table> should be treated as-if |
13:44 | <annevk> | not the other new tokens |
13:45 | <Philip`> | Hmm, that seems quite non-obvious |
13:47 | <Philip`> | I've interpreted it as being "old = mode; mode = InTable; process(<table>); if (mode wasn't changed while processing) mode = old" |
13:54 | <annevk> | we do mode = newmode; process(...); mode = currentmode |
13:54 | <annevk> | iirc |
13:56 | <Philip`> | Wouldn't that mean the </table> which gets generated and processed inside the process(...) would be done in 'newmode' ("in table") too? |
13:57 | <Philip`> | Seems to just do self.parser.phases["inTable"].processStartTag(name, attributes) |
13:58 | <annevk> | yeah, sorry |
14:00 | <hsivonen> | Philip`: IIRC, at least in v.nu parser old mode is only needed for moving from the endgame back to in body or in frameset |
14:20 | <gsnedders> | ergh. the spec-gen is so badly documented. |
15:04 | <annevk> | Lachy, why does the latest CVS version not use the Editor's draft template? |
15:04 | <annevk> | can I quickly fix that, as well as the date? |
15:04 | <annevk> | or are you editing? |
15:20 | <Lachy> | I've made some edits that still need to be checked in |
15:21 | <annevk> | oh, ok |
15:21 | <Lachy> | crap, it should be using the editor's draft template. |
15:21 | <annevk> | can you do that? |
15:22 | <Lachy> | Yes, it will get fixed with the next check in |
15:23 | <annevk> | i meant checking in |
15:25 | <annevk> | Hmm, Android SDK includes Ogg Vorbis |
15:25 | <annevk> | i did not know |
15:26 | <Lachy> | all fixed |
15:27 | <Philip`> | Hmph, html5lib cheats with reprocessing and fostering |
15:27 | <Philip`> | like if you say <table><a><a> then the implied </a> doesn't go through the "in table" mode |
15:27 | Lachy | needs to learn how to use W3C CVS from my Mac, instead of having to do it from my home PC all the time |
15:28 | <annevk> | you can only say cheats if we fail a test :) |
15:28 | <hsivonen> | Philip`: surely the top of the stack is no longer IN_TABLE at that point? |
15:28 | <Philip`> | You fail a test that does <table><a><a> and expects a certain number of parse errors :-) |
15:28 | <annevk> | Lachy, the date is still broken |
15:28 | <hsivonen> | or do I misremember stuff? |
15:28 | <annevk> | Lachy, you should omit the date parameter |
15:29 | <hsivonen> | it has been a while since I have thought about the tree builder |
15:29 | <annevk> | Philip`, it's ok to supress parse errors i believe :) |
15:29 | <Philip`> | hsivonen: Ah, yes, the </a> shouldn't get fostered, but it should still go through "in table" and generate a parse error |
15:30 | Philip` | can't find an instance in html5lib where it would cause a different parse tree |
15:31 | <Lachy> | oops, I still had the date set in my .bat file. Fixed |
15:33 | <annevk> | Lachy, did you see the e-mail about dumping StaticNodeList? |
15:33 | <Lachy> | the one from you in response to me? |
15:34 | <Lachy> | http://lists.w3.org/Archives/Public/public-webapi/2008Feb/0080.html ? |
15:34 | <annevk> | yeah |
15:34 | <Lachy> | I will do it |
15:34 | <hsivonen> | jgraham__: the commonality thread you replied to reminds me of http://www.nytimes.com/2008/01/20/magazine/20wwln-freak-t.html?_r=4&ref=magazine&oref=slogin&oref=slogin&oref=slogin&oref=slogin |
15:35 | <hsivonen> | though sending that link to the list would probably be seen as a flame |
15:36 | <Lachy> | it's a rather complicated change, since I need to change/remove all occurrences of StaticNodeList, define the NodeList to be returned as not live and make sure no errors are introduced in the process |
15:37 | <annevk> | true |
15:37 | <Lachy> | I'll give it a go |
15:45 | <Lachy> | annevk, any suggested text for how to define the node list as static? |
15:48 | <annevk> | return the list of elements as a static object implementing the NodeList interface |
15:48 | <annevk> | something in that direction |
15:49 | <annevk> | or maybe "static NodeList object" |
15:54 | Philip` | ends up changing his 'fostering' flag to be an integer, so he can handle nested fostering without cheating |
15:55 | <Philip`> | http://philip.html5.org/tools/parser/?%3Ctable%3E%3Ctr%3E%3Ctable%3E - now with slightly fewer infinite loops, hooray |
15:58 | <Lachy> | annevk, "The NodeList object returned by the querySelectorAll() methods must not be live. Subsequent changes to the structure of the underlying document must not be reflected in the NodeList object. The object must instead contain a list of matching Element nodes that were in the document at the time the list was created." |
16:00 | <annevk> | s/must not be live/must be static/ |
16:01 | <annevk> | or s/must not be live/must be static (not live)/ |
16:01 | <annevk> | the other statements can be phrased as statements of facts instead of conformance criteria |
16:03 | <Lachy> | "must be static (not live)" works, where _live_ is a link to the defintion of live lists in DOM3 |
16:03 | <annevk> | i think it's universally understood what it means, but you could do that |
16:04 | <Lachy> | yeah, I just wanted to make it absolutely clear |
16:06 | <Philip`> | http://www.w3.org/mid/op.t2kr1qnf64w2qv⊙aooc - internal server error? |
16:06 | <annevk> | wfm |
16:06 | <annevk> | http://lists.w3.org/Archives/Public/public-forms-tf/2007Nov/0000.html |
16:07 | <Philip`> | Oh, it worked on the third attempt |
16:22 | <annevk> | oops... why did I confuse vorbis with theora... |
16:22 | <Lachy> | annevk, changes have been committed |
16:22 | <Lachy> | let me know if I buggered anything up |
16:23 | Lachy | goes to friday beer |
18:57 | gsnedders | wonders how the spec-gen deals with broken stuff |
18:59 | <Hixie> | annevk: postMessage() is reasonable stable as currently in the spec |
18:59 | <Hixie> | the EndPoint extensions are backwards compatible |
19:03 | <gsnedders> | anyone know how to get all elements directly containing "foo" using XPath, and not any parent of a text node containing the string? |
22:45 | jgraham | considers posting hsivonen's NYT link to public-html |
22:46 | <Hixie> | hahaha |
22:46 | Hixie | notices that the 404 page on acid3.acidtests.org is coming out as the favicon in certain browsers |
22:46 | <Hixie> | unexpected bug! |
22:47 | <Hixie> | jgraham: what does the article say? |
22:51 | <hsivonen> | Hixie: the article presents three cases where laws that are supposed to protect those who are worse off make their situation even worse my creating bad incentives for others |
22:51 | <Hixie> | a'h |
22:51 | <hsivonen> | Hixie: that Americans with Disabilities Act gives an incentive to doctors not to take deaf patient |
22:52 | <hsivonen> | Hixie: and that Mosaic law on money lending and agriculture are bad for the poorest in Israel |
22:53 | <hsivonen> | Hixie: and how protecting habitats of endangered species creates an incentive for landowners to clear their land pre-emptively |
22:53 | <Hixie> | and how requiring 'alt' makes people add bogus values to shut up validators? :-) |
22:55 | <hsivonen> | I guess the economists haven't examined HTML yet |
22:56 | <Hixie> | i think anyone who would realise the implications of that article are likely already convinced |
23:09 | <jgraham> | Hixie: I was considering saying that the critical take away message is that we have to operate a feedback loop: a) do things that we think are a good idea b) assess the _actual_ impact of those things c) make changes where it urns out things didn't have the desired impact |
23:09 | <jgraham> | We are at satge b |
23:09 | <jgraham> | s/satge/stage/ |
23:09 | <Hixie> | we're at all three stages on different parts of the spec |
23:10 | <Hixie> | but the above should go without saying for all spec development work |
23:10 | <Hixie> | and indeed, almost all work of any knid |
23:11 | <jgraham> | I guess that's not obvious to everyone. I really just want people to understand that stages b) and c) have to happen as part of HTML5 |
23:11 | <jgraham> | unless we want it to be no better than HTML 4 |
23:11 | <hsivonen> | Hixie: evidence suggests that a lot of stuff that should go without saying given suitable economics or tecnology strategy background doesn't go without saying |
23:12 | <gsnedders> | anyone any better way to achieve <http://pastebin.ca/905674>? |
23:12 | <Hixie> | jgraham: i encourage you to advocate this; i'm just skeptical that there are people who are still unconvinced who can be convinced. |
23:13 | <jgraham> | gsnedders: Define better. You could do it non-recursively which would prevent stack overflow |
23:13 | <hober> | gsnedders: (sorry to bikeshed, but) wouldn't 'descendents' be a better name than 'children' in this case? |
23:13 | <Hixie> | i think a lot of people in the w3c think that standards _shouldn't_ have a feedback loop; that standards should be written by experts whose knowledge is by definition perfect and that therefore there cannot be anything to learn. |
23:13 | <gsnedders> | jgraham: silly Python with it's stack :) |
23:13 | <jgraham> | Does anyone know if NYT print versions are registration-free? |
23:14 | <gsnedders> | hober: ironically, I just renamed it from that. I'm still toying between the two. |
23:14 | <gsnedders> | jgraham: more seriously, it copes with HTML 5 fine |
23:14 | <jgraham> | gsnedders: In practice you'd get a RecursionError or something |
23:15 | <jgraham> | (fwiw I'd write the code in the same way but I don't claim to be a particularly good programmer) |
23:15 | gsnedders | thought of how to do it non-recursively, then promptly forgot |
23:15 | <gsnedders> | and now all I think of has major flaws. |
23:15 | <jgraham> | Can people access http://www.nytimes.com/2008/01/20/magazine/20wwln-freak-t.html?_r=5&oref=login&ref=magazine&pagewanted=print ? |
23:16 | <hsivonen> | jgraham: that one is behind login too |
23:16 | <hsivonen> | however, having a referer might work |
23:16 | <Hixie> | i thought there was some magic "partner" argument one could set |
23:17 | <hsivonen> | nope, tinyurling doesn't work |
23:17 | <annevk> | Hixie, Acid3 test 69: "Statement on line 2502: Undefined variable: numberOfChars" |
23:17 | <hsivonen> | Tantek had a magic tinyurl-like URL for that article that worked magically |
23:18 | Dashiva | blinks |
23:18 | hsivonen | found the article tantek's tweet |
23:18 | <Dashiva> | The I18N WG expects every single JS author using selectors API to implement unicode case folding? |
23:18 | <hsivonen> | Dashiva: or normalization |
23:18 | <hsivonen> | or did I misread? |
23:18 | <jwalden> | case-insensitivity was a bad idea |
23:18 | <billmason> | NYT link w/o login. http://www.nytimes.com/2008/01/20/magazine/20wwln-freak-t.html?_r=1&ex=1358485200&en=0d05099c03c97375&ei=5090&partner=rssuserland&emc=rss&pagewanted=all&oref=slogin |
23:19 | gsnedders | now can't think of to do it non-recursively |
23:19 | <Philip`> | jgraham: http://www.nytimes.com/2008/01/20/magazine/20wwln-freak-t.html?_r=5&oref=login&ref=magazine&pagewanted=print works for me without login |
23:19 | <jgraham> | billmason: Thanks :) |
23:20 | <billmason> | You're welcome. I use http://nytimes.blogspace.com/genlink to get those links, btw. Comes in handy. |
23:20 | <Dashiva> | hsivonen: Yeah, that's the next point, I see |
23:20 | <Hixie> | anne: line 2502 is a comment |
23:20 | <Hixie> | annevk: fixed |
23:21 | <annevk> | hmm |
23:22 | <annevk> | ah yeah, now I get the error i was expecting |
23:23 | <annevk> | not sure i'm going to debug it though, SVG is no fun |
23:23 | <Hixie> | hah |
23:24 | <annevk> | https://bugzilla.mozilla.org/show_bug.cgi?id=379461 dbaron ftw! |
23:24 | <annevk> | my memory says we fixed it too, so that makes two out of three browsers |
23:25 | <Philip`> | gsnedders: r=[]; c=[Node]; while c: c += c[0].childNodes; r.append(c.pop(0)) or something roughly like that, I think |
23:27 | <Philip`> | (Python isn't entirely good at one-liners, sadly) |
23:28 | <jgraham> | I think if you want to be really fancy you can do it without an explicit stack; basically for each node you go to the first child, if there is one, otherwise go to the next sibling otherwise go to the parent (but not back to he first child) |
23:30 | <Philip`> | That doesn't seem entirely necessary unless the current DOM is using more than 50% of your RAM and you can't afford to make another copy of it |
23:30 | <Philip`> | and then it's probably easier and cheaper just to stick another 2GB of RAM in so you won't have to worry about it |
23:31 | <jgraham> | :) |
23:31 | <gsnedders> | Philip`: my recursive version is twice as fast going over HTML 5. peh. |
23:31 | <gsnedders> | jgraham: yeah, that's what I was thinking of doing |
23:32 | <Philip`> | Does Python do something silly like not use double-linked lists for 'list'? |
23:32 | <gsnedders> | double-linked lists? |
23:32 | <jgraham> | Philip`: list == array |
23:33 | <Philip`> | Hmm, that'd probably make .pop(0) quite expensive then |
23:33 | <jgraham> | gsnedders: You could investigate the deque class in the collections module |
23:33 | <gsnedders> | Philip`: pop seems perfectly cheap |
23:33 | <jgraham> | Yeah, I guess pop(0) will be O(N) but pop(-1) will be cheap |
23:34 | <gsnedders> | 97901 0.479 0.000 0.479 0.000 {method 'pop' of 'list' objects} |
23:35 | <gsnedders> | (i.e., percall is 0.00 sec) |
23:35 | <jgraham> | gsnedders: Is that pop(0)? |
23:35 | <gsnedders> | ya |
23:36 | jgraham | still suggests looking up deque |
23:36 | <gsnedders> | http://pastebin.ca/905707 (top is non-recursive) |
23:37 | <Philip`> | from collections import deque; r=[]; c=deque([node]); while c: t=c.popleft(); c.extend(t.childNodes); r.append(t) maybe |
23:39 | <jgraham> | gsnedders: It looks like function call overhead is killing you |
23:40 | <gsnedders> | deque is back up to speed |
23:40 | <jgraham> | specifically __getattr__ |
23:40 | <gsnedders> | yeah |
23:40 | <gsnedders> | that's what I thought |
23:42 | Philip` | still suggests using Psyco :-) |
23:44 | <gsnedders> | Philip`: peh. at least I'm not actually parsing about ten/fifteen times like the real spec-gen |
23:45 | <Philip`> | (I think html5lib goes about twice as fast under Psyco) |
23:45 | <gsnedders> | .extend() instead of += cuts out a lot of the function calls, so that makes the standard non-recursive one quicker |
23:45 | jgraham | still suggests lxml |
23:45 | <gsnedders> | Philip`: (that would make a difference) |
23:45 | gsnedders | tries to remember why he didn't use lxml |
23:46 | <Philip`> | cssutils does some fun "c = self.text.pop(0)" for every single character while tokenising stylesheets, which completely destroys performance because of the O(n) thing |
23:46 | <Philip`> | ...though it looks like that code is rewritten in the latest version, so maybe they fixed that problem |
23:47 | gsnedders | really ought to get his head around big-O notation |
23:51 | <Philip`> | It's easy - O(1) means you're hiding the expensive operations on your data structure, O(n) means you're using the expensive operations on your data structure, O(n log n) means you're using trees, and O(e^n) means you're working on an interesting problem |
23:51 | gsnedders | headdesks |
23:52 | <jgraham> | O(N^2) means the interviewer wants you to think of a different solution :) |
23:56 | <gsnedders> | Can I get a serious explanation? |
23:57 | <takkaria> | http://www.google.co.uk/url?sa=t&ct=res&cd=1&url=http%3A%2F%2Fen.wikipedia.org%2Fwiki%2FBig_O_notation&ei=Qyi2R8u7IaWwwQHGwJDICg&usg=AFQjCNFsPl2CW_acj-E5rq3PZ17cwqaJ2g&sig2=K2R1u4iESPxXmFtCt8TmqQ |
23:57 | <takkaria> | er |
23:57 | <takkaria> | I didn't realise google did horrible redirects on its own urls thesedays |
23:57 | <gsnedders> | takkaria: I've been trying to get my head around that article for a while. I've still failed. |
23:57 | <Philip`> | It rewrites the href just as you click on the link |
23:58 | <Philip`> | so it works alright if you right-click-and-copy-link before following the link |
23:58 | <jgraham> | N is the number of elements you feed in to the algorithm. O(foo(N)) means that as N changes the running time scales like foo(N) |
23:58 | <Philip`> | Oops, I broke it |
23:58 | <Philip`> | Oh, wrong window |
23:59 | <gsnedders> | jgraham: and there's nothing more complex than that? |
23:59 | <jgraham> | gsnedders: working out what foo is for a given algorithm |
23:59 | <gsnedders> | jgraham: well, obviously :) |
23:59 | jgraham | should probably leave this to someone with a CS background |