00:27
AryehGregor
is now using two-factor auth for Google, yay
00:27
<AryehGregor>
Now I just have to make sure no one steals my phone.
00:27
<AryehGregor>
(not that I'll lose access, but they'll have access to my Google account)
00:27
<zewt>
i'd be much more concerned about someone stealing my phone than any possible attacks on my password, heh
00:27
<AryehGregor>
(and could hypothetically revoke my access)
00:27
<AryehGregor>
(but that's still strictly better than not having two-factor auth)
00:27
<zewt>
sounds like a solution worse than the problem
00:28
<AryehGregor>
No, because they could already do that anyway.
00:28
<AryehGregor>
Except they could do even worse without the two-factor auth.
00:28
<AryehGregor>
At least now it's a special revocable password that they'll get instead of my main password.
00:29
<zewt>
... do android phones store the google password in the clear? heh
00:29
<AryehGregor>
How else would they log you in?
00:29
<AryehGregor>
It's like any browser where you save the password.
00:29
<zewt>
a password hashed with a device ID, etc
00:29
<AryehGregor>
It seems like that would make no difference in practice, if you can use it to log in.
00:30
<AryehGregor>
Except that you can't easily guess the user's password on other sites, if they use the same password.
00:30
<zewt>
of course it does; you can't change the user's password with it, or authenticate to things that a phone doesn't implicitly auth to
00:30
<AryehGregor>
Well, if that were the case, yes.
00:30
<AryehGregor>
Maybe for the main Android password thing that is in fact how it works. I dunno.
00:31
<zewt>
i havn't looked; i guess I assumed that Google was competent enough about authentication mechanisms to do that implicitly
00:31
<AryehGregor>
Possibly it stores some secret token that it uses instead of the password to auth.
00:31
<AryehGregor>
I hope that the application-specific passwords I generate can't be used to change my password or anything.
00:32
<zewt>
I'd expect something along the lines of logging in the first time when you enter the password, retrieving an authentication token, and then that token is valid for as long as the lifetime of the password
00:32
<AryehGregor>
If that's correct, then an attacker who got my phone actually couldn't steal my Google account.
00:32
<zewt>
and only that token is stored
00:32
<AryehGregor>
They could only use it until I revoked the password for the phone.
00:32
<AryehGregor>
Yeah, that model makes sense for anything except the web, where legacy constraints make it impossible for now.
00:33
<zewt>
but not for Google/Android auth
00:33
<AryehGregor>
No, it wouldn't make sense for that. But I dunno how it works.
00:33
<zewt>
er, sure it'd make sense for that
00:33
<AryehGregor>
That's what I meant.
00:33
<zewt>
not for = not impossible for
00:33
<AryehGregor>
Google's system is going to be designed for web-based logins, obviously, which means expecting cleartext passwords. Dunno if they made special provision for non-web logins. I hope so.
00:34
<AryehGregor>
But it doesn't really matter for me anymore, I think.
00:35
<zewt>
anyhow, my concern was that if Android's stored authentication system is eg. token-based, and you're now using a system that lets you revoke access from the phone, then you've given more authority to your phone--increasing the danger if your phone is stolen
00:35
<zewt>
as for how android/google auth actually works--no idea, never looked
00:36
<AryehGregor>
The only change as far as my phone knows is that 1) it has a special-purpose revocable password instead of my real one, which I hope can't be used to change my real password or other login/auth info, and 2) there's an app installed that generates numbers that I need to log in, in addition to my real password.
00:36
<AryehGregor>
The special revocable password doesn't need the numbers to log in, but I assume it's more limited than what my real password plus numbers lets me do.
00:37
<AryehGregor>
So I'm more or less strictly better off.
00:37
<AryehGregor>
(Plus my parents' landline can be used to generate the numbers if my phone is lost, plus I have backup numbers in my wallet.)
00:37
<AryehGregor>
But the numbers are useless without knowing my real password.
00:37
<AryehGregor>
Now I'm going to feel a lot happier about logging into my Google account from untrusted Windows machines.
01:27
<roc>
I wouldn't feel much happier about logging in from an untrusted machine
01:31
<jamesr_>
if they steal your username/password/one-time auth token they can't use it to log in later
01:31
<jamesr_>
although they can do a whole lot of badness while you are logged in
01:31
<jamesr_>
but if you are worried about a keylogger plugged in to the back of the machine that the russian spy will pick up later, it helps
01:40
<AryehGregor>
I'm pretty sure a large fraction of real-world exploits just collect data and send it someplace for later use, rather than attempting immediate exploits.
01:40
<AryehGregor>
Although yeah, I wouldn't try it on a machine I actually suspect to be compromised.
01:40
<AryehGregor>
But it's an extra safety measure.
04:12
<roc>
TabAtkins: ping?
09:33
<hsivonen>
:-( Opera still doesn't support HTML5 D&D
09:56
<hsivonen>
can anyone suggest a nice Open Source Canvas 2D demo that is easy to integrate into a larger HTML document?
09:58
<annevk>
like http://annevankesteren.nl/test/html/canvas/demo/002.html ?
09:58
<annevk>
or http://people.opera.com/danield/html5/html5logo/
09:58
<Rik`>
hsivonen: Hixie's ? http://www.whatwg.org/demos/2008-sept/color/color.html
10:02
<hsivonen>
annevk, Rik` : thanks. of those, Hixie's animates the most
10:02
<hsivonen>
doesn't really drive home the point that this can be used for games, though
10:02
<Rik`>
hsivonen: use ztype for that ?
10:04
<zewt>
maybe not easy to integrate, but a nifty demo http://benfirshman.com/projects/jsnes/
10:07
<hsivonen>
Rik`: ztype would require me to sit down to type. also, there's no mention of an open source license
10:08
<hsivonen>
first rule for presentations is having everything on your own site *and* at a file: URL
10:08
<Rik`>
I know :)
10:10
<zcorpan>
maybe you can find something in http://www.canvasdemos.com/type/games/
10:10
<hsivonen>
zcorpan: thanks
10:12
<hsivonen>
maybe I should cheat and show a video of Biolab Disaster or something
10:13
hsivonen
tries making a local copy of the WebGL aquarium
10:15
<jgraham>
I think the first rule of presentations is "have something interesting to say"
10:15
<jgraham>
followed by "have the confidence to engage your audience"
10:15
<jgraham>
Since those will get you a long way even if all your demos fail
10:16
<hsivonen>
the Microsoft fish tank is ARR :-(
10:17
<jgraham>
Pirated?
10:17
<hsivonen>
All Rights Reserved
10:17
<jgraham>
I see
11:04
zcorpan
files https://bugzilla.mozilla.org/show_bug.cgi?id=635194
12:42
<Areks>
bga_: ���� ���� ���� ������
12:42
<bga_>
hi
12:44
<Areks>
bga_: так видно?
12:44
<bga_>
yes
12:44
<jgraham>
𐂅
12:45
<Areks>
bga_: типо круто не пилишься )
12:46
<bga_>
Areks english only plz
12:46
<bga_>
or PM
12:46
<Areks>
bga_: why?
14:35
jgraham
notices that the SVG tests use tables for layout in their HTML wrapper
14:36
<wilhelm>
They could use a bit of spring cleaning in general.
14:39
<jgraham>
Yes, I'm not claiming that's an exhaustive list of things that are wrong with them
16:01
<TabAtkins>
roc: Just in case you read logs, pong. If you don't, I'll find you later on #developers, since you're not there now.
17:14
<TabAtkins>
hsivonen: I have a really cool-looking canvas 2d demo. One sec.
17:25
<TabAtkins>
hsivonen: http://www.xanthir.com/etc/cthulhu.html
17:25
<hsivonen>
TabAtkins: nice. what's the license?
17:26
<TabAtkins>
What license do you want?
17:26
<Rik`>
use wtfpl !
17:26
<hsivonen>
TabAtkins: MIT would work
17:26
<hsivonen>
Rik`: OSI approved is nicer
17:27
<TabAtkins>
Darn, and I already have xanthir.com/wtfpl.txt to point to.
17:27
<TabAtkins>
Is public domain good enough?
17:27
<hsivonen>
TabAtkins: yes
17:27
<TabAtkins>
Let me annotate the source real quick.
17:27
<hsivonen>
(and the slide system I'm using is WTFPL anyway, so I'm already relying on that even though it's not best practice)
17:30
<TabAtkins>
Done.
17:30
<hsivonen>
TabAtkins: thank you!
17:31
<TabAtkins>
I think Chrome breaks the Inspector when it needs an update on purpose just to make me restart.
17:31
<hsivonen>
FWIW, my slide draft is at http://hsivonen.iki.fi/html5-lecture/2011/slides.html#1
17:33
AryehGregor
always forgets that it's a bad idea to write O(N) formulas in spreadsheet cells, because then when you paste to a whole row or column it becomes O(N^2)
17:33
<AryehGregor>
And Gnumeric is too stupid to let me abort mid-paste.
17:33
<AryehGregor>
Oh well.
17:34
AryehGregor
kills it and starts again
17:39
<hsivonen>
TabAtkins: integrated. thanks! http://hsivonen.iki.fi/html5-lecture/2011/slides.html#104
17:40
<hsivonen>
This might benefit from mozRequestAnimationFrame
17:40
<TabAtkins>
Yeah, it would.
17:43
<TabAtkins>
hsivonen: Hmm, your slides sad-tab me after half a second in Chrome.
17:44
hsivonen
assumes sad-tab means Chrome crashed, not sad Tab
17:44
TabAtkins
is sad.
17:45
<hsivonen>
:-(
17:53
<TabAtkins>
I assume this is meant to be run in FF4, too, as I can't get past slide 7 in ff3.6
18:07
<AryehGregor>
Why would anyone use FF3.6 by now?
18:07
<TabAtkins>
Because FF4 isn't publicly available yet?
18:08
<aho>
dunno... maybe because ff4b12 is a f-ing trainwreck right now?
18:08
<aho>
<:
18:08
<TabAtkins>
Also: because it's what's installed on my corp image and I haven't gotten around to installing another version.
18:08
<aho>
2 title bars, add-on panel doesnt work, firebug doesnt, work, f5 doesnt work...
18:09
<Ms2ger>
Sounds like you broke something
18:09
<Ms2ger>
Try with a new profile
18:10
<aho>
two
18:10
<aho>
title
18:10
<aho>
bars
18:10
<TabAtkins>
...yes? How does that mean you didn't break something?
18:11
<TabAtkins>
(I dunno if you did or not, just pointing out that two title bars isn't a valid argument.)
18:11
<aho>
that's major breakage
18:11
<TabAtkins>
yes?
18:11
<aho>
i dont see how a profile could cause that
18:11
<Ms2ger>
That's why it's on your side
18:12
<Ms2ger>
Because Firefox is more extensible than any other browser
18:21
<aho>
nuking it worked
18:21
<aho>
canvas is still slow though
18:22
<aho>
i.e. i get around 38fps instead of 80 in my game
18:23
<aho>
hum... looks like the timer behaves worse now
18:26
<AryehGregor>
Firefox 4b12 works great for me.
18:26
<AryehGregor>
I think I'm still on b11, though.
18:26
<AryehGregor>
They really need to get something like Chrome's dev channel working.
18:29
<Ms2ger>
To push betas that haven't been released yet?
18:30
<Ms2ger>
b11 is the latest
18:30
<AryehGregor>
Well, that explains why I'm on b11.
18:30
<AryehGregor>
But it's annoying to manually download the new betas every time. Although I think last time this came up someone said you only have to do that on Linux, or something.
18:34
<aho>
got b12pre (2011-02-18) here
18:34
<AryehGregor>
It doesn't seem very fair to criticize Firefox 4 generally based on unreleased betas.
18:35
<AryehGregor>
It would be a bit more reasonable if it were released.
18:37
<GPHemsley>
hmm... is there something wrong with W3C's XHTML5 validator?
18:39
<hober>
GPHemsley: anything in particular?
18:39
<GPHemsley>
it fails altogether :P
18:40
<GPHemsley>
http://validator.w3.org/check?uri=http%3A%2F%2Fplanet.mozilla.org%2F&charset=%28detect+automatically%29&doctype=Inline&group=0&ss=1&outline=1&verbose=1
18:41
<GPHemsley>
Also, I was just told that the HTML5 doctype triggers HTML2 mode in some legacy software... has anyone heard that before?
18:41
<Ms2ger>
No
18:42
<Ms2ger>
Not in any mainstream browsers
18:42
<GPHemsley>
I'm not positive, but I don't think that this was a browser
18:42
<GPHemsley>
possibly BBEdit
19:17
<TabAtkins>
matjas: Request from tantek - could you add "feed edits updates drafts" to the @csscommits bio to make it easier to search for?
19:25
<Hixie>
hmmmm
19:25
<Hixie>
benschwarz: ping
19:26
<Hixie>
benschwarz: what do you think of the idea of having developers.whatwg.org exclude features that are not yet widely implemented?
19:41
<paul_irish>
Hixie: better if we just wire it up to caniuse's API and illustrate browser support inline
19:42
<paul_irish>
we're doing that now at http://www.html5rocks.com/features/storage
19:48
<Hixie>
ooh, there's an api?
19:48
<Hixie>
what does it need?
19:48
<Hixie>
i can just hook that up to the sidebar annotations instead of having people maintain it
19:49
<Hixie>
my original question was because people are asking for a version of the spec that doesn't include unimplemented stuff, and i don't really want to add a ninth whatwg spec, so i'm looking to figure out how i can reuse the existing ones
19:51
<miketaylr>
paul_irish: the webstorage stuff for opera is wrong, should be 10.50+
19:52
<paul_irish>
yeah the indexeddb stuff for chrome is off. let's get Fyrd in here
19:52
<miketaylr>
it's fine on caniuse, just wrong on html5rocks
19:52
<paul_irish>
Hrm! okay
19:52
<paul_irish>
api = http://caniuse.com/jsonp.php?callback=mycallback
19:53
<miketaylr>
nice.
19:55
<Hixie>
not clear how one would use that from the spec
20:10
<AryehGregor>
I have to say, I know it makes me crazy, but I love reading IRS publications.
20:10
<AryehGregor>
"You can treat your child as meeting the residency test even if the child has been kidnapped, but both of the following statements must be true."
20:10
<AryehGregor>
"The child is presumed by law enforcement authorities to have been kidnapped by someone who is not a member of your family or the child's family.
20:10
<AryehGregor>
In the year the kidnapping occurred, the child lived with you for more than half of the part of the year before the date of the kidnapping."
20:10
<AryehGregor>
This treatment applies for all years until the child is returned. However, the last year this treatment can apply is the earlier of:
20:10
<AryehGregor>
The year there is a determination that the child is dead, or
20:10
<AryehGregor>
The year the child would have reached age 18.
20:11
<AryehGregor>
I've also seen regulations concerning clergy who have taken a vow of poverty.
20:11
<Hixie>
is kidnapping common enough that it has to be handled by explicit legislation and can't be handled on a case-by-case basis?
20:11
<Hixie>
that's sad
20:12
<AryehGregor>
These are regulations that cover the whole United States.
20:12
<AryehGregor>
There are probably like 100 million tax returns being filed.
20:12
<AryehGregor>
So figure at least a thousand a year with kidnapped children, even if the kidnapping rate is really really low.
20:13
<AryehGregor>
How would you handle it on a case-by-case basis, appoint people who are allowed to arbitrarily decide to change around someone's tax returns based on their own judgment?
20:14
<Hixie>
yes
20:14
<Hixie>
they are called "judges"
20:14
<Hixie>
you would use a small-claims-like model where there's no lawyers
20:15
<Hixie>
just call them up, say what's going on, let them figure it out
20:15
<AryehGregor>
And the judges would just make stuff up without any specific rules to go by?
20:15
<AryehGregor>
Judges normally rule according to law or regulation or something.
20:15
<Hixie>
they use broad guidelines like the constitution to determine specific cases based on their judgement
20:16
<Hixie>
1000 kidnappings a year in the US seems like a horrificly high number. That's 15 children per million children kidnapped.
20:17
<AryehGregor>
http://www.kidsfightingchance.com/stats.php
20:17
<AryehGregor>
"The rate of reported missing children in the United States is 11.4 per 1,000"
20:18
<AryehGregor>
"Of the 800,000 children reported missing annually, approximately 69,000 are abducted"
20:18
<Hixie>
holy kittens. In the United States, 203,900 children were reported as the victims of family abductions and 58,200 of non-family abductions in 2009.
20:18
<AryehGregor>
You have an amazingly optimistic view of the amount of crime that goes on.
20:18
<AryehGregor>
Remember that in the case of kidnapping, most of it is going to be related to custody disputes.
20:18
<Hixie>
i like to think of it as a european view
20:19
<Hixie>
but i've no idea if that's valid or not :-)
20:19
<AryehGregor>
Like the mother gets custody and the father thinks she's crazy so he tells the kid to come with him, or whatever. Mostly not going to be strangers kidnapping kids for nefarious purposes.
20:19
<Hixie>
(1% of children are reported missing every year in the US?!)
20:19
<Hixie>
(wtf are y'all doing with your kids?!)
20:19
<AryehGregor>
1% is really an awfully small number.
20:20
<Hixie>
it should be 0
20:20
<AryehGregor>
. . .
20:20
<Hixie>
1% is huge compared to 0
20:20
AryehGregor
introduces Hixie to this thing called "real life", where not everyone knows where everyone else is at all times
20:20
gsnedders
is now in the city with the highest crime rate in Britain
20:20
<AryehGregor>
A child reported missing can mean they ran away, or went to a friend's house without telling their parents, or whatever.
20:21
<AryehGregor>
Do you propose that parents outfit all their children with tracking devices or something?
20:21
<AryehGregor>
I mean, how could you possibly expect that you wouldn't have a nontrivial number of missing children reports?
20:23
<Hixie>
no i propose that the parents not be so bad that their children are running away :-)
20:23
<Hixie>
but anyway, it's the kidnapping, especially kidnapping by non-parents, that is the number i was primarily concerned about
20:23
<gsnedders>
It's not just parents that cause children to run away, social pressure from peers can ultimately lead to such things
20:24
<Hixie>
and 58,200 is 58 times higher than you predicted even for that
20:24
<AryehGregor>
Are you suggesting that children normally only run away if their parents are bad, and not because they're being stupid?
20:24
<AryehGregor>
I didn't predict it was 1,000, I said that was a really really low number.
20:24
<Hixie>
so presumably you'd agree with me that it's high :-)
20:24
<AryehGregor>
I initially wrote "tens of thousands", then changed it to 1,000 to avoid objections that it was unreasonably high.
20:24
<AryehGregor>
Which you made anyway.
20:24
<Hixie>
well this argument is completely subjective
20:25
<AryehGregor>
It's subjective except insofar as my expectations are demonstrably realistic, whereas yours are not. :)
20:25
<AryehGregor>
(in fact, your expectations are demonstrably unrealistic)
20:25
<Hixie>
it's not clear to me that the magnitude of the frequency of a bad thing happening should be characterised relative to its current average as opposed to its ideal state.
20:26
<AryehGregor>
It's clear to me that when you're amazed at reality, your expectations were incorrect.
20:27
<AryehGregor>
Being disappointed with reality is different from being surprised.
20:27
<Hixie>
i don't think i'm arguing that my expectations were correct
20:27
<Hixie>
i'm arguing that the amount of kidnapping is awfully high
20:28
<AryehGregor>
Well, that's subjective, yes.
20:28
<AryehGregor>
In that you aren't giving a reference point, so you're not actually saying anything meaningful.
20:30
<Hixie>
my point was that it was sad that it was common enough to require explicit legislation
20:30
<Hixie>
i stand by that point
20:32
<Hixie>
there were 71000 registered criminal offenses per million inhabitants in switzerland in 2009
20:33
<Hixie>
can't find specific numbers for kidnapping
20:33
<AryehGregor>
In other words, 7.1%.
20:33
<Hixie>
not sure how to compare that number to the US kidnapping numbers unfortunately
20:34
<AryehGregor>
You can't, reporting methods will vary greatly.
20:34
<Hixie>
and my google-fu is failing me in finding numbers for kidnapping in the US
20:34
<Hixie>
er, in CH
20:34
<AryehGregor>
This is why people usually compare murder rates.
20:34
<AryehGregor>
Because murders are almost all reported and are usually pretty unambiguous.
20:34
<AryehGregor>
It's very plausible that the US and Switzerland might have different definitions of "kidnapping", even if you can find stats.
20:35
<AryehGregor>
Actually, different states in the US probably have different definitions.
20:35
<Hixie>
http://www.nationmaster.com/country/sz-switzerland/cri-crime claims 203 kidnappings, not sure what year or what definition
20:35
<Hixie>
(7.8 million inhabitants)
20:36
<Hixie>
doesn't have US numbers though
20:37
<AryehGregor>
I'd be very surprised if Switzerland's crime rate weren't a lot lower than the US's.
20:37
<Hixie>
were that true, would you say that switzerland's crime was low, or that the US's was high? :-)
20:38
<AryehGregor>
I would say that the US's crime rate is higher than Switzerland's.
20:38
<AryehGregor>
Or would otherwise clearly qualify what I was saying, unless the context made qualification clear.
20:39
<AryehGregor>
E.g., when speaking to other Americans, I might call Switzerland's low, and we'd assume a common reference point of America.
20:39
<AryehGregor>
Doesn't work so well on IRC.
20:43
<hsivonen>
TabAtkins: I suspect Chrome doesn't tolerate iframed WebGL
20:44
<AryehGregor>
Is WebGL really going to wind up being that brittle?
20:44
<AryehGregor>
That's sad.
20:44
<AryehGregor>
(or is this more of a temporary thing?)
20:44
<TabAtkins>
hsivonen: I don't think I'm running a chrome version that accepts WebGL.
20:45
<hsivonen>
TabAtkins: oh. that can't be the explanation then
20:45
<Hixie>
speaking of WebGL, I spoke with Ian Fette the other day and we agreed that I need to update the WebSockets API to add binary now, but we were both a little concerned about exposing underlying endianess of the platform in the API -- is there a binary API yet that doesn't do that?
20:45
<TabAtkins>
Or, hm, maybe I am now? I'm running 10.0.648 beta
20:45
<othermaciej>
ArrayBuffer is becoming the de facto choice for binary
20:46
<othermaciej>
people have noted the endianness issue, but there has been no serious attempt to fix it
20:47
<AryehGregor>
Which means de facto it will become little-endian, no?
20:48
hsivonen
expects little endian to become de facto as there are no notable big endian WebGL impls
20:48
<hsivonen>
maybe even s/notable //
20:48
<Hixie>
i guess i can spec around it or something... have the websockets spec say something like "if the platform isn't [something]-endian, then [mutate the data so it turns out to be the same as if the platform was the right endianness]" or some such
20:48
<Hixie>
i'd have to look at the ArryaBuffer stuff to see how that would work
20:49
<TabAtkins>
ArrayBuffer should be specced to just be little-endian, given that it's going to be the default assumption, right?
20:49
<AryehGregor>
Yes.
20:50
<gsnedders>
I guess half the problem then is the things where big endian is used nowadays for browsers tends to be with lower end hardware
20:50
<TabAtkins>
Hm. What's the baseline of an empty block element? I can't seem to find it in CSS 2.1
20:50
<gsnedders>
(so the cost of conversion is more expensive)
20:51
<othermaciej>
Hixie that's not really possible
20:51
<othermaciej>
Hixie: byte-swapping depends on the size of individual data fields
20:51
<othermaciej>
Hixie: you can't do it transparently on binary data of unknown format
20:52
<othermaciej>
4 8-bit fields are unaffected by endianness, but one 32-bit field needs to be byte-swapped
20:52
<TabAtkins>
Hm, I guess the baseline of a block doesn't really make sense, so never mind. It's only inline-blocks that have a baseline.
20:52
<Hixie>
yeah it might just have to be something like "except the API must be little-endian" or whatnot
20:53
<Hixie>
(though shouldn't it be big-endian, to match network byte order? it's gonna be really confusing to have an API that manipulates network protocol messages and is backwards from the wire.)
20:53
<othermaciej>
in principle you can byte-swap on read or write
20:53
<Hixie>
(i guess webgl has different needs)
20:53
<othermaciej>
yeah, you probably want network byte order, which would imply always byte-swapping on all common hardware :-(
20:54
<hsivonen>
TabAtkins: did you happen to file the Chrome crash on my slides already?
20:54
<AryehGregor>
The solution that doesn't require byte-swapping on common hardware is obviously the only sane one.
20:54
<TabAtkins>
hsivonen: No, not yet.
20:54
<Hixie>
AryehGregor: not so obviously
20:54
<TabAtkins>
hsivonen: I havent' spent the time to reduce it.
20:55
<Hixie>
AryehGregor: since it's essentially useless to have a 32bit-int-reader that is not reading data in network byte order if the data is in network byte order
20:55
<Ms2ger>
The solution that doesn't expose endianness is, but that has been ignored
20:56
<AryehGregor>
Hixie, why should the data be in network byte order?
20:57
<AlexNRoss>
Requested addition to http://www.whatwg.org/specs/web-apps/current-work/#linkTypes : Link Type: dofollow
20:58
<Ms2ger>
AlexNRoss, please add it to the wiki
20:58
<Hixie>
AryehGregor: because data on the wire is almost always in network byte order, that's what network byte order is for
20:58
<Hixie>
s/is for/is named for/
21:00
<AryehGregor>
In real-world WebGL uses, aren't you going to be using data that you specifically design for WebGL? Why not transmit it on the wire in whatever endianness WebGL will use?
21:01
<othermaciej>
AryehGregor: I think the WebGL use case is not focused on data on the wire
21:01
<othermaciej>
it's between JS and the graphics card
21:01
<hsivonen>
Hixie: shouldn\t the Web Socket API only care about the byte view to array buffers and leave the rest to array buffers themselves?
21:01
<othermaciej>
which will both operate in host byte order
21:03
<jamesr_>
network->JS->WebGL is also an important use case
21:03
<jamesr_>
downloading big meshes or whatnot
21:05
<AlexNRoss>
Ms2gr: I see no edit button on http://wiki.whatwg.org/wiki/RelExtensions
21:08
<Ms2ger>
Create an account, I guess
21:11
<matjas>
TabAtkins: Updated @csscommits bio in an attempt to please @t. You know it hasn't updated the past 9 days right?
21:12
<othermaciej>
jamesr_: I agree, but it is tricky to figure out how to work that one
21:12
<matjas>
TabAtkins: Can haz feed caching kthxbaï
21:12
<AlexNRoss>
Ms2ger: Do you have an account?
21:12
<othermaciej>
jamesr_: to hand the buffer off to the GPU with reasonable performance, it has to be in host byte order
21:13
<othermaciej>
jamesr_: but data comes in off the net presumably in host byte order, and how to byte-swap it is format-specific
21:13
<TabAtkins>
matjas: Adding it now.
21:13
<othermaciej>
jamesr_: I think the logical conclusion is that JS code has to understand the format and cause the right byte-swapping to happen :-(
21:13
matjas
cries tears of joy
21:13
<TabAtkins>
Trying to put together a very basic json-based nosql engine of my own to run it with.
21:17
<jamesr_>
othermaciej: T.T
21:17
<jamesr_>
a huge portion of gwtquake's startup time is uploading data (textures, meshes, etc) from the network
21:18
<jamesr_>
but that was when it had to base64 encode it all as well
21:19
<othermaciej>
jamesr_: it might become necessary to have an efficient way to byte swap given a declarative description of the data format or something
21:19
<othermaciej>
jamesr_: or, and perhaps this is more likely, data gets sent little-endian over the wire, JS code doesn't byte-swap, and big-endian platforms are hosed forever more
21:20
<gsnedders>
othermaciej: It seems highly plausible that there'll be interest in stuff like WebGL on TVs which are largely big-endian MIPS, so I doubt that in a lot of ways
21:22
<othermaciej>
gsnedders: I'm sure the people making set-top boxes will care about that, but I bet people making, say, games meant to be played on your laptop or phone will not care about this
21:22
<AryehGregor>
othermaciej, I think that's most likely.
21:22
<AryehGregor>
People will code little-endian, the spec should mandate that.
21:22
<AryehGregor>
At most, it should permit opt-in endianness-changing for those who want to optimize for different platforms.
21:22
<AryehGregor>
But the default has to be little-endian.
21:23
othermaciej
is not sure what that means
21:23
<othermaciej>
in what way would a big-endian host's behavior change if you "mandate little-endian"?
21:24
<othermaciej>
actually, thinking about it, I suspect the most sensible way to transmit a texture over the wire is as a PNG or JPEG
21:24
<othermaciej>
you just need a way to decode it to a host-byte-order image buffer on the client
21:24
<Hixie>
yeah WebGL has very different needs than WebSockets here
21:25
<othermaciej>
people will want to hook up XHR or maybe even WebSockets to WebGL
21:25
<Hixie>
even with WebGL, if it's different on differnet platforms, it ain't gonna fly
21:25
<Hixie>
because people will just assume one endianness
21:25
<othermaciej>
that depends on how you code it
21:26
<Hixie>
it's the web
21:26
<Hixie>
every possible way of doing it will be done
21:26
<othermaciej>
if you generate a texture of 32-bit pixel values by writing 32 bits at a time, endianness doesn't matter
21:26
<Hixie>
and the most wrong one will be on some critical site like google.com
21:26
<Hixie>
either the WG decides now to fix it, or in a few years it'll be forced to spec whatever the most common case is, even if it sucks
21:27
<Hixie>
(or browsers will ignore the spec and do that common case and we'll have to have a "WebGL5"-like spec)
21:27
<othermaciej>
it's not a fixable problem
21:27
<othermaciej>
well, assuming you need the feature of accessing the same binary data via different width numeric types
21:27
<othermaciej>
it is not possible to make endianness invisible
21:27
<othermaciej>
at least, I don't know how
21:28
<Hixie>
you do it by having crappy performance on the platform with the other endianness
21:28
<othermaciej>
"mandate little-endian" is not a statement with an obvious meaning
21:28
<othermaciej>
you can't though
21:28
<othermaciej>
if I write 8 bits at a time and my GPU reads 32 bits at a time
21:28
<othermaciej>
how is the browser supposed to magically fix that?
21:29
<othermaciej>
at the time I am laying down my bytes, the browser has no idea if these are bytes, parts of 16-bit values, or parts of 32-bit values
21:29
<othermaciej>
which all byte-swap differently
21:29
<Hixie>
the browsers on the unusual platform will end up having to emulate the GPU of the other endianness
21:29
<Hixie>
(if we don't fix it somehow first)
21:31
<othermaciej>
the only "fix" I can think of is to not have access to the same data at different type widths ever
21:31
<othermaciej>
or else force you to pre-declare the "canonical" type of a buffer
21:31
<othermaciej>
but this doesn't really work if your data is coming from the network
21:33
<othermaciej>
another "fix" would be to cause there to exist a big-endian platform that is very popular for browsing so people are actually likely to test both ways
21:33
<othermaciej>
(endianness sucks)
21:33
<Hixie>
that would just end up fragmenting the web into two
21:33
<Hixie>
we've seen that sometimes with firefox vs ie compat bugs
21:34
<Hixie>
gotta go, lunch
21:34
<othermaciej>
it is a tough problem
21:39
<zcorpan>
you could discuss solutions to the endianness problem with timj @opera.com if you like - he said he was kinda alone in khronos with his concern about exposing endianness on the web being a problem
21:40
<zcorpan>
(also alone in thinking that undefined behavior for a web spec was a bad idea)
21:41
<AryehGregor>
I assume Khronos is used to things like OpenGL and OpenCL, where it's expected that authors want maximum performance and don't care so much about undefined behavior since they're probably only targeting a couple platforms anyway.
21:41
<jamesr_>
seems about right
21:41
<AryehGregor>
They'll have to be educated, I suppose.
21:42
<AryehGregor>
Maybe they'd be convinced if all the implementers explicitly said that they don't want a spec with any dependencies on things like endianness.
21:42
AryehGregor
isn't really involved, though, so doesn't care much
21:43
<AryehGregor>
It's not like the web platform hasn't had undefined behavior before. It gets defined eventually.
21:43
<gsnedders>
AryehGregor: We weren't the only browser vendor there, it's not just Khronos people who were arguing such things
21:43
<AryehGregor>
Other browser vendors were also arguing for endianness dependencies?
21:44
gsnedders
doesn't know, but it's the implication of zcorpan's comment
21:44
<zcorpan>
AryehGregor: isn't there a lesson to be learned from the experience with leaving stuff undefined?
21:44
<zcorpan>
you'd have to ask timj, but iirc he said apple and google didn't share his concerns
21:47
<AryehGregor>
Surprising.
21:52
<Philip`>
What was the need for accessing the same binary data via different width numeric types?
21:53
<dglazkov>
TabAtkins: is the response to tantek ok?
21:54
<Philip`>
With OpenGL you probably want interleaved arrays of different types, but you wouldn't access the same bytes as different types
21:54
<Philip`>
unless you're doing something like byte-based compression of non-byte-based data
21:55
<Philip`>
Even C doesn't let you legally access the same data as e.g. a short and an int
22:01
<jamesr_>
that's only true with strict aliasing, which is generally not safe to assume
22:01
<zcorpan>
Hixie: look at what you did http://www.deathofthediv.com/
22:01
<Philip`>
It seems safer to assume strict aliasing than to assume a lack of strict aliasing :-)
22:02
<jamesr_>
in practice people access the same data as different types all the time in C
22:02
<Philip`>
In practice people compile with strict aliasing and suffer from bizarre bugs
22:02
<jamesr_>
Philip`: have you written C code that compiles with strict aliasing rules?
22:02
<Philip`>
Yes
22:03
<Philip`>
Just use memcpy when you need to move between types
22:03
<jamesr_>
then you are rather alone in C land, i think
22:03
Philip`
hit aliasing bugs in a texture compression library, where it made the textures look subtly lower quality when compiled with GCC 4.4 :-(
22:04
<Philip`>
It doesn't seem that unusual in my experience, though my experience is fairly limited
22:04
<jamesr_>
aliasing bugs in complex code are really difficult to deal with
22:04
<Philip`>
(Also, by C I mean C++)
22:05
<Philip`>
GCC seems pretty good about warning of potential aliasing violations
22:06
<jamesr_>
yeah, but have you tried compiling a large project with those warnings on?
22:07
<Philip`>
No, and I suppose it's much harder if you start with non-aliasing-clean code :-(
22:07
<Hixie>
zcorpan: hahahah that's awesome
22:08
<Philip`>
(I think the largest thing I've used it on is a ~100KSLOC game)
22:09
<Hixie>
http://www.w3.org/Bugs/Public/show_bug.cgi?id=11861 is going to be annoying to fix
22:10
<zewt>
more sensible to enable optimizations like that for code that needs it, and just audit that code; most of a 100k+ line program is not going to be performance-critical at all
22:11
<Philip`>
There were only a few aliasing warnings to start with, and they were trivial fix, and then it was trivial to avoid introducing any more
22:11
<Philip`>
s/fix/to fix/
22:12
<zewt>
i've never seen a serious aliasing-related bug (in around 15 years of C/C++); but I normally don't compile with aliasing-sensitive optimizations enabled
22:17
<Philip`>
http://code.google.com/p/nvidia-texture-tools/source/diff?spec=svn1167&r=1167&format=side&path=/branches/2.0/src/nvmath/Vector.h#sc_svn452_234
22:17
<Philip`>
I think that's probably the only one I've encountered in real code
22:17
<TabAtkins>
dglazkov: Yes, great.
22:18
<gsnedders>
TabAtkins: Wrong room?
22:19
<Rik`>
If I'm in a HTML document and I want to insert a new child of a <svg> node, is there anything special to be done ?
22:19
<Rik`>
i'm doing doc.createElement('circle') and svgnode.appendChild(circle)
22:20
<Rik`>
the node is correctly appended but not "rendered"
22:20
<TabAtkins>
It's not in the right namespace.
22:20
<gsnedders>
Rik`: doc.createElement("circle") creates a circle element in the HTML namespace
22:20
<TabAtkins>
gsnedders: No, dglazkov said something to me a little bit ago.
22:20
<Ms2ger>
Namespaces!
22:20
<Rik`>
never played with namespaces, how should I create it ?
22:21
<TabAtkins>
createElementNS()
22:21
<Rik`>
oh right…
22:21
<Rik`>
so I stil have to deal with NS, even though I'm in a HTML document
22:21
<Ms2ger>
Yes
22:22
<TabAtkins>
Namespaces are the devil.
22:22
<Rik`>
is it gonna change with the latest decisions to not include NS in html ?
22:22
<Ms2ger>
No
22:22
<Ms2ger>
There will no namespaces in the HTML *syntax*
22:22
<TabAtkins>
HTML doesn't need the namespace declarations, but that's because it does magic behind the scenes to set namespaces correctly.
22:23
<Ms2ger>
+declarations, right
22:24
<Rik`>
I shouldn't mix jquery with this I guess
22:24
<TabAtkins>
HTML goes to a lot of effort to play nicely with XML, which unfortunately means that it's sometimes confusing for authors.
22:24
<TabAtkins>
There's a small chance that jquery may be NS-aware and do things right. I dunno.
22:26
<Rik`>
thanks
22:30
<Rik`>
trying to have a nice looking curve going through some points is not as easy as I thought…
22:31
<Rik`>
I thought using T instead of L would do the trick but not really
22:43
<benschwarz>
morning—I missed some messages?
22:46
<zcorpan>
hey benschwarz, what do you think about dropping the 5?
22:47
<benschwarz>
I'm not so sure—There isn't anything to say that the spec covers 5 stuff, or new apis that it references
22:48
zcorpan
doesn't follow
22:49
<benschwarz>
I'm all for the versionless movement
22:50
<benschwarz>
but I'd like to somehow let the user know that what they're viewing includes new stuff
22:51
<zcorpan>
ok. your call :)