| 00:00 | <Hixie> | where "back up" will mean that the same condition (A, B, etc) will be true again when you go to mode 2, and otherwise it's the next character that's processed |
| 01:01 | <TabAtkins> | Well, the two as you wrote them out aren't equivalent, since A will mean that Y gets done twice... |
| 01:14 | <jamesr> | Hixie, the as-if clause means that defining an inefficient algorithm in a spec isn't a problem |
| 01:15 | <jamesr> | assuming that the same results can be reached by a more efficient algorithm |
| 01:15 | <jamesr> | and spec implementors realize this fact |
| 01:15 | <jamesr> | but it sounds like your problem is figuring out what behavior you actually want |
| 08:41 | <hsivonen> | when has Web Sockets been changed incompatible for the last time? Are more incompatible changes coming up? which browsers implement the spec? |
| 08:41 | <hsivonen> | Is Safari still on an ancient version? |
| 08:44 | <jgraham> | hsivonen: AFAIK there aren't incompatible changes planned |
| 08:44 | <jgraham> | At least it has an RFC now |
| 08:45 | <jgraham> | I don't exactly know which browsers implement the spec, but it should be easy to test |
| 08:45 | <jgraham> | http://autobahn.ws/testsuite tests the protocol layer |
| 08:46 | <hsivonen> | https://developer.mozilla.org/en-US/docs/WebSockets says all browsers implement the RFC in the latest releases |
| 08:47 | <jgraham> | http://w3c-test.org/webapps/WebSockets/tests/ has API tests; the Microsoft ones aren't that great and the Opera ones aren't all converted to testharness yet |
| 08:47 | <jgraham> | But happily I don't have anything better to do at the weekend |
| 08:47 | <jgraham> | Scare quotes implied |
| 08:48 | <jgraham> | (on the subject of which, is there a sync way to perform a request that will (un)set a cookie?) |
| 08:48 | <hsivonen> | I find it fascinating that someone wants to use a non-standard Gecko-specific feature but is not OK with using Web Socket, because it is in "BETA" |
| 08:49 | <jgraham> | hsivonen: huh? |
| 08:50 | <hsivonen> | jgraham: you encounter interesting people when trying to remove engine-specific features that have bad maintainability characteristics |
| 08:50 | <annevk> | jgraham: we're trying to remove Gecko XMLHttpRequest multipart |
| 08:51 | annevk | goes to work |
| 08:51 | <hsivonen> | I'm sure the move to WebKit will result in people with Opera-dependent intranets complaining |
| 08:51 | zcorpan | is officially back in business |
| 08:52 | <jgraham> | Yay! |
| 08:53 | jgraham | has never actually heard of an Opera-dependent intranet |
| 08:53 | <jgraham> | Of course, there's lots of things that I haven't heard of that nevertheless exist… |
| 08:55 | <hsivonen> | jgraham: and for all those years chaals always got upset when something I said had a slighly intranet-dismissive sentiment |
| 08:55 | <jgraham> | zcorpan: I don't suppose that means that you have time to release (y)our postMessage tests? ;) |
| 08:55 | <hsivonen> | jgraham: anyway, I wasn't aware that someone would have an intranet app dependent on an encoding label not supported by IE |
| 08:55 | <zcorpan> | jgraham: i'd like to get things set up on my new laptop first |
| 08:56 | <jgraham> | zcorpan: Sure :) I just did a double take the other day when I realised they had never been released. If you don't get around to it I'm sure I will one of these days |
| 08:57 | <jgraham> | hsivonen: Maybe Charles knows things I don't know? |
| 08:57 | <zcorpan> | nice |
| 08:58 | marcosc | chuckles at "Opera-dependent intranets"... but who knows... |
| 08:59 | <jgraham> | To be fair, I'm sure there exist presto-dependent non-web environments |
| 08:59 | <marcosc> | I was thinking there was probably some, maybe in the countries where Opera has a high uptake |
| 09:00 | <marcosc> | I remember when I was at Opera, the time tracking application would only work well with FireFox for a while :) |
| 09:00 | <jgraham> | "work well" |
| 09:01 | <marcosc> | jgraham: you no like how I talks? :) |
| 09:01 | <jgraham> | I dislike your attention to scare quotes |
| 09:01 | <marcosc> | fair enough |
| 09:07 | <hsivonen> | pretty cool how video stuff can work with FourCCs instead of namespace URIs |
| 09:08 | <hsivonen> | I wonder if there's a mapping from FourCCs to RDF URIs. You know, to make them less prone to collision. |
| 09:10 | <othermaciej> | http://www.fourcc.org/namespace/four-character-code/D/A/V/C would clearly be superior to 'DAVC' |
| 09:10 | <hsivonen> | othermaciej: no year in URI!!! |
| 09:12 | <othermaciej> | pardon, http://www.fourcc.org/namespace/1984/four-character-code/D/A/V/C |
| 09:17 | <jgraham> | Hmm, "1984" in a video codec namespace URI makes me think of "video watches you" type jokes |
| 09:18 | <Philip`> | That'd be good since you could easily extend it to http://www.fourcc.org/namespace/1984/five-character-code/D/A/V/C/E etc if you start running out of four-character strings |
| 09:20 | <Philip`> | (Obviously fivecc.org would have been registered by some domain parking spammer so it'd be best to stick with the old domain) |
| 09:22 | <jgraham> | (and updating the year would just cause confusion) |
| 09:23 | <hsivonen> | I bet there's text/html where the year in xmlns has been updated to the year of document authoring |
| 09:24 | <annevk> | Resource with origin A initiates a request to another resource on origin A. That redirects to B. What is the value of the Origin header? |
| 09:25 | <Philip`> | http://devfiles.myopera.com/articles/591/nsnamelist-url.htm has some http://www.w3.org/2006/xhtml |
| 09:25 | <Philip`> | Also some http://www.w3.org/1999/xphp |
| 09:28 | <othermaciej> | annevk: surely the Origin should be A? |
| 09:29 | <othermaciej> | (not sure why that case would be ambiguous) |
| 09:29 | <annevk> | othermaciej: but if B redirects to C it should be "null" |
| 09:29 | <annevk> | othermaciej: but yeah, the origin didn't change, so it can remain the same |
| 09:29 | <annevk> | my bad |
| 09:30 | <othermaciej> | where is the Origin header spec'd, officially? |
| 09:31 | <othermaciej> | is CORS the only spec? has the idea of sending Origin more widely than that been abandoned? |
| 09:33 | <annevk> | https://tools.ietf.org/html/rfc6454 and HTML and CORS both define the requirements. |
| 09:33 | <annevk> | My plan is to write Fetch which takes everything from CORS and HTML and will handle all those networking requirements. Well, at least those related to fetching resources. |
| 09:33 | <othermaciej> | for some reason I was only able to find the Internet-Draft, not the RFC |
| 09:35 | <annevk> | It's actually not a plan anymore, I'm writing a draft... |
| 09:37 | <jgraham> | Still kind of a plan unless you have actually achieved all the listed goals |
| 09:38 | <annevk> | Ah yeah, that is still the plan. But I'm a bit further than planning. |
| 10:17 | <MikeSmith> | jgraham: those websockets binary/ tests fail for me in Chrome |
| 10:17 | <MikeSmith> | though they pass everywhere else |
| 10:18 | <MikeSmith> | well except I don't know about IE |
| 10:18 | <MikeSmith> | but maybe they are failing for Ken in IE for the same reason they fail for me in Chrome |
| 10:18 | <MikeSmith> | oh wait |
| 10:18 | <MikeSmith> | weired |
| 10:19 | <MikeSmith> | nm |
| 10:19 | <MikeSmith> | they fail for me in Chromium that I built myself |
| 10:20 | <MikeSmith> | but they pass in Canary |
| 10:20 | <MikeSmith> | so I guess there's just something wrong in my build |
| 10:24 | <jgraham> | MikeSmith: WFM in chrome |
| 10:24 | <MikeSmith> | yeah |
| 10:25 | <MikeSmith> | I guess I should test stuff first in browsers I haven't made hacks to |
| 10:26 | <jgraham> | That sounds very boring |
| 10:27 | <MikeSmith> | I need a personal bug tracker |
| 10:27 | <zcorpan_> | so mountain lion should have hg preinstalled? -bash: hg: command not found |
| 10:27 | <MikeSmith> | so I can harrass myself with bug reports |
| 10:27 | <MikeSmith> | zcorpan_: I think it has git but not hg |
| 10:28 | <annevk> | zcorpan_: I don't think so... Not even with XCode afaik |
| 10:28 | <MikeSmith> | yeah |
| 10:28 | <annevk> | oh, Xcode |
| 10:28 | <zcorpan_> | ok |
| 10:31 | <MikeSmith> | man this is weird, the error I'm getting is "SyntaxError: DOM Exception 12(stack: Error: An invalid or illegal string was specified. at Object.<anonymous> (file:///opt/workspace/webapps/WebSockets/tests/submissions/Opera/binary/002.html:9:12" |
| 10:33 | <MikeSmith> | 002.html:9:12 is the word "new" |
| 10:35 | <zcorpan_> | for html5lib should i clone and run `python setup.py develop` or just `python setup.py`? |
| 10:35 | <Ms2ger> | gsnedders, ^ |
| 10:44 | <MikeSmith> | oh I didn't realize John Luther came from On2 |
| 10:44 | <MikeSmith> | makes sense |
| 10:44 | <MikeSmith> | WebM/VP8|9 PM at Google |
| 11:06 | <annevk> | I like this: https://twitter.com/joeyheflich/status/307224956050235394 |
| 11:27 | <zcorpan> | ok looks like i've got anolis running now. time for lunch |
| 11:29 | <MikeSmith> | why are " |
| 11:30 | <MikeSmith> | why are "x-dns-prefetch-control" and "X-UA-Compatible" listed on http://wiki.whatwg.org/wiki/PragmaExtensions ? |
| 11:30 | <MikeSmith> | the spec says "Such extensions must use a name that is identical to an HTTP header registered in the Permanent Message Header Field Registry" |
| 11:34 | <annevk> | because where else would we register such things? |
| 11:37 | <MikeSmith> | somewhere other than there |
| 11:38 | <MikeSmith> | because if you put them there, people file bugs asking to have them supported in the validator |
| 11:38 | <MikeSmith> | but we can't support those because they're not in the Permanent Message Header Field registry |
| 11:47 | <jgraham> | zcorpan: with "develop" you will get the fiels left in place, without "develop" it will move the files to the relevant site-packages directory |
| 11:50 | <jgraham> | *files |
| 11:57 | <annevk> | MikeSmith: so I think we should split that table then into proposed and allowed |
| 11:57 | <annevk> | MikeSmith: I can do that if you want |
| 11:57 | <MikeSmith> | annevk: nah I can |
| 11:57 | <MikeSmith> | will do right now |
| 11:58 | <annevk> | MikeSmith: long term Hixie will fix this once he sorts out a plan to do extensions |
| 11:58 | <MikeSmith> | ok |
| 12:28 | <annevk> | It's so annoying that HTTP headers have no canonical concept |
| 12:48 | <zcorpan> | anyone have a clue what https://www.w3.org/Bugs/Public/show_bug.cgi?id=20293 is about? |
| 12:49 | <Ms2ger> | Hixie, I hope |
| 12:52 | <zcorpan> | Hixie: ^ |
| 12:54 | <annevk> | sounds like an interesting bug |
| 13:05 | <zcorpan> | "there's a quirk for <font face="Wingdings">J</font> which does not exist for <span style="font-family: Wingdings">J</span>" https://bugzilla.mozilla.org/show_bug.cgi?id=450723#c4 |
| 13:06 | <zcorpan> | can't reproduce though (on a windows laptop with wingdings installed) |
| 13:06 | <wilhelm> | OK, that quirk is wonderful. |
| 13:07 | <wilhelm> | J is the smiley, often used by Outlook. |
| 13:07 | <zcorpan> | ah the same comment says the quirk is busted on trunk |
| 13:08 | <jgraham> | Now I feel old |
| 13:09 | <jgraham> | I remember bug 90643 from 2001 |
| 13:09 | <Ms2ger> | Well, on trunk from 2008 |
| 13:11 | <zcorpan> | yeah. it'd explain why i can't reproduce it now |
| 13:12 | <jgraham> | (or at least I remember some bug about that behaviour, although in my mind there were a lot more upset people) |
| 13:19 | <MikeSmith> | jgraham: so can I get a critic review set up for https://github.com/w3c/html-testsuite/pull/21 and https://github.com/w3c/html-testsuite/pull/18 ? |
| 13:20 | <MikeSmith> | oh wait Ms2ger is already review https://github.com/w3c/html-testsuite/pull/18 |
| 13:20 | <Ms2ger> | Part of it |
| 13:20 | <Ms2ger> | If someone want to beat me to continuing the review, please do :) |
| 13:21 | <jgraham> | MikeSmith: Sure, but I can't sync the comments |
| 13:21 | <jgraham> | (yet) |
| 13:21 | <MikeSmith> | I'll try to do 21 first |
| 13:21 | <MikeSmith> | jgraham: no problem because there are not technical comments for it yet anyway |
| 13:22 | <MikeSmith> | there was one from Ms2ger but I think Dzenana already responded to it with an updated diff |
| 13:23 | <jgraham> | MikeSmith: OK, well set yourself up with a filter for the html-testsuite repo at http://critic.hoppipolla.co.uk/ (bottom of the homepage, select the repo in the dropdown, add / as the path and click save) |
| 13:23 | <jgraham> | Then close and reopen the pull request |
| 13:23 | <jgraham> | That critic doesn't send email yet |
| 13:24 | <jgraham> | But if it did it would ten email you and tell you that it has a new review |
| 13:24 | <MikeSmith> | ok |
| 13:24 | <jgraham> | and it will appear on your dashboard |
| 13:25 | <jgraham> | darobin: Did I already point out http://critic.hoppipolla.co.uk/r/8 to you? |
| 13:25 | <jgraham> | Oh I think I mentioned it in the PR |
| 13:26 | <jgraham> | So never mind me |
| 13:26 | <darobin> | jgraham: you did yes, sorry, putting out other fires — will get to it shortly |
| 13:26 | <MikeSmith> | jgraham: do I did all those steps but my dashboard says "No reviews!" |
| 13:27 | <Ms2ger> | MikeSmith, now click the link again |
| 13:28 | <MikeSmith> | Ms2ger: which link? close/reopen? |
| 13:28 | <zewt> | ... no pointer-events in IE10? seriously? |
| 13:28 | <jgraham> | MikeSmith: Hmm, I am getting an error message from git |
| 13:28 | <Ms2ger> | MikeSmith, I'm confused, nvm me :) |
| 13:29 | <jgraham> | pre-recieve hook declined |
| 13:29 | Ms2ger | tries to break critic |
| 13:29 | <Ms2ger> | http://critic.hoppipolla.co.uk/r/%C3%A7 |
| 13:29 | <Ms2ger> | "Got 'id=�', expected expected integer." |
| 13:34 | <jgraham> | MikeSmith: Will need to investigate further later |
| 13:39 | <MikeSmith> | jgraham: ok, no worries |
| 13:39 | <MikeSmith> | it's Friday night here and getting close to drinking time so I'm not going to be doing any reviewing today anyway |
| 14:39 | <hsivonen> | annevk: is suggesting comma-separated values in Access-Control-Allow-Origin correct in https://bugzilla.mozilla.org/show_bug.cgi?id=845789 ? |
| 14:41 | <annevk> | hsivonen: the spec only accepts a single value |
| 14:42 | <annevk> | hsivonen: somewhat related, http://lists.w3.org/Archives/Public/www-archive/2013Feb/0093.html suggests Firefox has a fundamental bug in header parsing |
| 14:42 | <Ms2ger> | I bet we do |
| 14:42 | <annevk> | X: TEST CRLF X: TEST and X: TEST, TEST are supposed to be equivalent |
| 14:43 | <annevk> | Of course those rules do not work for cookies so... |
| 14:46 | <annevk> | hsivonen: added a comment |
| 14:55 | <hsivonen> | annevk: thanks |
| 14:56 | <hsivonen> | (I was unaware that we had a YSoD equivalent for HTTP header violations) |
| 15:18 | <zcorpan> | jgraham: what't the situation with testcases? are they on github now? should i move https://dvcs.w3.org/hg/quirks-mode to github? |
| 15:18 | <jgraham> | zcorpan: HTML testcases are on github |
| 15:19 | <zcorpan> | ok |
| 15:19 | <jgraham> | The plan is to add other testcases to github in the same repo |
| 15:19 | <jgraham> | But webapps needs some convincing |
| 15:19 | <jgraham> | We will end up with something like web-platform-tests |
| 15:19 | <zcorpan> | i guess i'll wait a bit with the quirks tests |
| 15:21 | <jgraham> | Yeah I don't really know if you should just dump them in the html-testsuite repo or create a new one |
| 15:21 | <Ms2ger> | Dump them, IMO |
| 15:31 | <zewt> | one of the more hilarious UI errors: hitting ^R in IE9's console, instead of reloading like everything in the world, asks if you want to clear your browser cache |
| 15:44 | <annevk> | hsivonen: CORS has such requirements |
| 15:44 | <annevk> | hsivonen: I didn't know we also applied it to Location though... |
| 16:01 | hsivonen | wonders how long until a reference to w3c-css-wg on w3cmemes |
| 16:03 | <zcorpan> | Zarro Quirks Boogs |
| 16:04 | <jgraham> | hsivonen: w3c-css-wg |
| 16:04 | <jgraham> | ? |
| 16:05 | <hsivonen> | jgraham: read forward from https://lists.w3.org/Archives/Member/w3c-css-wg/2013JanMar/0211.html or backward from https://lists.w3.org/Archives/Member/w3c-css-wg/2013JanMar/0241.html |
| 16:09 | <zcorpan> | wat? http://www.w3.org/TR/2013/WD-xhtml-pubid-20130228/ |
| 16:10 | <annevk> | lol |
| 16:10 | <annevk> | I thought the TAG was somewhat odd |
| 16:15 | <zcorpan> | http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2125 - unsurprisingly, opera/firefox/chrome don't support that FPI |
| 16:26 | <annevk> | HTTP is so sucky |
| 16:26 | <annevk> | it's all bytes but everyone talks about as if it's strings |
| 16:27 | <annevk> | so how can a spec clearly talk about this? |
| 16:28 | <annevk> | E.g. in http://www.w3.org/TR/2013/CR-cors-20130129/#preflight-request (using this link for stable reference) it talks about ASCII lowercasing header field names, but the ASCII lowercasing is a string operation |
| 16:28 | <annevk> | so it's wrong |
| 16:28 | <SimonSapin> | annevk: WSGI (the Python thing to turn HTTP into a calling convention) uses latin-1 |
| 16:29 | <annevk> | SimonSapin: and throws for non latin-1 input? |
| 16:29 | <annevk> | SimonSapin: but sure, you can do some conversion things at the edges and have input control, but it's not entirely clear what the right approach is |
| 16:29 | <SimonSapin> | that is, some headers are represented as Unicoded string decoded from the wire as latin-1. (That is, real ISO-8851-1 where each byte is decoded as a code point of the same value) |
| 16:30 | <SimonSapin> | often the actual encoding is something else, so frameworks encode back to bytes and decode again |
| 16:31 | <annevk> | lends more credence to the HTTP is a fricking mess meme |
| 16:42 | <annevk> | but I guess there's like two people in the world that care about this :-( |
| 16:47 | <annevk> | tentative plan, since it's mostly strings that look like bytes, I'll write them out as strings without " and " |
| 16:47 | <annevk> | and use stuff like "byte lowercased" |
| 16:48 | <SimonSapin> | annevk: Even if you care, I guess the cost of switch is much higher than the benefits of nice byte/character separation |
| 16:48 | <annevk> | and hope I'm the only one that thinks of the annoying questions |
| 16:48 | <annevk> | SimonSapin: it's not so much the switch as security implications and interoperability considerations in general |
| 17:03 | <dglazkov> | good morning, Whatwg! |
| 18:02 | <Ms2ger> | jsbell, thanks for those fixes; I'll try to review them soon :) |
| 18:02 | Ms2ger | adds that to the end of his todo list |
| 18:08 | <jsbell> | Ms2ger: Thank you! |
| 18:41 | <aklein> | Hixie: interested in your thoughts on http://lists.w3.org/Archives/Public/public-whatwg-archive/2013Feb/0189.html (I probably wrote too much in the original email...) |
| 18:51 | <TabAtkins> | Is there any good way to expose in IDL that some interface's attributes should all be iterable? |
| 18:52 | <TabAtkins> | Context: For CSS Variables, I hang a "var" object off of style that contains only the custom properties. It's useful to be able to iterate over that. |
| 18:52 | <TabAtkins> | You can do a for-in loop, but being able to forEach() it would be good too. |
| 18:53 | <TabAtkins> | Also: am I right that you can for-in something that uses named getters/setters to expose all of its properties? |
| 18:59 | <Ms2ger> | Yes |
| 18:59 | <Ms2ger> | for of should work if you have indexed properties |
| 19:01 | <TabAtkins> | Also for named? |
| 19:01 | <TabAtkins> | (indexed is only numbered stuff) |
| 19:02 | <Ms2ger> | No, but I'm not sure you'd want that |
| 19:02 | <TabAtkins> | How else do you iterate over an unknown collection of things? |
| 19:03 | <TabAtkins> | Such as "all the custom properties on this element"? |
| 19:03 | <Ms2ger> | Well, what would you want to iterate over? |
| 19:03 | <Ms2ger> | I mean, having just the values and not the keys doesn't seem useful |
| 19:03 | <TabAtkins> | Wait, what? for-in exposes the keys. |
| 19:03 | <Ms2ger> | Yeah, for in does |
| 19:03 | <TabAtkins> | You have to grab the values yourself. |
| 19:03 | <Ms2ger> | for of / forEach don't |
| 19:04 | <TabAtkins> | (forEach does - the key is the second callback argument) |
| 19:04 | <TabAtkins> | But yeah, for-of defaults to iterating over values, of course. |
| 19:04 | <TabAtkins> | For array-like things. |
| 19:04 | <Ms2ger> | I guess you could have a special iterator |
| 19:04 | <Hixie> | TabAtkins: the idea is that each time through the algorithm you get a new token, or whatever, unless you "go back", in which case you get the same token again the second time |
| 19:05 | <TabAtkins> | Hixie: Oh, so it's just a "reconsume" thing. |
| 19:05 | <Hixie> | jamesr__: understood that as-if means they are equivalent, the question is just whether implementors prefer an obviously inefficient but very regular algorithm, or one that isn't quite so overly regular/consistent, but has obvious optimisations taken care of already |
| 19:05 | <TabAtkins> | Ms2ger: That's kinda what I'm wondering about, actually. All the iterable things in ES will expose a default iterator, but then several explicit iterators for going over keys, values, or items. |
| 19:06 | <Ms2ger> | Mm |
| 19:06 | <Ms2ger> | I don't think anyone does that yet |
| 19:06 | <TabAtkins> | I guess that'll work automatically if you have indexed/named properties? |
| 19:06 | <TabAtkins> | No, not yet. |
| 19:06 | <Ms2ger> | For indexed properties, Gecko does |
| 19:06 | <TabAtkins> | I'm going to assume it'll work automatically, and for now just rely on the fact that for-in works over the keys of named properties. |
| 19:07 | <Ms2ger> | Probably poke public-script-coord if you want something else |
| 19:10 | <Hixie> | aklein: yeah, that thing is on my pile... not sure what thoughts I have. i don't think it's clear that gecko's behaviour is a bug. not sure what the ideal behaviour is though. |
| 19:11 | <Hixie> | TabAtkins: right. so my question could be phrased as, if you know what will happen when you reconsume, and it's trivial to describe (e.g. it's "do nothing", or just "output the value unchanged"), should I still reconsume, or should I inline that behaviour. |
| 19:11 | <TabAtkins> | Oh, I inline if it's short, and reconsume if it's long. |
| 19:12 | <TabAtkins> | It kinda depends on whether the inlining is clear, or if it's clearer to explicitly head into the next case. |
| 19:12 | <Hixie> | yeah, that's the annoyingly vague "it depends" conclusion I came to too :-) |
| 19:12 | <TabAtkins> | Heh, yeah. |
| 19:13 | <TabAtkins> | For short "do nothing" things, though, I pretty much always inline. |
| 19:13 | <TabAtkins> | I'm also a fan of early returns in programming languages. |
| 19:38 | <zewt> | i can't stand code that tries to avoid multiple returns |
| 19:39 | <zewt> | always seems like a mistake people make because someone told them "functions should have only one return" while they were learning, they internalized it before they were experienced enough to think their own thoughts, then they moved forward in their career never questioning it |
| 19:41 | <Hixie> | could also be the result of some old languages that didn't have return statements |
| 19:41 | <Hixie> | e.g. old versions of pascal only had assign-to-function-result, and no way to early exit, iirc |
| 19:42 | <Philip`> | zewt: My favourite thing is "void foo() { int status = OK; ... if (bar()) { status = ERR; goto end; } ... end: return status; }" |
| 19:43 | <zewt> | that's probably an old C habit |
| 19:43 | <zewt> | where gotos were a common pattern for resource collection over the error paths |
| 19:43 | Philip` | is still writing in C, so that's still the common pattern :-( |
| 19:44 | <zewt> | there's no reason to ever write in C today, unless you're on a platform with no C++ compiler (embedded, sometimes) |
| 19:44 | <zewt> | (well, or if you're maintaining a legacy C codebase, of course) |
| 19:46 | Philip` | is writing on an embedded platform, and there is a C++ compiler but nobody uses it so nobody is brave enough to be the first person to find all the bugs in it |
| 19:46 | <zewt> | yeah that's fair (been there) |
| 19:46 | <Hixie> | or you're competing in the ioccc, which knowing Philip` is probably what's going on... :-P |
| 19:48 | <Philip`> | Surely they've found most of the interesting ways of obfuscating C by now, and should start the IOC++CC to get a whole new range of possibilities |
| 19:49 | <Ms2ger> | The international obfuscated canvas ctesting competition? |
| 19:59 | <aklein> | Hixie: k, just glad to know it's somewhere on the stack. thanks. |
| 20:02 | <aklein> | Hixie: not clear on how that could not be a bug in Gecko. but then, I don't fully understand the intent of MathML text integration points |
| 20:02 | <Hixie> | aklein: the spec doesn't compare the namespaces there, so gecko not comparing them either seems correct. but i haven't looked at the spec closely today. |
| 20:03 | <Hixie> | aklein: my recommendation if this is blocking your work would be to get hsivonen to agree to a particular interpretation/change, and then update the list accordingly and i'll make sure the spec matches what y'all agree to |
| 20:04 | <Hixie> | (i don't think at the end of the day the precise behaviour is all that important here so long as we all agree on one, since it's only relevant for bogus docs anyway) |
| 20:06 | <aklein> | Hixie: agreed that particular behavior isn't terribly important, but I think there are some implementations that are more likely to lead to the parser getting into a bad state. will see if I can raise the issues with hsivonen |
| 20:07 | <Hixie> | thanks |
| 20:17 | <TabAtkins> | Hixie: Younger people who never used old languages like that still parrot the "one return per function" crap. |
| 20:19 | <Ms2ger> | I've never heard that before, fwiw |
| 20:19 | <zewt> | it's the programming equivalent of "don't end a sentence with a preposition", with similar effects |
| 20:19 | <TabAtkins> | Heh, excellent analogy. |
| 20:21 | <aklein> | hsivonen: in case you weren't following ^^, I'm interested in your thoughts on some corner cases of <math> parsing |
| 20:21 | <Hixie> | TabAtkins, zewt: yeah |
| 20:22 | <zewt> | anybody happen to know the origin or "URL" vs. "URI"? the whole thing always feels like whoever was writing the URI spec went "hey, this isn't exactly the same as URL, so we should call it something different and people will distinguish them and use different parsers" (when what really happened is they're the same thing with no real-world distinction) |
| 20:23 | <zewt> | i guess i'm just curious if there's a less stupid reason the term came into being than what amounts to branding, heh |
| 20:23 | <TabAtkins> | Sometimes the URL is used merely as an identifier, not a locator. Thus, the name switch. |
| 20:24 | <zewt> | that's almost a worse reason |
| 20:26 | <Hixie> | worst thing about regexps is when they don't match and you can't figure out why |
| 20:26 | <Ms2ger> | You mean "regexps" |
| 20:26 | <TabAtkins> | I presume you meant s/when.*/regexps/ ? |
| 20:26 | <zewt> | Hixie: might be able to find a syntax highlighter, so you can walk the cursor across to find which thing doesn't match with what you expected it to |
| 20:27 | <Hixie> | zewt: yeah |
| 20:28 | <TabAtkins> | Hixie: Try http://regexpal.com/ ? |
| 20:28 | Hixie | tries |
| 20:28 | <Hixie> | (thanks) |
| 20:28 | <Hixie> | (we're going to ignore that my regexp is dynamically generated so who the fuck knows what it even really is) |
| 20:30 | <Hixie> | well according to regexpal it should be working |
| 20:46 | <TabAtkins> | Then maybe you're not generating the correct regex? |
| 20:49 | <Hixie> | i was making some mistake with /g in perl |
| 20:49 | <zewt> | autogenerated regexes in perl? "and now you have four problems" |
| 20:49 | <Hixie> | i ended up just not using /g for that part of the code since i didn't need to |
| 20:49 | <Hixie> | zewt: 0 problems now :-) |
| 20:51 | <Ms2ger> | You just haven't noticed them yet :) |
| 21:02 | <TallTed> | zewt - once upon a time, URI(dentifier) was a superclass, with subclasses of URL(ocator) and URN(ame), any of which could be dereferenced according to the rules of their scheme. |
| 21:02 | <TallTed> | then someone had the "brilliant" idea to make urn: a non-dereferenceable URI scheme, and URN lost what little traction it had, and URL and URI have since appeared to the uninitiated to be the same things. |
| 21:03 | <TallTed> | some historical perspective I was coincidentally looking at earlier today... http://www.w3.org/DesignIssues/NameMyth.html |
| 21:24 | <zewt> | because they have since been the same thing, in the real world :) |
| 21:25 | TallTed | not knowing the difference doesn't make them the same thing |
| 21:25 | <zewt> | nobody in the world knowing the difference, using the terms interchangeably for things that look the same and are parsed interchangeably ... makes them the same thing |
| 21:25 | <TallTed> | whether a string is URL or URN is unknown and opaque to the user. only the handling server knows whether it's grabbing a file from a location (URL), or doing something else (URN) |
| 21:26 | <zewt> | conversely, calling things by two different name doesn't make them different |
| 21:26 | <TallTed> | just because you can't tell the difference between a legit Rembrandt and a forgery, doesn't make them the same thing. |
| 21:26 | <TallTed> | unless you want to buy this thing I found in the garage... |
| 21:27 | <zewt> | uh huh |
| 23:07 | <Hixie> | damnit, i've just reduced my problem to another problem |
| 23:08 | <Hixie> | given two strings A and B, how do i do a locale-specific case-insensitive comparison? |
| 23:08 | <Hixie> | do we have a UTR we can refer to for that or something? |
| 23:08 | <Hixie> | given two strings and a language, i guess |
| 23:10 | <ronaldmansveld> | Hixie: you mean 2 strings in different languages? |
| 23:11 | <ronaldmansveld> | ie: 'Ich bin m�de' <-> 'I'm tired'? |
| 23:12 | <Hixie> | two arbitrary strings |
| 23:13 | <Hixie> | and a language, though nothing guarantees the strings even use that language's script, let alone be in any language at all |
| 23:13 | <ronaldmansveld> | if you want to know if they mean the same, I don't think there will be anything for that |
| 23:14 | <ronaldmansveld> | if you want to know if the chars are the same, I'd say converting them to the same encoding will do the trick |
| 23:15 | <ronaldmansveld> | But I wouldn't know if there's any way to determine the encoding of a giving string with 100% certainty when given just the string |
| 23:18 | <gavinc> | ronaldmansveld: ... that has nothing to do with encoding |
| 23:19 | <jgraham> | http://www.ecma-international.org/ecma-262/5.1/#sec-15.5.4.9 |
| 23:19 | <jgraham> | Er sorry |
| 23:19 | <jgraham> | Or, maybe that is what you want |
| 23:19 | <gavinc> | Hixie: http://www.w3.org/International/wiki/Case_folding ? |
| 23:19 | <jgraham> | Although it basically says "implementation defined" |
| 23:20 | <Hixie> | i mean a < vs > comparison |
| 23:20 | <Hixie> | not a == vs != comparison |
| 23:20 | <Hixie> | sorry for ambiguity |
| 23:20 | <ronaldmansveld> | ah, that makes it a lot clearer, sorry |
| 23:20 | <gavinc> | Oh, I've ONLY ever seen that done between languages by code point after casefolding :\ |
| 23:20 | <gavinc> | and it's usually very surprising :\ |
| 23:21 | <Hixie> | some code points sort differently based on the language being sorted, right? |
| 23:21 | <gavinc> | Right, if it's mixed language sort I've only ever seen raw code point sorting :\ |
| 23:22 | <jgraham> | Hixie: Yes |
| 23:24 | <Hixie> | ok so i guess i just need a way to invoke those algorithms |
| 23:25 | <ronaldmansveld> | jgraham: thanks for the links, makes it all a lot clearer now :) |
| 23:32 | <TabAtkins> | Hixie: Yes, there's a way. I forget which list of foldings does the locale-sensitive stuff, though. |
| 23:33 | <TabAtkins> | For locale *in*sensitive, use the C+F mapping. |
| 23:33 | <TabAtkins> | Defined somewhere. I'm not very helpful. ^_^ |
| 23:33 | <Hixie> | TabAtkins: yeah, that would have more or less been my answer if someone asked me :-P |
| 23:49 | <Hixie> | how about a raw unicode comparison of two strings A and B? how do i phrase that? |
| 23:50 | <TabAtkins> | codepoint-by-codepoint comparison? |
| 23:50 | <TabAtkins> | Do you want to do normalization? |
| 23:50 | <Hixie> | let's assume we normalised already |
| 23:50 | <TabAtkins> | Then what I said. |
| 23:50 | <Hixie> | "codepoint-by-codepoint" doesn't tell me anything about which is greater |
| 23:50 | <Hixie> | all comparisons are "codepoint-by-codepoint" |
| 23:50 | <TabAtkins> | Not necessarily! |
| 23:51 | <Hixie> | well fair enough |
| 23:51 | <TabAtkins> | But anyway, say it's a lexicographic sort by codepoint. |
| 23:51 | <Hixie> | k |
| 23:53 | <Hixie> | really no idea how i'm gonna do the language-sensitive one |
| 23:54 | <Philip`> | "\ud7ff" < "\ue000" < "\ud800\udc00" sounds fun |
| 23:54 | <Hixie> | i actually said to compare by unicode scalar value |
| 23:54 | <Hixie> | which takes care of that |
| 23:54 | <Philip`> | TabAtkins: Lexicographic sort doesn't really define whether "a" < "aa" |
| 23:55 | <Hixie> | that's a more serious problem |
| 23:55 | <Hixie> | utr10 is apparently what i need |
| 23:56 | <TabAtkins> | It... should? Isn't lack of something always less than presence? |
| 23:56 | <Hixie> | doesn't seem to be written in english though |
| 23:56 | <TabAtkins> | Or is that undefined and left to the thing doing the sorting? |
| 23:57 | <Philip`> | TabAtkins: My understanding of lexicographic orders is that they're defining (a,b) < (a',b') iff a < a' or (a = a' and b < b'), where you need to define what "=" and "<" and the other "<" mean |
| 23:58 | <Hixie> | Unicode Collation Algorithm to the rescue! |
| 23:59 | <TabAtkins> | Sure. I just assumed that it was taken as given that when they're of different length, but equal up to the end of the shorter item, the shorter item is "less". |