| 00:24 | <jorendorff> | Domenic_ (or anyone): assuming IsPromise(p) and p.then is the builtin Promise.prototype.then, does p.then(v => { throw "FAIL"; }, exc => { alert(exc); }) |
| 00:24 | <jorendorff> | alert "FAIL" when p becomes fulfilled? |
| 00:25 | jorendorff | would expect not, rather the derived promise would become rejected and the error handler would not be called |
| 03:10 | <Domenic_> | jorendorff: yeah your expectation is correct. |
| 03:10 | <jorendorff> | thanks |
| 03:11 | <Domenic_> | to get the alert "FAIL" do p.then(v => { throw "FAIL"; }).catch(exc => { alert(exc); }) |
| 03:11 | <jorendorff> | ooh pretty |
| 03:11 | <jorendorff> | obviously i have not sat down and just read the spec. in my defense it is written in a strange language |
| 03:11 | <jorendorff> | ecmaspeak |
| 03:12 | <jorendorff> | no fault of yours, obviously |
| 03:20 | <Domenic_> | understandable :P |
| 07:27 | <philipj> | hsivonen, jgraham, I used the Bing API in https://gitorious.org/whatwg/big5/source/4a591808c055107d5a4a84d6c480db8b800ba40a:gen-urls.py |
| 07:27 | <philipj> | but I don't know if it still works the same, I remember that there were going to be some changes soon after I used it |
| 07:44 | <hsivonen> | philipj: thanks |
| 10:10 | <annevk> | I just found out stuff like https://bugzilla.mozilla.org/user_profile?login=annevk%40annevk.nl exists. Seems I've been contributing to Mozilla for over a decade. |
| 10:21 | <annevk> | SimonSapin: in css3-syntax you might want to acknowledge hsivonen and zcorpan for sorting out the decoding rules with me during TPAC |
| 10:28 | <MikeSmith> | annevk: nice bugzilla feature. I wonder if there's some parameter for enabling that |
| 10:30 | <MikeSmith> | seems relatively new https://bugzilla.mozilla.org/show_bug.cgi?id=859550 |
| 10:31 | <annevk> | SimonSapin: you don't seem to define identifier? |
| 10:36 | <matjas> | zcorpan: here’s an example of an attack vector that uses `window.name`: http://homakov.blogspot.be/2013/11/stealing-user-session-with-open.html |
| 10:37 | <annevk> | matjas: is the attack supported by the specification for window.name? |
| 10:38 | <matjas> | i think so. it just makes use of the fact that `var otherWindow = window.open(url, someName)` sets `otherWindow.name` to `someName` |
| 10:39 | <matjas> | the thing is, `window.name` by itself isn’t the problem, it just makes it easier to write attack vectors like this |
| 10:39 | <matjas> | (you still need another vulnerability somewhere) |
| 10:40 | <matjas> | this probably cannot be “fixed” without breaking compat… badly |
| 10:45 | <annevk> | I don't really follow that attack |
| 10:58 | <annevk> | hsivonen: what caused the UTF-16 tweet? |
| 11:03 | <annevk> | By the way, rwaldron pointed out yesterday that dataset is woefully undertested. |
| 11:03 | <annevk> | Example <div data-foo2="x" data-foo-2="y"> |
| 11:08 | <MikeSmith> | annevk: is the spec actually clear about that should happen in that case? |
| 11:09 | <annevk> | MikeSmith: the fact that some people refuse to define attribute order makes it trickier, but the results in browsers are too weird for that to even become an issue |
| 11:11 | <MikeSmith> | ok |
| 11:26 | <hsivonen> | annevk: nsJSON.cpp |
| 11:46 | <SimonSapin> | annevk: done, and on it |
| 12:01 | <zcorpan> | annevk: MikeSmith: i think the spec is clear about that case (except for the order but that's the same for data-x and data-y also) |
| 12:01 | <zcorpan> | but it seems blink has a bug |
| 12:07 | <jgraham> | It does look like the tests could be improved |
| 12:09 | <jgraham> | rwaldron should submit a PR |
| 12:24 | <SimonSapin> | annevk: looks good? http://dev.w3.org/csswg/css-syntax/#identifier |
| 12:33 | <MikeSmith> | zcorpan: what's the expected result per spec? |
| 12:36 | <zcorpan> | MikeSmith: 'foo2' and 'foo-2' |
| 12:39 | <MikeSmith> | I see |
| 12:40 | MikeSmith | goes to read the spec |
| 12:45 | <MikeSmith> | zcorpan: I guess I'm missing something |
| 12:46 | <MikeSmith> | reading through "The algorithm for getting the list of name-value pairs" and "The algorithm for setting names to certain values", I don't seem to see anything that deals with this |
| 12:47 | <MikeSmith> | *with this case |
| 12:47 | <zcorpan> | MikeSmith: if you step through the algorithm with an element with those attributes, the 'getting' algorithm results in that |
| 12:48 | <zcorpan> | MikeSmith: in step (2) you take the attribute list, strip off 'data-', so you have ['foo2', 'foo-2'] |
| 12:48 | <zcorpan> | MikeSmith: step (3) talks about modifying - followed by ascii *letter*, which doesn't apply here, so it's no-op |
| 12:49 | <MikeSmith> | ah |
| 12:59 | <hsivonen> | sometimes testing would be easier if I was literate in a non-windows-1252 language |
| 13:01 | <zcorpan> | hsivonen: like klingon? |
| 13:02 | <hsivonen> | zcorpan: I was thinking of something like Polish |
| 13:02 | <jgraham> | That would be a non-unicode language |
| 13:02 | <jgraham> | (er Klingon, not Polish) |
| 13:05 | <annevk> | SimonSapin: seems okay |
| 13:06 | <annevk> | SimonSapin: not entirely clear to me if it's a syntax thing or a model thing |
| 13:06 | <annevk> | SimonSapin: but maybe more detailed reading would reveal that |
| 13:06 | <SimonSapin> | syntax |
| 13:06 | <SimonSapin> | the model has <ident-token> |
| 13:11 | <zcorpan> | jgraham: but still a non-windows-1252 language |
| 13:13 | <annevk> | The problem here is that windows-1252 itself is not a language. |
| 13:13 | <annevk> | And also that you are all pedants. |
| 13:17 | <annevk> | zcorpan: so the problem is that WebKit/Blink developers did not read the spec (quelle surprise!) |
| 13:17 | <annevk> | zcorpan: test .<script data-x-2=x data-x2=y>w(document.querySelector("script").dataset)</script> in LDV |
| 13:18 | <annevk> | rwaldron: ^^ |
| 13:18 | <zcorpan> | LDV? |
| 13:20 | <zcorpan> | annevk: it's not a problem that windows-1252 is not a language. you can say "funny language" or "non-funny language" without "funny" itself being a language |
| 13:20 | <annevk> | zcorpan: Live DOM Viewer |
| 13:20 | <zcorpan> | ah. yeah i noticed. did someone file a bug already? |
| 13:21 | <annevk> | don't think so |
| 13:21 | <zcorpan> | i can file it |
| 13:23 | <zcorpan> | found https://code.google.com/p/chromium/issues/detail?id=171175 |
| 13:25 | <zcorpan> | seems like safari 6 is a bit different, data-2 works ok |
| 13:26 | <gsnedders> | jgraham: You wouldn't happen to remember if I borrowed The Bell Jar off you years ago? I definitely read it while in Sweden, but I can't remember whether I bought it or not. Seems a waste to go back to my parent's for it if it isn't there :P |
| 13:27 | <jgraham> | gsnedders: I know I own the Bell Jar at least |
| 13:27 | <jgraham> | So you might have done |
| 13:30 | <gsnedders> | Oh, one can get it on Google Play for under £2. That's surprisingly reasonable. |
| 13:36 | <zcorpan> | filed https://bugs.webkit.org/show_bug.cgi?id=123890 |
| 13:37 | <zcorpan> | jgraham: when are you arriving in shenzhen? |
| 13:38 | <jgraham> | zcorpan: 14:10 on Fri. |
| 13:38 | <jgraham> | Or that's HKG |
| 13:38 | <jgraham> | So I guess more like 18:00 by the time we actually arrive |
| 13:39 | <zcorpan> | 08 Nov 14:40 is when i arrive |
| 13:39 | <jgraham> | At Shenzen of at HKG? |
| 13:41 | <zcorpan> | shenzen |
| 13:41 | <zcorpan> | i actually go via beijing |
| 13:41 | <jgraham> | Oh, OK |
| 13:42 | <jgraham> | Flights to HKG were direct, but I'm not sure it's worth it given the bus time |
| 13:42 | <annevk> | Bus time? |
| 13:42 | <jgraham> | annevk: The bus takes 2.5 hours |
| 13:42 | <annevk> | Ffffuu |
| 13:42 | <jgraham> | From HKG to Shenzhen |
| 13:43 | <annevk> | Well that's going to be pleasant |
| 13:43 | <gsnedders> | When I vaguely looked it seemed that Shenzhen airport was almost as distant? |
| 13:43 | <gsnedders> | But idk, I can't claim to have looked that close. |
| 13:44 | <jgraham> | gsnedders: Google says 53 minutes |
| 13:45 | <jgraham> | (whereas for HKG, it says "could not calculate directions") |
| 13:46 | <zcorpan> | i was planning on taking a taxi from the airport |
| 13:47 | <gsnedders> | I was planning to wait till next year. Hopefully find out /where/ even if not exactly when during TPAC this year. |
| 13:48 | <jgraham> | And I can't make bing maps work at all |
| 13:48 | <gsnedders> | Now it's broken the normal France/US rotation it's anybody's guess where it'll be. |
| 13:48 | <jgraham> | gsnedders: I thought someone said the US |
| 13:49 | <gsnedders> | karlcow: Use-case: to determine whether a request is for a script, image, etc. based on UA/Accept combination, to do content-type sniffing in a proxy identically to the end browser. |
| 13:49 | <gsnedders> | jgraham: Well, I'll probably go. |
| 13:50 | <karlcow> | gsnedders: https://etherpad.mozilla.org/uadetection-usecases |
| 13:50 | <gsnedders> | karlcow: Do you just want people to arbitrarily add to that? |
| 13:50 | <karlcow> | yes |
| 13:50 | <gsnedders> | karlcow: I was assuming you were doing some sort of moderation :) |
| 13:51 | <karlcow> | not at all. |
| 13:51 | <karlcow> | all of this has been contributed by everyone |
| 13:51 | <karlcow> | I will try to trim down/summarize at the end of this week |
| 13:52 | <karlcow> | I didn't do moderation so that people express what they think it is useful for. |
| 13:52 | <gsnedders> | karlcow: okay, added |
| 13:52 | <karlcow> | And then we can see and think if they are things which might be improved in the platform. So far it looks a bit depressing for evolving the platform. ;) |
| 13:53 | <karlcow> | Blame Jonas for giving me the idea of asking for use cases |
| 13:53 | <gsnedders> | Always the Swedes causing the problems! |
| 13:54 | <karlcow> | gsnedders: Thanks for adding another item |
| 13:54 | <gsnedders> | No problem. |
| 14:08 | <annevk> | SimonSapin: "This is currently U+10FFFF" seems somewhat misleading |
| 14:08 | <annevk> | SimonSapin: given utf-16 I don't think that'll be going anywhere |
| 14:25 | <GPHemsley> | annevk: Might you want to use the phrase "willful violation" here? http://encoding.spec.whatwg.org/#concept-encoding-get |
| 14:26 | <annevk> | I just use violation for that |
| 14:28 | <GPHemsley> | IMO: "violation" makes you sound naughty; "willful violation" makes you sound knowledgeable |
| 14:31 | <annevk> | feel free to file a bug if it bothers you |
| 14:31 | <annevk> | I think the plan is for Unicode to be fixed eventually so either way this should disappear |
| 14:31 | <GPHemsley> | alright; I suppose this is just further discussion for the future style guide :) |
| 14:32 | GPHemsley | wonders why he hasn't already created a wiki page for that |
| 14:32 | <annevk> | do it! |
| 15:01 | <GPHemsley> | PSA: I have begun grouping meta spec documents as subpages under http://wiki.whatwg.org/wiki/Specs |
| 15:02 | <GPHemsley> | (Your favorite documents may have been moved; there are redirects in place to get you to their new location.) |
| 15:02 | <GPHemsley> | I have also begun the style guide here: http://wiki.whatwg.org/wiki/Specs/style |
| 15:02 | <GPHemsley> | annevk: CC ^ |
| 15:06 | <Domenic_> | nice, very helpful. |
| 15:12 | <GPHemsley> | We can move the subpages to more verbose names, if that's more helpful, but the existence of "Specs" as opposed to "Specifications" suggests we like short names |
| 15:12 | <hsivonen> | the situation with the UTF-16, UTF-16BE and UTF-16LE labels between Gecko, Unicode and the Encoding Standard is annoying |
| 15:14 | <hsivonen> | current status: http://w3cmemes.tumblr.com/post/34093102149/kirk-is-not-fond-of-the-ascii-incompatible |
| 15:18 | <SimonSapin> | GPHemsley: Specs/style is about CSS, right? ;) |
| 15:18 | <GPHemsley> | ah, hmm |
| 15:20 | <darobin> | SimonSapin: it also covers XSL-FO |
| 15:21 | <GPHemsley> | >_> |
| 15:21 | <SimonSapin> | darobin: of course |
| 15:21 | <GPHemsley> | SimonSapin: I'll have to think on it more; I'll probably add more hierarchy, too, so I don't want go moving everything around until I've figured that out first. |
| 15:21 | <GPHemsley> | moving everything around again, that is |
| 15:21 | <darobin> | GPHemsley: more like <_/> |
| 15:23 | <GPHemsley> | yup |
| 15:23 | <SimonSapin> | GPHemsley: I was joking, but if you want to change it Specs/Style_guide would work |
| 15:24 | <GPHemsley> | SimonSapin: In my defense, it will probably eventually contain tips on what classes and styles to use ;) |
| 15:24 | <GPHemsley> | Yeah, I'll have to ponder |
| 15:33 | <SimonSapin> | annevk: I agree. Fixed. |
| 15:34 | <SimonSapin> | TabAtkins: http://www.xanthir.com/b4Su0 "on an iPhone with a 320px viewport…" is that device or CSS px? |
| 15:56 | <darobin> | annevk: btw, in case you're interested, https://github.com/darobin/redirect-testing |
| 15:56 | <darobin> | it's just a rehash of an old hack I had used a long time ago when I was trying to debug a problem with a project that involved redirects on DELETE |
| 16:08 | <GPHemsley> | Hixie: Thoughts? :) http://wiki.whatwg.org/wiki/Specs/style#Spelling |
| 16:22 | <Ms2ger> | GPHemsley, specs should be in en-GB-x-hixie, obviously ;) |
| 16:22 | <GPHemsley> | Ms2ger: I'm hoping we can merge en-GB-x-hixie and en-US-x-ghemsley into a single standard. |
| 16:24 | <jgraham> | That seems as pointless as specifying that things must be en-gb or en-us. As long as it is clear what is meant, it really doesn't matter what precise spelling you use |
| 16:27 | <Ms2ger> | <font colour>, please |
| 16:29 | <darobin> | jgraham: it does matter for technical terms; for the rest I agree (though consistency within a given document is a plus) |
| 16:30 | <jgraham> | Ms2ger: <fount colour> :p |
| 16:31 | <jgraham> | True story: we had a first year university computer skills course where you lost marks for not spelling "font" "fount" |
| 16:32 | <jgraham> | darobin: I don't know what you mean by "technical terms" in this context |
| 16:32 | <jgraham> | If you mean that APIs should aim to be consistent, that makes sense |
| 16:34 | <Domenic_> | The "dialog" vs. "dialogue" seems just wrong... dialogue is for speech, dialog is for computers. In my understanding. |
| 16:34 | <Domenic_> | "Open a dialog" means "pop up a dialog box"; "open a dialogue" means "start negotations" |
| 16:34 | <jgraham> | Yes, but I use it like that in all contexts, not just in specs |
| 16:35 | <jgraham> | ("dialog" is the computer thing, "dialouge" is talking) |
| 16:35 | <Domenic_> | Right but "Use "dialogue" for the noun and "dialog" for all other parts of speech." seems incorrect. |
| 16:36 | <Domenic_> | E.g. you wouldn't say "open a dialogue" when you mean "pop up a dialog box" |
| 16:36 | <jgraham> | Oh, right that was a specific complaint about that page |
| 16:37 | <jgraham> | That is subsumed by my rather broader complaint "that page shouldn't exist" |
| 16:37 | <Domenic_> | haha |
| 16:39 | <darobin> | jgraham: I meant APIs but also element, property, etc. names, as well as <dfn> |
| 16:39 | <darobin> | it gets unwieldy if you have 'color' and <dfn>colour processing</dfn> |
| 16:39 | <darobin> | which is where one leaks into the other |
| 16:40 | <jgraham> | Sure |
| 16:40 | <jgraham> | Consistency is good |
| 16:40 | <darobin> | which is why people tend to settle on en-something-specific as that's simpler to explain and navigate |
| 16:40 | <jgraham> | "Spelling should be consistent as defensible as English" |
| 16:57 | <GPHemsley> | When you read a 2-dimensional table, do you read the column (top) headers first or the row (left) headers first? |
| 17:05 | darobin | reads the shortest side first |
| 17:07 | jgraham | reads forwards, backwards and then by picking sections at random and following all the cross references |
| 17:08 | <Ms2ger> | jgraham++ |
| 17:46 | <Hixie> | SteveF: i take it from your e-mail that it's ok if i keep posting to public-html about how to send feedback on the whatwg spec? |
| 17:49 | <dglazkov> | good morning, Whatwg! |
| 17:54 | <GPHemsley> | darobin, jgraham, Ms2ger: If I said "Use the following term when A and B:", which (A or B) would be the column header and which would be the row header? |
| 18:00 | <Hixie> | GPHemsley: what's the context here? |
| 18:00 | <GPHemsley> | Hixie: For the reading order? |
| 18:00 | <Hixie> | i dunno, i've no idea what you're asking about, but was hoping maybe it was something i could help with since nobody else seems to be around :-) |
| 18:01 | <GPHemsley> | heh, thanks |
| 18:01 | <GPHemsley> | Hixie: It relates back to my question earlier: When you read a 2-dimensional table, do you read the column (top) headers first or the row (left) headers first? |
| 18:01 | <Hixie> | ah |
| 18:02 | <Hixie> | i dunno, i just kinda look at the whole table |
| 18:02 | <GPHemsley> | alright |
| 18:02 | <Hixie> | do you have an example so i can check what i do? |
| 18:03 | <GPHemsley> | the easiest example (though not the best test case) is the multiplication table: https://en.wikipedia.org/wiki/Multiplication_table |
| 18:04 | <GPHemsley> | the "in abstract algebra" section is the clearest there: https://en.wikipedia.org/wiki/Multiplication_table#In_abstract_algebra |
| 18:04 | <Hixie> | ah yeah i definitely don't read either first on that table |
| 18:04 | <GPHemsley> | hmm, alright, well, I'll just go with my gut and it can always be changed later |
| 18:04 | <Hixie> | but that's because they're numbers that i can recognise in parallel in my peripheral vision |
| 18:04 | <GPHemsley> | right |
| 18:05 | <Hixie> | look like with more complex tables i look at the first row's header, then the first column's, then the second row's, then the second column's, then the data for those, then continue like that |
| 18:06 | <Hixie> | kinda scanning diagonally from the top left |
| 18:06 | <Hixie> | is this for a table in a spec? |
| 18:06 | <GPHemsley> | I just don't have an example at hand that uses "and" instead of "x" |
| 18:06 | <GPHemsley> | sort of |
| 18:06 | <GPHemsley> | it's a meta spec: the spec-writing style guide :) |
| 18:06 | <Hixie> | aah |
| 18:07 | <GPHemsley> | you'll see in a moment |
| 18:15 | <SimonSapin> | GPHemsley: fwiw, in http://dev.w3.org/csswg/css-syntax/#serialization-tables the table is for consecutive pairs of tokens. Rows are first tokens of the pair, columns second token |
| 18:15 | <Hixie> | MikeSmith: this is the script that used to work and now doesn't, if you have any insight http://www.whatwg.org/specs/web-apps/current-work/update-bug.pl |
| 18:15 | <Hixie> | MikeSmith: i cannot work out why it doesn't work |
| 18:16 | <SteveF> | hixie: if the same situation arises please go ahead, you are a member of the html working group and I don't make up the rules for any mailing list |
| 18:16 | <GPHemsley> | SimonSapin: Hmm... maybe that does make more sense. |
| 18:16 | <GPHemsley> | (I was going the other way) |
| 18:16 | <SimonSapin> | GPHemsley: when looking up a given pair, column headers are to the right of row headers, so that matches the left-to-right direction of english |
| 18:16 | <GPHemsley> | yeah |
| 18:16 | <SimonSapin> | though you could move row headers to the right |
| 18:16 | <GPHemsley> | I was prioritizing top/bottom over left/right |
| 18:16 | <Hixie> | SteveF: you might want to ask your colleagues what they would think of such behaviour |
| 18:17 | <GPHemsley> | because my intersection is "and" |
| 18:17 | <GPHemsley> | SimonSapin: ^ |
| 18:19 | <SimonSapin> | GPHemsley: could you put what you have so far online? |
| 18:19 | <GPHemsley> | SimonSapin: I was going to change the order first :P |
| 18:19 | <SimonSapin> | I have a hard time visualizing with just the description |
| 18:20 | <SteveF> | hixie: 'such behaviour'? I don't think that if anybody mailed public html referencing the whatwg spec and talking something that differs that any one would mind you or anyone pointing them in the right direction to provide feedback darobin and mikesmith are regulars here I am sure they could disabuse me if I am wrong |
| 18:21 | <GPHemsley> | SimonSapin: I'm realizing now that your way also makes the wikimarkup easier to read |
| 18:21 | <GPHemsley> | SimonSapin: So I think I've got my answer :) |
| 18:21 | <SimonSapin> | uh, ok |
| 18:21 | <GPHemsley> | SimonSapin: But I'll get it up in a sec for you to review ;) |
| 18:25 | <GPHemsley> | Hixie, SimonSapin: http://wiki.whatwg.org/wiki/Specs/style#Collections_of_values |
| 18:26 | <SimonSapin> | GPHemsley: well, "and" is commutative so… |
| 18:27 | <GPHemsley> | true |
| 18:27 | <GPHemsley> | but I feel like there's an implied order |
| 18:27 | <GPHemsley> | and, actually, linguistic "and" actually does have an implied order |
| 18:28 | <GPHemsley> | nonetheless, I think we solved the formatting part; now we can discuss the substance |
| 18:28 | <SimonSapin> | I mean these two tables work just as well both ways |
| 18:29 | <GPHemsley> | Hixie, SimonSapin: Feedback welcome on the actual terminology ;) |
| 18:29 | <SimonSapin> | to me, map and dictionary mean the same |
| 18:29 | <GPHemsley> | yeah, I thought that might be a problem |
| 18:29 | <SimonSapin> | but "more than one value per key" is a multidict |
| 18:30 | <GPHemsley> | my thinking was that a map is one-to-one, but a literary dictionary can have multiple definitions for a single term |
| 18:30 | <SimonSapin> | "strict dictionary" is just a map that you’re looking at backwards |
| 18:30 | <Hixie> | hm yeah, the top left cell there confuses me :-) |
| 18:31 | <Hixie> | i read it first :-) |
| 18:31 | <GPHemsley> | heh |
| 18:31 | <GPHemsley> | that was probably part of the problem I had |
| 18:31 | <GPHemsley> | SimonSapin: You think "reverse map" or "inverse map" would be better? |
| 18:31 | <Hixie> | also, i feel that that entire section can be replaced with "define your terms, and try to use terms according to their widely accepted meaning where an appropriate term exists" |
| 18:32 | <GPHemsley> | Hixie: The idea here is to assist in choosing one where multiple possibilities exist. ;) |
| 18:32 | <GPHemsley> | http://logbot.glob.com.au/?c=freenode%23whatwg&s=30+May+2013&e=30+May+2013&h=style+guide#c798281 |
| 18:33 | <GPHemsley> | SimonSapin: I'm inclined to like "inverse map"; do you have any objections? |
| 18:34 | <SimonSapin> | sounds fine |
| 18:37 | <GPHemsley> | Hixie: Oh, also, this style guide doubles as and/or supports the "common definitions" document that I've been asking about |
| 18:40 | <GPHemsley> | SimonSapin: Wikipedia uses the term "multimap"; do you have any opinion on that? |
| 18:40 | <GPHemsley> | SimonSapin: There is also "multivalued function". |
| 18:41 | <SimonSapin> | function sounds like code rather than data |
| 18:41 | <SimonSapin> | multipmap is fine |
| 18:44 | GPHemsley | is still partial to "dictionary", despite the potential for confusion... |
| 18:45 | <GPHemsley> | "Let x be a multimap of florgs..." |
| 18:45 | <SimonSapin> | "dictionary" definitely has one value per key in Python |
| 18:45 | <GPHemsley> | yeah... :/ |
| 18:45 | <gsnedders> | GPHemsley: multimap if you want one-to-many, definitely |
| 18:45 | <GPHemsley> | This leaves no place for "dictionary", then |
| 18:46 | <GPHemsley> | Are we OK with that? |
| 18:46 | GPHemsley | is leaning yes |
| 18:47 | <GPHemsley> | too much room for confusion, actually |
| 18:47 | <gsnedders> | GPHemsley: No "dictionary" where? |
| 18:47 | <GPHemsley> | http://wiki.whatwg.org/wiki/Specs/style#Collections_of_values |
| 18:47 | <GPHemsley> | gsnedders: In terminology to use to writing specs. |
| 18:47 | <SimonSapin> | dictionary is the same as map, but JS seems set on using Map |
| 18:48 | <GPHemsley> | SimonSapin: Well, this is intended to be use in prose. |
| 18:48 | <GPHemsley> | +D |
| 18:48 | <GPHemsley> | -D+d |
| 18:48 | <gsnedders> | Then, yes, I am fine with this. Possibly with "dictionary" and "map" being synonymous as SimonSapin says. |
| 18:48 | <gsnedders> | But language typically evolves to remove true synonyms, so we can probably just have one :P |
| 18:48 | <MikeSmith> | Hixie: will take a look at the script after I get some sleep |
| 18:49 | <GPHemsley> | Channel topic notwithstanding, a "dictionary" in the Real World™ is one-to-many. |
| 18:49 | <GPHemsley> | Which is why I'm OK with not using it |
| 18:50 | <gsnedders> | GPHemsley: Dependences on the sense of dictionary. :) |
| 18:50 | <gsnedders> | What word was that? Depends. |
| 18:50 | <GPHemsley> | gsnedders: What do you have in mind? |
| 18:50 | <gsnedders> | GPHemsley: Do we need to special-case the "only one key per value" case, BTW? |
| 18:51 | <gsnedders> | GPHemsley: Because both of those terms just confuse me without thinking about them. |
| 18:51 | <GPHemsley> | gsnedders: Keep in mind the leading part: "For a keyed collection of values, use the following term when there *can be*…" |
| 18:52 | <GPHemsley> | If you want a map that is deliberately bidirectional, then you have it |
| 18:52 | <gsnedders> | " Whenever 'dg' represents the "soft" /d͡ʒ/ sound, it should be followed by an 'e' or an 'i', to ensure it is not confused with the "hard" /dɡ/ sounds. " is a shit justification, though. You can apply that to plenty of other things in American English spelling. |
| 18:52 | <GPHemsley> | likewise with an inverse map |
| 18:53 | <gsnedders> | (No offense meant, of course) |
| 18:53 | <GPHemsley> | gsnedders: Feel free to; this was me documenting en-US-x-ghemsley ;) |
| 18:53 | <gsnedders> | GPHemsley: Hey, I'd rather we just wrote specs in en-gb-oed ;P |
| 18:53 | <GPHemsley> | which, as I mentioned earlier, I am hoping to be able to merge with en-GB-x-hixie |
| 18:54 | <GPHemsley> | nah, too many u's |
| 18:54 | <gsnedders> | Also it typically confuses the hell out of people as to what uses -ise and what uses -ize. |
| 18:54 | <gsnedders> | (Hint: it depends on etymology by and large) |
| 18:54 | <GPHemsley> | and I prefer to reserve '-re' for /rə/ |
| 18:55 | <GPHemsley> | genre, cadre, macabre |
| 18:56 | <GPHemsley> | gsnedders: We're a reality-based standards body: If you can streamline things, do it; if you can't, it's OK to deal with the legacy. |
| 18:56 | <GPHemsley> | ;) |
| 18:57 | <gsnedders> | GPHemsley: Hey, perscriptive dictionary writers managed to do a lot for making en-us and en-gb distinct! (On both sides, that is.) |
| 18:57 | <GPHemsley> | And now we shall attempt to undo them |
| 18:59 | <GPHemsley> | Does anyone want to weigh in on the relationship between objects, classes, functions, and methods? |
| 18:59 | <gsnedders> | Why distinguish functions and methods? |
| 19:07 | <gsnedders> | GPHemsley: But a function is a morphism between two sets. Obviously! :P |
| 19:14 | <Hixie> | MikeSmith: nevermind dude, figured it out!! yay |
| 19:14 | <Hixie> | only took me like a week |
| 19:44 | <GPHemsley> | gsnedders: Why, indeed. That's partly what the discussion would revolve around. (And are classes not objects, in some sense?) |
| 19:52 | <gsnedders> | GPHemsley: Classes are formed of a function and its prototype property ("prototype", not [[Prototype]]), I'd say. |
| 19:53 | <GPHemsley> | hmm... the Wikipedia article on "method" does not even mention "function": https://en.wikipedia.org/wiki/Method_%28computer_programming%29 |
| 19:55 | <GPHemsley> | but apparently "function" redirects to "subroutine", which is linked to by "method": https://en.wikipedia.org/wiki/Function_%28computer_science%29 https://en.wikipedia.org/wiki/Subroutine |
| 19:55 | <gsnedders> | "In different programming languages a subroutine may be called a procedure, a function, a routine, a method, or a subprogram." interestingly |
| 19:56 | <GPHemsley> | yeah |
| 20:04 | <TabAtkins> | SimonSapin: CSS px. I don't use the px unit for device pixels. |
| 20:05 | <SimonSapin> | yeah, after reading again that made sense |
| 20:32 | <GPHemsley> | Hixie, annevk, et al.: Feedback welcome on the new style guide: http://wiki.whatwg.org/wiki/Specs/style |
| 20:33 | <Hixie> | it's missing something along the lines of "feel free to ignore any of this in the pursuit of a better spec" :-) |
| 20:33 | <Hixie> | and yeah, i really do just read the top left cell first |
| 20:33 | <Hixie> | good to know |
| 20:34 | <GPHemsley> | "When writing a spec, it is suggested that you adhere to the following guidelines." – That deliberately has lots of leeway |
| 20:34 | <Hixie> | btw the key part of the "violation" vs "willful violation" thing isn't so much teh words, it's that you document the deviations |
| 20:34 | <Hixie> | and include rationale |
| 20:34 | <Domenic_> | GPHemsley: the dialog vs. dialogue guidance is just wrong. A dialog is the computer thing, a dialogue is a conversation. |
| 20:35 | <GPHemsley> | Domenic_: By "a dialog", do you mean "a dialog box"? Because otherwise I'm not sure what "a dialog" is. |
| 20:35 | <Hixie> | Domenic_: that's how i use it too, but is that real? |
| 20:35 | <Domenic_> | GPHemsley: exactly. As in "pop up a dialog" |
| 20:35 | <GPHemsley> | (And, in which case, the guideline stands) |
| 20:36 | <Hixie> | Domenic_: i assumed reality just had dialoge as GB and dialog as US |
| 20:36 | Hixie | uses "color" for the computer thing and "colour" for the perceived thing, too, but that's clearly just me being crazy |
| 20:36 | <GPHemsley> | :) |
| 20:36 | <Domenic_> | GPHemsley: no the guideline also fails for "let's open a dialogue" (start a conversation) vs. "let's open this dialog" (show the popup) |
| 20:36 | <GPHemsley> | for me, there is no "dialog", there is only "dialog box" |
| 20:36 | <Hixie> | also the "acknowledgments" thing is just a typo i never noticed |
| 20:37 | <Domenic_> | <dialogbox>? |
| 20:38 | <GPHemsley> | It's still an adjective to me, even if the "box" part is implied. But maybe that's just me. |
| 20:38 | <Domenic_> | yeah most UI frameworks seem to use it as a noun. either that or they imply like crazy. |
| 20:38 | <GPHemsley> | perhaps |
| 20:38 | <Domenic_> | I imagine there are other common english terms that used to be adjectives but people dropped the noun |
| 20:39 | <GPHemsley> | but either way, you're not "violating" the guideline in my eyes |
| 20:39 | <GPHemsley> | so it doesn't change anything :P |
| 20:39 | Hixie | has been tempted to move back to the british spellings in the prose now that he's no longer anchored to w3c pubrules, btw |
| 20:39 | <Domenic_> | Well, I think the guideline is pretty misleading |
| 20:39 | GPHemsley | wonders how to untempt Hixie |
| 20:39 | <Domenic_> | E.g. if I want to "open a dialogue about promises" the guideline would say "open a dialog about promises" which invokes images of something on my screen. |
| 20:39 | <Hixie> | well i just checked in a change that goes the other way (fixing that acknowledgements typo) |
| 20:40 | <GPHemsley> | "only keep '-ue' for the *definitive* noun" == the conversation, e.g. |
| 20:40 | <Hixie> | but it's something that comes up every now and then when i notice that i've made yet another series of typos |
| 20:40 | <GPHemsley> | Domenic_: Wait, what? |
| 20:40 | <Hixie> | or when i forget whether i should be saying "-ize" or "-ise" |
| 20:41 | <GPHemsley> | Hixie: I'm advocating for en-US-x-ghemsley, not en-US. ;) |
| 20:41 | <Hixie> | btw, even when we were talking about an element for dialogues, we still spelt it <dialog> |
| 20:41 | <GPHemsley> | So "acknowledgements" is not "the other way" |
| 20:41 | <gsnedders> | Hixie: You should be using -ize for words of Latinized Greek origin, and -ise for words from French. Obviously! |
| 20:41 | <Hixie> | lordy |
| 20:42 | <GPHemsley> | Hixie: "Consult Wikipedia's Manual of Style for spelling for assistance." http://en.wikipedia.org/wiki/Wikipedia:Manual_of_Style/Spelling |
| 20:42 | <gsnedders> | (Until the mid-19th cent. this was the convention in the UK. And the OED still recommends it.) |
| 20:42 | Hixie | just uses wiktionary |
| 20:42 | <GPHemsley> | that also works |
| 20:43 | <GPHemsley> | I like their listing of "weblogue" |
| 20:43 | <GPHemsley> | it doesn't actually have its own entry, but it's listed in a box of other "-ogue" words |
| 20:44 | <GPHemsley> | Domenic_: Can you clarify why you believe the guideline says that you can't say "open a dialogue about promises"? |
| 20:45 | <Hixie> | GPHemsley: Domenic_'s point is that both "open a dialogue about promises" and "open a dialog about promises" are correct, just in different contexts |
| 20:45 | <GPHemsley> | And I concur |
| 20:45 | <Hixie> | GPHemsley: the first means "start a conversation on the topic of promises", the second means "display a window regarding promises" |
| 20:45 | <GPHemsley> | I agree |
| 20:46 | <Hixie> | in both cases it's a noun |
| 20:46 | <GPHemsley> | technically, yes |
| 20:46 | <GPHemsley> | but I added "definitive" in there, because really it's "a dialog box" |
| 20:46 | <GPHemsley> | we're probably splitting hairs here |
| 20:47 | <Domenic_> | I think it's completely the wrong dimension |
| 20:47 | <Domenic_> | The dimension is computer box thing vs. conversation |
| 20:47 | <Domenic_> | not noun vs. verb |
| 20:47 | <Hixie> | i don't know what you mean by "definitive noun" |
| 20:47 | <GPHemsley> | Hixie: Incidentally, didn't realize what you meant about r8257; I disagree with that change. |
| 20:48 | <Hixie> | i figured that you disagree :-) |
| 20:48 | <GPHemsley> | Domenic_: Well, for one thing, the guideline is not just for "dialog(ue)"; the description elaborates. |
| 20:48 | <GPHemsley> | Hixie: That perhaps is the issue here. Maybe I can clarify it. |
| 20:50 | <Hixie> | if you have a box in which people climb to talk about things, that's a "dialogue box" |
| 20:51 | <GPHemsley> | argh |
| 20:51 | <Hixie> | (per my and Domenic_'s rather perverse opinions of english) |
| 20:52 | <zcorpan> | GPHemsley: just remove the "and"? |
| 20:52 | <Hixie> | after weeks of using this box, people will just say "go to the dialogue to talk about it!" |
| 20:52 | <Hixie> | but they'll really mean "the dialogue box" |
| 20:52 | Domenic_ | nods |
| 20:52 | <GPHemsley> | zcorpan: I'd prefer to maintain some semblance of a complete sentence. :) |
| 20:53 | <Hixie> | in the dialogue box, there's a computer, which shows a dialog box to ask you what you're talking about so it can make a transcript |
| 20:53 | <Hixie> | it's the dialogue box dialog box |
| 20:53 | <GPHemsley> | Hixie, Domenic_: I'm hearing you, and I'm not disagreeing. |
| 20:53 | GPHemsley | slaps Hixie with a fish |
| 20:53 | <GPHemsley> | trout, specifically |
| 20:53 | <Hixie> | later, people made a separate box just to talk about the dialogue box dialog box. that is the dialogue box dialog box dialogue box. |
| 20:54 | Hixie | eats the trout |
| 20:54 | <Hixie> | i should probably go get lunch. |
| 20:54 | <GPHemsley> | it sounds like you're standing on a monologue box |
| 20:54 | <zcorpan> | GPHemsley: they're table headers, table headers aren't sentences. the 'and' doesn't add anything useful visually, it's just confusing, and i imagine it's even more confusing for non-visual users |
| 20:54 | <Hixie> | GPHemsley: hah |
| 20:54 | <Hixie> | bbiab |
| 20:55 | <GPHemsley> | zcorpan: The sentence begins in the table caption, though I don't know what effect that has on non-visual users. |
| 20:56 | <zcorpan> | GPHemsley: the caption is fine and non-confusing |
| 20:56 | <GPHemsley> | Domenic_, Hixie: "the dialog" is an adjectival noun: https://en.wikipedia.org/wiki/Adjectival_noun_%28noun%29 |
| 20:59 | gsnedders | misread that as adverbial noun and got confused |
| 21:01 | <GPHemsley> | Domenic_, Hixie: Is this clearer? http://wiki.whatwg.org/wiki/Specs/style#Spelling |
| 21:01 | <zcorpan> | GPHemsley: if you really want to have a complete sentence, it's better to do "uniqueness doesn't matter, and..." |
| 21:01 | <gsnedders> | GPHemsley: How it adjectival anyway? Describing a box? |
| 21:02 | <Domenic_> | GPHemsley: What about "can we dialogue about boxes on the screen"? |
| 21:02 | <GPHemsley> | zcorpan: "For a keyless collection of values, use the following term when [order doesn't matter] [and] [uniqueness doesn't matter]: unordered list'" |
| 21:02 | <Domenic_> | that is a verb but "all other parts of speech" implies you want it spelled "dialog" |
| 21:02 | <GPHemsley> | +' |
| 21:02 | <gsnedders> | Domenic_: It's a verbalised noun! |
| 21:02 | <GPHemsley> | Domenic_: What is a verb? |
| 21:03 | <Domenic_> | GPHemsley: in "can we dialogue about boxes on the screen" "dialogue" is a verb |
| 21:04 | <gsnedders> | GPHemsley: Can we not just go for the crude "use dialogue for the non-technical sense (conversation) and dialog for the technical sense (a box on a computer screen)"? |
| 21:04 | <GPHemsley> | gsnedders: At this point, I'm ready to just remove it altogether and put it back in the en-US-x-ghemsley vault. |
| 21:04 | <zcorpan> | GPHemsley: yes, i understand how it's intended. but when first reading the table, i went "For a keyless collection of values, use the following term when... and...wat???" |
| 21:04 | <gsnedders> | GPHemsley: It's not really needed, because I think most en-gb and en-us dictionaries make the distinction, no? |
| 21:05 | <GPHemsley> | zcorpan: Would it help if I used "&" instead? |
| 21:05 | <zcorpan> | GPHemsley: don't think so |
| 21:05 | <GPHemsley> | gsnedders: Yeah, I was trying to generalize it to all "-log(ue)" words. |
| 21:05 | <zcorpan> | GPHemsley: if the cell was empty, i'd read it as it was intended and just mentally fill in the 'and' |
| 21:06 | <GPHemsley> | zcorpan: OK; maybe I should put "… and …"? |
| 21:06 | <zcorpan> | GPHemsley: if it's non-empty, i'd read it first and wonder what to make of it :-) |
| 21:06 | <gsnedders> | GPHemsley: Yeah, I get that. Monolog looks wrong to me, catalog is very much en-us to me (without the technical distinction), etc. |
| 21:06 | <gsnedders> | GPHemsley: So I'd drop the rest. :P |
| 21:07 | <GPHemsley> | Domenic_, gsnedders: The rule is gone. Be careful what you wish for. ;) |
| 21:10 | <gsnedders> | Lazy IRC: Are JS extensions for Firefox etc. .xpi too, or do they have a different extension? |
| 21:10 | <GPHemsley> | zcorpan: Better? http://wiki.whatwg.org/wiki/Specs/style#Collections_of_values |
| 21:11 | <zcorpan> | GPHemsley: yes |
| 21:11 | <Ms2ger> | gsnedders, yeah |
| 21:13 | <gsnedders> | Ms2ger: Is there any way to tell them apart on the adds on site? |
| 21:13 | <Ms2ger> | No idea |
| 21:13 | <gsnedders> | Well you're only a bit useful! |
| 21:14 | <odinho> | tru dat |
| 21:24 | <Ms2ger> | :D |
| 21:44 | <Hixie> | heycam|away: yt? |
| 21:44 | <Hixie> | is there something somewhere that describes WebIDL's Foo[] vs sequence<Foo> vs a custom [ArrayClass] interface? |
| 21:44 | <Hixie> | i get confused about this every time |
| 21:50 | <Hixie> | what is "the value of that dictionary member" when the member's type is sequence<Foo> ? |
| 21:54 | <Hixie> | and same question, for Foo[]... |
| 21:55 | <Hixie> | seems the former is a new Array |
| 21:55 | <Hixie> | but the latter could be the same Array? |
| 21:55 | <Hixie> | but it says dictionaries always copy... |
| 21:55 | <Hixie> | i'm confused |
| 22:06 | <heycam> | Hixie, hi |
| 22:06 | <heycam> | Hixie, Foo[] means "a special platform object that behaves kind of like an array but which can live-ly reflect elements and/or be read only or fixed length" |
| 22:07 | <heycam> | sequence<Foo> as a return type basically means a JS Array |
| 22:07 | <heycam> | as an arg, means it accepts a JS Array, or something that feels like one |
| 22:07 | <Hixie> | it seemed from the webidl spec that on an attribute, Foo[] meant just a regular Array |
| 22:07 | <heycam> | sequence<> also means things will be copied out of the Array (or array-ish thing) you pass in, and a reference to that object won't be held on to |
| 22:07 | <heycam> | Hixie, no that's not right |
| 22:07 | <heycam> | the situation with these types is terribly |
| 22:07 | <heycam> | sorry |
| 22:08 | <heycam> | *terrible |
| 22:08 | <Hixie> | (context is https://www.w3.org/Bugs/Public/show_bug.cgi?id=23176 ) |
| 22:08 | <heycam> | [ArrayClass] only means "prototype is Array.prototype, not Object.prototype" |
| 22:08 | <heycam> | I think mostly everyone dislikes Foo[] objects |
| 22:08 | <heycam> | because they're not-quite-Arrays |
| 22:09 | <Hixie> | so a readonly attribute Foo[] foo; returns an immutable object? as in, can't change their contents? |
| 22:09 | <Hixie> | not an Array? |
| 22:09 | <heycam> | you can define it so, or not |
| 22:09 | <Hixie> | oh |
| 22:09 | <heycam> | but it's not n Array object |
| 22:09 | <Hixie> | so, right now i have no prose hook here to define anything |
| 22:09 | <Hixie> | it's in an Event |
| 22:10 | <Hixie> | the only prose is DOM's "If there is an eventInitDict argument then for each dictionary member defined therein find the attribute on event whose identifier matches the key of the dictionary member and then set the attribute to the value of that dictionary member. |
| 22:10 | <Hixie> | " |
| 22:10 | <Hixie> | the member in the dictionary is a sequence<Foo> |
| 22:10 | <Hixie> | and the FooEvent interface member is a readonly attribute Foo[] |
| 22:10 | <heycam> | oh, interesting |
| 22:10 | <Hixie> | so what does that mean? |
| 22:10 | <heycam> | so despite the fact that the types aren't identical, I think that should kind of work |
| 22:11 | <heycam> | if you blur your eyes a bit :) |
| 22:11 | <heycam> | taking a JS object that is a Foo[], and converting it to IDL sequence<Foo> type, will do the right thing |
| 22:11 | <heycam> | since the Foo[] object will feel like an array (it'll have 0, 1, 2, length properties) |
| 22:11 | <Hixie> | you mean the other way around? |
| 22:11 | <heycam> | ah oh |
| 22:11 | <heycam> | in that case, let me check ;) |
| 22:12 | <Hixie> | i'm trying to figure out if new FooEvent({foo: [foo1, foo2]}).foo is mutable (as in, can have items added or removed, not as in frozen) |
| 22:12 | <Hixie> | (i want it immutable if possible) |
| 22:12 | <heycam> | ok so yes, JS-to-IDL-Foo[]-type conversions will do the right thing there... |
| 22:13 | <heycam> | see the conversion steps in http://heycam.github.io/webidl/#es-array |
| 22:13 | <heycam> | it will "Return a new fixed length array ..." |
| 22:13 | <heycam> | won't be read only tho |
| 22:13 | <heycam> | so perhaps the right thing is to have the DOM spec allow you to hook in to that dictionary-to-event-init algorithm |
| 22:14 | <heycam> | to give custom behaviour for a particular dictionary member |
| 22:14 | <TabAtkins> | GPHemsley: Oxford comma or gtfo |
| 22:15 | <heycam> | Hixie, ontoggle seems like a useful addition for <details> btw |
| 22:15 | <Domenic_> | Hixie: I like your current plan of just returning a normal array for .ports, FWIW. |
| 22:16 | <Hixie> | heycam: what's the use case for fixed-length-but-mutable arrays? |
| 22:16 | heycam | shrugs |
| 22:16 | <Hixie> | Domenic_: apparently that's not quite what i'm returning |
| 22:17 | <Hixie> | heycam: well, if there isn't one, and nobody uses it, we can do away with it and make this readonly without requiring complex magic for this one case :-) |
| 22:17 | <heycam> | Hixie, maybe ;) |
| 22:17 | <Domenic_> | Hixie: oh hmm I see heycam didn't tell us what sequence<Foo> does for attributes. |
| 22:17 | <Hixie> | Domenic_: on attributes it does nothing, it's not valid |
| 22:17 | <heycam> | Domenic_, the answer in you can't use it for attributes :) |
| 22:17 | <heycam> | *is |
| 22:17 | <Domenic_> | welp |
| 22:17 | <Hixie> | Domenic_: (it would return a new object each time, which is hecka confusing) |
| 22:17 | <Domenic_> | is it possible to have attributes that are arrays in WebIDL? |
| 22:18 | <Domenic_> | is it possible to have attributes that are arrays in WebIDL? |
| 22:18 | <heycam> | it feels like we want a way to represent just a "reference to an Array object" in Web IDL tho |
| 22:18 | <heycam> | Domenic_, so you can, but currently you have to write the type as "object" |
| 22:18 | <Domenic_> | oh fun |
| 22:18 | <heycam> | adding Array is easy though |
| 22:18 | <heycam> | we should just do that |
| 22:19 | <heycam> | so we have four array-ish types in the spec ;) |
| 22:19 | <Hixie> | that's orthogonal to this, though, right? |
| 22:19 | <Hixie> | (see also the Transferable issue) |
| 22:19 | <heycam> | it is unless you want to change the message port array design to use actual Array objects |
| 22:19 | <Domenic_> | (relevant: https://www.w3.org/Bugs/Public/show_bug.cgi?id=23682) |
| 22:19 | <Domenic_> | which I think is what you want to do |
| 22:19 | <heycam> | since most people want to kill Foo[] types, and the message port arrays are one of the only uses of them... |
| 22:20 | <heycam> | Domenic_, I had not read that bug yet |
| 22:20 | <Hixie> | heycam: ah well that would be fine too i guess |
| 22:21 | <TabAtkins> | heycam: Plz make a fifth array type that's just the other four mashed together, and the browser guesses which one you meant. |
| 22:21 | <Hixie> | heycam: bz wants an immutable object though |
| 22:21 | <Domenic_> | in that case freeze it |
| 22:21 | <Hixie> | TabAtkins: he has that already! a union :-) |
| 22:21 | <heycam> | (except that you can't union all those types together) |
| 22:21 | <Domenic_> | i think there is some general consensus that frozen arrays are good for at least some use cases |
| 22:21 | <heycam> | yeah I think a frozen array makes sense for the message port array |
| 22:21 | <Domenic_> | so heycam if you're adding array anyway maybe add some kind of way to make them frozen? |
| 22:22 | <heycam> | Domenic_, yeah I'll check out sicking's suggestions there |
| 22:22 | <Hixie> | would be great if i could just say [Frozen] Array :-) |
| 22:22 | <Hixie> | the sad thing about using Array in the IDL is you lose the type annotation |
| 22:22 | <heycam> | I think the [SameObject] that sicking proposes is not all that what you want |
| 22:22 | <Hixie> | Foo[] could just mean an Array on the way out and a type-checked Array on the way in |
| 22:23 | <heycam> | yes it should be the same object returned all the time, but also you need the values to be frozen |
| 22:23 | <heycam> | maybe the "readonly" is meant to imply that tho |
| 22:23 | <Hixie> | i don't want the MessagePort objects themselves frozen... |
| 22:23 | <heycam> | Hixie, no but the values of the array indexes |
| 22:23 | <Hixie> | ah |
| 22:23 | <Hixie> | [24~right |
| 22:23 | <Domenic_> | it would be cool to use the word "frozen" instead of "readonly" since the former means something. |
| 22:23 | <heycam> | ha |
| 22:24 | <heycam> | yeah readonly also means something, which is "user can't change the value of the property" |
| 22:24 | <Domenic_> | right yeah "only has a getter" |
| 22:24 | <Domenic_> | so i am hearing `readonly frozen Array<MessagePort> ports` |
| 22:25 | <TabAtkins> | This works for me. |
| 22:25 | <TabAtkins> | And then throw away everything else. |
| 22:25 | <Domenic_> | oh wait i forgot `readonly frozen [SameObject] Array<MessagePort> ports` |
| 22:26 | <heycam> | "attribute" |
| 22:26 | <Domenic_> | whyyyyyyy make the hurting stop |
| 22:26 | <heycam> | :) |
| 22:27 | <Hixie> | i'd prefer "readonly attribute [Frozen] MessagePort[] ports;" |
| 22:27 | <Hixie> | but i don't know what SameObject means |
| 22:27 | <Domenic_> | I think it prevents the b.ports !== b.ports problem |
| 22:27 | <heycam> | (believe it or not I did try and think of all the different use cases for combinations of arrays/arraylikes/mutable/immutable/length-changeable/etc. when coming up with what's in the spec at the moment) |
| 22:27 | <heycam> | might have been before frozen things were around tho |
| 22:27 | <Hixie> | yeah frozen is a newish thing |
| 22:28 | Hixie | doesn't understand why we have it |
| 22:28 | <heycam> | we use [SameObject] in our idl to trigger some optimisations |
| 22:28 | <Domenic_> | i mean it is less powerful than what we really want which is readonly-but-writable-by-creator, but it does help in this particular case of always-immutable-forever. |
| 22:29 | <Ms2ger> | Hi heycam! |
| 22:29 | <TabAtkins> | So annoying that you have to do a brand new cloned interface to do readonly-but-writable-by-creator. :/ |
| 22:29 | <heycam> | TabAtkins, was just going to say; that's what sicking's suggestion is |
| 22:29 | <heycam> | I mean, the Foo[] types were added to avoid having to create new interfaces each time |
| 22:29 | <Domenic_> | yeah :-/. i am seriously thinking of trying to create a canonical proxy-based array wrapper for that |
| 22:29 | <GPHemsley> | TabAtkins: Ah, yes, good point. |
| 22:29 | <heycam> | Domenic_++ |
| 22:29 | <Hixie> | heycam: yeah |
| 22:29 | <heycam> | it's the biggest problem with trying to re-use standard JS array-ish things here |
| 22:30 | <heycam> | hi Ms2ger |
| 22:30 | <TabAtkins> | +1, would do more. |
| 22:35 | <GPHemsley> | TabAtkins: Added. |
| 22:35 | <Hixie> | heycam: ooh, i actually have an answer for heycam in https://www.w3.org/Bugs/Public/show_bug.cgi?id=18242 now |
| 22:36 | <Hixie> | he ain't gonna like it though |
| 22:36 | <heycam> | :\ |
| 22:36 | <Hixie> | guess i should just provide you with a hook |
| 22:36 | <Hixie> | and put the ugly stuff on my end |
| 22:36 | <heycam> | the less browsing context related stuff I need to include in my spec the better, really |
| 22:36 | <Hixie> | the answer is "the unit of related similar-origin browsing contexts is the one in which the browsing context specified by the script's settings object finds itself" |
| 22:37 | <Hixie> | let me give you a hook |
| 22:37 | <heycam> | hook is good |
| 22:37 | <Hixie> | you're gonna hand me a "script", right? |
| 22:37 | <heycam> | I think so -- I get it from the stack of incumbent scripts |
| 22:38 | <heycam> | or just by referencing "incumbent script |
| 22:38 | <Hixie> | my head hurts trying to figure this stuff out |
| 22:38 | <heycam> | actually maybe that doesn't make sense, looking back to comment 30 to see what I needed this thing for |
| 22:38 | <Hixie> | i need to page more of this in |
| 22:39 | <Hixie> | why aren't we having you go through the "jump to a code entry-point" algorithm again? |
| 22:39 | <Hixie> | shouldn't you at least be calling "prepare to run a script-based callback"? |
| 22:39 | heycam | grumbles at find bar not working in his nightly firefox |
| 22:40 | <Hixie> | "If the global object specified by o's settings object is a Window object whose Document object is not fully active, then return "do not run" and abort these steps" seems like something you need on your end, no? |
| 22:40 | <Hixie> | when are you running this stuff? |
| 22:40 | <heycam> | let me check what I added to the spec, because I don't remember |
| 22:41 | <Hixie> | it's by "single operation callback interface" |
| 22:41 | <Hixie> | and "Invoking callback functions" |
| 22:41 | <heycam> | ah yep |
| 22:42 | <heycam> | and we do the "stuff the incumbent script in the callback's context" bit when we pass the function object in |
| 22:42 | <heycam> | e.g. in #idl-callback-function |
| 22:42 | <heycam> | #es-callback-function sorry |
| 22:43 | <Hixie> | yeah |
| 22:44 | <heycam> | so |
| 22:44 | <heycam> | whenever I reference the stack of incumbent scripts, I need to know what unit-of-thingies it's from |
| 22:44 | <GPHemsley> | Hixie: I added another guideline for you: http://wiki.whatwg.org/wiki/Specs/style#Willful_violations_of_other_specs |
| 22:44 | <heycam> | if I can determine that from the script (which I previously stuffed into the callback context), that's good |
| 22:45 | <Hixie> | yeah you can definitely get it from the script |
| 22:45 | <Hixie> | in fact i can just give you the stack directly |
| 22:45 | <gsnedders> | GPHemsley: +1 for TabAtkins's Oxford comma or gtfo |
| 22:45 | <Hixie> | heycam: but my broader question is why aren't we e.g. checking if scripting is enabled? |
| 22:45 | <GPHemsley> | gsnedders: I already added it. :) |
| 22:46 | <gsnedders> | GPHemsley: Like I'm reading shit! |
| 22:46 | <GPHemsley> | ;) |
| 22:46 | <heycam> | Hixie, where in the HTML spec do you check if scripting is enabled? |
| 22:46 | <heycam> | to determine whether to proceed with calling somethign? |
| 22:46 | <Hixie> | heycam: in "prepare to run a script-based callback" |
| 22:46 | <Hixie> | http://www.whatwg.org/specs/web-apps/current-work/#prepare-to-run-a-script-based-callback |
| 22:47 | <Hixie> | and then after the callback we run microtasks... i guess you don't want to do that, right? |
| 22:47 | <Hixie> | when does all this get invoked, on your end? |
| 22:47 | <Hixie> | not for eg. array.sort(), right? |
| 22:47 | <Hixie> | do you get invoked for setTimeout(function...)? |
| 22:48 | <Hixie> | no, looks like for setTimeout, i just do "Call the Function. Use the third and subsequent method arguments (if any) as the arguments for invoking the Function. Use method context proxy as the thisArg for invoking the Function." |
| 22:48 | <heycam> | no, not for array.sort() |
| 22:48 | <Hixie> | (which is completely bogus, but that's another story) |
| 22:48 | <heycam> | for setTimeout, yes, since you should be storing away the IDL-typed callback thing |
| 22:48 | <Hixie> | aah, ok |
| 22:48 | <heycam> | and then invoking it through my "invoke a callback" algorithm, whatever it's called |
| 22:48 | <Hixie> | good to know |
| 22:48 | <Hixie> | for event handlers? i seem to do all the logic myself for those currently |
| 22:49 | <heycam> | should be just like setTimeout |
| 22:49 | <heycam> | whenever you talk about invoking Function objects, it by passes my stuff |
| 22:49 | <heycam> | *bypasses |
| 22:50 | <Hixie> | for event handlers i have to do it myself because there's all kinds of crazy stuff like the scope chain being fishy |
| 22:50 | <heycam> | hmm |
| 22:50 | <Hixie> | i use "jump to code entry point" for that, anyway |
| 22:50 | <Hixie> | so it takes care of all this |
| 22:50 | <heycam> | I see |
| 22:50 | <Hixie> | addEventListener() would use your stuff, but that's a DOM issue, not HTML |
| 22:51 | <Hixie> | anyway, for addEventListener(), i'm pretty sure you do need to be checking that the browsing context is active |
| 22:51 | <Hixie> | dunno if you want to run microtasks, but probably |
| 22:51 | heycam | does not know what it would mean to run microtasks |
| 22:52 | <Hixie> | (for setTimeout(), microtasks don't matter since the whole thing is in a task, so they run immediately after anyway) |
| 22:52 | <Hixie> | mutation observers are microtasks |
| 22:52 | <Hixie> | amongst other things |
| 22:52 | <heycam> | ah |
| 22:52 | <heycam> | so if there are multiple things to do, like checking script is enabled, running microtasks, it would be nice to get the HTML spec to run them for me |
| 22:52 | <heycam> | by me just invoking one hook |
| 22:52 | <Hixie> | i think you can do that today by just invoking http://www.whatwg.org/specs/web-apps/current-work/#jump-to-a-code-entry-point |
| 22:53 | <heycam> | ok I'll take a look at it again |
| 22:53 | <Hixie> | but that won't work for your case when it's not a script |
| 22:53 | <heycam> | I think I thought it wasn't appropriate earlier |
| 22:53 | <heycam> | ah right |
| 22:53 | <heycam> | yes |
| 22:53 | <Hixie> | e.g. if setTimeout(window.open, ...) |
| 22:53 | <heycam> | can we factor out the non-script-ish things from it? |
| 22:53 | <GPHemsley> | Hixie: Were there other terms besides "file" and "resource" that you thought were dangerous? |
| 22:53 | <Hixie> | heycam: it is already |
| 22:53 | <heycam> | ok I'll look again |
| 22:53 | heycam | back in a couple of mins |
| 22:54 | <Hixie> | heycam|away: i'll comment on the bug |
| 22:54 | <Hixie> | and reassign it to you |
| 23:00 | <Hixie> | heycam|away: so, one oddity is we probably want to handle callbacks that are callbacks into scripts differently than callbacks that are into native methods |
| 23:01 | <heycam> | Hixie, differently in what way? |
| 23:02 | <Hixie> | well, if you call setTimeout(window.open) from a script that's imported from a different origin, and for some reason there's some exception raised, you want the exception to have muted errors. But if you call setTimeout(foo) where foo is a script in the page's origin, even if the calling script was fetched from another origin, you want the exceptions to not be muted |
| 23:02 | <Hixie> | (all the script origins here are the same, it's just a matter of whether the script comes from another origin or not in the <script src="">) |
| 23:04 | <Hixie> | also, if you're calling an actual script as your callback, you likely want it to be a new entry script, but if it's a call to a native method, i guess we dont' want a new entry script? |
| 23:04 | <heycam> | the former is something that comes up with Web Components I guess? |
| 23:04 | <heycam> | for the latter, I'm not sure what a new script entry entails |
| 23:05 | <Hixie> | the former comes up in regular pages |
| 23:05 | <Hixie> | <script src="foo.js"> exceptions are fine, <script src="http://anothersite.example.com/foo.js"> the exceptions are muted (don't give line number information) |
| 23:06 | <Hixie> | for the latter: the stack of incumbent scripts is used to determine two things, the "entry script" and the "incumbent script". The "entry script" is the "bottom" of the stack, and incumbent the top. The "entry script" is used sometimes to e.g. determine what the base URL should be, other times we use the incumbent scripts (especially for security checks) |
| 23:07 | <heycam> | I see |
| 23:10 | <heycam> | anyway, I'll await your comment on the bug |
| 23:12 | <Hixie> | heycam: well, i'm not sure what to suggest, because i can't work out how you can tell if the callback "is a script" or not |
| 23:14 | <heycam> | Hixie, I could inspect it at the time the JS Function value gets converted to the IDL type |
| 23:14 | <heycam> | and associate that information with the IDL callback object |
| 23:15 | <Hixie> | heycam: how would we phrase it? i don't even know how to describe it |
| 23:15 | <Hixie> | heycam: JS doesn't have this concept of something being a script, per se |
| 23:15 | <heycam> | Hixie, well I've already got this term "initial objects" |
| 23:15 | <heycam> | which represents all of the objects that exist due to IDL things |
| 23:15 | <heycam> | I could just check whether it is an initial object |
| 23:16 | <heycam> | means the same as "if this is a Function object that corresponds to an IDL operation, IDL attribute getter, ......." |
| 23:16 | <Hixie> | http://www.hixie.ch/tests/adhoc/html/script/callbacks/001.html |
| 23:21 | <heycam> | Hixie, am I reading that right and the testParentTimeout case is weird? |
| 23:21 | <Hixie> | reload |
| 23:21 | <Hixie> | i edited it after posting the url |
| 23:22 | <Hixie> | the first two buttons demonstrate the simple case of "entry script" being a thing |
| 23:22 | <heycam> | one of your button captions needs updating |
| 23:23 | <Hixie> | reload |
| 23:23 | <Hixie> | the next two buttons show that it's using the settings object of the setTimeout method, when you start from setTimeout |
| 23:23 | <Hixie> | which i didn't expect |
| 23:23 | <Hixie> | at least in chrome |
| 23:24 | <Hixie> | ah, firefox is differnet |
| 23:24 | <Hixie> | interesting |
| 23:24 | <heycam> | third last and second last buttons are different in chrome/firefox |
| 23:27 | <Hixie> | looks like chrome just uses the settings object of the method being called, in the case of window.open |
| 23:27 | <Hixie> | but both chrome and firefox do make it an entry script regardless |
| 23:28 | <heycam> | so no oddity difference needed? |
| 23:28 | <Hixie> | er, sorry, s/chrome/firefox/ in my last but one comment |
| 23:28 | <Hixie> | well, we have to figure out what the script should be |
| 23:28 | <Hixie> | they're both interesting models |
| 23:28 | <Hixie> | neither is particularly convenient for us |
| 23:29 | <Hixie> | wonder what IE does |
| 23:30 | <Hixie> | safari is different than chrome? |
| 23:31 | <Hixie> | wtf is safari doing |
| 23:34 | <Hixie> | ok IE just takes the biscuit |
| 23:34 | <Hixie> | IE9, anyway |
| 23:35 | <Hixie> | IE9 does inner, outer, inner, inner, and then for the last four buttons just doesn't open a window at all. |
| 23:35 | <Hixie> | i guess that means window.setTimeout(window.open) doesn't work at all in IE |
| 23:35 | <Hixie> | that would certainly make our life easier... |
| 23:35 | <heycam> | :) |
| 23:35 | <heycam> | can I leave you to work out what to do here and you can tell me what info I need to pass into my HTML spec hook call? |
| 23:36 | <gsnedders> | window.setTimeout(window.open)? Do I even want to ask!? |
| 23:36 | <heycam> | and if I need to distinguish between native/JS functions, I can do that |
| 23:36 | <Hixie> | heycam: sure |
| 23:36 | <Hixie> | i probably won't finish today, at this rate |