00:02
<annevk5>
the script decoding stuff seems wrong
00:03
<annevk5>
HTTP should take precedence over BOMs
00:08
<annevk5>
also, it seems if that algorithm allowed for passing in a charset it could be used by HTML5 as well
00:20
<Lachy>
http://reports.graymattergravy.com/2009/03/16/html-5-ogg/
00:31
<Hixie>
the algorithm for <script> is similar but not quite
00:31
<Hixie>
and i'm pretty sure the bom overrides the mime type
00:31
<Hixie>
file a bug with a test case if it doesn't :-)
00:36
<annevk5>
are you saying scripts work different from text/html?
00:36
<annevk5>
because for text/html you specify that HTTP overrides BOM
00:36
Hixie
points to the topic
00:37
<annevk5>
i sort of doubt impl are consistent on that and it seems icky
00:37
<annevk5>
oh well, will test some day
01:13
Lachy
hangs his sense of logic on the hook outside and enters to say...
01:13
<Lachy>
Hixie, is it really necessary to have the BOM override HTTP for script encoding detection, despite that being inconsistent with everything else?
01:42
<Hixie>
Lachy: isn't that what happens now for <script>?
01:42
<Hixie>
Lachy: anne asked the same question
01:43
<Hixie>
Lachy: i thought i had just used the same algorithm as <script>
01:43
<Hixie>
Lachy: if it's wrong, file a bug
02:02
<Lachy>
Hixie, I thought the way browsers determined the encoding of external scripts was to first check the HTTP Content-Type header, or else use the BOM if present, or else use the document's encoding.
05:53
jwalden
wonders why IE8 occasionally, but not consistently, displays acid2 as <http://web.mit.edu/jwalden/www/ie8-acid2-fail.png>;
05:54
<jwalden>
(that's a remote desktop setup, which might have an effect)
08:15
<olliej>
roc: any idea if jruderman is online anywhere?
08:15
<roc>
right now?
08:16
<olliej>
roc: yeah
08:16
<roc>
no idea really
08:16
<olliej>
roc: bah, i expect you to know all :D
08:17
<roc>
it is Saturday night here you know :-)
08:23
<olliej>
roc: psh, details
08:24
<roc>
maybe I need to point out that some of us aren't online much on weekends due to having families and being old
09:59
<annevk5>
https://bugzilla.mozilla.org/show_bug.cgi?id=484406 is somewhat interesting
10:49
<gsnedders>
Anyone got any thoughts on creating a html5lib.serialize function?
10:51
<MikeSmith>
gsnedders: doesn't html5lib already contain a function for doing serialization?
10:51
<gsnedders>
MikeSmith: Only by calling about ten functions
10:53
<MikeSmith>
gsnedders: so html5lib.serialize would basically be a convenience wrapper that executes the existing code?
10:53
<gsnedders>
MikeSmith: Yeah
10:54
<gsnedders>
MikeSmith: Like html5lib.parse is one for parsing
10:54
<MikeSmith>
yeah
10:54
<gsnedders>
The only fun thing is you need to know what format the tree is in
10:54
<gsnedders>
(Like, is it dom, is it etree, etc.)
10:54
<MikeSmith>
yeah
10:54
<gsnedders>
That can be worked around by just doing stuff like hasattr
10:55
<MikeSmith>
ah, yeah
10:55
<gsnedders>
(And hoping people don't do really whacky OO stuff subclassing stuff)
10:55
<MikeSmith>
hmm
10:55
<MikeSmith>
people do whacky stuff
10:55
<MikeSmith>
in general
10:55
<gsnedders>
Probably better allow it to be explicitly stated the format, but try sniffing if it isn't
10:57
<MikeSmith>
my experience in product-dev orgs is that engineers always swear "no sane user will ever do that".. and as soon as the product is actually deployed, we have actual users (customers) doing just what engineering claimed they'd have to be insane to do
10:58
<MikeSmith>
gsnedders: anyway, sounds like something that would be great to have, and that nobody would argue against
10:58
<gsnedders>
MikeSmith: Damnit! I was hoping you guys would give me a reason not to do it!
10:58
<gsnedders>
That means I've got another thing on my to-do list!
10:59
<MikeSmith>
gsnedders: Just do it.
11:00
<MikeSmith>
give up on adonais and move all your energy to work exclusively on things that I personally find most useful
11:00
<MikeSmith>
that's my recommendation for you
11:06
<jgraham>
gsnedders: html5lib.serialise(input, tree="simpletree", format="html", **serializer_opts) should probably be the signature
11:06
<jgraham>
we should also have html5lib.sanitize
11:06
<jgraham>
But I don't know if that should return a tree or text
11:12
<MikeSmith>
jgraham! hey
11:13
<MikeSmith>
so you've been up in the great sunny north for how long now?
11:13
<MikeSmith>
3 months?
11:13
<MikeSmith>
wondering how you are liking it so far
11:13
<MikeSmith>
working mostly with zcorpan?
11:15
<jgraham>
MikeSmith: Hej.
11:15
<jgraham>
Yeah, working with zcorpan a bit.
11:16
<jgraham>
It's pretty nice here although they seem to want to stop me getting an internet connection really bad, which sucks
11:16
<MikeSmith>
huh?
11:16
<MikeSmith>
who wants you to do that?
11:16
<jgraham>
I mean the swedes not opera
11:16
<jgraham>
:)
11:16
<MikeSmith>
ah
11:16
<MikeSmith>
yeah
11:17
<jgraham>
I tried and they claimed that I han't been in the country long enough (or rather that my job wasn't yet considered permanant) and so I was too much of a credit risk
11:17
<MikeSmith>
heh
11:17
<MikeSmith>
idiots
11:17
<MikeSmith>
god
11:18
<MikeSmith>
I mean, you are coming to them with money in hand to spend
11:18
<jgraham>
Indeed
11:18
<jgraham>
With thatt in mind I am going to drop offline for a moment to see if I can get this silly 3G dongle thing working under linux
11:19
<MikeSmith>
jgraham: go for it
11:23
<jgraham>
#Holy crap it works. Will the miracles never end?
11:27
<MikeSmith>
jgraham: "3G dongle thing" is an HSDPA modem?
11:29
<gsnedders>
http://gsnedders.html5.org/outliner/
11:31
<gsnedders>
MikeSmith: Seeming you might be interested, I saw Bill Manhire and Simon Armitage speaking yesterday
11:31
<gsnedders>
Primarily reading their poetry
13:33
<jgraham>
virtuelv: Because there isn't really anything non-scientific about using a process that allows for the possibility of a creative insight producing a better result than incremental improvements to the existing model
13:34
<jgraham>
It would only be non-scientific if you insisted that some design was superior inthe face of data to the contrary and without a hypothesis as to why the data was wrong
13:35
<Philip`>
It would be non-scientific if you didn't have any data at all
13:36
<jgraham>
Myabe. But that is different to the Google situation
13:37
<jgraham>
(unless the complaint is that there should have been a designer whose work was considered perfect, even in the face of user feedback to the contrary)
13:37
<jgraham>
(which seems unlikely)
13:40
<Philip`>
My interpretation of the complaint is that (some) designers need to be able to design creatively and artistically, without being bogged down in the scientific details at every stage
13:40
<jgraham>
Philip`: Which seems perfectly scientific
13:41
<jgraham>
(if you remove the word "scientific" from your last sentence)
13:41
<jgraham>
That's how a great deal of theoretical physics works, for example
13:42
<jgraham>
It's only non-scientific if you come up with something that either cannot be tested or which you refuse to test
13:42
<Philip`>
I'm trying to think of a better word than "scientific" but I'm not sure what it is
13:42
<Philip`>
Maybe "engineeristic" or something
13:44
<Philip`>
or "exclusively data-focused" or something
13:45
<jgraham>
"data focused" seems fair
13:47
MikeSmith
scrolls back to try to understand context for "data focused"....
13:48
<jgraham>
(it is easy to imagine the same problem in other situations to get an idea of how frustrating it might be, for example the same book being sold with slightly different word choices to see which sells better)
13:49
<Philip`>
(That example would only work if people read the book before deciding whether to buy it)
13:50
<Philip`>
(You could, however, publish the same book with several different covers and see which sells better)
13:51
<Philip`>
(though in the case of e.g. Harry Potter books they use different covers to increase the range of their target market, which is a separate issue)
13:54
Philip`
has seen Discworld books with 'adult' covers too, and remembers that he used to find the original illustrated Discworld book covers to be hideous and disturbing to such an extent that he didn't like looking at them
14:58
<gsnedders>
jgraham: I guess it should be serialize and not serialise
14:59
<gsnedders>
jgraham: To be internally consistency
14:59
<gsnedders>
*consistent
15:01
<Philip`>
Call it tostring() instead
15:19
gsnedders
commits to html5lib for the first time in ages
16:10
<gsnedders>
Philip`: Challenge: find number of uppercase ASCII characters in tag names as a percentage of all characters in tag names.
16:21
<Philip`>
gsnedders: In some unknown number of pages from dmoz.org with five million things that look kind of like tags, I see 11723600 lowercase characters and 1547593 uppercase
16:21
<gsnedders>
Philip`: thx
16:21
<Philip`>
(and 59370 digits)
19:00
gsnedders
wonders who drhowarddrfine is… seems to have a very, very, very anti-MS POV
19:02
Philip`
wonders where his POV is being expressed
19:02
<gsnedders>
All over the web
19:02
<gsnedders>
Just google the alias
19:07
<Dashiva>
Worse than that rudd-o guy?
19:07
<gsnedders>
Yeah
19:09
<Philip`>
Is he the one who was vocal about Ogg?
19:10
<Dashiva>
Yes
19:12
<gsnedders>
IE is the root of all evil, and target was deprecated for security reasons. Right.
19:13
<gsnedders>
Also, he can ask Ian Hicks, Hixie, Simone Pieter among other people who will back him up.
19:14
<Dashiva>
...
19:14
<Dashiva>
Simone
19:16
<Philip`>
Simone and Anne are helping ensure HTML5 isn't a male-dominated spec
19:16
<Dashiva>
Next is what, Georgia Snedders?
19:23
<takkaria>
hmm... http://twitter.com/NickHodge/statuses/1364909394
19:28
<Dashiva>
Isn't the svg in acid3 standalone svg?
20:26
<erlehmann>
hmmm, how should i solve this ?
20:26
<erlehmann>
http://html5.validator.nu/?doc=http%3A%2F%2Fblog.dieweltistgarnichtso.net%2F&showimagereport=yes
20:27
<erlehmann>
i use ins to group inserted paragraphs
20:27
<erlehmann>
why can't that be valid ?
20:48
<gsnedders>
erlehmann: It is valid, as far as I can tell
20:49
<gsnedders>
I'm more or less certain it is
20:51
<erlehmann>
gsnedders, since the content model of the <ins> element ist transparent, i would think that too. maybe the validator has a hickup ?
20:51
<gsnedders>
erlehmann: The validator has quite a few bugs :)
20:52
<gsnedders>
LOL
20:52
<gsnedders>
Apparently I haven't talked to Hixie in "a couple years or more"
20:52
<takkaria>
url?
20:52
<gsnedders>
http://codingforums.com/showpost.php?p=796317&postcount=39
20:55
<takkaria>
heh
20:57
<Philip`>
Help, my menu bar has vanished
20:57
<Philip`>
(in Opera)
21:04
<erlehmann>
Philip`, hit alt+f4 !
21:51
<jwalden>
gsnedders: should you be including <1. Untitled Section> in your outliner when you encounter a sectioning content element that contains no headers?
21:52
<gsnedders>
jwalden: It is a section with no heading, so yes, it should appear in the outline
21:52
<gsnedders>
The fact it has no heading is irrelevant
21:54
<jwalden>
gsnedders: okay, riddle me this batman: suppose I have blag software that displays posts; it puts each post in an <article> with a <h1>post title</h1> at the top
21:55
<jwalden>
gsnedders: blag posts sometimes contain headers
21:55
<jwalden>
if I want to number those latter headers from <h1>, is there a way to do that without using <section>?
21:55
<jwalden>
and without generating phantom headers in an outline when the post is super-simple?
21:55
<jwalden>
I don't see one
21:56
<jwalden>
<http://whereswalden.com/>; and <http://gsnedders.html5.org/outliner/process.py?url=http%3A%2F%2Fwhereswalden.com%2F>; are the case in point
21:58
<jwalden>
http://pastebin.mozilla.org/635906 is the relevant PHP
22:01
<jwalden>
gsnedders: also, I think your outliner is not "ignoring any sections created for nav and aside elements and any of their descendants"
22:05
gsnedders
shrugs
22:05
<gsnedders>
I suppose that if you want subsections you should just use section elements there, because putting the whole post as a section seems wrong
22:08
<jwalden>
hm
22:08
<jwalden>
so this suggests there's no good way to make copy-pastability for content which might or might not contain headers
22:08
<gsnedders>
nav seems to broken
22:09
<gsnedders>
As far as I'm concerned, I'm creating an outline per spec
22:09
<gsnedders>
So ask Hixie :P
22:09
<gsnedders>
nav/aside is impl. bug I think
22:09
<jwalden>
so I guessed :-)
22:10
<gsnedders>
No, nav/aside is right
22:10
<gsnedders>
"Append the outline of the sectioning content element being exited to the current section. (This does not change which section is the last section in the outline.)"
22:11
<gsnedders>
http://hg.gsnedders.com/anolis/file/b6d93515d41e/anolislib/processes/outliner.py
22:12
<jwalden>
oh, I was misreading 4.4.10.2
22:13
<gsnedders>
My entire impl has quote from spec for every line of code, a quite a few asserts were the spec states that something is true
22:13
<gsnedders>
*and
22:13
<gsnedders>
So I doubt there are really many impl. bugs :)
22:23
<Dashiva>
gsnedders: How do you handle spec changes? Update code every time, or keep a "last synced with spec av rev x" or?
22:24
<gsnedders>
Dashiva: The spec has had one minor change since I wrote it around a year ago, so I don't really handle them at all :P
22:34
<Philip`>
"Brushing aside the personal attacks by small and narrow minds ..." - brushing aside personal attacks by using more personal attacks?
22:34
<gavin>
heh
22:35
<Dashiva>
"Brushing aside the personal attacks with a small and narrow mind ..."
22:37
<Philip`>
"in virtually every other programming language available to application developers today, failing to write the ‘code’ to the code’s specification results in the application simply not working" - not in e.g. C or C++, where you get unspecified behaviour that often actually works perfectly well in practice
22:38
<jcranmer>
curly quotes seem to mess up irssi
22:38
<Dashiva>
Not to mention javascript :)
22:39
<Philip`>
nor in Java, where you can misuse concurrency and get undefined behaviour
22:39
<jcranmer>
if you try to use multithreading without understanding it
22:39
<jcranmer>
you'll get undefined behavior no matter what language you use
22:40
<Philip`>
Dashiva: JS isn't really the same issue - it just has a relaxed specification that allows you to write a lot of things (e.g. missing semicolons) which are weird but still perfectly legal
22:40
<Dashiva>
No, you still have stuff like function expressions inside conditionals etc
22:40
<Dashiva>
And HTML comments working as real comments, even outside HTML files...
22:40
<Philip`>
It doesn't say "you MUST use semicolons" and then ignore missing semicolons
22:41
<Philip`>
Dashiva: That's more about the specification not matching reality, rather than it telling you you must do something and then not caring when you don't
22:41
<Dashiva>
I bit myself in java once, I had a class that called a method in its constructor. A subclass included that method, accessing a field in the subclass.
22:42
<Dashiva>
Philip`: I suppose so. But js is a rather moving target then :)
22:42
<Philip`>
jcranmer: Are there many languages with the same strict concurrency specifications as Java?
22:43
<jcranmer>
I imagine the C++0x memory model comes close
22:43
<Dashiva>
I never understood why i++ + i++ is undefined (or is it implementation specific? does it matter?)
22:43
<jcranmer>
Dashiva: it's because doing an increment is relatively expensive
22:44
Philip`
is thinking of http://java.sun.com/docs/books/jls/third_edition/html/memory.html#17.4
22:44
<Philip`>
Dashiva: For the same reason that f(i++, i++) is undefined, I expect
22:44
<jcranmer>
Philip`: well, that also has the issue of calling conventions
22:44
<Philip`>
Dashiva: which is that different compilers and different architectures might prefer to evaluate expressions in different orders, for efficiency
22:44
<jcranmer>
x86 puts the latter arguments on the stack first
22:45
<Philip`>
Dashiva: and so the rule is you can't rely on the order
22:45
<jcranmer>
so f(i++, i++) on an x86 machine would evaluate the second argument firs
22:45
<jcranmer>
er, first
22:45
<Dashiva>
I guess that matters much more when you get close to metal, unlike in JS
22:46
<Philip`>
JS (with JIT) is close to the metal :-)
22:46
<jcranmer>
so C/C++ makes guarantees at statement (with the exception of a few operators) level as opposed to expression level
22:48
<Philip`>
Dashiva: (It's undefined, not implementation-defined, and in practice implementations will generate totally bogus code for that expression when you have optimisations turned on)
22:48
<jcranmer>
i = i++; is the archetypal expression
22:49
<Dashiva>
Do you know of any cases where implementation defined is actually relied on?
22:49
<Philip`>
Dashiva: Things like sizeof(int) are implementation defined, and people rely on that
22:50
<Philip`>
(People often rely on undefined behaviour too, e.g. writing "int i; float f; i = *(int*)(float*)&f;")
22:51
<jcranmer>
just use a union :-)
22:51
<Philip`>
No, just use memcpy :-)
22:51
<jcranmer>
union { int int_val; float float_val } num;
22:51
<Philip`>
memcpy(&i, &f, 4);
22:51
<jcranmer>
but what if sizeof(int) != 4?
22:52
<Philip`>
static_assert(sizeof(int) = 4 && sizeof(float) == 4);
22:52
<Philip`>
s/=/==/
22:52
<Dashiva>
Float.floatToIntBits :)
22:52
<Philip`>
All compilers optimise that memcpy into nothingness
22:52
jcranmer
notes that said usecase for unions is actually mentioned in a porting-from-C++-to-Java guide
22:52
<Philip`>
(assuming f is in memory, not in a float register)
22:53
<Philip`>
I don't think the C/C++ standards (or at least non-latest versions of them) allow the union trick
22:54
<Philip`>
because they say a value can only be accessed as the type it was declared as, or as (unsigned) char, or a few minor exceptions
22:55
Philip`
was recently in a conversation where he found it surprisingly hard to convince people that using memcpy was a good idea, since it's efficient in practice and clearly guaranteed to work in the spec and less fiddly than the dodgy unions :-)
22:58
<jcranmer>
reinterpret_cast ?
22:59
<Philip`>
That's the same as C-style casts
23:00
<Philip`>
Dashiva: Float.floatToIntBits looks like a function call, and function calls are expensive, so that's no good :-p
23:01
jcranmer
wonders if the JIT would optimize that out
23:02
<Philip`>
If you have a million positive floats to sort, it's nice that C(++) lets you pretend they're integers and sort them more efficiently
23:03
jcranmer
ponders
23:03
<jcranmer>
would that actually work?
23:03
<Philip`>
It's also nice to be able to do "memcpy(&i, &f, 4); ++i; memcpy(&f, &i, 4);" to get the next highest float
23:04
<Philip`>
jcranmer: Yes, because ordering is preserved if you reinterpret floats as sign-and-magnitude ints
23:04
<Philip`>
jcranmer: (and it's preserved if you reinterpret positive floats as two's-complement ints)
23:48
<takkaria>
22:42 < Philip`> "in virtually every other programming language available to application developers today, failing to write the 'code' to the code's specification results in the application simply not working" - not in e.g. C or C++, where you get unspecified behaviour that often actually works perfectly well in practice
23:48
<takkaria>
oops