code logs -> 2010 -> Fri, 30 Jul 2010< code.20100729.log - code.20100731.log >
--- Log opened Fri Jul 30 00:00:24 2010
00:13 Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has joined #code
00:34 Attilla [Obsolete@Nightstar-fedc59ac.threembb.co.uk] has quit [[NS] Quit: ]
00:38 You're now known as TheWatcher[T-2]
00:42 You're now known as TheWatcher[zZzZ]
00:58 shade_of_cpux is now known as cpux
01:04 Stalker [Z@26ECB6.A4B64C.298B52.D80DA0] has quit [Client closed the connection]
01:04 Stalker [Z@26ECB6.A4B64C.298B52.D80DA0] has joined #code
01:05 AnnoDomini [annodomini@Nightstar-2cf90070.adsl.tpnet.pl] has quit [[NS] Quit: leaving]
02:36 Orthia [orthianz@Nightstar-badcffae.xnet.co.nz] has joined #code
03:54 Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has quit [Client closed the connection]
04:22 cpux [Moo@Nightstar-20a84089.dyn.optonline.net] has quit [Ping timeout: 121 seconds]
04:22 cpux- [Moo@Nightstar-20a84089.dyn.optonline.net] has joined #code
04:22 cpux- is now known as cpux
04:32
<@Vornicus>
We shall!
04:32
< Orthia>
OK, so I had a Brilliant Idea, right
04:33
< Orthia>
We can use 6s to track Special Effects as well as the straight explodeydice
04:33 cpux [Moo@Nightstar-20a84089.dyn.optonline.net] has quit [Ping timeout: 121 seconds]
04:33
< Orthia>
So, eg, an Ion Cannon that fries systems might deal, I dunno, 4d damage
04:33
< Orthia>
... and every 6 you roll inflicts a -1 penalty to some system or other, based on hit location (Still working on that but).
04:34
< Orthia>
Thus giving a kinda nice way to have various crippling, penetrating, or stunning effects, y'know?
04:34
< Orthia>
The trick came with Penetrating; eg ways to let weapons punch through a shield. Which left me wondering how well the math works for opposed rolls to begin with.
04:35
<@Vornicus>
So this is in addition to exploding dice.
04:35
< Orthia>
Right, it's a "And you do something even cooler too" effect.
04:35
< Orthia>
Generally balanced out by having a nontrivial penalty on the damage dice to start with.
04:36
< Orthia>
(AKA: Your fancy ion cannon is probably dealing 4d when the Rail Gun is firing 7d or something; the actual numbers are Up To Balance so w/e)
04:36
<@Vornicus>
Okay, so, first question: a 4d Ion cannon, how many penalties will it get. On average: 4/5. Distribution is a piled exponential distribution, let's see what I can do with that.
04:37
< Orthia>
4/5?
04:37
< Orthia>
Is that 'four times out of five', or 'four or five per shot'?
04:37
<@Vornicus>
Expected number of penalties applied is 0.8.
04:38
< Orthia>
Oh, right, cheers :)
04:38
< Orthia>
four out of five times, you penalty someone. Hmm. That's... not too bad as 'chance to impede them' goes.
04:39
<@Vornicus>
Well, not quite - this is expected number of penalties applied.
04:40
<@Vornicus>
This counts two penalties as 2, and three penalties as 3.
04:42
<@Vornicus>
If you want to know probability of /any/ penalties being applied, it's 1 - (5/6)^4, or 671/1296 = 0.5177
04:50
<@Vornicus>
0.482 0.402 0.201 0.078 0.026 0.008 0.002 0.001 <--- probabilities that you will get 0, 1, 2... penalties. Note that there's a significant chance of getting 4 or more.
04:52
<@Vornicus>
gnrk, something wrong here. Let me try again.
04:53
< Orthia>
Oh I see
04:53
< Orthia>
And hey, if you get four or more that's pretty awesome >_>
04:53
< Orthia>
Such a weapon would be intended to be 'screw with your ship half the time, occasionally knock you out cold'.
04:54 cpux [Moo@Nightstar-20a84089.dyn.optonline.net] has joined #code
04:54
<@Vornicus>
(those probabilities add up to more than 1, is the problem.)
04:55
< Orthia>
Are you counting cumulative by accident?
04:56
<@Vornicus>
No, I'm doing something else wrong, I ended up adding to 1.2, which is not really what I want here.
04:59
<@Vornicus>
Ah, there we are.
05:00
<@Vornicus>
0.482 0.322 0.134 0.045 0.013 0.003 0.001 0.000 0.000 0.000
05:00
<@Vornicus>
A lower but still reasonably significant chance of Total Whackery, but it's still there.
05:01
<@Vornicus>
(rolling 3 sixes, at 0.045, is a very significant 1 in 20)
05:02
< Orthia>
... hahaha, that's awesome
05:02
< Orthia>
So a -3 penalty is the equivalent of rolling a Natural 20? I'll take it~
05:03
<@Vornicus>
A little harder, it's technically 1 in 22, but yeah.
05:03
< Orthia>
That's pretty awesome.
05:04
< Orthia>
Given that's enough to cripple a ship pretty hard.
05:04
< Orthia>
Other use for these rolls: Penetration. You might have, eg, an armor peircing shot.
05:04
<@Vornicus>
All right. Let's see, the next one is Opposed Rolls, which is a considerably harder setup, especially when Degree Of Success matters.
05:05
< Orthia>
Yeah
05:05
< Orthia>
That's for, uh
05:05
< Orthia>
I roll Damage, you roll Hardness to see how much you soak.
05:05
<@Vornicus>
I may have to give you a full-strength sheet with the formulas and graphs cooked in.
05:05
< Orthia>
(This may be changed; this is partly why I am examining this to see what /happens/)
05:07 * Orthia needs to know how certain systems /behave/ in order to know whether they're a good idea, afterall~
05:09 Stalker [Z@26ECB6.A4B64C.298B52.D80DA0] has quit [[NS] Quit: If the world didn't suck, we'd all fall off.]
05:11 Stalker [Z@26ECB6.A4B64C.298B52.D80DA0] has joined #code
05:16 Orth [orthianz@Nightstar-8747b129.xnet.co.nz] has joined #code
05:17
<@Vornicus>
Yeesh. Okay, how the hell do I do this. ...transpose one line, use it on the other, ...but then my numbers are in diagonals, which is a pain in Excel.
05:17
< Orth>
O.o
05:17
< Orth>
Have I made life too complicated? >_>
05:18 * Orth has a suspicion that this may be one of them jobs for The Python.
05:18
<@Vornicus>
Yeah, this looks like a job for The Python, unfortunately. i was hoping to give you nice graphs here, but that doesn't look sensible, unfortunately.
05:19 Orthia [orthianz@Nightstar-badcffae.xnet.co.nz] has quit [Ping timeout: 121 seconds]
05:19
<@Vornicus>
Aha, that's how I do it. "how many successes" and then "how much difference" and then I have to use Match.
05:20
< Orth>
Postscript for the win? >_>
05:20
< Orth>
(On the bright side: You're not bored anymore~)
05:30
<@Vornicus>
Excel for the win, but I have to regenerate the numbers and get the non-cumulatives if I expect this to work. Where's that script.
05:31
<@Vornicus>
(You're right! I knew I could count on you!)
05:34
< Orth>
(The wonderful thing here is the beautiful symbiosis: I help you distract yourself; you give me info on how the dice behave which lets /me/ work out whether stuff is a Good Idea or not~)
05:36
< Orth>
Re opposed rolls: I think we can safely say my dice system will not intend to use more than ten dice.
05:36
< Orth>
Well, except for Riduculously Awesome stuff, but that's another matter~
05:40
<@Vornicus>
The difficulty really, is that I can't draw 100 lines on the graph and have it coherent.
05:45
<@Vornicus>
Okay, excel sheet made, gotta send it to you. Where to?
05:49
< Orth>
reiver@nightstar, old chap
05:49
< Orth>
Also: 100 lines? Thefuck?
05:50
<@Vornicus>
100 lines: one for 1 offence / 1 defence, one for 1 offence / 2 defense, one for 7 offence / 4 defence...
05:50
<@Vornicus>
One for each possible pairing of offence and defence dice.
05:51
< Orth>
Oh wow, yeah that'd do it
05:51
< Orth>
Hum, and the graph would be a pain too. Interestin'.
05:52
< Orth>
Pity Excel does't do colour fields
05:55
<@Vornicus>
what do you mean/
05:56
<@Vornicus>
Sent.
05:56
< Orth>
So you could have, I dunno, Attack on X, Defense on Y, and measure Successes on the graph by what colour was in the area.
05:56
< Orth>
(Colours being an analogue method of demonstrating probabilities)
05:58
<@Vornicus>
Mmm, technically we're looking at three dimensions of data.
05:59
<@Vornicus>
And actually "surface" graphs do that but they're not very well done in Excel - you can't control the contour count.
06:00
< Orth>
Yeah
06:00
< Orth>
The third dimension was what I was suggesting we use colour for.
06:00
< Orth>
Or, indeed, contour maps~
06:00
<@Vornicus>
No, no.
06:00
<@Vornicus>
Well, uh. I mean, four dimensions of data, if you count it that way.
06:01
<@Vornicus>
We're looking at Offense, Defense, and Degree Of Success as dependents, and Probability as an independent.
06:01
< Orth>
Huh, good point
06:01
< Orth>
I'd forgotten degree of success.
06:08
<@Vornicus>
I'd love to buld an app which can slice 4-d data like that, but I don't have the graphics chops at all.
06:10
< Orth>
... actually, you know
06:10
< Orth>
I kind of vaugely recall WEKA doing things like that.
06:11
< Orth>
You'd have to rig the data into a CSV format, though.
06:11
<@Vornicus>
Can certainly be done. Give me a precise layout and I can give you a csv for it.
06:13 * Orth thinks
06:13
<@Vornicus>
Or a pile of csvs, as it were.
06:13
< Orth>
You want the one csv, IIRC
06:13 * Orth attempts to dig it up.
06:13
< Orth>
It's data mining software, so probably not /quite/ ideal
06:14
< Orth>
But it had a couple visualisation methods for viewing multi-D data.
06:14
< Orth>
http://www.cs.waikato.ac.nz/~ml/weka/
06:16
<@Vornicus>
Interesting. I'll look into it.
06:18
< Orth>
Some of the interface may be a bit odd till you work out How It Thinks
06:18
< Orth>
If so feel free to ask.
06:20
< Orth>
(Some parts of it are atrocious because they built the thing to handle arbitary numbers of variables and required settings, so you can program in your own data modeling software)
07:21 Stalker [Z@26ECB6.A4B64C.298B52.D80DA0] has quit [Ping timeout: 121 seconds]
07:21
<@Vornicus>
Fuck.
07:21
<@Vornicus>
Now I'm bored again.
07:32 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code
07:40
< Orth>
haha
07:53 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has joined #code
08:26 AnnoDomini [annodomini@Nightstar-feb138e7.adsl.tpnet.pl] has joined #code
08:26 mode/#code [+o AnnoDomini] by Reiver
08:27 You're now known as TheWatcher
09:33 Orth [orthianz@Nightstar-8747b129.xnet.co.nz] has quit [Client closed the connection]
09:40 Orthia [orthianz@Nightstar-8747b129.xnet.co.nz] has joined #code
10:15 Vornicus is now known as Vornicus-Latens
10:44 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds]
10:45 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [[NS] Quit: This computer has gone to sleep]
10:47 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code
11:05 Orth [orthianz@Nightstar-d1fff4b0.xnet.co.nz] has joined #code
11:07 Orthia [orthianz@Nightstar-8747b129.xnet.co.nz] has quit [Ping timeout: 121 seconds]
11:32 Rhamphoryncus [rhamph@Nightstar-bbc709c4.abhsia.telus.net] has quit [Client exited]
12:33 Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has joined #code
12:36 cpux is now known as shade_of_cpux
12:39 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Ping timeout: 121 seconds]
12:48 Orth [orthianz@Nightstar-d1fff4b0.xnet.co.nz] has quit [Ping timeout: 121 seconds]
13:19 Syloqs-AFH [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
13:36 Syloqs_AFH [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code
13:37 Syloqs_AFH is now known as Syloqs-AFH
13:47 Syloqs-AFH [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
13:53 Syloqs_AFH [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code
13:55 Syloqs_AFH is now known as Syloqs-AFH
14:04 Orthia [orthianz@Nightstar-7b9ae7eb.xnet.co.nz] has joined #code
16:25 Orthia [orthianz@Nightstar-7b9ae7eb.xnet.co.nz] has quit [Ping timeout: 121 seconds]
17:11 Attilla [Obsolete@Nightstar-5bb2ebc4.threembb.co.uk] has joined #code
17:11 mode/#code [+o Attilla] by Reiver
17:18 * TheWatcher eyes this
17:18
<@TheWatcher>
Does anyone know what the semaphore count limit is on Windows?
17:19
< PinkFreud>
-1
17:19
< PinkFreud>
:P
17:20 Orthia [orthianz@Nightstar-e2ed7ae0.xnet.co.nz] has joined #code
17:23
<@TheWatcher>
:P
17:26 * TheWatcher is probably just going to have to assume the posix value of "at least 256"
17:43
<@jerith>
So. SQL query. (Ha ha. See what I did there?)
17:43
<@jerith>
I have a table full of key/value pairs linked to a different table.
17:44
<@jerith>
Not every row in the main table has an entry for the key I'm interested in in the other table.
17:46
<@jerith>
Currently, I'm doing something like: SELECT m.foo, m.bar, kv.val FROM maintable m LEFT JOIN (SELECT m_id, val FROM keyvalue WHERE mykey="somekey") kv ON kv.m_id=m.id;
17:46
<@jerith>
Is there a way to get rid of that subquery?
17:49 Attilla [Obsolete@Nightstar-5bb2ebc4.threembb.co.uk] has quit [[NS] Quit: ]
17:49 AnnoDomini [annodomini@Nightstar-feb138e7.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds]
17:50 AnnoDomini [annodomini@Nightstar-feb138e7.adsl.tpnet.pl] has joined #code
17:50 mode/#code [+o AnnoDomini] by Reiver
18:10 Orthia [orthianz@Nightstar-e2ed7ae0.xnet.co.nz] has quit [Connection reset by peer]
18:17 Orthia [orthianz@Nightstar-e2ed7ae0.xnet.co.nz] has joined #code
18:49 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has joined #code
19:48 Rhamphoryncus [rhamph@Nightstar-bbc709c4.abhsia.telus.net] has joined #code
20:02 Vornicus-Latens is now known as Vornicus
20:31 aoanla [AndChat@Nightstar-c9eba6f4.range217-42.btcentralplus.com] has joined #code
21:05 Orthia [orthianz@Nightstar-e2ed7ae0.xnet.co.nz] has quit [Ping timeout: 121 seconds]
21:05 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds]
21:50 Stalker [Z@2C3C9C.B2A300.F245DE.859909] has joined #code
22:02
< Tarinaky>
So if I have a set of parallax scrolling buffers. I need to keep track of the displacement of each since last being updated so I know when to insert a new row or column into the buffer.
22:02
< Tarinaky>
I'm running into problems trying to think of a sensible way to handle that information.
22:02
< Tarinaky>
If I was using C++ I'd probably throw an object at it until it went away. But in python I have no idea :/
22:04
<@jerith>
You can throw an object at it until it goes away. >.>
22:05
< Tarinaky>
At the moment I'm storing my different sdl surfaces in a dictionary. Do dictionaries allow mixed types like that?
22:06
< aoanla>
Yes
22:06
<@jerith>
Yes.
22:06
< aoanla>
No python object cares about the types it contains
22:07
< Tarinaky>
Sorry, I phrased that badly.
22:07
< Tarinaky>
Should dictionaries contain mixed types like that?
22:07
< Tarinaky>
Dunno why I asked allow :/
22:08
<@Vornicus>
aoanla: they /sort/ of care in certain cases.
22:08
<@Vornicus>
A tuple isn't hashable if it contains non-hashable objects.
22:09
<@Vornicus>
Tarinaky: it certainly /can/, and in certain cases it's all right.
22:09
< aoanla>
Okay, yes. Mutability is also sometimes important.
22:09
< Tarinaky>
I'm not convinced that this is a case where it's all right to be honest :/
22:10
< aoanla>
Depends on if they have common methods.
22:10
< Tarinaky>
I mean. It just seems so wrong to have the return type be... nyyrrgghhh Python makes my brains explode :/
22:10
< Tarinaky>
aoanla: Nope.
22:10
<@Vornicus>
THen you probably shouldn't.
22:10
< Tarinaky>
Right. But I still need to somehow associate a bunch of integers with the surface :/
22:11
<@jerith>
I often mix types in dicts. I generally ovoid mixing types in lists.
22:11
< Tarinaky>
I figure that's easier than drawing guidemarks onto the surface itself.
22:11
<@Vornicus>
What exactly are you /doing/ here? if you're throwing around guidemarks, you might in fact be better off using rect
22:12
<@jerith>
{'some_numbers': [1, 2, 3], 'an_identifier': 'foo', 'metadata': { ... }} is perfectly reasonable.
22:12
< Tarinaky>
Well, the idea is it's an SDL surface that contains slightly more than is actually on the screen at a time. So that it can be smoothly scrolled without regenerating it -every- frame.
22:12
< Tarinaky>
And when the end of the buffer is reached it'll fetch the next chunk of it.
22:13
<@Vornicus>
Okay, and?
22:13
<@jerith>
You can also add another level: {'surfaces': {'foo': ..., 'bar': ...}, 'displacements': {'foo': ..., 'bar': ...}}
22:14
< Tarinaky>
jerith: I didn't understand that.
22:14
<@jerith>
Or in the other direction: {'foo': {'surface': ..., 'displacement': ...}}
22:14
< Tarinaky>
The 'and' is how do I know when I need to fetch the next chunk.
22:14
<@jerith>
Tarinaky: I'm making up data structures based on vague descriptions.
22:14
<@jerith>
What does your dict of surfaces actually look like?
22:15
< Tarinaky>
jerith: I meant I don't understand your notation. I'm unfamiliar with it.
22:15
<@jerith>
Tarinaky: Dict literals, except I'm using "..." to denote "something appropriate goes here".
22:16
<@jerith>
Whatever object you're using for surfaces and displacements, in this case.
22:16
< Tarinaky>
Oh I see.
22:17
<@jerith>
It might be worth turning that dict into an object if it makes sense to start putting methods on it.
22:17
< Tarinaky>
The problem is though - I have stuff that isn't a scrolling buffer in the dictionary as well.
22:17
<@Vornicus>
Does it have to be /this/ dictionary?
22:17
< Tarinaky>
No.
22:17
<@Vornicus>
And what are these things?
22:18
<@jerith>
Then again, I've been known to shove lambdas into dicts or tuples from time to time.
22:18
< Tarinaky>
Just graphics.
22:18
< Tarinaky>
Just a little space ship icon at the moment.
22:18
<@jerith>
What does your dict look like?
22:19
< Tarinaky>
jerith: I don't really know how to denote it clearly :/
22:19
<@jerith>
Is the structure static or do you add and remove stuff?
22:19
< Tarinaky>
It's -sortof- like a std::map<string,sdl_surface> atm :/
22:19
< Tarinaky>
To revert to C++ habits >.>
22:20
<@jerith>
Does it always have the same things in it?
22:20
< Tarinaky>
At the moment? Yes.
22:21
< Tarinaky>
It's just a convenient place to store SDL Surfaces.
22:22
<@Vornicus>
Seems sensible to me.
22:22
<@jerith>
So now you have two different "kinds" of surfaces. Scrolling and non-scrolling.
22:22
< aoanla>
Yeah, that's reasonable
22:24
<@jerith>
So, there are two approaches. You can keep them together as you do currently and store the extra data somewhere else. Putting it in the dict next to the surfaces probably isn't a great idea, but you could put them in another dict next to this one and use the same keys.
22:25
<@jerith>
Or you can treat them as two different kinds of surfaces and put the extra data with them in an object or a lower-level dict or something.
22:26
<@jerith>
Those are the two structures I suggested above.
22:27
<@jerith>
Or, in C++: std::map<string,sdl_surface> and std::map<string,whatever>
22:28
<@jerith>
Or std::map<string,nonstd::tuplething<sdl_surface,whatever>>
22:28
<@jerith>
Only without the static typing.
22:28
< Tarinaky>
std::pair :p
22:31
<@jerith>
Depending on what you're doing with it and how surfaces work (I don't know SDL), you might want to just wrap or subclass the surface to add the things you want to add.
22:33 * jerith heads home.
22:33
< Tarinaky>
Thanks.
22:49 aoanla [AndChat@Nightstar-c9eba6f4.range217-42.btcentralplus.com] has quit [[NS] Quit: ]
23:11 AnnoDomini [annodomini@Nightstar-feb138e7.adsl.tpnet.pl] has quit [[NS] Quit: Zzz.]
23:22 You're now known as TheWatcher[T-2]
23:25 You're now known as TheWatcher[zZzZ]
23:55 shade_of_cpux is now known as cpux
--- Log closed Sat Jul 31 00:00:25 2010
code logs -> 2010 -> Fri, 30 Jul 2010< code.20100729.log - code.20100731.log >