code logs -> 2011 -> Mon, 09 May 2011< code.20110508.log - code.20110510.log >
--- Log opened Mon May 09 00:00:58 2011
00:41 Vash[Decorating] is now known as Vash[Out]
02:09 Stalker [Z@2C3C9C.B2A300.F245DE.859909] has quit [Client closed the connection]
02:09 Stalker [Z@2C3C9C.B2A300.F245DE.859909] has joined #code
02:18 Kindamoody is now known as Kindamoody[zZz]
02:25 Attilla_ [Some.Dude@Nightstar-febccc15.cable.virginmedia.com] has quit [Ping timeout: 121 seconds]
02:28 gnolam [lenin@9D46A2.F4E9D7.E4B4CF.2072AD] has quit [[NS] Quit: Z?]
04:12 Vash[Out] is now known as Vash
04:19
< McMartin>
C#: Actually a reasonable sensible language so far, though it permits things I wish they'd forbid~
04:20
< Vornicus>
heh
04:23
< McMartin>
Biggest crime so far: defaulting to nonvirtual inheritance a la C++, but at least actually *using* that is now a compiler warning
04:33 Syloqs-AFH [Syloq@NetworkAdministrator.Nightstar.Net] has quit [[NS] Quit: ]
04:36
< celticminstrel>
There are cases where it's desirable, aren't there?
04:36
< celticminstrel>
Though I can't think of one.
04:37
< McMartin>
Nonvirtual methods have their place - they're much easier to optimize - but nonvirtual overrides I can think of no reason to want.
04:40
< celticminstrel>
Inheritance, not overrides...
04:40
< ToxicFrog>
Remind me what nonvirtual inheritance is?
04:41
< McMartin>
Which method gets called is determined by the type the variable referenced is declared as, not the type the variable referenced actually is.
04:41
< ToxicFrog>
Oh.
04:41
< McMartin>
class A { void foo() { ... } }; class B : public A { void foo() { ... } };
04:41
< McMartin>
A a = new B(); a.foo(); calls A::foo().
04:42
< McMartin>
Er, A* a, rather
04:42
< McMartin>
And a->, etc.
04:42 * Namegduf hates overriding anyway
04:42
< McMartin>
If foo were virtual in those cases, a->foo() would instead call B::foo() as God and Steve intended.
04:42 * ToxicFrog ods
04:42 * ToxicFrog nods, too
04:43
< McMartin>
Namegduf: Inheritance is generally overused, yes.
04:43
<@Namegduf>
Inheritance isn't super, but overriding is a particularly painful for maintenance use of it
04:43
< ToxicFrog>
(this raises a question I hadn't really thought about before: in what circumstances is nonvirtual inheritance desireable? Why does it exist?)
04:43
< McMartin>
Generally speaking, if you don't need to override something, you don't need to inherit.
04:44
< McMartin>
You can simply compose.
04:44 Syloqs_AFH [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code
04:45 Syloqs_AFH is now known as Syloqs-AFH
04:45
< McMartin>
(It exists as a sideeffect of nonvirtual methods. Nonvirtual methods are indistinguishable from C-style function calls, and can be trivially branch-predicted with 100% accuracy. Virtual either can't be predicted or require extremely precise pointer information to get reasonably accurate, because it's "load this value, load this offset from that value, jump that value."
04:46
< ToxicFrog>
(right, my question reduces to "why do nonvirtual overridable methods exist", and the answer appears to be "performance")
04:46
<@Namegduf>
Yeah.
04:46
< McMartin>
(Pretty much, with a side of "they date from back when we didn't know what we were doing")
04:46
<@Namegduf>
Overriding a non-virtual method seems silly.
04:46
< McMartin>
(And "programmers are sociopaths and have aneurysms whenever a compiler tells them no")
04:47 cpux is now known as shade_of_cpux
04:47
< celticminstrel>
...that's not non-virtual inheritance, that's non-virtual methods.
04:48
< celticminstrel>
At least, when I hear "non-virtual inheritance" I instantly think about the meaning virtual has when applied to a base class in C++.
04:53
< McMartin>
Oh
04:53
< McMartin>
Right
04:53
< McMartin>
I keep forgetting that kind of "virtual" exists.
04:53
< McMartin>
It can die in a fire~
04:53
< McMartin>
C# dodges that one the same why Java does - by disallowing multiple inheritance entirely.
04:56
< celticminstrel>
Eh, but I like multiple inheritance...
04:57
< McMartin>
Enough has gone wrong or at least arbitrary with every implementation I've seen that I'm not convinced it's philosophically coherent.
04:57
< McMartin>
The main problem with multiple interface inheritance, C# solves trivially in a way that Java needs to copy. =P
04:58
< McMartin>
(If you implement two interfaces with a name conflict, both names go to the same function. C# additionally lets you select different overrides depending on which type "this" is at the moment, which is *like* the nonvirtual override case but is more "segregate implementations of the side bits")
05:06
< ToxicFrog>
(What happens if the signatures conflict? And how does Java handle this?)
05:08
< Vornicus>
In Java, C++, and C#, identically-named functions with different signatures are different functions.
05:08
< Vornicus>
http://download.oracle.com/javase/6/docs/api/java/io/FileOutputStream.html <--- which is why this thing has 5 constructors.
05:10
< ToxicFrog>
Vornicus: yes; I was thinking more things like "Interface A declares int foo(); interface B declares void foo(); class C purports to implement both"
05:10
< ToxicFrog>
Since AFAIK none of those languages permit overloading on return type (Java and C++ certainly don't)
05:11
< Vornicus>
ah. that would be different. ...do I have a java sdk installed? I can science if so...
05:11
< celticminstrel>
The JVM does.
05:11
< celticminstrel>
But the compiler doesn't.
05:11
< celticminstrel>
Permit overloading on return type, I mean.
05:12
< celticminstrel>
Or so I heard awhile ago.
05:20 * Reivles is uncerimoniously dumped in a corner.
05:20
< McMartin>
I suspect that ought to be a compiler error, yeah.
05:23
< Vornicus>
Reivles: Got time to fiddle with your code-shaped thing?
05:24
< Reivles>
I do, at least for a little while. :)
05:24
< Vornicus>
All righty.
05:25
< Reivles>
So!
05:25
< Reivles>
Tell me how to bend this thing to my will
05:25
< Vornicus>
So last time we built ourselves a function that took the name of a csv file, and the name of a heading in that file, and produced a dictionary of dictionaries that are that data.
05:25
< Reivles>
Yes indeed
05:25
< Vornicus>
Now there's an interesting problem here that is common to simple database interfaces.
05:25
< Reivles>
And I admitted what had thrown me was the hashing trick, which was admittedly pretty clever.
05:26
< Reivles>
Yus?
05:27
< Vornicus>
To demonstrate it, open your python file with that function in it, and replace your test line with: print size_table["Tiny"]["DexMod"] + size_table["Tiny"]["StrMod"]
05:29
< Reivles>
It's going to spit out text, isn't it
05:29
< Vornicus>
It's spitting out text.
05:29
< Vornicus>
So now we're going to fix that.
05:30
< Reivles>
yus
05:30
< Reivles>
DO EET
05:31
< Reivles>
is not a command. What a shame.
05:31
< Vornicus>
Now, clearly, some things we want turned into numbers. Others we might want turned into, say, booleans, or floating point numbers, or complex numbers, or or or.
05:32
< Vornicus>
So what we're going to do is add a "schema" argument to our database-building function; it will take a default parameter that is an empty dictionary.
05:33
< Reivles>
OK
05:35
< Vornicus>
Then for each row we'll walk through the schema and apply its changes. We'll talk about what those changes are, precisely, and what the schema looks like, shortly.
05:36
< Reivles>
So this is the Python equivalent of typecasting, being done in bulk to each row?
05:36
< Vornicus>
For now let's see that definition line. The original looked like this: def csv_database_reader(filename, key):
05:37
< Vornicus>
After a fation.
05:37
< Vornicus>
fashion.
05:38
< Vornicus>
We're just going to add that argument in there, with the default value too. Know how to do that?
05:43
< Reivles>
(filename,key,schema = defschema)
05:45
< Vornicus>
well, just {}, instead of defschema, but yeah.
05:46
< Vornicus>
Anyway. Let's talk about the schema.
05:46
< Vornicus>
The schema, in this case, maps keys to functions that convert values into the appropriate form.
05:47
< Reivles>
{text, int, int, int} style things?
05:47
< Vornicus>
That sort of thing, yes.
05:48
< Vornicus>
We have to tell it things though: what's the name of each key we wish to change?
05:49
< Vornicus>
Here's mine, though crushed into a single line. schema = {"DexMod": int, "StrMod": int, "SizeMod": int, "NA": int}
05:49
< Vornicus>
We don't have to tell it everything.
05:49
< Reivles>
... haha, that's pretty nifty
05:50
< Vornicus>
Now that we've built ourselves that schema, let's get in there and apply it.
05:53
< Vornicus>
So obviously this has to apply to each row; we should, also, apply it before we extract the key from the row, because that way the key, too, will be in the correct format.
05:53
< Reivles>
I didn't realise the key was compatable
05:53
< Reivles>
I thought the keys were all text?
05:54
< Vornicus>
The keys are all text, in this case.
05:54
< Vornicus>
Inothers it will not be.
05:55
< Vornicus>
--er, I should be clear. when I'm saying "keys" here I'm talking about "Tiny", not "DexMod"
05:55
< Vornicus>
the latter I shall call "field names" or something.
05:56
< Vornicus>
Anyway: our schema maps field names to functions; now we must apply these on each row.
05:57
< Vornicus>
So just after our "for" line, we'll put another, that iterates over the items in schema. for k, f in schema.iteritems():
06:00
< Vornicus>
and then we're just going to replace, in-place, the values: row[k] = f(row[k])
06:01
< Vornicus>
Once those two lines are in t (I gave you both of htem because the first one requires a function that you haven't seen and the second one is not precisely as intuitive as I might like) and you've got your schema and have told the database reader to use i, try running the script again.
06:02 Stalker [Z@2C3C9C.B2A300.F245DE.859909] has quit [Ping timeout: 121 seconds]
06:06
< Reivles>
k, f?
06:07
< Vornicus>
k and f in this case take the fieldname and function from each pair in the schema: they'll be "DexMod" and int at some point.
06:07
< Reivles>
Funky. I think.
06:07
< Reivles>
And when you say just after the for line, am I indenting before the currentKey = row part?
06:07
< Reivles>
Or after that loop has done its duty but before the return db?
06:08
< Vornicus>
Before the
06:08
< Vornicus>
That's not the paste button.
06:08
< Vornicus>
before the currentKey = row part.
06:09
< Reivles>
OK
06:09
< Reivles>
yay nested for loops~
06:10
< Vornicus>
Yay!
06:12
< Vornicus>
So at this point that function is pretty well complete. I could reasonably imagine throwing something more fancy together but that would wait until it needs publishing.
06:14
< Vornicus>
Next up is the dirty work: you need to get your critter database together, and you need to figure out what you need to glom together with what to figure out your answers.
06:15
< Reivles>
Right.
06:16
< Reivles>
A thought on the critter database - I intend to have ~4 columns for attack types (Because even with dragons I can't think of anything that wants more than that - bite, claw, wing, tail); I know this is naughty and really wants to be a one-to-many table, but that'll just be a headache in this kind of setup, yes?
06:17
< Vornicus>
It can be a headache, yes.
06:19
< Reivles>
In that case, is our schema able to cheerfully handle empty fields?
06:20
< Vornicus>
After a fashion. csv's dictreader I think dumps None in there if it's missing.
06:21
< Vornicus>
But cross that bridge when you actually have errors in front of you to handle. Trying to design around as-yet-unknown errors is more difficult than it's usually worth.
06:22
< Reivles>
OK
06:23
< Vornicus>
Knuth's famous disclaimer applies to this situation.
06:23
< Reivles>
?
06:24
< Vornicus>
"Beware of bugs in the above code; I have only proved it correct, not tried it."
06:24
< Vornicus>
You don't know what kind of shit will go down until it does.
06:25
< Vornicus>
(also I like this one: "The whole thing that makes a mathematician's life worthwhile is that he gets the grudging admiration of three or four colleagues.")
06:26
< Reivles>
Righto~
06:27
< Reivles>
Reminds me of the infamous case of one of my lecturers, who got an error in his programming wrong in missing a needed +1 in the alograthm he was summarising: "I'm a mathmatician, not an accountant!"
06:27
< Vornicus>
Heh
06:28
< ToxicFrog>
Heh
06:28
< ToxicFrog>
My dad's version is "I'm a mathematician; I don't do arithmatic."
06:28
< Reivles>
But anyway, was just checking, because there -will- be blank fields in this, so that's OK
06:29
< Vornicus>
Yeah, I think we might need to change some stuff up there but I'm not sure how it goes yet.
06:29
< Vornicus>
I'm a math teacher, so a great deal of what I do is arithmetic.
06:31
< Reivles>
carry on then
06:33
< Vornicus>
But: get to the point where you have a sensible amount of data to work with, with blanks and a variety of other stuff.
06:33
< Vornicus>
Then we'll deal with whatever we need to, you know, Do.
06:33
< Reivles>
OK.
06:34 * Reivles fiddles with getting his base and critters statted out, at least some.
06:36 UndeadAnno [annodomini@D553D1.41311B.77F236.FFFE2E] has joined #code
07:05 You're now known as TheWatcher
07:07 Kindamoody[zZz] is now known as Kindamoody
07:07 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has joined #code
07:07
< Reivles>
Haha.
07:07
< Reivles>
...Clever girl.
07:08 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:08
< Reivles>
critter.csv: http://pastebin.starforge.co.uk/465
07:14 * Reivles ponders how to do the base.csv. He does actually have a desire to put in the raw ability stats, as they hold information that is not stored in modifiers (str 19 vs str 18, f.ex)
07:14
< UndeadAnno>
Store everything in raw ability scores, use getters to retrieve the modifier?
07:15
< Reivles>
I could indeed do that; it's just notable that I've not bothered, uh, anywhere else (My size modifier has +4 str for Large, f.ex, as that's the modifier that gets shoved everywhere)
07:17
< Reivles>
I could simply store Raws and then Mods, but that's doublehandling of data and my db instincts scream at the very thought.
07:18
< Reivles>
I could also simply record -everything- in Raws and then use a function to figure out the mods attached once in the code, but that seems like unessisary complexity for the sake of consistency.
07:19
< Reivles>
So, hn. 1) Store twice, db principles violated. 2) Store as Raws everywhere, complicate the program. 3) Store Raws for base, modifiers everywhere else, introduce inconsistency.
07:19
< Reivles>
I'm not sure which is the best plan, here.
07:20
< UndeadAnno>
In my Exalted 2e NPC generator, I store archetype definitions in global variables, but store the charsheet template as a text file.
07:25 * UndeadAnno mumbles about White Wolf Editing making NPC sheets from the Storyteller's Companion rather unsurvivable out of the box. Frequently no PDs on exalts who could, and should have them, missing key charms, or having a mess of useless charms.
07:26 * UndeadAnno goes see who will sit in the committee on his thesis defense.
07:28 Rhamphoryncus [rhamph@C06FE3.F5723C.BE3FEB.9D4666] has joined #code
07:42 * Reivles sneaks off to blow up space mareeens.
07:47
< Stalker>
<Reivles> ...Clever girl. <- Whut?
07:48
< Stalker>
Oh, nevermind. I was not in the channel I thought I were.
07:48
< Stalker>
I must be more tired than I thought.
07:56 SmithKurosaki [smith@Nightstar-26c90235.dsl.teksavvy.com] has quit [Ping timeout: 121 seconds]
08:02
< EvilDarkLord>
Reivles: I'd go with 2). You can use helper functions to help with complexity.
08:06 You're now known as TheWatcher[afk]
08:07 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code
08:34 * UndeadAnno finds out who the committee are, plans to learn some questions extra-well - the ones which correlate with the committee's members' areas of expertise.
09:03 Vash is now known as Vash[Sleeping]
09:04 Vornicus is now known as Vornicus-Latens
09:28 Attilla [Some.Dude@Nightstar-febccc15.cable.virginmedia.com] has joined #code
--- Log closed Mon May 09 10:17:04 2011
--- Log opened Mon May 09 10:17:44 2011
10:17 TheWatcher [chris@Nightstar-b4529b0c.zen.co.uk] has joined #code
10:17 Irssi: #code: Total of 24 nicks [1 ops, 0 halfops, 0 voices, 23 normal]
10:18 Irssi: Join to #code was synced in 51 secs
11:11 gnolam [lenin@9D46A2.F4E9D7.E4B4CF.2072AD] has joined #code
11:46 Rhamphoryncus [rhamph@C06FE3.F5723C.BE3FEB.9D4666] has quit [Client exited]
14:06 Kindamoody is now known as Kindamoody|out
14:27 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Connection closed]
14:29 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds]
14:46 Vash [Vash@Nightstar-c40d5984.sndg02.sbcglobal.net] has joined #code
14:46 Vash[Sleeping] [Vash@DCDEB4.EE4823.60FBD5.24F5B1] has quit [Client closed the connection]
14:50 You're now known as TheWatcher[afk]
--- Log closed Mon May 09 15:19:51 2011
--- Log opened Mon May 09 15:19:59 2011
15:19 TheWatcher[afk] [chris@Nightstar-b4529b0c.zen.co.uk] has joined #code
15:19 Irssi: #code: Total of 22 nicks [1 ops, 0 halfops, 0 voices, 21 normal]
15:20 Irssi: Join to #code was synced in 49 secs
15:22
< Vornicus-Latens>
Store Raws Everywhere
15:22
< Vornicus-Latens>
they include all the data you need to reconstruct the rest.
15:23
< Vornicus-Latens>
You don't want to store them twice, obviously. Inconsistency here is considerably more complicated than the very simple raw -> modifier conversion.
15:31 kwsn [NSwebIRC@0E1868.C3C901.AE3970.13CA39] has joined #code
15:31 * kwsn can sum up her coding skills with a resounding MEH
15:31
< kwsn>
>_<
15:31
< Tamber>
I can do better. Mine are summed up as "WTF?"
15:32
< kwsn>
heh
15:32
< kwsn>
i've had two programs this semester get completely re-written cause they were wrong apparently
15:33
< Tamber>
Oh dear.
15:36
< Reivles>
Vorn: Alright.
15:36
< Reivles>
It just seems rather wasteful, 'tis all~
15:37
< Vornicus-Latens>
Not really.
15:37
< Reivles>
The Raws are only actually being used as raws in precisely one location: "STR 19, Dex 17," etc.
15:37
< Reivles>
Everywhere else, all that's being manipulated and recorded is the modifiers.
15:37
< kwsn>
also Vornicus-Latens, when i come on to the nigthstar site... the last thing i want to see is an ad for dating >_<
15:38
< Reivles>
Were it not for the ability for the Raws to have an odd number, they'd be superfluous entirely~
15:38
< Reivles>
haha.
15:38 Stalker [Z@26ECB6.A4B64C.298B52.D80DA0] has joined #code
15:38
< Vornicus-Latens>
kwsn: wtf
15:38
< UndeadAnno>
kwsn: Use AdBlock?
15:38
< kwsn>
school computer
15:38
< UndeadAnno>
Use AdBlock.
15:38
< kwsn>
not allowed to really mess with it :/
15:38
< kwsn>
again
15:38
< Vornicus-Latens>
gneh. kvetch at #nightstar, I don't have any control over the website, let alone the ads that appear there.
15:39
< Vornicus-Latens>
(though I will say that Nightstar has a /lot/ of people who met here and hit it off.)
15:39 * Vornicus-Latens goestowork.
15:39
< UndeadAnno>
School computers must be in the domain of capitalist fascists everywhere but here.
15:40
< gnolam>
Howso?
15:40
< UndeadAnno>
I mean, if I wanted to format the hard drive on my Uni computer, I could do so.
15:40
< UndeadAnno>
I could do it and nobody would care.
15:40
< Vornicus-Latens>
UndeadAnno: I suspect the techs in the open computer lab would complain.
15:40
< kwsn>
UndeadAnno: by "school computer" i mean computer in the computer lab
15:40
< UndeadAnno>
The admins would just restore it at the end of the day from backup. They restore every computer from backup every month or so.
15:41
< kwsn>
not a laptop that I can check out and use myself
15:41
< UndeadAnno>
I'm talking about my computer labs.
15:41
< kwsn>
you're also implying i have admin access to reformat it
15:41
< kwsn>
i don't
15:41
< UndeadAnno>
What system?
15:41
< kwsn>
so don't suggest I do anything else to it cause i will not
15:41
< Reivles>
He is implying that his computer labs let everyone have admin access.
15:41
< kwsn>
:)
15:42
< UndeadAnno>
Reivles: Pretty much.
15:42
< Reivles>
He is shaking his head at your problem, not proposing a solution. :P
15:42
< UndeadAnno>
The admin account uses a login/pass combo of admin/admin, for chrissakes.
15:43
< Reivles>
Though speaking of, I'll note our freedoms on the lab machines at our uni got somewhat curtailed after someone custom-wrote and installed a botnet and used it to launch a DDoS attack on the universities bandwidth.
15:43
< UndeadAnno>
And these computers run Windows, so getting root access is even easier than getting root access to a Linux machine you have hardware access to.
15:43
< Reivles>
s/on/with/
15:43
< kwsn>
yeah... they block most IRC ports unless you go through webirc
15:45
< UndeadAnno>
We have multiple networks at my Uni. There's the city-funded hotspot, which allows only port 80. There's the computer lab wifi that allows anything. And then there's the academic wifi that you need to sign up to that allows anything.
15:45
< gnolam>
UndeadAnno: ...
15:45
< kwsn>
UndeadAnno: where did you go?
15:45
< Reivles>
Europe.
15:45
< Reivles>
They let you smoke pot there, too.
15:45
< UndeadAnno>
Technical University of Koszalin.
15:45
< kwsn>
yeah, this is a college that has 7k undergrads in a city of 10k
15:46
< Reivles>
That is not likely to be significant, I suspect.
15:46
< kwsn>
it's a public uni mind you, just it's the only reason this town is really on the map xD
15:47
< UndeadAnno>
The computer lab computers are utter crap. I suspect somebody is stealing the RAM, which is easy enough.
15:47
< UndeadAnno>
gnolam: Why the ellipsis?
15:48
< gnolam>
The admin/admin bit.
15:48
< UndeadAnno>
That's pretty much required to do some of the classes.
15:49
< UndeadAnno>
SQL Server tends to not work unless you're logged in as admin.
15:49
< gnolam>
Then They're Doing It Wrong.
15:49
< gnolam>
Or rather, They're Doing IT Wrong.
15:49
< UndeadAnno>
Hehe.
15:51
< kwsn>
yeah we don't have those issues xD
15:53
< UndeadAnno>
How would the tech staff even know you installed anything unless you tell them?
15:53
< UndeadAnno>
Do they check every computer?
16:05 * kwsn shrugs
16:05
< kwsn>
i'm still not doing it, stop trying
16:05
< UndeadAnno>
Nevar! :E
16:09 celticminstrel [celticminst@Nightstar-f8b608eb.cable.rogers.com] has joined #code
16:16 celticminstrel [celticminst@Nightstar-f8b608eb.cable.rogers.com] has quit [Connection closed]
16:17 celticminstrel [celticminst@Nightstar-f8b608eb.cable.rogers.com] has joined #code
16:20
< gnolam>
UndeadAnno: most of our departments have Adblock installed by default for their users.
16:20
< gnolam>
And forget about admin access.
16:21
< UndeadAnno>
You mean, legitimate admin access.
16:21
< gnolam>
All kinds.
16:22
< gnolam>
Even on the few Windows machines.
16:23
< UndeadAnno>
I am dubious. Hardware access to machines implies that sooner or later, those machines will become compromised.
16:23
< Tarinaky>
"easier than getting root access to a Linux machine" << UndeadAnno: Is this a Linux machine with an EncryptedFS or one without and GRUB as the bootloader?
16:25
< UndeadAnno>
Tarinaky: I dunno. I recall hacking into a high school computer running Linux (don't remember the distro, was something silly) using alta-vista'd instructions.
16:26
< Tarinaky>
If the disk is encrypted it doesn't work.
16:27
< Tamber>
Of course, it would depend on how competent the admin who set the boxen up is.
17:13 You're now known as TheWatcher
17:24 cpux [chatzilla@Nightstar-c978de34.dyn.optonline.net] has joined #code
17:25 shade_of_cpux [chatzilla@510B1D.8D602E.9FE2BE.9FAE21] has quit [Ping timeout: 121 seconds]
17:25 cpux is now known as shade_of_cpux
17:26 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code
17:39
< kwsn>
"PSN - Pretty Secure Network" -guy in the lab
17:40
< UndeadAnno>
Luil.
17:51 kwsn [NSwebIRC@0E1868.C3C901.AE3970.13CA39] has quit [[NS] Quit: moo]
18:23 Vashicus [Vash@Nightstar-c40d5984.sndg02.sbcglobal.net] has joined #code
18:23 Vash [Vash@Nightstar-c40d5984.sndg02.sbcglobal.net] has quit [Client closed the connection]
19:00 Vornucopia [NSwebIRC@C888DE.7F9621.DD23F2.76DFF6] has joined #code
19:31
< McMartin>
-_-
19:31
< McMartin>
http://i.imgur.com/jv24s.jpg
19:33
< Vornucopia>
...yep.
19:47 Reivles [orthianz@9C034E.E649EA.3194C7.8381A3] has quit [Client closed the connection]
19:47 Reiver [orthianz@9C034E.E649EA.3194C7.8381A3] has joined #code
20:11
< ToxicFrog>
...
20:24 Kindamoody|out is now known as Kindamoody
20:35 SmithKurosaki [smith@Nightstar-26c90235.dsl.teksavvy.com] has joined #code
20:37 Roscoe [glorfinstei@7B053D.A8C3DD.BB9A3B.B84FB2] has joined #code
20:38
< TheWatcher>
Now, about learning Perl~
20:38
< Vornucopia>
Heee
20:41
< Roscoe>
wut
20:41
< McMartin>
Perl is TheWatcher's language of choice, and it's famous for being write-only
20:41
< Roscoe>
What's that mean?
20:42
< jerith>
You can write it, but you can't read it again.
20:42
< McMartin>
"Such a mess that it becomes incomprehensible babblings of the King in Yellow immediately after set down"
20:42
< Vornucopia>
You write it, and then 3 months later you look at it and go "How much of Hunter S. Thompson's luggage did this guy go through anyway"
20:42
< Roscoe>
I thought that was only when Kaura wrote it.
20:42
< McMartin>
In fairness, I have seen TW's Perl code and it is actually quite clean.
20:43
< jerith>
Larry Wall, who invented Perl, is a linguist.
20:43
< McMartin>
TW is the only man on Earth for which this is true.
20:43
< Roscoe>
...interesting.
20:43
< Roscoe>
...wait
20:43
< Roscoe>
what kind of linguist.
20:43
< jerith>
The language is designed to make it easy to write short bits of code fast.
20:43 Vornucopia [NSwebIRC@C888DE.7F9621.DD23F2.76DFF6] has quit [[NS] Quit: Page closed]
20:44 Vornucopia [NSwebIRC@C888DE.7F9621.DD23F2.76DFF6] has joined #code
20:44
< Vornucopia>
Whups.
20:44
< jerith>
It's certainly possible to write clean, readable Perl.
20:44
< TheWatcher>
Just that most people don't
20:44
< McMartin>
Anyway, Ros: http://docs.python.org/tutorial/index.html is probably a place to start reading about Python. (Ignore the 3.x stuff; Python 3 Isn't Done Yet despite being released)
20:44
< jerith>
It's rare, because the language design encourages the use of shortcuts and implicit magic.
20:44
< Roscoe>
My question is this: Why do I want to learn to code?
20:44
< McMartin>
I don't know. Why do you think you do?
20:45
< Roscoe>
To make IF.
20:45
< jerith>
Roscoe: So that you can make machines do your bidding with fewer intermediaries?
20:45
< McMartin>
Hm. Which aspect of that is the part you care about?
20:46
< Roscoe>
The ability to tell stories in novel ways.
20:46
< McMartin>
The "narrative" vs. "simulation" argument gets Very Relevant Very Fast there.
20:46
< Roscoe>
Simulation is fun. The play, the play, the play's the thing.
20:46
< McMartin>
OK, this narrows down your earlier question.
20:46
< Roscoe>
I'd like to be the guy who developed a reasonable form of zero-gravity simulation. I'd like to be the guy who coded the Finn Romanov games more.
20:47
< McMartin>
You were asking about "what math background is necessary" to do coding, and that depends a lot on what it is.
20:47
< McMartin>
Being able to break down a major process into little discrete steps, and keep doing that until you reach individual instructions...
20:47
< McMartin>
... is kind of its own skill and they don't teach it in math class - at least not directly.
20:48
< McMartin>
IF languages can be a little tricky here because there is a much larger framework than usual and it makes no effort to hide; every IF work is really an extension to a core program that knows about things like verbs and objects and turns.
20:48
< jerith>
Fundamentally, programming is an exercise in managing complexity and describing problems in exhaustive detail.
20:48
< jerith>
But it's more fun than it sounds. :-)
20:49
< Roscoe>
Ah, so this is where stage managers go.
20:49
< Roscoe>
Coding = stage manager's graveyard?
20:49
< McMartin>
graveyard, birthplace, day job: take your pick
20:49
< jerith>
No. Stage managers only have to deal with actors.
20:49
< McMartin>
(I was a playwright, thanks~)
20:49
< Vornucopia>
As an occasional stage manager...
20:50
< Vornucopia>
Actors are worse.
20:50
< jerith>
No actors ever matched the arrogance of the machine.
20:50
< jerith>
I pointed spotlights at actors for a while.
20:50
< McMartin>
Roscoe: I guess a better question is:
20:50
< jerith>
Occasionally, I sit in orchestra pits and make noise.
20:50
< McMartin>
"You are feeling inadequate at some task. Which part of it is the part you feel needs practice?"
20:51
< Roscoe>
The part where I know what I need to study.
20:51
< Vornucopia>
Heh.
20:51
< McMartin>
If it's just "breaking stuff down", then it's conceivable that experience with a less intrusive framework may help
20:51
< McMartin>
Well, that means that you can't proceed without study
20:51
< McMartin>
The question then is "at what"
20:51
< McMartin>
You may need to be writing CYOA stuff to work on your narrative side.
20:52
< McMartin>
You may need to design some board games if it's coming up with the mechanics that's the sticking point.
20:52
< Vornucopia>
One of my major difficulties with I7 is that I never seem to have any ideas that I think would make a good game.
20:52
< Vornucopia>
well, a good IF.
20:52
< Roscoe>
Please take some of mine.
20:53
< McMartin>
If you have a playable board game but can't then realize it in a form the machine will accept, then you're at a point where coding skill is actually the sticking point.
20:53
< jerith>
I have setting ideas, but they fall over on the puzzles and plots.
20:53
< Roscoe>
Board games are designed? I thought they were more, um, honed through endless betatesting.
20:54
< jerith>
Battle Stations hasn't been written past an opening scene because I have no idea what to do with the world I have in my head.
20:54
< McMartin>
Roscoe: It has to start somewhere
20:54
< Roscoe>
Find who hurts.
20:54
< McMartin>
Also, yes, there is honing involved.
20:54
< Roscoe>
Well, let me amend that.
20:54
< Roscoe>
Find who hurts and has freedom of action.
20:54
< Roscoe>
Follow this person as they try to Stop Hurting.
20:54
< jerith>
(The setting is awesome. It's Steampunk Wodehouse.)
20:55
< Roscoe>
This is a fairly reliable means of deriving plot from character, and character from setting.
20:57
< jerith>
Captain J E June is a man. The description is "You are Captain J. E. June, commanding officer of [italic type]HMD Indecorous[roman type], the finest pocket dreadnaught in His Majesty's Most Excellent Sky Navy. Your trousers are pressed and your cap is at a stylish angle [italic type]just[roman type] this side of rakish."
20:57
< gnolam>
jerith: that does indeed seem awesome
20:57 * Roscoe recalls designing a variant on Sepoy (itself a 'king and soldiers' game) when he was in his teens.
20:58
< jerith>
Gauges are scenery in the bridge. Understand "dials" as the gauges. The description is "You have only the vaguest of ideas what they all mean. That's what the bridge crew is for."
20:59
< Roscoe>
I see Captain June is of the Modern Major General school of leadership
21:00
< jerith>
The description of the first officer is "Commander Hagglethorpe-Whittington-Jones is the very model of a modern sky-navy senior officer. He cuts an absolutely dashing figure in his precisely tailored uniform and his medals have just the right amount of impressive jangle when he moves."
21:00
< McMartin>
This game clearly needs to be Glulx so that the dictionary may recognize words of sufficient length.
21:01
< jerith>
Understand "commander" and "Hagglethorpe-Whittington-Jones" as the first officer.
21:01
< McMartin>
Yeah, that latter will actually accept /Hagglethor.*/
21:01
< jerith>
Carry out going port: Say "Admiral Lord Sir Henry Frothwinkle-Simmergine the Third would fix you with a disapproving glare and tell you that only effete and decadent navies who cannot tell the difference between 'larboard' and 'starboard' yelled across the deck in a storm use the direction 'port'. You use it anyway."; try going larboard.
21:02
< McMartin>
(I'd probably make them synonyms and then upbraid in a separate "after reading the player's command"
21:03
< jerith>
Battle Stations is my nontrivvial project with which I was learning I7.
21:03
< jerith>
I'm not entirely sure you can do that easily with directions.
21:04
< Vornucopia>
I learned I7 on The Blingtanium Crown.
21:05
< Vornucopia>
Which still stalks the internet somewhere. 6 rooms, a cute little puzzle, and a lot of careful catching.
21:05
< jerith>
Vornucopia: It stalks my if/projects/ directory, too.
21:06
< jerith>
The Marine is a man in the bridge corridor. "A marine stands to attention in front of the bridge hatch, guarding it against the enemy and enlisted men." The description is "All marines look the same to you, although this one has a hint of tarnish on one of his buttons. You make a note to talk to Major Thripwhistle-Brown about the deplorable state of his men."
21:19 * jerith pastebins the entirety of the The Institute (insofar as it exists) from Battle Stations: http://pastebin.starforge.co.uk/466
21:22
< jerith>
I was quite pleased with the little chunk of code that chooses random SCIENCE!!! from the Table of Professorial Activities for the mad scientist to be busy with.
21:22
< McMartin>
> SHOW FOOLS
21:22
< jerith>
I really haven't decided where The Institute fits in.
21:24 Vashicus is now known as Vash[Working]
21:24
< jerith>
I'm thinking you end up there after an altercation with a Dowager Aunt and have to acquire some plot token of appropriate gravitas.
21:25
< Roscoe>
http://chzhistoriclols.files.wordpress.com/2011/05/funny-pictures-history-old-ol d-spice.jpg
21:25
< McMartin>
Would you, at some point, Experience A Gravitas Shortfall?
21:26 Rhamphoryncus [rhamph@C06FE3.F5723C.BE3FEB.9D4666] has joined #code
21:26
< jerith>
Probably, considering the game has Very Little Gravitas Indeed.
21:28
< Roscoe>
...
21:28
< jerith>
Iain Banks' Culture books have some interesting spaceship names.
21:29
< jerith>
Things like "Prosthetic Conscience" and "Anticipation Of A New Lover's Arrival".
21:30
< Vornucopia>
Please tell me someone shouts "the goddess of victory is waving her underpants in your direction!"
21:30
< Vornucopia>
well no that's LOGH, but.
21:30 * Roscoe is still a fan of the "Saucy Mare," the "Three-Legged Puppy," and the "Inevitably Successful in All Circumstances"
21:31
< Vornucopia>
Three-Legged puppy has a sister ship named "lil' brudder"
21:32
< jerith>
One of the other in-universe civilasations criticised the Culture for not naming their uberpowerful ships with sufficient gravitas.
21:32
< McMartin>
Be fair
21:32
< McMartin>
Many of the uberpowerful ships had names like Now Look What You Made Me Do or the Frank Exchange of Views
21:33
< McMartin>
The latter is my favorite~
21:33
< Roscoe>
Where does that ship name come from.
21:33
< McMartin>
It's another Culture ship
21:34
< McMartin>
Alternatley, if that was not your question: it's polite journalist speak for "screaming argument between diplomats"
21:34
< jerith>
I quite like What Are The Civilian Applications?
21:35 * Vornucopia conmmissions a ship named "Dowager Aunt"
21:35
< McMartin>
There is a chapter in... Excession? I think? Where two people have a complete conversation with nothing but ship names.
21:35
< Roscoe>
No, the "Three Legged Puppy"
21:36
< jerith>
Look to Windward maybe?
21:36 * jerith should read those books again.
21:36
< jerith>
Also the ones I didn't get to.
21:41
< Vornucopia>
Time to go.
21:41 Vornucopia [NSwebIRC@C888DE.7F9621.DD23F2.76DFF6] has quit [[NS] Quit: Page closed]
21:45 * gnolam whistles innocently, pretends he didn't just commit broken code.
22:12
< Attilla>
The gods of coding gaze on and despair.
22:15
< Roscoe>
Isn't that from NetHack?
22:18
< Attilla>
NetHack has a lot of things.
22:24
< Roscoe>
Does it have pot?
22:25 * TheWatcher eyes this make output, double-takes as he misreads "Transforming ..." as "Terraforming ..."
22:25
< McMartin>
Watcher, what did we say about using terraforming tools in the build process
22:26
< TheWatcher>
Hey, don't look at me, it's compiling subversion!
22:28
< Tamber>
Using svn certainly feels like you're terraforming... at least, that's the impression I get from the glacial slowness.
22:33 Attilla [Some.Dude@Nightstar-febccc15.cable.virginmedia.com] has quit [Ping timeout: 121 seconds]
22:34 Attilla [Some.Dude@Nightstar-febccc15.cable.virginmedia.com] has joined #code
22:36 * TheWatcher eyes
22:36
< TheWatcher>
For the love of Eris, letting through "conflicting types for built-in function" warnings is just fucking sloppy
22:37 Vash [Vash@Nightstar-c40d5984.sndg02.sbcglobal.net] has joined #code
22:38 Vash[Working] [Vash@Nightstar-c40d5984.sndg02.sbcglobal.net] has quit [Client closed the connection]
22:45 UndeadAnno [annodomini@D553D1.41311B.77F236.FFFE2E] has quit [Ping timeout: 121 seconds]
22:45 Roscoe [glorfinstei@7B053D.A8C3DD.BB9A3B.B84FB2] has quit [Ping timeout: 121 seconds]
22:45
< McMartin>
How is that possibly only a warning
22:47 UndeadAnno [annodomini@D553D1.9D4909.167358.F34FD4] has joined #code
22:47
< TheWatcher>
McM: That's a very good question!
22:49 UndeadAnno [annodomini@D553D1.9D4909.167358.F34FD4] has quit [[NS] Quit: Sleep.]
23:10
< gnolam>
<Attilla> NetHack has a lot of things.
23:10
< gnolam>
<Roscoe> Does it have pot?
23:10
< gnolam>
... that's not what "Bag of Holding" means.
23:35 Stalker [Z@26ECB6.A4B64C.298B52.D80DA0] has quit [Ping timeout: 121 seconds]
23:43 shade_of_cpux is now known as cpux
23:45 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Connection closed]
23:46 celticminstrel is now known as celmin|away
--- Log closed Tue May 10 00:00:41 2011
code logs -> 2011 -> Mon, 09 May 2011< code.20110508.log - code.20110510.log >