03:58
<zcorpan>
SteveF: man that is going to kill my poor macbook :-)
05:57
<gsnedders>
jgraham: I guess the GH workflow would be PRs to me on the PR branch. Ergh.
05:57
<gsnedders>
jgraham: But idk if I know the spec well enough and/or have the time.
05:57
<gsnedders>
jgraham: Whereas you probably have an employer kean on you getting them into the testsuite. :)
08:54
<jgraham>
Ms2ger: Achievement unlocked: used all of map, filter and reduce in a single expression
08:54
<jgraham>
gsnedders: It could be. That would be terrible though
08:55
<Ms2ger>
jgraham, very much Aryeh's achievement :)
08:58
<annevk>
When is heycam going to make IDL a Living Standard already?
08:58
<heycam>
(yeah gosh)
08:58
<annevk>
v1/v2, everyone implements v2 anyway
08:58
<annevk>
heycam!
08:58
<heycam>
hi!
08:58
<heycam>
Living Standard in CVS
08:58
<heycam>
undead standard
08:58
<annevk>
hah, CVS
08:59
<annevk>
I can teach you some GitHub if you want :p
08:59
<heycam>
pfft
08:59
<annevk>
heycam: about IDL, we have ByteString and [EnforceUTF16] and they're supposedly doing the same thing, but different
08:59
<Ms2ger>
You can even get some idl.spec.whatwg.org
09:00
<annevk>
heycam: e.g. they both coerce the input to a different type, which is arguably what DOMString, long, etc. do too
09:00
<annevk>
heycam: well, you didn't spec [EnforceUTF16] that way, which is kinda annoying and which I think is why we want to make that a type
09:00
<heycam>
annevk, so they should be the same kind of thing
09:01
<annevk>
heycam: if we don't want to make that a type, we should maybe drop ByteString and [EnforceUTF16] and just deal with it at the spec level... not sure that's necessarily great
09:02
heycam
brb phone
09:02
<Ms2ger>
bz may feel differently
09:02
<jgraham>
Ms2ger: r+ but I didn't check tht you were actually using idlharness correctly, only that the code you posted would implement the parts of the spec that you quoted if you were using the datastructures correctly\
09:03
<Ms2ger>
jgraham, the DOM/HTML tests seem to pass, so I'm going to claim it's correct :)
09:03
<annevk>
ByteString = code units -> bytes; [EnforceUTF16] DOMString = code units -> mapped code units (whereas I wanted Unicode scalar values)
09:03
<annevk>
heycam: ^
09:03
<annevk>
Ms2ger: about what?
09:03
<jgraham>
Ms2ger: Right, I think what I checked, plus some passing tests is convincing
09:04
<jgraham>
+,
09:04
<Ms2ger>
annevk, the types thing, but maybe I misunderstood you
09:06
<Ms2ger>
jgraham, thanks
09:06
<heycam>
annevk, yeah I can see it from that perspective. (was just thinking that before the phone rang.)
09:06
<annevk>
Ms2ger: https://www.w3.org/Bugs/Public/show_bug.cgi?id=22808 is a pretty pointless comment... We often "break" something that works and we do that because of X. So if you don't give an argument against X...
09:07
<heycam>
annevk, I'm sympathetic to the argument of not having ByteString given it's not likely to be used elsewhere
09:07
<heycam>
whereas [EnforceUTF16] sounds like something that could be more generally useful
09:07
<heycam>
btw I'm going to be in the london office for the few days before the summit
09:08
<annevk>
heycam: that's awesome, but I won't be in London, but I'll be in Brussels
09:08
<heycam>
oh =P
09:08
<heycam>
ok
09:08
<annevk>
TAG is meeting the days leading up to it in Boston...
09:09
<heycam>
I'll see you in Brussels then hopefully
09:10
<heycam>
oh, gotta go; maybe back later
09:10
<annevk>
Okay, so say we remove ByteString and deal with it in prose. Can we make the output of EnforceUTF16 Unicode scalar values?
09:13
<annevk>
Hah, whenever I meet heycam|away on IRC, it's for 5 minutes and he typically has a call or meeting during that :-)
09:14
<Ms2ger>
jgraham, oh, and a "merge this PR" button in critic would be nice :)
09:15
<jgraham>
Ms2ger: Indeed, but when I tried to add one I couldn't get the authentication right
09:16
<jgraham>
I guess I could just use the github account of the critic instance itself
09:19
Ms2ger
grumbles at the bbc
09:20
<jgraham>
Ms2ger: You've started reading the Telegraph or something?
09:20
<Ms2ger>
Nah
09:21
<Ms2ger>
I'm well in range of the radio 4 LW signal, but due to "rights restrictions", I can't listen online
09:21
<jgraham>
To sport or something? Usually you can listen to the radio online
09:22
<Ms2ger>
Cricket
09:22
<jgraham>
Ah
09:22
<jgraham>
Yeah, not sure that's the BBC's fault really
09:22
<jgraham>
I mean it is obviously stupid, but they get sold region-restricted rights
09:22
Ms2ger
grumbles at some unidentified party
09:22
<jgraham>
Very annoying
10:01
<annevk>
Man, token-based security people are at it again on public-webappsec
10:01
<annevk>
I wonder if anyone else here is subscribed to that list...
10:02
<Ms2ger>
Not me
10:15
<darobin>
me neither
10:15
<Ms2ger>
Ah, darobin
10:15
<Ms2ger>
Back from vacation? :)
10:15
<darobin>
Ms2ger!
10:16
<darobin>
I'm still pondering that one
10:19
<jgraham>
Sounds like France
12:08
<annevk>
Anyone recall when Hixie_ and I discussed how to write down tasks in Fetch?
12:08
<annevk>
Most recent discussion that is, not the one Google returns in March...
12:20
<zcorpan>
anyone know if it's possible to achieve this with css? http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2504
12:21
<zcorpan>
(i.e. what the script does)
12:27
<annevk>
Found it: http://krijnhoetmer.nl/irc-logs/whatwg/20130723#l-734
12:51
<annevk>
Fetch thing is https://www.w3.org/Bugs/Public/show_bug.cgi?id=22387 now
13:18
<annevk>
matjas: clearly we need @spaceatkins as a fake @tabatkins
13:19
<Ms2ger>
annevk, so you're fake Alex?
13:19
<matjas>
oh god, please make this happen internets
13:19
<annevk>
Ms2ger: your logic is infallible
13:24
<jgraham>
At least it would be clear that spaceatkins was better than tabatkins
13:29
<matjas>
you guys, tabs are way better
13:30
<Ms2ger>
At inducing rage?
13:33
<Ms2ger>
annevk, r? https://critic.hoppipolla.co.uk/r/295
13:34
<annevk>
Ms2ger: commit message could say empty string names, seems fine otherwise
13:35
<SimonSapin>
tabs are theoretically superior, but worse is better
13:35
<annevk>
Ms2ger: done it through the interface now
13:35
<Ms2ger>
Thanks
13:37
<jgraham>
The "tabs are better" arguments are all crazy talk
13:38
<Ms2ger>
There's something to be said for them, but in real life you also want alignment, and that needs spaces
13:38
<Ms2ger>
And mixing them is a horror
14:24
darobin
wonders if people here know about http://w3tmemes.tumblr.com/
14:29
<SimonSapin>
darobin: what does w3t stand for?
14:30
<darobin>
W3C Team
14:30
<SimonSapin>
wow, this is even more obscure than w3cmemes :p
14:34
<darobin>
SimonSapin: yeah, it references all the Sikkrit Cabal stuff
14:34
<darobin>
that said, if you know about W3C I reckon you can figure out what most apply to, or at least imagine the situation :)
14:59
<annevk>
darobin: with some you can imagine half of the text being censored :)
14:59
<annevk>
darobin: does this have a Twitter account?
15:00
<annevk>
http://w3tmemes.tumblr.com/image/55808644257 :-)
15:02
<darobin>
annevk: I don't believe it does, but you can set Tumblr up to tweet automatically, right?
15:11
<annevk>
darobin: yeah, should be pretty easy
15:13
<darobin>
well I couldn't possibly know who's behind this, but I'll try to pass the suggestion along
15:17
<SteveF>
anybody know of any implementations of inert attribute?
16:30
<TabAtkins>
Ms2ger: I mix tabs for indent and spaces for alignment regularly, and I haven't died yet. It Just Works (tm).
16:32
<Ms2ger>
TabAtkins, do you get it right?
16:32
<TabAtkins>
...yes? How do you get it wrong? It seems like something you'd have to be deliberately stupid at to mess up.
16:32
<jgraham>
TabAtkins: Has anyone else working with your code died?
16:32
<TabAtkins>
jgraham: Not to my knowledge, but it's open-source, so who knows?
16:33
<jgraham>
TabAtkins: Uh, really? I don't think it's even well specified how to do it
16:33
<jgraham>
e.g.
16:33
<jgraham>
def foo(bar,
16:33
<TabAtkins>
You... tab to the indentation level you want, then space to the alignment you want.
16:33
<jgraham>
baz)
16:33
<jgraham>
(heh, missed a space)
16:33
<TabAtkins>
I'm not in a fixed-width font anyway, so it's lost on me.
16:33
<jgraham>
How many tabs and how many spaces on the second line?
16:34
<JakeA>
I used to use tabs for a semantic block indent, and spaces for a presentational alignment
16:34
<TabAtkins>
JakeA: Yes.
16:34
<TabAtkins>
jgraham: Tab to the same line indentation as the primary line, because you're not wanting to indent any more. Space to whatever alignment you want.
16:34
<JakeA>
so you'd never have tabs after a space, but you may have spaces after a tab
16:34
<JakeA>
hah, yes, that
16:35
<jgraham>
TabAtkins: Some people would consider that to need one extra level of indentation
16:35
<TabAtkins>
jgraham: Literally *any other combination* would be completely fucked up if you changed your tab size.
16:35
<TabAtkins>
Those people are dumb.
16:35
<TabAtkins>
And don't understand what tabs are for.
16:35
<jgraham>
I think the sematic argument is pure crazy
16:35
<Ms2ger>
It's fine in theory
16:35
<Ms2ger>
Like astrophysics
16:35
<jgraham>
Your code has the semantics that the compiler gives it
16:35
<TabAtkins>
The "sementic" argument is just a shorthand for "look, dammit, I like a different indent size than you".
16:36
<jgraham>
If the complier isn't infering any semantics from it, there aren't any
16:36
<JakeA>
yeah
16:36
<TabAtkins>
(I often go for a 3-space indent.)
16:37
<jgraham>
So the "semantic" argument is a shorthand for "presentation"?
16:37
<jgraham>
Weird
16:37
<TabAtkins>
Um, no. Quit being deliberately difficult. You know what Jake means by "semantic block".
16:37
<JakeA>
a tab is 1 unit of indent sized to the viewer's preference, space is a single char-width alignment where the user's preference is deliberately ignored
16:38
<TabAtkins>
The rule is very simply expressed in terms of presentation - if I change the tab size, will I fuck up anything's alignment? If so, you're using them wrong.
16:39
<JakeA>
yeah, that's a better explanation
16:39
<TabAtkins>
If you want to link that up to the word "semantics", it's similar to "if I view this page in a different modality, will anything fuck up?".
16:43
<TabAtkins>
One could certainly think that it's not worth it to have a variable indentation size, but I point you to the fact that WebKit and Chrome settled on *different* indent sizes, and editing both at the same time is extremely frustrating.
16:43
<TabAtkins>
Especially now that we're Blink.
16:43
<Ms2ger>
Shrug
16:44
<Ms2ger>
It's only infuriating if you don't use the tab key for indentation
16:44
<jgraham>
TabAtkins: Having seen the code style choices of chromium, I can only conclude that it's possible to fuck anything up if you put your mind to it
16:44
<TabAtkins>
There's also my observation that, in the absence of machine-based hygiene checking, I have *never* seen a space-based indent file that didn't fuck up its indentation at some point.
16:45
<jgraham>
I don't know who thought that making python look like C++ (not just in indentation, but in every way they could find) was a good idea
16:45
<TabAtkins>
As evidenced by the fact that every time I have to edit one, and I try a basic conversion of "apparent indent size -> tabs", there's stray spaces everywhere.
16:45
<TabAtkins>
jgraham: No comment. :/
16:49
<TabAtkins>
heycam|away: Yeah, late review is fine.
16:55
<zewt>
dear people who say "fx" when they mean "ff": stop it, it's confusing
16:55
<Ms2ger>
Fx
17:17
<TabAtkins>
F5x
17:27
<TabAtkins>
zcorpan: Regarding that bug, depending on his markup Grid can handle that. Otherwise, it's dependent on us improving the Position property, which fantasai and I intend to do next year.
17:28
<zcorpan>
TabAtkins: see the last comment for the markup
17:29
<TabAtkins>
zcorpan: Right, if he actually needs the <table>, he'll have to wait for Position. If he's just wanting to put things in a grid, and can make #i2 a sibling of the other "cells", then Grid'll do.
17:30
<zcorpan>
TabAtkins: is there a bugzilla component for Position?
17:31
<zcorpan>
TabAtkins: can grid create cells that overlap?
17:31
<TabAtkins>
Maybe. If not, ask MikeSmith to create one.
17:31
<TabAtkins>
And yes, grid items can overlap.
17:32
<TabAtkins>
(Named grid areas, created by the template, can't, but you can always manually specify the position and size of grid items.)
17:35
<Hixie_>
Ms2ger: ping https://www.w3.org/Bugs/Public/show_bug.cgi?id=23119 ?
17:35
<Ms2ger>
Hixie_, yes
17:35
<Hixie_>
Ms2ger: what's the problem with the spec?
17:35
Ms2ger
loads up that part of the spec
17:36
<Ms2ger>
"If the stack of open elements has a button element in scope, then run these substeps:"
17:36
<Ms2ger>
I have no idea what that means
17:36
<Ms2ger>
"has a button element in scope" links to "have an element in scope", which lost track of the button
17:37
<Ms2ger>
Then I get a link titled "has an element in the specific scope" to "have an element target node in a specific scope"
17:37
<Ms2ger>
Where suddenly a 'target node' appears out of thin air
17:38
<jgraham>
Right, iirc, there are two problems. It doesn't define the inputs to the algorithm, and it doesn't define the concept of equality it is using
17:41
<Hixie_>
Ms2ger: "has an element in scope" defines which elements are in scope
17:41
<Hixie_>
Ms2ger: so then you see if one of the elemnets in scope is a button element
17:41
<Hixie_>
Ms2ger: it's like saying "does this fruit bowl have a red apple" where you have an algorithm that defines whether "a fruit is an apple in a bowl"
17:41
<jgraham>
Hixie_: The problem is deeper
17:42
<jgraham>
Hixie_: "has an element in a specific scope" is broken
17:42
<Hixie_>
how so?
17:42
<Ms2ger>
Hixie_, jgraham managed to explain to me what you meant, but that doesn't make the spec say it
17:42
<Hixie_>
Ms2ger: as far as i can tell, it's what the spec says.
17:42
<Hixie_>
Ms2ger: i don't understand why it wouldn't say that.
17:42
<jgraham>
Hixie_: It uses a concept "target node" that is undefined
17:43
<Hixie_>
jgraham: that was fixed over the weekend
17:43
<Ms2ger>
You write an algorithm that takes an argument "target node"
17:43
<jgraham>
http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#has-an-element-in-the-specific-scope looks wrong to me
17:43
<Ms2ger>
But none of the callers of that algorithm explain what they're passing as "target node"
17:44
<Hixie_>
Ms2ger: the algorithm isn't ever called as far as i know
17:44
<Ms2ger>
What
17:44
<Hixie_>
Ms2ger: it's a definition, not an imperative algorithm that's called
17:44
<jgraham>
I am now super-confused
17:44
<Ms2ger>
"The stack of open elements is said to have an element in scope when it has an element in the specific scope consisting of the following element types:"
17:45
<Ms2ger>
That's calling it
17:45
<Hixie_>
no
17:45
<Ms2ger>
Well, it sure should be!
17:45
<Hixie_>
calling an algorithm is more like "Insert an HTML element for the token for which the element entry was created, to obtain new element"
17:45
<Hixie_>
this is just defining "have an element in scope"
17:45
<Ms2ger>
Well, it's defining it poorly
17:45
<Hixie_>
it's just simple english
17:46
<Hixie_>
i really don't understand the problem here
17:46
<Hixie_>
it's defining a property of elements
17:46
<jgraham>
I don't understand how you don't understand the problem
17:46
<Ms2ger>
Me neither
17:46
<Ms2ger>
So if only the editor understands the spec, is the spec good?
17:47
<jgraham>
Hixie_: The spec specifically says it's defining a property of the stack of open elements
17:47
<Hixie_>
everyone actually understand this, given that it's been implemented consistently by multiple people
17:47
<jgraham>
Not a property of the elements themselves
17:47
<jgraham>
I don't think this used to be brokwn in this way
17:47
<Hixie_>
jgraham: jgraham yeah, it's really defining a property of the stack for each element
17:47
<jgraham>
Otherwise I was incredibly negligent in not giving feedback
17:48
<Hixie_>
this part of the spec hasn't changed in months if not years
17:48
<Hixie_>
not in a meaningful way, anyway
17:49
<Ms2ger>
Has anyone implemented it since?
17:49
<jgraham>
Apart from the change at the weekend (which I think I have now), that slightly unbroke it, you mean?
17:49
<Hixie_>
"A fruit bowl is said to have a fruit /target fruit/ on top when the following algorithm terminates in a match state: 1. /target fruit/ has no fruit above it"
17:49
<Hixie_>
"If there is a pear that is on top of the fruit bowl, then..."
17:49
<Hixie_>
this is the exact same formulation
17:49
<jgraham>
OK, so, I think this makes sense if you imagine that the algorithm gets run for every element on the stack of open elements
17:50
<jgraham>
(perhaps)
17:50
<Hixie_>
it's jsut a definition, i wouldn't expect anyone to actually run this each time
17:50
<Hixie_>
i'd probably just set a bit
17:50
<Hixie_>
when the condition becomes true
17:50
<jgraham>
Ignore implementations
17:50
<Hixie_>
and unset it when it becomes false
17:51
<jgraham>
(fwiw I'm pretty sure that html5lib runs this each time. And it isn't a noticable perf. problem in non-pathological cases)
17:51
<jgraham>
But like I said, ignore implementations
17:52
<jgraham>
The way the spec is worded, it feels like you take a type of element
17:52
<Ms2ger>
"The stack of open elements is said to *have an element in scope* when..."
17:52
<jgraham>
e.g. a P element
17:52
<jgraham>
and run it through the algorithm, which will return whether that element is in a particular scope or not
17:52
<Ms2ger>
That would mean Stack::HasElementInScope(/* no arguments */)
17:53
<jgraham>
Ms2ger: Try a force reload
17:53
<Ms2ger>
Not the specific scope
17:53
<Ms2ger>
The plain "in scope"
17:53
<jgraham>
Oh
17:53
<Hixie_>
jgraham: the definition is applied to types ("is there any element in scope that happens to have this type") as well as specific nodes ("is this specific element in scope right now")
17:54
<TabAtkins>
Tangent: does anyone know what the timezone is in gavin's stats?
17:54
<jgraham>
Ms2ger: Yes, that's still wrong
17:54
<Hixie_>
hm yeah, "when it has an" should be "when it has that"
17:55
<jgraham>
Hixie_: But then it still doesn't make sense. You are conflating E and type(E)
17:56
<Ms2ger>
Maybe ... *have an element with _local name_ /local name/ and _namespace_ /namespace/ in scope* when...
17:56
<Hixie_>
jgraham: where does type(E) come in?
17:56
<Ms2ger>
/x/ => var, _x_ => a
17:56
<jgraham>
Hixie_: "has a P element in scope"
17:57
<jgraham>
The algorithm works with specific elements
17:57
<Hixie_>
Ms2ger: it's defining the property for each node in the stack, it's not an algorithm you run to get a boolean result for the stack.
17:57
<Hixie_>
go back to my fruit bowl example. why is that one fine but the spec not?
17:57
<jgraham>
Hixie_: The fundamental problem is tht the way the spec is worded implies it's an algorithm you invoke at specific times
17:57
<Ms2ger>
Because the spec isn't a fruit bowl
17:58
<jgraham>
Hixie_: I don't care about fruit bowl examples. The spec is confusing irrespective of whether some other instance of the same construction is (I didn't even read the example)
17:58
<Hixie_>
jgraham: if you're reading implications, then you're misreading the spec. read what it says, not between the lines.
17:58
<Hixie_>
ok if you're not even willing to consider the examples i'm giving, this conversation isn't being very productive.
17:59
<Hixie_>
the fruit bowl example would help because it would help me understand what the difference is between an obviously fine construction, and the one that's confusing you.
17:59
<jgraham>
Hixie_: Unless you are going to give the same examples to everyone that reads the spec, I don't understand their value in the face of the fact that both Ms2ger and I find the spec confusing
18:00
<Ms2ger>
Hixie_, okay, let me compare to your fruit bowl
18:00
<Ms2ger>
"A fruit bowl is said to have a fruit /target fruit/ on top when the following algorithm terminates in a match state: ..."
18:00
<Ms2ger>
"The stack of open elements is said to have an element in scope when..."
18:00
<Hixie_>
jgraham: the value is that that construction is unambiguously ok, but the spec is apparently not, yet i think they're identical. so if you can explain to me why they're not, it helps me understand the problem with the spec.
18:01
<Ms2ger>
The obvious difference: the fruit bowl one takes an algorithm, the stack one doesn't
18:01
<jgraham>
Hixie_: I have now read it and don't think your fruit bowl example is very clear either fwiw
18:01
<Hixie_>
Ms2ger: the fruit bowl one is about the specific scope definition
18:01
<Hixie_>
jgraham: oh
18:02
<Hixie_>
jgraham: then i am even more confused :-)
18:02
<Ms2ger>
But you don't jump from the use in the parser straight to the specific scope
18:02
<Ms2ger>
You jump from the parser to the #has-an-element-in-scope then to #has-an-element-in-the-specific-scope
18:03
<Ms2ger>
And it's not clear that the 'button' in the parser needs to end up as the /target node/ in #has-an-element-in-the-specific-scope
18:03
<jgraham>
You are invoking an algorithm (that is itself a bit magic, but let's not worry about that) in a very roundabout way that makes it unclear what the arguments to the algorithm are
18:03
<TabAtkins>
annevk: Can you add an "adopt" hook to the Promises spec? Also, is the correct way to invoke one of the static Promise methods (in the case I'm writing right now, Promise.every()), just to invoke it as code or something?
18:04
<Hixie_>
Ms2ger: the analogous fruit bowl one would be "the fruit bowl is said to have a fruit on top when that fruit is specifically on top of the following fruit types: ..." where "a fruit is specifically on top" is similar to the earlier example but the algorithm is longer and checks for those fruit types.
18:04
<zcorpan>
TabAtkins: is http://dev.w3.org/csswg/css-position/#position-root a placeholder for this?
18:04
<Ms2ger>
(Or what "If /node/ is the target node, terminate in a match state." means when you fill in /target node/==|button|)
18:04
<Hixie_>
Ms2ger: woah, the "button" in the parser _doesn't_ end up being the /target node/.
18:04
<Hixie_>
Ms2ger: what makes you think it does?
18:04
<Ms2ger>
It's the only thing I *can* fill in!
18:04
<Hixie_>
jgraham: there's no algorithm invokation, it's a definition.
18:05
<Ms2ger>
What else would it be?
18:05
<jgraham>
Hixie_: There is an algorithm. Conceptually it must be invoked
18:05
<TabAtkins>
zcorpan: Yes, and see http://www.xanthir.com/blog/b48H0 for a more fleshed out early early draft of it.
18:06
<jgraham>
If you just wrote the spec to invoke the actual algorithm rather than having invoked behind the scenes at some point when you read the definition, everything would be much clearer
18:06
<Hixie_>
Ms2ger: every node ever created in the history of the world is passed to the definition, to see if it is in scope or not. this makes every node have a true or false state, which is all you are later checking.
18:06
<zcorpan>
TabAtkins: thx
18:06
<jgraham>
Hixie_: Where does the spec say that?
18:06
<Ms2ger>
Huh
18:07
<Ms2ger>
So what is "the target node"?
18:07
<Hixie_>
jgraham: certainly you could phrase the spec that way, but i would rather phrase the spec in a way that just asks if there's a node that fits the criteria. i'm happy to consider better ways to do that, though, since apparently (despite interop...) the spec doesn't do it well enough
18:08
<jgraham>
Why would you rather do that?
18:08
<Hixie_>
jgraham: because generally speaking it makes the text easier to reason about.
18:08
<Hixie_>
declarative > imperative, where possible.
18:08
<jgraham>
This conversation isn't supporting that point of view
18:09
<Hixie_>
Ms2ger: it's the "x" in "an x has property y if..."
18:09
<Hixie_>
Ms2ger: it's the mathematical equivalent of the indefinite article
18:09
<Ms2ger>
Let's step back
18:09
<Ms2ger>
I was looking at the following text in the parser:
18:09
<Ms2ger>
"If the stack of open elements has a button element in scope, then run these substeps:..."
18:09
<Ms2ger>
How am I supposed to interpret that
18:09
<Ms2ger>
?
18:10
<Hixie_>
Ms2ger: is there a button element that has the property "currently is in scope"?
18:10
<Hixie_>
Ms2ger: or to put it another way:
18:11
<Hixie_>
Ms2ger: is there an element X, which has X.type "button" and X.inScope "true"?
18:11
<jgraham>
I have no idea how you could get to that interpretation from the spec as written
18:11
<Hixie_>
i have no idea how you could interpret it as an imperative algorithm invocation
18:11
<jgraham>
There is nothing to suggest that elements have a property of being in scope
18:11
<Hixie_>
"The stack of open elements is said to have an element in scope when"
18:11
<Ms2ger>
That seems a very unintuitive interpretation
18:12
<jgraham>
Or that a question about the stack of open elements is supposed to be a quaestion about the set of all elements
18:12
<jgraham>
*question
18:12
<Ms2ger>
Now if it had said "If the stack of open elements _has an element in scope_ that is a button element"
18:12
<Ms2ger>
Is that what you mean?
18:12
jgraham
has to go now
18:13
<Hixie_>
I honestly truly don't see why this is hard. The spec defines "The stack of open elements is said to have an element in scope when" and then it asks whether "the stack of open elements has an element in scope" (specifically, whether it has one that is also a button element)
18:13
<Ms2ger>
It's not obvious that that's what it asks
18:13
<Hixie_>
what else could it ask?
18:13
<Hixie_>
i mean, this is just regular english
18:13
<Ms2ger>
Does the stack have the property "has a button element in scope"
18:14
<Ms2ger>
And then the issue is that nothing defines what that means
18:14
<Hixie_>
"a kid is wearing a sweater when..." "is there a red kid wearing a sweater?"
18:14
<Ms2ger>
Whet you're saying now is "is there a...", "does there exists a..."
18:14
<Ms2ger>
But the spec doesn't say that
18:14
<Ms2ger>
*exist
18:15
<Hixie_>
"If the stack of open elements has a button element in scope" is a "Does there exist a" question.
18:15
<Ms2ger>
I don't read it that way
18:15
<Hixie_>
(or rather, "a classroom has a kid wearing a sweater when"... "if the classroom has a red kid wearing as sweater, then..."
18:15
<Hixie_>
)
18:15
<Hixie_>
s/as/a/
18:15
<Hixie_>
what other way is there to read it?
18:15
<Hixie_>
i'm really baffled by this
18:15
<Ms2ger>
'Does the stack have the property "has a button element in scope"?'
18:16
<Hixie_>
it has the property "has an element in scope", which is even hyperlinked from the sentence you're asking about
18:16
<Ms2ger>
So the hyperlink goes to the definition of
18:17
<Ms2ger>
"Does the stack have a/any element in scope"
18:17
<Hixie_>
a/any ?
18:17
<Ms2ger>
"Does the stack have a element in scope" or "Does the stack have any element in scope"
18:18
<Hixie_>
where do you get "does the stack have any element in scope"?
18:18
<Ms2ger>
That's just plain English
18:18
<Ms2ger>
"The stack of open elements is said to have an element in scope when..."
18:19
<Ms2ger>
That defines the answer to "Does the stack have any element in scope?"
18:19
<Hixie_>
hmm, ok, i buy that
18:19
<Hixie_>
one sec
18:20
<Hixie_>
ok, renamed it to "have a particular element in scope"
18:21
<Hixie_>
does that solve the "any" issue?
18:21
Ms2ger
thinks
18:23
<Ms2ger>
Yes, I think so
18:23
<Ms2ger>
However
18:23
<Ms2ger>
That still means you define it for one particular element in the history of the world
18:24
<Ms2ger>
And that's IMO quite a leap from the way you link to the definition in "If the stack of open elements has a button element in scope"
18:24
<Hixie_>
isn't that just what a definition always is?
18:25
<Hixie_>
you define some property of an abstract thing
18:25
<Hixie_>
then you can refer to that property for all concrete things
18:25
<Ms2ger>
I guess the main issue is this
18:26
<Ms2ger>
When I end up here, I want to follow imperative steps
18:26
<Ms2ger>
And I've been doing that repeatedly since I started reading
18:27
<Hixie_>
what's the imperative step for "the current node is a MathML text integration point"?
18:27
<Ms2ger>
But suddenly, without a warning, I end up with a declarative definition
18:27
<Hixie_>
or "is an element in the HTML namespace"?
18:27
<Hixie_>
or "the current node"?
18:27
<Ms2ger>
1. Get the namespace
18:27
<Ms2ger>
2. If the namespace if the HTML namespace, return true
18:28
<Hixie_>
where's that in the spec?
18:28
<Ms2ger>
3. Otherwise, return false
18:28
<Hixie_>
all the spec does is define the namespace property
18:28
<Ms2ger>
It's a straightforward translation, though
18:28
<Ms2ger>
I find the case here less straightforward
18:28
<Hixie_>
how about "If the parser's Document has a style sheet that is blocking scripts" ?
18:29
<Hixie_>
or "if there is an adjusted current node and it is not an element in the HTML namespace and the next seven characters are a case-sensitive match for the string "[CDATA["" ?
18:29
<Hixie_>
the parser is full of these property checks
18:29
<Hixie_>
in fact i don't really see how else you could do it
18:29
<Hixie_>
programming is full of property checks
18:29
<Ms2ger>
I agree there are property checks
18:30
<Hixie_>
how would you phrase "If the stack of open elements does not have a body element in scope, this is a parse error; ignore the token." if it wasn't a property check?
18:30
<Ms2ger>
Loop over the stack, until you find a body element
18:31
<Hixie_>
that would like double the length of this part of the spec
18:31
<Hixie_>
and make it harder to reason about to boot
18:31
<Ms2ger>
You don't have to write that out every time
18:32
<Hixie_>
what exact text would you replace the above with?
18:33
<Ms2ger>
Either you keep the definition with the particular node for "has a particular element in scope", and then you write:
18:33
<Ms2ger>
"If the stack of open elements does not have a particular element in scope that is a body element, this is..."
18:34
<Ms2ger>
Or you keep that text, and define...
18:35
<Ms2ger>
The stack of open elements has an element of kind (or whatever) /x/ in scope when... loop... if /node/ is of kind /x/: match
18:35
<Hixie_>
i don't understand why "If the stack of open elements does not have a particular element in scope" is ok for you, but "...does not have a button element in scope" is not, given the way english works.
18:36
<Ms2ger>
They're both fine, but they don't connect
18:37
<Hixie_>
"The player has a fruit if their inventory contains a fruit" "Does the player have a pear?" connects, does it not?
18:37
<Hixie_>
why is this different?
18:37
<Ms2ger>
Doesn't connect for me
18:37
<Hixie_>
...
18:37
<Hixie_>
really?
18:37
<Ms2ger>
If you define "The player has a fruit if their inventory contains a fruit", I can only answer "Does the player have any fruit"
18:38
<Hixie_>
i gotta go to lunch. bbiab.
18:38
<Ms2ger>
And I'm going to head off for the night, ttyl
18:39
<annevk>
Hixie_: it's kinda weird that "does not have a body element in scope" links to "have an element in scope" whose types don't list the body element
18:39
<annevk>
might be xref issue I suppose
18:40
<Ms2ger>
Maybe "If the stack of open elements does not have >>any<< body element in scope, this is..." might be clearer already
18:40
<Ms2ger>
But my brain is too fried to continue right now :)
18:46
<annevk>
"a" is the same as "any" really
18:46
<annevk>
in this context
19:09
<TabAtkins>
What's the idiomatic way to deal with exceptions in a spec? Specifically, I need to take a 'font' value and turn it into a list of matching Font objects. If there's no matching objects, I want to throw an error. (Actually, reject a promise, but I'll reject it with an error.) What's the right thing to do with something like this?
19:13
<TabAtkins>
(also, lunch now - replies will be responded to in an hour or so)
19:19
<annevk>
TabAtkins: prolly a plain JavaScript TypeError or RangeError
19:20
<annevk>
TabAtkins: doesn't seem like there's a nice semantic mapping though between 'font' property values (assuming that's what you meant) and Font objects (representing individual fonts I assume once again)
20:48
<TabAtkins>
annevk: Yeah, there is - you just do the font resolution algo that Fonts defines, for choosing which faces to use.
20:48
<TabAtkins>
Each face is a Font object.
20:49
<TabAtkins>
Hm, so I should probably name the interface FontFace.
20:49
<TabAtkins>
annevk: I don't do anything more special than say "reject with a TypeError"?
20:49
<annevk>
That seems confusing with @font-face.
20:50
<annevk>
TabAtkins: yeah, if it's actually an error condition that seems fine. The browser can add a nice message...
20:50
<TabAtkins>
annevk: @font-face creates implicit FontFace objects, prepopulating the document.fonts set.
20:50
<annevk>
TabAtkins: maybe say a JavaScript TypeError exception given that the rest of the language is prolly based around IDL..
20:50
<TabAtkins>
annevk: Okay, cool.
20:51
<annevk>
TabAtkins: I see. As for the objects. It might help thinking about what we'd expose if we went lower on the stack.
20:52
<annevk>
TabAtkins: as some day we might want to go there and it'd be great if things would still fit together if we did.
20:52
<Ms2ger>
https://twitter.com/glazou/status/374998161473155072
20:52
<TabAtkins>
annevk: My idea right now is to have a FontSet attached to documents and workers. @font-face rules pre-populate the document's set with FontFace objects. You can manually construct FontFaces with a descriptor dict and either a url or a TypedArray of font data, then add them to the set.
20:52
<annevk>
TabAtkins: that's the idea behind http://extensiblewebmanifesto.org/ anyway. Running the design by Yehuda and public-script-coord will prolly help us get there.
20:52
<jgraham>
Reasons I hate merges: http://git-scm.com/blog/2010/03/02/undoing-merges.html
20:53
<TabAtkins>
FontFaces would be transferrable, so you can hand them to a Worker to let it use fonts.
20:53
<TabAtkins>
annevk: Yeah, I'm doing first draft in spec, then plan to socialize it on public-script-coord.
20:53
<jgraham>
If you git revert a merge then redoing the merge doesn't work the way you expect
20:53
<Ms2ger>
jgraham, but why would you ever do that?!
20:54
<jgraham>
So you either need to edit history or remember that branch is special when you re-merge
20:54
<TabAtkins>
annevk: I signed that webpage, so yeah, I know the principles. ^_^
20:54
<Ms2ger>
Mm, signing web pages
20:54
<jgraham>
Ms2ger: In this case because https://github.com/w3c/web-platform-tests/pull/316#issuecomment-23740848
20:55
Ms2ger
raises one eyebrow
20:55
<annevk>
TabAtkins: aight, sounds good.
20:55
<annevk>
TabAtkins: btw, why is code unit order not sensible for string ordering? I didn't quite get that thread...
20:56
<TabAtkins>
code unit order would be unambiguous, but it's not a proper "unicode ordering".
20:56
<jgraham>
I thought it only had to be well-defined, not useful
20:56
<TabAtkins>
Yeah, I suppose well-defined is enough here.
20:57
<TabAtkins>
And I can produce a well-defined-but-not-that-useful ordering for FontFace objects too.
20:57
<TabAtkins>
Do we have something on the platform that says that everything is just NFC or something?
20:58
<jgraham>
Is that even true?
20:59
<TabAtkins>
Oh man, it'll be nice when bikeshed integrates shepherd's IDL parsing, so I can avoid marking up all these IDL things as definitions and links.
20:59
<TabAtkins>
jgraham: Shrug.
20:59
<jamesr_`>
where are tests for http://encoding.spec.whatwg.org/ supposed to go?
20:59
<TabAtkins>
I think JS does NFC for its strings.
21:00
<jamesr_`>
TabAtkins: for sort?
21:00
<annevk>
TabAtkins: Unicode ordering is overrated imo. Also, it seems better than undefined / random.
21:00
<TabAtkins>
jamesr_`: For what? That question doesn't have enough context.
21:00
<TabAtkins>
annevk: Yeah, better than undefined.
21:01
<annevk>
TabAtkins: "JS does NFC for its strings" doesn't have enough context either ;-)
21:01
<annevk>
jamesr_`: I suggest https://github.com/w3c/web-platform-tests
21:01
<annevk>
jamesr_`: since all W3C specs rely on it these days
21:01
<TabAtkins>
I'm thinking I might be wrong, but I thought that JS mandated its strings to be in NFC.
21:01
<annevk>
TabAtkins: nah doesn't
21:01
<TabAtkins>
Ah, kk then.
21:01
<annevk>
TabAtkins: JS has 16-bit code unit strings
21:01
<TabAtkins>
Well, yeah, but still.
21:02
<TabAtkins>
And CSS doesn't mandate a normalization form either. :/
21:02
<annevk>
Pretty sure it doesn't do conformance like HTML does :-)
21:02
<TabAtkins>
Which means that technically "code unit" is still ambiguous.
21:02
<jamesr_`>
JS has 16-bit unsigned integers
21:02
<jamesr_`>
calling them 'code unit' is a stretch
21:02
<zewt>
makes sense to me, distinguishing from codepoints
21:02
<jamesr_`>
there's basically nothing in the language that requires or assumes the contents of JS strings have anything to do with unicode
21:03
<annevk>
jamesr_`: that's not true
21:03
<TabAtkins>
There's tons that *assumes*.
21:03
<annevk>
jamesr_`: and not that code unit != code point
21:03
<TabAtkins>
Anything that interacts with the string as a string assumes it's in a bastardized utf-16.
21:03
<jamesr_`>
UCS-2
21:03
<TabAtkins>
No, UCS-2 can't encode anything over 16-bits. It's bastardized utf-16.
21:04
<TabAtkins>
With a UCS-2-like structure.
21:04
<annevk>
serialized utf-16 with 16-bit indexing
21:04
<jamesr_`>
except that it isn't necessarily valid utf-16
21:05
<TabAtkins>
Right.
21:05
<TabAtkins>
So there's no *requirement*. But there's plenty of assumption.
21:05
<jamesr_`>
you can have arbitrary bits in each element and pretty much everything works
21:05
<annevk>
16-bit code units is the term for that though...
21:05
<TabAtkins>
Anyway, back to writing specs.
21:05
<TabAtkins>
Oh yeah, annevk, while you're here - adopt hook?
21:05
<annevk>
or code points up to U+FFFD with special meaning for valid surrogate pairs
21:05
<annevk>
TabAtkins: file a bug I guess?
21:06
<TabAtkins>
annevk: kk
21:07
<TabAtkins>
And how best to say "Promise.every(some-spec-defined-list-of-promises)"?
21:08
<annevk>
TabAtkins: I guess for that you want to wait until we've re-defined Promise.every() and then simply reference its internal algorithm (that cannot be replaced).
21:09
<TabAtkins>
annevk: Cool. I'll just hand-wave for now with an issue about it.
21:12
<jsbell>
jamesr_`: Might be a bit crufty now, but my JS prototype for the Encoding API has W3C-style tests in https://code.google.com/p/stringencoding/source/browse/tests.js
21:13
<jsbell>
i.e. someone could clean up and submit those
21:22
<jgraham>
jsbell: Submit them now and we can track the cleanup in critic
21:22
<jgraham>
(create a branch in the W3C repo rather than using your personal GH and we can even have multiple contributers)
21:43
<annevk>
jgraham: I guess I should look into doing that for my URL tests too at some point?
21:43
<annevk>
I wonder what the licensing deal is these days
21:44
<jsbell>
jgraham: I need to be a member of the org presumably?
21:49
jsbell
grabs "jsbell" at github, yay for multiple personalities
21:53
<TabAtkins>
Suggestions on an interface name for "a set of fonts usable in a given context"?
21:53
<TabAtkins>
"FontFaceSet" might be sufficient.
21:58
<zcorpan>
code unit order? i guess i need to say that for getComputedStyle huh
21:59
<TabAtkins>
zcorpan: Yeah.
21:59
<TabAtkins>
zcorpan: But we still need to specify a normalization form to do that.
22:00
<zcorpan>
why?
22:01
<TabAtkins>
Because given var-Á, whether it's encoded as A followed by combining acute accent or as A with acute accent changes what code units it's using.
22:02
<TabAtkins>
And whether it sorts before or after var-B.
22:03
<SimonSapin>
TabAtkins: can’t we just ignore that and deal with code points?
22:03
<zcorpan>
do css parser normalize for e.g. selectors?
22:03
<TabAtkins>
Not specified.
22:03
<TabAtkins>
Unfortunately.
22:03
<zcorpan>
what about impls?
22:03
<TabAtkins>
SimonSapin: Code points gives you the same problem.
22:03
<TabAtkins>
This is a normalization issue, not an encoding issue.
22:03
<TabAtkins>
zcorpan: Dunno.
22:03
zcorpan
checks
22:04
<TabAtkins>
SimonSapin: The two characters A + combining acute accent and the single character Á are the same grapheme cluster, but they're different sets of code points and code units.
22:05
<SimonSapin>
TabAtkins: I understand that. But I think CSS can get away with considering them different
22:05
<zcorpan>
huh. blink uppercases the å in http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2505
22:06
<zcorpan>
i guess that's in .nodeName rather than the parser
22:06
<SimonSapin>
i.e. ignore abstract characters and normalization, only compare code points
22:06
<TabAtkins>
SimonSapin: Hm, I suppose it could. Just treat CSS and JS as black-box sources of codepoint lists.
22:09
<TabAtkins>
In that case it's not actually an issue.
22:11
<zcorpan>
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2507
22:11
<zcorpan>
at least gecko and blink don't normalize
22:13
<zcorpan>
css could do what js does and say "source text is assumed to be NFC without checking that it is"
22:15
<TabAtkins>
I wish I could go back in time and make the unicode consortium exist earlier, and only produce utf-8 as a valid encoding.
22:15
<Hixie_>
rniwa: i don't understand why, in your proposal, A.js executes immediately before B.js which executes immediately C.js in use case U, but in use case S, A.js executes asap when B is needed, and B.js only executes when it can after A.js is run.
22:15
<TabAtkins>
Also, not do the weird thing where there are 17 planes, so you need a 21st bit to encode only that last plane.
22:16
<TabAtkins>
I mean, 16 or 32 or gtfo.
22:17
<rniwa>
Hixie_: sorry, there is a typo there :(
22:19
<Hixie_>
rniwa: i don't really understand how your proposal differs from the one in my last e-mail, other than renamign "whenneeded" to "prefetch" and dropping the =jit feature.
22:19
<rniwa>
Hixie_: so my "prefix" behaves like whenneeded=jit
22:19
<rniwa>
prefetch*
22:20
<rniwa>
Hixie_: or rather a hybrid of whenneeded=true & hit
22:20
<rniwa>
Hixie_: jit*
22:20
<Hixie_>
they seem rather different... one executes asap, the other as late as possible. how can you do a hybrid without losing one or the other?
22:21
<rniwa>
Hixie_: i'm dropping the ability to execute asap since that can be done by async=true if i'm not mistaken
22:22
<Hixie_>
rniwa: how do you do that while still not executing asap if you're not needed?
22:24
<rniwa>
Hixie_: which use case is that?
22:25
<Hixie_>
all of them except U, basically
22:26
<Hixie_>
you don't know how long scripts will take to run, so you don't usually want to wait if you know you need to run it
22:26
<Hixie_>
even if the relevant dependency is itself still loading
22:27
<zewt>
"U" is the only use case for "jit", iirc
22:27
<Hixie_>
right
22:27
<zewt>
oops, never finished my last mail to that thread
22:27
<rniwa>
Hixie_: why doesn't async: true work in that case?
22:28
<rniwa>
Hixie_: say you have a script a.js and another script b.js that depends on a.js. then all you need is <script src="a.js" async></script><script src="b.js" needs="a.js" async></script>
22:29
<Hixie_>
rniwa: take use case S. two scripts, second depends on the first. at time t=1, you have downloaded A.js, but still don't have B.js. User indicates he needs B.js's services, so the script marks B.js as needed.
22:29
<Hixie_>
rniwa: now how do you ensure that A.js doesn't run until B.js is needed, but does run before B.js is downloaded, since B.js is being slow?
22:29
<gavin>
TabAtkins: should be pacific time?
22:30
<Hixie_>
rniwa: if you're parsing <script src="a.js" async></script>ZZZ<script src="b.js" needs="a.js" async></script> and while parsing "ZZZ" you get a.js down and are ready to run it, how do you know _not_ to run it?
22:30
<rniwa>
<script src="A.js" prefetch></script><script src="B.js" needs="A.js" prefetch></script>
22:30
<TabAtkins>
gavin: Okay. Mind indicating that somewhere on the page?
22:30
<Hixie_>
rniwa: why won't that wait until B.js is ready to run?
22:30
<rniwa>
Hixie_: it will.
22:30
<gavin>
TabAtkins: I will try to remember. might wokr better if you email me :)
22:31
<rniwa>
Hixie_: i don't understand. if B.js is needed, then we need to have downloaded both A.js and B.js
22:31
<Hixie_>
rniwa: i don't want it to
22:31
<Hixie_>
rniwa: B.js might still be downloading.
22:31
<Hixie_>
rniwa: but if B is needed, then you generally want to execute A.js
22:31
<TabAtkins>
gavin: kk
22:32
<TabAtkins>
gavin: Dunno your email address.
22:33
<rniwa>
Hixie_: so are you saying that in your example for CMS plugin 1, when you call B.execute();
22:33
<rniwa>
Hixie_: B.js might be still downloading?
22:33
<Hixie_>
right
22:34
<rniwa>
I see. Thanks for the clarification.
22:35
<rniwa>
Hixie_: I have somewhat similar use case for U then.
22:36
<rniwa>
Hixie_: which is that sometimes you want to execute the script immediately only if it's available in the cache
22:36
<rniwa>
if not, then you want to delay it until more important assets such as images are loaded
22:36
<gavin>
TabAtkins: it's at the bottom of http://gavinsharp.com/
22:37
<zewt>
FWIW, my instinct for U was "it's not the job of a dependancy management system", and should either be added and discussed separately--it seems to bloat this discussion a bit
22:37
<Hixie_>
rniwa: if you have a new use case, please mail the list :-)
22:38
<rniwa>
Hixie_: can't U be addressed by looking for load event on each script?
22:38
<rniwa>
Hixie_: or maybe by exposing readyState?
22:39
<rniwa>
Hixie_: i'm inclined to ditch the use case U for those alternatives...
22:39
<rniwa>
but I guess it'll be nice to address that declaratively as well.
22:40
<Hixie_>
well like i said earlier, if it's something we don't want to address, that's a different argument
23:36
<MikeSmith>
heads up: starting at 18:30 UTC, the W3C Systems Team
23:36
<MikeSmith>
will upgrade Bugzilla to the latest version 4.4. This process is
23:36
<MikeSmith>
expected to take less than an hour. While the upgrade is underway, it
23:36
<MikeSmith>
will not be possible to view or update bugs."
23:36
<MikeSmith>
Thursday, 5 September
23:44
<gsnedders>
jgraham: Yeah, indeed. GitHub sucks. We need shared work branches (guess we could just use some on the w3c org repo).
23:44
<gsnedders>
jgraham: (Though I couldn't push to them, AFAIK)
23:46
<MikeSmith>
what's a shared work branch?
23:46
<MikeSmith>
or what's different about it than a normal remote branch?
23:47
<gsnedders>
MikeSmith: Well, multiple committers