| 15:38 | <gsnedders> | Hmm, given an iterator in Python that returns a list each time, what's the easiest way to loop over all the lists returned? |
| 15:38 | <gsnedders> | e.g., given iter([[1,2,3], [4,5,6]]) iterate over 1,2,3,4,5,6 |
| 15:43 | <variable> | gsnedders, ##python ? |
| 15:44 | <variable> | or rather #python |
| 15:44 | <gsnedders> | But it's less effort to ask here and there tend to be people around who know :P |
| 16:08 | <Slaanesh> | gsnedders: Create a iterator iterator (or see if one exists) |
| 16:10 | <Slaanesh> | Shouldn't be more complicated than for x in iter: for y in x: yield y, I would expect |
| 16:17 | <gsnedders> | Slaanesh: It seems like there should be a way to do it with built-in functions; either implementing a generator or an iterator basically adds too much overhead to make what I'm doing worthwhile as an optimization |
| 16:17 | <gsnedders> | (trying to avoid doing iter(cursor.fetchone, None) but instead butter results with cursor.fetchmany |
| 16:19 | <Slaanesh> | Isn't that the opposite of what you asked for? |
| 16:21 | <gsnedders> | s/easiest/quickest/ I think changes it to be right |
| 16:23 | <gsnedders> | Using oursql instead of MySQLdb, which is all Cython, makes fetchone a heckuva lot cheaper to call like iter(cursor.fetchone, None) |
| 16:23 | <variable> | gsnedders, check to see if you really need to optimize that loop btw |
| 16:25 | <gsnedders> | I don't need to; it doesn't make that much difference if the script takes 300s to run and not 500s :) |
| 16:25 | <gsnedders> | (but that loop is pretty much the entire execution time) |
| 16:26 | <gsnedders> | (and back when it was 500s a large amount was overhead within the DB-API impl) |
| 17:41 | <jgraham> | gsnedders: Search for flatten on http://docs.python.org/library/itertools.html |
| 17:49 | <gsnedders> | jgraham: Ah, I just hadn't found it there |
| 17:54 | <gsnedders> | And chain(*foo) is identical to chain.from_iterable(foo), but works on Py < 2.6 |
| 17:57 | <gsnedders> | No, it isn't |
| 17:57 | <gsnedders> | It's evaluated strictly |
| 17:57 | <gsnedders> | Meh |
| 18:00 | <jgraham> | gsnedders: It's not like it would be difficult to add from_iterable if it is missing |
| 18:00 | <jgraham> | The code is even on the page |
| 18:00 | <gsnedders> | jgraham: But 10s more overhead |
| 18:01 | <jgraham> | Compared to waht total time? And compared to what? |
| 18:01 | <jgraham> | +implementation |
| 18:03 | <gsnedders> | jgraham: 280s, the one in the itertools module |
| 18:04 | <jgraham> | So it only adds about 3% overhead. Not negligible but not obviously a huge deal |
| 18:04 | <jgraham> | Well more like 4% I guess |
| 18:07 | <jgraham> | (especially since the solution of upgrading python is avaliable) |
| 18:14 | <gsnedders> | jgraham: 280s? That's totally not what I meant to say. 180s. |
| 18:14 | <gsnedders> | Which makes it 5.5% |
| 18:15 | <jgraham> | Yeah, but what choices do you have? |
| 18:15 | <jgraham> | ither don't do what you are doing or upgrade python |
| 18:16 | <jgraham> | *E |
| 19:29 | <Workshiva> | I'm trying to recall, didn't Shelley say she was done with htmlwg quite recently? |
| 19:31 | <AryehGregor> | Hasn't she said that on a regular basis for the entire course of her involvement with the HTMLWG? |
| 19:32 | <Workshiva> | It seems more like she's ramped up her activity to me... |
| 20:07 | <Hixie> | jgraham: so far the discussion has been primarily about discussion about discussion about articles |
| 20:07 | <Workshiva> | Sheds and paint for everyone |
| 22:43 | <jgraham> | Hixie: metadiscussion of off-topic topics seems unlikely to be more on topic than the topic it concerns |
| 22:45 | <fagan> | jgraham: what topic are you talking about? |
| 22:45 | <fagan> | is it the article about the two different html5 specs? |
| 22:47 | <fagan> | (w3 and whatwg) |
| 22:49 | <jgraham> | fagan: There was some (meta) discussion on the WHATWG list about some CNN atricle about HTML5 |
| 22:49 | <jgraham> | Or Cnet or someone |
| 22:49 | <jgraham> | CNet seems more likely |
| 22:49 | <fagan> | thats what I was saying :) |
| 22:50 | <fagan> | its more about the differences between the drafts and drama IMO |
| 22:50 | <jgraham> | Well then it appears I am unwittingly agreeing with you |
| 22:50 | <jgraham> | :) |
| 22:50 | <fagan> | but it is offtopic |
| 22:50 | <Hixie> | jgraham: agreed |
| 22:50 | <jgraham> | fagan: For the list, I would say so |
| 22:50 | <jgraham> | Although Hixie is the arbiter |
| 22:50 | <jgraham> | (is that a real word?) |
| 22:51 | <fagan> | I tend to ignore discussions like that just because it attracts flaming sometimes |
| 22:51 | <Hixie> | so far it has remained low-volume enough that i'm letting it pass |
| 22:52 | <Hixie> | (shutting down discussions about my being a dictator is more likely to cause drama than letting a low-level discussion occur) |
| 22:52 | <KrocCamen> | Keep up the good work is all I can say. |
| 22:53 | <KrocCamen> | How can anybody not agree that this is the most exciting time for web development there has been. |
| 22:53 | <jgraham> | Yeah I wasn't really suggesting you shut it down |
| 22:53 | <fagan> | well ignoring those kind of things is the best way of keeping the drama down |
| 22:53 | <jgraham> | Just complaining :) |
| 22:53 | <fagan> | its a big problem for public mailing lists sometimes |
| 22:58 | <fagan> | its interesting that http://www.w3.org/1999/xhtml is the most linked page on this channel |
| 22:59 | <Hixie> | jgraham: i hear ya :-) |
| 22:59 | fagan | was just looking at the stats |
| 22:59 | <Hixie> | fagan: that's the xhtml5 namespace |
| 22:59 | <Hixie> | so it makes sense |
| 22:59 | <fagan> | true |
| 23:04 | <fagan> | Hixie: what happens after HTML5 is finalised? Do we start talking HTML6? |
| 23:06 | <Hixie> | in the whatwg we've already moved on from html5 -- if you look at the spec you'll see it talks about "HTML", not "HTML5" |
| 23:06 | <Hixie> | as or in the w3c, i dunno |
| 23:07 | <fagan> | :) |
| 23:07 | <fagan> | Oh didnt notice the change |
| 23:11 | <aho> | html 7 ex plus alpha turbo championship edition |
| 23:12 | <fagan> | aho: lol |
| 23:19 | <fagan> | hmmmm is the "the" supposed to be behind the "web" in "web hypertext application technology" on this page http://www.whatwg.org/specs/ |
| 23:19 | <Hixie> | yes |
| 23:20 | <fagan> | ah ok so its not a bug its a feature |
| 23:20 | <Hixie> | my styling abilities leave a lot to be desired for :-) |
| 23:20 | <fagan> | well my style isnt any better http://shanefagan.com |
| 23:20 | <fagan> | :D |
| 23:22 | fagan | at least used some HTML5 on one of his posts |
| 23:25 | <fagan> | just the video tag though I wordpress butchered my attempt at using <canvas> |
| 23:26 | <fagan> | just the video tag though I wordpress butchered my attempt at using <canvas> |
| 23:27 | <fagan> | I have played with it on a test website though so fun but I cant draw for the life of me |
| 23:27 | <fagan> | canvas is awesome though |
| 23:27 | fagan | high fives whoever had the idea |
| 23:33 | <KrocCamen> | Apple |
| 23:34 | fagan | high fives apple |