03:38
<roc>
did I kill off the "hit-testing and retained graphics" thread?
03:41
<MikeSmith>
roc: maybe everybody's just regrouping
03:41
<roc>
chilling
03:41
<MikeSmith>
I guess I'm paying more attention to the webrtc thread right now
04:05
<Hixie>
roc: how did you kill it?
04:06
<roc>
I dunno
04:06
<roc>
by posting technical content?
04:06
<roc>
but I wasn't the first to do that
04:06
<roc>
lucky shot, I guess
06:10
<sephr>
this really feels like something that is best handled by CSP
06:11
<roc>
the problem is legacy browsers that don't understand CSP
06:11
<othermaciej>
sephr: text/html-sandboxed is meant to fail to load at all in browsers that don't support sandboxed iframes
06:11
<othermaciej>
CSP does not have that feature - CSP is ignored by browsers that don't support it
06:12
<sephr>
othermaciej: that doesn't answer my question though about how I sandbox an image/svg+xml game
06:12
<othermaciej>
sephr: well I could say two things
06:12
<othermaciej>
1) the fact that this solution doesn't work for SVG doesn't mean that it's ok to instead adopt a solution that doesn't work for HTML either
06:12
<sephr>
though I get what you mean about CSP silently degrading
06:13
<othermaciej>
2) you can embed SVG in HTML now in browers with HTML5 parsers
06:13
<roc>
in fact serving your SVG game as text/html might just work
06:13
<sephr>
if the goal is to make it so that content doesn't load at all in browsers that don't support it, then an application/sandbox media type is more appropriate
06:13
<othermaciej>
market share of brewer versions that support image/svg+xml but not SVG in text/html is going to be pretty low soon
06:13
<sephr>
with 2 parameters: params and type
06:14
<LoneStar99>
Hixie: one last question, what if I want to crop everything but a swiggly line?
06:14
<sephr>
so Content-Type: application/sandbox; type="image/svg+xml" params="sandbox parameters here"
06:14
<LoneStar99>
sorry clip
06:14
<sephr>
Hixie: what do you think about that example?
06:14
<othermaciej>
putting the sandbox parameters in an HTTP header instead of in the embedding markup defeats the purpose of sandboxing
06:14
<sephr>
ok then just drop the params parameter
06:15
<sephr>
just application/sandbox;type="normal MIME here"
06:15
<othermaciej>
using another content type type as a parameter to a generic type is possible, but makes MIME type parsing and dispatch a bit more complicated than browsers
06:15
<sephr>
?
06:15
<othermaciej>
so I would have to ask, what are the use cases?
06:15
<sephr>
;type="" is completely compliant MIME
06:16
<sephr>
just like many video container formats have a codecs= MIME parameter
06:16
<sephr>
the use cases are user generated content that isn't HTML
06:16
<sephr>
that you want to sandbox
06:16
<othermaciej>
sure, it's fine to have a MIME parameter, it's just that browsers don't normally look at MIME parameters just to decide if content is something they know how to render, if it should form an HTML document or an SVG document, etc
06:16
<othermaciej>
so you are making things a little more complicated
06:16
<othermaciej>
so you have to explain the benefit
06:16
<othermaciej>
give a concrete use case
06:16
<othermaciej>
SVG-based game is already handled by serving SVG in text/html
06:16
<sephr>
what are you talking about? browsers have to specially support text/html-sandboxed too
06:17
<sephr>
also svg can't be served as HTML
06:17
<sephr>
HTML5 can have svg elements in it though
06:17
<othermaciej>
yep, and it is just one thing to add to a list of constants, not a new parsing rule for MIME types
06:17
<sephr>
othermaciej: the charset parameter is used all the time in every website you visit
06:17
<othermaciej>
using HTML5, any SVG content you want can be wrapped in HTML
06:17
<sephr>
text/html;charset=...
06:17
<sephr>
no
06:17
<othermaciej>
the charset parameter is processed at a totally different level than deciding whether it is a supported element
06:18
<sephr>
if I write an SVG document and expect the document to behave as an XML document as it should, it may break in text/html
06:18
<annevk>
we could maybe add application/xml-sandboxed at one point
06:18
<othermaciej>
show me some real SVG content that someone may want to sandbox, but can't be wrapped in enough HTML to serve as text.html
06:18
<annevk>
but it is not clear that it would be that useful
06:18
<Hixie>
sephr: i don't see that there's anything to solve. all the content one may want to sandbox can be sandboxed with the existing type.
06:18
<othermaciej>
but yes, what anne says is true, just adding one type for XML is simpler
06:18
<roc>
annevk: we could. if t's useful
06:18
<Hixie>
sephr: you just make a squiggly shape and clip() that
06:18
<othermaciej>
for most types, making them a subtype of an application/sandboxed the would not be meaningful
06:18
<sephr>
Hixie: myCircle.localName === "circle" ?
06:18
<sephr>
nope, it'll === "CIRCLE"
06:18
<annevk>
yeah, the whole +xml thing was a mistake
06:19
<othermaciej>
and for XML types, using the more specific type is totally unimportant
06:19
<sephr>
which will break my hypothetical SVG document
06:19
<annevk>
no it will be "circle"
06:19
<sephr>
document.createProcessingInstruction() will also instantly break it
06:19
<sephr>
because HTML doesn't support processing instructions
06:19
<sephr>
and an error will be thrown
06:19
<othermaciej>
you are wrong, localName will be "circle"
06:19
<annevk>
lol
06:19
<sephr>
s/local/node/
06:19
<annevk>
who uses processing instructions?
06:20
<sephr>
some guy who wants to?
06:20
<othermaciej>
show me some real sag content that dynamically creates a processing instruction node
06:20
<othermaciej>
*svg
06:20
<othermaciej>
anywhere on the web
06:20
<othermaciej>
then we can talk
06:20
<sephr>
that's not the point
06:20
<sephr>
people will be writing more svg content now that IE supports it
06:20
<sephr>
in the future someone might want to use a processing instruction
06:20
<othermaciej>
you'll find that most people here are interested in solving real problems, not hypothetical problems
06:21
<othermaciej>
I can't even think of a remotely good reason to dynamically create a processing instruction node
06:21
<sephr>
ok here's a better example: user generated content that uses custom XML with XSLT
06:22
<sephr>
that requires an XML document context
06:22
<othermaciej>
that is a little more plausible, but the intersection of content that does that, and content you want to sandbox, seems pretty small
06:22
<roc>
and needs to be sandboxed ...
06:22
<roc>
can you point to such an example?
06:22
<sephr>
othermaciej: XSLT processing instructions
06:22
Hixie
bows out of the conversation
06:22
<sephr>
the world of warcraft site used to do tht
06:22
<sephr>
that*
06:22
<sephr>
that being using XSLT
06:22
<sephr>
that's a pretty large site
06:23
<sephr>
also I know a few sites that use it
06:23
<othermaciej>
and does anyone have a use case for loading the world of warcraft site in a sandboxed iframe?
06:23
<sephr>
you don't get it
06:23
<sephr>
what if the world of warcraft site wants to allow user submissions
06:23
<sephr>
of minigames or whatever
06:23
<othermaciej>
user submissions that themselves use XSLT?
06:23
<roc>
minigames that use XSLT?
06:23
<sephr>
and they want to make some official minigames
06:24
<sephr>
they won't be able to use what they usually use
06:24
<sephr>
just because they can't sandbox XML
06:24
<othermaciej>
I don't think I've ever seen a Web-based game that used XSLT
06:24
<roc>
I don't think Blizzard's Web developers would have difficulty NOT using XSLT
06:24
<sephr>
and that invalidates my point somehow?
06:25
<sephr>
that's like publishing this in the spec: image/svg+xml is now to be banned from interacting with HTML5 documents
06:25
<sephr>
you may no longer use X Y or Z
06:25
<othermaciej>
well, roc and I both have some responsibility for how the engineering time of particular browser vendors is spent
06:25
<annevk>
that's nonsense
06:25
<roc>
find us a Web developer who wants to build a site with sandboxed user submissions, and a user who wants to submit something that uses XSLT
06:25
<sephr>
yes most people don't use X Y or Z
06:25
<sephr>
so of course it won't matter to you
06:26
<othermaciej>
I at least am usually interested in Safari engineers spending time on things that Web developers *actually* want to do
06:26
<othermaciej>
as opposed to some theoretical thing that you could imagine someone could conceivably do
06:26
<othermaciej>
we have our hands full just meeting the real requests for functionality
06:26
<sephr>
How can I provide current examples of stuff that isn't going to happen *until* you can sandbox SVG?
06:26
<sephr>
for example
06:26
<roc>
just find real developers and users who want to do it on real sites
06:27
<roc>
but currently can't
06:27
<othermaciej>
just provide an example of SVG that in theory could be usefully sandboxed, but can't be served as text/html
06:27
<sephr>
there are no sites that accept SVG submissions because you can't sandbox it
06:27
<othermaciej>
or Web developers who wish they could do it but can't
06:27
<annevk>
they could host it on separate domains at the moment
06:27
<annevk>
which is how we found out about the need for sandboxed HTML
06:28
<othermaciej>
maybe you even have a first-person case of some SVG that you wish you could put in a sandboxed iframe, but alas, it uses something that can't be done in the text/html syntax
06:28
<sephr>
othermaciej: <svg xmlns="http://www.w3.org/2000/svg"><script type="application/ecmascript">if(!document.xmlVersion){throw 'nope'}/*app here*/</script></svg>
06:28
<sephr>
that XML game right there won't work in text/html for example
06:28
<sephr>
shortest example possible though of course
06:28
<othermaciej>
that doesn't look like a very fun game
06:29
<othermaciej>
the idea here is to find real-world examples that show the potential benefits
06:29
<sephr>
since when it is whatwg's choice to decide whether or not I can use xml or not though?
06:29
<annevk>
xmlVersion is going away so that wouldn't work anyway
06:29
<othermaciej>
not make up fake examples that are created solely to prove your point
06:29
<sephr>
annevk: cite please
06:29
<annevk>
and actually, if it didn't go away it would be on all documents
06:29
<sephr>
I use that for detecting if a context is xml
06:29
<annevk>
sephr, http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html
06:29
<othermaciej>
ultimately you are not just asking the whatwg, you are asking browser vendors to implement something
06:30
<sephr>
how will I detect if a document is xml now without testing node case?
06:30
<sephr>
also I still see xmlVersion on http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html
06:30
<othermaciej>
it would be nice if the html-ness vs xml-ness of a document was exposed, but I don't think there is any good clean API for it
06:30
<sephr>
othermaciej: there is: it's !!document.xmlVersion
06:31
<sephr>
it's null in HTML
06:31
<sephr>
1.X in XML documents
06:31
<annevk>
sephr, it is in the section of removed features
06:32
<b0o-supermario>
Hi
06:32
<othermaciej>
I suppose that is less indirect than other ways
06:33
<sephr>
annevk: I don't see a removed features list
06:34
<sephr>
s/list/section/
06:34
<Hixie>
sephr: it's easier to make that example work in text/html-sandboxed than it is for us to introduce a way to do this in xml
06:34
<annevk>
sephr, euh... search for "Historical"
06:35
<sephr>
ok thanks
06:35
<sephr>
Hixie: so there will never be application/xml-sandboxed just because it's unpopular?
06:35
<Hixie>
sephr: no, that's not what i'm saying
06:35
<sephr>
ok
06:35
<Hixie>
sephr: we try to do things in the order that they are important
06:35
<Hixie>
sephr: we first address the things that are most problematic
06:36
<Hixie>
sephr: and we walk down this list
06:36
<Hixie>
sephr: it's possible that in 198 years, we'll be so far down this list that sandboxing svg sent as xml will be the highest priority
06:36
<Hixie>
sephr: but currently, evidence suggests that it's not a high priority
06:36
<Hixie>
sephr: so we can't afford to care
06:37
<sephr>
though your list should also weighed by how easy something is to do
06:37
<othermaciej>
easy to spec, or easy to implement?
06:37
<sephr>
looking at the text/html-sandboxed documentation it looks like it'd be a simple copy and replace
06:37
<sephr>
I mean copy and paste
06:38
<othermaciej>
of spec text or code?
06:38
<sephr>
spec text
06:38
<sephr>
no major changes
06:39
<othermaciej>
since implementation is orders of magnitude more costly than writing the spec text for even the most trivial of features, it seems a bit silly to weight by how easy it is to spec something
06:39
<othermaciej>
furthermore, for anything security-sensitive, if it is really easy to spec *or* to code, you're probably doing it wrong
06:40
<sephr>
the less complex security spec text is the safer
06:40
<sephr>
just because code isn't complex doesn't mean it's more likely to be insecure
06:40
<othermaciej>
indeed, and it takes a lot of time to minimize complexity and to make sure what is left is sound
08:43
<hsivonen>
Hixie: speaking of work licensing, on surface, it seems to me that the work licensing vocab is something you might want to use in addition to another vocab
08:43
<hsivonen>
how do you do that with Microdata
08:43
<hsivonen>
(the other vocabs saying something non-copyright-related about the same images or something)
08:44
<Hixie>
just have two items
08:49
<hsivonen>
Hixie: can you have two overlapping items so that the <img> belongs to both?
08:50
<Hixie>
there are ways, but not ways i would recommend
09:06
<hsivonen>
Hixie: isn't that a bug then? or YAGNI?
09:07
<Hixie>
hsivonen: none of the use cases that people brought up needed it
09:08
<hsivonen>
Hixie: ok
09:08
<Hixie>
hsivonen: if there are concrete use cases that need it, maybe we can revisit that
09:15
<jps>
so, how is microphone audio upload doing?
09:20
<Hixie>
jps: you mean <input type=file accept=audio/*> ?
09:20
<Hixie>
jps: or streaming microphone upload?
09:20
<jps>
both?
09:20
<Hixie>
well they're both in the spec and slowly getting implemented
09:21
<Hixie>
dunno about specifics
09:21
<Hixie>
try it :-)
09:22
<jps>
is there a version of the spec with the annotations saying which parts have been implemented?
09:22
<annevk>
whatwg.org/C
09:22
<annevk>
but not everything is annotated correctly
09:23
<annevk>
Hixie, btw, I'm in favor of going back to one spec
09:23
<jps>
http://www.whatwg.org/specs/web-apps/current-work/multipage/number-state.html#file-upload-state has annotations dated 2009
09:23
<Hixie>
annevk: yeah, i might do that and set up redirects and stuff
09:23
<Hixie>
annevk: trying to catch up a bit on feedback first
09:24
<annevk>
Hixie, also, how easy would it be to host other specs on whatwg.org/specs/ ?
09:24
<annevk>
Hixie, like DOM Range and such
09:25
<annevk>
Hixie, and maybe even DOM Core / XHR for better copyright conditions
09:25
<Hixie>
should be possible to figure something out
09:25
<Hixie>
either in .../specs/ or on separate subdomains
09:25
<Hixie>
(subdomains are easier to set up, but subdirectories should be possible too)
09:25
<Hixie>
not right now though, it's way past my bed time
09:26
<Hixie>
catch me online tomorrow and let's figure something out
09:27
<annevk>
no rush
09:27
<annevk>
and good night
09:27
<Hixie>
k
09:27
<Hixie>
nn
09:27
<jps>
is http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#the-audio-element for microphone streaming? I'm having trouble finding that part
09:27
<annevk>
getUserMedia is
09:28
<jps>
thanks
18:55
<TabAtkins>
Google will do that for you now.
18:55
<timeless>
something to show what the greatest distance you could be from a major city
18:55
<timeless>
TabAtkins: i tried, and it isn't working
18:55
<manu-db>
hsivonen: seems hacky to me - think about it a bit more and let me know if you still think we should be adding attributes for vocabulary terms.
18:56
<hsivonen>
manu-db: I expect it to be common that some people want subitems to be just strings while others want them to be deeper objects
18:56
<hsivonen>
it would be nice to have flattening deeper object to a title into a string
18:56
<hsivonen>
manu-db: suppose you have the concept for an album
18:56
<hsivonen>
manu-db: for some cases, you may want tracks to be just track names
18:57
<cygri>
hsivonen +1
18:57
<TabAtkins>
@itemalt
18:57
<hsivonen>
manu-db: in other cases, you may want tracks themselves to have properties
18:57
<hsivonen>
manu-db: of you may have a list of people be just names or objects with more properties
18:57
<cygri>
rdf was supposed to have that at some point, but they couldn't agree on how to do it properly, and it ended up as the underspecified rdf:value property that no one uses
18:57
<TabAtkins>
(But really, the "I want something to both be a string and have more properties" thing is commonly useful.
18:58
<manu-db>
cygri, hsivonen, TabAtkins: I agree - but that's what we use rdfs:label for - and really, this is application layer stuff.
18:58
<manu-db>
it seems to conflate pushing application logic down into the data model.
18:59
<TabAtkins>
manu-db: Really? I mean, this pattern is useful for things like the CSSOM.
18:59
<hsivonen>
manu-db: if we had a framework-level way to have a name for things, we could have both forward compat (people find they want to expand a value from string to a subitem later) and a way to generate simpler views generically
18:59
<Philip`>
http://www.wolframalpha.com/input/?i=paris+to+london is nice for finding distances between places
18:59
<manu-db>
I'm not saying it isn't useful - just that that sort of stuff is better handled at the application layer "What string should I use to display this item on a page"
18:59
<cygri>
manu-db, to some extent, *everything* is better handled at the application layer
19:00
<manu-db>
TabAtkins: I know nothing of CSSOM from a spec point of view - so I can't intelligently discuss it.
19:00
<cygri>
manu-db, it's just that some things happen to be needed so often, so why not generlize it. type being the prime example
19:00
<hsivonen>
timeless: was "help" about city distances?
19:00
<timeless>
yeah
19:00
<hsivonen>
timeless: I don't have a better suggestion than Philip`
19:00
<AryehGregor>
manu-db, he's saying that for <span style="color: red">, it's useful to have span.style.color == "red", but also have properties like span.style.color.asHex == "#ffffff" or something.
19:00
<AryehGregor>
(not sure what the exact proposed syntax is)
19:01
<timeless>
hsivonen / Philip` : the problem is that i don't want to find the distance from any city to any other city
19:01
<timeless>
i want a limit on distances between cities :)
19:01
<timeless>
> most of Europe is pretty close to most of the rest of Europe. You probably can't find a point which is >125miles from a major city in continental Europe (this is based on eyeballing France). For the Nordic countries, on a per country basis, and picking an unreasonable definition of a city, that limit is probably closer to 300miles.
19:01
<Ms2ger>
Well, more intersting would be style.color.red
19:01
<manu-db>
AryehGregor: oh - thanks, that helps clarify. Still having a hard time figuring out what the use case for this is...
19:01
<timeless>
does the above statement sound reasonable?
19:01
<AryehGregor>
Ms2ger, . . . what would that do?
19:01
<TabAtkins>
manu-db: Short version is, the CSSOM would like to both expose a property's value as a string (what you inputted) and as a complex object that can be manipulated more easily.
19:01
<Ms2ger>
Give you an int
19:02
<manu-db>
TabAtkins: But that's what Projections do in the RDFa API.
19:02
<Ms2ger>
Like, style.color.red/2
19:02
<Ms2ger>
Like, style.color.red/=2, that is
19:02
<hsivonen>
timeless: does any country have a "reasonable" definition for a "city" anymore?
19:02
<timeless>
hsivonen: doubtful
19:02
<Philip`>
timeless: Presumably restricted to points which are in the country and are not in the sea? :-)
19:02
<hsivonen>
are cities in Britain still defined in terms of bishops?
19:02
<manu-db>
var tab = document.data.getProjection("#tab", projectionTemplate);
19:02
<manu-db>
tab.name === "Tab Atkins Jr."
19:02
<manu-db>
something like that?
19:03
<timeless>
hsivonen: the context is someone claims that European countries allowed the "free market" to provide "internet access"
19:03
<AryehGregor>
Ms2ger, okay, so what would *that* do?
19:03
<Philip`>
hsivonen: http://www.bbc.co.uk/news/magazine-13841482 - "The definition of a city in the UK is a place which has been granted city status by the monarch."
19:03
<timeless>
and got it for everyone without government regulation
19:03
<timeless>
Philip`: nice
19:03
<TabAtkins>
AryehGregor: That would cut the red component of the color in half.
19:03
<AryehGregor>
Philip`, laws are also only approved by the monarch, officially.
19:03
<timeless>
and yeah, iirc there are 2 cities which don't have a bishop
19:03
<hsivonen>
(surprisingly, defining it in terms of bishops is much better than defining it in terms of "you get the call yourself a city if you can bear the laughter of the neighboring village")
19:03
<AryehGregor>
TabAtkins, oh, I see, yeah.
19:03
<AryehGregor>
That's useful.
19:04
<TabAtkins>
manu-db: Where are projections defined?
19:04
<hsivonen>
Philip`: does that correlate with Anglican dioceses?
19:05
<hsivonen>
Philip`: reading the article, it seems it doesn't anymore
19:05
<manu-db>
TabAtkins: http://www.w3.org/TR/2011/WD-rdfa-api-20110419/#advanced-concepts
19:05
<TabAtkins>
Ah, I was looking in rdfa-api
19:05
<manu-db>
not that we're still re-working through the interfaces heavily
19:05
<TabAtkins>
I mean, rdfa-syntax
19:05
<manu-db>
most everything is going to change in that doc
19:05
<manu-db>
but the basic premise is there.
19:06
<Philip`>
hsivonen: Doesn't seem to, and http://en.wikipedia.org/wiki/City_status_in_the_United_Kingdom says "In the twentieth century, it was explicitly recognised that the status of city in England and Wales would no longer be bound to the presence of a cathedral, and grants made since have been awarded to communities on a variety of criteria, including population size."
19:06
<manu-db>
we're also working through these concepts with JSON for Linked Data (JSON-LD): http://json-ld.org/playground/
19:06
<hsivonen>
timeless: uh, the availability of Internet access in Europe *is* based on govt. regulation
19:06
<manu-db>
The whole concept of taking a graph (which sucks to work with directly) and converting it into a nice JSON object.
19:06
<timeless>
hsivonen: yeah...
19:06
<Philip`>
Cambridge is a city but doesn't have a cathedral and doesn't have much population either (apparently 100K, of which a quarter are students)
19:10
<hsivonen>
manu-db: for JSON, this would mean that someone defines a property to be string-valued first and then you find you need it to be an object. if you haven't defined processor behavior forward-compatibly so that you get to replace a string with an object with a special key in it, you are in trouble
19:10
<TabAtkins>
(That's precisely the problem the CSSOM has, btw.)
19:11
<manu-db>
hsivonen: are you talking about getProjection(), JSON-LD, or something else, Henri (sorry, involved in slightly different conversations w/ different folks on here)
19:11
<annevk>
What is that, TabAtkins?
19:12
<hsivonen>
manu-db: I'm talking about JSON in general. dunno if JSON-LD has solved this
19:12
<TabAtkins>
annevk: That we started with a string-based API, and then want to change to an object-based one. We can't do an easy upgrade, so we have to instead invent a new access method for the latter api.
19:12
<annevk>
ah yeah
19:12
<hsivonen>
I guess I should read up on JSON-LD before talking about problems that may already be solved
19:13
<annevk>
CSSOM is ugly
19:13
<hsivonen>
(though not solved for microdata and RDFa, AFAICT)
19:13
<Ms2ger>
s/cssom/the web/
19:14
<manu-db>
hsivonen: Could you write out the problem in code... or interpretive dance? (your choice)
19:14
<Philip`>
timeless: Maybe you could use OpenStreetMap's data, then extract places with a sufficiently large population (I have no idea if they provide that data reliably), then just do something like a Voronoi diagram and find the largest cell
19:14
<Philip`>
timeless: Or you could just pluck a number out of nowhere and claim it forcefully and assume nobody is going to check
19:15
<Ms2ger>
That would be the "HTMLWG approach"?
19:15
<manu-db>
Is the problem this: in 2011, my code does this to access an object describing you: if(henri.name instanceof String) { DO_SOMETHING };
19:16
<erlehmann>
manu-db, is there some kind of json pastebin with an API that works cross origin?
19:16
<manu-db>
then in 2012, that code fails because henri.name instanceof Object == true ?
19:16
<erlehmann>
i have a “linked data” project regarding kissology.
19:16
<TabAtkins>
manu-db: Basically, yes.
19:16
<erlehmann>
(no joke.)
19:16
<TabAtkins>
manu-db: And that sounds perfectly reasonable, as "name" may start as a string, then get broken into first/last/etc
19:17
<manu-db>
erlehmann: I don't understand the question - are you asking: "Can I just dump in a URL in the input field and get output?"
19:17
<Philip`>
Strings are objects - can't you just stick more properties (or getters) onto them, and not care about anyone using the APIs in Java?
19:17
<TabAtkins>
Philip`: Apparently augmenting DOMStrings wasn't acceptable for the CSSOM. Anne would know more.
19:17
<erlehmann>
manu-db, some kind of semi-permanent archive for json data, accessible via script.
19:17
<Philip`>
It would be admittedly quite evil
19:18
<Philip`>
and highly surprising to developers
19:18
<AryehGregor>
Wouldn't it mean typeof foo == "object" instead of "string"?
19:18
<TabAtkins>
Yes.
19:18
<AryehGregor>
Or else you'd have a string that's magical.
19:19
<TabAtkins>
It'd be an object with a special toString, I guess.
19:19
<AryehGregor>
That might work for compat, or so you'd think.
19:19
<hsivonen>
manu-db: at time t_0 I write code that assumes that tracks in an album are strings. At time t_1, someone decides that all tracks become objects that have properties for performers, etc. I want my code to keep working with data that is published with performers so that my code just gets the track title for each track and ignores the performers
19:19
<manu-db>
erlehmann: There is nothing that I know of that fits that description, sorry. Are you looking for some large repository of JSON data?
19:19
<TabAtkins>
Again, you'd have to ask annevk why that wasn't workable for the cssom
19:19
<hsivonen>
manu-db: so at t_0, I need to know what the "must ignore" forward compat rules are
19:20
<erlehmann>
manu-db, no. doesn't matter in the end, i have written my own script for that task. forget about it.
19:20
<annevk>
TC39 did not like magic strings
19:20
<annevk>
and changing typeof to object would cause too much breakage
19:20
timeless
sighs
19:20
<hsivonen>
does WebKit still have magic strings?
19:20
<TabAtkins>
re hsivonen's case, strings are probably priviledged here in being something that's very likely to be expanded into a complex object in the future, much more so than other datatypes.
19:21
<TabAtkins>
I guess we can't just subclass DOMString to CSSOMPropertyValue or something.
19:21
<manu-db>
hsivonen: So, strictly speaking, in the JSON-LD framing case (which may find its way back into RDFa Projections) - you can specify that you want the value to be a string as a matching rule. That is, you can say: "Make sure that this value is a string, or set the value to 'null'"
19:22
<manu-db>
hsivonen: So, you are somewhat protected against objects that declare objects for a certain property instead of a string.
19:23
<TabAtkins>
manu-db: Only if you explicitly, every time you query for a string property, specify that you want it as a string. :/
19:23
<hsivonen>
manu-db: I don't want to fall back to null. I want to fall back onto what's most like the name of the object
19:23
<manu-db>
but that's kind of annoying because your application won't work with half of the data out there... it's a messy problem. You either fix it in the application layer, or you restrict the application layer to only work with a subset of the data that you deem appropriate. This is our current thinking on the matter, which could change wildly based on implementation feedback/guidance.
19:24
<hsivonen>
manu-db: this is totally an armchair comment--not based in impl. experience :-)
19:24
<hsivonen>
(my comment is an armchair one that is)
19:24
<manu-db>
TabAtkins, hsivonen: Again, this seems like an application layer thing. Different applications require different things to be used when serialized to their "string forms"
19:24
<manu-db>
I agree that it would be nice if everyone could decide on the string to use to refer to an object.
19:25
hsivonen
's current chair has neither armrests nor a backrest, though
19:25
<manu-db>
but data is dirty - very difficult for people in the same industry to even agree what an object should be serialized to in string form.
19:25
<TabAtkins>
manu-db: Actually, this now sounds like a reasonably common case, now that I'm thinking of it. Upgrading a string to an object happens reasonably often in the real world, and having an easy way to specify on the data level what the legacy string form of something is seems potentially useful.
19:27
TabAtkins
will propose something for Microdata about it.
19:27
<manu-db>
TabAtkins, hsivonen: I don't disagree - just trying to figure out how to make that happen in a generic way. We'd probably implement in JSON-LD and may backport to RDFa Projections. The goal of both of those is to take messy graph data and present it to a Web Developer in a way that is just a simple JSON object.
19:29
<hsivonen>
for a JSON-based thing that has no legacy yet (dunno if JSON-LD fits that criterion), one could reserve the object key "name" for the purpose and decree that all objects that used to be just string have to call the property that's closest to the legacy string 'name'
19:30
<hsivonen>
hmm. that's grammatically ambiguous English, because English doesn't allow me to use commas to mark the scope of "that"
19:30
<manu-db>
hsivonen: That would be fairly easy to do in JSON-LD.
19:30
<TabAtkins>
hsivonen: Context resolves all three "that"s for me.
19:31
<manu-db>
TabAtkins, hsivonen: For an example of what framing looks like in JSON-LD, go here: http://json-ld.org/playground/ and then click on the "Library" example. Then click between the "Normalized" and "Framed" tabs.
19:32
<TabAtkins>
manu-db: Ah yeah, that's very amenable to solving this problem (if it's determined to be worthwhile to solve.)
19:32
<manu-db>
(or the TURTLE and Framed tabs)
19:32
<TabAtkins>
Ah, yeah, Turtle's a lot easier to read than "Normalized". ^_^
19:32
<hsivonen>
I'd expect books to collapse to their dc:title
19:33
manu-db
nods - normalized is just there for digital signatures in PaySwarm: http://payswarm.com/
19:33
<hsivonen>
manu-db: shades of XML Canonicalization and Signature, eh?
19:34
manu-db
grins.
19:34
<manu-db>
We hope this mechanism sucks less.
19:34
<manu-db>
Solving this problem was actually worse than XML Canonicalization and Signature... because you have to deterministically normalize a graph, which can have cycles.
19:35
<manu-db>
I don't think they had to deal with that problem in XML Canonicalization (but I could be entirely mistaken)
19:35
<hsivonen>
at least XML Canonicalization was tricky enough that they had to try again with Exclusive Canonicalization...
19:36
<manu-db>
We've discovered that all of the degenerate cases for graph normalization have to do with graphs that are completely useless in the real world (which is good)
19:37
<manu-db>
but it still opens up the possibility of poisoned messages (for digital signatures) that cause the solution to stray into NP territory (which can be detected and killed)
19:38
<manu-db>
in other words - we think the normalization algorithm we have for JSON-LD will work for useful graphs as well as useless graphs where the number of unlabeled nodes without any properties stay below a developer-defined threshold.
19:39
<manu-db>
and the entire processor can be implemented in less than 1000 lines of Python.
19:42
manu-db
grins - it never fails - discussing graph normalization algorithms kills the conversation. Every time. :P
19:42
<TabAtkins>
I'm writing an email!
19:43
manu-db
nice try, Tab.
19:43
<jamesr>
he's normalizing his graph, amirite?!
19:43
<Ms2ger>
So, is svg:script supposed to work in text/html in Chrome?
19:43
<TabAtkins>
I normalized your mom's graph. No node left blank.
19:46
<manu-db>
oooh!
19:50
<hsivonen>
Ms2ger: it would be rather shocking if it didn't
19:51
<Ms2ger>
That's what I thought
19:56
<AryehGregor>
Could someone explain to me why Aurora 7.0a2 refuses to install Firebug even though I have extensions.checkCompatibility.7.0a2 set to false in about:config?
19:56
<AryehGregor>
Better, could someone explain why there's no extensions.checkCompatibility.aurora or something?
19:56
<AryehGregor>
Aurora is not really usable for testing if extensions break every time you upgrade.
19:56
<jcranmer>
there is now
19:56
<Ms2ger>
There is?
19:56
<jcranmer>
checkCompatibility.<version> doesn't work for nightly/aurora (maybe beta?)
19:57
<AryehGregor>
Apparently not.
19:57
<AryehGregor>
So what should I use instead?
19:57
AryehGregor
searches Bugzilla
19:57
<timeless>
extensions.checkCompatibility.nightly
19:58
<timeless>
is what i use
19:58
<timeless>
you could just install Add-on Compat thingy
19:58
<AryehGregor>
That works for Aurora?
19:58
<timeless>
no :) you should suffer w/ nightly like everyone else :)
20:00
<AryehGregor>
How stable is nightly in practice?
20:00
<timeless>
i don't have it crash
20:00
<timeless>
but it's unstable in that it pesters me to update every day
20:00
<timeless>
typically twice each day i pay attn
20:00
<Ms2ger>
I only have it crash when I break it myself
20:01
<timeless>
yeah, i only have it die if i terminate the process because i want to save my session and restart my computer
20:01
<timeless>
or if i want to quit it because the *stupid* flash updater demands it not be running in order to update flash
20:02
<AryehGregor>
Oh, I think the right magic incantation is extensions.checkCompatibility.7.0a, not a2.
20:02
<AryehGregor>
Sigh.
20:02
<timeless>
yeah, that's likely
20:02
<AryehGregor>
Well, the add-on compat extension seems to work so far, so it's all good.
20:02
<timeless>
i have:
20:02
<timeless>
extensions.checkCompatibility.7.0
20:02
<timeless>
extensions.checkCompatibility.7.0a
20:02
<timeless>
extensions.checkCompatibility.8.0
20:02
<timeless>
extensions.checkCompatibility.8.0a
20:02
<timeless>
extensions.checkCompatibility.nightly
20:02
<AryehGregor>
Me too.
20:03
<timeless>
plus ones for 60a and older
20:03
<AryehGregor>
. . . no, Firebug is broken. SIGH.
20:03
<timeless>
try venkman?
20:04
<AryehGregor>
I'm currently looking for a JavaScript profiler.
20:04
<AryehGregor>
Because WebKit's is useless.
20:04
<timeless>
venkman has one..
20:04
AryehGregor
looks
20:04
<timeless>
don't ask me how to install it
20:05
<timeless>
https://addons.mozilla.org/en-US/firefox/addon/javascript-debugger/
20:05
<timeless>
in theory
20:06
<AryehGregor>
Seems to at least pretend to work.
20:09
<AryehGregor>
Okay, well Venkman apparently wants to save profiling data to a file instead of actually showing it to me.
20:09
<timeless>
save it as html and load it in your favorite web browser
20:10
<timeless>
or save it as csv and then use your favorite spreadsheet program to render your data :)
20:12
<AryehGregor>
Sigh.
20:12
<timeless>
was the data useful?
20:12
<AryehGregor>
It didn't seem worth the hassle.
20:12
<AryehGregor>
I could try again, since I can't get Firebug to work at all.
20:13
<timeless>
saving a file to disk is hard?
20:13
<timeless>
do you not have a working storage medium?
20:14
<AryehGregor>
I guess I'm spoiled, but I'm used to programs not asking me to take gratuitous extra steps like that these days.
20:14
<timeless>
iirc IE has a profiler
20:15
AryehGregor
looks
20:15
<timeless>
yeah, ie10 does
20:15
<timeless>
press f12
20:15
<timeless>
debug>f12 developer tools
20:15
<Philip`>
Do many JS profilers work without forcing JIT off and making the measurements useless?
20:15
<timeless>
profiler is one of the tabs
20:15
<timeless>
Philip`: dunno
20:15
<timeless>
it's technically possible to do useful performance counting w/ a jit
20:15
<timeless>
e.g. you could go w/ the dtrace model
20:16
<timeless>
which gecko supports
20:16
<timeless>
but i don't know if anyone was nice enough to add in dtrace support to jit generated code
20:16
<timeless>
(probably not)
20:18
<AryehGregor>
Philip`, the measurements wouldn't be useless if you're just looking for stuff like "Is there some function that's taking 40% of my runtime that I could trivially rewrite to cache results?" or such.
20:18
<AryehGregor>
Now IE10PP2 crashes when I go into developer tools.
20:18
<AryehGregor>
The world conspires against me.
20:18
<timeless>
lol
20:19
<timeless>
iirc ie10pp2 crashed on news.google.com [us edition] when i hovered over the picture preview things at the top of news
20:19
<timeless>
i think they were youtube content (fast flip was fine, and so is youtube.com)
20:19
<timeless>
anyway..
20:19
<Philip`>
Native hardware acceleration means it can crash faster than any other browser
20:20
<AryehGregor>
Okay, the Venkman data looks useful.
20:20
<AryehGregor>
Thanks for the tip, timeless.
20:20
<timeless>
:)
20:23
<AryehGregor>
The formatting is terrible, though.
20:24
<AryehGregor>
But it'll do.
20:34
<zewt->
AryehGregor: if it disables JIT and that causes a function to go from 1% to 40% of runtime, that's pretty useless
20:34
<AryehGregor>
zewt, sure.
20:37
<timeless>
AryehGregor: you can use the csv output and format it however you like :)
20:37
<AryehGregor>
timeless, that's what I wound up doing, but having it in the UI would be more handy.
20:37
<timeless>
i think the author assumed someone else would come in and give it some ui love
20:37
<timeless>
and no one did
20:38
<gsnedders>
I believe a lot of debuggers disable most optimization, at least
20:38
<timeless>
afaik, gecko today mostly disables everything when a debugger starts doing stuff
20:38
<timeless>
it isn't strictly required, but yeah, that's generally the first impl since it's easiest
20:38
<gsnedders>
Dragonfly entirely disables JIT (though we only have a type-specializing compiler, so to disable optimization we have to fall back to just the interpreter)
20:39
<timeless>
things get rather annoying when you have a jit that does inlining
20:40
<timeless>
since the person looking at the profiler wants to know which function they wrote is taking time
20:40
<timeless>
but w/o single stepping the optimized code and recognizing which function it came from
20:40
<timeless>
or worse, if two functions get optimized to be the same code and then are shared..
20:40
<zewt>
i'd rather know which optimized function, including inlined calls, is taking the time
20:41
<timeless>
in WPO, potentially that's "your-web-page"
20:41
<zewt>
generally it's fairly obvious, when a profiler is saying a function is taking a lot of time and all it does is call other functions, that it's actually the inlined functions taking the time
20:41
<timeless>
i'd imagine that wouldn't be particularly useful :)
20:41
<AryehGregor>
Okay, now the IE10PP2 profiler works.
20:41
<AryehGregor>
It clearly can't be disabling JIT, since it doesn't take much longer to run.
20:41
<timeless>
zewt: true
20:41
<AryehGregor>
And it produces useful results.
20:41
<AryehGregor>
WINNER: INTERNET EXPLORER.
20:41
<zewt>
... obvious to someone experienced and who understands things like inlining, of course, but novices probably shouldn't be trying to use a profiler anyway
20:41
<timeless>
AryehGregor: yeah, the ms tools teams generally produce the best results..
20:42
<timeless>
my guess is it's using performance counters
20:42
<AryehGregor>
That would be pretty logical.
20:42
<timeless>
but, if they're actually generating CLR stuff, then the hooks available are pretty extensive
20:42
<timeless>
i don't know what the output of their JIT is..
20:42
<AryehGregor>
WebKit's is garbage, AFAICT, its results make no sense. But at least it's easy to use and looks pretty.
20:43
<timeless>
lol
20:43
<gsnedders>
zewt: It's a lot easier to do profiling if you can accept inlined functions being misreported. Debugging gets fun when you have DCE and loop invariant code motion, for example.
20:43
<gsnedders>
timeless: They aren't doing CLR, it's all custom.
20:43
<AryehGregor>
Interestingly, the IE10 profiler tells me I'm spending the most time in parentNode. 2.5s.
20:43
<zewt>
sure, i've spent way too much time in gdb stepping through optimized C++ code, i know how much fun that is, heh
20:43
<gsnedders>
timeless: CLR people were involved in a consulting way, from what their experience was
20:43
<timeless>
gsnedders: good to know
20:44
<AryehGregor>
Wow, it gives me this great tree and everything.
20:44
<Ms2ger>
That man knows way too much
20:44
AryehGregor
<3 IE10
20:44
<gsnedders>
Ms2ger: me?
20:44
<jamesr>
AryehGregor: profiling JS? did you try chrome?
20:44
<gsnedders>
Ms2ger: Sorry, I've spent too much time around JS engines. :P
20:44
<Ms2ger>
I gathered that :)
20:45
<timeless>
AryehGregor: so i get points for 2 recommendations :)
20:45
<zewt>
(even more fun is insn stepping through code with no debug symbols, with the source code open in another window, trying to match up the source and assembly while stepping)
20:45
<Ms2ger>
timeless+=2
20:45
<gsnedders>
zewt: I mean, we could go for something confusing to most web developers when implementing it…
20:45
<timeless>
zewt: i've done that a lot
20:45
<timeless>
it's exciting
20:45
<gsnedders>
zewt: code with no debug symbols? Like generated code from a JITing compiler? :)
20:45
<zewt>
timeless: what makes it great is how gdb is so brittle--spend 15 minutes stepping through code to get where you want to be, then crash
20:45
<timeless>
gsnedders: typically taking an optimized release build of an open source product
20:45
<zewt>
= rage
20:46
<timeless>
zewt: yeah um...
20:46
<timeless>
i learned that i was *much* happier w/ any debugger other than gdb
20:46
<gsnedders>
timeless: JITing compilers is where I've dealt with it most
20:46
<gsnedders>
(Which was rather the point)
20:46
<timeless>
windbg/ntsd, adb, dbx, ...
20:46
<gsnedders>
Debugging JS execution bugs often ends up with fun like that. :)
20:46
<timeless>
you name it, if it wasn't gdb or a front end to gdb, i was *much* happier
20:46
<timeless>
since gdb is *incredibly* flaky
20:47
<zewt>
gdb is okay until you suspend and it decides it's just going to keep suspending forever
20:47
timeless
remembers that
20:47
<timeless>
its interrupt (ctrl-z/ctrl-c) handling is "interesting"
20:47
<timeless>
it also whines and has rather amusing failure handling
20:52
timeless
returns to 4.7. Platform objects implementing interfaces §
20:54
<AryehGregor>
Hixie, I don't see birthdate anywhere in Google+. Is it actually there?
20:55
<timeless>
AryehGregor: didn't you have this discussion yesterday?
20:55
<AryehGregor>
timeless, yes, but he responded after I left.
20:55
<AryehGregor>
Saying that it was there.
20:55
timeless
wonders if it's only present to the extent that it's required for COPA
20:57
AryehGregor
gives up on profiling, resolves to just suffer
20:57
<AryehGregor>
You'd think they'd still let you display it.
20:57
<timeless>
why?
20:58
<timeless>
who is they, and what are they thwarting?
20:58
<AryehGregor>
Google+. You'd think they'd let you because it's an obvious thing to want to display.
21:07
<erlehmann>
google+ is a lie.
21:08
<erlehmann>
it sends 404 as a catch-all error message.
21:08
<erlehmann>
great if you get a link from your friends and want to see if it is broken.
21:08
<erlehmann>
s/want/claim/ s/if/that/
21:08
<erlehmann>
sleepytiem, it seems
21:08
<erlehmann>
also, no feeds.