code logs -> 2011 -> Thu, 21 Apr 2011< code.20110420.log - code.20110422.log >
--- Log opened Thu Apr 21 00:00:52 2011
00:21 You're now known as TheWatcher[T-2]
00:31 You're now known as TheWatcher[zZzZ]
00:59 Derakon[AFK] is now known as Derakon
00:59 celticminstrel is now known as celmin|supper
01:38 Attilla [Some.Dude@Nightstar-92c9199f.cable.virginmedia.com] has quit [Ping timeout: 121 seconds]
02:03 Stalker [Z@26ECB6.A4B64C.298B52.D80DA0] has quit [Ping timeout: 121 seconds]
02:29 gnolam [lenin@9D46A2.F4E9D7.E4B4CF.2072AD] has quit [[NS] Quit: Z?]
02:39 * Derakon mutters at vim for not preserving accents properly.
02:39
< Derakon>
If it did, I could do this text modification quite quickly...
02:43 celmin|supper is now known as celticminstrel
02:57 * Vornicus hunts around for something he saw once
02:58
< Vornicus>
Something about not-necessarily-true assumptions about real names, like "the user's name can be written using characters from the BMP" and even "the user has a name"
02:59
< McMartin>
The correct reaction to that list is "fuck you, world, bend to my will."
02:59
< McMartin>
It has the opposite effect than intended.
03:00
< McMartin>
It wants to be an argument for "you need to consider the multicultural aspects of your software" - it is actually an argument for "being multicultural in your software is a hopeless task; do what's easy/useful and call it a day without a strong case otherwise"
03:05 SmithKurosaki [smith@4FC299.382CB9.EF1529.A5B039] has joined #code
03:06 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has joined #code
03:07
< Vornicus>
Of course.
03:49 Netsplit *.net <-> *.split quits: froztbyte, Vornicus, kwsn, celticminstrel, PinkFreud, cpux, Derakon, Tarinaky, Reivles, ToxicFrog, (+5 more, use /NETSPLIT to show all of them)
03:50 Netsplit over, joins: Vornicus, ToxicFrog, Reivles, PinkFreud, Tamber, kwsn, froztbyte, Derakon, celticminstrel, EvilDarkLord (+5 more)
03:57 Syloqs-AFH [Syloq@NetworkAdministrator.Nightstar.Net] has quit [[NS] Quit: ]
04:08 Syloqs_AFH [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code
04:09 Syloqs_AFH is now known as Syloqs-AFH
04:18
< Tarinaky>
So if I have a function I want to be called when I import a module, in pythong, do I call that function __init__ or do I still have to invoke it?
04:20
< Vornicus>
Tarinaky: code that is not within a function is run when the module is imported.
04:23
< Vornicus>
F'rinstance if you look at the bottom of random.py you'll see how it creates an instance of the Random class and then aliases the methods of that instance to module-wide names.
04:24
< Vornicus>
(and then after that it checks to see if random.py has been run as a script in itself and if so calls the tests)
04:26
< Vornicus>
It doesn't do these things in a function.
04:28
< Tarinaky>
Vornicus: I want the code to be in a function as well, so it can be called on demand.
04:28
< Tarinaky>
It's just required to be run at least once.
04:28
< Vornicus>
Right, then you'll have to call it.
04:28
< Tarinaky>
I was wondering if __init__ would call it because modules are objects or if I'd have to explicitly...
04:28
< Tarinaky>
Right.
04:29
< Tarinaky>
The other thing, the documentation is a little unclear.
04:30
< Tarinaky>
Is calling __setattr__(self, first, second) equivalent to self.first = second?
04:30
< Tarinaky>
I know I can replace it with a custom method, but I'm unsure if it's correct to invoke it.
04:30
< Vornicus>
that's what it does, yes.
04:31
< Vornicus>
But in general you should never directly call __functions__
04:32
< Tarinaky>
Well, given that first and second are both variables I don't think there's any other way of doing it.
04:32
< Tarinaky>
Not without being silly.
04:32
< Tarinaky>
And I figured using __setattr__ as an interface was more correct than reaching in and fiddling with the object's dictionary >.>
04:33
< celticminstrel>
ToxicFrog: Well, you could do self.__dict__[first] = second.
04:33
< celticminstrel>
I'm not sure if that bypasses get/set on properties.
04:33
< celticminstrel>
Uh.
04:33
< celticminstrel>
Tarinaky, even.
04:34
< Vornicus>
there's also iirc a setattr builtin.
04:34
< Tarinaky>
Isn't that __setattr__?
04:34
< Vornicus>
http://docs.python.org/library/functions.html#setattr
04:35
< celticminstrel>
Yeah, that too.
04:35
< Tarinaky>
Ah.
04:38 Kindamoody is now known as Kindamoody[zZz]
04:42
< Vornicus>
Also: __ at the start of a function generally means it's going to get mangled by the bytecode compiler. You might not even be /able/ to call them directly.
04:42
< Tarinaky>
That I did not know.
04:43
< celticminstrel>
Well, if it's from within the class, you're fine.
04:43
< celticminstrel>
But yeah, just use setattr.
04:43
< Tarinaky>
Also. Importing my module does not, seem, to be executing the function I call in the body of the module.
04:45
< Tarinaky>
Oh. No. Even stranger.
04:46
< Tarinaky>
Err...
04:46
< Tarinaky>
I don't understand why but the logger isn't logging.
04:47
< Tarinaky>
Specifically, it isn't logging in a particular module.
04:58
< Tarinaky>
Have I just gone terminally stupid.
04:59
< Tarinaky>
I'm doing ipython -pdb program and when it throws an exception it isn't dropping into the debugger.
05:03 cpux is now known as shade_of_cpux
05:05
< Tarinaky>
python -m pdb doesn't work either, and I'm pretty sure the documentation says it should.
05:09 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds]
05:09 Kindamoody[zZz] [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has quit [Ping timeout: 121 seconds]
05:15 Kindamoody[zZz] [Kindamoody@35E323.4A5F05.9893B9.A684A3] has joined #code
05:18
< Reivles>
Hey, ToxicFrog
05:18
< Reivles>
Did that virtual card table ever get anywhere?
05:18
< ToxicFrog>
Reivles: it got several places, all of them wrong :(
05:18
< ToxicFrog>
I'm currently redesigning the core engine again
05:19
< ToxicFrog>
The good news is that this time I won't need to rewrite all of the object code.
05:19
< Reivles>
Interesting
05:19 * Reivles just broke out Ergo again and was terribly tempted to play it with programmers~
05:27 * Reivles wants to prove that ToxicFrog does not exist, for some strange and machivellian reason ??
05:31
< ToxicFrog>
Ergo does sound like a hell of a lot of fun.
05:32
< ToxicFrog>
And yeah, the original design was "the server is just a message relay, everyone has their own state and broadcasts updates".
05:32
< ToxicFrog>
This turned out to be Race Condition Central.
05:33
< ToxicFrog>
The second design, which is what I've spent most of my time on, was "the server maintains the canonical state and sends messages to clients that cause them to update their state"
05:33
< ToxicFrog>
While not intrinsically broken the way the first design is, it turns out that this makes doing certain things a pain in the ass and also makes it hard to keep track of what's running on the server and what on the client.
05:34
< ToxicFrog>
Design #3 is "filesystem-level separation between client and server code; clients are not permitted to update game state directly; all state manipulation happens on the server which then sends deltas to the clients"
05:35
< Reivles>
So the client tells the server it wants to do something, then the server decides to let it?
05:36
< ToxicFrog>
That was #2, basically.
05:36
< Vornicus>
Yes. This is essentially how IRC does f'rinstance nickchanges, joins, kicks...
05:36
< ToxicFrog>
#3 is "the client tells the server it wants to do something, the server does it, and then replies "I did this. Here are the resulting changes."
05:37
< ToxicFrog>
#2 was "the client tells the server it wants to do something, the server replies 'go ahead, I'll tell everyone else to follow along', and the client does it"
05:53
< Reivles>
Aaah
05:53
< Reivles>
Yes, #3 is much more robust
05:53
< Reivles>
Especially with a 'refresh' button and a DM-correct function~
05:53
< Reivles>
"Whoops, everyone refresh, that bugged for a second"
05:54 * Reivles also corrects a minor error in his writeup of the rules: You discard at the end of your turn, not before it.
05:54
< Reivles>
(Thus you play cards, throw any additional ones away, then draw up to 5. Much less card-handling, and means you've till your next turn to decide WTF you want to do.)
05:56
< Reivles>
Also I am desirous of photoshopping skills so I can add in four more cards.
05:57
< Reivles>
Which would be the letters A->D with each side LIMBO, TRUE, PARADOX, FALSE
05:58
< Reivles>
So people can have an easier time tracking who changes what~
06:08
< ToxicFrog>
Sounds like a job for...postscript!
06:09
< Vornicus>
\o/
06:09
< ToxicFrog>
And sleep.
06:09
< Vornicus>
(remember those Settlers of Catan images I made? All Postscript, All The Time. 100% handwritten.)
06:09
< Reivles>
Vornicus: Well I'll be jiggered
06:10
< Reivles>
http://www.boardgamegeek.com/image/698161/ergo and the gallery is an example of the cards already present. While I'd not seek such complexity, a wreath and a little bit of streaky-out-to-edges artwork would be lovely. Then just the four words, hn.
06:11
< Reivles>
So hey, wanna teach me postscript? :)
06:11
< Vornicus>
hahaha
06:11 * Reivles giggles also.
06:12
< Vornicus>
That there was actually mostly made in something like Illustrator, and then (if they were smart) exported to something like eps so they could embed it in other files that include the symbols.
06:13
< Reivles>
Oh yes?
06:13
< Vornicus>
If they were dumb then they tried my original move of an actual file for each individual card... which then if they needed to update the cards' background they'd need to copy the edits to every file.
06:14
< Reivles>
Oh yes?
06:18
< Reivles>
Right then, how I mine for postscripts
06:19 * Reivles goes poke at what he needs beyond Notepad.
06:22
< Reivles>
... something from Adobe? Surely not.
06:22
< Vornicus>
you'll need gs.
06:23
< Vornicus>
which is to say Ghostscript.
06:23
< Vornicus>
Postscript is the thing that made Adobe cool.
06:23
< Vornicus>
It turned the printer into a neutral device.
06:24
< Reivles>
Instead of being something which had to have custom software written for each and every one?
06:25
< Vornicus>
Right. If you've got a postscript printer, you can pick "generic postscript printer" and it fucking works.
06:25
< Vornicus>
Unfortunately, most consumer level printers aren't -- well, pretend not to be -- postscript.
06:26
< Reivles>
...It's the DirectX of printing~
06:27
< Reivles>
Do I also want GSView?
06:27
< Vornicus>
On the other hand it means that setting up a printer that's being shared from a mac or linux machine, that printer will use the drivers "apple laserwriter" without any issues at all.
06:27
< Vornicus>
GSView probably. I didn't use it, your mileage may vary.
06:32
< Vornicus>
Anyway. Postscript is a postfix language -- which is to say that it goes "3 5 add" instead of "3 + 5"
06:33
< Vornicus>
http://www.adobe.com/products/postscript/pdfs/PLRM.pdf This is the manual. It is large and in charge, and it is organized pretty well.
06:33
< Reivles>
OK, I can handle that.
06:34
< Reivles>
Does postscript deal in absolute units, px, or?
06:34 Derakon is now known as Derakon[AFK]
06:34
< Vornicus>
Postscript deals, by default, in "pixels" -- when writing to a raster image format, 1 is 1 pixel. This is easily changed, using the "scale" command.
06:35
< Reivles>
So, if I want to match items to the size of the origional cards I'm going to have to do some math, then some conversion?
06:35
< Vornicus>
In vector formats you're usually working in "points"
06:36
< Vornicus>
Yeah, trying to match the original cards? Might be tricky.
06:37
< Reivles>
Well, I can live with not-quite-identical
06:37
< Reivles>
But it'd be a pretty big deal to have a helpful player aid.
06:38
< Reivles>
How well does it handle strings of text?
06:39
< Vornicus>
It's not really a text processing language.
06:40
< Vornicus>
And it doesn't really, um. It doesn't know how to wrap lines on its own, but you can write words without incident.
06:40
< Vornicus>
words and phrases.
06:40
< Reivles>
That'll do.
06:41
< Vornicus>
Your true largest challenge will be figuring out gradients - I did one, it turned out all right, but they're complicated.
06:42
< Vornicus>
After that, um, getting your stuff rotated into position correctly.
06:44
< Reivles>
Right. Those could both be a challenge.
06:44
< Reivles>
How hard are curves?
06:45
< Vornicus>
Curves are easy.
06:45
< Vornicus>
You plug in the coordinates of your bezier and it knows how to curve the fuck out of that thing.
06:45
< Reivles>
So, uh, how much eye-gouging would result in something like http://www.twcenter.net/forums/picture.php?albumid=3407&pictureid=46384
06:47
< Vornicus>
Rather a bit. You'll probably want to get your drawing of that done in a proper program for this sort of job.
06:48
< Vornicus>
Or find an svg of the UN symbol and steal the laurels from that.
06:49 celticminstrel [celticminst@Nightstar-f8b608eb.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
06:49
< Vornicus>
This can be tricky - svg and ps use very different ellipse descriptions -- actually ps doesn't even /have/ an ellipse built in, you have to do some tricks to rejigger circles into it, if you expect them to have constant line width...
06:50
< Vornicus>
(I figured it out, but I don't have my data on me at the moment)
06:58
< Reivles>
OK, then
06:58
< Reivles>
I shall have a poke at the manual and see how I go~
06:59
< Vornicus>
Good luck.
06:59
< Vornicus>
Learning postscript was valuable, but time consuming. Also the learning I did shows a lot in the code.
07:00
< Vornicus>
I moved from naming local variables (technically you don't get them) to direct stack manipulation.
07:00 kwsn is now known as kwsn\t-2
07:04 kwsn\t-2 [kwsn@Nightstar-9d744862.dyn.centurytel.net] has quit [[NS] Quit: and moo]
08:10 AnnoDomini [annodomini@D553D1.D82A92.DDCC87.C0D7F8] has joined #code
08:13 Kindamoody[zZz] is now known as Kindamoody
09:46 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code
09:54 You're now known as TheWatcher
10:27 Vornicus is now known as Vornicus-Latens
11:06 Attilla [Some.Dude@Nightstar-92c9199f.cable.virginmedia.com] has joined #code
12:47 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has joined #code
12:54 Kindamoody is now known as Kindamoody|out
13:50 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has quit [[NS] Quit: Z?]
15:42 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds]
15:56 jerith [jerith@ServerAdministrator.Nightstar.Net] has quit [Connection closed]
16:04 celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has joined #code
16:08 gnolaptop [lenin@Nightstar-a142e0bb.dialup.ice.net] has joined #code
16:09 gnolaptop is now known as gnolam|pissedoff
16:34 Stalker [Z@26ECB6.A4B64C.298B52.D80DA0] has joined #code
18:13 Kindamoody|out is now known as Kindamoody
18:40 Kindamoody is now known as Kindamoody|out
19:19 gnolam|pissedoff [lenin@Nightstar-a142e0bb.dialup.ice.net] has quit [[NS] Quit: Blergh]
19:54 Kindamoody|out is now known as Kindamoody
21:04 kwsn [kwsn@Nightstar-9d744862.dyn.centurytel.net] has joined #code
21:53 Vornucopia [NSwebIRC@C888DE.7F9621.E9EB68.93ABC9] has joined #code
22:13 SmithKurosaki [smith@4FC299.382CB9.EF1529.A5B039] has quit [Ping timeout: 121 seconds]
22:28 Vornucopia [NSwebIRC@C888DE.7F9621.E9EB68.93ABC9] has quit [[NS] Quit: Page closed]
22:39 Kindamoody is now known as Kindamoody|shower
23:10 AnnoDomini [annodomini@D553D1.D82A92.DDCC87.C0D7F8] has quit [Ping timeout: 121 seconds]
23:12 AnnoDomini [annodomini@D553D1.9D4909.DF5AF4.53CB28] has joined #code
23:12 Kindamoody|shower is now known as Kindamoody
23:23 Kazriko [kaz@31356A.679E64.986B00.962247] has quit [Client closed the connection]
23:26 shade_of_cpux is now known as cpux
23:31 cpux is now known as cpux[food]
23:46 AnnoDomini [annodomini@D553D1.9D4909.DF5AF4.53CB28] has quit [[NS] Quit: leaving]
23:59 cpux[food] is now known as cpux
--- Log closed Fri Apr 22 00:00:06 2011
code logs -> 2011 -> Thu, 21 Apr 2011< code.20110420.log - code.20110422.log >