code logs -> 2012 -> Tue, 19 Jun 2012< code.20120618.log - code.20120620.log >
--- Log opened Tue Jun 19 00:00:36 2012
00:34 iospace is now known as io|burning
00:55 Derakon[AFK] is now known as Derakon
01:48 * Derakon sighs at the Angband forums.
01:49
<&Derakon>
Dude's complaining that the latest version of the main game is Ruined Forever.
01:49
<&Derakon>
He's taking part in a competition (race to win in fewest turns, with a specific savefile), where the character is a human warrior with intentionally terrible stats.
01:49
<&Derakon>
And he doesn't see the conflict here.
01:51
< Tarinaky>
Midly annoying things about Python: when it throws an exception it doesn't print enough information.
01:51
< Tarinaky>
Specifically the stock exceptions.
01:51
<&Derakon>
Nope, it's just "you guys nerfed the stores so they don't sell stealth items so I can't survive deeper down" when he's getting one wimpy blow per round.
01:51
< Tarinaky>
If an index is out of bounds it should print what the index was etc...
01:51
< Tarinaky>
>.>
01:52 Attilla [Obsolete@Nightstar-245c4d9c.as43234.net] has quit [Ping timeout: 121 seconds]
01:52
<&Derakon>
That's kinda useless without the length of the list as well, and it's practically expected that the list in question will be of variable size.
01:53
<&Derakon>
Anyway, you know with an invalid index that the problem is the index going too high -- negative indices are perfectly valid in Python (to count off the end of the list)
01:53
<&Derakon>
You also can't extend that to sets or dicts (what're they supposed to do, print out all the valid keys?).
01:55
< Tarinaky>
No. Just the key that was attempted to be gotten.
01:56
< Tarinaky>
"Index foo was out of bounds."
01:56
< Tarinaky>
Rather than spend forever staring at it going "But it -is- in bounds? What?"
01:56
< Tarinaky>
Kinda useless isn't the same as useless :p
01:57
< Tarinaky>
Also: I'll note that printing out all the valid keys in a dict -is- a method in Python.
01:59 Noah [nbarr@Nightstar-55c24810.pools.spcsdns.net] has joined #code
02:00
<&Derakon>
Yes, but it's not a method you just use blindly without knowing anything about the dict in question.
02:00
< celticminstrel>
But I wouldn't want to see a list of the keys in the error message.
02:00
<&McMartin>
Catch the KeyError, list the keys.
02:00
<&McMartin>
You don't want to do it arbitrarily, there might be millions
02:02
< Tarinaky>
It's not a list though.
02:02
< Tarinaky>
It's one key.
02:02
< Tarinaky>
In 'foo[key]' key is a single value.
02:02
< Tarinaky>
I don't see what the issue in printing it arbitrarily would be.
02:02
< Tarinaky>
Aside from giving you a little insight into what state the program was in when it -reached- that line.
02:03
<&Derakon>
Care to respond to my comment that you know what is wrong, namely that the index was too big?
02:04
< Tarinaky>
That it doesn't give you enough information.
02:04
< Tarinaky>
'too big' is a theoretically unbound value.
02:04
< Tarinaky>
*unbound range of values
02:04
< Tarinaky>
Too big could be 1 or 10 or 1000
02:05
<&Derakon>
But it doesn't matter, because the root problem is that you set your index value wrong, and you should revisit that bit of code to fix it.
02:05
< Tarinaky>
Right.
02:05
< Tarinaky>
But the exception won't give me that line number.
02:05
<&Derakon>
Uh, yes it will.
02:05
< Tarinaky>
No. It'll give me the line number the index was -used-.
02:05
< Tarinaky>
Not the line number the index was -set-.
02:05
<&Derakon>
...
02:06
<&Derakon>
Okay, yes, but if you can't find the line number where the index was set then you don't deserve to be in the business.
02:06
<&Derakon>
(And expecting the interpreter to do it for you is lolno)
02:06
< Tarinaky>
Usually finding said line number, for me, involves first finding out what the key was.
02:08
<&Derakon>
I don't understand how that works.
02:08
< Tarinaky>
Then using that information to work out which bit of code is wrong.
02:08
<&Derakon>
You have a list. You indexed into the list with a value. That value came from somewhere. Look up where it came from.
02:08
<&Derakon>
The only case in which this breaks down is when you're indexing into multiple lists on the same line.
02:08
<&Derakon>
In which case you can split that out into sub-statements to narrow things down right quick.
02:09
< Tarinaky>
Because the somewhere might be more than one place.
02:09
< Tarinaky>
Or a bounds checking if-statement being wrong (as in this case)
02:09
< Tarinaky>
compounded with a very different bug somewhere else.
02:10
< Tarinaky>
Causing the index of '1' to sneak through the bounds checking when the length was 1.
02:11
< Tarinaky>
As far as I was aware, when the bug was thrown, the index 1) should have been 0 and 2) If it was 1 then a different bit of code should have been going.
02:11
<&Derakon>
You do realize that 2 is also an invalid index into a length-1 list, right?
02:11
< Tarinaky>
I wasn't attempting to index at 2.
02:12
<&Derakon>
Anyway, this is boiling down to "in my very specific scenario more detailed exception messages would be helpful."
02:12
<&Derakon>
So, in that case, do what McM suggested -- catch the exception and re-message it.
02:12
< Tarinaky>
"Every scenario I am in ever >.>"
02:12
< celticminstrel>
I wish clang/Xcode would attempt to compile every file before giving up.
02:18
< Tarinaky>
I'm having a little trouble with a syntax error I don't understand.
02:18
< Tarinaky>
"Syntax error while detecting tuple."
02:19
< Tarinaky>
Given by this line:
02:19
< Tarinaky>
ship.orders = [("move to",*destination)]
02:19
< Tarinaky>
I thought * was the pack/unpack operator?
02:31
< celticminstrel>
Only in function calls.
02:31
< celticminstrel>
I think.
02:35
< celticminstrel>
Hm. My right-aligned text is a bit off.
02:41 Kindamoody[zZz] is now known as Kindamoody
02:54
< celticminstrel>
...because I was calculating the left based on plaintext, but rendering as bold. Duh.
03:17
< celticminstrel>
I like that clang lets me use C99 initializers in C++.
03:37 maoranma [nbarr@Nightstar-c2178fc8.pools.spcsdns.net] has joined #code
03:41 Noah [nbarr@Nightstar-55c24810.pools.spcsdns.net] has quit [Ping timeout: 121 seconds]
04:00 Vashicus [Vash@1526F6.6A4AE1.CC2945.7CB448] has quit [Ping timeout: 121 seconds]
04:17 Vash [Vash@Nightstar-e8057de2.wlfrct.sbcglobal.net] has joined #code
04:17 mode/#code [+o Vash] by ChanServ
04:35 io|burning is now known as iospacedout
04:59 Rhamphoryncus [rhamph@Nightstar-5697f7e2.abhsia.telus.net] has joined #code
05:14 Kindamoody is now known as Kindamoody|out
05:57 Derakon is now known as Derakon[AFK]
06:13
<@rms>
C99 initializers?
06:13
<@rms>
int vec[5] = {[1]=10,[3]=20}; // this?
06:19 maoranma is now known as Noah
06:29 Vash [Vash@Nightstar-e8057de2.wlfrct.sbcglobal.net] has quit [[NS] Quit: I lovecraft Vorn!]
06:53
< celticminstrel>
Yes.
06:54
< celticminstrel>
And struct blah = {.foo=4,.bar=10};
06:54
< celticminstrel>
Um. That's only valid if you replace "struct" with the name of one, of course.
07:05 Reiver [reiverta@5B433A.3CF6C7.8C0092.647F3B] has joined #code
07:43 himi [fow035@D741F1.243F35.CADC30.81D435] has quit [Ping timeout: 121 seconds]
08:02 * Rhamphoryncus looks at some game screenshots and remarks that GL_TEXTURE_MAG_FILTER has only one setting: GL_FAIL :P
08:06
< Rhamphoryncus>
(Why does this pic look wrong somehow? Oh right, the building is fuzzy (magnified texture) but the person is not)
08:20 Reiver [reiverta@5B433A.3CF6C7.8C0092.647F3B] has quit [[NS] Quit: brb, shopping]
08:28 celticminstrel [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
08:33 Attilla [Obsolete@Nightstar-245c4d9c.as43234.net] has joined #code
09:00
< Rhamphoryncus>
Hrm. Maybe I'll model it as an icosahedron but texture it (the heightmap) as by pairing up faces into latitudinal rhombuses
09:00 Reiver [reiverta@5B433A.F67240.7977D5.DD495D] has joined #code
09:01
< Rhamphoryncus>
Pairing eliminates the problem of the triangle textures using half texels along one edge
09:02
< Reiver>
Probability: Anyone up for it?
09:04
< Reiver>
So, the odds of rolling two dice snakeeyes is 1/6 * 1/6 => 1/36 => ~3%
09:04
< Reiver>
And the odds decrease rapidly from there for three, four, and when you finally get to 5 it's so far wrong as to be slightly ridiculous
09:06
< Reiver>
So the odds of botching get a little too low to be much fun as a game mechanic.
09:07
< Reiver>
Thus, I have been pondering arrangements for Botches below 'all dice show 1'... and have a few ideas, but not quite sure how the math works.
09:08
< Reiver>
F.ex, 'no successes, and at least half of the dice are 1'; thus 2 dice require both a 1 and a failed die, but 3 dice require two 1s and a failed die. (Fail is 1-3 on a d6.)
09:19
<&jerith>
What's the range of pool sizes?
09:31
< Reiver>
1-5, maaybe 6.
09:31
< Reiver>
Extra credit for Fails of 1-2, 1-5, 1-6, too.
09:31
< Reiver>
Er, whoops
09:32
< Reiver>
Essentially: 3+ 4+ 5+ & 6+.
09:39
< Reiver>
Though my first ponderance is the 4+ stuff; the rest is finetuning luxury~
09:45
< Rhamphoryncus>
Are you talking about rolling 5 dice and seeing if 2 are 1's?
09:46
< Reiver>
rolling 5 dice, seeing if 3 are 1s and none of them rolled 4 or higher.
09:46
< Reiver>
rolling 4 dice, seeing if 2 are 1s and none of them rolled 4 or higher.
09:46
< Reiver>
rolling 3 dice, seeing if 2 are 1s and none of them rolled 4 or higher.
09:47
< Reiver>
rolling 2 dice, seeing if 1 are 1s and none of them rolled 4 or higher.
09:47
< Reiver>
rolling 1 dice, of course, is rather easy to work out the odds. Y'know, one in six. :p
09:47
< Rhamphoryncus>
ahh, well the math is different for that
09:47
< Reiver>
Right, and it's math I wish to be careful about
09:48
< Reiver>
The variations above are replacing the rightmost integer with 3, 4, 5, or 6.
09:48
< Rhamphoryncus>
Lemme see if I can get it straight.. my general approach here is to invert it: what are the odds of NOT getting it?
09:48
< Reiver>
heh, fair
09:48
< Rhamphoryncus>
The odds of not getting a 1 when rolling a d20 5 times is (19/20)**5
09:49
< Rhamphoryncus>
Which makes your odds of getting a 1 be 23%
09:50
< Rhamphoryncus>
hrm. Nope, doesn't quite apply either :/
09:51
< Rhamphoryncus>
Okay, to start with you need to split them into 1-3 vs 4-6
09:51
< Reiver>
indeed not.
09:51 * Reiver suspects this is a job for Vornicus, the mathemancer.
09:51
< Rhamphoryncus>
5 dice all in the 1-3 range
09:52
< Rhamphoryncus>
aye
09:52
< Rhamphoryncus>
After that what are the odds of 3 of the 5 being 1's
09:52
< Rhamphoryncus>
Damnit, I've done this before
09:53
< Rhamphoryncus>
The first part is easy: 0.5**5 = 0.03125 (eg 3%)
09:55
< Rhamphoryncus>
Oh, the problem I've done before is when using the 5d6 keep 3 highest method of rolling stats, what is the chance of getting an 18?
09:56
< Reiver>
Ah yes
10:02 You're now known as TheWatcher
10:06 * jerith usually just enumerates the possibilities.
10:07 * jerith actually teaches the computer to do this rather than doing it himself.
10:20 Reiver [reiverta@5B433A.F67240.7977D5.DD495D] has quit [Client closed the connection]
10:24 Reiver [reiverta@5B433A.F67240.8C1466.49B95A] has joined #code
10:27
< Rhamphoryncus>
I've done lots of that too. Even used grep to do it XD
10:27
<&jerith>
It works for relatively small datasets.
10:31
< Rhamphoryncus>
I've done larger with python
10:46 RichyB [MyCatVerbs@Nightstar-3b2c2db2.bethere.co.uk] has joined #code
11:01
<&jerith>
Reiver: http://pastebin.starforge.co.uk/523
11:07
< sshine>
hmm
11:07
< sshine>
jerith, it sounds like what you want is Troll.
11:07
< sshine>
or was it Reiver?
11:08
< sshine>
Reiver, http://www.diku.dk/hjemmesider/ansatte/torbenm/Troll/
11:08
< sshine>
Reiver, Torben is my compilers professor, and his Troll tool was actually used to check the V:tR rules pre-publishing. (you mentioned botching)
11:09
<&McMartin>
Fucking OWoD stats -_-
11:10
< sshine>
Reiver, the adjusted botching rules we use in my OWoD campaign are like this: 1s count down, successes (e.g. 6+) count up, if the sum is less than zero and there are no successes.
11:11
< sshine>
(because simply a negative sum results in a lot of botches, which is unlikely because you actually have a higher chance of botching the bigger your dice pool is, which doesn't reflect on becoming really good at something.)
11:11
<&jerith>
sshine: Troll looks like it's exactly what I need for this sort of thing.
11:11
<&jerith>
Thanks.
11:11
< sshine>
jerith, there's a web-version too.
11:11
< sshine>
oh, it says.
11:11
< sshine>
(it's made with SML Server Pages, heh.)
11:11
<&McMartin>
sshine: My favorite bit with the RAW was that if your difficulty was ten your skill level had NO BEARING WHATSOEVER on your chance of success.
11:12
< sshine>
McMartin, is that when you roll a chance die?
11:12
< sshine>
McMartin, I've played in groups with house rules so much I don't distinguish the official rules and the ones we made up.
11:12
<&McMartin>
Ah, no.
11:13
<&McMartin>
In OWoD stuff was marked as harder by increasing the number you needed to roll to count as a success
11:13
<&McMartin>
And higher skill means more dice
11:13
<&McMartin>
So, uh, at difficulty 10 your expected number of successes was Zero.
11:13
< sshine>
ah!
11:13
< sshine>
what we did was: to roll a ten, one had to roll two nines.
11:14
< Reiver>
McMartin: Yeah, that was a concern of mine
11:14
< Reiver>
OTOH with my current setup, one 6 negates any number of 1s
11:14
<&McMartin>
Yes. THis is better.
11:15
< Reiver>
Whilst if you have 5 dice, you need 3 1s and no 6s to botch.
11:15
<&McMartin>
The rules in OWoD are completely broken as written
11:15
< Reiver>
(Note: Rolling for sixes is going to be reltively rare.)
11:15
< Reiver>
(The default is 4+; you shift the target number up or down based on the circumstances.)
11:16
<&McMartin>
... yeeeeah, I see they've changed the numbers.
11:16
<&McMartin>
6 was "average difficulty"
11:16
< Reiver>
Oh, er
11:16
< Reiver>
This is /mine/
11:16
<&McMartin>
Yeah
11:16
< sshine>
Reiver, D6?
11:16
< Reiver>
And it is d6 based~
11:16
<&McMartin>
I'm bitching about how thoroughly *they* fucked up
11:16
< Reiver>
Aha, yes
11:16
<&jerith>
Reiver: Your rule drops the botch chance dramatically when you go from an even number of dice to an odd.
11:16
< Reiver>
Jerith: This is semi-intentional
11:17
< Reiver>
How much does it change if it's the other way round, and the number needed drops on even dice counts?
11:18
< Reiver>
(So: one 1 and 0 successes on 1-3 dice, two 1s and 0 successes on 4-5 dice)
11:19
<&jerith>
Reiver: I had that originally (by accident) and it's different, but no better.
11:20
< Reiver>
jerith: And does the situation break if the rule is *any* 1s and no successes?
11:23
<&jerith>
All fail, any 1s seems a more reasonable progression.
11:24
<&jerith>
There's another smoothish but steeper dropoff with "all fail, average < 2".
11:25
<&jerith>
"All fail, at least one 1" seems the "best" rule so far.
11:28
<&jerith>
This stuff should probably be charted, but matplotlib is ;_;
11:29
< Reiver>
jerith: The key is that I want higher rankings to be substantially 'safer' than low ones, regarding botches.
11:29
< Reiver>
Generally at 4+, but it needs to hold true at 6+ too.
11:29
<&jerith>
Reiver: Do you have Python handy?
11:29
< Reiver>
nein :-/
11:30
<&jerith>
Ah, you want to adjust success threshold as well.
11:30
< Reiver>
Right.
11:30
< Reiver>
The key here is that the number of dice represents a certain characters skill
11:30
< Reiver>
The threshold represents the circumstances they're up against.
11:30
<&jerith>
That generates lots of numbers. I think we need a table or something.
11:31
< Reiver>
'Standard' circumstances are 4+. Circumstances, and character machinations, affect the odds.
11:32
< Reiver>
As do some 'automatic' adjustments, but that's neither here nor there.
11:32
< Reiver>
(AKA: Big guns shooting at little ships automatically start scaling in penalty; likewise, the more specific the cargo you carry, the harder it is to find things that don't suit... but the easier it is to find things that /do/.
11:33
< Reiver>
Right down to "Sixteen tons of canned beans" being a 1+ Automatic roll to find, in fact, beans... and a 7+ Impossible roll to find a rocket launcher.)
11:34
< Reiver>
(ANd yes, the 7+ bit matters, this is a game where player characters get to screw with the odds if they have the karma and a good excuse~)
11:39
<&jerith>
Reiver: http://pastebin.starforge.co.uk/524
11:43
< Reiver>
... so there's a 27% chance of a Skill 5 botching when attempting a TN 6+ roll?
11:43
<&jerith>
Yup.
11:44
< Reiver>
So it's safer to attempt at Skill 1 than Skill 5?
11:45
<&jerith>
Yes. Although that only counts botch chance, not success chance.
11:45
< Reiver>
hn
11:46
< Reiver>
Which IIRC is somewhere below 50% for a Skill 5.
11:46
<&jerith>
Let me add TN 2+ and 3+.
11:50
<&jerith>
Reiver: http://pastebin.starforge.co.uk/525
11:50
<&jerith>
My "average value less than 2" rule seems to be the most consistent there, but it's harder to compute.
11:53
<&jerith>
Botch chance goes down with more dice, up with higher difficultly.
11:53
<&jerith>
-l
11:56
< Reiver>
If you can come up with a way that you could describe lt2 in a way comprehensible to gamers rolling physical dice, I'm all ears~
11:56
< Reiver>
It does bother me that eithre way, Skill 4 seems /more/ likely to botch than Skill 3, though. :/
11:57
<&jerith>
"Sum of rolled values less than twice the skill value" or something.
11:57
<&McMartin>
More dice = more chances to roll 1.
11:58
<&jerith>
The only reason it's going down at all is because your success chance goes up.
11:59
<&jerith>
Reiver: You can provide a handy example table for botch values, if you like.
11:59
< Reiver>
McMartin: So I am noticing; i had hoped the 'more chances to succeed' would even it out. It appears to... not.
12:00 iospacedout is now known as iospace
12:01
<&jerith>
Since avg_lt2 is constant across TN, except for the success rolls that would otherwise be botches.
12:01
< Reiver>
Yeah, but it requires summing :/
12:01
< Reiver>
I hadn't planned on that being an aspect here.
12:02
< Rhamphoryncus>
Is it just me or are all these systems trying to produce a logarithmic scale?
12:02
< Reiver>
Dice pools do that anyway, IIRC
12:02
< Rhamphoryncus>
crudely, that's my point
12:03
< Reiver>
In a rough sense though, yes
12:03
< Rhamphoryncus>
well, D&D tries to be linear, but fails when you get near the edges
12:04
< Rhamphoryncus>
(d20 systems that is)
12:04
< Reiver>
I am deliberately going for dice pools and vaguely logarithmic scales because it allows a middling-skilled character to do well without trivialising the high skilled; I find, eg, the d20 setup means that if you beat the other guy by +10 in something, 50/50 becomes Impossible
12:04
< Rhamphoryncus>
yeah
12:05
< Rhamphoryncus>
But having identified the problem I wonder if it's solvable in a better way
12:05
< Reiver>
In this setup, a Skill 2 character may enjoy a 75% chance to succeed at something... and the skill 5 character can still, concievably, fail.
12:05
< Reiver>
More to the point, the Skill 5 character can attempt /harder/ stuff and have a hope in hell of succeeding.
12:06
< Rhamphoryncus>
yeah
12:06
< Reiver>
The only issue I'm facing is that I really want thte system to allow botches. And for a Skill 5 character to be able to actually botch with odds that do not force a calculator into scientific notation with a minus sign involved~
12:07
< Rhamphoryncus>
hehe
12:09
< Rhamphoryncus>
If you were to abstract it and use a real (heh) logarithmic RNG you might want two different numbers: one for the accuracy, the other for the energy/damage
12:09
< Rhamphoryncus>
(arrows against a dragon? Not bloody likely)
12:10
<&jerith>
Reiver: Why does difficulty modify threshold rather than success count?
12:11
< Reiver>
Jerith: The general goal is to succeed at all.
12:11
< Reiver>
Only in occasions of opposed checks (and situations simulating such matters) does the magnitude of the success matter.
12:11 Reiver [reiverta@5B433A.F67240.8C1466.49B95A] has left #code []
12:12 Reiver [reiverta@5B433A.F67240.8C1466.49B95A] has joined #code
12:12
<&jerith>
"N successes in a pool of size M" siges you a more Gaussian distribution, IIRC.
12:12
<&jerith>
*gives
12:12
<&jerith>
How did I tyop that so badly?
12:12
< Reiver>
Right, but also demands a considerably larger dice pool.
12:12
< Reiver>
I wanted half a dozen dice to suffice, rather than the Bucket Of Dice that WoD uses.
12:12 * jerith nods.
12:13
< Reiver>
Also: There are other times where N successes are used; these are Tests which are rather than 'did you succeed at all', are 'did you succeed, and /how fast did you do it/'
12:13
<&jerith>
Cool.
12:13
< Reiver>
At which point you, eg, check how long it takes to roll 5 successes. Outright failures may screw with the running total.
12:15
< Reiver>
Useful for things like racing an opponent to a destination; trying to save a bleeding man/cure a plague; fixing the life support before you all suffocate...~
12:15
<&jerith>
This gives you a fairly quantised skill set, though.
12:15
< Reiver>
Deliberate, as is the chunkiness of the target values.
12:16
< Reiver>
2 is Standard, 3 is Good, 4 is Excellent and 5 is Superb. Or similar adjectives.
12:16
< Reiver>
TNs: 1+ Automatic, 2+ Trivial, 3+ Easy, 4+ Challenging(Standard), 5+ Hard, 6+ Extreme, 7+ Impossible.
12:17
< Reiver>
(And yes, 7+ has a place in the system~)
12:17
< Reiver>
The idea is that ith sufficiently chunky skills and difficulties, things become less arbitary.
12:18
< Reiver>
What's the relative skill level of a +7 to hit vs +8 in D&D, afterall?
12:18
<&jerith>
I don't like D&D's linearity.
12:18
< Reiver>
Too fine a grain and the numbers stop meaning much.
12:19
< Reiver>
Neither do I, but it's not just the linearity, but also the grain.
12:20
< Reiver>
Making things a bit more chunky means that values can mean something to our comparisonist brains.
12:20
< Reiver>
Hence the heavily quantised skill system, combined with a bias towards success even at Rank 2.
12:21
<&jerith>
Reiver: http://pastebin.starforge.co.uk/526
12:21
<&jerith>
Those are success chances.
12:21
< Reiver>
Else you start to find people making their numbers as high as possible just so they have decent odds at success, 'setting standards' be damned~
12:21
< Rhamphoryncus>
what cool kids do with magnets: http://www.quantumdiaries.org/wp-content/uploads/2011/03/IMG_2445.jpg
12:26
<&jerith>
Reiver: Specifically, "Standard" skill on "Challenging" difficulty has 75% success chance.
12:26
< Reiver>
Correct.
12:26
< Reiver>
I quote that as being, er, well
12:26
< Reiver>
D&D assumes the typical challenge for a given character to be at the 50% success rate.
12:27
< Reiver>
This is, frankly, too low
12:27
< Rhamphoryncus>
climbing a 10 foot rope: 75% success rate. Climbing a 100 foot rope: ...
12:27
< Reiver>
As it pretty much means everyon does their damndest to up those odds to something a little tastier.
12:28
< Reiver>
Wheras my setup is that Skill 2 should be 'good enough' to get you by on the standard stuff, most of the time.
12:28
< Reiver>
Of course, as that curve shows, it rapidly gets dodgy as the circumstances start to stack against you... >_>
12:29
<&jerith>
An "Excellent" skill gets you past an "Extreme" challenge more than half the time.
12:29
< Reiver>
Which is rather the point.
12:29 * iospace yawns
12:29
< Reiver>
But likewise worries me if it /also/ gives out a 1 in 3 chance of botching~
12:30
<&jerith>
Even "Standard" skill has better than 30% chance to succeed at anything short of "Impossible".
12:32
< Reiver>
Yeah, I've pondered that.
12:32
< Reiver>
I've not yet decided if that's a feature or flaw.
12:34
< Reiver>
Mind you, for a skill to be rolled, you generally don't want to fail it - there's a cost (if only opportunity cost) to trying something.
12:34
< Reiver>
Out of combat, if you fail the check you go home without any biscuits
12:34
< Reiver>
In combat, you're only getting on or two checks a round, so failing one can get pretty harsh.
12:36
< Reiver>
And really, if you've got a less than 1-in-3 chance of succeeding, the situation starts to look less like a circumstance for probability tests as it does a plot point one way or the other.
12:39 Reiver [reiverta@5B433A.F67240.8C1466.49B95A] has left #code []
12:40 Reiver [reiverta@5B433A.F67240.8C1466.49B95A] has joined #code
12:40
< Reiver>
agh, stupid thing
12:40
< Reiver>
clearly that i a hint I need to go to bed~
12:40
< Reiver>
night, folks
12:44 Reiver [reiverta@5B433A.F67240.8C1466.49B95A] has quit [Connection reset by peer]
12:45 Reiver [reiverta@5B433A.F67240.8C1466.49B95A] has joined #code
12:49 iospace is now known as io|driving
13:00 Reiver [reiverta@5B433A.F67240.8C1466.49B95A] has quit [Ping timeout: 121 seconds]
13:06 celticminstrel [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has joined #code
13:53 * TheWatcher eyes this, wtfs
13:55
<@TheWatcher>
User goes to https://foo.bar/ and apache serves up index.cgi as expected. that script checkes whether the user has logged in, and if not redirects them to http://foo.bar/wibble/login An apache rewrite rule picks up that url, and rewrites it as http://foo.bar/index.cgi/wibble/login and index.cgi is called with /wibble/login in its pathinfo.
13:55
<@TheWatcher>
This works, 100% reliably, on my machine
13:57
<@TheWatcher>
On $coworker's machine, manually going to https://foo.bar/index.cgi/wibble/login works, and going to https://foor.bar/index.cgi works (results in the expected redirect), but going to https://foo.bar/wibble/login 404s.
13:58
<@TheWatcher>
(yes, all of those should have been https:, my brain is still boggling too much over this)
13:59
< celticminstrel>
No trailing slashes in all cases?
13:59
<@TheWatcher>
indeed
14:00
<@TheWatcher>
... and now it mysteriously works for him after restarting apache
14:00
<@TheWatcher>
WTFIDK
14:00
<@Tamber>
You woke up the sleeping spiders so they started doing their job.
14:20 io|driving is now known as iospace
14:22 Attilla [Obsolete@Nightstar-245c4d9c.as43234.net] has quit [Ping timeout: 121 seconds]
15:02 Vash [Vash@Nightstar-e8057de2.wlfrct.sbcglobal.net] has joined #code
15:02 mode/#code [+o Vash] by ChanServ
15:40 Attilla [Obsolete@Nightstar-245c4d9c.as43234.net] has joined #code
15:42 celticminstrel [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has quit [[NS] Quit: KABOOM! It seems that I have exploded. Please wait while I reinstall the universe.]
15:42 celticminstrel [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has joined #code
16:08 Kindamoody|out is now known as Kindamoody
16:39
< Tarinaky>
Trying to think...
16:39
< Tarinaky>
If I have two coordinates on a discrete grid.
16:40
< Tarinaky>
What's the best way to find a list of coordinates/squares on that 'path'
16:40
< Tarinaky>
(It can be given that a straight line is the shortest path)
16:45
< celticminstrel>
This sounds like it'd be the same sort of algorithm as drawing a line pixel-by-pixel.
16:46
< Tarinaky>
I can't think how I'd alter that algorithm though.
16:47
< celticminstrel>
Why would you need to alter it?
16:47
< Tarinaky>
Because drawing a line pixel-by-pixel won't give me the intermediate stages...
16:48
< Tarinaky>
Unless I'm missing something here...
16:48
< celticminstrel>
If by intermediate stages you mean the pixels, then obviously yes it will.
16:48
< Tarinaky>
I don't mean pixels though.
16:48
< Tarinaky>
I mean game-board tiles.
16:48
< celticminstrel>
Is that much different from really large pixels?
16:49
< Tarinaky>
I dunno. I can't think what I want to do though >.<
16:54
< Tarinaky>
float(i) returns a floating point representation of i right?
16:54
< Tarinaky>
(In Python)
16:55
< celticminstrel>
Should do.
16:55
< Tarinaky>
Nrrrgh struggling with this >.<
16:59
< Tarinaky>
I can't remember the rest of the algorithm :x
16:59
< Tarinaky>
http://pastebin.com/31gZ6WiV
17:03 EvilDarkLord is now known as Maze
17:03
< celticminstrel>
I was trying to figure out why this seemed laggy. Turns out I simply wasn't updating the screen after I changed it.
17:06 Attilla_ [Obsolete@Nightstar-245c4d9c.as43234.net] has joined #code
17:08
< celticminstrel>
Tarinaky: This is the algorithm I was thinking of; it looks like it will work for you provided you use tile coordinates.
17:09
< celticminstrel>
http://en.wikipedia.org/wiki/Bresenham's_line_algorithm
17:09 Attilla [Obsolete@Nightstar-245c4d9c.as43234.net] has quit [Ping timeout: 121 seconds]
17:12
< Tarinaky>
That's the one I'm thinking off too...
17:12
< Tarinaky>
Except it needs generalising for other quadrants.
17:13
< Tarinaky>
http://pastebin.com/TyniPvcp Does that look right? :x
17:14
< Tarinaky>
Ah. Spotted an issue.
17:15
< Tarinaky>
http://pastebin.com/xEQiKUKu That :x
17:21
< celticminstrel>
Shouldn't you initialize error to 0.0 instead of 0?
17:23
< Tarinaky>
Don't think it matters in Python.
17:23
< Tarinaky>
int + float = float iirc.
17:23
< Tarinaky>
I'll change it anyway to make sure.
17:24
<~Vornicus>
yes, python coerces to float for all operations involving float
17:24
< Tarinaky>
Except division.
17:24
< Tarinaky>
Because division is SPESHUL.
17:24
< celticminstrel>
Does that include assignment operations like +=?
17:25
< celticminstrel>
Yes it does.
17:25
<~Vornicus>
no, even division
17:25
< Tarinaky>
a/b is floored.
17:25
< Tarinaky>
Oh wait.
17:25
< Tarinaky>
Unless one of the two is a float
17:25
< Tarinaky>
DERP
17:25
< celticminstrel>
Not in 3.x.
17:26
< Tarinaky>
Yeah, I'm using 2.7 still.
17:30
<~Vornicus>
in 3.x it's a float if either is a float, or if it's not exactly divisible
17:30
< Tarinaky>
If I have a for-each loop, how can I start the loop ignoring the first element?
17:30
< Tarinaky>
Or is the only way to remove the first element?
17:33
<~Vornicus>
in python?
17:34
< Tarinaky>
Yeah.
17:34
<~Vornicus>
for item in stuff[1:] works
17:34
<~Vornicus>
I seem to recall there's an islice or something that saves on memory by giving you an iterator though
17:43
< Tarinaky>
Hmm... I think my function is returning an array that's wrong.
17:43
< Tarinaky>
But I have no idea why :/
17:43
< Tarinaky>
s/array/list
17:43
< Tarinaky>
Same diff.
17:45
< Tarinaky>
Ah.
17:46
< celticminstrel>
For what it's worth, I also still use 2.7.
17:46
< Tarinaky>
xrange only goes up doesn't it?
17:46
< Tarinaky>
I mean, if you pass it range(a,b) such that b<a it'll return nothing right?
17:46
<~Vornicus>
right, but you can give it a negative step
17:46
< Maze>
Tarinaky: That sounds like something you could really easily test in the python shell.
17:47
<~Vornicus>
range(4,-1,-1) gives 4, 3, 2, 1, 0
17:47
< celticminstrel>
range(a,b) with b<a also returns nothing.
17:48 * Tarinaky grumbles.
17:48
< celticminstrel>
islice and co I think are in the iterators package or something like that.
17:50
<~Vornicus>
itertools, iirc
17:51
<~Vornicus>
http://docs.python.org/library/itertools.html#itertools.islice
17:51
<~Vornicus>
lots of cool stuff in there.
17:51
< Tarinaky>
Still not working properly :(
17:51
< Tarinaky>
Bah. Food.
17:53
< iospace>
i hate jumpers
17:53
< iospace>
so much
17:53
< iospace>
things vanish so easily
17:53
< celticminstrel>
Jumpers... are we talking about clothing here?
17:54
< iospace>
no, the tiny pieces of plastic with metal inside that are used to connect two pins to activate certain settings
17:54
< gnolam>
That's why you have a box of them.
17:54
< celticminstrel>
Ah. Makes much more sense this way.
17:54
< celticminstrel>
I don't think I knew of that meaning...
17:54
< celticminstrel>
Or if I did I'd forgotten.
17:56
< iospace>
hehe
17:56
< iospace>
either way they're a royal pain
18:05
< Rhamphoryncus>
int/int is flored in 2.x (returns an int, like C). 3.x (or from __future__ import division) makes it always return a float (not floored)
18:06
< Rhamphoryncus>
a//b was added (both 2.x and 3.x) which always floors (even with floats), and is a good complement if you use the __future__ import
18:08
< celticminstrel>
Xcode seems to be lagging a whole lot more today than yesterday...
18:17 * celticminstrel idly wonders if there's any notable difference between rendering a square and using glScissor plus clear.
18:19
< Rhamphoryncus>
Functional, no, performance, yes
18:19
< Rhamphoryncus>
Not sure which is faster though ;)
18:20
< Rhamphoryncus>
I would clear to the background, then do a square over top
18:20
< celticminstrel>
Currently I'm doing the former because a) it was an easier port from SDL_FillRect and b) I didn't know about glScissor at that point.
18:20
< celticminstrel>
I only discovered glScissor when I needed to clip text in a text box.
18:21
< Tarinaky>
Aaaand.
18:21
< Tarinaky>
I just realised the function is wrong anyway.
18:21 * Tarinaky sighs.
18:21
< celticminstrel>
Wrong how?
18:21
< Rhamphoryncus>
wrongity wrong or just wrong?
18:23
< Tarinaky>
Wrong as in "Even if it worked would not have produced the correct output"
18:23
< Rhamphoryncus>
celticminstrel: fwiw, I have the 4.2 quickref, the 4.2 core spec, and the 4.2 glsl spec all open
18:24
< celticminstrel>
I usually Google an OpenGL command when I need to know how it works. The first result is generally the doc page on the OpenGL site.
18:24
< Rhamphoryncus>
You'd be surprised :(
18:25
< celticminstrel>
Surprised how?
18:25
< Rhamphoryncus>
Most of those results have man in the url, not man4. They're for opengl2
18:25
< Rhamphoryncus>
Of course they say nothing of this
18:27
< celticminstrel>
I'll remember that, though I don't think it matters at this point (it might once I start doing 3D stuff or something).
18:34
< Tarinaky>
Aaaaaagh
18:34
< Tarinaky>
return range(b-1,a+1).reverse() why is this evaluating to 'None'?
18:35
< Tarinaky>
Asserting that b < a
18:36
< Tarinaky>
NM. Replaced it with range(a,b,-1) and now it works.
18:37
< Tarinaky>
a,b,-1 wasn't earlier though for some reason >.>
18:37
<~Vornicus>
because reverse() like sort() returns nothing - it modifies in place.
18:37
< Tarinaky>
Also: what the merry-f is my function doing now o.o
18:38
< Tarinaky>
'[(36, 44), (35, 43), (34, 46)]'
18:39
< Tarinaky>
Y should not be anything other than monotonic :/
18:40
<~Vornicus>
What's your code look like?
18:42
< Tarinaky>
http://pastebin.com/5bZMQeEE
18:43 * Vornicus finds himself doing spellchecker first: "gradient" :P
18:43
< Tarinaky>
I wasn't sure.
18:44
< Tarinaky>
It appears to work fine except in the bottom-left quadrant.
18:44
< celticminstrel>
Oh yeah, I was going to mention the spelling. :P
18:44
< Tarinaky>
Wait...
18:44
< Tarinaky>
I shouldn't say that.
18:44
< Tarinaky>
My visualiser flips the axes from how I think about it.
18:44
< Tarinaky>
So that's be... the top-left quadrant.
18:47
<~Vornicus>
top left quadrant, which one is that?
18:47
< Tarinaky>
+ve dy, -ve dx
18:48
<~Vornicus>
So "top left" if you consider the origin point to be the bottom left.
18:48
< Tarinaky>
Yes.
18:48
<~Vornicus>
Okay.
18:52 You're now known as TheWatcher[afk]
19:00 * Tarinaky facepalms.
19:00 * Vornicus tries to remember the math.
19:00
<~Vornicus>
?
19:02
< Tarinaky>
The gradiant needs to be negative if dx is negative.
19:02
< Tarinaky>
Which now means I can fix another bug now >.>
19:05 maoranma [nbarr@Nightstar-c2178fc8.pools.spcsdns.net] has joined #code
19:06 Noah [nbarr@Nightstar-c2178fc8.pools.spcsdns.net] has quit [Ping timeout: 121 seconds]
19:13
< Tarinaky>
http://i.imgur.com/VQUmy.png << >.>
19:20 maoranma is now known as Noah
19:53 Attilla_ [Obsolete@Nightstar-245c4d9c.as43234.net] has quit [[NS] Quit: ]
19:58 * celticminstrel quits Xcode, suddenly gains 10GB startup disk space.
19:58
< celticminstrel>
More like 20 actually...
20:02
< gnolam>
https://en.wikipedia.org/wiki/Cox-Zucker_machine
20:04
< RichyB>
Oh dear.
20:04
< celticminstrel>
Why is Vuze 20MB? :O
20:05
< celticminstrel>
Jars, apparently.
20:07 * celticminstrel shunts it into ~/Applications
20:09 maoranma [nbarr@Nightstar-5d478c5e.pools.spcsdns.net] has joined #code
20:12
< celticminstrel>
ls has no "calculate directory sizes" switch?
20:12 Noah [nbarr@Nightstar-c2178fc8.pools.spcsdns.net] has quit [Ping timeout: 121 seconds]
20:13
< RichyB>
You want "du -sh" for that.
20:13
< RichyB>
For "du -sm".
20:13
< celticminstrel>
Does that target a specific directory or show the whole disk?
20:13 Kindamoody is now known as Kindamoody[zZz]
20:13
< RichyB>
du gives disk usage, -s sums a subdirectory, -m sets the units to megabytes.
20:14
< celticminstrel>
And -h?
20:14
< RichyB>
Human-readable units. "2G" "50M" and so on. Nice to look at but useless for scripting. :)
20:14
< RichyB>
Without "-s", du will print out the disk usage of every directory below the starting point.
20:15 Vash [Vash@Nightstar-e8057de2.wlfrct.sbcglobal.net] has quit [[NS] Quit: I lovecraft Vorn!]
20:15
< RichyB>
e.g. mkdir -p ~/foo/{bar,baz,blee}
20:15
< celticminstrel>
Recursively, or just one level?
20:15
< RichyB>
Recursively.
20:15
< celticminstrel>
Oh, there's a -d though...
20:15
< RichyB>
-s. What's -d?
20:16
< celticminstrel>
"-d depth"
20:16
< Tarinaky>
To limit the depth.
20:16
< RichyB>
Hrmn. It is not there in the version in Ubuntu 10.04.
20:16
< RichyB>
Oh well.
20:17
< RichyB>
celticminstrel, btw, "baobab" and "xdu" are the best graphical tools that I know of for visualising disk usage.
20:17
< celticminstrel>
Oddly, it's showing double-slashes in the pathnames.
20:17
< RichyB>
Something like du -xm /filesystem >/tmp/filesystem.du.txt; xdu </tmp/filesystem.txt
20:17
< RichyB>
or just run "baobab" and it's a nice GTK2+ program with a shiny frontend.
20:18
< celticminstrel>
GTK needs X11 though, doesn't it?
20:19
< celticminstrel>
Heh, du gives a total of 8GB rather than the 10GB from the Finder.
20:20
< celticminstrel>
...oooh, emptying the Trash would probably be a good way to free disk space.
20:21
< celticminstrel>
...though apparently there's not a lot in it this time.
20:22
< celticminstrel>
I guess I could delete Xcode 4.2 and all its associated programs.
20:22
< RichyB>
Yes. One of my colleagues here installed X11 a while back specifically for baobab. :)
20:22
< celticminstrel>
Requiring X11 makes it a last-resort option.
20:23
< celticminstrel>
Wasn't there supposed to be some version of GTK in progress that used Quartz instead of X11?
20:23 Attilla [Obsolete@Nightstar-245c4d9c.as43234.net] has joined #code
20:23
< celticminstrel>
...what's /private for?
20:34
< RichyB>
Yeah. Maybe. I have no idea.
21:04 maoranma [nbarr@Nightstar-5d478c5e.pools.spcsdns.net] has quit [Client closed the connection]
21:07 You're now known as TheWatcher
21:32
< celticminstrel>
Bah, I guess I can't use GL_LINE_STIPPLE?
21:51
<@ToxicFrog>
/private is some OSX-specific thing.
21:54
< celticminstrel>
I can't seem to find a way to stipple the lines of a rectangle. Oh well. I suppose it's not important.
21:59 ShellNinja is now known as AnnoDomini
22:13
< celticminstrel>
I seem to keep using the wrong union member in the event class. :/
22:13 AnnoDomini is now known as ShellNinja
22:17
< gnolam>
You're probably using non-union members, you scab.
22:17
< celticminstrel>
Huh?
22:19
< ShellNinja>
Scabs are just organic patches.
22:23
<&jerith>
"scabs" are workers who do not belong to the union.
22:24
< ShellNinja>
I do not belong to any workers' unions. Does that make me a scab?
22:24
< iospace>
screen <3
22:24
<&jerith>
(When trade relations get exciting, scabs generally have a bad time. This may or may not be worse than actually being a union member.)
22:24
<&jerith>
ShellNinja: Is there a union to which most of your industry belongs?
22:24
< celticminstrel>
Hm. Are the NS* classes part of Objective-C in general, and not Apple-specific?
22:25
< celticminstrel>
Wondering if my plist loading code might compile and work on another platform.
22:25
< ShellNinja>
jerith: I dunno. Probably. I do construction/deconstruction.
22:26
<&jerith>
celticminstrel: The "NS" prefix comes from NextStep, which is where Objective-C came into being.
22:26
<&jerith>
I don't think there's anything that still uses Objective-C that isn't Apple-specific, though.
22:27
< celticminstrel>
Well, you can use ObjC on Windows. I don't expect it's done a lot, but it's possible.
22:34
< celticminstrel>
I just realized I don't need to link against Cocoa anymore.
22:40 Noah [nbarr@Nightstar-5d478c5e.pools.spcsdns.net] has joined #code
22:51
<@Alek>
so I had a game mechanic idea today.
22:52
<@Alek>
basically taking a leaf from many of the CCG flash games.
22:52
<@Alek>
starting with a base of collectible cards. mixing in a healthy dose of War. adding a dash of Roshambo.
22:55
<@Alek>
you have a deck, of X cards. so does your opponent. they're composed of cards you've selected, randomly shuffled. and you compare them, one at a time, to deal damage to each other, as well as to yourself and to your opponent. surviving cards cycle over. stats are: attack, max defense, current defense. defense is decremented by opposed attack, if it reaches zero, the card is removed from the deck.
22:55
<@Alek>
also, if more damage is dealt than necessary to remove the card, the extra spills over (trample) to hit you (or your opponent). take enough damage, you lose.
22:57
<@Alek>
the roshambo bit is, there are three types of cards. melee, ranged, spellcaster. if the matched cards are of the same type, they deal damage simultaneously. however, if they're of different type, ranged deals damage before melee, while spellcaster deals damage before ranged, and in turn melee deals damage before spellcaster.
22:58
<@Alek>
they also each have a special mechanic, with small chance of activation. spellcaster has a chance to deal same damage on the next match, melee has a chance to double-strike, and ranged has a chance to bypass the opposing card and deal direct damage.
23:00
<@Alek>
possibly also a non-attacker card type, a magic or artifact card - something that won't block or attack in its match, but will have useful effects - like regen 1 on next 10 cards, or sacrifice random/next card to deal direct damage, etc.
23:06
<@ToxicFrog>
This sounds like a game that is decided entirely by the deckbuilding modulated by the shuffle, making the actual "game" part an extremely tedious implementation of One Up.
23:06 Vash [Vash@Nightstar-e8057de2.wlfrct.sbcglobal.net] has joined #code
23:06 mode/#code [+o Vash] by ChanServ
23:07
<@ToxicFrog>
(this is also the problem with War)
23:10 Maze is now known as EvilDarkLord
23:16
<@Alek>
mmn.
23:16
<@Alek>
it'll be further modulated by the collectioning. with a quest front for that. :P
23:16
<@Alek>
and a cash shop, duh. <_<
23:22
<@Alek>
the various cards will have different stats, besides being of the three kinds. also, some, more rare, may have additional abilities. like Vampire (if it deals damage, it heals one point), for example. or Lycanthrope (regen 1 at beginning of match; if opposed by a creature or spell with the /silver/ keyword, reduce self max defense by 1). or even Troll (regen 1 at end of match; if opposed etc
23:22
<@Alek>
/fire/ or /acid/ keyword, reduce self max defense by 1). regen at end means it can't die unless it's killed by fire or acid.
23:25 himi [fow035@D741F1.243F35.CADC30.81D435] has joined #code
23:25 mode/#code [+o himi] by ChanServ
23:30 iospace is now known as io|driving
--- Log closed Wed Jun 20 00:00:00 2012
code logs -> 2012 -> Tue, 19 Jun 2012< code.20120618.log - code.20120620.log >

[ Latest log file ]