00:01
<AryehGregor>
If we don't have interop anyway, presumably the spec is easier to change than Direct2D.
00:05
<TabAtkins>
Hm, does anyone support image-resolution yet in any way?
00:05
<TabAtkins>
I'm thinking that it's kinda silly to have resolution units which are just inverted length units.
00:06
<TabAtkins>
You can just use lengths instead.
00:06
<Hixie>
AryehGregor: in this particular instance, changing the spec is non-trivial (nobody has yet, to my knowledge, figured out a way to spec what is desired)
00:09
<jamesr_>
my bigger concern for compat is CoreGraphics, which can't implement the currently spec'd semantics
00:09
<jamesr_>
i doubt that apple will change CG to match what the spec says and i doubt that we'd be super happy to make chrome behave differently from what CoreGraphics does (since we use CG on the mac port)
00:10
<bckenny>
sorry, is this a problem with the basic compositing modes or with compositing + clipping?
00:10
<jamesr_>
the regions to which the compositing modes apply
00:11
<jamesr_>
for example if the composite mode is "copy" and you draw an image into a larger canvas, does that operation cause every pixel outside the target rectangle to become transparent black or no?
00:11
<bckenny>
ah
00:11
<jamesr_>
the spec says that everything outside of the target bounds of the image becomes transparent black because you first draw the image into an infinitely large transparent black bitmap, then composite that bitmap on top of the canvas using the specified composite mode
00:12
<jamesr_>
which (IMHO) is stupid and nobody does (except maybe opera)
00:13
<bckenny>
yeah it is
00:14
<Philip`>
I don't see how it could be impossible to implement in any graphics system - just draw onto a new temporary canvas-sized bitmap and then composite onto the canvas, instead of doing the drawing+compositing in a single step
00:14
<Philip`>
That wouldn't be particularly efficient but you only need to do it for weird compositing modes
00:16
<jamesr_>
well sure, it's not impossible if you are willing to be super super slow
00:16
<jamesr_>
but i'd rather not use a ton more memory and be slow to implement some functionality that no authors really want
00:17
<Philip`>
If no authors want it then it doesn't matter that it's slow
00:17
<Philip`>
and if authors do want it but you implement something different but faster, they still won't get what they want
00:17
<mdelaney>
Is the current drawing model in fact PorterDuff as Jatinder Mann says?
00:17
<jamesr_>
IE9 may just not support any other composite modes
00:17
<mdelaney>
And why is sticking with traditional porterduff so important?
00:18
<jamesr_>
PorterDuff defines what happens at each pixel
00:18
<bckenny>
is there a common use case that that conceptual model is needed for though?
00:18
<jamesr_>
it doesn't define what pixels you apply the operation to
00:18
<jamesr_>
bckenny: i'm sure you can construct cases and it's very easy to spec out the current model
00:19
<mdelaney>
jamesr_: So, webkit's behavior may be in compliance with porterduff then?
00:20
<bckenny>
I mean, apart from if you might want a transparent blank canvas other than your source image...does it buy you anything in the other compositing modes?
00:21
<bckenny>
because otherwise it just sounds like no one wants to define the extents of a source image and then just say "and it's destination everywhere else"
00:21
<jamesr_>
mdelaney: sure, but that's kind of orthogonal to the issue
00:22
<mdelaney>
jamesr_: I was just going to point out that in Jantinder's email, this is presumably the reasoning for going with Firefox/Opera's way: "We have since consulted with many graphics experts, and it appears that the spec as written, and implemented by Firefox and Opera, is the correct definition of Porter-Duff and composition operations, and its behavior is acceptable."
00:22
<jamesr_>
bckenny: sure. it's tricky if the source is some gradient with lots of transparency or other odd cases
00:22
<MikeSmith>
so TC39 is publishing yet another ES draft with no HTML version
00:23
<mdelaney>
jamesr_: but if both are porterduff in the end, then i'm not sure why Jantinder didn't mention how they came to that conclusion
00:23
<hober>
MikeSmith: your ->HTML conversion script will still work on the new one, I hope
00:23
<jamesr_>
mdelaney: porterduff isn't the significant bit here
00:23
<MikeSmith>
hober: problem is, it's not a script
00:23
<jamesr_>
it's the bounds of the region that you apply the composite operation in
00:23
<bckenny>
jamesr_: sure. I just think of it as compositing a textured quad, and everything else seems silly :)
00:23
<MikeSmith>
or, only partly a script
00:23
<hober>
ahh.
00:23
<jamesr_>
also that email seems to assume that Firefox or Opera match the spec
00:23
<MikeSmith>
manual cleanup :(
00:24
<jamesr_>
which is not true for either in all cases
00:24
<hober>
yeah, I've gone down that road before. 80% script, 20% one-off emacs macros I never remember to record
00:24
<jamesr_>
gregg tavares made a very nice test page in the last big thread about this that showed lots of inconsistencies
00:25
<TabAtkins>
I don't... I don't understand how you can *possible* publish an internet standard not in HTML.
00:25
<TabAtkins>
But then I think the same thing of the IETF and their ridiculously retarded RFC format.
00:25
<jamesr_>
TabAtkins: ECMAScript is not an internet standard, i guess
00:27
<TabAtkins>
Riiiight.
00:27
<TabAtkins>
Though, I suppose I was being unnecessarily restrictive.
00:28
<TabAtkins>
Why is anything anywhere published to the web not in HTML?
02:41
<MikeSmith>
/me wonders if anybody has maybe started work on a WebSRT parser yet
05:30
<Hixie>
MikeSmith: foolip wrote a demo one
05:31
<MikeSmith>
ah cool
05:31
<Hixie>
MikeSmith: i'm going through some websrt feedback now though and making a number of changes to the syntax
05:31
<MikeSmith>
yeah, saw a checkin earlier
05:31
<Hixie>
there's a bunch more but pimpmyspec broke
05:54
<MikeSmith>
Hixie: you busted the spec pimper?
05:58
<Hixie>
jgraham's server's down or something
06:52
<MrWax>
Does anyone know some good CMS systems that already have a beta version in HTML5 ?
06:52
<MrWax>
Drupal right?
07:02
<hsivonen>
isn't drupal drinking more RDFa kool aid?
07:02
<hsivonen>
what html5 features do they have?
07:04
<MikeSmith>
I saw mention recently of Wordpress adding some HTML5 stuff
07:04
<MikeSmith>
dunno if that counts as a good CMS system
07:05
<MrWax>
sure
07:05
<MrWax>
ill look it up
07:05
<MrWax>
can anyone else maybe name some larger web app products (preferbly cms) that have a beta version of their app in HTML5?
07:05
<MrWax>
i more mean that the CMS itself has a beta that uses some cool HTML (API) things
07:06
<MrWax>
i.e. for example webworkers if more than 400 nav tree items have to be added (since it could mess up ui handling)
07:07
<MrWax>
desktop notifications (sorry i know this is not spec, but i heard there are plans from some other brosers than chrome/safari to support later) that notify the os when a large upload is done so the user does not have to havet he browser focussed
08:06
<foolip>
MikeSmith, my implementation is http://people.opera.com/philipj/2010/10/02/ovc/demos/track.js and http://people.opera.com/philipj/2010/10/02/ovc/demos/websrt.js
08:06
<MikeSmith>
thanks
08:06
MikeSmith
takes a look
08:07
<foolip>
but it doesn't implement the rendering or any of the crap after the timecode (positioning)
08:07
<foolip>
but otherwise tries to do what the spec says
08:07
<foolip>
you'll see FEEDBACK in the source code, look at the long mail I sent for the details
08:07
<MikeSmith>
OK
08:08
MikeSmith
looks at websrt_parse(input)
08:10
<MikeSmith>
heh
08:10
<MikeSmith>
"FEEDBACK: this is a terrible idea"
08:39
<foolip>
right, in particular the parsing of the milliseconds
08:40
<foolip>
00:00.1 parses to 0.001 s :)
08:40
<foolip>
because that's what SRT parsers like VLC does
08:51
<MikeSmith>
foolip: well, that's not so great
08:51
<MikeSmith>
they do that by design?
08:51
<MikeSmith>
or just due to a bug that nobody ever bothered to fix?
08:52
<foolip>
I'm not sure
08:52
<foolip>
but I believe they're not the only one to do just that
08:52
<foolip>
it's kind of easier to write in C that way
08:53
<MikeSmith>
I guess it's easier to write it in anything that way
08:54
<MikeSmith>
the date parser in v8 was giving that same result for parsing times with milliseconds, in ISO format
08:54
<MikeSmith>
until recently
08:56
<MikeSmith>
and the cause was partly just that it was expecting/assuming three digits for the milliseconds part
08:56
<MikeSmith>
which is what the spec requires
08:56
<MikeSmith>
but of course not always what people do
08:57
<MikeSmith>
foolip: does it handle 00:00.100 correctly?
08:57
<MikeSmith>
or does it also treat that as 0.001 ?
08:58
<foolip>
it parses the digits after the decimal point as an integer and takes that as the number of milliseconds
08:59
<foolip>
so it's only correct when there are exactly 3 decimals
09:02
<MikeSmith>
ok
09:03
<MikeSmith>
that's not quite as bad, then
09:03
<MikeSmith>
though still not good
09:06
<MikeSmith>
but I can understand why it gives that result
09:07
<MikeSmith>
should instead do something like this:
09:07
<MikeSmith>
http://codereview.chromium.org/5336005/patch/25001/26002
09:09
<MikeSmith>
but anyway, if the existing implementations all interoperably do it the broken way, I guess it makes sense to be consistent with that
09:16
<annevk>
hmm, the encoding data can be tuned quite a bit by ordering the labels more effectively
09:16
<annevk>
sleeping things over was definitely a good idea
09:17
<annevk>
MikeSmith_, hey!
09:17
<annevk>
MikeSmith_, are we publishing today or early January?
09:22
<MikeSmith>
we aren't publishing today
09:22
<annevk>
cool
09:23
<annevk>
I'm gonna work out how to sort these labels then :)
09:23
<MikeSmith>
great
09:35
<annevk>
anyone up for a sorting problem?
09:36
<annevk>
i iterate through a huge list and calculate a score for each item (items can have the same score); now I want a new list sorted by score first and 0-9a-z second
09:38
<annevk>
I guess creating a dictionary with the key being the score and the items being the value as list makes the most sense...
09:40
<jgraham>
MAke a list of (score, name) tuples and do the sort on that
09:40
<jgraham>
It will sort by the first part then the second part, and so on
09:42
<annevk>
ooh
09:42
<jgraham>
Seems we released Opera 11
09:44
<annevk>
jgraham, how do I sort in reverse on score and normal order on label?
09:44
<annevk>
I guess I could just build up score the other way around...
09:44
<jgraham>
annevk: make (-scope, label) tuples?
09:44
<jgraham>
*-score
09:45
<annevk>
this is quite neat
09:46
<MikeSmith>
hsivonen: I've been thinking about how to implement validator support for "URL potentially surrounded by spaces", and one way would seem to be to replace common.data.uri = w:iri-ref with common.data.uri = list { w:iri-ref }
09:47
<MikeSmith>
the downside of that that would be the error message for case like <video src=" http://example.com/Path with spaces "> would change
09:48
<MikeSmith>
hmm, or maybe not such a bad change
09:49
<MikeSmith>
currently, the error message for that is "Bad value http://example.com/Path with spaces for attribute src on element video: Illegal character in scheme component"
09:50
<MikeSmith>
but for the case of <video src="http://example.com/Path with spaces">
09:51
<MikeSmith>
in now reports "Bad value http://example.com/Path with spaces for attribute src on element video: Whitespace in path component. Use %20 in place of spaces"
09:52
<MikeSmith>
but if I change to doing common.data.uri = list { w:iri-ref } it will instead just report "Bad value http://example.com/Path with spaces for attribute src on element video."
09:52
<MikeSmith>
without giving any more guidance than that
09:56
<annevk>
thanks jgraham
09:57
<annevk>
went back from 100 to 86 and far more useful tables at the top
11:17
<annevk>
http://quuz.org/tempxxx/table.html is a little prettier now
11:18
<jgraham>
annevk: The numbers in the table are unicode codepoints?
11:19
<annevk>
yes
11:19
<annevk>
"The table that follows describes the mapping from octets to Unicode "
11:19
<annevk>
I guess I should add codepoint
11:19
<jgraham>
Yeah, codepoint as hex would be more useful than decimal
11:19
<annevk>
you can't do that in your head?
11:20
annevk
looks in python docs
11:21
<jgraham>
"U+" + str(hex(value)).rpad(4) or so
11:23
<jgraham>
"U+" + str(hex(value))[2:].rjust(4).upper()
11:23
<jgraham>
is more right
11:25
<annevk>
what is the rjust for?
11:25
<annevk>
also, hex already returns a string
11:25
<jgraham>
Oh, so it does
11:25
<annevk>
anyway, refresh
11:25
<annevk>
:)
11:25
<annevk>
I omitted the U+ part btw
11:25
<jgraham>
rjust means that hex(10) -> 000A not A
11:25
<annevk>
ooh
11:26
<annevk>
that might be nice
11:26
<jgraham>
I am assuming everything is BMP
11:26
<jgraham>
Otherwise it should probably be rjust(6)
11:27
<annevk>
but rjust doesn't work
11:27
<jgraham>
?
11:29
<annevk>
rjust defaults to a space
11:29
<annevk>
so it's rjust(4, "0")
11:29
<jgraham>
Oh, good point
11:29
<annevk>
refresh again
11:30
<jgraham>
Nice
11:30
<annevk>
I guess I should set font-family to monospace to make them align even better
11:34
<annevk>
done
11:55
<MikeSmith>
hsivonen: please ignore what I said before about the idea of doing common.data.uri = list { w:iri-ref } … I'll add it to the IriRef datatype checker instead
13:03
<annevk>
I guess I need to add some <section>, classes, and a bit of scripting to the result page
13:03
<annevk>
so you can filter the output by browsers you care about
13:19
<MrWax>
Is it recommendable in this current phase of HTML5 , to already start building a beta version of large web app you sell (eg. CMS systems etc) ?
13:20
<jgraham>
The short answer is "yes"
13:20
<MrWax>
To get the new functioality/syntax/api knowledge in your organisation
13:20
<jgraham>
The longer answer questions the notion of a "phase" applied to the whole specification
13:20
<MrWax>
and to receive feedback from testers, what sort of cool things they could like etc
13:21
<MrWax>
ok
13:21
<MrWax>
jgraham: so, when do a presentation, I speak about new functionality that could be relevant for large web apps ( specially CMS) it would be a wise answer to conclude YES because .. ^^ what i just said
13:21
<MrWax>
when I do*
13:22
<MrWax>
(of course given no instable stuff is spoken about)
13:22
<Rik`>
MrWax: think of HTML5 as CSS3, you use the parts that work in browsers, regardless of the state of the whole specification
13:22
<MrWax>
Rik`: yea thats hwta i was going to explain
13:22
<MrWax>
incremantally more and more apis/features will be used the coming years
13:23
<jgraham>
MrWax: What Rik` said. There is no "phase". There is only what is implemented and what is not
13:23
<MrWax>
i more ment:
13:23
<Rik`>
everyone is using parts of HTML5, google, facebook, flickr, etc
13:23
<MrWax>
This current point in time
13:23
<MrWax>
sorry phase was not an appropriate word
13:24
<MrWax>
I just need to convince the essence of HTML5, 2-3 mins; why HTML5 standard initiated (by who), 6-7 mins syntax/markup new tags etc, and speaking / summarizing through a few cool apis and what it could do for a CMS
13:25
<jgraham>
CMS's can use whatever is deployed in browsers they care about. Significant chunks of HTML5 are deployed in browsers they care about. The rest is logical deduction
13:27
<MrWax>
yep
13:27
<MrWax>
but, speaking in terms of creating a beta version, its not per se necessary IE6,7,8 support something
13:30
<beowulf_>
MrWax: there are lots of good html5 presentations floating about on the web that will cover what you want
13:31
<MrWax>
yea i know ive already build one
13:32
<beowulf_>
I meant in terms of content, but ok
13:50
<MrWax>
beowulf_: oh sorry
13:51
<MrWax>
beowulf_: yes i have found a lot good ones, and basically i build my presentation on html5rocks, of course with own content and used a few of the examples that were pretty good already
15:18
<annevk>
jgraham, how do I figure out if a byte has mapped to two code points?
15:18
<annevk>
jgraham, or two 16-bit code units, rather
15:18
<annevk>
jgraham, will the first carry some kind of flag I could check for?
15:20
<annevk>
because so far I have just rejected encodings that go over 256 16-bit code units, but maybe they are actually creating valid octet -> code point mappings and not some kind of multi-byte scheme
15:21
<zcorpan>
annevk: do you want to check for surrogate pairs in javascript?
15:21
<Philip`>
Are you accounting for encodings that have an escape code that switches them into a different mode?
15:22
<annevk>
zcorpan, yes
15:22
<bga_>
annevk congratulations! opera11! :)
15:22
<annevk>
thanks, I'm afraid I had little to do with the release though :)
15:22
<annevk>
Philip`, I'm not dealing with multi-byte encodings
15:23
<annevk>
Philip`, but I want to deal with 8-bit encodings where an octet could potentially create a surrogate pair
15:24
<jgraham>
annevk: I forget, but if javascript exposes the surrogate bytes, don't you just check they are in the surrogate range
15:24
<jgraham>
and then stitch them back together using whatever the formula is
15:25
<annevk>
I was hoping you'd know the details
15:25
annevk
goes to research
15:26
<zcorpan>
annevk: the wiki article on surrogate pairs should tell you which ranges to check for
15:26
<annevk>
http://en.wikipedia.org/wiki/Mapping_of_Unicode_characters#Surrogates seems to have it all
15:26
<jgraham>
annevk: Nah, I just look it up
15:27
<jgraham>
I once even found out where it is documented on OSX if you don't have internet access
15:27
<annevk>
aah, the 16 means hex
15:27
<annevk>
took me a while
15:43
<annevk>
doesn't seem like it
15:43
<annevk>
I don't get the weird behavior I see for some encodings
15:44
<annevk>
x-mac-thai is really weird for instance in Safari
16:44
<hsivonen>
https://twitter.com/#!/ndw/status/15373943112204288
16:45
<hsivonen>
probably a high cost relative the number of switchers attracted
16:58
<annevk>
haha
17:02
<bstar>
embedding a theora stream (from a VLC server) works until the stream moves on to a new playlist item. viewing it in VLC works fine. is there a way to force the <video> element to stay connected across multiple playlist items?
17:03
<jgraham>
hsivonen: I estimate we would get 1 user per XPath version
17:04
<annevk>
before XSLT 2.0 we should do XQueryX
17:05
<annevk>
oh, and provide http://www.w3.org/TR/HTTP-in-RDF10/ as output format for developer tools
17:07
<david_carlisle>
jgraham: but very nice users they would be
17:14
<TabAtkins>
annevk: (responding to the sorting issue from earlier) You can pass custom comparator functions to sort.
17:14
<jgraham>
david_carlisle: All our users are very nice, I'm sure :)
17:14
<jgraham>
TabAtkins: Yeah, but you don't want to
17:14
<TabAtkins>
jgraham: Why not?
17:14
<jgraham>
It's complex and slow
17:15
<jgraham>
So if you can avoid it then you should
17:15
<TabAtkins>
Slow, okay, maybe. Shrug. But complex? Hardly.
17:15
<jgraham>
At least I imagine it is
17:15
TabAtkins
comes from lisp, so passing comparators to sort seems natural.
17:15
<jgraham>
Well you have to look up / remember what the function has to return
17:15
<jgraham>
for the different cases
17:16
<TabAtkins>
That's easy. Just remember the integer comparator lambda x,y: x-y
17:16
Philip`
likes Perl's custom sort syntax, since it encourages use of the spaceship operator
17:16
<jgraham>
TabAtkins: Like I said, complex
17:16
<TabAtkins>
Granted, it's even easier if you can just return a bool, but that's the C legacy for you.
17:17
<Philip`>
my @sorted_by_increasing_age_then_decreasing_height = sort { $a->{age} <=> $b->{age} or $b->{height} <=> $a->{height} } @people; etc
17:17
<TabAtkins>
That's a pretty cool operator. What does it return?
17:17
<Philip`>
-1, 0, or +1
17:17
<TabAtkins>
That's what I suspected.
17:18
<Philip`>
(There's a 'cmp' operator which does the same but with string comparison instead of numeric comparison)
17:20
<jgraham>
Wait, perl has operators that only take specific types? I thought perl was rather weakly typed
17:21
<jgraham>
In the sense of "eager to do implicit type conversions"
17:21
<TabAtkins>
I assume that "string comparison" means "cast to strings before comparing".
17:21
<TabAtkins>
Such that 9 cmp 10 return 1.
17:22
<jgraham>
Oh well that's just silly. There is a reason for explicit cast functions
17:22
<AryehGregor>
PHP works the same way. It's convenient except when it misbehaves and everything breaks.
17:23
<AryehGregor>
Like, in PHP it's a bad idea to do if (!$str) { /* assume string is empty */ }, because '0' == false.
17:23
<AryehGregor>
I can't count the number of MediaWiki bugs that's caused.
17:23
<AryehGregor>
I assume it stole the idea from Perl.
17:23
<Philip`>
jgraham: The operators take any type, and always perform the same operation (e.g. a numeric comparison, or a string comparison) regardless of the dynamic type of the variables
17:23
<TabAtkins>
I assume it's so that 0 means false even if it comes straight from a form.
17:24
<AryehGregor>
Yes.
17:24
<jgraham>
See also: http://twitter.com/gsnedders/status/14717708356550656
17:24
<AryehGregor>
Except when you mean it to be a string and it happens to be exactly '0', it's a headache.
17:24
<Philip`>
(which means you never end up with bugs like doing "var count = input.value + 1; // oops, the input was 0 and now count is '01'" like in JS)
17:25
<AryehGregor>
Like if (!$_GET['username']) { echo '<strong class=error>You must enter a username!</strong>'; }
17:25
<TabAtkins>
Oh, I agree. It's bitten me before, and I think it's retarded. But shrug.
17:25
<Philip`>
(It's silly having a language with implicit string<->number conversions and then operators that do very different things depending on whether a value is currently represented as a string or a number)
17:25
<AryehGregor>
That means '0' is an invalid username, oops.
17:25
<AryehGregor>
I think using . for string concatenation makes sense.
17:26
<AryehGregor>
That far it works.
17:26
<AryehGregor>
But the boolean casting behavior is wonky.
17:26
<AryehGregor>
Actually, casting altogether is wonky.
17:26
<TabAtkins>
Which is why I always use tests like is_set() to see if form vars have been sent, etc.
17:26
<jgraham>
Philip`: I think I was happy at "It's silly having a language with implicit string<->number conversions"
17:26
<AryehGregor>
'0' == false, false == '', '' != '0'
17:27
<Philip`>
AryehGregor: Perl says anything that stringifies to "" or "0" is false, I believe
17:27
<AryehGregor>
That's even more horrible.
17:27
<AryehGregor>
At least in PHP it's only literal '' and '0'.
17:27
<AryehGregor>
Wait, that doesn't even make sense.
17:27
<Philip`>
AryehGregor: What about the number 0?
17:27
<AryehGregor>
I meant strings.
17:27
<AryehGregor>
Of course non-strings have their own rules.
17:27
<TabAtkins>
Python has sane behavior here. Classes can define the function that tells whether they're falsy or not.
17:28
<AryehGregor>
Python is strictly typed.
17:28
<Philip`>
Perl's rules apply to all types
17:28
<AryehGregor>
Which I have mixed feelings about.
17:28
<AryehGregor>
It feels kind of excessive to me to have to write things like "Answer is " + str(answer) instead of being able to just use "Answer is " + answer.
17:28
<AryehGregor>
I have to say, interpolation is really awesome.
17:28
<Philip`>
so 0 stringifies to "0", undefined stringifies to "", objects stringify to "HASH(0x7d8220)" (i.e. not false), etc
17:28
<AryehGregor>
"Answer is $answer"
17:28
<TabAtkins>
It's not strict, it's strong. (Assuming strict was the opposite of dynamic?)
17:29
<AryehGregor>
Strong, strict, whatever.
17:29
<AryehGregor>
The opposite of dynamic is static.
17:29
<TabAtkins>
Gah, right.
17:29
<AryehGregor>
Python has strong dynamic typing.
17:29
<Philip`>
s/objects/object references/
17:29
<TabAtkins>
Too many words starting with "st".
17:29
<jgraham>
You can do "The answer is %s"%answer
17:29
<TabAtkins>
Use "Answer is %s" % answer
17:29
<TabAtkins>
Dammit, jgraham
17:29
<AryehGregor>
Is there any way in Python to get something like "Foo $bar baz" to interpolate variables? Something comparably uncluttered?
17:30
<AryehGregor>
Yeah, but that separates the variables from the place they're put.
17:30
<AryehGregor>
It's considerably more awkward.
17:30
<AryehGregor>
Although probably better than loads of " + ".
17:30
<AryehGregor>
Well, " + foo + ".
17:30
<TabAtkins>
I find it more convenient actually, because I can see what the string will look like even with long expressions for the vars.
17:30
<TabAtkins>
Plus, no silly escaping rules.
17:30
<jgraham>
You might be able to do "Foo ${bar} ${baz}"%locals() but that might not work
17:30
<jgraham>
It would also be a hideous hack
17:31
TabAtkins
always has to pause a bit to remember if he has to do something weird for anything more trivial than a var name in PHP.
17:31
<jgraham>
(I don't recall if it insists that all keys in the dict end up in the output)
17:31
<AryehGregor>
Another thing that's bitten me in Python is how it concatenates adjacent strings. Like "foo" "bar" == "foobar". That's all very nice until you declare an array of lots of strings and forget a comma at the end of the line.
17:31
<AryehGregor>
Then they silently merge together instead of erroring.
17:31
<TabAtkins>
Yeah, that's a wart.
17:31
<jgraham>
Yes, that can be annoying in that case
17:31
<TabAtkins>
I assume it comes from C.
17:32
<AryehGregor>
It makes sense for C, because there's no way to concatenate strings without a function call.
17:32
<TabAtkins>
And Guido thought it was useful.
17:32
<AryehGregor>
You can just stick in a + . . .
17:32
<jgraham>
It is sort of useful
17:32
<jgraham>
But not that useful
17:32
<Philip`>
(Perl uses "<", "<=", "==", "<=>" etc for numeric comparisons, and "lt", "le", "eq", "cmp" etc for string comparisons, which is nice and consistent; but then it uses "||" and "&&" for normal C-like-precedence boolean operators, and "or" and "and" for lower-precedence versions of the safe functions, which is a little more confusing)
17:32
<Philip`>
s/safe/same/
17:32
<AryehGregor>
Python just uses "and" and "or" across the board. Much nicer.
17:33
<AryehGregor>
Also "not" and "in".
17:33
<AryehGregor>
Down with punctuation!
17:33
<Philip`>
Those have C-like precedence, I think
17:33
<TabAtkins>
I always forget what exactly the deal is with PHP's "and" and "or", so I just avoid them.
17:34
<AryehGregor>
I used to use them in an attempt to emulate Python, but other MediaWiki developers mostly prefer && and ||, so I go with the flow (at least for MW).
17:35
<AryehGregor>
It's kind of like this note from our style guide: "Homesick C developers write null as NULL because they want to believe that it is a macro defined as ((void*)0). This is not necessary."
17:35
<Philip`>
Lower precedence means you can write "open $fh, $filename or die" to mean "if (not (open $fh, $filename)) { die; }" in a more concise and threatening way
17:35
<AryehGregor>
I like the "threatening".
17:35
<AryehGregor>
Concise is, of course, typical of Perl.
17:35
<TabAtkins>
I must admit, that's my favorite part of dbconn classes.
17:35
<Philip`>
Sadly you can't write "open $fh, $filename or else"
17:35
<jgraham>
Really "die" as a keyword is just silly
17:35
<AryehGregor>
We seem to be mostly Python people here, is that a coincidence?
17:36
<AryehGregor>
jgraham, I think it's a function, not a keyword, no?
17:36
<AryehGregor>
(I could be totally wrong.)
17:36
<TabAtkins>
I'm like a 5 or 6-language person.
17:36
<jgraham>
I dunno
17:36
<Philip`>
It's a built-in function
17:36
<AryehGregor>
TabAtkins, you're a Python person if you prefer Python to Perl, regardless of whether you actually use or know either.
17:36
<jgraham>
AryehGregor: I imagine the pyhon thing is pure coincidence
17:36
<AryehGregor>
Hixie is a Perl person, and apparently so is Philip`.
17:36
<TabAtkins>
AryehGregor: Sure, then.
17:36
<Philip`>
You can define your own, e.g. the Carp module adds carp and croak etc
17:36
<Philip`>
which act like die but a bit different
17:37
<jgraham>
There don't seem to be that many ruby people here
17:37
<jgraham>
Possibly that is surprising. Possibly they are all just building shit
17:37
<TabAtkins>
Yeah, I've never used Ruby, though it looks interesting.
17:37
<AryehGregor>
Well, Ruby is much less popular overall than Perl or Python.
17:37
<AryehGregor>
At least last I checked.
17:37
<TabAtkins>
At least, outside of Japan.
17:37
<AryehGregor>
It seems to have gotten more popular over the last couple of years, but Python and Perl are much better-established.
17:37
<jgraham>
I have never really felt the need to learn Ruby since I can use python. If I was learning another language I would pick one a bit different
17:37
<AryehGregor>
(especially Perl)
17:38
<AryehGregor>
If I were learning a new language, it would be Lisp or Haskell or something.
17:38
<TabAtkins>
Both are good ideas.
18:29
<Hixie>
AryehGregor: by that definition i'm not a perl person, i just don't know python as well
18:29
<AryehGregor>
Well, you use Perl and not Python, so I think that makes you a Perl person.
18:39
<wes222>
hi
18:40
<AryehGregor>
Hi.
18:40
<wes222>
someone can examine this bug https://bugzilla.mozilla.org/show_bug.cgi?id=619703 about drag n drop?
18:40
<wes222>
it is not related to mozilla, it is a spec bug, i think
18:41
<wes222>
webkit does the same
18:41
<AryehGregor>
File a bug on the spec, then, and the editor will look at it.
18:41
<AryehGregor>
If you think it's a spec bug.
18:41
<AryehGregor>
(I don't know about DnD, so I can't really comment here.)
18:42
<wes222>
thank you... how i can file a bug? ng?
18:43
<AryehGregor>
The spec has a form you can use, that's easiest if you don't have a W3C Bugzilla account. But you might want an account anyway so you can CC yourself on the bug.
18:43
<AryehGregor>
http://www.w3.org/Bugs/Public/ is the bug tracker (component: HTML5).
18:44
<AryehGregor>
For the spec, click on the right section here and use the box at the bottom: http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#dnd
18:45
<wes222>
thank you, i will register myself
18:46
<wes222>
anyway it is not really a drag & drop bug, but it is related to its events order
18:46
<wes222>
take a look if you have time ;)
19:54
<Ms2ger>
annevk, what version of Fx was used for your encoding tests?
19:55
<wes222>
hi ms2ger, ive replied to you on mozilla's bugzilla about dragenter/leave
19:56
<Ms2ger>
I don't actually know enough about dnd to know what's desirable
19:57
<Ms2ger>
Did you file a spec bug already?
19:57
<wes222>
not yet
19:58
<wes222>
i dont want to moan if i'm not sure :)
20:01
<wes222>
in plus what i'm trying to do is impossible to do unless i will examine entire dom trees, set flags, etc
20:02
<wes222>
for who wants to give me an opinion before i file a bug https://bugzilla.mozilla.org/show_bug.cgi?id=619703
20:05
<AryehGregor>
Don't worry, there are loads of people watching the W3C bug tracker who have nothing better to do with their lives than listen to moaning.
20:06
<Ms2ger>
Speak for yourself, Aryeh :)
20:06
<AryehGregor>
I'm only speaking from observation.
20:07
<wes222>
xD
20:20
<AryehGregor>
Does passing by reference not work in C99?
20:22
<AryehGregor>
(sorry for abusing this channel for OpenCL-related help over the last few days)
20:22
<Hixie>
tis not abuse
20:22
<Hixie>
this channel has no topic
20:22
AryehGregor
points to the /topic
20:23
<Hixie>
unless you would argue that C99 has any relation to logic, i think you're good given the /topic
20:24
<AryehGregor>
I will most definitely say that OpenCL has no relation to logic, at least insofar as the implementations I've used are concerned.
20:27
<Hixie>
i rest my case :-)
21:04
<jgraham>
AryehGregor: That has to be closer to the theoretical topic than, say, giving gsnedders dating tips. Which I'm pretty sure we have done in the past
21:09
<gsnedders>
jgraham: pff, you think that's theoretical…
21:18
<jgraham>
gsnedders: Umm, aren't you studying English? You might want to reread the sentence
21:18
<Hixie>
burn
21:19
<dglazkov>
is there a better place I could work on the XBL2 use cases? trac.webkit.org Wiki is unbearably slow
21:20
<Hixie>
what are your needs?
21:20
<Hixie>
just a wiki?
21:20
<Hixie>
collaborative editing?
21:20
<Hixie>
wysiwyg?
21:20
<jgraham>
dglazkov: wiki.whatwg.org?
21:20
<Hixie>
indeed, feel free to use wiki.whatwg.org if it's what you need
21:20
<othermaciej>
dglazkov: w3c and whatwg both have wikis
21:20
<jgraham>
Hixie: burn?
21:20
<Hixie>
jgraham: as in, "ooh, burn"
21:21
<Hixie>
jgraham: not as in, go burn yourself, or something
21:21
<dglazkov>
k thanks
21:21
<jgraham>
Oh
21:21
<Hixie>
as in http://www.urbandictionary.com/define.php?term=burn
21:23
<jgraham>
Hixie: I see. I have heard that usage but I guess it is more common in en-us
21:23
<Hixie>
yeah it's an americanism
21:23
<Hixie>
i am being turned
21:23
<Hixie>
it's very sad
21:23
<TabAtkins_>
Bwahaha.
21:24
<jgraham>
http://www.urbandictionary.com/define.php?term=lambohov <-- urban dictionary is not always reliable
21:24
<TabAtkins_>
Hixie: I have better language for the element() function now, and I need to correct the HTML binding so that out-of-document elements act properly within this context. How do you want the feedback?
21:25
<Hixie>
e-mail is fine
21:25
<Hixie>
can't edit now, in the middle of timed track edits
21:25
<jgraham>
I mean generally you can stay out till 7
21:25
<TabAtkins_>
Hehe, "wörd".
21:25
<TabAtkins_>
Hixie: K, no problem.
21:31
<jgraham>
othermaciej: I think you missed http://tools.ietf.org/html/draft-cridland-hybi-upgrade-connect-00 out of your list of handshake proposal submissions
21:32
<jgraham>
Seems to require an extra rt
21:32
<othermaciej>
jgraham: I did!
21:32
<othermaciej>
I should start the wiki page that mnot suggested
21:32
<othermaciej>
I didn't realize that handshake had an I-D
21:33
<jgraham>
Yeah a wiki page would be good.
21:34
<Ms2ger>
A registry!
21:34
<jgraham>
I don't believe that anyone is keeping up with the volume of mail, or has a full grasp of all the points that have been amde
21:35
<jgraham>
Ms2ger: Don't joke, in a few weeks we will have enough ID submissions that we will need our own registry just to track them
21:38
<othermaciej>
jgraham: that is certainly true, to the point that I am getting frustrated at having to repeat points
21:38
<Ms2ger>
In a few weeks time, everyone will be looking at the next big thing
21:42
<othermaciej>
this particular argument has been going for months
21:54
<AryehGregor>
jgraham, . . . what dating tips did you give him?
21:55
<jgraham>
AryehGregor: I'm not sure. Maybe he remembers. Maybe he knows if they were good advice or not :)
21:57
<jgraham>
We can probably invent some apropos ones though. Like "if you ask if she's a Perl person or a Python question and she doesn't look bemused, that's a good sign. If she replies 'perl' make an excuse to leave"
21:59
<webr3>
perl necklace?
22:00
<AryehGregor>
Maybe she just understood the question as "do you prefer pythons or pearls?", in which case "pearls" is really the expected answer for pretty much anyone.
22:01
<boogyman>
what's wrong with python?
22:02
<AryehGregor>
Who said there's anything wrong with Python? We've all been making anti-Perl remarks here.
22:03
<boogyman>
ah, touche!
22:04
<jgraham>
AryehGregor: You mean you wouldn't look at someone funny if they asked you whether you were a snake person or an item of jewellry?
22:04
<jgraham>
s/or an/or preferred an/
22:05
<AryehGregor>
It would admittedly be irregular.
22:07
<AryehGregor>
Of course, some people like irregularity.
22:08
<AryehGregor>
I have a friend who got married a few months ago, who borrowed my platemail to give her the rings.
22:09
<othermaciej>
platemail?
22:10
<AryehGregor>
That same friend also wore, to his wedding, a top hat, bow tie, one of those jackets that have long tails in the back, a shirt with studs instead of buttons, and a cummerbund.
22:10
<AryehGregor>
I didn't even know what a cummerbund was before I met him.
22:10
<AryehGregor>
othermaciej, yes, I got some platemail when I was a teenager.
22:10
<AryehGregor>
Kind of cheap, but it's made of real metal and everything. Takes like half an hour to put on, with assistance.
22:11
<AryehGregor>
And weighs something like 70 pounds.
22:11
<othermaciej>
zoinks!
22:14
<AryehGregor>
Yes, it's fairly impressive.
22:14
<AryehGregor>
I tend to collapse if I wear it for more than a few hours.
22:23
<othermaciej>
clearly you need a warhorse
22:31
<jgraham>
I have no idea what AryehGregor looks like, but the thought of him on a warhorse is terrifying
22:32
<AryehGregor>
I used to ride horses when I was little.
22:32
<AryehGregor>
More or less so that I could pretend to be a knight.
22:32
<AryehGregor>
My sister went with me, because she (being a typical young girl) liked horses.
22:33
<AryehGregor>
I got freaked out when I got up to cantering, though. Too scary for me at that age, so I gave it up.
22:33
<AryehGregor>
I bet I'd remember how to trot properly given a bit of a chance to try it out, though.
22:33
<AryehGregor>
This was all at the last non-police stable in Manhattan, which apparently closed several years ago: http://en.wikipedia.org/wiki/Claremont_Riding_Academy
22:35
<jgraham>
AryehGregor: BTW it is no fun to have a predictions section on your website unless you just publish a hash of the prediction text, roc style. It adds an air of mystique. Particularly if your predictions are things like "I will eat fruit loops for breakfast every day this week"
22:36
<AryehGregor>
Publishing a hash of the prediction has the flaw that no one will actually bother recording the hash, so when you finally reveal it, people could legitimately assume that you just went back and changed it.
22:36
<AryehGregor>
I guess you could point to archive.org to mitigate that risk, though.
22:37
<AryehGregor>
It reminds me of sending yourself something through the mail so that the postmark proves that you knew the contents on that date. (Which doesn't work, because the post office is happy to mail empty envelopes, so you could always seal it later.)
22:37
<jgraham>
You could embed the hash in a popular Open Source software project and point to its VCS
22:38
<AryehGregor>
(I should send myself an empty envelope just to illustrate the principle.)
22:38
<AryehGregor>
(I've also wanted to see what happens if you send a letter with no postage, with the intended destination as the return address and some nonsense as the destination. Do they actually return it to the return address? That sounds like a security flaw.)
22:39
<Dashiva>
Hah
22:39
<AryehGregor>
(Maybe they apply heuristics like "only return it if the return address is close enough to the place it was dropped off that nobody would be likely to bother cheating us that way".)
22:39
<Dashiva>
I was actually at the primary post processing plant in eastern Switzerland last week, and someone asked that question
22:39
<AryehGregor>
(But in that case, you could still get free mailing to everyone nearby, if you were a total jerk and didn't mind revealing this fact to all your recipients.)
22:40
<AryehGregor>
Dashiva, well, so what was the answer?
22:41
<Dashiva>
In small scale, it doesn't really matter to them, letter return is not guaranteed, and unless you mail a huge number of people only a few times, someone would notice
22:42
<AryehGregor>
Sensible.
22:49
<AryehGregor>
http://blogs.msdn.com/b/interoperability/archive/2010/12/15/html5-video-and-interop-firefox-add-on-provides-h-264-support-on-windows.aspx
22:49
<AryehGregor>
That's . . . interesting.
22:49
<AryehGregor>
"Today, as part of the interoperability bridges work we do on this team, we’re making available a new Firefox add-on that enables Firefox users on Windows to play H.264-encoded video on HTML5 by using the built-in capabilities found in Windows 7."
22:49
<AryehGregor>
Now let's see if they sneak it into a Service Pack and install it by default.
22:53
<gsnedders>
jgraham: As myself and the girl I've ben inseparable from for the past few weeks often say, "I'm an English student. You expect me to know that?"
22:56
<Dashiva>
AryehGregor: Smells like webm
22:56
<AryehGregor>
Dashiva, er, how so?
22:57
<Dashiva>
Trying to build up h264 as a viable cross-browser option before webm can establish itself
22:57
<AryehGregor>
Ah.
22:58
<AryehGregor>
It's true, this would be consistent with the theory that Microsoft is trying to push H.264 and isn't just afraid of patent risk.
22:59
<AryehGregor>
I've mostly been skeptical of that theory -- why provide any WebM support at all in that case?
22:59
<gsnedders>
AryehGregor: The patent risk is a sunk cost for them, so they have no reason to be afraid of it moreso than they already are.
22:59
<AryehGregor>
It would also be consistent with the theory that Microsoft actually wants to increase web interoperability for its own sake, but my prior probability for that is too small to be stored in a standard 32-bit IEEE float.
22:59
<gsnedders>
AryehGregor: And provided they don't actually ship a WebM decoder, there's no patent risk for them. They just look better for supporting it if it is installed.
23:00
<gsnedders>
AryehGregor: JS only has doubles, so it's fine ^^
23:00
<AryehGregor>
gsnedders, the patent risk for H.264 is a sunk cost, but not for WebM, unless people are only afraid of H.264 patents.
23:00
<Dashiva>
As far as I'm aware, Microsoft isn't actually supporting webm, they're just not blocking it from being installed as a regular codec?
23:00
<AryehGregor>
Dashiva, yes, but they are blocking everything else except H.264, I think.
23:00
<AryehGregor>
Or that was the impression I got.
23:01
<AryehGregor>
In particular, I don't think they allow Theora.
23:01
<AryehGregor>
Although maybe I'm wrong.
23:01
<gsnedders>
AryehGregor: Indeed
23:01
<AryehGregor>
So that indicates some level of support for WebM.
23:01
<dglazkov>
moved: http://wiki.whatwg.org/wiki/XBL2UseCases
23:02
<AryehGregor>
My theory is that they don't care about H.264, they don't make much money off it anyway compared to the strategic issues involved, so they'd be okay with WebM if it were really patent-risk-free.
23:02
<AryehGregor>
Which apparently Google has not done enough to assure them about.
23:02
<gsnedders>
AryehGregor: All Google has done, AFAIK, is say it isn't.
23:02
<AryehGregor>
Of course, Google's patent license for WebM doesn't permit implementations other than their own, so that's a reason for anyone else to be wary about relying on it.
23:02
<AryehGregor>
(Kind of ironic given the current lawsuit against them by Oracle.)
23:03
<gsnedders>
AryehGregor: It does, now.
23:03
<AryehGregor>
It does?
23:03
<gsnedders>
AryehGregor: AFAIK ever since it was separated from the license for the impl is has
23:03
<AryehGregor>
gsnedders,
23:04
<AryehGregor>
gsnedders, http://www.webmproject.org/about/faq/#what_if_google_receives_or_buys_a_patent_that_covers_the_code_i_receive_sometime_after_i_receive_the_code_do_i_have_a_patent_grant_for_that_patent
23:04
<AryehGregor>
(id fail)
23:04
<AryehGregor>
Oops.
23:04
<AryehGregor>
Wrong id.
23:04
<AryehGregor>
http://www.webmproject.org/about/faq/#what_if_someone_makes_a_change_to_the_code_and_gives_it_to_me_do_i_have_a_patent_license_from_google_for_that_change
23:04
<AryehGregor>
"You still have the right to redistribute but no patent license for the changes (if there are any patents covering it). We can't give patent licenses for changes people make after we distribute the code, as we have no way to predict what those changes will be. Other common licenses take the same approach, including the Apache license."
23:05
<AryehGregor>
gsnedders, anyway, all they did *publicly* is say that it isn't. There was almost certainly a lot of behind-the-scenes stuff with the other major players.
23:06
<AryehGregor>
You'd think it would be in Google's interest to make an indemnification agreement or something. How much could that increase their potential liability, given YouTube? But maybe they figure MS and Apple will come around in time when Google doesn't get sued. Or maybe they did make an offer but it wasn't accepted for some reason.
23:06
<AryehGregor>
Oh well.