00:00
<Hixie>
mnot: not quite, but there has been discussion about whether to allow authors to say that images that aren't yet displayed should be deferred
00:00
<Hixie>
mnot: https://www.w3.org/Bugs/Public/show_bug.cgi?id=17842
00:00
<Hixie>
mnot: currently pending implementor interest
00:01
<zewt>
(usually you want to start loading when an image is "close" to being displayed, though, not when it's actually displayed--which makes that a bit harder, i suspect)
00:02
<mnot>
thx, that's helpful.
00:02
<mnot>
the interest I'm seeing is from web perf folks, esp. for mobile, looking at responsive design.
00:03
<mnot>
will comment on bug.
00:03
<zewt>
(at this point i flinch at the very word "responsive")
00:03
<mnot>
yes, yes. :)
00:03
<Hixie>
mnot: the only thing blocking the bug is implementor interest
00:03
<Hixie>
mnot: so commenting won't help :-)
00:03
<mnot>
ok
00:03
<Hixie>
mnot: what would help is advocacy to implementors
00:03
<mnot>
understood.
00:03
<zewt>
unless commenting might help convince implementors, if any implementors are watching the bug :)
00:04
<Hixie>
cc list only has two implementors on it, and they haven't commented
00:04
<mnot>
yup
00:06
<mnot>
unrelated question - on srcset, was using child elements instead of an attribute considered? Or does that bring up compatibility problems?
00:06
<zewt>
that was argued for a few hundred emails, i think :)
00:06
<Hixie>
mnot: it was definitely considered
00:06
<mnot>
ok - so I don't need to bring it up then :)
00:06
<zewt>
(hixie will answer for himself, but iirc it's simply "child attributes makes everything more complicated and isn't needed")
00:07
<Hixie>
solution with multiple elements are about a 1000 times more complicated than solutions with attributes
00:07
<Hixie>
<video> being a classic example of the disaster that results if you go down that road
00:07
<Hixie>
it has one of the most complicated algorithms in the spec because of this
00:07
<Hixie>
second only to <object>, probably
00:08
<mnot>
fair enough. I'm less concerned with syntactic sugar, more with making it extensible so that you can select images based on other things (e.g., format)
00:08
<zewt>
i don't think i've ever actually used <object>, heh
00:08
<zewt>
maybe once in the ie6 days for inlining video or something
00:09
<Hixie>
(http://w3cmemes.tumblr.com/post/22670112919)
00:09
<Hixie>
mnot: i think HTTP is supposed to be the way you select based on format :-)
00:11
<Hixie>
(http://w3cmemes.tumblr.com/post/34698886006)
00:12
<zewt>
now if only there was a way to have an <img> that didn't load anything, without having to hardcode a 1x1 gif in a data:
00:12
<zewt>
heh
00:12
<mnot>
hixie: http defines two ways to do it; having the client select the right one based upon metadata is one of them :)
00:12
<zewt>
(any less fugly ways to do that: welcome)
00:13
<mnot>
yeah, I need to talk ilya down from conneg-only; and he's not even a restafarian
00:13
<zewt>
not that pasting 80 or so bytes is onerous, just ... lame
00:14
<zewt>
heh, google has 26,700 hits for the empty gif data url i use
00:14
<Hixie>
TabAtkins: which compares earlier, <time datetime="11-12"> or <time datetime="11:12"> ? or should they be treated as a tie?
00:14
<Hixie>
zewt: didn't load anything? what's your use case?
00:15
<Hixie>
"img elements should not be used to display transparent images, as they rarely convey meaning and rarely add anything useful to the document"
00:15
<zewt>
templates, basically
00:15
<Hixie>
oh, if it's a template then it's not HTML
00:15
<zewt>
of course it is
00:15
<Hixie>
just use %IMAGEGOESHERE% or whatever
00:15
<zewt>
it's in my document and parsed normally and there's nothing not-html-like at all :)
00:16
<Hixie>
then how is it a template?
00:16
<Hixie>
i'm confused
00:16
<zewt>
it's not a text template, it's just a <div hidden> that i clone from the DOM and insert somewhere else
00:16
<Hixie>
ohhh
00:16
<Hixie>
yeah we don't support that
00:16
<zewt>
yes you do, i'm doing it :)
00:16
<Hixie>
<template> hopefully will solve that problem
00:16
<Hixie>
we don't support that in the sense that it violates your warranty
00:17
<Hixie>
it isn't something that is condoned
00:17
<Hixie>
a solution for your problem has not been attempted
00:17
<Hixie>
you have to do hacks to get it
00:17
<Hixie>
you know what i meant :-P
00:17
<zewt>
:P
00:18
<zewt>
regular images are loaded from templates, though, i hope?
00:18
<Hixie>
beats me, ask rafaelw__
00:21
<Hixie>
an i18n people around?
00:21
<zewt>
(depends on what you mean by i18n people :)
00:22
<Hixie>
if A sorts before B in language X, and B sorts before A in language Y, which comes first, A in language X, or B in language Y?
00:22
<zewt>
(i've done i18n work, for what it's worth)
00:22
<zewt>
never heard of cross-locale sorting
00:23
<zewt>
(if such a thing exists i'm curious to know what it is, as completely insane as it sounds, heh)
00:24
<Hixie>
<table> <thead> <tr> <th> FOO <tbody> <tr> <td lang=X> A <tr> <td lang=Y> B </table>
00:24
<Hixie>
sort that table
00:24
<zewt>
my intuition is sort based on the @lang of the <table>, and ignore the per-field languages
00:25
<Hixie>
fair enough
00:25
<zewt>
collation orders are for the whole set, not per-item, so the only way to use each items' would be to define some way to intersect sort orders, which i imagine wouldn't do anything anyone would expect
00:30
<TabAtkins>
Hixie: The first is a date and the second is a time, right?
00:30
<TabAtkins>
Compare them by the datetime they parse into.
00:30
<TabAtkins>
Or do they parse as just a date and just a time respectively?
00:30
<Hixie>
the latter
00:30
<Hixie>
i'm thinking treat them as equal
00:30
<TabAtkins>
Ah. In that case, they shouldn't be directly compared. Either make them equal, or define an ordering between the class of times and the class of dates.
00:31
<TabAtkins>
How do you compare dates versus datetimes?
00:31
<TabAtkins>
date sorts before a datetime with the same day?
00:31
<TabAtkins>
That is, date treated as a datetime set to midnight?
00:31
<Hixie>
right now my straw man (which i've spent all of 10 minutes on, alternating between reading g+ and doing this...) just treats any two <time>s with different datatypes as being equal.
00:31
<TabAtkins>
That'll probably be weird, actually.
00:32
<Hixie>
well it basically means they stay stable relative to each other
00:32
<TabAtkins>
I recommend creating an explicit ordering. Maybe times < dates < datetimes.
00:32
<zewt>
wouldn't it be nicer to give a more stable ordering?
00:32
<zewt>
hmm
00:32
<TabAtkins>
Most languages do something like that when comparing incomparable primitives.
00:32
<Hixie>
(it is stable; ties are broken relative to current position in the table)
00:32
<TabAtkins>
Like, numbers sort before strings in python, I think.
00:32
<Hixie>
TabAtkins: there's like 15 different types just for <time>, but i guess we could do that
00:32
<zewt>
doesn't that mean you're not holding one of those basic laws of orderings that I haven't remembered the name of since college
00:32
<TabAtkins>
Hixie: I think several of them are comparable?
00:32
<Hixie>
zewt: probably
00:33
<zewt>
(give me a second to formulate what i'm vaguely thinking of)
00:33
<Hixie>
TabAtkins: some could be, i guess
00:33
<Hixie>
TabAtkins: not sure why you'd ever have different types though
00:33
<TabAtkins>
Yeah, it'd be dumb.
00:33
<zewt>
if date1 == time8 (because they're different types), and date1 < date2, it's weird that !(time8 < date2)
00:33
<Hixie>
we can definitely make this more complex and support more and more edge cases; right now i'm probably not handling enough
00:34
<Hixie>
but i don't know where to draw the line
00:34
<TabAtkins>
We don't have to make it more complex, just give a total ordering. Otherwise you get confusing results, like what zewt pointed out.
00:34
<Hixie>
total ordering is "more complex" the way i meant it, but sure :-)
00:34
<TabAtkins>
Only by the tiniest bit. ^_^
00:34
<Hixie>
agreed that what you're pointing out seems important, zewt
00:35
<zewt>
(transitivity?)
00:35
<zewt>
(or something close to it)
00:35
<zewt>
more simply, if A == B, and A < C, then B < C
00:35
<TabAtkins>
Okay, looking at this, while it *might* be reasonable to sort things that are date-subsets of each other together, it's probably not worth it. Just sort the categories as being lt/gt en masse.
00:36
<TabAtkins>
zewt: Yes, that's transitivity.
00:36
<TabAtkins>
Well, or something like it. Transitivity is if A<B and B<C, then A<C.
00:36
<zewt>
TabAtkins: i recall the concepts, it's just the names that have drained away :)
00:36
<TabAtkins>
These terms apply within a single relationship, and you're mixing two of them here.
00:37
<TabAtkins>
But I'm sure there's a term for this from some math notion of an ordering.
00:37
<TabAtkins>
Most likely it's just called "being an ordering".
00:37
<zewt>
i suspect if you don't do this, you may confuse some sorting algorithms
00:37
<TabAtkins>
Yes, exactly.
00:37
<zewt>
do you have both a date and a datetime type, or is a date just a datetime at midnight?
00:38
<TabAtkins>
Hixie: My only recommendation is that for things which are info-subsets of each other, sort the subset as lt than the superset.
00:38
<TabAtkins>
So a year-month is less than a date.
00:38
<Hixie>
zewt: http://www.whatwg.org/specs/web-apps/current-work/#the-time-element lists the types
00:38
<TabAtkins>
A year-week is also less than a date, but the relative ordering of year-month and year-week is unimportant.
00:38
<zewt>
personally i'd treat a year-month (for sorting purposes) as a date with day == 1 at midnight
00:38
<Hixie>
TabAtkins: so all dates come before all dates with times?
00:38
<zewt>
it's when you're dealing with items that have data at the wrong end that they become incomparable
00:39
<zewt>
that is, if you have [year, month, day, hour, minute, second], comparing [year, month] and [year, month, hour] is easy
00:39
<zewt>
it's only comparing [year, month, day] against [hour, minute, second] that doesn't make sense
00:39
<TabAtkins>
Hixie: Assuming you're not filling in defaults as zewt suggests, yeah. That's just the simplistic "different categories sort themselves apart" strategy.
00:39
<Hixie>
screw it, i should just do a table of type x type and define all the various orderings and be done with it
00:39
<Hixie>
how much work can that possibly be
00:39
<TabAtkins>
Haha.
00:39
<zewt>
oops, loaded the spec in firefox
00:40
<zewt>
cpu fan: on
00:40
<zewt>
gar, too many damned choices in this list
00:40
<TabAtkins>
Probably with sorting dates into datetimes is that you don't know whether dates are local or global.
00:40
<TabAtkins>
I guess that's fixable... Let me write it out real quick.
00:40
<Hixie>
there's only 10 date/time types, plus string-that-parsed-as-float, plus everything else (string)
00:41
<Hixie>
so a 12x12 table
00:41
<TabAtkins>
Yeah, one sec and I"ll order it for you.
00:41
<TabAtkins>
A table is super overkill.
00:41
<TabAtkins>
It woudl be full of redundancy.
00:41
<Hixie>
i'm nothing if not a fan of overkill
00:42
<zewt>
ignoring timezone for the moment, could you just say that two times are comparable if their largest unit of time they define is the same
00:42
<zewt>
eg. a yyyy-mm-dd and a yyyy-mm are comparable (assume dd == 1), but a yyyy-mm-dd and mm-dd are not (so they have to be ordered as a class)
00:43
<TabAtkins>
zewt: Problem, again, is that you can't sort a datetime with a date, because you don't know whether the date is local or global.
00:43
<TabAtkins>
And that would be confusing.
00:43
<zewt>
TabAtkins: that's what i just said to ignore for the moment :)
00:44
<TabAtkins>
Haha, but we can't ignore it. ^_^
00:44
<zewt>
(because I haven't thought about that axis yet)
00:44
<Hixie>
ignoring that we're trying to sort stuff, i think the problem is solved!
00:44
<Hixie>
mission accomplished!
00:44
<zewt>
sorry for not trying to solve every sub-problem simultaneously :)
00:44
<TabAtkins>
zewt: I'm fine with saying that you can sort together a year, year-month, year-week, and year-month-day.
00:44
<TabAtkins>
But then datetimes have to sort after them.
00:45
<zewt>
why?
00:45
<TabAtkins>
Because of what I just said.
00:45
<Hixie>
we could just assume UTC
00:46
<TabAtkins>
Is 2000-01-01 01:00:00+0000 before 2000-01-01 or after it? Depends on where in the world you are when you wrote the bare 2000-01-01.
00:46
<Hixie>
when comparing with a global date
00:46
<zewt>
picking a simple case, sorting timezone-agnostic "jan 5" before "jan 5 3:00:00 UTC" makes sense to me, even in the edge case where the first time is local and is actually jan 4 22:00:00 UTC-2
00:46
<TabAtkins>
Hixie: Yeah, we could.
00:46
<Hixie>
zewt: that would possibly result in the display listing a bunch of jan 4s after jan 5
00:47
<TabAtkins>
Hixie: I suppose mixing timeless dates with global datetimes is probably a bad idea anyway.
00:47
<Hixie>
probably best to do as tab says for the date vs global time thing
00:47
<Hixie>
date vs local time can be compared
00:47
<TabAtkins>
kk, so...
00:48
<TabAtkins>
year, year-month, year-week, year-month-day, and local datetime can all be compared with each other.
00:48
<zewt>
that sounds like it would get people to write UTC times as local times just to convince them to sort
00:48
<TabAtkins>
The other categories should sort separately.
00:48
<TabAtkins>
zewt: Or put times on their dates to get them to sort.
00:49
<TabAtkins>
Hixie: Or, wait. Did you mean that local datetime and global datetime would be comparable, with us assuming UTC?
00:49
<Hixie>
no
00:49
<Hixie>
2011-11-11 vs 2011-11-11T11:11
00:50
<Hixie>
date vs local datetime
00:50
<zewt>
<time> only supports three fractional digits? :|
00:50
<TabAtkins>
Okay, so those are comparable. Cool, makes sense.
00:50
<TabAtkins>
Now what about year-month-day against global datetime?
00:50
<zewt>
(i regularly use six digits; handy for accurate timestamps)
00:51
<Hixie>
is 2011-11 equal to or less than 2011-11-01 ? i.e. do you fill with 0 or min
00:52
<zewt>
minimum, IMO
00:52
<Hixie>
so they're equal?
00:52
<zewt>
yeah
00:52
<Hixie>
seems that would be ugly
00:52
<Hixie>
you could end up with 2011-11 2011-11-01 2011-11 2011-11-01
00:52
<TabAtkins>
I think sort before, actually.
00:52
<TabAtkins>
Standard lexicographic rules.
00:53
<Hixie>
which is lower, 01-01 or 0001-01 ? (yearless date vs month)
00:53
<zewt>
(i wonder if there are any use cases for mixing <time> formats like this, for reference to what makes more sense in practice)
00:53
<Hixie>
zewt: yeah, i couldn't come up with any
00:53
<zewt>
Hixie: fwiw, that sort order makes sense to me, especially if there are other sort keys
00:54
<Hixie>
zewt: assuming no other sort keys
00:54
<TabAtkins>
But then, what about 2000-01 and 2000-W01?
00:54
<zewt>
Hixie: but equality matters more when you have secondary sort keys
00:54
<TabAtkins>
Yes, I can see a use-case. Table with calendar entries, where some entries are year-month-days, some are datetimes, and some are year-month.
00:54
<zewt>
eg. if your sort is (time,score) and you have [2011-11 10pts,2011-11-01 11pts,2011-12 12pts]
00:55
<zewt>
er, 2011-11 in all
00:55
<TabAtkins>
Hm, true.
00:56
<zewt>
whenever i sort dates (putting aside the mixed-units weirdness) i just convert them to epoch time, and sort numerically
00:56
<zewt>
which is why those 2011-11s sorting equal seems natural to me, anyway
00:56
<TabAtkins>
zewt: Makes sense.
00:56
<TabAtkins>
Except that it's local, not epoch time.
00:58
<TabAtkins>
Here's my somewhat arbitrary ordering: time < month-day < local-stuff < global date-time < time-zone offset < duration
00:58
<TabAtkins>
Where "local-stuff" are the 5 comparable types, with each converted into a (year, day, time) tuple and sorted lexicographically.
00:58
<Hixie>
TabAtkins: add in string and float to that?
00:58
<TabAtkins>
Hixie: Put "< float < string" at the end.
00:58
<Hixie>
k
00:59
<Hixie>
well as you said, a table is overkill for this then
00:59
<Hixie>
:-(
00:59
<Hixie>
i was so looking forward to make a 144-cell table
00:59
<TabAtkins>
Haha, I told you. Orderings are linear. A table is just an invitation to introduce inconsistency.
01:00
<TabAtkins>
Instead, you just map each class to an integer and sort that.
01:00
<TabAtkins>
Rather, total orderings are.
01:01
<zewt>
also tables are contagious migraines, heh
01:01
<TabAtkins>
Heh, yeah.
01:02
<zewt>
even relatively small tables like the distinguishable table in webidl make me unhappy
01:02
<zewt>
i guess that's not all that small
01:02
<zewt>
just compact
01:03
<zewt>
(less because it's hard to read directly, more because it's hard to see the logic and pattern behind a table)
01:04
<Hixie>
this is my random musings so far: http://www.whatwg.org/specs/web-apps/current-work/temp
01:04
<Hixie>
not high quality prose
01:06
<zewt>
for secondary sorts, do you just call th.sort() twice in reverse order?
01:07
<Hixie>
yes
01:07
<Hixie>
you don't really ever call .sort(), the idea is that the user clicks the <th> and it sorts for him
01:07
<zewt>
does it just sort visually, leaving the DOM order alone?
01:08
<Hixie>
changes dom
01:08
<Hixie>
stuart in the thread talked about having columns whose values don't get sorted (as in, the cells get moved to new rows so that they appear unmoved in the rendering even though the rest of the table moved), not sure how to do that exactly
01:08
<zewt>
so if you add items to the list, they'll end up at the end, and you can th.sort() to bump it to its sorted position
01:08
<zewt>
(which makes sense--a lot of UIs do that)
01:08
<Hixie>
yeah or we can have an autosort mode
01:09
<Hixie>
or an insertSorted method on tbody
01:09
<zewt>
though that wouldn't retain secondary sorts
01:09
<Hixie>
correct
01:09
<zewt>
(which might be annoying if you want that)
01:10
<Hixie>
nobody on the thread mentioned secondary sorts, but yeah
01:10
<zewt>
which isn't a rare case, eg. when sorting files by size you probably want filename secondary
01:10
<Hixie>
agreed
01:11
<zewt>
synthetic sort keys are pretty useful, eg. <time sort="123">ignored</time>
01:12
<Hixie>
that's why <time> and <data> are there
01:12
<Hixie>
afk. bbiab.
01:14
<zewt>
(if it's only used when it's the only element in the column then i'm not sure how that works)
02:15
<JonathanNeal>
hello
02:16
<JonathanNeal>
hi tantek, how's html classes?
02:17
<tantek>
Hi JonathanNeal, they're going well!
02:19
<JonathanNeal>
Good, and we're all in favor of <main> still? Good, good.
02:47
<tantek>
JonathanNeal - almost all - http://w3cmemes.tumblr.com/post/34830376881/stop-energy-against-main-is-explained-to-the ;)
02:51
<Krinkle>
Any dom spec-lingo expert here? http://www.w3.org/TR/dom/#dom-treewalker-nextnode
02:52
<Krinkle>
"If a node is following node and is not following root, set node to the first such node."
02:52
<Krinkle>
That line doesn't quite make sense to me
02:52
<Krinkle>
(I'm implementing TreeWalker in javascript as an experiment for something)
02:52
<JonathanNeal>
awww, i love Hixie, tantek.
02:53
<Krinkle>
isn't that just nextSibling? Also, how can a node following the currentNode (child of root) also be following root?
02:53
<JonathanNeal>
Someone was just asking me if I would post the source of a project I did and license it. What is the most free license I can give it, the weirdo MIT/GPL?
02:54
<JonathanNeal>
Whenever I use that one, someone says "you don't actually need to GPL it, just MIT is fine" but then someone says "but i need to use it as GPL and I'm scared".
02:57
<Krinkle>
JonathanNeal: MIT is freeer than GPL
02:57
<Krinkle>
(in that MIT software can be used in GPL, but not the other way around)
02:57
<Krinkle>
So I'd recommend MIT.
02:57
<Krinkle>
Also, as the author and copyright holder you have the right to license work under multiple licenses, even those licenses are not compatible.
02:58
<Krinkle>
but yeah, MIT +GPL is legally an odd combination (albeit not uncommon) as MIT is compatible with GPL.
03:02
<zewt>
there isn't much free about the GPL: "do it exactly the way we say"
03:02
<zewt>
<- gpl-jaded
03:06
<JonathanNeal>
I remember someone had a license that restricted use from explicitly "adult" projects. I think another license restricted use from projects that involved animal experimentation.
03:12
<Krinkle>
And then there is the famous "You shall use this program for Good, not Evil"
03:12
<Krinkle>
the ammendment to JSLint's GPL-based license
03:13
<Krinkle>
"The Software shall be used for Good, not Evil."
03:13
<Krinkle>
(MIT, not GPL)
03:13
<Krinkle>
https://github.com/douglascrockford/JSLint/blob/master/jslint.js#L16
03:13
<zewt>
now i feel like releasing some software and only allowing it to be used for pornographic purposes
03:23
<JonathanNeal>
I liked that clause. It reminded me of Google's motto.
03:23
<JonathanNeal>
Except, I think, Google couldn't use jslint because of this.
03:28
<zewt>
playing games in licenses!=cool
03:54
<Hixie>
zewt: <td><data value="sort key">whatever the cell contains</data>
04:04
<Krinkle>
<td data-sort-value="sort key">whatever the cell contains</td>
04:46
<heycam>
it's a shame list-style-type and list-style-image aren't the same property
04:51
<erlehmann>
I have done an art http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2012-December/038430.html
04:52
<erlehmann>
JonathanNeal, take note :)
04:53
<erlehmann>
also foolip :)
05:09
<JonathanNeal>
erlehmann: hey hey
05:09
<JonathanNeal>
how are you?
05:10
<JonathanNeal>
ps, erlehmann, see my latest pull requests? no regex.
05:14
<erlehmann>
i am sleepy
05:14
<erlehmann>
as i live in berlin, i should not be awake right now
05:14
<erlehmann>
local time is 06:14
05:15
<erlehmann>
i will look at pull requests when i have slept enough
05:15
<JonathanNeal>
is that celsius time?
05:15
<JonathanNeal>
very well.
05:16
<JonathanNeal>
ping me the next time you are around
05:23
<heycam>
lol ::-webkit-meter-even-less-good-value
05:27
<heycam>
is there a WebKit pseudo that selects a list item's bullet, like ::-moz-list-bullet?
05:31
heycam
wonders if .someelement::before:hover { … } should work
05:40
<MikeSmith>
rniwa: ↑
05:41
<rniwa>
MikeSmith: ?
05:41
<MikeSmith>
heycam question
05:41
<MikeSmith>
14:27 heycam: is there a WebKit pseudo that selects a list item's bullet, like ::-moz-list-bullet?
05:41
<MikeSmith>
heycam: could also ask on #webkit
05:42
<heycam>
MikeSmith, I might just do that
05:42
<rniwa>
MikeSmith, heycam: as far as i know, no.
05:43
<rniwa>
we have a FIXME in RenderListMarker.cpp:
05:43
<rniwa>
// FIXME: This is a somewhat arbitrary width. Generated images for markers really won't become particularly useful
05:43
<rniwa>
// until we support the CSS3 marker pseudoclass to allow control over the width and height of the marker box.
05:43
<heycam>
rniwa, ah ok, thanks. I guess the long term plan is ::marker?
05:43
<rniwa>
heycam: whatever CSS3 spec. says
05:43
<heycam>
ok :)
05:43
<heycam>
thanks
05:43
<rniwa>
heycam: list marker was a mess in webkit
05:44
<rniwa>
heycam: someone very recently rewrote that thing using some pseudo element idiom
05:44
<heycam>
oh, cool
05:44
<heycam>
I'm really just wondering what to do for the details/summary disclosure triangle thing
05:44
<rniwa>
heycam: until very recently we had O(2^n) implementation :/
05:44
<heycam>
and testing what things are possible with regular bullets (like whether you can :hover them etc.)
05:44
<heycam>
rniwa, ouch
05:45
<rniwa>
heycam: indeed.
05:45
<MikeSmith>
heycam: I'm not convinced it's important to make the disclosure triangle style-able
05:45
<rniwa>
heycam: i believe our implementation is now O(n^2)
05:46
<MikeSmith>
heycam: though I know Lachlan and others feel otherwise
05:46
<rniwa>
heycam: although the old implementation was O(n) in common cases...
05:46
<heycam>
rniwa, is this for numbering? or something else?
05:46
<rniwa>
heycam: yeah.
05:46
<heycam>
MikeSmith, I like the idea of being able to style it
05:46
<MikeSmith>
ok
05:46
<heycam>
MikeSmith, I think people will want to, so may as well come up with a sane way to expose it to CSS
05:47
<rniwa>
heycam: we had some crazy code doing some crazy things.
05:47
<heycam>
rniwa, don't we all ;)
05:47
<rniwa>
indeed.
05:51
<MikeSmith>
btw when abarth says "limits are necessary so that implementations don't end up having to do quadratic work" in http://lists.w3.org/Archives/Public/public-whatwg-archive/2012Nov/0019.html he means in order to avoid ending up in O(n^2) ?
05:52
<heycam>
yeah
05:56
<MikeSmith>
it's going to be interesting to see how Hixie fixes that
07:09
<Stevef>
MikeSmith: a major reason why devs don't use a native controls over a custom control is because they cannotstyle them as they want, so suggest it is a big deal if the triangle is stylable
07:11
<Stevef>
Mikesmith: often times devs want + and - symbols for disclousyre widgets
07:15
<MikeSmith>
Stevef: so they can use one of the libraries that already provides the equivalent of details+summary
07:16
<MikeSmith>
they want to style the calendar widget for the input date controls too
07:16
<Stevef>
mikesmith: doesn't that defeat the point of having a native widget?
07:16
<MikeSmith>
no
07:17
<MikeSmith>
it just means if you want the native widget you might have to live a tradeoff
07:18
<MikeSmith>
and if you want fine-tuned control, move to doing it in JS
07:18
<Stevef>
mikesmith: thats why we have <a> this is a button</a> still
07:19
<MikeSmith>
not following you
07:22
<MikeSmith>
but anyway I can imagine that a lot site are going to just keep using custom date-pickers and details+summary-like things in JS because if they use the native controls they are never going to get the same kind of flexibility and themeing hooks they need
07:23
<MikeSmith>
I don't imagine a lot of them are going to move already from what they're already using and replace it with the native controls
07:24
<Stevef>
dev's will use whatever element they find makes it possible to style as they want
07:24
<Stevef>
so you are saying the benefits of having native widgets are limited
07:25
<Stevef>
or the appeal is limited
07:26
<Stevef>
think the difference between providing stylability for disclosure triangle and dat picker UI is chalk and cheese
07:28
<Stevef>
"but anyway I can imagine that a lot site are going to just keep using custom date-pickers" agree on that
07:30
<Stevef>
but its unfortunate that simple widgets can have the flexibility ofstying that devs want as it makes it harder to provide accessibility - hence ARIA
07:30
<Stevef>
cannot have
07:31
<Stevef>
but why should i be arguing - more work for the "accessibility industry"
08:11
<jgraham>
Stevef: Styling native controls is not a trivial problem, which is much of the reason it hasn't been solved
08:21
<Stevef>
jgraham: acknowledged, but it has been a long running sore and if it can't be resolved the utility of native controls are sorely diminished
08:28
<jgraham>
Well yes, but wishing won't make it so. Apart from web components, which sidestep the problem, I don't think anyone knows what a solution should look like
08:33
<Krinkle>
Ms2ger: Hi, I finished the test suite (and implementation) https://github.com/Krinkle/dom-TreeWalker-polyfill
08:34
<Ms2ger>
jgraham is going to be sad about QUnit :)
08:35
<Krinkle>
well, in my repo / auto-integrated with Travis-CI etc. I'm not going to use some in-house format that nobody ever heard of, so QUnit yeah,.
08:35
<Krinkle>
But it's FOSS, so by all means. It's 99% just find and replace for what W3 is using
08:35
<Krinkle>
your test suite syntax is almost identical
08:36
<Krinkle>
Ms2ger: but before I knock myself out I'd like to get 2 things done
08:36
<Krinkle>
1) fix the spec (if indeed I am right, again), 2) your ok on the contents of the tests.
08:36
<Krinkle>
(as opposed to the syntax)
08:38
<Ms2ger>
I'm going to leave that to annevk, if you don't mind; I haven't really looked at the traversal algorithms
08:39
<Krinkle>
Ms2ger: Okay, what do you suggest I do?
08:40
<Ms2ger>
For?
08:40
<Krinkle>
1 or 2
08:41
<Krinkle>
to verify that the spec is incorrect, and getting it fixed. and to get the tests submitted on the webapps testing site
08:41
<Ms2ger>
Oh, there was another bug?
08:42
<Krinkle>
Yeah, I found one more.
08:42
<Krinkle>
In TreeWalker::nextNode
08:42
<Krinkle>
Implementing it as-is either stayed at the root node (similar to yesterday's firstChild() bug) or it gets in an infinite loop.
08:43
<Krinkle>
But that might be due to me misunderstanding the spec language. There is one passage in particular that puzzles me
08:44
<Krinkle>
Interestingly WebKit's implementation of TreeWalker::nextNode is, contrary to any other TreeWalker methods, very different than the spec. (although probably what the spec should be)
08:44
<Krinkle>
There hard part is where nextNode is supposed to go from one node's last child into the next parent's sibling's first child.
08:45
<Krinkle>
in other words nextNode is the magic method that goes through the entire dom without having to call any other methods.
08:45
<Krinkle>
So whenever it hits the end of a node's children it goes back up until it finds a parent with a next sibling and continues on
08:46
<Ms2ger>
Could you quote the confusing part?
08:46
<Krinkle>
that's a pretty complex part that the current spec doesn't very well elaborate on (or I'm not seeing it)
08:46
<Krinkle>
sure
08:46
<Krinkle>
http://www.w3.org/TR/dom/#dom-treewalker-nextnode
08:46
<Krinkle>
"If a node is following node and is not following root, set node to the first such node."
08:46
<Krinkle>
that one sentence supposedly represents my last 5 lines
08:47
<Krinkle>
following does link to a concept, but that doesn't elaborate much
08:47
<Krinkle>
the definition of concept-following sounds like "next sibling"
08:48
<Ms2ger>
Ah, no
08:48
<Ms2ger>
following refers to a preorder, depth-first traversal
08:48
<Ms2ger>
So in <a><b><c/></b><d/></a>
08:48
<Ms2ger>
d is following b
08:49
<Ms2ger>
Hi annevk :)
08:49
<Krinkle>
Ms2ger: Yeah, I get it now. I implemented it all right :)
08:49
<annevk>
morning
08:49
<annevk>
more TreeWalker bugs?
08:49
<Krinkle>
But the implementation is pretty complex (like 40 lines of code)
08:49
<Krinkle>
so I think maybe it would deserve a little more elaborate on what exactly it means.
08:50
<Krinkle>
Or is it obvious enough?
08:50
<Krinkle>
https://github.com/Krinkle/dom-TreeWalker-polyfill/blob/master/src/TreeWalker-polyfill.js#L357
08:50
<Krinkle>
this sentence is the while loop with nextSkippingChildren
08:50
<Krinkle>
the while loop is like 14 lines, and then nextSkippingChildren is entirely separate and not in the spec.
08:51
<Krinkle>
I guess nextSkippingChildren is "following node"
08:51
<Krinkle>
but really, forget about "following node" that is clear enough.
08:52
<Krinkle>
I meant to address the rest of the steps in TreeWalker::nextNode
08:52
<Krinkle>
Such as "Let result be FILTER_ACCEPT."
08:53
<Krinkle>
followed by "While result is not FILTER_ACCEPT "
08:53
<Krinkle>
I think it is missing a "Filter node" somewhere
08:54
<Krinkle>
and "set node to first child if not null" or something
08:54
<Krinkle>
based on the WebKit implementation (and my own)
08:54
<Krinkle>
am I making sense/
08:56
<Krinkle>
annevk: Maybe you have a minute to walk through this particular method and compare it with the tests I wrote and the WebKit implementation. Since they appear to take a completely different approach to the thing and the one in the spec is either misintepreted or indeed contains a bug.
09:04
<annevk>
Krinkle: nextNode() looks mostly correct although it uses a shortcut for something that's likely more complicated in an implementation and there a bug in the end that it doesn't run the substeps again if the return value is not FILTER_ACCEPT
09:05
<Krinkle>
after 3.2. "Otherwise, run these substeps again" causes an infinite loop in my tests.
09:06
<Krinkle>
and it is indeed missing handling for REJECT
09:06
<Krinkle>
Compare the two implementations next to each other (nextNode#WebKit / nextNodeW3) https://github.com/Krinkle/dom-TreeWalker-polyfill/blob/master/src/TreeWalker-polyfill.js#L349
09:07
<Krinkle>
The initial setting of result to FILTER_ACCEPT also seems suspiciou
09:08
<Krinkle>
and needs return null at the end I guess
09:08
<annevk>
yeah
09:09
<annevk>
and 3.2 indeed needs to account for there not being a following node
09:10
<Krinkle>
previousNode also needs a return null at the end (documented with // + in my code, lines I addedd)
09:10
jgraham
obviously needs to join more mailing lists
09:11
<Krinkle>
the spec is setting result to ACCEPT, so the first while loop is never entered. The first dom lookup the spec does is "following node"
09:11
<Krinkle>
whereas the first lookup should be first child
09:11
<jgraham>
I only got 66% of the TestTWF list announcement mails
09:11
<Krinkle>
following node is a last result if there are no children
09:11
<Krinkle>
resort*
09:17
<Krinkle>
annevk: are you doing something with this at the moment (want to avoid us doing double work)
09:17
<annevk>
oops, the first loop should check for REJECT
09:17
<annevk>
well I'm planning on fixing this today, ideally within the next few hours
09:17
<Krinkle>
and 3.2 needs to repeat it self if the "following node" is not accepted.
09:17
<annevk>
but there's also breakfast and such :)
09:18
<Krinkle>
annevk: ah, xs4all, so that's the Netherlands
09:18
<Krinkle>
annevk: ben momenteel serious request aan het kijken :)
09:18
<annevk>
heh
09:19
<Ms2ger>
Oh dear, more Dutch?
09:19
<Krinkle>
annevk: the repo is at your disposal, let me know if there's anything I can do or if you have a revision I can look at.
09:20
<Krinkle>
Ms2ger: yeah, I'm afraid so. We have the same atmosphere at Wikimedia (the Dutch are slowly taking over the office)
09:21
<annevk>
Krinkle: sorry, I missed you started patching the source text
09:21
<annevk>
Krinkle: I'm happy for you to write the patches as long as you agree to the CC0 license terms
09:21
<Krinkle>
annevk: I didn't. Not for this bug.
09:21
<annevk>
ah okay
09:21
<Krinkle>
I'm happy to agree, but I don't think I'm good enough at writing these kind of texts. I'll review/test :)
09:22
<annevk>
kk
09:22
<annevk>
ah I see, you pointed out copypasta
09:22
annevk
got confused by github
09:38
<annevk>
whoa, mnot was in this channel
10:05
<odinho>
Bah, interesting stuff happens when I'm sleeping. :/
10:05
<odinho>
In my "how I think a normal web dev would use it" perf tests Fx IDB severely beats every other implementation.
10:41
<Ms2ger>
odinho, duh? :)
10:43
<odinho>
Ms2ger: what are you duh-ing at?
10:43
<Ms2ger>
That our perf beats everyone ;)
10:43
<odinho>
Ms2ger: Is that really so obvious? I was suprised about it... Since the backends in a raw speed competition, levelDB win hands down.
10:45
<odinho>
Ms2ger: We also use SQLite, btw. And comparable to Firefox. IE is a bit slower, especially some operations is bad, but Chrome is really suprisingly slow. Outliner slow.
10:45
<Ms2ger>
I like to think it's obvious my browser is best at everything :)
10:45
<odinho>
IE is really fast at some syntethic stuff too, and beats everyone there.
10:46
<Ms2ger>
Now *that* sounds surprising :)
10:49
<rniwa>
odinho: the last i checked, the problem with chrome is to do with IPCs
10:49
<rniwa>
odinho: because they have to sync data between multiple renderer processes
10:49
<rniwa>
odinho: they end up sending lots of data via sync IPCs :(
10:51
<odinho>
rniwa: Yeah, I saw that. I was interested why it was so horribly slow :-) You have a bug for it too.
10:51
<odinho>
rniwa: But y'know, normal people don't care why ;-)
10:51
<rniwa>
odinho: yeah
10:51
<rniwa>
odinho: yup.
11:14
<annevk>
Krinkle|detached: bugs should be fixed now
11:34
<jgraham>
darobin: http://philip.html5.org/tests/canvas/suite/tests/spec.html but I dunno if it ever made it to W3C space
11:34
<jgraham>
It is out of date of course
11:37
<annevk>
Krinkle|detached: can't you do Document.prototype.createTreeWalker() although I guess that might not work that well given the mess that is Document
11:39
<darobin>
jgraham: I think those are the tests I have; at least some of them
11:40
<darobin>
the file names are pretty similar at any rate
11:41
<jgraham>
darobin: Right, it is Philip's original testsuite
11:41
<Ms2ger>
darobin, they're under submission/PhilipTaylor somewhere
11:41
<darobin>
it needs some good updating
11:41
<darobin>
I'll see about merging stuff that needs to be afterwards
11:41
<jgraham>
Which has then been imported and updated by various browsers and the W3C
11:42
<darobin>
right now I'm concerned about fixing the ~5000 broken links that can be :)
11:42
<jgraham>
I don't think that the *tests* there are useful
11:42
<jgraham>
But that's the annotated spec you were looking for
11:42
<darobin>
oh!
11:42
<darobin>
ok, sorry, I was missing the context of why you were telling me this :)
11:43
<jgraham>
(or, to be clear the tests there are very useful. But we are already making use of them)
11:43
<Ms2ger>
This is the index: http://www.w3c-test.org/html/tests/submission/PhilipTaylor/canvas/
11:46
<Ms2ger>
And this is the annotated spec: http://www.w3c-test.org/html/tests/submission/PhilipTaylor/annotated-spec/canvas.html
11:46
<Ms2ger>
darobin, ^
11:47
<darobin>
cheers
11:47
<darobin>
I don't know, do we want that kind of document in the TS?
11:47
<darobin>
I'd rather it lived outside
11:47
<darobin>
also, if I import the index stuff all its links will be broken
11:47
<jgraham>
I don't think we do
11:48
<jgraham>
I think we want the actual spec to look at lot more like that version
11:48
<darobin>
mmmmm, three of the XHTML tests in the TS are in UTF16 for no apparent good reason
11:48
<darobin>
yeah that makes sense
11:49
<darobin>
ok, some of those XHTML files really don't make any fucking sense whatsoever (to me)
11:49
<darobin>
take tests/html/rendering/non-replaced-elements/the-page/body_text_00ffff.xhtml for instance
11:49
<darobin>
it claims to be XHTML, but it has no doctype
11:50
<darobin>
and it's testing that the "text" attribute of body does indeed change the text colour
11:50
<darobin>
why would this ever want to be XHTML and in UTF16?
11:50
<jgraham>
Who wrote the test?
11:51
<darobin>
dunno
11:51
<darobin>
but I reckon the same person for the three offenders
11:51
<jgraham>
You don't need a doctype to be XHTML, right?
11:51
<jgraham>
I thought it was recommended not to. Although then I wonder if/how entities work
11:52
<annevk>
you don't and they don't
11:52
<annevk>
but you can't and then they might
11:53
<darobin>
I hope no one will care if those tests somehow magically become UTF8
11:58
<darobin>
ok, all the links should either be fixed or utterly broken now
11:59
<darobin>
MikeSmith: ping
12:01
<Ms2ger>
Microsoft wrote it, it's actually useful
12:01
<Ms2ger>
Caught a bug in Gecko
12:01
<Ms2ger>
But yes, should be utf-8
12:02
<darobin>
ok, good to know
12:02
<darobin>
I've converted it
12:02
<odinho>
So this testing move, only html tests get a cleanup?
12:02
<odinho>
webapps and webappsec could also need a spring cleaning.
12:02
<darobin>
odinho: you were thinking of webapps tests?
12:02
<darobin>
right
12:03
<odinho>
I don't really se the use of deepening the hierarchy by having a special "tests/" folder at all. That's what the repository is made for anyway :P
12:03
<darobin>
the plan as discussed with ArtB and chaals was that once the HTML WG had agreed on the Right Way To Do It they would follow
12:03
<odinho>
Okay
12:03
<darobin>
odinho: you had a chance to speak up to that yesterday — today that chance is gone ;-)
12:03
<odinho>
I guess I should add metadata as well, at least blame-information (autor meta), since we're switching system.
12:04
<darobin>
I think we have all the blame history imported from hg
12:04
<odinho>
darobin: I was in the meeting yesterday, -- we didn't talk about stuff like that :-)
12:04
<Ms2ger>
odinho, I told him to get rid of it, but he didn't want to :)
12:04
<Ms2ger>
The meeting was on Tuesday
12:04
<darobin>
odinho: I meant here on IRC
12:04
<darobin>
odinho: Ms2ger suggested that, but it would have caused me extra work and he didn't seem adamant
12:05
<darobin>
I also (without much passion) like the idea of just pointing a web server at tests and not worrying that I'm also exposing tools, etc.
12:05
<darobin>
but *shrug*
12:06
<Ms2ger>
Is there anything useful in tools?
12:06
<darobin>
a few things, but it's not clear that it's dangerous
12:06
<darobin>
actually, now that my bunch of scripts have done their work, moving out of tests would be less work for me than it was yesterday
12:06
<darobin>
so if you guys each promise me a beer, I'll do it
12:07
<odinho>
Doesn't sound like a bad deal.
12:07
<odinho>
You might never get Ms2ger's though :P
12:07
<Ms2ger>
Sure
12:07
<jgraham>
What if I promise you a negative beer?
12:07
<darobin>
see? even Ms2ger buys beer
12:08
<darobin>
jgraham: I probably already owe you beer anyway
12:08
<jgraham>
Next time I see you with a beer, I will take it off you
12:08
<jgraham>
Actually I don't drink beer, so you are good :)
12:08
<odinho>
"relieve you of it", lol
12:08
<jgraham>
Anyway, I don't really have an opinion on tests/ vs not
12:09
<jgraham>
although it doesn't really seem that harmful to have it
12:09
<Ms2ger>
darobin, but don't come near jgraham with a glass of hot chocolate...
12:10
<darobin>
since I profoundly dislike hot chocolate, I will be happy to hand any such glass I may have to jgraham
12:10
<jgraham>
I get the feeling that removing tests/ means that we will end up with a html-tools repo soon enough
12:10
<darobin>
ok, I've moved the hierarchy one level up
12:10
<darobin>
jgraham: we already have an html-tools repo :)
12:10
<jgraham>
darobin: You would get on well with the people in the bar at the hotel in Lyon
12:10
<odinho>
jgraham: sounds nice, already have resources, and that works :]
12:11
<jgraham>
They apparently can't serve hot drinks after 9pm
12:11
<jgraham>
Well couldn't
12:11
<darobin>
in general it makes sense for the tools not to use the same branching as the content they apply to
12:11
<jgraham>
I suppose it is not impossible that this particular piece of insanity has ended already
12:11
<jgraham>
Sure
12:11
<darobin>
jgraham: yeah, that's common in France, especially in the province
12:11
<jgraham>
Oh, the whole country is mad
12:11
<darobin>
cleaning up the coffee machine takes time, so they do it well before the end of the shift
12:12
<darobin>
no no, in Paris you can normally get hot stuff up till 2am
12:12
<darobin>
and of course likewise in any place that serves food
12:13
<jgraham>
That wasn't much help to me :)
12:13
<darobin>
as a former barman, I always served hot beverages up to whenever the night ended
12:13
<jgraham>
Now time for lunch I think
12:13
<darobin>
+1
12:13
<Krinkle>
annevk: do for what?
12:13
<Krinkle>
"can't you do Document.prototype.createTreeWalker() although I guess that might not work that well given the mess that is Document"
12:16
<annevk>
Krinkle: in the implementation
12:16
<Krinkle>
Older browsers don't expose the constructors/prototypes
12:17
<Krinkle>
particularly IE
12:17
<Krinkle>
e.g. no HTMLElement, Node etc.
12:17
<Krinkle>
I doubt Document would be exposed
12:17
<Krinkle>
brb later
12:17
<MikeSmith>
darobin: aqui
12:32
<darobin>
MikeSmith: hola
12:32
<darobin>
do you know where the bot is that syncs github and hg?
12:32
<darobin>
for the TS
12:33
<darobin>
I think we need it killed before I merge the reorg to master
12:35
<Ms2ger>
darobin, what's the situation with submitted tests?
12:36
<darobin>
it's the next thing up after I've merged
12:36
<Ms2ger>
And thanks for https://github.com/w3c/html-testsuite/commit/8267f079550cbe16e488fa85a04d7d7d309f6529 :)
12:37
<darobin>
heh, np :)
12:39
<MikeSmith>
darobin: yeah i know. it's not so much a proper bot but instead just a script that gets called as a hook
12:40
<MikeSmith>
on dvcs.w3.org
12:40
<darobin>
ah, ok
12:40
<darobin>
can you kill it? or point me to it and I'll do it
12:40
<MikeSmith>
i can turn it off as soon as i get back to my pc
12:41
<darobin>
if you recall where it is just lmk and I'll have it learn the meaning of Justice
12:41
<MikeSmith>
if you have root on that host to can
12:41
<darobin>
or, you know, something like that
12:41
<MikeSmith>
Heh
12:41
<MikeSmith>
alex knows
12:41
<darobin>
I believe I do, I've ended up on that machine while thinking I was on w3c-test
12:42
<darobin>
ta, I'll see with sysreq
12:42
<MikeSmith>
ok
12:42
<MikeSmith>
var tree ... somewhere
12:54
<darobin>
the bot, it has been killed
12:57
Ms2ger
whimpers
13:32
<annevk>
Krinkle|detached: fair point
14:58
<timeless>
TabAtkins: mixing my dates with global dates is definitely a bad idea
15:02
<annevk>
hmm, time to switch banks http://www.youtube.com/watch?v=PV8qKJDt6EI
15:35
<annevk>
smaug____: should we remove the "detached flag" from NodeIterator too?
15:36
<annevk>
Aryeh ^^
15:36
<smaug____>
hmm
15:36
<zewt>
does this guy really think that stamping a keyval syntax on fragments is okay
15:37
<smaug____>
I'd guess detached flag is useless there
15:37
<annevk>
Ms2ger: ^^
15:39
<Ms2ger>
Never heard of it
15:40
<annevk>
wanna write a patch for Gecko?
15:40
<Ms2ger>
I guess?
15:44
annevk
fixes origin first
15:53
<Ms2ger>
MikeSmith, hey, has the world ended over there?
16:03
<darobin>
Ms2ger: the Mozilla submissions are actually you, right?
16:03
<Ms2ger>
Which ones?
16:03
<Ms2ger>
But generally, no
16:03
<annevk>
Ms2ger: '<a class="external" data-anolis-spec="html" ' seems like a lot of bloat
16:03
<Ms2ger>
Well, in the sense that I didn't write them originally
16:03
<darobin>
Ms2ger: ah, ok, some have your name on them and some don't
16:04
<darobin>
+1 to annevk on that
16:04
<Ms2ger>
darobin, but the bloat in <script src=respec.js>... ;)
16:04
<darobin>
Ms2ger: do you mind going through your own submissions and making them be new pull requests?
16:05
<Ms2ger>
darobin, except for the document.write ones, I did submit them all
16:05
<Ms2ger>
Sure
16:05
<darobin>
Ms2ger: nah, ReSpec writes the bloat for you, it's actually the opposite from Anolis
16:05
<darobin>
cool, thanks
16:05
<Ms2ger>
Send me an email to remind me?
16:05
<darobin>
I've done a bunch already
16:05
<darobin>
I'll do the Mozilla ones, they're easy — in your case you have lots :)
16:05
<darobin>
sure
16:06
<Ms2ger>
Yeah, I've written a few :)
16:07
<darobin>
Aryeh pretty much told me you were the maintainer for idlharness.js these days
16:08
<darobin>
I thought you might like to be informed :)
16:12
<Ms2ger>
darobin, hmm, what about idlharness?
16:13
<darobin>
Ms2ger: I had asked Aryeh if there were things he didn't want me to touch, warnings, etc.
16:13
<darobin>
and he said something like "well, it's mostly Ms2ger maintaining it these days"
16:13
<darobin>
you didn't seem to be aware of that last we spoke of it :)
16:14
<Ms2ger>
I guess that I know the most about it, of the people who are around
16:14
<Ms2ger>
I still barely understand anything about it :)
16:15
<Ms2ger>
Anyway, ttyl
16:17
<darobin>
haha
16:19
hober
really needs to set up a filter on list-id w3c/html-testsuite <html-testsuite.w3c.github.com> :)
16:19
<annevk>
DOM has 16 open bugs
16:19
<annevk>
new (positive) low
16:19
<annevk>
mostly feature requests now
16:25
<darobin>
hober: can't you simply sign out of notifications for that repo?
16:25
darobin
should probably sign in actually
16:27
<hober>
no, i want to get the notifications, just not to my inbox. :)
16:31
<darobin>
heh
16:42
<Stevef_>
darobin:ping re publishing Using ARIA in HTML as FPWD that won't happen til next year right?
16:42
<Stevef_>
so no rush to get it ready
16:44
<darobin>
Stevef_: yeah, there won't be any publications before 2013
16:45
<Stevef_>
darobin: we were just discussing in acc tf as it has now passed all CFC's to publish so its just process from here on in
16:46
<darobin>
Stevef_: yes, which is cool
16:46
<darobin>
but we're in publication moratorium (and I'm on vacation tomorrow evening :)
16:47
<Stevef_>
darobin: yeaah i will proceed at a leisurely pace to prepare it then :-)
16:47
jgraham
expected darobin to be reorganising tests on Christmas Day
16:49
<darobin>
jgraham: I think I'll finish all the reorganising I can do today or tomorrow :)
16:49
<darobin>
there are still some submissions to move around, but they might be too complicate and I might have to ask the authors to do it
16:58
<annevk>
yay for working on tests
17:22
<timeless>
annevk: have you seen odata.org ??
17:22
<dglazkov>
good morning, Whatwg!
17:51
<Hixie>
is there any difference between the 'double' type and JS Number?
17:55
<erlehmann>
hey whatwg
17:55
<erlehmann>
if i want to include a webvtt file in a web feed, which link relation would apply?
17:56
<Hixie>
how do you mean, include a webvtt file in a web feed?
17:57
<erlehmann>
i have a podcast with an atom feed. http://warumnicht.dieweltistgarnichtso.net/feed.atom
17:58
<erlehmann>
currently i include a mp3 enclosure a vorbis enclosure … and webvtt gives chapters!
17:58
<erlehmann>
i am looking at http://www.iana.org/assignments/link-relations/link-relations.xml
17:58
<Hixie>
ah, i see
17:58
<erlehmann>
in a feed, an external resource needs a link relation
17:58
<erlehmann>
like <link rel="alternate" type="text/html" href="http://warumnicht.dieweltistgarnichtso.net/wn-17.html"/>;
17:58
<Hixie>
does any software support webvtt in a feed yet?
17:59
<erlehmann>
no software will when no one provides it.
17:59
<Hixie>
if no software supports it, then doesn't matter what you use... pick whatever you think is right
17:59
<erlehmann>
i know at least one programmer, the guy behind instacast, would like to have chapters.
17:59
<Hixie>
rel="webvtt-chapters" or something
18:00
<Hixie>
or just rel=chapters
18:00
<Hixie>
you'll need everything that the <track> element in HTML can host, ideally
18:00
<erlehmann>
what does that mean?
18:01
<erlehmann>
i am hesitant to use „chapters“ because there is already a „chapter“ value in link relations at IANA
18:01
<erlehmann>
and i am thinking of rev vs. rel that was mixed up sometimes
18:01
<erlehmann>
if rel=chapters would be clean, where do i document it?
18:02
<erlehmann>
also the webvtt file does not really describe chapters. it is more akin to metadata, hmm.
18:02
<erlehmann>
like, it does not link to points in time
18:03
<erlehmann>
and is not usable without having the enclosure
18:05
<erlehmann>
Hixie, is my work on possible sub-delims in URI fragments in scope for the WHATWG or is there some other charter that works on that?
18:05
<erlehmann>
(excuse my bad engrish)
18:06
<Hixie>
re enclosures and how to spec it, dunno, ask the atom folk.
18:07
<Hixie>
re the URI thing, if you want the browsers to change behaviour, it's at least theoretically in scope
18:07
<erlehmann>
i would want to change behaviour. better than everybody inventing slightly-incompatible formats.
18:08
<erlehmann>
i'll wait for implementor replies
18:08
<erlehmann>
and if no one is against it find out if/how i can bring this into gecko and webkit.
18:09
<erlehmann>
i believe it is entirely possible to not break the web but still have the useful features of media fragments. in the worst case, processing will have to halt if there is an element with id like “t=0:23”, but continue otherwise
18:14
<erlehmann>
#atom is deserted
18:21
<erlehmann>
is there a way to have link annotations in webvtt?
18:48
<TabAtkins>
heycam|away: Re list-style-image and list-style-type, I agree. It's been really annoying to me when writing the Lists spec. :/
18:49
<erlehmann>
i have done an art and used rel=chapters http://warumnicht.dieweltistgarnichtso.net/feed.atom
18:49
<erlehmann>
how do i go about standardizing that rel value?
18:51
<hober>
is it a rel value for use in <a rel> or <link rel> in HTML?
18:51
<hober>
if so, see http://microformats.org/wiki/existing-rel-values#HTML5_link_type_extensions
19:04
<Hixie>
one of the things stuart mentioned is that it'd be great if tables could be set to automatically sort when the page is loading
19:04
<Hixie>
any opinions on how that should be marked up?
19:05
<TabAtkins>
What's the current plan for declaring a column to be sortable?
19:05
<tantek>
is there any prior art to look at? e.g. I'd start with JS libraries for clicking on table headers to sort the columns
19:06
<tantek>
and if not, then perhaps those who want such a feature should first prototype in a JS library
19:09
<Hixie>
TabAtkins: right now no plan
19:09
<Hixie>
TabAtkins: just <table sortable>
19:09
<Hixie>
tantek: the prior art is stuart's library which doesn't support this, but which he reports is one of his most requested features.
19:10
<TabAtkins>
Hixie: Ah, and that makes *all* columns sortable?
19:10
<Hixie>
TabAtkins: currently.
19:10
<Hixie>
TabAtkins: and by "currnetly" i mean "in my head"
19:10
<tantek>
why wouldn't a column be sortable?
19:10
<tantek>
or do you need some way to enable a default "sorting" UI?
19:10
<TabAtkins>
Okay. Then maybe <th sorted>?
19:10
<tantek>
similar to audio/video player=player
19:11
<TabAtkins>
tantek: You mean controls?
19:11
<tantek>
sorry, right, that. :)
19:11
<Hixie>
tantek: the only example i know of is a rank column, but there it's not so much that you can't sort by it so much as you need the cells to redistribute, and i don't know how to support that sanely with spans
19:11
<Hixie>
TabAtkins: that kind of implies it's _already_ sorted
19:11
<erlehmann>
Hixie, sorting tables onload means that people are not able to sort it server-side?
19:12
<TabAtkins>
Hixie: That's the point - you asked for some way to sort a column immediately.
19:12
<Hixie>
TabAtkins: though i am tempted to use an actual attribute to indicate the current sorted column, rather than a pseudo-class, which would be interested
19:12
<TabAtkins>
Oh, I see.
19:12
<Hixie>
TabAtkins: well yeah except in the markup it's not sorted
19:12
<tantek>
I like sorted. kind of like ordered vs. unordered lists.
19:12
<Hixie>
erlehmann: s/able/forced/
19:12
<tantek>
you can things sorted by multiple columns
19:12
<TabAtkins>
Yes, I was just going to suggest using the attribute to dynamically mark the sorted column too.
19:12
<tantek>
primary sort, secondary sort etc.
19:12
<TabAtkins>
Like <details open>.
19:12
<Hixie>
TabAtkins: yeah
19:12
<tantek>
so "current sorted column" is imprecise
19:13
<Hixie>
tantek: that is also an issue, yes
19:13
tantek
is waiting for visicalc.js
19:13
<erlehmann>
Hixie, issue: if columns have still to be sorted server-side, that gives backwards compat for free.
19:14
<Hixie>
erlehmann: stuart's feedback was that people hate that
19:14
<Hixie>
hate having to sort them themselves, i mean
19:14
<tantek>
is the original VisiCalc source anywhere? bet it would port well to JS + <table> as a data model
19:14
<erlehmann>
Hixie, if there are two ways, one backwards-incompatible, we *will* see „oh, yeah, the second columns on your page is something else“
19:14
<Hixie>
erlehmann: yes, but that's probably not a huge deal
19:14
<erlehmann>
Hixie, the problem is that making it easier, but incompatible for authors, will make it harder for users.
19:14
<Hixie>
erlehmann: it's not incompatible
19:14
<Hixie>
erlehmann: you still _can_ sort
19:14
<Hixie>
erlehmann: you're just not forced to
19:14
<Hixie>
in the future
19:16
<erlehmann>
sometimes, optional features are worse for compat. for example, AFAIK, you cannot implement ogg without doing streaming, but in MKV or MPEG containers you can have non-streamable files because the feature is optional.
19:16
<Hixie>
this isn't an optional feature
19:17
<erlehmann>
yeah, but how long until old user agents catch up? :/
19:17
<Hixie>
erlehmann: until they do, sort on the server and you'll be fine
19:17
<erlehmann>
the problem is that „the second column“ could be something else.
19:17
<tantek>
no different than the "new input types" problem
19:17
<Hixie>
what second column? what? i'm confused
19:17
<tantek>
new clients vs. server with old clients
19:17
<erlehmann>
or second row or whatever
19:18
<Hixie>
i think we're talking at cross purposes
19:18
<Hixie>
can you redescribe your concern from first principles?
19:18
<erlehmann>
Hixie, if i am referring to „the second row“ (not column), for how long will the person at this other computer be unsure about if i mean this or that row?
19:18
<Hixie>
well if it's a sortable table, any row could be the second row, it's whatever hte user last sorted the table to
19:19
<erlehmann>
something like “oh, you have an old version of firefox, that means the table is sorted differentlycould provide headches
19:19
<Hixie>
dude by that reasoning we could never add any new features ever
19:19
<erlehmann>
yeah, but if new UAs sort the table on load and old UAs do not, then there could be confusion
19:19
<erlehmann>
no, that is not what i mean
19:20
<erlehmann>
the problem is that there would be no “easy” fallback if some website does server-side-sort and I do not know, maybe someone has an old ipad or whatever
19:20
<TabAtkins>
erlehmann: Authors can certainly order their tables server-side if they *want* back-compat. Worst case, they don't, and you have a working but unsorted table.
19:21
<erlehmann>
TabAtkins, I believe that a world where backwards compat is not optional could be better than one that is
19:21
<erlehmann>
if it is optional, some will not do it.
19:21
<Hixie>
erlehmann: we can't require that people sort their tables
19:21
<Hixie>
erlehmann: they'll just find workarounds like manually calling .sort()
19:21
<TabAtkins>
erlehmann: I believe a world where I'm forced to sort my table server-side just to get it sorted by default is an annoying one, and I'll instead just include a script on-load that sorts by the column I want.
19:22
<erlehmann>
instead of doing it server-side. hmm. that sounds plausible.
19:22
<TabAtkins>
An unsorted table is still a table containing all the data you want. It's just not in order.
19:22
<Hixie>
erlehmann: in any case, i'm having trouble believing that the cost of people in legacy UAs having tables sorted differently than in new UAs will outweigh the cost of forcing people to manually sort their tables on the server
19:22
<Hixie>
especially given that there'll be shims for old UAs
19:22
<erlehmann>
i retract my assertion on the basis that the javascript sorting madness would be worse than having declarative means of marking up table sort
19:22
<Hixie>
hah
19:22
<erlehmann>
Hixie, TabAtkins, thanks for the discussion.
19:23
<Hixie>
dunno if i'd say "madness", but i agree :-)
19:23
<Hixie>
in other news, all this hasn't helped me figure out how to mark this up at all
19:23
<Hixie>
<table> <thead> <tr> <th sorted=1> <th sorted=2>
19:24
<Hixie>
but what if the author writes <th sorted=1> <th sorted=1> ?
19:24
<erlehmann>
“madness” in the case that pages use scripts when declarative means would be more usable in the long run.
19:24
<TabAtkins>
Then you sort the last one in document order?
19:25
<Hixie>
hm, sorted=level is kind of an unintuitive syntax anyway
19:25
<Hixie>
<table autosort="1,5,4,2">
19:26
<TabAtkins>
Dammit! I was just typing that!
19:26
<Hixie>
which makes insertions in tbodies sort?
19:26
<erlehmann>
what would autosort do?
19:26
<Hixie>
but then we have to go back to pseudo-classes
19:26
<erlehmann>
is that the column numbers in sorting precedence?
19:26
<Hixie>
since having both that and the sorted="" attribute would just lead to conflicts
19:26
<Hixie>
erlehmann: yeah
19:26
<Hixie>
also it's not very intuitive to use column numbers instead of names
19:27
<erlehmann>
yeah
19:27
<Hixie>
this is fast looking like one of those situations where there's no good answer
19:27
<erlehmann>
maybe too fast
19:28
<Hixie>
maybe <th sort> <th sort=2> <th sort=3> where duplicate sort levels are interpreted in doc order, so <th sort=2> <th sort=2> is equivalent to <th sort=2> <th sort=3>
19:28
<Hixie>
and =1 is implied if omitted
19:29
<erlehmann>
why „sort“ instead of „sorted“ ?
19:29
<TabAtkins>
Sure, that works.
19:30
<Hixie>
erlehmann: because the attribute also sorts, it doesn't only indicate that the content is sorted
19:30
<Hixie>
how do we indicate that the sort should be reversed?
19:31
<Hixie>
do secondary keys ever need to be reversed?
19:31
<Hixie>
if i click column A twice, then click column B, is the sort order B, then reverse A? or just B?
19:31
<TabAtkins>
Ctrl-click does secondary sort, otherwise it's just overriding primary sort.
19:32
<Hixie>
usually clicking a new column just pushes all previous columns up one level in the sort order
19:32
<erlehmann>
in which UA?
19:32
<Hixie>
i'm not aware of any UI that lets you change the secondary sort without changing the primary
19:34
<erlehmann>
but imagine sorting by category (pizza, burgers, noodles) and than going for secondary sort by price or delivery time
19:35
<erlehmann>
or say you have tech gadgets. sort by price, ascending, then sort by memory capacity descending.
19:35
<erlehmann>
or vice versa
19:36
<erlehmann>
i would make the attribute more self-describing, if you go by that route
19:36
<erlehmann>
sortindex
19:36
<erlehmann>
similar to tabindex
19:38
<jgraham>
Hmm, where does the spec say that elements with a content model of "text" are valid if they don't have any child nodes?
19:42
<jgraham>
Also, isn't autosorting on load rather unfriendly
19:43
<jgraham>
It means that you either can't do incremental rendering or have to relayout the table after you reach the end tag
19:43
<jgraham>
Which is pretty confusing if it's a long table and someone has already started reading it
19:55
<Ms2ger>
Hixie, yeah, double is JS Number
20:01
<erlehmann>
did someone say doubles? http://memegenerator.net/instance/32214506
20:03
<erlehmann>
ich dacte sowas schreibt man am schluss
20:04
<Ms2ger>
Sorry, lots of Dutch, not a lot of German here
20:06
<erlehmann>
sorry, wrong terminal
20:09
<erlehmann>
the doubles guy was intended to be here, though
20:10
<erlehmann>
Ms2ger, i had dutch in first and second grade, but i cannot remember more than “ho het jej?” :3
20:10
<erlehmann>
oh, it is “Hoe heet jij?”
20:11
<Ms2ger>
Ms2ger, I thought you knew ;)
20:13
<erlehmann>
this is a misunderstanding between object- and meta-language
20:13
<erlehmann>
i think.
20:13
<Ms2ger>
:)
20:13
<erlehmann>
i was referring to the phrase, not asking a question
20:14
<erlehmann>
are the quotes rendered at your place?
20:14
<erlehmann>
in your … terminal or whatever?
20:23
<Hixie>
erlehmann: the problem with sortindex="" is you really want the simple case (just one sort column) to look natural
20:23
<Hixie>
jgraham: follow the link to Text
20:24
<Hixie>
jgraham: re sorting, you'd autosort on insert or something
20:24
<Hixie>
jgraham: which isn't performance-wise particularly hot, i'll grant you
20:24
<GPHemsley>
Are you guys aware of this? http://browseryoulovedtohate.com/
20:25
<erlehmann>
„it's good now“ „no really“
20:25
<erlehmann>
hahaha
20:25
<erlehmann>
„i have changed, please come back, honey“
20:26
<erlehmann>
text as images. expert web devs they have there.
20:28
<erlehmann>
download button does not work
20:28
<GPHemsley>
It accompanies this video: https://www.youtube.com/watch?v=lD9FAOPBiDk
20:28
<GPHemsley>
See also: http://karaokewebstandard.org/
20:29
<GPHemsley>
"This specification defines a new API, focused on semantic language processing for two-way communication with a remote host. Eschewing typical binary protocols, this new interface creates a system-to-system forced sonic recognition on the receiving party. "
20:29
<Ms2ger>
MikeSmith, hey, http://www.w3c-test.org/html/ doesn't look happy :(
20:34
<jgraham>
Hixie: I did. "Text, in the context of content models, means Text nodes"
20:34
<jgraham>
There are no Text nodes
20:35
<Hixie>
presumably not conforming then
20:35
<Hixie>
what's the element in question?
20:35
<jgraham>
<title></title> for example
20:35
<Hixie>
yeah that's not conforming
20:35
<jgraham>
The validator disagrees
20:35
<Hixie>
(not much point including a <title> if it's empty)
20:35
<jgraham>
Not much point in including a title at all in many cases :)
20:35
<erlehmann>
GPHemsley, what is this i don't even.
20:36
<Hixie>
yeah, the spec allows for that
20:36
<jgraham>
Anyway, I guess I should file a bug on hsivonen
20:36
<Hixie>
"if title information is available from a higher-level protocol" you don't have to include a <title>
20:36
<jgraham>
Fair enough
20:36
<jgraham>
Anyway, it seems the validator has a bug
20:37
<TabAtkins>
jgraham: Auto-sorting on load is no more unfriendly than a JS onload handler calling .sort() manually. Since that's exactly what people will do if we don't provide the feature, might as well do it right immediately.
20:38
<jgraham>
TabAtkins: I don't see why people wouldn't sort the data on the server side
20:38
<Hixie>
i kinda want to make that clearer, e.g. explicitly make it ok for documents intended only for use in iframes (especially seamless iframes) to not have <title>s, but i don't know how to spec it since you can't distinguish a document that you load in an iframe from one you visit directly... haven't thought about it very much though
20:38
<Hixie>
jgraham: stuart says this is one of the biggest complaints about his library
20:38
<Hixie>
(that it doesn't sort on the client on load)
20:38
<Hixie>
well, he says "lots of people ask for it"
20:39
<Hixie>
(he agrees that it's "wrong")
20:39
<jgraham>
Well, lots of people ask for a parent selector in CSS
20:39
<jgraham>
We don't let them have that either :)
20:39
<Hixie>
yeah, and we should provide that with :matches()
20:40
<erlehmann>
if it is one of the biggest complaints, that does not mean that it is necessary, useful or even possible to build.
20:41
<Hixie>
no but it means that if it is possible to build, that we should seriously consider it
20:41
<erlehmann>
i once talked to a sound engineer and had to explain my synthesizer software using less-than-turing-complete instructions so it does not stall.
20:41
<erlehmann>
if this is a common complaint, where is the library that does it?
20:42
<erlehmann>
*someone* must have tried
20:42
<erlehmann>
(and failed? who knows)
20:42
<erlehmann>
(looking at existing solutions right now)
20:44
<erlehmann>
this one uses classes in header columns http://tetlaw.id.au/view/blog/table-sorting-with-prototype/
20:44
<erlehmann>
sortfirstasc and sortfirstdesc
20:46
<Hixie>
TabAtkins: can you translate Francois' e-mail for me?
20:46
<TabAtkins>
Sure, one sec.
20:47
<erlehmann>
does not scale :/
20:48
<erlehmann>
those classname solutions are ugly
20:49
<erlehmann>
this is worst i have seen http://www.frequency-decoder.com/2006/09/16/unobtrusive-table-sort-script-revisited
20:49
<erlehmann>
using the classname sortable-onload-3r-4r-5
20:51
<erlehmann>
btw, could autosortable tables have URIs?
20:52
<erlehmann>
in before „not every state should have a fragment identifier, just link to the table row” (it was just a funny idea)
20:53
<Hixie>
?
20:53
<Hixie>
i don't follow
20:53
<erlehmann>
i just thought it would be nice to be able to link to a table in the state of being sorted by specific a value.
20:54
<erlehmann>
but then i can see no use case for that
20:54
<erlehmann>
it just followed when thinking about the media fragments thing
20:54
<erlehmann>
(which i and others have many use cases for)
20:55
<Hixie>
is there a use case for inserting rows into a table without the table autosorting?
20:55
<Hixie>
assuming the table has a sort order specified
20:55
<TabAtkins>
I don't think so, no.
20:55
<Hixie>
we probably need a method on <table> to remove all sort attributes
20:56
<Hixie>
.stopSort() or something
20:56
<erlehmann>
that would violate the principle of least surprise, since adding elements would change the table from being sorted to not being sorted
20:56
<erlehmann>
so how will CSS and sorting come together?
20:57
<erlehmann>
nth-child will not work, right?
20:57
<TabAtkins>
They still work. Sorting rearranges the DOM.
20:57
<Hixie>
css is unaffected, since this all happens at the dom elvel
20:57
<Hixie>
<table sortable>
20:57
<Hixie>
<th sort[=level] onsort="comparator = function (a, b) { ... }">
20:57
<Hixie>
<table>.stopSort(); // removes all sort attributes
20:57
<Hixie>
anything else we need?
20:57
<erlehmann>
indeed? okay.
20:57
<Hixie>
(sortable="" just enables the UI)
20:58
<erlehmann>
level, what is level?
20:58
<TabAtkins>
Hixie: Is "comparator" a magic variable?
20:58
<Hixie>
sort=2 means it's a secondary key
20:58
<Hixie>
sort=3 tertiary key, etc
20:58
<Hixie>
th.comparator is just a callback
20:58
<Hixie>
i'd use an event but i assume a callback is way more efficient
20:58
<erlehmann>
ah
20:59
<TabAtkins>
Oh, okay. So the sort algorithm calls th.comparator(A,B) if it exists. Your onsort event does a JIT setting of the comparator property.
20:59
<Hixie>
right
20:59
<erlehmann>
so what is the default comparison for tables?
21:00
<Hixie>
the complicated thing we were discussing yesterday
21:00
<TabAtkins>
erlehmann: We worked one out last night.
21:00
<TabAtkins>
(date stuff) < floats < strings.
21:00
<TabAtkins>
And (date stuff) has a more complicated ordering.
21:00
<Hixie>
see http://www.whatwg.org/specs/web-apps/current-work/temp
21:00
<erlehmann>
TabAtkins, link?
21:00
<erlehmann>
thx
21:01
<Hixie>
hm, having a sort="" means we can't really have .sort()
21:01
<erlehmann>
how are strings ordered?
21:01
<TabAtkins>
lexicographic.
21:01
<Hixie>
erlehmann: unicode locale-specific based on <table lang>
21:01
<Hixie>
insensitive to case
21:01
<TabAtkins>
unicode locale-based case insensitivity?
21:02
<erlehmann>
o.0
21:02
<TabAtkins>
Hixie: Francois' response is that overflow:hidden isn't a sufficiently strong isolation guarantee.
21:02
<Hixie>
yeah i got that part, it was the why that lost me
21:02
<TabAtkins>
My response to him, immediately following yours, explains the why in more detail.
21:03
<gavin____>
where is this controvery about HTML5 CR taking place?
21:03
<gavin____>
I see twitter fights about it but no references to mailing list posts or anything
21:04
<Hixie>
gavin: www.w3.org/TR
21:04
<Ms2ger>
Where all the fights are
21:04
<Ms2ger>
http://w3cmemes.tumblr.com/
21:04
<Hixie>
i don't follow twitter myself so no idea about the twitter fights
21:04
<gavin>
Hixie: I mean where is discussion taking place, other than twitter
21:04
<erlehmann>
oh fine http://en.wikipedia.org/wiki/Unicode_Collation_Algorithm
21:04
<Hixie>
oh, i am not aware of a discussion
21:05
<erlehmann>
Ms2ger, put the doubles guy there!
21:05
<Ms2ger>
There was some sarcastic chatter about it here
21:05
<jgraham>
Sarcasm? Here? Never!
21:05
<Hixie>
TabAtkins: got it
21:06
<Hixie>
gavin: the controversy is just that the w3c went to CR with 131 open bugs and skipping the LC that the process requires
21:06
<Ms2ger>
If condescending Willy Wonka existed, he'd be a regular
21:06
<erlehmann>
i lauged a little http://w3cmemes.tumblr.com/post/35475527654/theyll-remove-h-264-support-any-moment-now
21:06
<Hixie>
gavin: while at the same time the w3c claims that they are better because Process
21:08
<jgraham>
Hixie: HAving to put <th onsort="comparator = function() {}"> seems much less nice than <th comparator="function() {}"> or something
21:08
<gsnedders>
erlehmann: Next week, I swear!
21:08
<Hixie>
jgraham: agreed, but that would be a first and I don't even know how I'd spec that.
21:09
<jgraham>
Yeah, but worth working out, I think
21:09
<jgraham>
Requiring authors to understand the magicness on onfoo attributes is pure pain
21:09
<erlehmann>
gsnedders, i would love to know why people make bold assertions like that without going through, if actually doing it is relatively simple. the only thing the chrome team has earned is distrust.
21:10
<jgraham>
Either that or an entirely different design (which I don't have a proposal for)
21:10
<Hixie>
jgraham: so you want to replace it with similarly complex, but one-off, magic? :-)
21:10
<gsnedders>
erlehmann: Decision overruled by someone higher up? I dunno. I doubt the announcement was made in bad faith.
21:10
<jgraham>
Much less complex, but one-off magic
21:10
<erlehmann>
any sufficiently advanced specification is indistinguishable from black magic
21:10
<Hixie>
jgraham: what would be less complex?
21:10
<jgraham>
You don't need to understand the implicit this
21:11
<jgraham>
You don't really need to understand the order of events
21:11
gsnedders
on the whole agrees with jgraham, but would rather not have *more* JS in HTML attributes.
21:11
Hixie
shrugs
21:11
<Hixie>
doesn't seem that big a deal
21:11
<erlehmann>
gsnedders, usually, release logs contain stuff like that.
21:12
<Hixie>
i'm rather skeptical of introducing JS in an attribute that doesn't start with "on"
21:12
<Hixie>
not that blacklisting filters are a viable option anyway, but...
21:13
<jgraham>
I'm rather skeptical of on* attributes :)
21:13
<erlehmann>
that onsort function could not be the comparator but just get a representation of the table as array and return it! then random orderings will be easy! :---DDD
21:13
<Hixie>
jgraham: well yeah but they're not going anywhere
21:14
<Hixie>
erlehmann: i considered it
21:14
<erlehmann>
aaaand threw it away because … ?
21:14
<Hixie>
erlehmann: didn't seem like the easy cases would be easy that way
21:14
<erlehmann>
it makes the common case complicated?
21:15
<Hixie>
jgraham: fwiw, you can always ignore the onsort='' and tell authors to do <table>...</table><script>myth.comparator = function(a,b){...}</script>
21:15
<alecf_>
Random suggestion from the peanut gallery: how about a sortkey=function() {…} rather than a comparator
21:15
<Hixie>
alecf_: ?
21:15
<Hixie>
alecf_: pray elaborate sir
21:15
<gsnedders>
Hixie: I'd rather just get everyone to use .comparator
21:15
<alecf_>
the sort key generates the key to compare, rather than the comparator function
21:16
<Hixie>
gsnedders: all the proposals i made above involve them using .comparator
21:16
<jgraham>
Oh that's a good point
21:16
<alecf_>
http://en.wikipedia.org/wiki/Schwartzian_transform
21:16
<gsnedders>
alecf_: Does that work even with reverse orderings?
21:16
<alecf_>
if you make it, sure!
21:16
<gsnedders>
Hixie: I'd just omit the HTML attribute :)
21:16
<Hixie>
alecf_: ah, interesting
21:16
<alecf_>
the idea is you return the key in the "scope" (i.e. unicode, numbers, whatever) such that you can use JS comparator rules around <, >, =
21:17
<erlehmann>
isn't there a declarative means of providing custom sorting algorithms?
21:17
<alecf_>
this also lets the UA optimize a whole lot more
21:17
<alecf_>
rather than your comparator being called NlogN times, your sort key is just called n times
21:17
<alecf_>
(and drastically simplifies rules around UA caching of sort keys, if desired)
21:18
<erlehmann>
this is a pretty clever thing
21:18
<jgraham>
Yes, python does the same thing
21:18
<alecf_>
yes exactly
21:18
<jgraham>
Should have thought of it before
21:18
<Hixie>
this does rather get around the problem of what to do if your comparator is ill-behaved
21:18
<Hixie>
i like it
21:19
<gsnedders>
Hixie: You could use the ES solution of not defining what happens then. :P
21:19
<Hixie>
then again, you could already do this by just hard-coding the key in the markup using <data>
21:19
<Hixie>
so maybe there's just no need to give a comparator?
21:19
<gsnedders>
(The only web-relied behaviour there is "it terminates", provided the comparitor always does)
21:20
<erlehmann>
it seems we are lacking a … halting state
21:20
<alecf_>
oh, and this lets you <td sortkey="1">one</td>
21:21
<TabAtkins>
erlehmann: Yes, using <time> and <data> wrappers aroudn the contents let you override the sorting key.
21:21
<alecf_>
oops, just saw Hixie 's comment about <data>
21:21
<TabAtkins>
Most of the time, good sort functions in languages let you override both the key func and the sort func.
21:21
Philip`
guesses you need an explicit 'reverse' option, otherwise trying to make a key function for a reverse alphabetic sort sounds like a huge pain
21:22
<erlehmann>
i advocate SQL in attributes instead of javascript
21:22
<Hixie>
yes reversing will be built-in
21:22
<erlehmann>
SELECT value FROM list WHERE value > 100 ORDER BY value ASC
21:22
<TabAtkins>
Often just overriding the key func is fine, but you do sometimes need a real comparator.
21:22
<TabAtkins>
Hixie: There are sorting algorithms that will handle badly-behaved comparators without infinite-looping, I think.
21:22
<gsnedders>
TabAtkins: There are. They are de-facto required for Array.prototype.sort.
21:22
<Philip`>
TabAtkins: Like bubble sort
21:23
<Hixie>
well this is moot since alecf_ made me realise that since we allow you to override the key, you can always just use that
21:23
<TabAtkins>
gsnedders: Yeah, that's what I thought.
21:23
<Hixie>
and get any sort order you want
21:23
<TabAtkins>
Hixie: I'm not certain you really can "always" do that. At least, I've had good reason to use both key-overriding and comparator-overriding when sorting things in programs.
21:23
<gsnedders>
TabAtkins: The exact behaviour, as I said above, isn't required for web-compat, just that it terminates given the comparator does.
21:23
<Hixie>
TabAtkins: when can't you?
21:23
<TabAtkins>
gsnedders: Yeah, that's what I'd think. The behavior woudl be more or less arbitrary anyway.
21:24
<gsnedders>
TabAtkins: Which means to get a random ordering in ES you can de-facto do arr.sort(function(a,b){return Math.random()-0.5;})
21:24
Hixie
grumbles that he wants both a sort="" attribute and a sort() method on the same object
21:24
<TabAtkins>
Hixie: For example, if the data is something that can be lexicographically sorted. You might not be able to easily map that into an existing key structure.
21:25
<TabAtkins>
gsnedders: Clever. ^_^
21:25
<Hixie>
TabAtkins: if it can be lexicographically sorted, you can just use it as the key
21:25
<TabAtkins>
Hixie: No, you can't necessarily. That depends on it being sortable using string rules.
21:25
<Philip`>
Hixie: You might want to sort first by a number, then tie-break by sorting on a string
21:25
<TabAtkins>
I mean like, tuples can be lexicographically sorted.
21:25
<Hixie>
TabAtkins: what do you mean by "lexicographically" then?
21:25
<TabAtkins>
What Philip` said.
21:26
<alecf_>
TabAtkins: you build that into your key
21:26
<Philip`>
so you can't just concatenate them
21:26
<Hixie>
Philip`: luckily, that's what the default algorithm will do
21:26
<TabAtkins>
Lexicographically means "sort per element, breaking ties by sorting the next element".
21:26
<TabAtkins>
It's defined by analogy to strings, thus the name.
21:26
<Hixie>
Philip`: but you could do that easily by just using as the key a form like "[type][key]" where type = 1 for number, 2 for string, and [key] being the key in string form
21:26
<Hixie>
Philip`: zero-padded for numbers
21:26
<alecf_>
I don't believe there is anything that can be expressed with comparator that can't be expressed with sort key, at least within the bounds of "sane" comparators
21:27
<alecf_>
(i.e. stable-sorting comparators)
21:27
<gsnedders>
This is what I believe, given a stable-sorting comparator.
21:27
<TabAtkins>
alecf_: Technically, you're probably right. Realistically, the things we're describing are easier with a comparator so you don't have to do string-encoding hacks.
21:27
<gsnedders>
(Proof is left as an exercise to the reader, etc.)
21:27
<erlehmann>
orderby RAND()
21:27
<TabAtkins>
Hixie: As gsnedders said, worrying about badly-behaved comparators is a red-herring, since Array#sort has to deal with that already.
21:27
<alecf_>
sortkey="rand()" :)
21:29
<alecf_>
TabAtkins: I'd argue that there are just as many things that are easier with a sortkey - once I started using it in python, I pretty much stopped writing comparators
21:29
<erlehmann>
TabAtkins, “string encoding hacks” ?
21:29
<Hixie>
new straw man:
21:29
<Hixie>
<table sortable> // enables UI
21:29
<Hixie>
<th sort[="[reverse] [level]"]> // enables autosorting for the table using this column as key (level 2 is secondary key, 3 is tertiary, etc)
21:29
<Hixie>
<table>.stopSort(); // removes all sort attributes
21:29
<TabAtkins>
alecf_: I'm not disagreeing. Like I said, I get plenty of use out of both keyfuncs and sortfuncs when sorting.
21:29
<Hixie>
<th>.sortNow(); // increments level of sort="" attributes, then sets this <th>'s to ""; unless it's already level 1, in which case it just flips the presence of "reverse"
21:29
<alecf_>
note I said "just as many", I'm not trying to say which is better for expressiveness
21:29
<Philip`>
Hixie: I don't mean that keys are either numbers or strings (so you can't just tag them with a single type) - they're a tuple like (100, "a") or (100, "b") or (-100.5, "a")
21:30
<TabAtkins>
erlehmann: Like if you're lexico sorting a (number, string) tuple, having to encode the number to sort right with string-sorting rules.
21:30
<erlehmann>
i am looking for declarative collation efforts right now
21:30
<Philip`>
and in general you can't sort numbers by converting them to strings and doing normal string comparison, because you want -2 < -1 < 0 < 1 < 2
21:31
<Hixie>
Philip`: just zero-pad the number so it's aligned on the same decimal, then concatenate the string and use that. 0100.0a 0100.0b -100.5a
21:31
<Hixie>
Philip`: yeah fair enough, you'd need to reverse the sort key for negative numbers
21:32
<Hixie>
1:100.0a 1:100.0b 0:899.5a
21:32
<Hixie>
or some such
21:32
<Hixie>
anyway, we can support a comparator if people want one
21:32
<Hixie>
i don't mind
21:32
<TabAtkins>
Hixie: That means you have to first scan the table to know how wide your numbers are, or adopt a number-encoding solution that doesn't need zero-padding (like http://www.xanthir.com/blog/b4K70)
21:33
<SimonSapin>
gsnedders: sort(function(a,b){return Math.random()-0.5;}) can be biased if the sorting algorithm assumes transitivity http://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#Comparison_with_other_shuffling_algorithms
21:33
<Hixie>
TabAtkins: yeah
21:33
<erlehmann>
TabAtkins, fail link
21:33
<gsnedders>
SimonSapin: Indeed.
21:33
<erlehmann>
correct link is about:blank
21:33
<TabAtkins>
erlehmann: Not my fault.
21:33
<erlehmann>
err http://www.xanthir.com/blog/b4K70
21:34
<Hixie>
that's the URL he gave
21:34
<erlehmann>
TabAtkins, parenthesis unencoded in URL where it is not part of URL.
21:34
<TabAtkins>
irssi isn't interpreting it as a link, presumably because of the ) following it.
21:34
<gsnedders>
irssi doesn't handle links, your terminal does.
21:34
<Hixie>
TabAtkins: ah yes, i remember reading about this a few months ago
21:34
<TabAtkins>
Wait, never mind, it does work.
21:35
<Hixie>
the ) was unambiguously not part of the url since otherwise he'd have unbalanced parentheses :-P
21:35
<erlehmann>
TabAtkins, http://en.wikipedia.org/wiki/The_Walking_Dead_(TV_series) contains a closing parenthesis at the end
21:35
<TabAtkins>
erlehmann: Yes yes, you're right. Should have surrounded it in <>.
21:35
<Hixie>
ok new strawman:
21:35
<Hixie>
<table sortable> // enables UI
21:35
<Hixie>
<th sort[="[reverse] [level]"]> // enables autosorting for the table using this column as key (level 2 is secondary key, 3 is tertiary, etc)
21:35
<Hixie>
<th onsort=""> // called just before sort happens but after the sort="" attributes are updated; return false to cancel sort (so you can do it yourself)
21:36
<Hixie>
<th>.comparator = function(a, b) { } // comparator for this column
21:36
<Hixie>
<table>.stopSort(); // removes all sort attributes
21:36
<gsnedders>
SimonSapin: It is often good enough as an approximation, however
21:36
<Hixie>
<th>.sortNow(); // increments level of sort="" attributes, then sets this <th>'s to ""; unless it's already level 1, in which case it just flips the presence of "reverse"
21:36
<erlehmann>
Hixie, as someone who several times tried to work around the issue of peopleusing parenthesis, I dare you to write something that will result in few false negatives
21:36
<Hixie>
erlehmann: my brain seems to manage it pretty well
21:36
<SimonSapin>
gsnedders: fair enough
21:36
<Philip`>
erlehmann: Write something that parses it both ways then checks whether one is a 404
21:37
<erlehmann>
Hixie, that is because your brain is not using regular expressions. you are probably an agent of ZALGO.
21:37
<Hixie>
my workflow isn't utf-8 safe enough for me to be an agent of zalgo
21:37
<erlehmann>
what i did was if the string started with (http ignore last parenthesis
21:38
<erlehmann>
so (http://example.org) is highlighted as http://example.org
21:38
<erlehmann>
otherwise, take them in. wikipedia articles are common enough to warrant this
21:38
<Hixie>
ok last chance to stop me wasting my time speccing something you're going to complain about later
21:38
<TabAtkins>
Hixie: You doing the keyfunc thing?
21:38
<gsnedders>
Hixie: What's the point of sortStop?
21:38
<Hixie>
TabAtkins: see new strawman above
21:39
<erlehmann>
is there no feasible way of declaratively specifying comparators?
21:39
<TabAtkins>
Hixie: Yes, I don't see it. I was wondering. ^_^
21:39
<Hixie>
gsnedders: it makes it so you can insert rows into the table again without it magically sorting the rows for you
21:39
<Hixie>
TabAtkins: no keyfunc, just <data value=""> if you want to do a key thingy
21:39
<erlehmann>
Hixie, why not just remove the attribute then?
21:39
<TabAtkins>
erlehmann: You can declaratively specify your key, but not your comparator.
21:39
<gsnedders>
Hixie: Does this warrant a function built-in for it?
21:39
<Hixie>
erlehmann: there might be dozens of it
21:39
<TabAtkins>
Hixie: Okay.
21:40
<TabAtkins>
Hixie: I'm happy enough with the strawman.
21:40
<Hixie>
gsnedders: i don't know how else to do it. How do you get a list of all the <th> descendants with a sort="" attribute that aren't part of another table then strip the attributes from those <th>s?
21:40
<erlehmann>
TabAtkins, declarative comparison speccing is impossible in a goedelian way?
21:40
<Hixie>
gsnedders: short of manually walking the tree or something
21:40
<erlehmann>
like, mathematically impossible short of enumerating every value?
21:41
<gsnedders>
Hixie: Oh, right, yes, nested tables do complicate that.
21:41
<TabAtkins>
erlehmann: No, not really. ^_^ Just more complex than is warranted for a feature like this.
21:41
<Hixie>
can you do table.querySelectorAll('table:scope > thead > tr > th[sort]').apply(function (node) { node.removeAttribute('sort') } ); or something?
21:41
<erlehmann>
TabAtkins, can you point me to some ways to do it?
21:42
<Hixie>
if you want a turing complete solution for the comparator syntax, isn't it by definition not declarative?
21:42
<Hixie>
i assume by "declarative" you mean "a turing machine can determine if it halts"
21:42
<gsnedders>
Hixie: Well, are we requiring it to be inthead?
21:43
<TabAtkins>
erlehmann: Not without some effort to find some. I imagine something based on (1) having a set of basic types that are sortable, and (2) having a declarative parser that turns values into those types would work.
21:43
<Hixie>
gsnedders: probably, though for the sake of argument you could replace that with :matches(thead, tbody)
21:43
<erlehmann>
Hixie, it reminds me of my synthesizer problem. i used declarative means so it would guarantee to return in 30ms providing the next sample.
21:43
<Hixie>
it's easy to guarantee that code will return in 30ms
21:43
<Hixie>
alarm(30ms)...
21:43
<erlehmann>
no more turing complete input languages! repent!
21:44
<gsnedders>
Hixie: Then yeah, that would work.
21:44
<erlehmann>
what is the behaviour, if autosort is on and the comparator does not halt?
21:44
<Hixie>
really? holy cow, if that really would work that's impressive
21:44
<gsnedders>
Hixie: Why wouldn't it?
21:44
<TabAtkins>
erlehmann: Same as infinite-looping in JS. That's exactly what it is, after all.
21:44
<Hixie>
since i basically guessed at both querySelectorAll() being on elements, :scope working as i expected, and .apply() being on its return value
21:45
<Hixie>
erlehmann: a dialog pops up saying "a script on this page isn't halting..."
21:45
<gsnedders>
Heh. :)
21:45
<TabAtkins>
Hixie: Oh, no, apply doesn't exist.
21:45
<Hixie>
boo
21:45
<TabAtkins>
You need to cast the nodelist into an array and then call map or forEach.
21:45
<gsnedders>
Hixie: I might have slightly misremembered, but basically the approach works.
21:45
<erlehmann>
TabAtkins, now consider a comparator that does not halt … on some edge cases. and some table filled dynamically with stock prices or whatever.
21:45
<TabAtkins>
[].slice.call(table.querySelectorAll(...)).forEach(...);
21:45
<Hixie>
you can cast a NodeList into an Array?
21:45
<Hixie>
lordy
21:45
<TabAtkins>
Hixie: You can cast anything with a .length property into an array.
21:46
<annevk>
Hixie: FYI, Twitter liks the sortable tables stuff
21:46
<Hixie>
your definition of "cast" isn't quite the same as mine but fair enough
21:46
<TabAtkins>
What I wrote above is the standard idiom for such.
21:46
<annevk>
likes, even
21:46
<Hixie>
wasn't heycam working on making NodeLists Arrays?
21:46
<gsnedders>
TabAtkins: or use Array.prototype.apply.call(table.querySelectorAll(…), function(node){node.removeAttr…})
21:46
<gsnedders>
Given Array.prototype.apply is generic
21:46
<TabAtkins>
gsnedders: Too voodoo for me.
21:46
<Hixie>
annevk: the company, or random people watching us jibber jabber here?
21:46
<Hixie>
if the random people, hi random people
21:46
<Hixie>
come on down!
21:46
<Hixie>
join us
21:46
<gsnedders>
TabAtkins: It's what I tend to do. :)
21:46
<annevk>
Hixie: we're still working on making NodeList arrays, but web compat might be against us
21:47
<Hixie>
annevk: NodeList.asArray()?
21:47
<TabAtkins>
As soon as I see .[call|apply].[call|apply], I bail.
21:47
<annevk>
Hixie: random people retweeting my tweet of your sketch link
21:47
<erlehmann>
hey, annevk, can i use tilde in hashes as separator? you are the new URL god, right? :3
21:47
<TabAtkins>
Hixie: No, natively arrays.
21:47
<Hixie>
annevk: aah
21:47
<annevk>
Hixie: what TabAtkins said
21:47
<annevk>
erlehmann: I just write down what get its implemented
21:47
<erlehmann>
did you mean “aaaaaaaah” (implying implications)
21:48
<Hixie>
oh yeah, i assumed that was impossible
21:48
<gsnedders>
TabAtkins: Oh, I meant forEach.call, bah!
21:48
<Hixie>
but i mean can't we add a .asArray() method?
21:48
<Hixie>
that'd be sufficient
21:48
<erlehmann>
annevk, oh okay. then i need to defeat the implementors … by becoming one of them!
21:48
<annevk>
Hixie: that sounds doable, not sure if that's nice enough
21:48
<annevk>
erlehmann: but why not ";"?
21:48
<TabAtkins>
gsnedders: Oh, haha, yeah, that'd work.
21:48
<Hixie>
so table.querySelectorAll('table:scope > thead > tr > th[sort]').asArray().forEach(function (node) { node.removeAttribute('sort') } );
21:49
<Hixie>
annevk: well it's better than the pseudo-casting you have to do now to get forEach
21:49
<TabAtkins>
Hixie: In our ideal world, remove the .asArray() call.
21:49
<annevk>
Hixie: yeah fair enough
21:49
<Hixie>
TabAtkins: yeah, but if that's impossible for web compat...
21:49
<annevk>
Hixie: I'll try to make a note of that somewhere
21:49
<Hixie>
what's the difference between .forEach() and .apply()?
21:50
<TabAtkins>
Hixie: apply() is a method on Function that calls the function, taking an array and expanding it into the individual arguments.
21:50
<TabAtkins>
.forEach is a method on Array that calls a function on each element of the array.
21:50
<othermaciej>
forEach() is like map() that doesn’t collect the results
21:50
<TabAtkins>
They are completely different. .apply() is just a variant of .call().
21:50
<erlehmann>
annevk, data indicates that some characters are already used often, bottom of this mail http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2012-December/038430.html
21:50
<gsnedders>
.apply just calls [[Call]]
21:51
<gsnedders>
foo.apply(undefined, [a,b,c]) == foo(a,b,c)
21:51
<erlehmann>
tilde in fragment is used virtually never
21:51
<gsnedders>
(assuming Function.prototype.apply and undefined have their initial values, etc.)
21:51
<Hixie>
wait so Array.prototype.apply.call(table.querySelectorAll(…), function(node){node.removeAttr…}) doesn't work
21:51
<TabAtkins>
Hixie: Array.prototype doesn't have an apply method.
21:51
<annevk>
erlehmann: hmm, I don't really buy the compat argument
21:51
<TabAtkins>
I don't know what language you got that naming pattern from.
21:51
<Hixie>
gsnedders stop confusing me man
21:51
<gsnedders>
Hixie: s/apply/forEach/
21:51
<Hixie>
:-P
21:51
<annevk>
erlehmann: you could just check if the value is an ID somewhere first, and then split on ";" if it's not
21:52
<gsnedders>
Hixie: I made that correction forever.
21:52
<gsnedders>
*forever ago
21:52
<gsnedders>
Hixie: Keep up, man!
21:52
<annevk>
erlehmann: but anyway, don't really care
21:52
<annevk>
erlehmann: http://url.spec.whatwg.org/#writing has rules on fragment code points
21:52
<erlehmann>
annevk, that is what i could do if there is no suitable character.
21:53
<erlehmann>
annevk, i could also only split on delim if there is an equals character following which almost guarantees web compat
21:54
<annevk>
erlehmann: I'd try to keep the algorithm extremely simple
21:54
<annevk>
erlehmann: I doubt implementors like fiddling around with fragment identifier code
21:55
<erlehmann>
annevk, then I will have to learn to to play the fiddle myself
21:56
<erlehmann>
annevk, in the end, not having to look for an element on the page could make processing simpler.
22:01
<annevk>
well remember that 1) it's just a hashmap lookup and 2) that's the 99% scenario
22:02
<annevk>
media fragments are the 1%, if that
22:11
<erlehmann>
I AM THE 1%
22:11
<erlehmann>
I AM BATMAN
22:11
<erlehmann>
oh noes, dan cederholm is batman http://cssquirrel.com/comic/?comic=35
22:27
<Hixie>
suppose there are three columns A, B, and C
22:27
<Hixie>
suppose the user sorts by C, then B, then A
22:27
<Hixie>
so they have sort="", sort="2", and sort="3" respectively (A, B, C)
22:28
<Hixie>
now the user clicks B again
22:28
<Hixie>
should they have sort="2", sort="", sort="4", or should they have sort="2", sort="", sort="3"?
22:28
<Hixie>
(pretend all those sort=""s are sort="1" if you prefer that, that's not the point of this)
22:28
<erlehmann>
o.0
22:30
<JonathanNeal>
hi
22:31
<Hixie>
also, should sort="2 reverse" and sort="reverse 2" both be supported, or should the level always come first/second?
22:31
<erlehmann>
i want <table sortable autosort="lastname firstname age"> with id values on th
22:31
<erlehmann>
can i have it? :3
22:31
<TabAtkins>
Hixie: Either ordering should be allowed.
22:32
<erlehmann>
hixie why overload the attribute for two things unrelated to each other?
22:32
<TabAtkins>
Hixie: For your previous question, preferably 2/1/3.
22:32
<Hixie>
TabAtkins: ta
22:32
<JonathanNeal>
either sounds easier
22:32
<Hixie>
erlehmann: they're not unrelated, they're saying that this is a column that is to be used for sorting, and how to use the column for sorting
22:33
<erlehmann>
hixie, those are two distinct properties.
22:33
<annevk>
yeah, 2/1/3, possibly with B reversed?
22:34
<Hixie>
annevk: ignore the reversal thing, i'm just trying to work out how much work i should force onto the browsers in terms of normalising values
22:34
<erlehmann>
remember reverse ordered lists?
22:34
<Hixie>
erlehmann: how would you do it? (style="" has many properties...)
22:34
<Hixie>
reverse ordered lists?
22:34
<erlehmann>
http://blog.whatwg.org/reverse-ordered-lists
22:34
<erlehmann>
there is a single reserve attribute mentioned
22:34
<erlehmann>
reverse
22:34
<erlehmann>
sorry
22:35
<Hixie>
yes?
22:35
<Hixie>
how is this related
22:35
<annevk>
Hixie: from other cases, e.g. DOMTokenList, the consensus seems to be that UAs prefer the simplest possible internal format and then serialize that
22:35
<annevk>
Hixie: (I changed DOMTokenList from being string-based to being an ordered set)
22:36
<Hixie>
annevk: k
22:36
<Hixie>
annevk: not sure which is the simplest internal format here
22:36
<Hixie>
annevk: not sure how that would affect this, either
22:36
<erlehmann>
hixie, i would to <table sortable orderby="foo bar"><tr><th id=foo>fooooo</th> <th id=baz>baaaaz</th> <th id=bar reverse>bar</th> …
22:36
<Hixie>
annevk: i mean, the format seems orthogonal
22:37
<annevk>
Hixie: column ref + boolean indicating order, but yeah, doesn't matter much
22:37
<erlehmann>
(orderby = autosort, here only mentioned because of SQL)
22:37
<Hixie>
erlehmann: yikes
22:37
<Hixie>
erlehmann: i don't want the information split that far apart
22:37
<erlehmann>
hixie, it would be easier for authors.
22:37
<Hixie>
that i'm not at _all_ convinced of
22:37
<erlehmann>
currently, to find the sort order you have to look in several places
22:37
<Hixie>
requiring id=""s everywhere is horrible for authors imho
22:38
<JonathanNeal>
agreed
22:38
<Hixie>
if you want to _find_ the sort order, we can expose a method that does that
22:38
<JonathanNeal>
i avoid ids at all costs.
22:38
<annevk>
JonathanNeal: btw, most open license is CC0
22:38
<Hixie>
i'm more worried about setting the sort order
22:38
<erlehmann>
but having the sort order in one attribute for the table would be much more readable
22:38
<Hixie>
which seems far more likely
22:38
<erlehmann>
and author-able
22:38
<Hixie>
i disagree about authorable
22:38
<Hixie>
readable maybe
22:38
<Hixie>
though even then...
22:39
<JonathanNeal>
annevk: interesting, why do they bring up moral rights?
22:39
<annevk>
JonathanNeal: dunno
22:39
<erlehmann>
set sort order by a string!
22:39
<TabAtkins>
JonathanNeal: I use cc0 for things that I want to release into the public domain, because many countries don't have a public domain.
22:39
<annevk>
JonathanNeal: most of spec.whatwg.org is using that
22:39
<erlehmann>
table.orderby = 'rank lastname firstname'
22:40
<erlehmann>
:3
22:40
<erlehmann>
this would be so cool
22:40
<JonathanNeal>
what would be the primary difference between MIT and CC0?
22:40
<annevk>
JonathanNeal: CC0 requires nothing of the people using your code
22:41
<erlehmann>
hixie, interacting with sort=1, sort=2, etc. would also require more code :/
22:41
<annevk>
erlehmann: depends on the API
22:42
<JonathanNeal>
I like everything about CC0, except I'm a little confused by http://creativecommons.org/choose/zero/ "Using CC0, you can waive all copyrights and related or neighboring rights that you have over your work, such as your moral rights (to the extent waivable)"
22:42
<erlehmann>
annevk, table.orderby = [string of th ids delimited by spaces] is very easy API.
22:42
<annevk>
Hixie: dunno about what's best here, I guess I'd look at what the libraries have done
22:42
<annevk>
erlehmann: nah
22:42
<annevk>
erlehmann: IDs suck
22:43
<Hixie>
erlehmann: i'm happy to provide that API if that's useful, I'm just talking about what the DOM itself looks like for now
22:43
<annevk>
JonathanNeal: it's the same as putting your stuff in the public domain except as TabAtkins says it works in more countries
22:43
<erlehmann>
<table sortable autosort orderby="rank lastname firstname"> <tr> <th id=rank> … vs. <table sortable autosort> <th><tr sort=1> …
22:43
<erlehmann>
the latter is opaque
22:43
<Hixie>
erlehmann: no "autosort" in the latter
22:43
<Hixie>
just <table sortable><tr><th sort>
22:44
<JonathanNeal>
Does that mean people can draw dirty pictures in my library? Rather, don't MIT and GPL libraries allow that too? What does it mean to explicitly point that out?
22:44
<Hixie>
and the sortable="" is only needed if you want the UI
22:44
<erlehmann>
hixie, if autosort is implied if a sort order is given one could also remove it from the former
22:44
<Hixie>
right
22:44
<TabAtkins>
JonathanNeal: Some countries recognize a creator's "moral rights" in their work. It's a pretty nonsense concept, but you still need to explicitly waive it if you want to be as free as possible. ^_^
22:44
<annevk>
JonathanNeal: it means they don't have to copy your license terms
22:44
<erlehmann>
<table orderby="rank name file">
22:45
<erlehmann>
hixie, what benefits does your current approach give from a DOM manip perspective?
22:45
<Hixie>
<table orderby="rakn name file"><tr><th id=rank> <th id=name> <th id=file> <th> vs <table><tr><th sort=1><th sort=2><th sort=3><th>
22:45
<Hixie>
but question, what happens in your case if the user clicks the fourth column?
22:45
<Hixie>
(note that in the markup i just posted, yours won't work because i typed an ID, oops)
22:45
<Hixie>
typoed
22:46
<JonathanNeal>
annevk: that makes a lot more sense, except I wouldn't have chosen the word moral. TabAtkins that also kinda makes sense, except it's really vague. Like … sorry, you can't use this library, it was made in England and that means it is overseen by the Church of England.
22:46
<TabAtkins>
It has nothing to do with morality.
22:46
<annevk>
JonathanNeal: dunno man, stuff has been checked by the lawyers
22:46
<TabAtkins>
It's more like, exploiting someone's work without paying them is morally wrong. Legally recognizing that means granting moral rights.
22:46
<annevk>
JonathanNeal: maybe http://creativecommons.org/about/cc0 helps?
22:47
<erlehmann>
hixie the active columns is implicitly the most important column for sorting
22:47
<TabAtkins>
American copyright has no moral rights, for example. It's an economic concept only.
22:47
<JonathanNeal>
I understand, I had never thought to disassociate the phrase "moral rights" with morality.
22:47
<Hixie>
erlehmann: i mean, what's the value of orderby=""
22:47
<Hixie>
erlehmann: after the user clicks the fourth column
22:48
<JonathanNeal>
TabAtkins: got it. Thanks for explaining that to me.
22:48
<JonathanNeal>
annevk: i had seen both pages, and it really just didn't hit me right. I think you understand what my disconnect was. Again, I really appreciate the explanation. I hope I can relicense a lot of my work CC0 now.
22:49
<erlehmann>
hixie, i see what you did there.
22:49
<annevk>
JonathanNeal: teehee :)
22:50
<erlehmann>
hixie, if only what is targetable would trigger sort, we could link to tables being sorted by linking to its table head.
22:50
<erlehmann>
that would be rad
22:50
<JonathanNeal>
So, the primary difference between MIT and CC0 is that CC0 is saying "this license tells you to do what you please, including neglecting to tell others the same by including this notice"
22:50
<Hixie>
erlehmann: that seems like it would make writing sortable tables a huge pain. I'd much rather just make it possible by only including a sortable="" attribute.
22:51
<erlehmann>
JonathanNeal CC is always more broad because CC lawyers work on internationalization
22:51
<Hixie>
ok, next question: should the UA use sort=""/sort="reverse" for the primary key, or sort="1"/sort="1 reverse" ?
22:51
<Hixie>
(all are supported, for authors)
22:51
<erlehmann>
list form.
22:51
<Hixie>
(just talking about what the browser ses)
22:51
<erlehmann>
last form
22:51
<Hixie>
sets
22:51
<TabAtkins>
The former.
22:51
<erlehmann>
haha, a typo that actually makes sense
22:52
<Hixie>
anyone want to tie-break this one?
22:52
<erlehmann>
wait
22:52
<erlehmann>
i retract and read the statement again
22:52
<erlehmann>
i am sleepy
22:52
<Hixie>
lol
22:52
<erlehmann>
<th sort=1 reverse>
22:52
<erlehmann>
i would like that
22:53
<erlehmann>
or, no
22:53
<erlehmann>
i think i did not understand the question
22:53
<erlehmann>
sorry :(
22:53
<erlehmann>
is the question if the the primary key does implicitly have a number even if it is just <th sort> ?
22:54
<erlehmann>
<th sort reverse> would be shorter than <th sort=1 reverse>
22:54
<erlehmann>
but explicit is better than implicit
22:54
<Hixie>
sort="" and sort="1" mean the same thing. The question is which the UA is going to prefer when it is the one setting the attribute.
22:55
<erlehmann>
is there precedence of magic values appearing when setting the attribute through UA?
22:55
<Hixie>
<details open> is (i think) the only other time we have had the UA set attributes, and it doesn't have a value
22:55
<erlehmann>
i am going with TabAtkins (if TabAtkins is for sort="")
22:56
<erlehmann>
but then, again i think that sort should not be overloaded with two meanings
22:56
<Hixie>
granted
22:56
<Hixie>
but (a) it's one meaning and (b) i don't understand how else to do it
22:57
<erlehmann>
can you leave the issue open? i mean, there is no implementation yet?
22:57
<Hixie>
this whole thing is open
22:57
<Hixie>
we're just talking about my first straw man here
22:57
<erlehmann>
well, the meaning may be „one“ in one sense, but it is not atomic
22:57
<erlehmann>
it can be decomposed
22:57
<Hixie>
(e.g. what does <tr> <th reverse> <th reverse> mean?)
22:57
<Hixie>
lots of things can be decomposed
22:58
<erlehmann>
well, the boolean „should this be ordered reversed“ cannot be decomposed
22:58
<Hixie>
value="102" can be decomposted into value-units="2" value-tens="0" value-hundreds="1"
22:58
<Hixie>
a boolean is the one thing that typically cannot be decomposed, agreed
22:58
<Hixie>
but life will be hell if we decompose everything down to bit level in the markup :-P
22:59
<erlehmann>
and here we have an attribute containing a boolean and an integer
22:59
<erlehmann>
that does not seem very clever to me.
22:59
<Hixie>
a signed number is just a boolean and an unsigned number
22:59
<erlehmann>
i cannot imagine that it be pleasant to work with if one first needs to split on a space and then work on it
22:59
<Hixie>
should we decompose all signed numbers :-)
22:59
<erlehmann>
nope.
22:59
<Hixie>
why would you work on it?
23:00
<Hixie>
again, if you need a way to use this, that's what APIs are for
23:00
<Hixie>
so far i'm not aware of any use cases for this entire feature to be anything but write-only
23:00
<erlehmann>
some data structures can make UA processing unnecessarily complex
23:01
<Hixie>
as anne said, UAs will almost certainly have optimised forms for all this internally
23:01
<erlehmann>
those two things, sort order and reversal of list, are at to different levels
23:01
<erlehmann>
sort order is „how does this thing behave to other things“
23:02
<erlehmann>
and reverse is „how does this thing behave internally“
23:02
<erlehmann>
(i should do more philosophy of language)
23:03
<Hixie>
the alternative syntaxes i've considered all end up being more messed up
23:03
<erlehmann>
i think <tr> <th reverse> <th reverse> could mean „sort in markup order, reverse columns“
23:03
<Hixie>
so reverse="" implies sort=""?
23:03
<Hixie>
i thought they were unrelated :-)
23:03
<erlehmann>
oh, wait, sort implies sortable?
23:04
<Hixie>
no
23:04
<erlehmann>
so sortable is like controls attribute for audio? only for showing interface?
23:04
<Hixie>
sort="" means "sort the table by this column"
23:04
<erlehmann>
i see.
23:04
<Hixie>
sortable="" means "show UI for columns of this table to allow the sort="" attribute to be set"
23:04
<Hixie>
right
23:05
<erlehmann>
hmm.
23:06
<erlehmann>
btw, i often bring up the WHATWG process in discussions about community management
23:06
<erlehmann>
(non sequitur, i know)
23:07
<Hixie>
the process being throw things at the wall and let whoever's around pick up the pieces and try to come up with something pretty? :-)
23:07
<erlehmann>
and i think it is great how low the barrier to entry is. submitting patches to wordpress is harder.
23:08
<erlehmann>
unnatural selection!
23:08
<erlehmann>
if you have sort="1 reverse", then the UA needs to decompose it before processing for either of them and compose it before writing it back.
23:08
<erlehmann>
btw, reverse without sort could be meaningless if you want to avoid implications.
23:10
<erlehmann>
i am beginning to think that <table orderby="1 2 3 4 5"> could be the superiour solution to sort attributes. just move the activated column to front.
23:10
<erlehmann>
let me polyfill that
23:11
<JonathanNeal>
"let me polyfill that" ripe for the memes.
23:12
<erlehmann>
coincidentally, i am writing a book about internet memes
23:13
<erlehmann>
currently
23:13
<erlehmann>
:3
23:13
<erlehmann>
oh, anyone of the WHATWG will be at 29C3 in hamburg?
23:14
<erlehmann>
http://en.wikipedia.org/wiki/Chaos_Communication_Congress
23:14
<erlehmann>
(I ask that every year and no one is there)
23:22
<Hixie>
erlehmann: the problem with that is it is very brittle if the author adds a new column
23:22
<erlehmann>
why?
23:23
<erlehmann>
just add the number of the new column to orderby?
23:23
<Hixie>
TabAtkins: so jeff tells me that it's not a violation after all, because none of the changes after LC were substantial (lol)
23:23
<Hixie>
erlehmann: all the column numbers change
23:23
<Hixie>
erlehmann: but the change happens removed from the place you add the columns
23:24
<erlehmann>
hixie so adding new columns is a common enough operation, but you do not want ids? then, i see.
23:25
<JonathanNeal>
In practice, should an <aside> ever be a child of <main>?
23:26
<erlehmann>
jonathanneal, have you tried that rationalist taboo game with <main> already?
23:28
<erlehmann>
i think building my own table sorting stuff will enable me to understand theproblems better
23:28
<erlehmann>
so i do not ask that many questions
23:28
<erlehmann>
i do not want to annoy
23:28
<erlehmann>
but i realize i ask many questions. sometimes in class at school i was asking more questions than anyone else
23:29
<erlehmann>
and i do not know if it is because many people are smarter than me or because i have the courage to ask.
23:29
<JonathanNeal>
erlehmann: yes, someone wrote an excellent description of the main element without using the word "main" or some other obviously thesaurical equivalent.
23:29
<erlehmann>
silly double bind!
23:29
<erlehmann>
jonathanneal, URL?
23:31
<JonathanNeal>
Something like "defining content that is unique to a document but excludes content that is repeated across a set of documents"
23:31
<JonathanNeal>
*but excluding
23:31
<JonathanNeal>
Actually, it's here, and written better https://dvcs.w3.org/hg/html-extensions/raw-file/tip/maincontent/index.html
23:32
<erlehmann>
jonathanneal, so that includes advertisments.
23:33
<erlehmann>
?
23:33
<erlehmann>
jonathanneal, what distinguishes the <main> element from an all-encompassing <article> ?
23:33
<JonathanNeal>
this is addressed in http://www.webmonkey.com/2012/12/proposed-main-element-would-help-html-get-to-the-point/
23:34
<erlehmann>
oh, effect on the document outline
23:34
<erlehmann>
it has none
23:35
<erlehmann>
hmm, is role=main bad?
23:35
<erlehmann>
it seems it is easier to update sites with new attributes without breaking anything than updating them with new elements
23:36
<erlehmann>
because the latter could break far more scripts and stylesheets
23:36
<erlehmann>
jonathanneal, is the main element coming from the department of redundancy department?
23:37
<erlehmann>
<article role=main> would be much more useful for content i think.
23:38
<erlehmann>
because then one could have an outline and skip to the important parts in the outline!
23:38
<erlehmann>
if <main> does not affect the outline, then it is a herpy derpy <div>
23:38
<JonathanNeal>
If you google some combination of "html main element" you should see all the arguments, for and (I'm sure) even against.
23:40
<JonathanNeal>
erlehmann: i'll note that, and use <header> in only the most herpy derby of situations. i was asking about something contextually about <main> and did not intend to describe my rationalist taboo game and then arguments for inclusion.
23:40
<erlehmann>
caveat „there are arguments, just google them“ loses the discussion. i deem this jonathan neal's law. ;)
23:41
<erlehmann>
(i prefer URLs)
23:41
<JonathanNeal>
you are definitely letting me know your preferences.
23:41
<erlehmann>
great!
23:41
<erlehmann>
super happy fun time!
23:42
<JonathanNeal>
So, now that we've discussed all of that, would you like to answer my question?
23:43
<Hixie>
while i'm afk, let me know if I've missed anything (other than the XXX bits) in http://www.whatwg.org/specs/web-apps/current-work/temp
23:43
<Hixie>
bbiab
23:45
<erlehmann>
sortNow() seems weird
23:45
<JonathanNeal>
Whatever happened to <subline> ?
23:46
<JonathanNeal>
And is <hgroup> dead?
23:46
<erlehmann>
what was <subline> ?
23:46
<JonathanNeal>
http://www.w3.org/html/wg/wiki/ChangeProposals/hgroup
23:46
<erlehmann>
hgroup is there and is useful for outlines
23:47
<TabAtkins>
<subline> was <hgroup> in another form.
23:49
<JonathanNeal>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=11828 erlehmann more on the subject
23:49
<JonathanNeal>
I thought Hixie removed hgroup.
23:50
<erlehmann>
oh do i have to remove hgroup now from my websites?
23:50
<erlehmann>
how do i do subtitles then?
23:50
<JonathanNeal>
http://html5doctor.com/the-hgroup-hokey-cokey/
23:50
<JonathanNeal>
TabAtkins should be able to offer a compressed version of the battle's end.
23:51
<erlehmann>
multiple mentionings of hgroup https://www.w3.org/Bugs/Public/buglist.cgi?quicksearch=hgroup
23:51
<erlehmann>
i have to read CSSsquirrel again, do i?
23:51
<erlehmann>
i read it some time ago