--- Log opened Sun May 01 00:00:17 2011 |
00:04 | | Attilla [Some.Dude@Nightstar-92c9199f.cable.virginmedia.com] has joined #code |
00:09 | | shade_of_cpux is now known as cpux |
00:10 | | cpux is now known as shade_of_cpux |
00:11 | | shade_of_cpux_ [chatzilla@Nightstar-c978de34.dyn.optonline.net] has joined #code |
00:14 | | shade_of_cpux [chatzilla@510B1D.8D602E.9FE2BE.9FAE21] has quit [Ping timeout: 121 seconds] |
00:14 | | shade_of_cpux_ is now known as shade_of_cpux |
00:33 | | Rhamphoryncus [rhamph@C06FE3.F5723C.BE3FEB.9D4666] has quit [Client exited] |
00:43 | | You're now known as TheWatcher[T-2] |
00:47 | | You're now known as TheWatcher[zZzZ] |
01:00 | < Vornicus> | But, yeah. Actually this would be a better primer in Game Maker than Vorns Ahoy, I suspect, because Vorns Ahoy has all sorts of pathy responses to things and stuff and this would be more freeform as far as that goes. |
01:47 | | celticminstrel is now known as celmin|supper |
02:13 | | celmin|supper is now known as celticminstrel |
02:17 | | Attilla [Some.Dude@Nightstar-92c9199f.cable.virginmedia.com] has quit [Ping timeout: 121 seconds] |
03:24 | | Rikushadow5 [DSD@971820.82B912.F34609.736056] has joined #code |
03:25 | | SmithKurosaki [smith@Nightstar-1e66ccde.dsl.teksavvy.com] has quit [Ping timeout: 121 seconds] |
03:26 | | SmithKurosaki [smith@4FC299.382CB9.EF1529.A5B039] has joined #code |
03:32 | | shade_of_cpux is now known as cpux |
03:49 | | Kindamoody|out is now known as Kindamoody |
03:57 | | Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds] |
04:35 | | Kindamoody is now known as Kindamoody[zZz] |
04:35 | | Rikushadow5 [DSD@971820.82B912.F34609.736056] has quit [Ping timeout: 121 seconds] |
05:53 | | LoanCoat [NSwebIRC@Nightstar-97b68dc2.stablehost.com] has joined #code |
05:54 | < LoanCoat> | Tox1cfrog , Oh I declare I see a nigger! |
05:54 | < LoanCoat> | You know what |
05:54 | < LoanCoat> | ROGUE FOR LIFE |
05:54 | < LoanCoat> | ROGUE FOR LIFE |
05:54 | < LoanCoat> | ROGUE FOR LIFE |
05:54 | < LoanCoat> | ROGUE FOR LIFE |
05:54 | < LoanCoat> | ROGUE FOR LIFE |
05:54 | < LoanCoat> | ROGUE FOR LIFE |
05:54 | < LoanCoat> | ROGUE FOR LIFE |
05:54 | < LoanCoat> | ROGUE FOR LIFE |
05:54 | < LoanCoat> | ROGUE FOR LIFE |
05:54 | < LoanCoat> | ROGUE FOR LIFE |
05:54 | < LoanCoat> | ROGUE FOR LIFE |
05:54 | < LoanCoat> | ROGUE FOR LIFE |
05:54 | < LoanCoat> | ROGUE FOR LIFE |
05:54 | < LoanCoat> | ROGUE FOR LIFE |
05:55 | < LoanCoat> | ROGUE FOR LIFE |
05:55 | < celticminstrel> | Namegduf Vornicus ToxicFrog |
05:55 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:55 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:55 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:55 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:55 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:55 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:55 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:55 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:55 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:55 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:55 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:55 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:55 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:55 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:55 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:55 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:55 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:55 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:55 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:55 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:55 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:55 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:55 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:55 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:55 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:55 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:55 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:55 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:55 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:55 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:55 | < LoanCoat> | ROGUE FOR LIFE |
05:55 | < LoanCoat> | ROGUE FOR LIFE |
05:55 | < LoanCoat> | ROGUE FOR LIFE |
05:55 | < LoanCoat> | ROGUE FOR LIFE |
05:55 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:55 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:55 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:55 | < LoanCoat> | ROGUE FOR LIFE |
05:55 | < LoanCoat> | ROGUE FOR LIFE |
05:55 | < LoanCoat> | ROGUE FOR LIFE |
05:55 | < LoanCoat> | ROGUE FOR LIFE |
05:55 | < LoanCoat> | ROGUE FOR LIFE |
05:55 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:55 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:55 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:55 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:55 | < LoanCoat> | ROGUE FOR LIFE |
05:55 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:55 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:55 | < LoanCoat> | ROGUE FOR LIFE |
05:55 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:55 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:55 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:56 | < LoanCoat> | ROGUE FOR LIFE |
05:56 | < LoanCoat> | ROGUE FOR LIFE |
05:56 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:56 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:56 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:56 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:56 | < LoanCoat> | ROGUE FOR LIFE |
05:56 | < LoanCoat> | ROGUE FOR LIFE |
05:56 | < LoanCoat> | ROGUE FOR LIFE |
05:56 | < LoanCoat> | ROGUE FOR LIFE |
05:56 | < LoanCoat> | ROGUE FOR LIFE |
05:56 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:56 | < LoanCoat> | ROGUE FOR LIFE |
05:56 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:56 | < Tamber> | How mature. |
05:56 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:56 | < LoanCoat> | ROGUE FOR LIFE |
05:56 | < LoanCoat> | ROGUE FOR LIFE |
05:56 | < LoanCoat> | ROGUE FOR LIFE |
05:56 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:56 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:56 | < LoanCoat> | ROGUE FOR LIFE |
05:56 | < LoanCoat> | ROGUE FOR LIFE |
05:56 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:56 | < LoanCoat> | ROGUE FOR LIFE |
05:56 | < LoanCoat> | ROGUE FOR LIFE |
05:56 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:56 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:56 | < LoanCoat> | YOU DONT HAVE FRIENDS SO ROGUE FOR LIFE |
05:56 | < LoanCoat> | ROGUE FOR LIFE |
05:56 | < LoanCoat> | ROGUE FOR LIFE |
05:56 | < LoanCoat> | ROGUE FOR LIFE |
05:56 | | LoanCoat is now known as PinkFued |
05:56 | < PinkFued> | How mature. |
05:57 | < celticminstrel> | PinkFreud jerith |
05:57 | | PinkFued is now known as DeaseNutzInYoMouth |
05:57 | | DeaseNutzInYoMouth is now known as PenisInYaFace |
05:57 | | PenisInYaFace is now known as WallWallWall |
05:57 | | WallWallWall is now known as DatBeANiggaSir |
05:57 | | DatBeANiggaSir is now known as KeelMe |
05:57 | | KeelMe is now known as Juty |
05:57 | | Juty is now known as PenisFaceWhore |
05:58 | | PenisFaceWhore is now known as JimmyDee |
05:58 | | JimmyDee is now known as Giveittoher |
05:58 | | Giveittoher is now known as hardandfast |
05:58 | | hardandfast is now known as Penisinthehand |
05:58 | | Penisinthehand is now known as CouchOvaThere |
05:58 | | CouchOvaThere is now known as Monkey |
05:58 | | Monkey is now known as DOg |
05:58 | | DOg is now known as CAT |
05:58 | | CAT is now known as JEBUS |
05:59 | | JEBUS is now known as POOP |
05:59 | | POOP [NSwebIRC@Nightstar-97b68dc2.stablehost.com] has quit [G-Lined: Can't you troll constructively?] |
05:59 | < celticminstrel> | Ah, there we go. |
05:59 | < Tamber> | Constructive trolling would require more than a brainstem. |
05:59 | < celticminstrel> | Hehe. |
05:59 | < celticminstrel> | Funny kill message there. |
06:00 | | ConstructionWorker [NSwebIRC@Nightstar-8e4d7430.safesugar.net] has joined #code |
06:00 | | * ConstructionWorker Constructs some objects |
06:01 | | * ConstructionWorker Constructs a G Line. |
06:01 | | * ConstructionWorker Puts up the new sign for the shop it says |
06:01 | < ConstructionWorker> | ROGUE IS THE KING |
06:01 | < ConstructionWorker> | ROGUE IS THE KING |
06:01 | < ConstructionWorker> | ROGUE IS THE KING |
06:01 | < ConstructionWorker> | ROGUE IS THE KING |
06:01 | < ConstructionWorker> | ROGUE IS THE KING |
06:01 | < ConstructionWorker> | ROGUE IS THE KING |
06:01 | < ConstructionWorker> | ROGUE IS THE KING |
06:01 | < ConstructionWorker> | ROGUE IS THE KING |
06:01 | < ConstructionWorker> | ROGUE IS THE KING |
06:01 | < ConstructionWorker> | ROGUE IS THE KING |
06:01 | < ConstructionWorker> | ROGUE IS THE KING |
06:01 | | * ConstructionWorker Puts up the new sign for the shop it says |
06:01 | < ConstructionWorker> | ROGUE IS THE KING |
06:01 | | * ConstructionWorker Puts up the new sign for the shop it says |
06:01 | < celticminstrel> | Thought so. |
06:01 | < ConstructionWorker> | ROGUE IS THE KING |
06:01 | | * ConstructionWorker Puts up the new sign for the shop it says |
06:01 | | * ConstructionWorker Puts up the new sign for the shop it says |
06:01 | | * ConstructionWorker Puts up the new sign for the shop it says |
06:01 | < ConstructionWorker> | ROGUE IS THE KING |
06:01 | < Tamber> | Yup. |
06:01 | | * ConstructionWorker Puts up the new sign for the shop it says |
06:01 | < ConstructionWorker> | ROGUE IS THE KING |
06:01 | | * ConstructionWorker Puts up the new sign for the shop it says |
06:01 | | * ConstructionWorker Puts up the new sign for the shop it says |
06:01 | < ConstructionWorker> | ROGUE IS THE KING |
06:01 | < ConstructionWorker> | ROGUE IS THE KING |
06:02 | < ConstructionWorker> | ROGUE IS THE KING |
06:02 | < ConstructionWorker> | ROGUE IS THE KING |
06:02 | | * celticminstrel sighs. |
06:02 | < ConstructionWorker> | ROGUE IS THE KING |
06:02 | < ConstructionWorker> | ROGUE IS THE KING |
06:02 | < ConstructionWorker> | ROGUE IS THE KING |
06:02 | < ConstructionWorker> | ROGUE IS THE KING |
06:02 | < ConstructionWorker> | ROGUE IS THE KING |
06:02 | < ConstructionWorker> | ROGUE IS THE KING |
06:02 | < ConstructionWorker> | ROGUE IS THE KING |
06:02 | < ConstructionWorker> | ROGUE IS THE KING |
06:02 | < ConstructionWorker> | ROGUE IS THE KING |
06:02 | < ConstructionWorker> | ROGUE IS THE KING |
06:02 | < ConstructionWorker> | ROGUE IS THE KING |
06:02 | < ConstructionWorker> | ROGUE IS THE KING |
06:02 | < ConstructionWorker> | ROGUE IS THE KING |
06:02 | < ConstructionWorker> | ROGUE IS THE KING |
06:02 | < ConstructionWorker> | ROGUE IS THE KING |
06:02 | < ConstructionWorker> | ROGUE IS THE KING |
06:02 | < ConstructionWorker> | ROGUE IS THE KING |
06:02 | < ConstructionWorker> | ROGUE IS THE KING |
06:02 | < ConstructionWorker> | ROGUE IS THE KING |
06:02 | < ConstructionWorker> | ROGUE IS THE KING |
06:02 | < ConstructionWorker> | ROGUE IS THE KING |
06:02 | < ConstructionWorker> | ROGUE IS THE KING |
06:02 | < ConstructionWorker> | ROGUE IS THE KING |
06:02 | < ConstructionWorker> | ROGUE IS THE KING |
06:02 | < ConstructionWorker> | ROGUE IS THE KING |
06:02 | < ConstructionWorker> | ROGUE IS THE KING |
06:02 | < ConstructionWorker> | ROGUE IS THE KING |
06:02 | | ConstructionWorker [NSwebIRC@Nightstar-8e4d7430.safesugar.net] has quit [G-Lined: It would provide evidence of a non-vestigal brain.] |
06:02 | < PinkFreud> | nice. |
06:03 | < Tamber> | Persistent little waste of oxygen, huh? |
06:05 | | * Vornicus thinks he's back again. |
06:06 | < celticminstrel> | I don't see him. |
06:06 | < celticminstrel> | Or do you mean you're back? |
06:06 | < celticminstrel> | . |
06:06 | < Vornicus> | #dnd. Tried a shun this time, let's see how long it takes for him to notice. |
06:06 | < celticminstrel> | Shun? |
06:06 | < Tamber> | celticminstrel, With Vorn, you're never quite sure... |
06:06 | | * Tamber ducks. :p |
06:10 | < Vornicus> | I don't think he's noticed yet. |
06:13 | < celticminstrel> | Heh. But what does shun mean? |
06:13 | < Vornicus> | Shun: the only accepted messages are serverpong and quit. |
06:13 | < celticminstrel> | Ah. |
06:13 | < celticminstrel> | So how do you know he's still sending then? |
06:14 | < Vornicus> | Because once he figures it out he can just quit. |
06:14 | < Vornicus> | Which he did. |
06:14 | < Vornicus> | About 2 minutes ago. |
06:15 | < Vornicus> | Anyway, if he shows up again, msg me. |
06:21 | < Reiver> | Vornicus: He just returned. |
06:25 | | celticminstrel [celticminst@1526F6.37AB0D.97233B.788A64] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] |
07:28 | | kwsn is now known as kw\t-2 |
07:30 | | * kw\t-2 does a scrollback, wtfuxes |
07:31 | | * kw\t-2 will ask tomorrow, provided she remembers to ask |
07:31 | | kw\t-2 [kwsn@BAD19E.B5A83A.180240.E5184B] has quit [[NS] Quit: moo] |
07:49 | | gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code |
08:22 | | Zzz is now known as AnnoDomini |
08:37 | | * Reiver pokes at Excel. |
08:37 | < Reiver> | This is probably a realm where I actually want freaking SQL, but I will do it with Excel as an excersize in education |
08:37 | < Reiver> | I think I want a variety of lookup table. |
08:37 | < Tamber> | You actually /want/ brain damage? o_O |
08:37 | < Reiver> | Sure, it's going to be my job some point~ |
08:38 | < Tamber> | hehe |
08:38 | < Reiver> | I am, in fact, creating a Wildshape Creature Generator for Pathfinder, wherein wild shape is a set of specified bonuses according to size (And then a list of which special abilities you can haz if the critter you're shaping into also haz) |
08:39 | < Reiver> | So I'm statting out the base critter, then creating a second worksheet with size modifiers - eg STR -1 DEX +4 etc; now I need to get the first sheet to play nice with the size modifiers being applied to each row as appropriate. |
08:39 | < Reiver> | LOOKUP is the right command, yes? |
08:40 | < Tamber> | I pushed all that horror out of my mind after college, sorry. |
08:40 | | * Tamber shrugs, rummages for documentation. |
08:40 | | Kindamoody[zZz] is now known as Kindamoody |
08:41 | < Reiver> | aha, VLOOKUP |
08:42 | < Reiver> | Oh, the joys of arrays |
08:42 | < Vornicus> | Hooray, vlookup |
08:43 | < Vornicus> | quite possibly the single function I use the most in Excel. |
08:44 | | SmithKurosaki [smith@4FC299.382CB9.EF1529.A5B039] has quit [Ping timeout: 121 seconds] |
08:44 | < Reiver> | I shall pre-ask: Is there any way to shorthand the lookup commands? |
08:45 | < Vornicus> | Not that I'm aware of, but you can of course parameterize the living fuck out of them. |
08:45 | < Reiver> | Or rather, once I've found the row I want, do I have to use the full lookup syntax all over the place in order to get columns A, B and D into the same formula? |
08:45 | < Vornicus> | That, sadly, yes. |
08:45 | < Reiver> | (Or array indices 1, 2 and 4 as the case may be~) |
08:45 | < Reiver> | parameterize? |
08:46 | < Vornicus> | But you can for instance but the requested index column at the top of your, um. |
08:46 | | * Reiver suspects he should be programming here, but what the heck~ |
08:47 | < Vornicus> | Say you've got 5 columns that you want from your vlookup -- 2, 3, 5, 8, 9. |
08:47 | < Reiver> | right |
08:47 | < Vornicus> | At the top of your output table, put a row that has 2, 3, 5, 8, 9 in it |
08:47 | < Reiver> | hrn, I see |
08:47 | < Vornicus> | then do f'rinstance B$2 to index that in your vlookup; filling this across will catch those. |
08:48 | < Reiver> | The issue at hand there, is that each row of output wants to go find a certain row from the table. |
08:48 | < Vornicus> | Right... |
08:49 | < Reiver> | Some critters are Large, this means that their Size, Dex and NA will all affect their AC in a standardised way. |
08:49 | < Reiver> | This is what I was trying to get to bend to my will to start with. Hoom. |
08:49 | < Reiver> | ... hoom |
08:49 | | Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has joined #code |
08:49 | < Vornicus> | Time to call in the big guns, I think. |
08:50 | < Reiver> | Oho? |
08:51 | < Vornicus> | Python time! |
08:51 | < Vornicus> | If you've got your data in an excel sheet already you can dump it to csv and Python can handle it nicely, turning it into dictionaries or tuples (or I think perhaps named tuples which are even more awesome) |
08:51 | < Reiver> | Aw, no lookups for me~ |
08:51 | < Reiver> | Mind you I think I get them; what I was trying to do, however, was inappropriate |
08:52 | < jerith> | Named tuples are 2.6+, aren't they? |
08:53 | < Reiver> | ... OK I think I know how to do this in Excel the dirty way (Before doing it the proper way in a second, promise) |
08:54 | < Reiver> | Is there a way to store a column or row reference in a cell in Excel, so you can tell the thing to reference A4's text to find you want to check A1? |
08:54 | < Vornicus> | Yeah. Indirect I think it's called. |
08:55 | < Reiver> | Then I just pre-gen the modifiers for each column somewhere in the sheet, and use indirects to check which row I want to add to my current row. |
08:55 | < Reiver> | OK, that's the Excel Way sorted, then. |
08:55 | | * Reiver loads up Python, vaugely wonders how you check how old it is. |
08:56 | < Reiver> | Is 2.7 the bit you wanted to check? |
08:56 | < Vornicus> | Should tell you version as it loads. |
08:56 | < Vornicus> | That'll do, pig. |
09:00 | < Reiver> | Right then |
09:02 | < Reiver> | http://pastebin.starforge.co.uk/459 - the CSV of size modifiers. |
09:03 | < Reiver> | A couple of those values are admittedly derived, but it seemed easier nonetheless. |
09:03 | < jerith> | Python has a handy csv module. |
09:04 | < Reiver> | If it simplifies matters, they can be pared down to the basics of Str,Dex,NA,Size; I think the rest are actually derived entirely. |
09:05 | | cpux is now known as shade_of_cpux |
09:08 | < Reiver> | (Flatfooted, for instance, is [Base]+NA-Size; Attack is simply [Base]+Str-Size) |
09:09 | < Reiver> | I suspect we will be using dictionaries; what we really want is SQL rows. |
09:09 | < Reiver> | Unless Python can competently wrestle SQL, anyway. |
09:09 | < Reiver> | At which point this could get pretty funny. |
09:09 | < Vornicus> | import sqlite |
09:09 | < Vornicus> | Have a good day. :) |
09:09 | < Reiver> | ... OK THEN |
09:10 | < Reiver> | So. |
09:10 | < Reiver> | I have a csv. |
09:10 | < Reiver> | I can probably hack together an SQL table to hold the creature data, though admittedly this will be less pretty to work with than the origional Excel file I would manage |
09:11 | < jerith> | Read the CSV, dump to an in-memory sqlite table, work your magic on that. |
09:11 | < Reiver> | Uh, OK |
09:12 | < jerith> | You get pretty Excel CSV stuff *and* the power of SQL. |
09:12 | < Reiver> | Alas, the part I'd want to be pretty would be the SQL :) |
09:12 | < jerith> | If you have column heading on the CSV, you can get the rows as dicts. |
09:13 | < Reiver> | OK |
09:13 | < Reiver> | Also at the end of all this it needs to be able to mailMerge into a Word document. |
09:13 | | * Reiver checks what formats that handles too. |
09:13 | < jerith> | So your output is another CSV, populated with all the right values. |
09:14 | < Vornicus> | CSV should be on that list. |
09:14 | < Reiver> | Looks like, right. |
09:15 | < Reiver> | So, uh, once I get things into a manipulable format and know how to input and output, I know the Math without even looking anything up |
09:15 | < TheWatcher[zZzZ]> | Easy, then! |
09:15 | | You're now known as TheWatcher |
09:16 | < Reiver> | How do I go about getting things in, out, and even starting a new Python project?~ |
09:16 | < jerith> | emacs foo.py |
09:16 | | * Reiver will be using IDLE, but |
09:16 | < jerith> | http://docs.python.org/library/csv.html |
09:17 | < Vornicus> | there's a "new file" button in the file menu |
09:17 | | * Reiver does not see one, hits 'save' to see if that works instead. |
09:18 | < Reiver> | yup, good. |
09:19 | < Vornicus> | New Window, actually. :P |
09:20 | | * AnnoDomini looks up, sees a TheWatcher. |
09:20 | < Tamber> | Now /that'll/ make you cut back on the coffee. |
09:20 | < AnnoDomini> | TheWatcher: How easy is it in Perl to implement dynamic arrays? |
09:20 | < Tamber> | Depends on how many chickens you have handy. |
09:21 | < Reiver> | Vornicus: Yeah, I realised that ;) |
09:21 | | * AnnoDomini thinks. |
09:21 | < TheWatcher> | AD: as in, automatically resizing as you add elements? |
09:21 | < TheWatcher> | If so, that's what perl arrays do by default |
09:21 | < AnnoDomini> | Yeah, that would be something I might need. I'm still thinking whether I need it at all. |
09:21 | < AnnoDomini> | Cool. |
09:27 | | * Reiver fiddles. |
09:27 | | * jerith accompanies on the trombone. |
09:28 | < Vornicus> | Yeah, this isn't C. Auto-resizing arrays aren't even worth mentioning on the tin most of the time. |
09:30 | < Reiver> | hooray |
09:30 | < Reiver> | file successfully loaded and displayed. |
09:30 | < jerith> | Python specifically calls that data structure a "list" to differentiate. |
09:30 | < McMartin> | Even C++ does this for free as lon as you use std::vector. |
09:30 | < Reiver> | Now to work out how to rig the rest of the thing. |
09:31 | < jerith> | Well, that and because it can contain heterogenous elements. |
09:32 | < Reiver> | My final goal is a table that is filled with the relevant stats that I can plug into a Word mail merge, to get nicely formatted statblocks. |
09:33 | < Reiver> | Half of the data in this will be derived from the base list and the sizeMod csv I have loaded, the other half will be manual-entry (Including bits of text). |
09:37 | | * Reiver hns, handcrafts his three data sets to get his head around the final case |
09:47 | < Reiver> | haet |
09:50 | | Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code |
09:50 | | * TheWatcher fingertappite |
09:50 | | * TheWatcher eyes his fingers |
09:51 | < TheWatcher> | You know, I was thinking of coding, but given how shit my typing appears to be this morning, I'm not sure that's a good idea. |
09:51 | < Tamber> | It's okay, you use Perl, nobody'll be able to tell the difference. |
09:51 | | * Tamber ducks. :p |
09:51 | < TheWatcher> | Actually, I'm using c++ :P |
09:52 | < Tamber> | Oh, in that case, might be an idea to avoid it. |
09:53 | | Vornicus is now known as Vornicus-Latens |
09:58 | < Reiver> | Oops, haha |
09:58 | < Reiver> | The pastie does not have the same places for tabs, so that rather ruined my impromptu table rather badly. ^.^ |
09:59 | < AnnoDomini> | $currentroll =~ s/\+/\s/ig; <- Will this replace plusses with spaces? |
10:00 | < TheWatcher> | You don't need the /i flag, and I'd suggest not using \s in the replacement, so .. =~ s/\+/ /g; |
10:01 | < TheWatcher> | (the i is case insensitive, which is kinda pointless with +, and \s is a character class for all whitespace -rather than just a space- and while it should insert a space in the replacement, I wouldn't rely on it) |
10:02 | < TheWatcher> | (also, if this is being called in a loop at all, you might want to stick the 'o' flag on the end (s/\+/ /go;) so that it doesn't recompile the regexp each time through the loop) |
10:04 | < AnnoDomini> | Is recompiling every time through the loop bad? |
10:06 | < AnnoDomini> | Also, how would I count how many occurrences of a substring are in a string? |
10:07 | < TheWatcher> | my @matches =~ /substring/; print "Matches: ",scalar(@matches),"\n"; is one way |
10:08 | < AnnoDomini> | There's no counting function? |
10:09 | < Reiver> | How do you reference into a dict? Is there any way to name the things? |
10:10 | < TheWatcher> | and recompiling in a loop is wasteful, and if you have a lot of data to work on it can cause noticable slowdown. You can't make all regexps compile only once (the 'o' flag there) for various reasons, but if you have a simple regexp like tha tyou may as well use 'o'. |
10:10 | < AnnoDomini> | I'm not sure I understand your matching example. I have like a string of numbers, and I want to count how many times a certain number shows up. |
10:10 | < Reiver> | Come to think of it, can dicts be prettyprinted, or does the whitespace within affect anything? |
10:11 | < TheWatcher> | AD: how are the numbers delimited? |
10:11 | < AnnoDomini> | Spaces. |
10:12 | | shade_of_cpux is now known as cpux |
10:15 | < Reiver> | So hey, Python |
10:15 | < Reiver> | When I tell it to print a row of csv, I get something like ['Large', '2', '-1', '-1', '4', '1', '2', '3', '-1', '3'] |
10:15 | < TheWatcher> | Okay, you can do something like: my @matches = $string =~ /\b$number\b/g; my $count = scalar(@matches); the \b is a boundary (it'll match start, end, and spaces, and some others), the $number contains the number you want to look for, $string contains the string you want to search through. The regexp will file all occurances of $number in $string and place them in the @matches array |
10:15 | < TheWatcher> | Oh, wait |
10:16 | < TheWatcher> | you could just do |
10:16 | < Reiver> | 1) This is a dict, yes? 2) This is how I want to construct rows to write out, yes? 3) How do I access particular data points inside the dict, eg being able to add 3 to the '4' up there? |
10:17 | < Reiver> | Or is this where I throw the thing into an internal SQL table and get on with it there? |
10:17 | < TheWatcher> | actually, no, that'd just be confusing you - that will be a sane enough method. |
10:18 | < froztbyte> | Reiver: list, not a dict |
10:18 | < Reiver> | froztbyte: Righto |
10:18 | < Reiver> | Is there any particular way to modify stuff inside a list? |
10:18 | < AnnoDomini> | Okay, thanks. |
10:18 | < froztbyte> | a dict is {'foo':'bar', 'bar':'meh'} |
10:19 | < froztbyte> | Reiver: list.insert and list.remove |
10:19 | < jerith> | Reiver: You want DictReader(), which assumes the first row is headings. |
10:19 | < jerith> | Unless you have to provide the headings. I forget. |
10:19 | < froztbyte> | the standard lib's csv module is a bit meh |
10:20 | < jerith> | Reiver: You can set elements as well. |
10:20 | | Kazriko [kaz@Nightstar-5badc7ed.client.bresnan.net] has quit [[NS] Quit: Leaving] |
10:21 | < jerith> | foo = [1, 2, 3]; foo[1] = 'blah' # => [1, 'blah', 3] |
10:21 | < froztbyte> | jerith: does DictReader allow you to arbitrarily read stuff at any time? |
10:21 | < jerith> | It reads one row at a time, but returns a dict rather than a list. |
10:22 | < froztbyte> | the quick code I bashed together the other day to parse my 3G bandwidth usage just iterated over the csv to populate a list and then worked with that |
10:22 | < froztbyte> | jerith: mm |
10:24 | < jerith> | It's a fairly simple implementation. |
10:26 | | Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Connection closed] |
10:40 | < Reiver> | Ooh, I can has headings? |
10:41 | < jerith> | You can has headings. |
10:41 | < Reiver> | I need to master these lists, then, that would be perfect. |
10:42 | < jerith> | In [3]: for row in csv.DictReader(StringIO("a, b\n1, 2\n3, 4\n")): print row ...: |
10:42 | < jerith> | {'a': '1', ' b': ' 2'} |
10:42 | < jerith> | {'a': '3', ' b': ' 4'} |
10:42 | < jerith> | Um, formatting fail. |
10:43 | < jerith> | In [4]: print [row for row in csv.DictReader(StringIO("a, b\n1, 2\n3, 4\n"))] |
10:43 | < jerith> | [{'a': '1', ' b': ' 2'}, {'a': '3', ' b': ' 4'}] |
10:43 | | Kazriko [kaz@31356A.679E64.986B00.962247] has joined #code |
10:44 | < jerith> | The first row is treated as column headings, and used as the keyset in the dicts. |
11:08 | < Reiver> | OK, and how would I enter data into it? |
11:24 | | Attilla [Some.Dude@Nightstar-92c9199f.cable.virginmedia.com] has joined #code |
11:46 | | Kindamoody is now known as Kindamoody|out |
12:05 | | Kindamoody|out is now known as Kindamoody |
12:48 | | Reiver [orthianz@9C034E.E649EA.3194C7.8381A3] has quit [Ping timeout: 121 seconds] |
12:53 | | Reiver [orthianz@9C034E.E649EA.3194C7.8381A3] has joined #code |
13:27 | | kt_hhhh [NSwebIRC@ED3168.020B2E.40EF55.D05D49] has joined #code |
13:27 | | kt_hhhh [NSwebIRC@ED3168.020B2E.40EF55.D05D49] has quit [[NS] Quit: Page closed] |
14:48 | | Kindamoody is now known as Kindamoody|out |
15:02 | | celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has joined #code |
15:11 | | You're now known as TheWatcher[afk] |
15:11 | | Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code |
17:50 | | Reiver [orthianz@9C034E.E649EA.3194C7.8381A3] has quit [Connection reset by peer] |
17:50 | | Reiver [orthianz@9C034E.E649EA.3194C7.8381A3] has joined #code |
18:02 | | Stalker is now known as Dinosaurs |
18:03 | | AnnoDomini is now known as Birds |
18:30 | | You're now known as TheWatcher |
18:52 | | SmithKurosaki [smith@4FC299.382CB9.EF1529.A5B039] has joined #code |
19:01 | | Vornicus-Latens is now known as Vornicus |
20:31 | | Phox is now known as CleaningPhox |
21:19 | | Vornicus is now known as Finerty |
21:52 | | Kindamoody|out is now known as Kindamoody |
21:58 | | Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Connection closed] |
22:18 | | Birds is now known as AnnoDomini |
22:34 | | Kazriko [kaz@31356A.679E64.986B00.962247] has quit [[NS] Quit: Leaving] |
22:43 | | AbuDhabi [annodomini@D553D1.41311B.C16AE1.15A9C7] has joined #code |
22:44 | | AnnoDomini [annodomini@D553D1.41311B.346302.F9D08F] has quit [Ping timeout: 121 seconds] |
22:52 | | AbuDhabi [annodomini@D553D1.41311B.C16AE1.15A9C7] has quit [[NS] Quit: Zzz.] |
23:34 | | You're now known as TheWatcher[T-2] |
23:36 | | You're now known as TheWatcher[zZzZ] |
23:45 | | celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] |
23:54 | | Rikushadow5 [DSD@Nightstar-57019f84.int.bellsouth.net] has joined #code |
23:57 | | simon_ [simon@Nightstar-a12ff716.gjk.dk] has joined #code |
23:59 | < simon_> | hmm, so I'm going to choose N random numbers in the interval 0..M, and I want a deterministic solution. I thought of choosing one number A, then choosing another A' to calculate B = A+A'. I'll know A != B so long as M != N, but choosing a third number C the same way, it could end up as either A or B. |
--- Log closed Mon May 02 00:00:10 2011 |