Swhack! 11 May 2009
00:04:51 nwalsh (n=ndw@12.35.79.2) has joined #swhack
00:45:09 nwalsh has quit ("This computer has gone to sleep")
01:21:53 nwalsh (n=ndw@12.35.79.2) has joined #swhack
01:30:41 nslater_ (n=nslater@tumbolia.org) has joined #swhack
01:33:27 [bjoern] has quit ("Quit")
01:44:39 nslater has quit ("http://tumbolia.org/nslater")
01:44:44 *** nslater_ is now known as nslater
02:56:11 shepazu (n=schepers@modemcable203.65-70-69.static.videotron.ca) has joined #swhack
02:59:32 panni_ has quit ("( www.nnscript.de :: NoNameScript 3.81 :: www.XLhost.de )")
04:29:04 jeffarch has quit (Read error: 104 (Connection reset by peer))
05:27:23 tav_ (n=tav@78.151.141.200) has joined #swhack
05:37:19 tav has quit (Read error: 110 (Connection timed out))
05:39:59 Scarb1307 (n=Rudy@n132s238.ntc.blacksburg.shentel.net) has joined #swhack
05:40:58 *** lmorchard is now known as lmorchard|away
05:51:38 Scarb1307 has parted #swhack ()
05:53:52 nwalsh has quit (Read error: 110 (Connection timed out))
06:58:18 leobard (n=Miranda@88-134-158-182-dynip.superkabel.de) has joined #swhack
07:52:32 libby (n=libby@94-169-110-24.cable.ubr22.aztw.blueyonder.co.uk) has joined #swhack
07:53:19 Arnia_ (n=jgeldart@87-194-158-123.bethere.co.uk) has joined #swhack
08:00:31 deltab has quit (Read error: 110 (Connection timed out))
08:00:43 Arnia has quit (Read error: 110 (Connection timed out))
08:01:43 deltab (n=deltab@82-36-30-34.cable.ubr02.smal.blueyonder.co.uk) has joined #swhack
08:01:43 <Monty2> welcome, deltab
08:14:21 <Arnia_> What a scary scary man: http://fmdl.filemaker.com/MISC/bento2/bento_for_iphone.mov
08:25:28 <_ulises> paedosmile
08:30:53 Talliesin (n=Talliesi@86.47.160.33) has joined #swhack
08:33:56 ephemerian (n=ijd@nat/hp/x-45db95f3479d71b8) has joined #swhack
09:13:41 <sbp> yo
09:13:42 <phenny> sbp: 10 May 22:56Z <[bjoern]> tell sbp http://www.guardian.co.uk/politics/2009/may/10/g20-policing-agent-provacateurs
09:13:43 <phenny> sbp: 10 May 23:33Z <clsn> tell sbp yay! It
09:13:45 <phenny> sbp: 10 May 23:33Z <clsn> tell sbp yay! It's been getting some coverage due to the new movie, even though it isn't in it.
09:18:30 <sbp> agents provocateurs: interesting
09:18:37 <sbp> (and interesting typo in the URI)
09:20:59 <_ulises> yo chochacho
09:21:18 <_ulises> sbp: agents provocateurs are rather common back home :)
09:23:27 <sbp> yo _ulises
09:48:56 [bjoern] (n=bjoern@dslb-094-222-134-060.pools.arcor-ip.net) has joined #swhack
09:49:37 <[bjoern]> oy
09:51:01 <_ulises> tally-ho old chap
09:52:12 <[bjoern]> http://vdl.odem.org/ is nice
09:53:48 <[bjoern]> omg kittens
09:54:31 cre8radix (n=jamaerah@c-base/crew/cre8radix) has joined #swhack
09:56:15 <_ulises> she's hawt
09:56:26 <_ulises> in a milfy sorta way
09:59:46 <[bjoern]> .title http://www.dailymail.co.uk/news/worldnews/article-1082707/Outrage-chastity-belt-lingerie-fitted-GPS-tracking-system.html
09:59:47 <phenny> [bjoern]: Outrage over 'chastity belt' lingerie fitted with GPS tracking system | Mail Online
10:08:08 <cre8radix> heya
10:10:40 <_ulises> yo cre8radix
10:11:21 cre8radix has quit ()
10:17:28 <Talliesin> Quite similar to an old hoax website. All the more so given the spin on the idea that the mail has.
10:22:26 <sbp> fairly balanced for a Mail article...
10:30:06 <[bjoern]> yopwhaddup?
10:30:33 <[bjoern]> remind me in 250 minutes to !
10:30:34 <Monty2> [bjoern]: Okay, I'll remind you about that on Mon May 11 15:40:55 BST 2009
10:36:25 <sbp> YO [B]
10:36:30 <sbp> just going out, actually
10:36:47 <[bjoern]> but outside is ... britain!
10:40:01 mmmmmrob (n=mmmmmrob@62.172.77.66) has joined #swhack
10:51:09 cre8radix (n=jamaerah@c-base/crew/cre8radix) has joined #swhack
10:51:40 <cre8radix> yo _ulises
10:54:15 cre8radix has quit (Client Quit)
10:55:43 cre8radix (n=jamaerah@c-base/crew/cre8radix) has joined #swhack
10:58:35 cre8radix has quit (Client Quit)
11:09:12 ephemerian has quit ("Leaving.")
11:09:28 ephemerian (n=ijd@nat/hp/x-ac46b98dc1821b01) has joined #swhack
11:11:30 KiYanWang (n=KiYanWan@62.172.77.66) has joined #swhack
11:17:31 ephemerian has quit ("Leaving.")
11:17:43 ephemerian (n=ijd@nat/hp/x-16db31588d8ed9b8) has joined #swhack
11:37:38 <sbp> ugh, from the misleading headlines department:
11:37:39 <sbp> .title http://news.bbc.co.uk/sport1/hi/motorsport/formula_one/8043243.stm
11:37:41 <phenny> sbp: BBC SPORT | Motorsport | Formula 1 | Barrichello may quit over Button
11:37:52 <sbp> --
11:37:52 <sbp> "But I know Ross wouldn't do that. He asked me to drive for him and he knows I want to race fairly with Jenson."
11:37:53 <sbp> --
11:38:14 <sbp> since he knows Ross wouldn't do that, then obviously he won't quit
11:38:30 <sbp> "Barrichello would quit if Button favoured" would be better
11:38:58 <sbp> and even that would be misleading, because if Button were sufficiently far ahead then that would be following standard team practice
12:13:26 nslater has quit ("http://tumbolia.org/nslater")
12:13:39 nslater (n=nslater@tumbolia.org) has joined #swhack
12:19:53 jessica has quit (Remote closed the connection)
12:20:01 jessica (i=jessica@helios.crschmidt.net) has joined #swhack
12:24:40 [bjoern] has quit (Read error: 104 (Connection reset by peer))
12:25:16 nwalsh (n=ndw@12.35.79.2) has joined #swhack
12:29:03 [bjoern] (n=bjoern@dslb-094-222-134-060.pools.arcor-ip.net) has joined #swhack
12:29:07 <[bjoern]> remind me in 10 minutes to _
12:29:07 <Monty2> [bjoern]: Okay, I'll remind you about that on Mon May 11 13:39:29 BST 2009
12:29:13 <[bjoern]> remind me in 5 minutes to /
12:29:14 <Monty2> [bjoern]: Okay, I'll remind you about that on Mon May 11 13:34:36 BST 2009
12:34:33 <Monty2> [bjoern]: You asked me to remind you to /
12:35:19 <[bjoern]> Monty, were you on the committee that developed guidelines for the ethical treatment of drunken sailors early in the morning for the illiterate?
12:35:21 jsled (n=jsled@dsl195.burlvtma.sover.net) has joined #swhack
12:35:23 <Monty2> My comment is "recommended" or more power, I wouldn't either I thank jchris
12:39:32 <Monty2> [bjoern]: You asked me to remind you to _
12:44:00 jeffarch (n=jeff@70-41-156-138.cust.wildblue.net) has joined #swhack
12:44:49 leobard has quit ("Miranda IM! Smaller, Faster, Easier. http://miranda-im.org")
12:45:54 leobard (n=Miranda@88-134-158-182-dynip.superkabel.de) has joined #swhack
12:52:51 *** lmorchard|away is now known as lmorchard
12:58:48 *** lmorchard is now known as lmorchard|away
13:08:28 MacTed (n=Thud@63.119.36.36) has joined #swhack
13:19:25 <[bjoern]> xover?
13:19:30 <sbp> [bjoern]?
13:19:58 <sbp> questions are fun, aren't they?
13:20:02 <sbp> I like questions, don't I?
13:20:07 <sbp> is this a question?
13:20:14 <sbp> would this still be a question if it had no question mark?
13:21:05 <[bjoern]> Careful, I might ask you my sgml question instead.
13:22:06 <[bjoern]> The question is if "X+Y 5" is a properly formed FPI.
13:24:16 nsh (n=nsh@host86-133-35-168.range86-133.btcentralplus.com) has joined #swhack
13:24:50 <[bjoern]> apparently there are non-formal public identifiers.
13:24:58 <nsh> sup dawg
13:24:59 <phenny> nsh: 01 May 19:25Z <sbp> tell nsh surname: Munro
13:25:15 <nsh> phenny, tell sbp agree
13:25:15 <phenny> nsh: I'll pass that on when sbp is around.
13:25:49 <sbp> [bjoern]: http://xml.coverpages.org/tauber-fpi.html
13:26:14 <sbp> nsh: did you nibble your way out of gaol?
13:26:21 <[bjoern]> that says now. Now, what's the syntax for non-formal ones?
13:26:24 <[bjoern]> -w
13:26:49 <nsh> i rustled a pound of freedom from an ounce of waffleiron
13:26:53 <sbp> that says no?
13:27:01 <nsh> brbx
13:27:01 <[bjoern]> oh actually "public identifier" is the first nt
13:27:18 <[bjoern]> yeah because // is required in "public identifier"
13:27:38 <sbp> no, scroll down...
13:27:38 <[bjoern]> .wik ISO 9070
13:27:40 <phenny> "A registration authority or maintenance agency is a body given the responsibility of maintaining lists of codes under international standards and issuing new codes to those wishing to register them." - http://en.wikipedia.org/wiki/Registration_authority
13:27:50 <sbp> SGML is ISO 8879, innit?
13:27:50 <[bjoern]> .g iso 9070
13:27:50 <phenny> [bjoern]: http://www.freebsd.org/doc/en/books/fdp-primer/sgml-primer-doctype-declaration.html
13:28:16 <[bjoern]> "Information processing -- SGML support facilities -- Registration procedures for public text owner identifiers"
13:28:37 <[bjoern]> well there the fpi one requires // aswell
13:28:46 <[bjoern]> still does not say what non-f pis are
13:29:07 <sbp> oh, yeah
13:29:13 <sbp> I thought that was its OR syntax. heh
13:29:18 <sbp> but obviously not since it uses | before
13:29:21 <sbp> er, below
13:31:27 <[bjoern]> apparently public identifiers have to be minimum literals
13:32:04 <[bjoern]> that identifies more or less which chars you can use, but not if that's just [chars]
13:32:06 <[bjoern]> +
13:32:12 <[bjoern]> or what else
13:32:57 <[bjoern]> perhaps the production to look for is "external identifier"
13:33:04 <[bjoern]> .g "public identifier" "external identifier"
13:33:04 <phenny> [bjoern]: http://xml.coverpages.org/petersonFPI-TAG7030101.html
13:34:30 <[bjoern]> At this point I could just ask opensp aswell, but oh teh horrors
13:35:07 cori[s] (n=cori[s]@h216-165-152-226.mdsnwi.dedicated.static.tds.net) has joined #swhack
13:37:37 <[bjoern]> so here we go http://www.w3.org/MarkUp/SGML/productions.html#prod74
13:42:27 cori[s] has quit ("ttfn")
13:43:02 cori[s] (n=cori[s]@h216-165-152-226.mdsnwi.dedicated.static.tds.net) has joined #swhack
13:48:33 Arnia_ has quit (Read error: 60 (Operation timed out))
14:01:26 *** nsh changed the topic to: "handmaidens to the lore."
14:02:43 nsh- (n=nsh@host86-133-35-168.range86-133.btcentralplus.com) has joined #swhack
14:08:19 Arnia (n=jgeldart@0-16-cb-bd-57-e.it.wlan.dur.ac.uk) has joined #swhack
14:18:51 nsh has quit (Success)
14:25:24 <sbp> man, python3 is confusing sometimes:
14:25:25 <sbp> File "./exifedit", line 137, in edit
14:25:25 <sbp> print(utf8(line), file=f)
14:25:25 <sbp> TypeError: write() argument 1 must be bytes or buffer, not str
14:25:38 <sbp> utf8 is definitely returning bytes
14:25:51 <sbp> perhaps f.write is expecting the bytes?
14:25:54 <[bjoern]> well write?
14:25:56 <sbp> in which case print must be decoding it?
14:26:16 <[bjoern]> It would seem so
14:26:37 <sbp> ah, yes:
14:26:38 <sbp> "All non-keyword arguments are converted to strings like str() does and written to the stream, separated by sep and followed by end."
14:27:30 <sbp> changed to: f.write(utf8(line + '\n'))
14:27:59 <sbp> ah good, it works
14:28:02 <sbp> good little script, this
14:28:15 <[bjoern]> needs a writeln
14:28:17 <sbp> you can edit EXIF fields using a native editor
14:28:21 <sbp> heh, yeah
14:28:26 <sbp> actually there might be one
14:28:49 <sbp> nope. writelines though
14:29:05 <sbp> so you'd do f.writelines([utf8(line)]) I suppose
14:37:35 *** lmorchard|away is now known as lmorchard
14:40:14 <sbp> interesting scenes in the Commons
14:41:02 <Monty2> [bjoern]: You asked me to remind you to !
14:46:40 jeffarch has quit (Read error: 104 (Connection reset by peer))
14:47:42 jeffarch (n=jeff@70-41-156-138.cust.wildblue.net) has joined #swhack
14:58:10 *** lmorchard is now known as lmorchard|away
14:59:22 *** lmorchard|away is now known as lmorchard
15:04:33 panni_ (i=hannes@ip-88-152-22-213.unitymediagroup.de) has joined #swhack
15:12:28 nwalsh has quit ("This computer has gone to sleep")
15:18:13 <nsh-> .ety steerage
15:18:15 <phenny> Can't find the etymology for "steerage". Try http://etymonline.com/?search=steerage
15:18:24 <nsh-> "Steerage... well we'll soon change that."
15:20:08 nwalsh (n=ndw@12.35.79.2) has joined #swhack
15:27:47 KiYanWang has quit ()
15:37:30 jeffarch has quit (Read error: 54 (Connection reset by peer))
15:40:23 jeffarch (n=jeff@70-41-156-138.cust.wildblue.net) has joined #swhack
16:01:41 tobbez has quit (Remote closed the connection)
16:01:45 tobbez (i=tobbez@sagiri.wrya.net) has joined #swhack
16:07:01 shepazu has quit ()
16:11:52 *** lmorchard is now known as lmorchard|away
16:13:55 *** lmorchard|away is now known as lmorchard
16:21:52 mmmmmrob has quit ("we're off to see the wizard...")
16:33:14 jeffarch has quit (Read error: 104 (Connection reset by peer))
16:33:58 jeffarch (n=jeff@70-41-156-138.cust.wildblue.net) has joined #swhack
16:33:58 <nsh-> .oed gracile
16:33:59 <phenny> gracile (ety. ad. L. gracil-is slender.)...) * Slender, thin, lean., * ¶By some recent writers misused (through association with grace) for: Gracefully slender., * Hence 'gracileness.Hence _sm_gracileness.
16:38:54 <nsh-> phenny, en fi "esteemed"?
16:38:55 <phenny> nsh-: "arvostettu" (en to fi, translate.google.com)
16:39:05 <nsh-> phenny, en fi "esteemed company"?
16:39:06 <phenny> nsh-: "arvostettu yritys" (en to fi, translate.google.com)
16:45:25 <xover> [bjoern]?
16:45:25 <phenny> xover: 19 Apr 16:03Z <sbp> tell xover ]]] - http://www.guardian.co.uk/culture/2009/apr/19/shakespeare-portrait-contested
16:52:51 jeffarch has quit (Read error: 104 (Connection reset by peer))
16:53:47 <clsn> Oh! I forgot. Today's my birthday on the Hebrew calendar. woohoo, from right to left.
16:54:11 jeffarch (n=jeff@70-41-156-138.cust.wildblue.net) has joined #swhack
16:59:28 JibberJim (n=jim@81-86-174-182.dsl.pipex.com) has joined #swhack
16:59:52 ephemerian has quit ("Leaving.")
17:06:36 jeffarch has quit (Read error: 104 (Connection reset by peer))
17:09:04 jeffarch (n=jeff@70-41-156-138.cust.wildblue.net) has joined #swhack
17:18:00 jeffarch has quit (Read error: 104 (Connection reset by peer))
17:19:53 jeffarch (n=jeff@70-41-156-138.cust.wildblue.net) has joined #swhack
17:20:51 <[bjoern]> .gc "call me babe"
17:20:52 <phenny> "call me babe": 4,360
17:21:00 Arnia has quit (Read error: 110 (Connection timed out))
17:21:02 <[bjoern]> well sbp and I figured it out xover
17:22:04 <procto> .ety homely
17:22:04 <phenny> "c.1300, 'of or belonging to home or household, domestic,' from M.E. hom 'home.' Sense of 'plain, unadorned, simple' is c.1380, and extension to 'having a plain appearance' took place before 1400, but now survives chiefly in U.S., esp. in New England, where it is the [...]" - http://etymonline.com/?term=homely
17:22:37 <procto> oh really? it's NE?
17:22:50 <procto> cause I keep hearing "homely" on Great British Menu
17:22:55 <procto> and it always sounds weird
17:23:31 <procto> I always think of it as the opposite of "comely"
17:24:54 <[bjoern]> http://www.manufactum.ch/Produkt/0/1443292/NistkastenWolfgangS.html
17:26:33 chris2 (n=chris@0015af75dd95.dfn.mwn.de) has joined #swhack
17:27:29 libby has quit (Read error: 113 (No route to host))
17:30:27 <nsh-> phenny, en fi "competative"?
17:30:28 <phenny> nsh-: "competative" (en to fi, translate.google.com)
17:30:54 <nsh-> phenny, en fi "competitive"?
17:30:54 <phenny> nsh-: "kilpailukykyinen" (en to fi, translate.google.com)
17:38:05 nwalsh has quit ("This computer has gone to sleep")
17:52:00 *** lmorchard is now known as lmorchard|away
17:55:45 leobard has quit (Read error: 110 (Connection timed out))
17:56:34 <deltab> The Museum of Curiosity, on Radio 4: cryptography, meteorology, cosmology, the two Don Quixotes, and more
17:58:52 nwalsh (n=ndw@12.35.79.2) has joined #swhack
18:00:56 chris2 has quit (Read error: 110 (Connection timed out))
18:01:56 kpreid has quit (Read error: 104 (Connection reset by peer))
18:02:03 kpreid (n=kpreid@216-171-189-59.northland.net) has joined #swhack
18:33:10 cre8radix (n=jamaerah@c-base/crew/cre8radix) has joined #swhack
18:33:34 <cre8radix> hey
18:38:44 leobard (n=Miranda@88-134-158-182-dynip.superkabel.de) has joined #swhack
18:43:13 kpreid has quit ()
18:46:30 <sbp> man, python3 is weird
18:46:31 <sbp> >>> b'example'[0]
18:46:31 <sbp> 101
18:47:20 <[bjoern]> .u e
18:47:20 <phenny> U+0065 LATIN SMALL LETTER E (e)
18:47:26 <[bjoern]> .c 0x65 in decimal
18:47:27 <phenny> 0x65 = 101
18:47:41 <sbp> the thing is, I was trying to do this:
18:47:48 <sbp> bytestring[0].isupper()
18:47:59 <sbp> now, b'E'.isupper() would return true
18:48:08 <sbp> but b'Example'[0] doesn't return b'E'...
18:48:20 <sbp> it returns 69
18:48:45 <[bjoern]> well if you want a subbytestring method...
18:50:27 mzeltner (n=mzeltner@91.107.41.83) has joined #swhack
18:50:33 <sbp> heh, even this doesn't work:
18:50:33 <sbp> >>> list(b'Example')[0]
18:50:33 <sbp> 69
18:50:33 <sbp> >>> list(b'Example')
18:50:33 <sbp> [69, 120, 97, 109, 112, 108, 101]
18:50:34 <sbp> >>>
18:51:11 <[bjoern]> I am more confused why byte strings have .isupper
18:51:19 <sbp> same here, really
18:51:38 <sbp> the wonders of python3
18:51:49 <sbp> also, {'p', 'q'} is a set
18:51:54 <sbp> and {'p'} is a set
18:51:58 <sbp> but {} is a dict
18:52:03 <sbp> and {} != set()
18:52:07 <[bjoern]> raise it with the Python5 WG.
18:52:10 <sbp> hehe
19:08:39 nwalsh has quit ("This computer has gone to sleep")
19:09:37 Talliesin has quit ("Leaving.")
19:15:48 <sbp> man, now I can't print utf-8
19:16:48 <[bjoern]> Shouldn't you just set the encoding for the output, and then print a unicode string?
19:17:08 <[bjoern]> That's how it works in languages used by the man race.
19:18:09 <sbp> [bjoern]: that's what I'm trying to do, but...
19:18:13 <sbp> I can't figure out how to do it
19:18:20 <sbp> print doesn't take an encoding parameter
19:18:27 <sbp> nor does sys.output.write, apparently
19:18:43 <sbp> I tried this:
19:18:44 <sbp> sys.stdout = codecs.getwriter('utf-8')(sys.stdout)
19:18:52 <sbp> but that just made things worse
19:18:53 <[bjoern]> sys.stdout.encoding?
19:19:15 <sbp> >>> import sys
19:19:15 <sbp> >>> sys.stdout.encoding
19:19:15 <sbp> 'US-ASCII'
19:19:15 <sbp> >>> sys.stdout.encoding = 'utf-8'
19:19:15 <sbp> Traceback (most recent call last):
19:19:16 <sbp> File "<stdin>", line 1, in <module>
19:19:18 <sbp> AttributeError: readonly attribute
19:19:20 <sbp> >>>
19:19:59 <bancus> Check your locale?
19:20:07 <[bjoern]> "Then you have two bugs. One bug is in Python: it never occurred
19:20:07 <[bjoern]> to me to set the .encoding attribute on a stream writer, but that
19:20:07 <[bjoern]> might be a good idea."
19:20:16 <sbp> I tried futzing with the locale
19:20:20 <sbp> I did what it said in the documentation
19:20:23 <sbp> and it gave me an error
19:21:50 <[bjoern]> also http://bugs.python.org/issue4947
19:21:56 <sbp> ah! here we go: http://d.hatena.ne.jp/blankblank/20090304
19:22:19 <sbp> you have to set $LANG
19:22:23 <sbp> apparently nothing else will work
19:22:46 <sbp> [bjoern]: that bug isn't in python3
19:22:59 <[bjoern]> binmode STDOUT, ":utf8"; print $whatever.
19:23:41 <nslater> sbp: could it also be picked up from defaultlocale?
19:23:49 <nslater> or whatever that stupid readonly variable is
19:24:10 <nslater> sys.getdefaultencoding()
19:24:11 <Monty2> s/used/use
19:24:27 Arnia (n=jgeldart@0-16-cb-bd-57-e.it.wlan.dur.ac.uk) has joined #swhack
19:25:17 <sbp> same question asked here:
19:25:18 <sbp> http://stackoverflow.com/questions/507123/python-3-0-how-to-make-print-output-unicode
19:25:26 <sbp> nslater: getdefaultencoding() is utf-8
19:25:34 <nslater> hmm, {1, 2} is a set? cool
19:25:36 <sbp> stdout.encoding is still US-ASCII
19:25:56 <nslater> starting to see why you wanted to use them now
19:26:04 <nslater> was thinking python2 mode
19:27:09 <[bjoern]> terminals of course are never much joy http://www.nntp.perl.org/group/perl.i18n/2008/07/msg214.html
19:27:15 <nslater> .title
19:27:15 <phenny> nslater: Printing non-ascii on the Win32 console - nntp.perl.org
19:28:04 <sbp> [[[
19:28:05 <sbp> sys.setdefaultencoding(name)
19:28:12 <sbp> ]]] - http://docs.python.org/dev/py3k/library/sys.html
19:28:14 <sbp> and yet:
19:28:18 <sbp> Traceback (most recent call last):
19:28:19 <sbp> File "./exifedit", line 9, in <module>
19:28:19 <sbp> sys.setdefaultencoding('utf-8')
19:28:19 <sbp> AttributeError: 'module' object has no attribute 'setdefaultencoding'
19:28:26 <sbp> this is absolutely crazy
19:28:29 <[bjoern]> Came across that, but ... people said it's broken
19:28:45 <nslater> sbp: no no, erm
19:29:00 <nslater> sbp: you can only set it once in your site customization file
19:29:10 <nslater> sbp: after that, python removes the function that allows you to set it
19:29:16 <nslater> sbp: i.e. set once, and per-stie
19:29:25 <[bjoern]> note that "Once used by the site module, it is removed from the sys module\rquote s namespace."
19:30:08 <nslater> check setencoding() in /usr/lib/python2.5/site.py
19:30:29 <nslater> --
19:30:30 <nslater> # Remove sys.setdefaultencoding() so that users cannot change the
19:30:33 <nslater> # encoding after initialization. The test for presence is needed when
19:30:36 <nslater> # this module is run as a script, because this code is executed twice.
19:30:39 <nslater> if hasattr(sys, "setdefaultencoding"):
19:30:42 <nslater> del sys.setdefaultencoding
19:30:44 <nslater> --
19:31:26 <[bjoern]> Anyone remember when I tested this last? http://rakudo.org/status
19:31:38 <sbp> oh man:
19:31:39 <sbp> >>> sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
19:31:39 <sbp> >>> print('ほげ')
19:31:39 <sbp> ほげ
19:31:44 <nslater> sbp: I generally never update this site wide value, because it forces me to check my encoding issues
19:31:46 <sbp> – http://d.hatena.ne.jp/kei10in/20090331/1238520386
19:32:16 <sbp> chuckle. that works
19:32:25 <[bjoern]> seems like end of 2008
19:32:26 *** sbp changed the topic to: "sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')"
19:32:30 <sbp> the joy of python3
19:32:41 <nslater> does the same aprox problem not apply to python2?
19:32:48 <sbp> not at all, no
19:32:53 <nslater> o_O
19:33:11 <sbp> you can print bytes in python2
19:33:16 <sbp> you can't in python3
19:33:18 <nslater> hmm
19:33:25 <nslater> nslater@tumbolia: ~ $ python
19:33:28 <nslater> >>> print('ほげ')
19:33:28 <nslater> ほげ
19:33:32 <nslater> nslater@tumbolia: ~ $ python3.1
19:33:35 <nslater> >>> print('ほげ')
19:33:35 <nslater> ほげ
19:33:53 <sbp> .u ㋡
19:33:53 <phenny> U+32E1 CIRCLED KATAKANA TU (㋡)
19:33:53 <phenny> U+32E1 CIRCLED KATAKANA TU (㋡)
19:34:02 <sbp> do this in python 2:
19:34:10 <nslater> huh, why did phenny reply twice?
19:34:18 <sbp> print u'\u32E1'.encode('utf-8')
19:34:21 <sbp> and this in python 3:
19:34:30 <sbp> print '\u32E1'.encode('utf-8')
19:34:33 <sbp> er
19:34:37 <sbp> print('\u32E1'.encode('utf-8'))
19:34:51 <nslater> b'\xe3\x8b\xa1'
19:34:57 <sbp> exactly
19:35:02 <nslater> wtf
19:35:03 <sbp> get it to print out the smiley face
19:35:10 <sbp> using '\u32E1' as input
19:35:13 <sbp> (tip, see topic!)
19:35:14 <nslater> >>> print('\u32E1')
19:35:14 <nslater> ㋡
19:35:16 <nslater> easy
19:35:27 <sbp> that doesn't work for me
19:35:31 <nslater> wonder why
19:35:37 <sbp> it complains that the ascii codec doesn't work
19:35:41 <[bjoern]> the wonders of locales of course
19:35:44 <nslater> >>> sys.getdefaultencoding()
19:35:44 <nslater> 'utf-8'
19:35:49 <[bjoern]> then your locale is likely set to us-ascii
19:35:53 <nslater> nslater@tumbolia: ~ $ locale
19:35:54 <nslater> LANG=en_GB.UTF-8
19:36:08 <nslater> kinda makes sense that
19:36:19 <nslater> you're tryin to print something that doesnt match the terminal LANG
19:36:24 <nslater> hence an error, unless you want to force it
19:36:27 <sbp> fine, but I can't set the locale either
19:36:39 <sbp> (in python)
19:36:43 <nslater> which also makes sense, its preventing people from being silly, I guess
19:37:26 <nslater> seems silly to be forcing a LANG on a user which may have it set very specifically for some reason, if you see what I mean
19:38:03 <sbp> even if I set LANG it comes out double encoded:
19:38:03 <sbp> „ã°
19:38:13 <nslater> hmm, what do you set it to?
19:38:23 <sbp> $ export LANG=en_GB.UTF-8
19:38:28 <nslater> because its odd that mine works and yours doesnt
19:38:32 <nslater> wonder what the cause is
19:38:40 * nslater blames steve jobs
19:38:46 <nslater> (personally)
19:38:52 <[bjoern]> guessing encoding from locale is silly because you get fail when doing script > file
19:38:56 <sbp> perhaps the reader is double encoding somewhere, actually
19:39:30 <nslater> [bjoern]: hmm? why would stdout redirection effect it?
19:39:57 <[bjoern]> that kinda is the point
19:40:15 <[bjoern]> your terminal may expect some encoding, but what you read the file with later some other encoding
19:40:20 <nslater> right
19:40:36 <nslater> hmm, yeah - seems totally stupid actually
19:40:55 <sbp> \xe2\x80\x9e\xc3\xa3\xc2\xb0
19:41:00 <sbp> definitely double encoding somewhere
19:41:29 <sbp> (python3 was supposed to make this easier!)
19:41:39 * nslater blames guido
19:41:42 <nslater> (personally)
19:42:06 <sbp> okay, I think it's exiftool that's double encoding actually
19:42:26 <sbp> unless I'm feeding it double encoded data
19:42:29 <sbp> which is perhaps more likely
19:43:25 ephemerian (n=ijd@82-71-51-229.dsl.in-addr.zen.co.uk) has joined #swhack
19:43:52 <sbp> yes. weird
19:45:14 <sbp> ah, simple problem
19:45:28 <sbp> needed to set encoding='utf-8' in an open
19:45:37 <sbp> I thought it was using encoding='utf-8' automatically
19:45:40 <sbp> but apparently not
19:48:11 cre8radix has quit ("your mama! >:)")
19:49:02 <sbp> great, it works!
19:49:07 jeffarch has quit (Read error: 104 (Connection reset by peer))
19:49:28 * sbp managed to get it to mostly use unicode internally
19:52:20 <nsh-> like an enema?
20:01:24 jeffarch (n=jeff@70-41-156-138.cust.wildblue.net) has joined #swhack
20:02:18 nwalsh (n=ndw@12.35.79.2) has joined #swhack
20:04:29 Xanthor|aw has quit (Read error: 110 (Connection timed out))
20:07:42 Xanthor|aw (n=Xanthor@ALyon-257-1-72-246.w90-15.abo.wanadoo.fr) has joined #swhack
20:11:04 nwalsh has quit ("This computer has gone to sleep")
20:18:05 <deltab> I've just compiled python 3
20:18:26 <deltab> unicode output Just Works
20:18:39 <nslater> deltab: did you try what sbp was doing?
20:18:40 <deltab> sys.stdout.encoding is utf-8
20:18:47 <nslater> deltab: but what's your locale?
20:18:54 <deltab> writing to a file encoded into utf-8
20:19:08 <deltab> en_GB.UTF-8
20:19:14 <nslater> not really, printing in utf-8
20:19:19 <nslater> yeah, sbp's locale isnt
20:19:24 <nslater> which is where the problem stems from
20:19:41 <nslater> making it more than akward to print in utf8 when the locale isnt set to use it
20:19:48 <deltab> hey sbp, use utf-8
20:20:26 <nslater> deltab: what if you wanted to write in Shift_JS before sending somewhere?
20:22:29 nwalsh (n=ndw@12.35.79.2) has joined #swhack
20:22:30 <deltab> then I'd open the file with shift-JIS encoding
20:22:47 <nslater> but we're specifically talking about print statements, i.e. sys.stdout
20:23:01 <nslater> my-command > file-to-send.txt
20:26:20 <deltab> I could use sys.stdout.buffer.write(b)
20:26:39 <nslater> well, sbp's solution is in the topic
20:26:53 * deltab nods
20:26:58 <nslater> maybe yours works too, I wouldn't know unless I tried :)
20:27:08 <deltab> it does work
20:27:30 <deltab> and for the same reason: bypassing the TextIO layer
20:28:31 Arnia has quit (Read error: 110 (Connection timed out))
20:28:37 *** lmorchard|away is now known as lmorchard
20:28:58 <sbp> yeah, works for me if I set $LANG too
20:29:06 <nslater> set lang externally?
20:29:18 <sbp> sys.stdout.buffer.write: ah, interesting
20:29:24 <sbp> yeah, setting it externally
20:29:34 <sbp> still kinda bummed I can't set it internally
20:29:44 <sbp> I know what you mean about user LANG
20:29:49 <sbp> but for example mine wasn't set...
20:30:53 <sbp> I'm still not happy with this command line crap
20:30:59 <nslater> lol
20:31:11 <nslater> ooh, i know..
20:31:23 <sbp> for the record, I'm trying to do a kind of pattern matching for command line parsing
20:31:31 <nslater> just do "exec(''.join(args))"
20:31:40 <nslater> let the user pass in the function they want to execute
20:31:43 <sbp> so I'm getting sets of fields
20:31:54 <sbp> but then the empty set can't be compared with {}
20:31:57 <sbp> because that's a dict
20:32:10 <nslater> sbp: what about {,}
20:32:13 <sbp> (as I complained about earlier)
20:32:30 <sbp> SyntaxError
20:32:31 <sbp> good idea though
20:32:34 <nslater> feh
20:32:58 <nslater> are you going to complain to py3k people about these problems?
20:33:01 <nslater> might get them fixed :)
20:33:14 <[bjoern]> in py4k
20:33:18 nwalsh has quit ("This computer has gone to sleep")
20:34:58 Xanthor|aw has quit (Read error: 110 (Connection timed out))
20:35:26 <deltab> sbp: you should be able to use locale.setlocale to change the encoding; I don't have any non-UTF--8 locales to test with
20:36:15 <deltab> use set() to get an empty set
20:36:27 <[bjoern]> that he knows
20:37:23 <deltab> various notations for the empty set have been suggested, but at least for now empty sets aren't used often enough
20:38:53 Xanthor|aw (n=Xanthor@ALyon-257-1-107-153.w90-28.abo.wanadoo.fr) has joined #swhack
20:43:18 <sbp> .gc "badger faced Welsh mountain sheep"
20:43:20 <phenny> "badger faced Welsh mountain sheep": 18
20:43:48 <[bjoern]> in penis off.
20:48:14 nwalsh (n=ndw@12.35.79.2) has joined #swhack
20:48:50 <[bjoern]> remind me in 15 minutes to !
20:48:51 <Monty2> [bjoern]: Okay, I'll remind you about that on Mon May 11 22:04:14 BST 2009
20:48:57 <sbp> deltab: I'm not entirely sure what the best way of doing such parsing would be anyway
20:49:15 <sbp> I did sketch out something much more involved using a decent syntax
20:49:30 <sbp> but it wouldn't be embeddable, you'd need to use it as a module
20:50:45 <sbp> this sort of thing would have been good:
20:50:46 <sbp> if opts in {[], ['-h'], ['--help']} and len(args) == 0:
20:50:46 <sbp> help()
20:51:02 <sbp> but you can't use lists in {}
20:51:07 <sbp> so I thought no problem, use tuples
20:51:21 <sbp> but then ['-h'] has to become ('-h',) which is ugly
20:51:43 <sbp> so I've split it into groups depending on args length, and then:
20:51:44 <sbp> if len(args) == 0:
20:51:44 <sbp> if not flags or flags == {'-h'} or flags == {'--help'}:
20:51:44 <sbp> help()
20:51:55 <sbp> not flags to get around the {}-is-a-dict problem
20:52:43 <[bjoern]> {}-is-a-dick-...-from-behind?
20:59:09 MacTed has quit ()
21:00:57 <sbp> from-behind-in-a-penis
21:01:13 <[bjoern]> .gc "from behind in a penis"
21:01:15 <phenny> "from behind in a penis": 0
21:01:27 <sbp> Swhack wins again
21:01:38 <sbp> .gc "googlecount zero"
21:01:39 <phenny> "googlecount zero": 3
21:02:20 <sbp> I think they should just make {} == set() be True
21:02:35 <sbp> ooh, or make {} be a superclass of dict/set
21:04:02 <Monty2> [bjoern]: You asked me to remind you to !
21:04:11 <[bjoern]> I am way ahead of you Monty2.
21:04:16 <Monty2> (I guess I'm trying to remember tav wanted it may overtake, but thats usually used for me :-)
21:04:41 <[bjoern]> Monty2, you properly balanced your braces. Bastard.
21:04:41 <Monty2> screw you
21:04:52 <[bjoern]> Oh I so wish.
21:05:53 nwalsh has quit ("This computer has gone to sleep")
21:06:35 <[bjoern]> "Maybe I would have liked it if I were stoned." - Star Trek review.
21:06:58 <[bjoern]> "The romance between Spock and Uhura was completely cliche and unnecessary."
21:10:53 <nslater> woah
21:10:58 <nslater> live feed of nasa shuttle launch
21:10:59 <nslater> http://www.nasa.gov/multimedia/nasatv/index.html
21:11:26 <[bjoern]> do they ever look different?
21:11:34 <[bjoern]> when not exploding?
21:11:48 <clsn> someone pointed me to this re the Star Trek movie: http://www.youtube.com/watch?v=02LgdXVkXgM&feature=fvhl
21:11:51 <clsn> .title
21:11:52 <phenny> clsn: YouTube - Trekkies Bash New Star Trek Film As 'Fun, Watchable'
21:11:53 <bancus> Yeah the Spock/Uhura thing really threw me.
21:12:06 nwalsh (n=ndw@12.35.79.2) has joined #swhack
21:12:06 <Monty2> bah, it's nwalsh again
21:12:06 <[bjoern]> that's sounds like from theonion.com
21:12:10 <bancus> It is.
21:12:11 <clsn> I haven't seen it yet. Neighborhood folks have said they want to see it with me.
21:12:17 <clsn> Yeah, it's the onion.
21:12:19 <nslater> sbp: http://www.scientificamerican.com/article.cfm?id=think-better-tips-from-a-savant
21:12:22 <bancus> It's certainly worth seeing.
21:12:29 <bancus> I hope they make a sequel because I think it'll be better.
21:12:34 <[bjoern]> if only to complain about it online.
21:12:37 <bancus> They spend half the movie getting the crew together.
21:14:47 <[bjoern]> "Delta Vega is apparently a moon of Vulcan. Why didn't that moon get destroyed in the black hole?"
21:15:45 * clsn sings LA LA LA LA LA LA LA LA LA Spoilers LA LA LA LA LA
21:21:15 nsh- has quit ()
21:22:23 <[bjoern]> "become captain by making fun of Spock's mommy"
21:22:54 <[bjoern]> "I haven't seen such improbable writing since the A-Team."
21:26:11 <deltab> ‹sbp› so I thought no problem, use tuples
21:26:18 <deltab> use tuples instead of sets
21:26:24 <deltab> >>> ['-h'] in ([], ['-h'])
21:26:25 <deltab> True
21:28:55 nwalsh has quit ("This computer has gone to sleep")
21:34:42 Xanthor|aw has quit (Read error: 110 (Connection timed out))
21:38:29 Xanthor|aw (n=Xanthor@ALyon-257-1-97-31.w90-28.abo.wanadoo.fr) has joined #swhack
22:14:39 nwalsh (n=ndw@12.35.79.2) has joined #swhack
22:17:12 kpreid (n=kpreid@cpe-67-242-4-64.twcny.res.rr.com) has joined #swhack
22:21:30 nwalsh has quit ("This computer has gone to sleep")
22:29:10 nsh (n=nsh@host86-133-35-168.range86-133.btcentralplus.com) has joined #swhack
22:35:23 Xanthor|aw has quit (Read error: 110 (Connection timed out))
22:39:30 Xanthor|aw (n=Xanthor@ALyon-257-1-99-77.w90-28.abo.wanadoo.fr) has joined #swhack
22:42:24 nsh has quit ()
22:54:32 <deltab> ‹Philip`› It's like the current HTML 5 is an asteroid heading catastrophically towards Earth, and blog comments are like bouncing little rocks off it in an attempt to deflect it onto a course that won't destroy the things those people care about
22:54:41 <deltab> ‹Philip`› whereas you're suggesting building an entire new asteroid and making sure that hits Earth first and knocks it out of the way so the other asteroid won't have any detrimental impact
22:54:51 <deltab> ‹Philip`› and your other suggestion is that those people should complain to God so that He declares the asteroid as unholy in the hope that the asteroid will realise the error of its ways
22:55:14 Arnia (n=jgeldart@87-194-158-123.bethere.co.uk) has joined #swhack
22:58:40 leobard has quit ("Miranda IM! Smaller, Faster, Easier. http://miranda-im.org")
23:04:31 Xanthor|aw has quit (Read error: 110 (Connection timed out))
23:06:02 tobbez_ (i=tobbez@sagiri.wrya.net) has joined #swhack
23:06:09 tobbez has quit ("Reconnecting")
23:06:13 *** tobbez_ is now known as tobbez
23:09:33 Xanthor|aw (n=Xanthor@ALyon-257-1-117-93.w90-28.abo.wanadoo.fr) has joined #swhack
23:20:13 shepazu (n=schepers@206.108.169.82) has joined #swhack
23:23:53 nwalsh (n=ndw@12.35.79.2) has joined #swhack
23:34:18 shepazu has quit ()
23:34:41 Xanthor|aw has quit (Read error: 110 (Connection timed out))
23:35:15 nwalsh has quit ("This computer has gone to sleep")
23:38:12 Xanthor|aw (n=Xanthor@ALyon-257-1-41-254.w90-14.abo.wanadoo.fr) has joined #swhack
23:51:45 *** lmorchard is now known as lmorchard|away
23:59:06 Xanthor|aw has quit (Connection timed out)
23:59:51 *** lmorchard|away is now known as lmorchard