code logs -> 2007 -> Sun, 18 Feb 2007< code.20070217.log - code.20070219.log >
--- Log opened Sun Feb 18 00:00:30 2007
00:02 You're now known as TheWatcher[T-2]
00:04 You're now known as TheWatcher[zZzZ]
00:07
< Janus>
Mm... may I ask a question?
00:08
< AnnoDomini>
Only if you want it to be answered.
00:09
< Janus>
I've been using grayscales for land height, but there's a lot of limitations with them... What would be a better way to store/read topography data..?
00:09
<@Vornicus>
What limitations are you facing?
00:10
<@Vornicus>
a 16bit greyscale will help with granularity problems, but few programs can handle them.
00:10
< Janus>
I'd like to use multi-tiered levels, as well as use the ground's slope for the character physics.
00:11
<@Vornicus>
Multi-tiered, like, it has many overlapping floors?
00:11
< AnnoDomini>
Janus: Hm. Maybe a two-dimensional, very forking large array of specialized containers?
00:11
< Janus>
Multiple tiers, like bridges and balconies, would require two grayscales.
00:11
<@Vornicus>
Janus: that would do.
00:11
< gnolam>
Two wouldn't be enough.
00:12
< gnolam>
You'd need at least /three/.
00:12
<@ToxicFrog>
Janus: one approach to this is to make the world a heightmap, and then include bridges, etc as objects in the world.
00:12
< gnolam>
Unless your upper tiers should have thickness 0.
00:12
<@Vornicus>
Well, no, you'd have to have the ability to put multiple heightfields.
00:12
<@ToxicFrog>
This is how SS1 did it.
00:13
<@Vornicus>
Look at how System Shock 1 did it, and also X-Com: Apocalypse.
00:13
< Janus>
Alright, but what about slopes and curves?
00:13
<@ToxicFrog>
I have no idea how X-COM did it.
00:13
<@ToxicFrog>
...slopes and curves should be a natural side effect of the heightmap.
00:13
<@Vornicus>
Slopes you can usually calculate straight from the heightmap.
00:13
<@ToxicFrog>
Assuming a decent interpolation mechanism.
00:13
<@Vornicus>
...if you want to be able to build vertical walls that's a different sack of potatoes.
00:14
< Janus>
True vertical walls would be nice, yes.
00:15
<@Vornicus>
http://vorn.dyndns.org/~vorn/ottdgfx/wholemap2.jpg <--- the only data used for this was a single heightmap, coordinates at the intersections of lines.
00:16
<@Vornicus>
The way SS1 did it was to have each cell have a description for its slope, and an independent height (or multiple heights).
00:17
<@Vornicus>
I imagine that X-Com Apocalypse did it similarly.
00:18
< Janus>
Alright, but wouldn't each cell have to be a uniform size throughout the map?
00:18
<@ToxicFrog>
I still need to play Apoc someway.
00:18
<@ToxicFrog>
*someday.
00:18
<@ToxicFrog>
But I want to finish TFTD first ;.;
00:18
<@Vornicus>
A uniform size on the x-z plane.
00:19
<@Vornicus>
But you're using thousands of them.
00:21
<@Vornicus>
There are, of course, alternatives - you can create a full-on 3d universe, but that is more difficult to work with.
00:21
<@McMartin>
I found Apoc to be seriously underwhelming.
00:22 * Vornicus still can't freaking understand the first one.
00:23
<@Vornicus>
Apocalypse... still has some interface issues, but at least it sorta partially makes sense.
00:24
<@McMartin>
It needs a n00b guide.
00:24
<@Vornicus>
They all need a n00b guide.
00:25 * Janus needs a n00b guide.
00:26
<@Vornicus>
Anyway.
00:27
<@Vornicus>
Depending on what you intend to do, multiple heightmaps or independent cell data might be the way to go.
00:27
<@Vornicus>
Note that both give you slope information without adding additional data.
00:28
< Janus>
I think a full 3d... thing, wouldn't be easy to make anyway. So yeah. And, I suppose I was looking at the slope problem all wrong. Just poll a few places around a point, and figure slope from that, right?
00:29
<@Vornicus>
indeed.
00:29
<@McMartin>
If by "has some interface issues" you mean "one of the modes turns the weakest enemies in the game into an unstoppable Chryssalid swarm", yes.
00:29
<@McMartin>
gg wireless lag
00:30
<@Vornicus>
Well, you get the points at the corners of the cell you're in, and use those to figure out what the slope is.
00:32
< Janus>
Aye. And I think having bridges and circular stuff as seperate objects would solve anything else that the grid couldn't take.
00:32
<@Vornicus>
hmm.
00:32
<@Vornicus>
...I wonder how FF7 handled it.
00:34
< Janus>
Smoke and mirrors, I'd guess.
00:34
<@ToxicFrog>
Vornicus: clipping was full 3d geometry.
00:34
<@Vornicus>
On the overworld? Really?
00:34
<@ToxicFrog>
World was one or more prerendered images at specified Z-depths.
00:34
<@ToxicFrog>
Oh.
00:35
<@Vornicus>
Most of it can be done with heightfields and models.
00:35
<@ToxicFrog>
The overworld is, I think, a heightmap; there's no over-and-under stuff except cities, which are 3d models.
00:35
<@ToxicFrog>
The underwater...I don't know about that.
00:35
<@ToxicFrog>
There's at least one tunnel underwater.
00:35
<@Vornicus>
There's a solid bridge near Nibelheim, and a rope bridge near Wutai.
00:36
<@ToxicFrog>
Models with clipping information.
00:36
<@Vornicus>
hm
00:36
<@ToxicFrog>
Although..
00:36
<@ToxicFrog>
Actually, it doesn't behave much like a pixel-by-pixel heightmap.
00:36
<@ToxicFrog>
Maybe it *is* polygons.
00:37
<@Vornicus>
Maybe it is, but then they're doing some wackywacky shit to make it feel round - the world is really a torus.
00:37
<@Vornicus>
Populous: The Beginning definitely did a heightmap.
00:38
<@ToxicFrog>
Are you sure it's a torus and not a plane with wrapping?
00:38
< AnnoDomini>
P:TB was great.
00:38
<@ToxicFrog>
The latter is definitely how I'd do it.
00:38
< AnnoDomini>
VOLCANO!
00:39
<@Vornicus>
It's a plane with wrapping, but P:TB gave the surface curvature. ISTR FF7 did too, but I don't really recall that well.
00:39
< Janus>
The map is square, so I think it's just a plane.
00:39
<@Vornicus>
...you know what had a great engine?
00:39
<@Vornicus>
Dungeon Keeper.
00:39 * Vornicus said this already once recently, but it seems an appropriate moment.
00:39
<@ToxicFrog>
I don't think it did over-and-under geometry, though.
00:40
<@Vornicus>
It didn't.
00:40
<@Vornicus>
Rooms had ceilings in possess mode, but
00:41 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has quit [Quit: Jouets de Dieu, jouets de jouets, les jouets de me, na?tre Clair enfant voire.]
00:48 * Vornicus ponders.
00:48
<@Vornicus>
Circles vs. heightfields.
00:48
< gnolam>
Hmm?
00:49
<@Vornicus>
A circle is a hard thing to draw on a heightfield and make it look right.
00:49
< gnolam>
Yes.
00:51 * gnolam should really revive his old heightmap projects.
00:58 timelady [~romana@Nightstar-14612.lns7.adl2.internode.on.net] has joined #Code
01:18 * Vornicus greetinates the timelady.
01:19
< timelady>
imhohey vornicus sweet:)
01:20
<@Vornicus>
"imhohey"? That's a word I've never heard before.
01:20
< timelady>
arguing in an ubuntu channel with smeone about why you distupgrade between herds
01:20
<@Vornicus>
aha
01:20
< timelady>
even though its all feisty
01:20
< timelady>
hehe im making up word today
01:34 timelady [~romana@Nightstar-14612.lns7.adl2.internode.on.net] has quit [Quit: run away! run away!]
02:06
< Forj>
would someone with the time to spare take a quick glance over my python code, and pick a few holes in it for me?
02:07 * Vornicus gets out the awl.
02:07
< Forj>
that sounds good
02:07
<@Vornicus>
I have said time.
02:07
< Forj>
only small holes :)
02:07
< Forj>
you want a link, or pm, or what?
02:08
<@Vornicus>
um, DCC I think would be best
02:08
< Forj>
hrm, we'll see if thisplace likes DCC
02:08
<@Vornicus>
ok
02:08
< Forj>
last place we were in, not far from here, disconnected if we tried DCC :S
02:08
<@Vornicus>
suck
02:09
< Forj>
indeed
02:09
< Forj>
it Was Not Useful
02:10
<@Vornicus>
yiboo
02:10
< Forj>
thanks :)
02:10
<@Vornicus>
okay, let's see what we've got here.
02:10
< Forj>
the background is that it is automating event generation for an RPG
02:11
< Forj>
this is just the traps part
02:11
<@Vornicus>
Okay.
02:12
<@Vornicus>
DRY. :(
02:12
< Forj>
sorry :(
02:13
<@Vornicus>
Why do you do this three times like this, anyway?
02:15
<@McMartin>
"DRY"?
02:15
<@Vornicus>
Don't Repeat Yourself
02:15
< Forj>
because I don't know any better? ;)
02:15
< Forj>
I need three separate traps, with cumulative costs
02:16
<@Vornicus>
Then you use a list of traps.
02:16
< Forj>
hrm, yes that would have made sense
02:16
<@Vornicus>
While we're at it, why are you using lists when a class would work better?
02:16
< Forj>
store them in incrementing indexes?
02:17
<@Vornicus>
Indeed. Let me see what I can come up with for improvements.
02:17
< Forj>
cos I looked at the class section in what I'm working my way through, and couldn't get it to work
02:17
< Forj>
so I decided to stick with the basics, get them under my belt first
02:18
< Forj>
don't worry about improving it too much, I'd like to figure out the "how" myself, I just don't necessarily know the "what" yet
02:19
< Forj>
as in "what" I did wrong
02:20
< Forj>
i've only been coding for 3 days
02:22
<@ToxicFrog>
Chalcy got you hooked?
02:22
< Forj>
been hooked for a while, only recently thought of a project with which learn
02:23
<@ToxicFrog>
Aah.
02:23
<@ToxicFrog>
If you ever need projects I have a few, but they aren't in python and would be kind of throwing you into the deep end~
02:23
<@ToxicFrog>
(which is itself infested with things with far too many teeth)
02:24
< Forj>
yeah, I can't see myself getting that involved with coding, not exactly a relevant field to my career ;)
02:24
< Forj>
always fascinated me though
02:25
<@Vornicus>
okay, let's actually start a bit smaller than the large-scale duplication.
02:25
<@Vornicus>
if trapOne[trapDiff][trapCost]>0:
02:25
<@Vornicus>
a = trapOne[trapDiff][trapCost]
02:25
<@Vornicus>
else:
02:25
<@Vornicus>
a = 0
02:25
<@Vornicus>
On that.
02:25
<@Vornicus>
I should really use the pastebin.
02:25
<@Vornicus>
But this is equivalent to min(trapOne[TrapDiff][trapCost], 0)
02:25
< Forj>
yeah, I hate that bit
02:26
<@Vornicus>
Amazing, just one line.
02:26
< Forj>
I need to sum the costs, but only count positive values
02:26
<@Vornicus>
What does runeTrapsGains.diff() produce?
02:28
< Forj>
a list containing the difficulty rating of the trap, and the cost for that difficulty rating
02:28
< Forj>
which can be postive, negative, or zero
02:28
<@Vornicus>
Okay.
02:28
<@Vornicus>
What are trapRol and trapAb used for?
02:29
<@Vornicus>
And why the heck aren't these constants in a sane order?
02:29
< Forj>
they are from another runeTrapsGains function, giving the type of roll that needs to be made, and the ability it is rolled against
02:29
<@Vornicus>
okay.
02:29
< Forj>
cos I think weird ;)
02:29
< Forj>
what kind of order would be sane?
02:30
<@Vornicus>
A sane order would group constants by their use.
02:30
<@Vornicus>
instead of diff cost typ ab rol dam, you'd go diff typ dam, then cost, then ab rol
02:32
<@Vornicus>
Could I get you to send me runeTrapsGains
02:32
< Forj>
yep
02:33
< Forj>
I think I see what you mean by the ordering, the first group are the first indexing numbers, the second the second...right?
02:33
<@Vornicus>
Okay, let's see here.
02:33
<@Vornicus>
Right
02:34
<@Vornicus>
Okay, let's go through here and see what's where.
02:34 MyCatVerbs [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has joined #code
02:35 * Vornicus fiddles. A couple things that should be data instead of code...
02:36 * MyCatVerbs waves Scheme at Vornicus.
02:36
< MyCatVerbs>
What's the difference anyway? =D
02:36
<@Chalcedon>
TeachingForjToCodeCorrectly
02:36
<@Vornicus>
MCV: In many ways there isn't one. Programs are files; files are programs.
02:37
< MyCatVerbs>
Vornicus: weeeell duh, I know what a von Neumann architecture machine is. I was sayin', try a LISP dialect like Scheme and the two get rapidly indistinguishable. ^^
02:37
< Forj>
Vorn, I do eventually want to put a lot of these into data files
02:38
<@Vornicus>
Forj: good.
02:39
< Forj>
I've been working my way up from lists, to dictionaries, to functions, to modules
02:39
< Forj>
I want to get the program functional before I try and take it further ;)
02:39 * Vornicus decides to not screw with that bit.
02:41
<@ToxicFrog>
MyCatVerbs: please don't break the newbie, he hasn't read SICP yet.
02:42
<@Vornicus>
heh
02:43
< MyCatVerbs>
ToxicFrog: neither have I, beyond the first few chapters. I'm still poking at it, rather slowly.
02:45 Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
02:45 mode/#code [+o Chalcy] by ChanServ
02:45 gnolam [Lenin@Nightstar-13557.8.5.253.se.wasadata.net] has quit [Quit: Z?]
02:46 Forj [~Forj@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
02:46 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
02:46 Forj [~Forj@Nightstar-869.bitstream.orcon.net.nz] has joined #code
02:46
< Forj>
bleh
02:47
< Forj>
vorn, a query on your comment re the min function
02:47
<@Vornicus>
shoot
02:47
< Forj>
I tried it out, but doesn't it return the smallest value of the set?
02:48
<@Vornicus>
It should return the smallest value of all the things you pass into it.
02:48
< Forj>
thus returning -20 in this case, where I want to igonre anything less than zero
02:48
< Forj>
or rather, only add 0 to the running total
02:48
<@ToxicFrog>
max(0, min(...))
02:49
<@Vornicus>
oh, oh
02:49
<@Vornicus>
sorry, I got the wrong function because my brain went missing.
02:49
<@Vornicus>
max, not min.
02:49
< Forj>
fair enough
02:49
< Forj>
happens to me often enough
02:49
< Forj>
right, makes sense now
02:50
<@Vornicus>
anyway
02:50
< Forj>
so that would make it essentially a = max(0, stuff)
02:50
<@ToxicFrog>
Yep.
02:50
< Forj>
cool
02:50
<@Chalcy>
...oops
02:51
<@Chalcy>
I think I just tried to print 92 copies of a 150pg document...
02:51
< Forj>
I need to look for a dictionary so I can browse for the functions I need, rather than just using what's in the tutorial...
02:51
<@ToxicFrog>
...
02:51
<@ToxicFrog>
Canceeeeeeeeeeeel
02:51
< Forj>
she did
02:51
<@Chalcy>
I was trying to go to pg 92
02:51
< Forj>
it borked on that too...
02:51
<@Chalcy>
but word is still having a hernia
02:52 * Chalcy giggle
02:52 * Chalcy kills it
02:52
<@Vornicus>
Forj: the library reference and the module list are your friends.
02:53
< Forj>
duely noted :)
02:53
<@ToxicFrog>
Word likes to go KABLOOIE when under stress, yes.
02:53
<@Vornicus>
http://pastie.caboo.se/41166 <--- okay, here's iteration one. I gave some variables meaningful names, and replaced the long if statements with single statements using max.
02:54
<@ToxicFrog>
Also, a thought.
02:54
<@ToxicFrog>
When you find yourself repeating that kind of statement a lot? Make it a function.
02:54
<@Vornicus>
Indeed, here's a function:
02:54
<@ToxicFrog>
In this case you already have such a function, but without knowing about it, rolling your own is entirely reasonable.
02:55
<@Vornicus>
def clampPositive(num):
02:55
<@Vornicus>
return max(0,num)
02:55
<@Vornicus>
:P
02:55
< Forj>
heh
02:55
< Forj>
oops :D
02:56
<@Vornicus>
next I'm going to change it from essentially an unrolled loop to an actual loop.
02:57
<@Vornicus>
trap_count=runeTrapsGains.count() #Determine number of traps in this event
02:57
<@Vornicus>
traps = [[] for k in range(trap_count)]
02:57
<@Vornicus>
Now I have generated exactly the right number of blank traps.
02:57 Forjeh [~Forj@Nightstar-869.bitstream.orcon.net.nz] has joined #code
02:57 * Forjeh grrs
02:58
<@Vornicus>
What's the last you saw?
02:58 * ToxicFrog tries to remember if he implemented Object::Morph()
02:58
< Forjeh>
In this case you already have such a function, but without knowing about it, rolling your own is entirely reasonable.
02:58
< Forjeh>
<Vornicus> def clampPositive(num):
02:58
< Forjeh>
<Vornicus> return max(0,num)
02:58
< Forjeh>
<Vornicus> :P
02:58
< Forjeh>
<Forj> heh
02:58
< Forjeh>
<Forj> oops :D
02:58
<@Vornicus>
Okay
02:58
<@Vornicus>
next I'm going to change it from essentially an unrolled loop to an actual loop.
02:58 Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
02:58
<@Vornicus>
trap_count=runeTrapsGains.count() #Determine number of traps in this event
02:58
<@Vornicus>
traps = [[] for k in range(trap_count)]
02:58 Forj [~Forj@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
02:58
<@Vornicus>
Now we have exactly the right number of blank traps.
02:59
<@ToxicFrog>
...what does that for construct do?
02:59
<@ToxicFrog>
[foo] is list contents, right?
02:59
<@Vornicus>
That makes a list.
02:59
<@Vornicus>
Of empty lists.
03:00
<@Vornicus>
And there exactly as many lists times the 'for' section iterates.
03:00
< Forjeh>
what is the character after the first [?
03:00
<@ToxicFrog>
Another [
03:00
< Forjeh>
or is it two []?
03:00
< Forjeh>
right
03:00
<@Vornicus>
[ [ ] for k in range ( trap_count ) ]
03:00
<@Vornicus>
separating all tokens by spaces so you can see them.
03:00
< Forjeh>
cheers
03:01
<@ToxicFrog>
Vornicus: so, roughly something like: for i=1..trap_count do yield {} end ?
03:01
< Forjeh>
I think I can see where this is going
03:01
<@ToxicFrog>
And the yielded stuff expands to fill the []?
03:01
<@ToxicFrog>
(the other [], that is)
03:01
<@ToxicFrog>
(it took me four tries to type [] ;.;)
03:01
< Forjeh>
I then use the trap building code to fill each list?
03:02
< Forjeh>
looping and incrementing the index so it fills the next list?
03:03
<@Vornicus>
TF: I think.
03:03
<@Vornicus>
what's that, Lua?
03:03
<@Vornicus>
Then, instead of counting off, we simply tell it to give us each blank trap in turn
03:03
<@Vornicus>
for i, trap in enumerate(traps): # for each trap..
03:04
<@Vornicus>
the variable i holds the number of the trap (starting at 0) and trap holds a single trap.
03:05
< Forjeh>
ok, you lost me there with a function I haven't met
03:05
< Forjeh>
I get what its doing, but I'm not certain how
03:05
<@Vornicus>
usually, if I just say
03:05
<@Vornicus>
for foo in bar
03:05
<@Vornicus>
it gives me each object in bar, names it foo, and passes that into the loop.
03:05
<@Vornicus>
But I don't know where in bar I am.
03:05
< Forjeh>
ok, that makes sense
03:05
<@Vornicus>
for foo in enumerate(bar)
03:05
< Forjeh>
I'll have to use it to properly grasp it though
03:06
<@Vornicus>
Instead of /just/ giving me each object, it /also/ gives me an index number.
03:06
< Forjeh>
ah, even better
03:07 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
03:07 mode/#code [+o Chalcedon] by ChanServ
03:08
<@Vornicus>
http://pastie.caboo.se/41169
03:08
<@Vornicus>
Now, instead of naming each trap individually, we have a list of traps. We can now generate 50 traps if we want, and not have to change any code to do it.
03:09
< Forjeh>
makes sense
03:09
< Forjeh>
I was deliberately leaving it at only 3 traps, but that doesn't really change anything
03:10
<@Vornicus>
Now if you want more you don't have to change anything.
03:10
<@Vornicus>
well, not in this function.
03:10
< MyCatVerbs>
Oh gawd I love it when people integrate Scheme interpreters into random programs.
03:10
<@Vornicus>
Note also how we aren't repeating the same 20 or so lines of code three times over
03:10
<@ToxicFrog>
Vornicus: yes, lua.
03:10
<@ToxicFrog>
Kind of implying some coroutine work in the background so that yield actually does stuff.
03:11
<@Vornicus>
Right, what this does is it gives you nested lists.
03:12 * Chalcedon comments code
03:13
<@Vornicus>
Now, all these indices we're using - trapDiff, etc, they're not likely to change, right?
03:14 * ToxicFrog implements Morph(), waits for heads to start exploding
03:14
<@Vornicus>
What's Morph() do?
03:14
<@ToxicFrog>
Changes type, optionally preserving some members
03:15
<@Vornicus>
Does it make your object a Power Ranger?
03:15
<@ToxicFrog>
So if you call, say:
03:15 * Chalcedon eyeballs permutations.py
03:15
<@ToxicFrog>
sym = Symbol:New()
03:15
<@ToxicFrog>
sym:Morph(PreprocessorSymbol)
03:15
<@ToxicFrog>
sym is now of type, and has all the members of, a PreprocessorSymbol.
03:15
< Forjeh>
sorry, was hanging out the washing
03:15 * Forjeh reads
03:16
<@Vornicus>
Indeed, if they were to ever change, it would be Very Bad, as it would break your code horribly, right?
03:16
<@Chalcedon>
uuuuuhhhhh....
03:16 * Chalcedon has a serious problem
03:16
<@ToxicFrog>
Vornicus: the idea behind this is that you can create some generic class and feed it some stuff, and it calls Morph() appropriately to become a specific subclass.
03:16
< Forjeh>
vorn: no, i don't plan on changing those indices
03:16
<@ToxicFrog>
Although you could definitely abuse it in other ways.
03:17
<@Vornicus>
All right, then let's tell them to be constants.
03:17
<@Vornicus>
Chalcy: what's up?
03:17
<@Chalcedon>
I can't remember what the hell permutations.py does
03:17
<@Chalcedon>
I need to comment it properly for my thesis
03:17
<@Vornicus>
Oh. It generates permutations of a list.
03:17
<@ToxicFrog>
This comes in handy in, say, ss1edit, where I can create a Chunk, feed it a buffer, and watch it turn into a StringChunk or a TextureChunk or whatever.
03:17
<@Vornicus>
In lexicographical order. it works as an iterator.
03:18 * Chalcedon swears at her printer
03:18
<@Chalcedon>
I remember that much.
03:19
<@Vornicus>
Forjeh: so what we do to it, is we make it pretty obvious that it's a NO TOUCHY zone.
03:19
< MyCatVerbs>
*Everybody* remembers how annoying printers are.
03:19
<@Chalcedon>
I need to comment it such that a non-programmer can read it and understand
03:19
<@Vornicus>
Arg.
03:19
< MyCatVerbs>
You could totally run a business buying up secondhand HP Deskjets and renting out baseball bats for people to go Office Space on them.
03:19
<@Vornicus>
TRAP_DIFFICULTY=0
03:19
<@Vornicus>
So we make them in ALL_CAPS
03:20
<@ToxicFrog>
MyCatVerbs: my deskjet has served me mostly faithfully over the years.
03:21
< MyCatVerbs>
ToxicFrog: it's not that I'm singling out HP printers for scorn here. It's just that they're the cheapest secondhand printers of the market by far, on account of everyone has realised that it is literally cheaper to buy a damn Espon or Canon or something than to change the ink cartidges in a Hewlett-Packard.
03:21
<@ToxicFrog>
Aah.
03:22
<@ToxicFrog>
Hell, it's easier to buy a new HP than to replace the carts in the old one~
03:22
<@ToxicFrog>
Me, this isn't so big a deal, because I go through about one pair of carts in three years.
03:22
< MyCatVerbs>
You can actually pick up pallets of them on ebay here for only nominal fees. Literally you're saving the seller money that they'd otherwise have to pay to dispose of the things.
03:22
< Forjeh>
you know Vornicus, I didn't really expect a line by line improvement of my code, with a lesson in programming on the side
03:22
< Forjeh>
your time and effort are appreciated :)
03:23
<@Chalcedon>
any objections to me throwing in questions?
03:23
<@Vornicus>
Chalcy: I think you would be best served with an example. do "for permutation in permutatiions([1, 1, 2, 3]): print permutation"
03:23
<@Vornicus>
Chalcy: not at all.
03:23
<@ToxicFrog>
Forjeh: this is, nonetheless, what asking in here tends to result in~
03:23
< Forjeh>
so I'm learning :)
03:24
<@Vornicus>
Note also that I expanded the name to full words - it's easier to tell what's going on that way.
03:24
<@Chalcedon>
Vorn, you mean start with an example and follow it all the way through? That sounds like a good idea.
03:24
<@Vornicus>
Well, yeah, you could do that.
03:24
<@ToxicFrog>
Chalcedon: he actually meant, run that code.
03:24
<@ToxicFrog>
After loading permutations.py
03:24
<@ToxicFrog>
Which will show you what it does.
03:24
<@Vornicus>
But run the code, and that will give a good, concrete example of what it does.
03:24
<@Chalcedon>
oh, good idea.
03:24
<@ToxicFrog>
Which should be more intuitive than explaining it.
03:24
<@Chalcedon>
yes
03:25
<@Chalcedon>
remind me though, what does data = d[:] do?
03:25
<@Vornicus>
It makes a copy.
03:25
<@Chalcedon>
ah!
03:25
<@Vornicus>
So we do not do violence to the input.
03:25
<@Chalcedon>
thank you.
03:27
<@Vornicus>
difficulty_cost = max(0, trap[trapDiff][trapCost])
03:27
<@Vornicus>
type_cost = max(0, trap[trapTyp][trapCost])
03:27
<@Vornicus>
damage_cost = max(0, trap[trapDam][trapCost])
03:27
<@Vornicus>
erp. i should correct those constants first
03:27
<@ToxicFrog>
Vornicus: and the [:] is because data = d would be copy by reference instead of by value?
03:28 MyCatVerbs [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has quit [Connection reset by peer]
03:28
< Forjeh>
vorn: already made those adjustments, just not with the named variables
03:28
<@Vornicus>
difficulty_cost = max(0, trap[TRAP_DIFFICULTY][TRAP_COST])
03:28
<@Vornicus>
type_cost = max(0, trap[TRAP_TYPE][TRAP_COST])
03:28
<@Vornicus>
damage_cost = max(0, trap[TRAP_DAMAGE][TRAP_COST])
03:28
<@Vornicus>
TF: yep.
03:28
<@Vornicus>
That there, those look kinda similar.
03:28 MyCatVerbs [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has joined #code
03:28
<@Vornicus>
Indeed, if we replace things, we just get [0][1], [1][1], and [2][1]
03:29
<@Vornicus>
But there's only three elements in this list.
03:29
<@Vornicus>
...actually I don't think that's the right place to improve now.
03:31
<@ToxicFrog>
DEPLOY ZE STRUCTIFICATION
03:31
<@Vornicus>
Is that like FIRE ZE MISSILES?
03:31
<@ToxicFrog>
Kind of.
03:31
<@Vornicus>
In any case, TF is correct.
03:32
<@Vornicus>
We're throwing around list indices with enums on top, and that's not really that kosher; when we add another thing to these lists, we have to update the enums that we use to index into the lists, and that... sucks.
03:33
<@Vornicus>
Especially since we've got the enums currently sprinkled through at least two files. I don't know what's in fprint, but I imagine that it uses these indices too
03:36
< Forjeh>
sorry, afk, phone
03:36
<@Vornicus>
ok
03:37
<@Chalcedon>
why yeild data?
03:37
<@Chalcedon>
without the spelling error
03:38
<@Vornicus>
What that does is says "when you get to this point, stop, give your caller the data, then when you get called again, /start here/"
03:39 * Chalcedon frowninate
03:40
<@Vornicus>
As opposed to return, which would tell it to start from the beginning.
03:40
<@Vornicus>
That is the point in the code where a new permutation is ready.
03:40
<@Chalcedon>
so it tells it to stop using data until that loop has completed?
03:41
<@Vornicus>
No, it tells it to stop executing the loop until it gets control back.
03:41
<@Chalcedon>
but its at the start of the loop
03:41
<@Vornicus>
Right
03:41
<@ToxicFrog>
Chalcedon: the idea behind this is that you call it multiple times.
03:42
<@ToxicFrog>
Each time, it returns the next permutation.
03:42
<@ToxicFrog>
The bit that does this is yield; you call it, and when it hits yield, it gives you a permutation.
03:42 * Chalcedon feels incredibly dumb
03:42
<@ToxicFrog>
Call it again and it keeps going from where the yield is, generates another permutation, and gives you that.
03:42
<@ToxicFrog>
And so forth until it runs out.
03:42
<@Chalcedon>
so permutations(d) generates exactly one permuation
03:43
<@Chalcedon>
until it can't do any more at which point it breaks the loop
03:43
<@Chalcedon>
*?
03:43
<@ToxicFrog>
Umm.
03:43
<@Vornicus>
Yes.
03:43
<@Vornicus>
Essentially.
03:43
<@ToxicFrog>
Vornicus: I would have thought it would return an iterator function?
03:43
<@Vornicus>
well, permutations() does return an iterator object.
03:43
<@Chalcedon>
I'm sorry I'm being so thick. I'm mentally and physically exhausted and working through the onset of a cold.
03:44
<@Vornicus>
But it's the same deal.
03:44
<@Chalcedon>
a permuation is an iterator object?
03:44
<@Vornicus>
Agh
03:44 * Vornicus tries to describe
03:44 * Chalcedon hug Vornicus
03:44
<@Vornicus>
permutations() returns an iterator object. Then the iterator object gets next() called on it repeatedly.
03:45
<@Vornicus>
however, I did it in a way that has syntactic sugar in it - instead of defining next() and so forth myself, I defined a function that Python converts to an iterator behind the scenes.
03:45
<@Chalcedon>
right.
03:45
<@Chalcedon>
I think I get it.
03:45
<@Chalcedon>
I'm sorry for being so stud
03:46
<@Chalcedon>
bah
03:46
<@Chalcedon>
stupid
03:46
<@Vornicus>
What happens according to what /you/ see is you say "okay, give me another permutation" and it goes through the function until it finds 'yield', and then it gives data back and waits there until it gets asked for another one.
03:47
<@Chalcedon>
haaang on.
03:47
<@Chalcedon>
I think I may see.
03:48
<@ToxicFrog>
Vornicus: is this implicit coroutine creation?
03:48
<@Vornicus>
TF: ...essentially.
03:48
<@ToxicFrog>
Hmm. Lua could use something like that.
03:48
<@ToxicFrog>
I could create an Iterator class that does the stuff.
03:48
<@Vornicus>
...I fear that in two weeks, it /will/.
03:48
<@ToxicFrog>
Pfft.
03:48
<@Chalcedon>
permutations(d): sorts the data, hits yield, gives the data back. gets called again /finishes/ the while loop, goes back to the start of the while loop, hits yield, repeats.
03:48
<@Chalcedon>
*?
03:49
<@ToxicFrog>
Development isn't moving nearly that fast anymore.
03:49
<@ToxicFrog>
And why do you fear it?
03:49
<@ToxicFrog>
It would be handy.
03:49
<@Vornicus>
Chalcy: bingo
03:49 * Chalcedon yay
03:49
<@Vornicus>
TF: because I'm a strange creature.
03:50
<@Chalcedon>
If I am ever in the States, I definitely owe you a beer Vorn. Probably TF too. (this is if you drink beer obviously)
03:50 * Vornicus doesn't drink beer.
03:50
<@Vornicus>
But I could go for a cookie.
03:50
<@Chalcedon>
well beer = <drink or foodstuff of choice>
03:53 * ToxicFrog doesn't drink period, but appreciates the sentiment
03:53 * Vornicus waters TF.
03:54 * ToxicFrog burbles
03:55
<@ToxicFrog>
And I'm not in the states either, but you could steal vorn and come visit Canada and I'd make you all pasta :P
03:55 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has joined #Code
03:55
<@Chalcedon>
:)
03:55
<@Vornicus>
No! Steal TF, come visit the US, and I'll make you all chicken divan!
03:55
<@ToxicFrog>
noooo, not the US ;.;
03:55
<@Chalcedon>
I know you aren't in the States TF, but Canada and the US are a short trip from each other relative to here
03:56 * Vornicus ponders.
03:56
<@Vornicus>
Or I can steal TF and we can go to NZ.
03:56
<@Chalcedon>
that works too
03:56
<@ToxicFrog>
That could work.
03:56 * ToxicFrog asks his network of orbiting spy satellites to calculate approximate distance
03:56
< Janus>
Poor NZ.
03:57
<@Vornicus>
TF: Google Earth?
03:57
<@ToxicFrog>
Yeeeep.
03:57
<@Vornicus>
Most of that is actually aircraft data. :)
03:57
<@Reiver>
Come to NZ!
03:57
<@Reiver>
We'll feed ya.
03:58
<@Reiver>
Also the weather is pretty sweet.
03:58 * Vornicus wants to see NZ.
03:58
<@ToxicFrog>
And the answer is...shit, the earth is curved, I can't get them both on screen at once
03:58
<@Reiver>
*snrk*
03:58
<@Reiver>
You think?
03:58
<@Vornicus>
hee
03:58
<@Chalcedon>
heh
03:58
<@Vornicus>
poor TF.
03:59 * Chalcedon consume lemondrink
03:59
<@Vornicus>
Thwarted by Magellan.
03:59
<@Reiver>
...*snrk*
03:59
<@ToxicFrog>
Aha, I can move the end nodes of the path!
03:59
<@ToxicFrog>
...hmm.
03:59
<@Reiver>
Is that right spelled?
03:59
<@ToxicFrog>
14-15 thousand km or so.
03:59
<@ToxicFrog>
A bit outside the range of a flying car ;.;
03:59
<@Chalcedon>
sounds about right
03:59
<@Vornicus>
Halfway around the world.
03:59
<@Chalcedon>
pretty much
03:59 * Reiver reccomend TF refuels in hawaii?
04:00
<@ToxicFrog>
Hmm. perhaps if went over the north polar ice cap, refueled in Japan...
04:00
<@Reiver>
Watch out for the monsters.
04:00
<@Reiver>
They eat flying cars.
04:00
<@ToxicFrog>
No, this is a job for a suborbital or orbital shuttle.
04:00
<@Reiver>
*snrk*
04:00
<@Reiver>
Or a GIANT CANNON *boom*
04:02
<@ToxicFrog>
No, those are for getting you into orbit~
04:02 * Vornicus eyes
04:02
<@Vornicus>
...apparently I can measure the earth in Smoots
04:02
<@Reiver>
Smoots?
04:03
<@Chalcedon>
what is a smoot?
04:03
<@Vornicus>
A famous prank from MIT
04:03
<@ToxicFrog>
(they haven't lost anyone since they recalibrated in '09!)
04:03
<@Reiver>
That'll be why then.
04:03
<@Reiver>
Google and university pranks?
04:03
<@Reiver>
C'mon. Of course they'd go for it.
04:03
<@Reiver>
What was the prank Vorn?
04:03 * Reiver cookies TF in appreciation.
04:04
<@Vornicus>
They took a guy named Smoot, laid him on a bridge in Boston, spraypainted at his head and feet, moved him along the bridge, and measured the whole bridge in Smoots.
04:04
<@Reiver>
Awesome
04:04
<@ToxicFrog>
Aah, MIT.
04:04
<@Vornicus>
Eventually police started using the Smoot marks to record incidents on the bridge.
04:04
<@Chalcedon>
hehehe
04:04
<@Vornicus>
Then they replaced the bridge... and transferred the smoot marks to the new bridge.
04:04
<@Reiver>
...Sweet
04:04
<@Reiver>
04:05
<@Reiver>
Because they were useful?
04:05
<@Vornicus>
Evidently.
04:05
<@Reiver>
So these lines were numbered, I assume then.
04:05
<@Reiver>
And when they replaced the bridge the police wanted them back!
04:05
<@Vornicus>
Essentially.
04:05
<@Reiver>
Aah, inertia.
04:05
<@Vornicus>
But, see, there was a bit of a controverst
04:05
<@Reiver>
So just how much is a smoot?
04:05
<@Reiver>
Yes?
04:05
<@Vornicus>
See, when they replaced the bridge, Smoot's son was attending MIT.
04:06
<@Reiver>
...uhoh.
04:06
<@Vornicus>
And they wondered whether they should use the original Smoot (5'7") or the new Smoot (5'9")
04:06
<@Chalcedon>
o.O
04:06 * Reiver giggles.
04:06
<@Vornicus>
Eventually it was decided that the original Smoot would be used.
04:07
<@ToxicFrog>
...
04:07
<@Reiver>
Dude.
04:07
<@Reiver>
That's pretty actually awesome.
04:07
<@ToxicFrog>
Random thought.
04:07
<@Vornicus>
Anyway it's 8.2E6 Smoots from Guelph to Wellington.
04:08
<@ToxicFrog>
When original Smoot finally dies, clearly his tomb has to be inside the Bureau of Weights and Measures.
04:08
<@Vornicus>
Hee
04:08
<@Reiver>
04:08
<@Reiver>
Sweet.
04:08
<@Reiver>
It must be done! >.>
04:08 * ToxicFrog idly adds that to the list of "awesome ways and places to be interred after your death"
04:09
<@ToxicFrog>
(others include "burial at c" and "visible-from-space crater")
04:09 * Reiver cremates TF, puts him in Lake Taupo.
04:10 * Reiver then points and laughs.
04:10
<@Vornicus>
What, Total Conversion Cremation?
04:11
<@ToxicFrog>
Possibly.
04:11 * Reiver ponders.
04:11
<@ToxicFrog>
Falling from orbit would also do, if you had some kind of reentry vehicle.
04:11
<@ToxicFrog>
(otherwise you just burn up in the atmosphere)
04:11
<@Reiver>
(This does not count as awesome anyway?)
04:11
<@ToxicFrog>
Attempting to disassemble a Lazy Gun would also do it~
04:11
<@Reiver>
(You get to be a falling star~)
04:11
<@ToxicFrog>
(true)
04:12
<@ToxicFrog>
(I like burial at c the best, though)
04:13 * Vornicus wanders around Forj's code, cleaning stuff up.
04:13
< Forjeh>
oi! I'll never find it again if someone else cleans up! ;)
04:13 * Chalcedon giggle
04:13
<@Vornicus>
pff
04:13
<@Vornicus>
Okay, let's see.
04:13
<@McMartin>
http://sarmonster.livejournal.com/488302.html
04:14
< Forjeh>
having difficulty implementing the enumerated loop
04:14
<@Reiver>
Forj: This is your Rune code?
04:14
< Forjeh>
it tells me that 'traps' is not defined
04:14
< Forjeh>
Reiver: yes
04:14
<@Vornicus>
Forjeh: that's probably because you forgot to initialize traps;
04:15
< Forjeh>
I got it to give me up to three traps, fully defined as needed by the runner
04:15
<@Vornicus>
[Sat 19:58:38] Vornicus trap_count=runeTrapsGains.count() #Determine number of traps in this event
04:15
<@Vornicus>
[Sat 19:58:41] Vornicus traps = [[] for k in range(trap_count)]
04:15
< Forjeh>
now vorn is breaking it in the name of improvements ;)
04:15
<@Vornicus>
That's where I originally defined it.
04:15
< Forjeh>
ah, yes, I see what I'm missing
04:15 MyCatVerbs [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has quit [Ping Timeout]
04:16 * Vornicus tries to remember how to do something, looks up the Random thing.
04:16
<@Vornicus>
ah, of course!
04:16 * Vornicus replaces randInt etc with choice.
04:17 MyCatVerbs [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has joined #code
04:17
<@Vornicus>
def count():
04:17
<@Vornicus>
return random.choice(TRAP_COUNT)
04:22
< Forjeh>
I see, it chooses randomly from a set from 1 to TRAP_COUNT?
04:22
<@Reiver>
I toldya Python was awesome at that kind of thing.
04:24
<@Vornicus>
Actually, uh, it chooses a random object from the TRAP_COUNT tuple-table-thing
04:24
< Forjeh>
right
04:25
< Forjeh>
instead of where i've used two lines to say "pick a number, now pick the object that corresponds to that number in [here]"
04:26
<@Vornicus>
Yep.
04:26
< Forjeh>
hrm, is it better to define a whole lot of functions in a program that uses the same variables, or shuffle them off into a module like i've done with my formatted printing functions fPrint?
04:27
<@Vornicus>
It is better to keep data together with the procedures that manipulate it.
04:27
<@Vornicus>
This is what classes do.
04:28
< Forjeh>
so I should put all those fPrint functions back into the main program?
04:28
<@Vornicus>
Sorta.
04:29
< Forjeh>
cos it repeats the same index constants as the main program
04:29
<@Vornicus>
We'll get to that in a bit. Right now, look at this: http://pastie.caboo.se/41175
04:30 * Chalcedon has a small, black, attention seeking body. Complete with tail
04:30 * Vornicus pets said small, black, attention seeking body.
04:31 * Forjeh pets Chalcedon
04:31 * Forjeh runs
04:31
<@Vornicus>
See how much easier it is to read the tables now?
04:31
< Forjeh>
indeed :)
04:31
< Forjeh>
you've changed the dictionary to a list of lists?
04:32
< Forjeh>
oh, so you can use choice, right?
04:32
<@Vornicus>
A tuple of tuples, where it was a dictionary of tuples before.
04:32
<@Vornicus>
Indeed.
04:32
< Forjeh>
tuples, yes, not lists :S
04:32 * Chalcedon hasn't been programming in too long
04:32
< Forjeh>
and yeah, TRAP_COUNT_TABLE is kinda yich
04:32
<@Vornicus>
Also, what you were doing with dictionaries... really didn't work.
04:33
< Forjeh>
i need to pick one of three values, but they have different weights
04:33
< Forjeh>
how so?
04:33
< Forjeh>
I thought I was following the method laid out in the tutorial
04:33
<@Vornicus>
Wel, I mean, it sorta worked.
04:34
<@Vornicus>
But you removed all the flexibility of lists/tuples from the thing, just so you could get 1-indexed arrays.
04:34
< Forjeh>
it worked, but could have done so in a much more elegant manner?
04:34 * Chalcedon frowninate at reverse_slice
04:35
<@Vornicus>
Chalcy: reverse_slice is a helper function - it reverses a slice of a list.
04:35
<@Chalcedon>
I know that and I can sorta see what it's doing but I can't figure out how the hell to explain it.
04:35
<@Vornicus>
Give an example.
04:36 * Chalcedon works on an example
04:36 * Vornicus fiddles with other sections of code.
04:36
<@Vornicus>
I... dislike the damage thing, but I don't think I can really do much with it.
04:37
<@Vornicus>
Other than "spent" and "spend" are really bad, taken together.
04:38
< Forjeh>
no, I had problems with that section
04:38
<@Vornicus>
I think it can be replaced with something nicer, but I'm not sure what yet.
04:38
< Forjeh>
it does a thing where costs 1 point per damage, plus an increasing surchage for each 5 points after 15
04:39
<@Vornicus>
...is that all.
04:39
< Forjeh>
ie 0-15 costs 0-15, 16-20 costs 21-25, 21-25 costs 31-35
04:39
< Forjeh>
etc
04:40
<@Vornicus>
...a slightly tricky inverse, I think I see how to fix it, but I'm going to leave it for now.
04:40
< Forjeh>
fair enough, you've done far more than I asked already :)
04:40
<@Vornicus>
oh, let's see.
04:40
<@Vornicus>
I have a sinking feeling that you got that type list from somewhere else, hiding in other code.
04:41
< Forjeh>
which type list?
04:41
<@Vornicus>
the trap type table.
04:41
<@Vornicus>
That, in particular, the skill name used is the official name of the skill.
04:42
<@Reiver>
AKA violation of copyright?
04:42
<@Vornicus>
no, no
04:43
< Forjeh>
I haven't pulled that from anywhere other than my own scribblings, and the book, for the values themselves...
04:43
<@Vornicus>
Like, somewhere else in the code, there is a place where "Divine Awareness" is associated with "divineAwarenessSkill"
04:43
< Forjeh>
no, not yet
04:43
<@Vornicus>
mmm.
04:44
<@Reiver>
What is your point on this, Vorn?
04:44
< Forjeh>
divineAwarenessSkill will eventually call a function that picks from another list
04:44
<@Vornicus>
That it doesn't belong in this section of code. But.
04:44
<@Vornicus>
I'm poking at areas outside my view, and that's a thing for another time.
04:45
<@Vornicus>
Right now, we have to move from tuples to classes.
04:45
< Forjeh>
at the moment, the name "Divine Awareness" is a string for output, and "divineAwarenessSKill" is just a placeholder
04:47
<@Vornicus>
Okay.
05:01 * Vornicus fiddlefiddles
05:03 * Chalcedon argh
05:03
<@Chalcedon>
I can see what it's doing
05:03
<@Chalcedon>
but I cannot explain properly and am becoming invovled
05:04 * Chalcedon can't spell
05:04
<@Vornicus>
Do an example.
05:04
<@Vornicus>
All it does
05:05
<@Vornicus>
is reverses a piece of a list, in place.
05:05
<@Chalcedon>
well, actually, it sequentially swaps bits
05:05
<@Chalcedon>
but.
05:05
<@Vornicus>
Well, yes, that's /how it does it/
05:12
<@ToxicFrog>
Chalcy: take a break, have a muffin, come back when you feel more balanced?
05:13
<@Chalcedon>
I'm getting there :)
05:13
<@Chalcedon>
we are also sadly out of muffins and it's dinner time
05:13 * Reiver demands muffins ;_:
05:13 * Chalcedon patpat Reiver
05:13
<@Vornicus>
Take a break, have some dinner, etc etc?
05:14
<@Reiver>
Take a break.
05:14
<@Reiver>
Have a Kit Kat.
05:14
<@Chalcedon>
that's five copies printed
05:16
<@ToxicFrog>
...how many do you need?
05:16
<@Chalcedon>
I have to submit three, there's one for my supervisor and one for checking
05:17
<@Chalcedon>
(I get one of the three back)
05:17 * Reiver eyes.
05:17
<@Chalcedon>
yes?
05:17
<@Reiver>
You printed 5, but one of them is for my proofreading?
05:18
<@Chalcedon>
no
05:18
<@Reiver>
So if there's an error you need to reprint 4?
05:18
<@Chalcedon>
I'm going to check for stupid errors
05:18
<@Chalcedon>
I'm talking replace one page
05:18
<@Chalcedon>
(-type errors)
05:20 ThaquiLaptop [~Thaqui@Nightstar-26359.jetstream.xtra.co.nz] has joined #code
05:20 Thaqui [~Thaqui@Nightstar-26359.jetstream.xtra.co.nz] has quit [Ping Timeout]
05:20
<@Chalcedon>
Reiver did you spot your PM?
05:20
<@Reiver>
?
05:21 Reiver is now known as ReivOut
05:29
<@Chalcedon>
the % is divide without remainder, correct?
05:31
<@Vornicus>
on integers, yes
05:31
<@Vornicus>
Wait
05:31
<@Vornicus>
er
05:31
<@Vornicus>
% is modulus.
05:31
<@Vornicus>
It /only/ gives the remainder.
05:31
< Janus>
Isn't % divid to find the remainder.
05:32
<@Chalcedon>
so 5%12 should be 2?
05:32
<@Vornicus>
Yep
05:32
<@Vornicus>
er
05:32
<@Vornicus>
no, other way around
05:32
<@Vornicus>
5 % 12 is 5
05:33
<@Vornicus>
12 % 5 is 2
05:33 * Vornicus is Captain Backwards today.
05:33
<@Chalcedon>
ok, I see the second one
05:33 * Chalcedon digs out hand division
05:33
<@Vornicus>
21 % 13 is 8
05:34
<@Chalcedon>
hang on.
05:34
<@Chalcedon>
its 5 because 5/12 < 1
05:34
<@Chalcedon>
ok, I see
05:35
<@ToxicFrog>
Chalcedon: 5/12 integer is 0 with a remainder of 5.
05:35
<@Chalcedon>
yeah, my brain got that.... eventually
05:35 * Chalcedon is slow today
05:41 BlueTiger [BlueTiger@Nightstar-567.natsoe.res.rr.com] has joined #Code
05:47
<@ToxicFrog>
BT!
05:47
<@ToxicFrog>
I think I remember you.
05:47
< BlueTiger>
Yes
05:47
< BlueTiger>
you probably do. :D
05:47
<@ToxicFrog>
Have a syntax tree.
05:47
< BlueTiger>
Why thanks.
05:53
<@McMartin>
Pah. Kids these days waste their syntax.
05:53
<@McMartin>
It's like they think it grows on trees or something.
05:53
<@McMartin>
Back in my day we used strict record discipline and liked it.
05:57
<@Vornicus>
pff
05:58 * ToxicFrog kaslwwp
06:01 ChalcyLaptop [~Chalcedon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
06:02 ChalcyLaptop is now known as Reiv
06:02
< Forjeh>
imposter!
06:02
< Reiv>
Am not!
06:02
< Reiv>
OK
06:02
< Reiv>
VORN
06:02
< Forjeh>
ok, not now
06:02
< Reiv>
(/McMartin/TF/et al)
06:02
< Forjeh>
much questioning of vorn from this household today, it seems
06:02
< Reiv>
Documenting code.
06:03
< Reiv>
Chalcy has gone through and added comments to each line of the code, describing what it does.
06:03
<@Vornicus>
?
06:03
<@Vornicus>
ah, uh
06:03
<@Vornicus>
I thought I had already done that.
06:03
< Reiv>
This is marvelously thorough commenting - but it's not documenting, is it?
06:04
<@Vornicus>
no.
06:04
<@Chalcedon>
not all lines and um. somewhat inappropriate for thesis
06:04
<@McMartin>
Documenting is a paragraph at the head of every exposed function, and maybe a line or two in front of the internal ones.
06:04 * Chalcedon hug Vornicus
06:04
< Reiv>
Documenting should describe what it does, what it inputs/outputs, and description of alograthm, yes?
06:04
< Reiv>
And... yes, thanks McM.
06:04
<@Vornicus>
TO document code you merely describe what a function does, what it takes as arguments, and what it returns.
06:04
<@McMartin>
What is being documented?
06:04
< Reiv>
You do it to the functions too.
06:04
<@McMartin>
If you have pre- and post- conditions, those go in, too.
06:05
< Reiv>
Chalcy's code for the patchyness program thingy.
06:05
< Reiv>
uh, vorn, you can explain this better than me... >.>
06:05
<@McMartin>
The glVertex routines, for example, have more restrictions on when you call them than just the args.
06:06 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has quit [Quit: I can't find main.cpp in the Recycle Bin either... ;_______;]
06:06
<@Vornicus>
For programs, you should usually have a man file, readme, or --help option (or all three), describing how to call it to do various things.
06:06
< Reiv>
So
06:07
< Reiv>
A readme, documentation as heading comments in the code, and then commenting on the code itself?
06:08 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
06:09
<@Vornicus>
A readme, heading comments (both file-wide and per-function), and for complex algorithms documentation of the algorithm (though that can go in other places; for my permutation code, I would just point people at Knuth)
06:09 Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
06:09 mode/#code [+o Chalcy] by ChanServ
06:09 * Chalcy mutter
06:09
<@ToxicFrog>
(generally, the man page is detailed documentation, --help is a quick summary, and the README is an overview, perhaps basic instructions, and install instructions if there's no INSTALL - at least for *nix programs)
06:09 Chalcy is now known as Chalcedon
06:09
<@ToxicFrog>
(windows doesn't have man, so sometimes that goes in the README and sometimes in HTML files or whatever)
06:09
<@Chalcedon>
program doesn't require installation
06:10
<@Chalcedon>
(at least I don't think so)
06:10
<@Vornicus>
it doesn't require installation at all.
06:10
<@Chalcedon>
the files I put in, do they have to be the compiled version or the original?
06:10
<@Vornicus>
Indeed, if I intended it to be installed I would build a makefile or setup.py with install rules.
06:10
<@Vornicus>
the .py files.
06:11
< Reiv>
"Installation - unzip into a suitabke directory and place the data you want read into the same folder."
06:11
<@Vornicus>
the .pyc files will be generated on first run.
06:11
<@ToxicFrog>
Vornicus: indeed. In which case INSTALL is probably just something to the effect of "make install"
06:11
<@Vornicus>
indeed.
06:11
<@ToxicFrog>
And perhaps an overview of what needs to be done if you use a different build system.
06:12
<@ToxicFrog>
(for example, the Lua INSTALL says which files need to be compiled for each of liblua, lua and luac, in the case that you're building it by hand or using something other than Make)
06:12
<@McMartin>
(I wish different distros if Lua didn't have conflicting header requirements.)
06:12
<@McMartin>
s/if/of/
06:12
<@ToxicFrog>
...it should be noted that "install" typically includes "build", for the purposes of putting together documentation files; that is, INSTALL typically includes instructions for both compiling and installing the program.
06:12
<@ToxicFrog>
McMartin: how so?
06:13
<@Vornicus>
...man there's a lot of stuff in a full *nix source package.
06:13 BlueTiger [BlueTiger@Nightstar-567.natsoe.res.rr.com] has quit [Ping Timeout]
06:15
<@McMartin>
TF: some ship with a (distro-generated) lua.hpp; others do not.
06:15
<@McMartin>
People writing Lua apps thus often assume that lua.hpp actually exists.
06:15
<@Vornicus>
configure and makefiles, README INSTALL and LICENSE...
06:15
<@ToxicFrog>
Aah.
06:15
<@McMartin>
This means it generally doesn't work on any system I use unless I hand-roll one.
06:15
<@ToxicFrog>
Which is not hard to do, but still.
06:16
<@ToxicFrog>
Vornicus: for sufficiently simple programs you can often omit configure, but yes
06:18
<@Vornicus>
I have seen a few semi-big systems that roll configure into make.
06:19
<@McMartin>
I would like to hasten to point out that "configure" doesn't mean "use autotools"
06:19
<@ToxicFrog>
Plus the entire source itself, which (if you want to be tidy) is probably divided into src and include directories with attendant makefiles and subdirectories, and possibly obj, bin and lib for use by the build system...
06:19
<@Vornicus>
and doc
06:19
<@ToxicFrog>
McMartin: I live for the day when someone produces a tool that serves the same purpose as autotools, but is actually usable~
06:21
<@McMartin>
Quite~
06:21
<@Vornicus>
autotools?
06:21
<@McMartin>
I get by with clever Makefile patterns and three-or-four-line configure scripts if absolutely necessary.
06:21
<@McMartin>
Which was once, for nfrotz.
06:22
<@McMartin>
UQM's system is widely reviled by distro authors but easily the best I've used.
06:22
<@McMartin>
It's a giant shellscript app by Serge van den Boom, though.
06:22
<@ToxicFrog>
Is it portable to other projects, or UQM-specific?
06:22
<@ToxicFrog>
Vornicus: autoconf and automake.
06:22
<@ToxicFrog>
The configure script and all the stuff associated with it.
06:23
<@ToxicFrog>
Based on my reading of the docs, the *officially endorsed* method of using them is "copy someone else's configure.in and Makefile.in, edit them to be relevant to your project, and pray"
06:23
<@McMartin>
TF: The core dependency/compilation stuff appears to be portable.
06:23
<@ToxicFrog>
Which is how we end up with configure scripts that test for a hundred things, only two of which are actually used by the project in question.
06:24
<@McMartin>
It uses very simple shellscript configuration files (the Makeinfo files in each dir) to do the actual build
06:24
<@McMartin>
I bet that part's real portable.
06:24
<@McMartin>
The configuration and autodetection bits I'm less clear on.
06:24
<@ToxicFrog>
I should take a look at that sometime.
06:24
<@McMartin>
But there's templating going on under the hood.
06:24
<@ToxicFrog>
Along with perhaps write a recursive-build system a la SGOS, albeit with less Elder Horror.
06:25
<@McMartin>
TMK I'm the only member of coredev that actually wants to spin off subprojects, but we all write as if we were planning to spin off our own contributions.
06:25
<@McMartin>
I heard a rumor that mplayer actually adapted a codec from our DUK decoder.
06:25
<@McMartin>
But to date VControl is the only spinoff project.
06:25 * Vornicus likes VControl.
06:25
<@McMartin>
I'd really like if MixSDL were spun off, too, but that's not my fief and the guy whose fief it is has Work To Do Elsewhere.
06:26
<@McMartin>
The new VControl is actually much more sanely architected.
06:26
<@McMartin>
Among other things, it no longer dictates configuration formats.
06:26
<@ToxicFrog>
MixSDL?
06:26
<@McMartin>
So there's a configuration API, a string-based configurator that uses the configuration API, and then a config file manager that uses the string-config API.
06:26
<@McMartin>
MixSDL is one of the two audio drivers UQM can use
06:26
<@McMartin>
It was written because SDL_mixer is awful, and OpenAL DFW.
06:27
<@McMartin>
It is, essentially, OpenAL without the segfaults, using raw SDL_audio as a backend.
06:27
<@McMartin>
And apparently a reasonably flexible codec scheme, as he added AIFF support recently which involved modifying one header file and adding two new .c files.
06:27
<@McMartin>
But I haven't, as noted, looked at it much.
06:30
<@ToxicFrog>
(also...DUK? As in duk duk g?s?)
06:30
<@ToxicFrog>
And what's awful about SDL_mixer?
06:31
<@ToxicFrog>
(bearing in mind that I have never used it)
06:31
<@McMartin>
(Only allows one "music" track, and all "sound effects" must be waves, and it doesn't do streaming or seeking, and corrupts memory if you use it wrong, and the right way to use it is totally undocumented)
06:31 * Chalcedon hug Vorn
06:31
<@Chalcedon>
licence?
06:32
<@McMartin>
DUK as in the predecessor to S-Video that the 3DO used for its videos.
06:32
<@Vornicus>
License: the file that says what you're allowed to do with the package
06:33
<@Vornicus>
usually it contains the text of the GPL or the like.
06:35 * Vornicus hugs Chalcy.
06:35
<@ToxicFrog>
Umm.
06:35
<@ToxicFrog>
The only S-Video I know is the connector/transmission format.
06:35
<@ToxicFrog>
And yes, that sounds pretty terrible.
06:35
<@McMartin>
I kind of worked out the memory corruption bits in Sable early on.
06:36
<@McMartin>
We abandoned SDL_mixer almost immediately for UQM because you can't seek in the .ogg track.
06:36
<@McMartin>
Which is, um, Kind Of Important.
06:36
<@McMartin>
You also can't play two .oggs at once, which wasn't a problem immediately but would become fatal as soon as Remix Pack 2 came out.
06:38 * Vornicus floons
06:40 Vornicus is now known as Vornicus-Latens
06:41
<@ToxicFrog>
Hmm. Where is MixSDL?
06:41
<@ToxicFrog>
Google seems to have trouble finding it and it's not on the SDL libraries page.
06:41
<@Vornicus-Latens>
It's only in UQM I think
06:42
<@ToxicFrog>
Oh.
06:43
<@McMartin>
As I said
06:43
<@McMartin>
Only VControl has actually become a spinoff project, and the standalone version is sorely in need of updating
06:43
<@McMartin>
As even 30 FPS will produce noticable control glitches in things like menus.
06:45
<@McMartin>
And the API didn't generalize well, etc.
06:45 MyCatVerbs [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has quit [Connection reset by peer]
06:46 MyCatVerbs [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has joined #code
06:49
<@ToxicFrog>
McMartin: well, I wasn't sure if MixSDL was something built for UQM, or an independent library that you were using?
06:49
<@McMartin>
Oh
06:49
<@McMartin>
It's built by Alex Volkov, one of coredev.
06:49
<@McMartin>
It's an integral part of UQM, and TMK doesn't exist elsewhere.
06:55
< Forjeh>
being a geek is great
06:56
< Forjeh>
sharing a meal with friends, discussing the future of nuclear power generation
07:01
< Reiv>
07:01
< Reiv>
One... way of putting it...
07:11
< Forjeh>
heh, Chalcedon: "But I don't have a computer that doesn't have Python installed!"
07:16 Forjeh [~Forj@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
07:17 Forj [~Forj@Nightstar-869.bitstream.orcon.net.nz] has joined #code
07:23
<@McMartin>
So true
07:23
<@McMartin>
Python shipped with my prefab systems, even.
07:25
< Reiv>
(We were looking for the error that a Windows box would give if you tried to do the command without installing Python properly first.)
07:37
<@McMartin>
It'll pop up a "what do you want to open this with" dialog, same as if you try to open a .FRUNGY file.
07:38
< Reiv>
Er
07:38
< Reiv>
This being from a cmd window.
07:40
< Forj>
anyone, quick python question: is there a way to limit the random.choice function? say to only pick entries in a list above a certain number?
07:40
<@jerith>
Hmm...
07:40
<@jerith>
Not that I know of.
07:40
<@jerith>
But!
07:41
<@jerith>
You can do something like: random.choice([i for i in mylist if i > n])
07:41
< Forj>
ok, that's what I'm after, thanks
07:42
< Forj>
means I can use 1 table instead of 2 90% similar ones :)
07:42
<@jerith>
Yay DRY!
07:42
<@jerith>
Yay also list comprehensions!
07:45
<@jerith>
Forj: http://www.diveintopython.org/
07:46
< Forj>
cheers :)
07:46 * Forj changes up his tables
07:53 * McMartin <3 list comprehensions
07:55
<@jerith>
I miss them in Rbuby.
07:55
<@jerith>
*Ruby.
07:55
<@jerith>
Actually, i have them in Ruby. They just look very different.
07:56
<@jerith>
myList.select { |i| i > n }
07:56
<@jerith>
For that one above.
07:58
<@jerith>
Or mylist.select { |i| i > n }.collect { |i| f(i) } instead of [f(i) for i in mylist if i > n]
08:00 * McMartin really dislikes Ruby callbacks.
08:01
< Forj>
hrm, jerith, do you mind troubleshooting that function for me?
08:02
<@jerith>
Sure. Which function?
08:03
< Forj>
random.choice([i for i in mylist if i > n])
08:03
<@jerith>
Umm... what's the trouble I'm shooting?
08:03
< Forj>
I got it to run, but it's picking from items below 7 in the list (where n =7)
08:04
<@jerith>
That's odd...
08:04
< Forj>
I have a list of 25 lists, the first seven of which I want to exclude from this random.choice
08:05
< Forj>
so I have a function the returns: random.choice([i for i in TRAP_TYPE_TABLE if i > 7])
08:05
< Forj>
*that
08:05
<@jerith>
Oh, that's a different problem.
08:06
< Forj>
oh
08:06
< Forj>
I thought that is what I described before, and the code you gave seemed to make sense...
08:06 McMartin [~mcmartin@Nightstar-6825.dsl.pltn13.sbcglobal.net] has quit [Quit: brb]
08:06
<@jerith>
Sorry, I thought you only wanted to choose from *values* above a certain number.
08:06
< Forj>
ah
08:07
<@jerith>
You can use sequence slicing for that.
08:07
< Forj>
no, above the nth item
08:07
< Forj>
duh...
08:07
< Forj>
I've met that
08:07
<@jerith>
mylist[7:]
08:07 * Forj goes and looks it up
08:08
< Forj>
cheers
08:08
<@jerith>
Happy to help. :-)
08:09
<@jerith>
Helping smart people with a language I love is one of my great joys in life.
08:09
< GeekSoldier>
You love Python, jerith?
08:09
<@jerith>
I do indeed.
08:09
< GeekSoldier>
I'm learning it now. it's an impressive language.
08:10
<@jerith>
I like Ruby and can stand Java, but Python's my language of choice for most things.
08:11
<@jerith>
I've heard it said that Ruby's more powerful, but using a lot of the "power" it provides leaves me feeling unclean.
08:11
< GeekSoldier>
I've been intending to look at Ruby, but have never gotten around to it.
08:11
< GeekSoldier>
Same with Python, until now.
08:12
<@jerith>
It seems to be mostly the illegitimate child of Smalltalk and Perl.
08:12
< GeekSoldier>
Ruby?
08:12
<@jerith>
(Or so I'm told.)
08:12 * jerith nods.
08:12
< GeekSoldier>
well, I like perl at least.
08:12
<@jerith>
It has lots of nifty features, but I disagree with some of the syntax.
08:16 * GeekSoldier thwaps self.
08:16
< GeekSoldier>
Why am I thrashing on "create a function called isMultiple(n,m) that returns true if m is a multiple of n, false otherwise"?
08:18
< GeekSoldier>
it's so simple! Gah!
08:18
<@jerith>
lambda n,m: return not (m % n)
08:18
< Reiv>
augh perl
08:18
<@jerith>
That should do it, no?
08:19
<@jerith>
And for what are you using the pathologically eclectic rubbage lister?
08:20
<@Chalcedon>
for item, location in zip(live_bins, bin_locations):
08:20
<@Chalcedon>
08:20
<@Chalcedon>
what on earth does it do?
08:20
< GeekSoldier>
nay, it'spython I'm thrashing on...
08:20 Chalcedon is now known as ChalcyReiv
08:20
< GeekSoldier>
Bad GS!
08:21 GeekSoldier is now known as Soldier
08:21 * ChalcyReiv give GS cookie?
08:21
<@jerith>
http://applications.linux.com/article.pl?sid=07/02/16/1937237
08:22
< Reiv>
jertih: Any ideas?
08:22
< Reiv>
We're sorta stuck, tired, and in a hurry.
08:23
<@jerith>
Chalcy: zip(list1, list) returns [(list1[0], lis2[0]), (list1[1], list2[1]), ...]
08:23
< Soldier>
linus vs. Gnome... this is going to be fun.
08:26
<@jerith>
So that gives you a pair of values, one from each list, in every iteration.
08:26
<@jerith>
:-)
08:27
< Reiv>
Yay!
08:27
<@jerith>
Sorry for the delays in my communication. Dodgy connection again.
08:27
< Reiv>
That just let us grok the netire function in one fell swoop.
08:27
< Reiv>
Thank you, jerith.
08:27
<@jerith>
Yay!
08:27
< Forj>
indeed, thanks from the household in general
08:27
< Reiv>
And no problem at all - it's a oriveledge having such help on hand. :)
08:27
< Forj>
got my table working too :)
08:27 * jerith accepts the gifts piled upon hi.
08:28 * ChalcyReiv cookies jerith
08:28
<@jerith>
+m
08:28
<@jerith>
Cookies!
08:28 * jerith nroms.
08:29
< Reiv>
*typos :p
08:29
< Soldier>
http://pastie.caboo.se/41193
08:30 * Soldier selfthwaps again.
08:30 Soldier is now known as GeekSoldier
08:30
< GeekSoldier>
it's time for a break, perhaps.
08:32
<@jerith>
GS: Did you see my lambda above?
08:33
< GeekSoldier>
ah ha... reverse my logic, no?
08:34
<@jerith>
def isMultiple(n, m): return not (m % n)
08:34
<@jerith>
The not also has the effect of making it True or False instead of numbers. :-)
08:35
< GeekSoldier>
much more elegant.
08:36
<@jerith>
Perhaps this solution rather than ifs occurred to me because of the Erlang and Lisp I've been looking at recently...
08:36
< GeekSoldier>
yeah, that's where that lambda came from too, eh?
08:36
< GeekSoldier>
;)
08:37
<@jerith>
From Lisp, yes.
08:37
<@jerith>
Python's lambdas are annoyingly limited (one line only) but that's not a real problem.
08:37
<@ChalcyReiv>
jerith : *args, **named_args
08:37 * ChalcyReiv hugs?
08:37 ChalcyReiv is now known as Chalcedon
08:38
<@jerith>
I just don't want to have to name the innards of a higher-order function.
08:38
< Reiv>
what do the * and ** mean?
08:38
< Reiv>
ANd/or what the heck *are* those thingies?
08:38
<@jerith>
*args gives you back any unnamed optional args in a list.
08:39
<@jerith>
**kwargs gives you back any named optional args in a list.
08:39
<@jerith>
def foo(a1, *args, **kwargs):
08:40
<@jerith>
If I call foo(b1, b2, bar=b3) I'll get a1=b1, args=[b2], kwargs={"bar": b3}
08:40
<@jerith>
Does that help?
08:42
<@Chalcedon>
I think I see
08:42
<@Chalcedon>
thank you
08:42
<@jerith>
The * and ** are syntax to tell the inerpreter that those two are special collector args rather than normal args.
08:42
<@Chalcedon>
I'm not sure how that helps me write the docs though.
08:42
<@Chalcedon>
ok
08:42
<@jerith>
You can also use the * and ** to pass those back to another funciton.
08:44
<@jerith>
http://rafb.net/p/c43wId11.html <-- An example of using that in a wrapper function.
08:46
< GeekSoldier>
for a function isB(x,y,z) that returns True if y < x < z:
08:47
< GeekSoldier>
def isB(x, y, z): return ((y<x) and (x<z))
08:47
<@jerith>
That looks reasonable.
08:48
< GeekSoldier>
it works. I just think it's clunky.
08:48
<@jerith>
IIRC, you can actually return (y < x < z)
08:49
< GeekSoldier>
Yes. yes you can.
08:49
< GeekSoldier>
Thanks again, jerith.
09:00
<@jerith>
And I must go now. Cheers all.
09:01
< GeekSoldier>
take care, jerith.
09:04
< Forj>
cheers jerith
09:07 MahalAFK [~Mahal@Nightstar-4998.worldnet.co.nz] has quit [Client exited]
09:24 EvilDarkLord [althalas@Nightstar-15301.a88-115-211-62.elisa-laajakaista.fi] has quit [Ping Timeout]
09:32 ThaquiLaptop [~Thaqui@Nightstar-26359.jetstream.xtra.co.nz] has quit [Quit: Leaving]
09:39 EvilDarkLord [althalas@Nightstar-15301.a88-115-211-62.elisa-laajakaista.fi] has joined #code
09:51 * jerith wanders back, possibly briefly.
09:55
< Forj>
can't sleep?
09:57
<@jerith>
'Tis lunch time here. :-)
09:57
< Forj>
ah
09:57
<@jerith>
I had to go because I was leaving a freind's place to come home and meet a cousin who's taking me to where I'm being subcontracted some house sitting.
09:57
< Forj>
I can keep track of two timezones
09:58
< Forj>
auto correcting for three is stretching it
09:58 * jerith grins.
09:58
< Forj>
thats a fairly complex reason
09:59
<@jerith>
For me, it's fairly easy. Leftpondians and kiwis are at about the same time (give or take a few hours) just on different days.
09:59
< Forj>
lunchtime here is more than a few hours ago...
10:05
< Reiv>
jerith: Chalcedon would like to thank you for your help tonight.
10:06
< Reiv>
She does in fact ravish in thanks!
10:07
<@jerith>
:-)
10:07
<@jerith>
Happy to be of se4rvice in some small way.
10:09
< Reiv>
...I could make some comment about 'service', but I'm within throwing range of Forj...
10:10 You're now known as TheWatcher
10:10
< Reiv>
However, far from a small help, you helped the dear Chalcy actually *finish* her thesis *before* midnight - a very substantial service. So thankye. :)
10:11
<@jerith>
Yay finish thesis!
10:12
<@jerith>
Can Chalcy help me finish mine, perchance? For starters I need an actual literature review...
10:12 * jerith ducks.
10:13
< Reiv>
pft
10:13 * jerith ponders this dodgy laptop.
10:22
<@jerith>
It won't turn on any more. :-0(
10:22
<@jerith>
-0
10:28
< Reiv>
Thesis done - hometime!
10:28 Reiv [~Chalcedon@Nightstar-869.bitstream.orcon.net.nz] has quit [Quit: Leaving]
10:29 * Chalcedon hug jerith
10:29
<@Chalcedon>
thank you for your help
10:30
<@Chalcedon>
I'd be more than willing to help... if I could actually be of any
10:30 * jerith is happy to be of service.
10:30
<@Chalcedon>
:)
10:31 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Quit: tis over]
10:31
<@jerith>
Don't tempt me -- I'm quite capable of sending a bunch of image processing references to you to be sorted for relevence...
10:36
< Forj>
night all!
10:36 Forj [~Forj@Nightstar-869.bitstream.orcon.net.nz] has quit [Quit: Gone]
10:53 ReivOut is now known as Reiver
12:37 Aunir_ [IceChat7@Nightstar-4864.pools.arcor-ip.net] has joined #code
12:38 GeekSoldier [IceChat7@Nightstar-4036.pools.arcor-ip.net] has quit [Ping Timeout]
12:49 Aunir_ is now known as GeekSoldier
13:38 GeekSoldier [IceChat7@Nightstar-4864.pools.arcor-ip.net] has quit [Quit: Always try to be modest, and be proud about it!]
13:47 MyCatVerbs is now known as MyCatStudies
14:23 gnolam [Lenin@Nightstar-13557.8.5.253.se.wasadata.net] has joined #Code
14:25 ErikMesoy [~ejm@Nightstar-3192.bb.online.no] has joined #code
14:26
< ErikMesoy>
Hello. I am new. How long is it customary to lurk and be helpful before asking questions for own benefit?
14:28
< AnnoDomini>
Dunno.
14:29
< gnolam>
About 2.6 seconds I believe.
14:30
< AnnoDomini>
Hunh. The time in Solitaire is at max 8191 seconds.
14:31 * ErikMesoy recognizes it as 2^13-1
14:32
< AnnoDomini>
I wonder why it doesn't loop around.
14:34
<@jerith>
We have a Viking in our midst!
14:35
< ErikMesoy>
What? Where!?
14:35 * ErikMesoy looks around frantically
14:35
< AnnoDomini>
I AM THE DM. I WEAR THE VIKING HAT.
14:36
<@jerith>
With horns?
14:36
< AnnoDomini>
Yes. Of course.
14:37 * jerith surreptitiously cuts off the horns and hides the hacksaw in a mess of perl code.
14:37
<@jerith>
So, Erik, what can we help you with?
14:37 * AnnoDomini grumbles, now having a mere useful helmet.
14:38
<@jerith>
The standard here is pretty much ask what you need as long as you contribute something useful sometime.
14:38
< ErikMesoy>
I was wondering how to refer to sphere surface area or the like for purposes of space battles and areas of fire. The first units I could think of were radial degrees and square radians.
14:39
<@jerith>
Steradians?
14:39
< AnnoDomini>
Make up your own unit. Call it the cubic handwavial.
14:39
<@jerith>
Energy weapons or projectiles?
14:40
< ErikMesoy>
Both. No missiles, though, which means the weapons are straight lines.
14:41
<@jerith>
Energy you're more worried about dispersion, so that would be dispersion rate times distance.
14:41
<@jerith>
Pretty much the same with unpowered projectiles.
14:42
< ErikMesoy>
Hmm. The Moon reflector distends a laser beam to about 1mile, eh?
14:42
<@jerith>
That wouldn't be straight steradians, though.
14:43
<@jerith>
Moon reflector?
14:43
<@jerith>
(Most of the lunar reflection I've seen is RF rather than laser.)
14:44
< ErikMesoy>
Might be radio, anyway, I vaguely remember from (a debunking of (the idea that (the moon landing was a hoax))) that there is a simple way of checking that SOMEONE was on the moon, and that's to send a signal there and listen for the answer a couple of seconds later. And there's this vague notion in my head that the beam disperses from 1mm to 1mile over that distance.
14:45
< gnolam>
Anyway, I'd go with steradians. Fits nicely into the concept of radiance and irradiance.
14:45
<@jerith>
That depends on how well the beam is collimated.
14:46
<@jerith>
gnolam: That assumes spherical dispersion, though.
14:46
<@jerith>
A properly collimated beam has an essentially constant cross-section.
14:46
<@jerith>
Of course, this is impossible to achieve.
14:47
< ErikMesoy>
Hmm. Tech level 2100 or thereabouts should have a high degree of collimation on laser weapons.
14:47
<@jerith>
So you want some kind of diameter per distance modifiar.
14:48 * ErikMesoy thanks for the help, then HEAD ASPLODE as too much information pours in.
14:48
< ErikMesoy>
Ow.
14:48
<@jerith>
Erik: I'd expect them to be using particle beams or higher energy photon weapons by then.
14:48
< ErikMesoy>
I think I have what I need.
14:48
< ErikMesoy>
There's a long story involving a tech virus and a post-apocalyptic setting.
14:48
<@jerith>
Projectiles you're concerned about accuracy.
14:48
< ErikMesoy>
Post-apocalyptic space age.
14:49
<@jerith>
So you're looking at something similar to the beam cross-section of an energy weapon, but that's a probabilistic thingy.
14:50 * ErikMesoy lies on the floor, 'splodey brains dribbling out of his head
14:50
<@jerith>
Chance of a hit is the cross-section of target divided by the cross section of the trajectory possibility.
14:50
<@jerith>
Although technically that would be gaussian.
14:51 Reiver is now known as ReivZzz
14:51
<@jerith>
Rather than a constant.
14:51 * jerith tucks Reiver into bed with a cup of cocoa and a double shot of brandy.
14:53
<@jerith>
That's actually an interesting problem.
14:54
< gnolam>
CEP FTW.
14:54
< ErikMesoy>
To me, the words "interesting problem" mean "I'll get hell of a headache if I try to work this out".
14:55
< ErikMesoy>
To my professor, though, who has a good sense of humor, it means "Let's put this on the next test."
14:55
< ErikMesoy>
CEP?
14:55
<@jerith>
If you look at the target area in polar coordinates, the angle is essentially uniformly random. The radius would be a gaussian distribution peaking at the centre.
14:55 * jerith tries to remember his statistics from five years ago.
14:56
< gnolam>
ErikMesoy: circular error of probability.
14:57
< gnolam>
-of
14:57 * gnolam needs more caffeine.
14:58
< ErikMesoy>
CEP?
14:58
< ErikMesoy>
That's circular error probability?
14:58
< ErikMesoy>
Sounded like something else. Can't remember what now, though.
14:59
< gnolam>
SEP? :)
14:59
< ErikMesoy>
Possibly.
14:59
< ErikMesoy>
That sounds like a good thing to put over the whole piece of pulp I'm now writing.
14:59
< gnolam>
Which, if you have a mathematician on retainer, is exactly what it is. ;)
14:59
< ErikMesoy>
Snrrk.
14:59 * jerith giggles.
14:59
< ErikMesoy>
"Here is some technobabble, SEP, you are not expected to understand this."
15:00
< ErikMesoy>
*SEP field, that is
15:00
<@jerith>
I have a tendency to try to work things out from first principles.
15:00
< ErikMesoy>
Hm. SEP to make people not read my pulp too closely, or proper use of steradians and whatnot? Difficult choice.
15:01
<@jerith>
Mostly because I can't remember the derived equations.
15:01
<@jerith>
I'd go for proper maths, but that's just the engineer in me.
15:01
<@jerith>
I'd also approximate a lot of the difficult stuff.
15:39 ErikMesoy [~ejm@Nightstar-3192.bb.online.no] has quit [Client exited]
15:43 EvilDarkLord [althalas@Nightstar-15301.a88-115-211-62.elisa-laajakaista.fi] has quit [Ping Timeout]
15:45 EvilDarkLord [althalas@Nightstar-15301.a88-115-211-62.elisa-laajakaista.fi] has joined #code
16:26 GeekSoldier [Rob@Nightstar-4864.pools.arcor-ip.net] has joined #code
16:27
<@ToxicFrog>
jerith: in Python, 0 is false?
16:27
< GeekSoldier>
yes.
16:27
<@jerith>
Indeed.
16:27
<@ToxicFrog>
...perhaps I've been working in lua too long, but that feels icky.
16:28
<@jerith>
0, None, False, and *possibly* empty sequences/maps.
16:29
<@ToxicFrog>
(since in lua, nil and false are logically false, but everything else - including 0, "" and {} - is logically true)
16:29
<@jerith>
Same with Ruby.
16:41
<@jerith>
Yes, [], {} and '' are also False.
16:41 * ToxicFrog ponders.
16:42 * ToxicFrog ponders specifically the use of Agar instead of GTK+
16:45
<@ToxicFrog>
This means binding it to Lua, tho...
16:46 MyCatVerbs [~rb6822@Nightstar-23804.cs.bris.ac.uk] has joined #code
16:46 * EvilDarkLord waves to MCV.
16:47 ErikMesoy [~ejm@Nightstar-3192.bb.online.no] has joined #code
16:51
< MyCatVerbs>
Hello Evil.
16:59 * jerith waves at the Viking.
16:59 * ErikMesoy says something in Vikingese, aka bad Norwegian.
17:00
<@jerith>
I work with a Viking.
17:01
<@jerith>
Proper Norwegian name, too. Atle.
17:01
< ErikMesoy>
My uncle is called Atle.
17:02
< ErikMesoy>
And my proper name is Norwegian, it's Erik Mes?y.
17:02
< ErikMesoy>
But most don't like the ?.
17:02
< EvilDarkLord>
Or rather, their parsers don't.
17:02
<@jerith>
My IRC client doesn't like it, for one.
17:06
< MyCatVerbs>
jerith: all the REAL hackers use plan9 anyway. UTF-8 forever!
17:07
< gnolam>
Doesn't really help with Nightstar's ircd, does it?
17:08
<@jerith>
Heh. IRC is just a byte-stream.
17:09
<@jerith>
If you send UTF-8 it'll pretend it's 8-biut chars and let the client deal with it.
17:10 * MyCatVerbs wonders if he ought, one day, to try Plan 9 himself. Hehehe.
17:10
< ErikMesoy>
?
17:11
< MyCatVerbs>
ErikMesoy: ?ml??ts?
17:12
< ErikMesoy>
u with umlaut, emm, ell, a with NW-SE marking, u with SW-NE marking, t, s, upside-down bang. Is that correct?
17:12
< gnolam>
jerith: ah, yes, but the /ircd/ is the one that's usually picky about that.
17:12
< gnolam>
Haven't actually checked Nightstar's, but on other networks they have a tendency to barf at non-7-bit-ASCII nicks.
17:14
<@jerith>
Yes, nicks.
17:14
<@jerith>
Because it has to parse those.
17:14
<@jerith>
But you can send pretty much whatever encoding you like in the text.
17:14
< MyCatVerbs>
ErikMesoy: yep, perfect
17:14
< ErikMesoy>
Yay.
17:15
< MyCatVerbs>
ErikMesoy: except that it's called an, "exclaimation mark," in civilised countries, rather than a, "bang." PHILISTINE! =D
17:15
< ErikMesoy>
Sorry, force of hacker habit, from terms such as "bang path" and "interrobang".
17:15
< ErikMesoy>
I am aware that some call it an *exclamation* mark.
17:15
< ErikMesoy>
Not "exclaimation". :?
17:16
< MyCatVerbs>
Nah, I should probably switch to using the term 'bang' myself. It's terser.
17:16
< MyCatVerbs>
Oi, buggerit. I dropped English at the first friggin' oppourtunity, m'kay? I am now entering deliberately into a pact of not knowing and never caring again.
17:17
< ErikMesoy>
Snrrk.
17:17
< ErikMesoy>
I dropped English even earlier. I went to a Norwegian school and spoke it better than the teacher from reading a lot.
17:17
< ErikMesoy>
So I was excused because I kept correcting him.
17:17
< MyCatVerbs>
Nice. I've stopped reading anything that doesn't have brackets or curly braces on the cover.
17:18
< ErikMesoy>
So I sat down and read The Belgariad and Farseer Trilogy and Sons of Anubis and everything I could lay my hands on by Asimov.
17:18
< MyCatVerbs>
Bwuh. The best I'm doing at the moment is Hemingway. >_>
17:19
< ErikMesoy>
That's nice, too.
17:19 You're now known as TheWatcher[afk]
17:19
< ErikMesoy>
I have impeccable spelling, but impeachable grammar due to my rather twisted sense of humor.
17:20
< gnolam>
Ewww.
17:20
< MyCatVerbs>
I try to imitate Poe's writing style, because I'm a jerk.
17:20 * gnolam did not want the mental image of MyCatStudies doing Hemingway.
17:20 * ErikMesoy slaps gnolam with a trout for passing the mental image around.
17:20 * GeekSoldier likes to emulate Kafka.
17:21 * MyCatVerbs slaps gnolam with Hemingway's maggot-ridden member for the sake of messing with his head.
17:21 * ErikMesoy asks AnnoDomini to witness that ErikMesoy can bring far more brain-torturing things to bear if necessary. >:)
17:22
< MyCatVerbs>
Oh, and Verilog is teh evil incarnate.
17:22
< MyCatVerbs>
Full of horrible pitfalls and misfeatures that had (one hoped) been long since corrected in everything more advanced than Algol or VB.
17:22
< gnolam>
More evil than VHDL?
17:23 * MyCatVerbs shudders.
17:23
< gnolam>
The Verbose Hand-Destroying Language.
17:24
< gnolam>
It makes Java look like /Perl/.
17:24
< MyCatVerbs>
Okay, okay, so I have it relatively easy here. But c'mon, whoever heard of a compiler that didn't at least throw up a warning flag when the programmer made a typo and thus caused the code to refer to an unbound name!?
17:25
<@ToxicFrog>
gnolam, jerith: the RFC specifically restricts nicks to a certain character set, something like [][a-zA-Z0-9{}_`]
17:25
< MyCatVerbs>
ToxicFrog: even cooler, the RFC also states that the [] and {} characters should be considered as upper/lower case versions of one another (respectively, or perhaps respectively backwards, I can't remember).
17:25
<@ToxicFrog>
If it were just parsing, the constraints would just be [^!]
17:26
<@ToxicFrog>
MyCatVerbs: no, you have it right. [] is uppercase and {} is lowercase.
17:26
<@ToxicFrog>
This is important to know when resolving nick collisions and basically useless at all other times~
17:26
< MyCatVerbs>
Oh, w00t for guesswork.
17:26
< ErikMesoy>
In the news, a study of Norwegian consumers' opinions regarding gene-modded food finds that one-third of the general population believes that tomatos do not contain genes.
17:26
<@ToxicFrog>
...
17:27
< ErikMesoy>
*facepalm, deep shame, attempted disassociation from clueless people*
17:27
< gnolam>
That's people for you.
17:27
< gnolam>
But I thought you guys were way too wholesome to eat anything GM. ;)
17:27
< ErikMesoy>
Technically, we've all been eating GM for about 1e4 years.
17:27
< MyCatVerbs>
I for one welcome our mutant Frankensteinian tomatoes.
17:27
< ErikMesoy>
Since that's when humans began to domesticate things like, say, goats.
17:28
< MyCatVerbs>
Dammit, I want my horrific mutant superpowers already! Quick, add more radiation to my dinner!
17:28
< MyCatVerbs>
s/Quick/Waiter/
17:28 Forj [~Forj@Nightstar-869.bitstream.orcon.net.nz] has joined #code
17:28
< ErikMesoy>
And when we said "this goat is nice and fat, put it in the paddock with all the female goats", we began GM.
17:28
< MyCatVerbs>
Heya Forjeh.
17:29
<@ToxicFrog>
I've never had goat meat.
17:29 * GeekSoldier wants to try lab-grown meat.
17:29
< ErikMesoy>
No. But the point is, after that it extended to cows and wheat and sheep and whatnot.
17:29
< ErikMesoy>
And apples. Painting the flowers with pollen brushes and the like.
17:29
< MyCatVerbs>
ErikMesoy: ahdunno. We're talking the difference between letting a programmer write the OS for a system (analogous to selective breeding) and giving him a soldering iron and telling him to go wild (analogous to base-editing).
17:30
< ErikMesoy>
Bah. *dismisses with airy wave of hand*
17:30
< ErikMesoy>
Matter of degree.
17:30
< ErikMesoy>
*continues to wave hand*
17:30
< gnolam>
Back then nobody did stupid stuff like splicing, say, soy protein genes into tomatoes.
17:30 EvilDarkLord [althalas@Nightstar-15301.a88-115-211-62.elisa-laajakaista.fi] has quit [Ping Timeout]
17:30
< MyCatVerbs>
Personally, I'm all for it. I just wanna see the programmer drop the soldering iron and burn himself in the nuts. Slapstick keeps me going, y'dig?
17:30
< gnolam>
On account of soy beans being pretty hard to cross-breed with tomatoes. And even harder to cross-breed with goats.
17:30
< MyCatVerbs>
gnolam: y'know Rule 34?
17:30
< ErikMesoy>
There is porn of it?
17:30
< MyCatVerbs>
"There is porn of it."
17:31
< MyCatVerbs>
Hehehe, yep.
17:31
< MyCatVerbs>
gnolam: congratulations on inspiring an entire new genre.
17:31
< ErikMesoy>
EvilDarkLord and I coined Rule 53: Complaining about it will serve only to attract more viewers.
17:32
< ErikMesoy>
http://www.questionablecontent.net/view.php?comic=715
17:34
< gnolam>
Eh, I have been stating /that/ rule for years.
17:34
< gnolam>
It's gotten to the point that whenever someone in my family says something that can be extrapolated into a fetish, someone else will chime in with "*GLINGLE GLINGLE*".
17:35
< ErikMesoy>
Now I'm curious.
17:35
< MyCatVerbs>
Where does "Glingle!" come from?
17:35
< gnolam>
"Hogfather".
17:35
< gnolam>
Pterry.
17:35
< ErikMesoy>
Ah. One of the few books I've missed, annoyingly.
17:35
< ErikMesoy>
That and Monstrous Regiment.
17:36
< MyCatVerbs>
I've read Hogfather, ages ago, but I can't remember anything in it to do with r.34. oO
17:36
< ErikMesoy>
I even have the Mappe. "I said that there would never be a map of Discworld. This is it."
17:36
< MyCatVerbs>
ErikMesoy: oooh, Monstrous Regiment is awesome. Go for it.
17:36
< gnolam>
The Hogfather (the Disc's version of Santa Claus) is gone. Since there's so much belief floating around, any time someone states something believable (like, say, a sock-eating deamon) it pops into existence with a *glingle glingle*.
17:37
<@ToxicFrog>
I'm falling behind...I haven't read Monstrous Regiment or Thud.
17:37
< gnolam>
The glingling in our case refers to the fact that some poor sod in Japan or Germany just got his life ruined by his new fetish. ;)
17:37
< MyCatVerbs>
AHHHH, yes! Ridcully's fascinating vocabluary!
17:37 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
17:37 mode/#code [+o Chalcedon] by ChanServ
17:37
<@ToxicFrog>
I do, however, have an ebook of Hogfather.
17:37
<@ToxicFrog>
If anyone's interested.
17:38 * Chalcedon hug TF
17:38
< AnnoDomini>
Hogfather was, indeed, good.
17:38
< MyCatVerbs>
gnolam: I loved the sauce. ^^
17:39 * jerith hugs Chalcy.
17:39
<@jerith>
How's the thesis?
17:39 * Chalcedon hug jerith
17:39
< GeekSoldier>
printed!
17:39
<@Chalcedon>
I just discovered that I forgot to relable my contents page
17:40
<@Chalcedon>
other than that, printed, complete and ready to go
17:40 * ToxicFrog snugs Chalcy
17:40
<@ToxicFrog>
Yaye!
17:40
< ErikMesoy>
mm, theses
17:40 * ToxicFrog pfft at the wikipedia article on Discworld. Pyramids: School stories, Egyptian mythology, Quantum physics, Greek philosophy, UK driving tests
17:41
< ErikMesoy>
wate wut?
17:41 EvilDarkLord [althalas@Nightstar-15301.a88-115-211-62.elisa-laajakaista.fi] has joined #code
17:41
<@jerith>
I suppose now would be an inopportune time to point out that LaTeX would have done your ToC automagically?
17:42
< GeekSoldier>
but that runs counter to the whole "learning to do something different for the sake of the thesis" plan.
17:43
<@ToxicFrog>
ErikMesoy: it lists major themes/works/genres that the each book parodies.
17:43
<@ToxicFrog>
That's the list for Pyramids.
17:43
< ErikMesoy>
Mkay.
17:44
<@ToxicFrog>
...and, damn, I am behind.
17:44
<@ToxicFrog>
The Last Hero, Monstrous Regiment, Thud, and soon Making Money all need reading.
17:45
< MyCatVerbs>
Making Money?
17:45
< ErikMesoy>
Sounds like the followup to Going Postal.
17:45
< ErikMesoy>
"The A-M mint is rather moribund..."
17:45
< MyCatVerbs>
PT put out another one? Waitasecond, I thought Going Postal ended with the obvious lead for a book like Making Money dying horribly?
17:46
< ErikMesoy>
Obvious lead, yes. The Mint is still there, I suppose. And in need of demoribundization.
17:51 MyCatVerbs [~rb6822@Nightstar-23804.cs.bris.ac.uk] has quit [Quit: Swim, swim, hungry!]
17:55
<@ToxicFrog>
It's a sequel to Going Postal involving the mint.
17:55
<@ToxicFrog>
It's finished, but has not yet been published.
17:55 Forj [~Forj@Nightstar-869.bitstream.orcon.net.nz] has quit [Quit: Gone]
18:06
< ErikMesoy>
As some other channels have seen, I write stories and blurbs for a D&D-meets-Risk-in-space game, and I've run dry on names. Is there anyone who wants their name put in as a cameo appearance?
18:12
<@Vornicus-Latens>
Forj: your problem is that i is actually the /object/, not the index, which can't really be compared to a number.
18:12
< ErikMesoy>
...Did I miss something? Forj left the room recently.
18:12
<@Vornicus-Latens>
...so he did.
18:12
<@Vornicus-Latens>
bah
18:13 * Vornicus-Latens was solving his "limit what I can choose" thing.
18:13
< gnolam>
... D&D meets /Risk/..?
18:14
< ErikMesoy>
Or GalCiv.
18:14
< ErikMesoy>
Creative roleplaying and storytelling about your nation/faction/people, with rules for declaring war and invading.
18:15
<@ToxicFrog>
Cool.
18:16
< GeekSoldier>
interesting.
18:17
<@Vornicus-Latens>
(the correct way is simply random.choice(mylist[7:])
18:17
<@ToxicFrog>
ErikMesoy: I would have no objection.
18:17
<@ToxicFrog>
(this sounds like a job for the random name generator!)
18:17
< ErikMesoy>
:P
18:17
< ErikMesoy>
Random name generators and my head work in the same way these days - either I get random syllables, or I get John Smith and George Bush.
18:18
< ErikMesoy>
Neither are much good.
18:18 Vornicus-Latens is now known as Vornicus
18:18
<@ToxicFrog>
I was actually thinking something like Spellcast's, which combines random syllables to create names.
18:18
<@ToxicFrog>
The results are definitely not english names, though.
18:18 * ErikMesoy writes "ToxicFrog" into the story as a hacker
18:19
<@ToxicFrog>
How fitting~
18:20 * jerith ponders his old RNG.
18:20
< ErikMesoy>
What sort of virtual room (like a homepage) would you keep?
18:21
<@jerith>
http://www.jerith.za.net/code/cfnamegencode.html <-- The email in there is defunct, but iI can be reached at my nick at nightstar.net if you have queries.
18:21
<@ToxicFrog>
A mad-scientific one, of course.
18:22
< ErikMesoy>
Nifty.
18:23
<@jerith>
I'm available as a character. So is my alter-ego firxen.
18:23
<@Vornicus>
He would of course have an Avatar of SHODAN as the agent.
18:23
<@jerith>
We both like to be lowercase, though.
18:23
<@ToxicFrog>
Of course.
18:24
<@ToxicFrog>
It's not a proper mad-scientific base without at least one rampant AI.
18:26 * Chalcedon hug Vorn
18:27 * Vornicus hugs Chalcy.
18:28
<@Chalcedon>
I have written your message down for him
18:28
<@Chalcedon>
he's had to stop coding and go to work.
18:28
<@Vornicus>
ok
18:28
<@Chalcedon>
he'll be home in.... ~9 hours
18:28
<@Vornicus>
cool beans
18:28 * Chalcedon woes for Monday
18:29 * Vornicus applies breakfast stoatsage.
18:29 * Chalcedon nrom
18:29
<@jerith>
Vorn: I seem to recall pointing that out to him, though.
18:29
<@Chalcedon>
however, I must finish getting dressed, dry my hair and get on the road.
18:29
<@Chalcedon>
jerith that doesn't mean he took it in.
18:29 * Chalcedon hugs all
18:30 * Vornicus hasn't read the whole backlog yet.
18:30
<@Chalcedon>
unfortunately we no longer leave our computers on overnight, so we can't be left messages any more
18:30 * Chalcedon flee
18:30
<@Vornicus>
That's what memoserv is for.
18:31
<@Vornicus>
have fun
18:31
< AnnoDomini>
MemoServ is... rather weak.
18:32
< AnnoDomini>
People generally take weeks to notice they have memos.
18:32
< AnnoDomini>
There is little visual difference between, "You have X memos." and "You have Y new memos."
18:33 Mahal [~Mahal@Nightstar-4998.worldnet.co.nz] has joined #Code
18:33 mode/#code [+o Mahal] by ChanServ
18:33
<@Vornicus>
true
18:34
<@jerith>
10:03 <@jerith> You can use sequence slicing for that.
18:34
<@jerith>
10:03 < Forj> no, above the nth item
18:34
<@jerith>
10:03 < Forj> duh...
18:34
<@jerith>
10:03 < Forj> I've met that
18:34
<@jerith>
10:04 <@jerith> mylist[7:]
18:34
<@jerith>
10:04 * Forj goes and looks it up
18:34
<@jerith>
10:04 < Forj> cheers
18:35
<@Chalcedon>
ok
18:35
<@jerith>
AD: That is the reason I delete all my memos.
18:40
<@Chalcedon>
gtg, bye all
18:40 * Chalcedon hugs everyone
18:40
<@ToxicFrog>
Bye!
18:40 * ToxicFrog hugs
18:40
< ErikMesoy>
Bye!
18:40 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Quit: to slep via binders]
18:40
< AnnoDomini>
Well, one has to have the mental discipline to delete them every time.
18:41 You're now known as TheWatcher
18:52
< GeekSoldier>
stupid Python question:
18:52
< GeekSoldier>
wait for input then continue, should be input(), no?
18:53
< GeekSoldier>
fixed... nevermind.
18:53
< GeekSoldier>
used raw_input instead.
19:07 Erik [~erikjakas@Nightstar-29045.stb.ubr06.newy.blueyonder.co.uk] has joined #Code
19:08
< Erik>
wats this channel about?
19:08
< GeekSoldier>
code.
19:08
< Erik>
wat u mean?
19:09
< GeekSoldier>
programming.
19:09
<@ToxicFrog>
Programming.
19:09
< Erik>
i dont know how to programe
19:09
<@ToxicFrog>
As in, not asking people to buy stuff for you, so don't ask again.
19:09
< AnnoDomini>
Ah, yes. The scammer from #S_M.
19:10 Erik [~erikjakas@Nightstar-29045.stb.ubr06.newy.blueyonder.co.uk] has left #Code []
19:10
< GeekSoldier>
oh, we've seen this fellow before?
19:10 MyCatStudies is now known as MyCatVerbs
19:12
< AnnoDomini>
I have.
19:12
< AnnoDomini>
Gave him a whack with the banjolnir.
19:12
< MyCatVerbs>
Bah, kids these days.
19:13
< ErikMesoy>
He asked me too. He shut up when I prompted him for detail.
19:14
< GeekSoldier>
Session Start: Sun Feb 18 20:09:17 2007
19:14
< GeekSoldier>
[20:09] <Erik> can u plz buy me something online for 14.50 can u plz?
19:14
< GeekSoldier>
[20:09] ->> Erik is ~erikjakas@Nightstar-29045.stb.ubr06.newy.blueyonder.co.uk (Erik Jakas)
19:14
< GeekSoldier>
[20:09] ->> Erik is on: #code
19:14
< GeekSoldier>
[20:09] ->> Erik using Troika.TX.US.Nightstar.Net ([216.201.150.42] Nightstar Networks Triumvirate Se)
19:14
< GeekSoldier>
[20:09] ->> Erik :End of /WHOIS list.
19:14
< GeekSoldier>
[20:09] <Erik> can u plz buy me something online for 14.50 can u plz?
19:14
< GeekSoldier>
yeah. buy me something... right.
19:15
< ErikMesoy>
The "something" was this: well iam from the usa and i want u to buy me a isnooker membership code can u plz plz?
19:16
< GeekSoldier>
right. I wish I could afford to buy something for myself.
19:19
<@jerith>
WTF would I give money to a random stranger?
19:20
< ErikMesoy>
Because he is "ur friend".
19:20
< AnnoDomini>
Pfffffft.
19:20
< MyCatVerbs>
Fuck that, I have no friends! I'm a CS student, we're not allowed to!
19:21
< ErikMesoy>
Doesn't everyone on this channel want to be your friend?
19:21
< ErikMesoy>
I'm a CS student too (admittedly underage), and I have friends.
19:21 * gnolam wonders what happened to the old Erik, who used to hang out in #S_M.
19:21
< ErikMesoy>
Here we call it "Informatics", though.
19:21
< MyCatVerbs>
ErikMesoy: perhaps I'm being melodramatic?
19:21
<@jerith>
On the contrary, MCV, you have at least one friend you're willing to post DVDs to...
19:22
< ErikMesoy>
Ah. I fail at noticing that sometimes.
19:22
<@jerith>
ErikMesoy: Underage?
19:22 * ErikMesoy has Asperger Syndrome.
19:22
< ErikMesoy>
Underage in that I'm not supposed to be advanced enough to take the course yet - I am over 18.
19:22
<@jerith>
My sister babysits a couple of Aspies.
19:22
< MyCatVerbs>
jerith: did they arrive intact? At all? I don't think I packed 'em very well... :/
19:22
< ErikMesoy>
I'm one of six in Norway who got into uni on a special program around age 16 or thereabouts.
19:23
< gnolam>
MyCatVerbs: use two pieces of cardboard and either packing or duct tape.
19:23
< AnnoDomini>
You obviously need to use thin sheets of steel as a superstructure.
19:23
< MyCatVerbs>
gnolam: would've been a good idea, aye.
19:23
< AnnoDomini>
:P
19:23
<@jerith>
MCV: Arrived in perfect condition, currently doing the rounds after I dropped the files on my ZFS share.
19:24 Vornicus [~vorn@Admin.Nightstar.Net] has quit [Ping Timeout]
19:24
< MyCatVerbs>
jerith: oh, sweet! I dropped a bunch of interpreters and compilers on the last disk too - apologies for the name mangling, (looks like I need to be more careful with growisofs options in future) - any use?
19:24
< gnolam>
It gets /our/ CDs at least to Hungary without even damaging the cover.
19:26
<@jerith>
I have a dr-scheme I was playing with a while back.
19:26
<@jerith>
I'll probably translate to CL and use emacs/slime, though.
19:27 AnnoDomini [~farkoff@Nightstar-29641.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
19:27 AnnoDomini [~farkoff@Nightstar-29521.neoplus.adsl.tpnet.pl] has joined #Code
19:27 * jerith boggles at Gentoo.
19:27
<@jerith>
* app-editors/teco
19:27
<@ToxicFrog>
....slime?
19:27
< MyCatVerbs>
jerith: eh, GNU CLISP is ~40 megs.
19:27
<@jerith>
Latest version available: 1.00-r3
19:27
<@jerith>
Latest version installed: [ Not Installed ]
19:27
<@jerith>
Size of files: 210 kB
19:27
<@jerith>
Homepage: http://www.ibiblio.org/pub/linux/apps/editors/tty/ http://w
19:27
<@jerith>
ww.ibiblio.org/pub/academic/computer-science/history/pdp-11/teco
19:27
<@jerith>
Description: Classic TECO editor, Predecessor to EMACS
19:27
<@jerith>
License: freedist
19:27
<@jerith>
19:28
<@jerith>
TF: slime is an emacs-based CLISP system.
19:28
< MyCatVerbs>
Scheme is a lot prettier than CLISP, too. Also there's the whole call-cc/ thing which I don't think CLISP supports directly.
19:28
<@jerith>
Usually SBCL or CMUCL on the backend.
19:36 Vornicus [~vorn@Admin.Nightstar.Net] has joined #code
19:36 Vornicus is now known as NSGuest-517
19:36 NSGuest-517 is now known as Vornicus
20:00
< MyCatVerbs>
Hrmn. Anyone know offhand how to kick VIM or screen into using brighter colours?
20:01
<@jerith>
Not me, sorry.
20:01
< MyCatVerbs>
I seem to get completely random brightnesses depending on whether I'm logged in from home or from school and whether I use urxvt or gnome-terminal or whether I start up a screen session.
20:02
<@jerith>
Although you can change vim's colour scheme if you want.
20:02
< MyCatVerbs>
It's quite irritating when everything comes out "highlighted" in dark purples and reds.
20:02
<@jerith>
It could be terminal-related.
20:03
<@jerith>
Anyways, my net connection is telling me it's bed time by dropping every packet with a port number in it.
20:03
< MyCatVerbs>
jerith: it seems to be, hence the semirandom behavoir depending on where I log in from.
20:03
<@jerith>
(Well, not all of them. But pretty much.)
20:22
< ErikMesoy>
Hmm.
20:22
< ErikMesoy>
I have been reading in my CS textbook. This is one of those annoying things which I am requires to do from time to time.
20:23
< GeekSoldier>
nod nod.
20:23
< ErikMesoy>
And now I am covering induction.
20:24
< ErikMesoy>
So, being familiar with G?del, I have begun stabbing at the concepts of "inductive step" and "base step", and I am curious as to whether there is a useful or even recognized system of logic in which the inductive step [ P(n) implies P(n+1) ] and the base step [ P(1) is true ] do not prove something for all n.
20:26
< Vornicus>
Well you do have to limit the domain of n - n! is 1 for n=0, and is a multiple of (n-1)! for all other positive n, but is undefined for negative n.
20:26
< ErikMesoy>
n among the natural numbers.
20:26
< Vornicus>
Seriously though, what you're looking at is a system where the Well-Ordering Principle does not apply. I don't know any.
20:27
<@ToxicFrog>
MyCatVerbs: depends on your terminal emulator settings.
20:27
<@ToxicFrog>
Screen doesn't define the colors, the terminal does.
20:27
< ErikMesoy>
Mm. Just by saying "Well-ordering principle" which I could look up, you've been more help than anyone here. :)
20:30
< ErikMesoy>
And by "here" in that last sentence I meant IRL, of course.
20:30
< ErikMesoy>
THanks.
20:30
< Vornicus>
I may have the name wrong - essentially it says that all sets of distinct positive numbers have a smallest element.
20:33
< ErikMesoy>
Yes. The induction-related one was the w-o *theorem*.
20:33
< MyCatVerbs>
ToxicFrog: screen through ssh through urxvt? I get different results based on whether I try it locally or remotely, even though I'm using screen+urxvt on both sides. :/
20:35 * ErikMesoy awards #code a Knowledge Award for containing enclued people, and hopes to be of similar help.
20:36
< MyCatVerbs>
ErikMesoy: mutual self-help, yo.
20:36
< MyCatVerbs>
Codeholics anonymous (well, except for our IP addresses).
20:37
< Vornicus>
those are mostly anonymous too.
20:38
< MyCatVerbs>
I could wave my dangly parts at a whole raft of RIAA lawsuits which disagree with you, for the most part. >_>
20:38
< ErikMesoy>
I'd comment, but it would turn into an anti-RIAA rant.
20:39
< GeekSoldier>
flamebait!
20:40
< ErikMesoy>
Nah, flamebait is when you say Music And Film Industry Association of America.
20:40
<@ToxicFrog>
MyCatVerbs: so check your urxvt settings?
20:40
< AnnoDomini>
ErikMesoy: I don't follow.
20:40
< ErikMesoy>
Well, look at the abbreviation...
20:41
< MyCatVerbs>
ToxicFrog: buggered if I know what to do with that. I'm pretty certain everything's identical on both ends.
20:41
<@ToxicFrog>
Huh.
20:41
<@ToxicFrog>
That is odd, then.
20:42
< MyCatVerbs>
Only configuration I've done with it is to set reverseVideo on, override the... wait, I've overridden the terminal name on this end for some reason.
20:44
< MyCatVerbs>
No, same problem when I manually drag TERM back to "rxvt-unicode" instead of "xterm-color" :/
20:46
< MyCatVerbs>
GeekSoldier: mmmmno, flamebait is when you're likely to start a flamewar.
20:46
< MyCatVerbs>
GeekSoldier: it isn't a real flamewar if everyone in the room agrees with everyone else on who to hate.
20:46
< ErikMesoy>
Hehehehe.
20:46
< MyCatVerbs>
A rantfest, maybe, but not a flame war.
20:47
< GeekSoldier>
yeah. I'm fairly certain most people here are of similar opinion on that subject...
20:47
<@ToxicFrog>
o/` RIAA roasting on an open fire, napalm stuffed right up their nose o/`
20:47
< ErikMesoy>
This, then, might be flamebait: emacs or vi?
20:47
<@ToxicFrog>
Neither.
20:47
< ErikMesoy>
Ditto.
20:47
< ErikMesoy>
I fail.
20:47
< GeekSoldier>
pico!
20:47
< MyCatVerbs>
Both.
20:48
<@ToxicFrog>
No, nano.
20:48
<@ToxicFrog>
But only until X11 is running.
20:48
< MyCatVerbs>
vi, until X11 is running. Then cream.
20:51
< MyCatVerbs>
Wait, no, bone X11 in the ear. vim, until X11 is running. Then multiple copies of vim in a single screen session across multiple urxvts.
20:58
< Vornicus>
nano.
21:04
< MyCatVerbs>
sshfs-fuse is svveet.
21:09
<@ToxicFrog>
You noticed.
21:29 * Vornicus likes what he's seen of fuse.
21:31
<@ToxicFrog>
My one complaint about fuse is that it's hard to use with /etc/fstab, and some filesystems have wacky permissions behaviours.
21:31 ErikMesoy is now known as ErikMesoy|sleep
21:31
< ErikMesoy|sleep>
Good night.
21:59 AnnoDomini [~farkoff@Nightstar-29521.neoplus.adsl.tpnet.pl] has quit [Quit: Don't trust the skull.]
22:09 timelady [~romana@Nightstar-14612.lns7.adl2.internode.on.net] has joined #Code
22:20
< MyCatVerbs>
Oh fuck, Verilog appears to involve a *lot* of copy-paste. :(
22:20
< Vornicus>
Verilog is pretty awful in some ways, but it's designed to be extremely specific.
22:21
< MyCatVerbs>
That's even with instance generation. I must've just burped out minor variations on the exact same genvar loop about four times.
22:22
< MyCatVerbs>
Vornicus: so it's a bondage-and-discipline language? No wonder. :/
22:23
< Vornicus>
It is I think the most B&D language I've ever dealt with.
22:23
< MyCatVerbs>
If I survive this course, I am going to try Ada. Just 'cuz.
22:23
< Vornicus>
heh
22:24
< timelady>
ADA!!!!!!!!!!!!
22:24
< timelady>
i love ada
22:24
< timelady>
seriously, i had so much fun with ada
22:24
< timelady>
great frst lang, so verbose
22:24
< MyCatVerbs>
Yeah, it'll make a great contrast to all the LISP and ML I've been reading in my spare time. Heh.
22:25
< MyCatVerbs>
I do note that as a complaint with LISP - the syntax is so amazingly simple that it actually makes it *harder* to read, 'cuz tracking the mountains of brackets isn't a task readily attackable by human eyes.
22:27
< MyCatVerbs>
Conversely, I'm starting to appreciate the more complicated syntax of other languages a little more. Gives the eyes a lot more little cues to be able to latch on to.
22:28
< timelady>
was reading n article that said with all these high gen langs around, c is the new assembly
22:28
<@ToxicFrog>
timelady: pretty much true.
22:28
<@ToxicFrog>
C is, after all, basically architecture-agnostic ASM with some syntactic sugar.
22:28
< MyCatVerbs>
Oh indeed, damnably skippy. Half the fun ones use C as a target to compile to, rather than directly building system binaries.
22:29
<@ToxicFrog>
MyCatVerbs: yeah. Careful indentation helps a lot, but this is the reason for my preference for Lua over Scheme.
22:29
< MyCatVerbs>
C's pretty much the thinnest possible mathematical abstraction that can be made of a von Neumann machine without discarding (too many) of its useful features.
22:30
< MyCatVerbs>
ToxicFrog: largely I think it also hurts that I've been using guile instead of a nicer Scheme terp. Guile only uses basic GNU readline, without providing things like bracket-pair highlighting (like GNU CLISP does - I'll have to try PLT Scheme and see if that provides it.)
22:31
<@ToxicFrog>
MyCatVerbs: there's some Scheme IDE I was using that did provide full hilighting.
22:31
<@ToxicFrog>
And so does NEdit, of course.
22:32
< MyCatVerbs>
Heh. Verilog does, to its credit, have an odd charm to its appearance. Sort of an ugly-duckling cuteness. =D
22:32
<@ToxicFrog>
I've never used Verilog, just VHDL.
22:32
< MyCatVerbs>
ToxicFrog: can NEdit be configured to work like a VI clone?
22:33
< MyCatVerbs>
(all the modes, wierd keybindings and so on, I mean)
22:35
<@ToxicFrog>
It's not a modal editor.
22:35
<@ToxicFrog>
So, no.
22:35
<@ToxicFrog>
...thank god.
22:35
< MyCatVerbs>
Oh well, stuff it then. Yay for vim! ^^
22:35
<@ToxicFrog>
Modal editors == the devil.
22:36 * Vornicus hates modal editing
22:36 * MyCatVerbs has been thoroughly corrupted by it. Ah, the comfortable and familiar taint!
22:39
< MyCatVerbs>
Better to reign in Hell than serve in Heaven, don'tcherknow.
22:56 ReivZzz is now known as Reiver
23:05 You're now known as TheWatcher[T-2]
23:10 You're now known as TheWatcher[zZzZ]
23:11
<@Reiver>
What is Tcl/Tk?
23:17
< timelady>
its a gui toolkit i believe
23:17
<@Reiver>
Ah. 'k
23:18 GeekSoldier [Rob@Nightstar-4864.pools.arcor-ip.net] has quit [Quit: Beware of programmers who carry screwdrivers.]
23:20
< MyCatVerbs>
Reiver: Tcl is a language designed for embedding. Tk is a GUI toolkit that was developed to go with it, which has since had bindings for many other languages added to it.
23:24
<@ToxicFrog>
The Python bindings of Tk are also notable for being non-deterministic.
23:24
<@Reiver>
?
23:25
<@ToxicFrog>
Any given library call may randomly, and silently, fail for no reason.
23:27
<@Reiver>
23:28
<@Reiver>
Non-deterministic would be a bad thing, then.
23:28
< MyCatVerbs>
I, for one, am terrified at the prospect.
23:30
<@ToxicFrog>
I had to write an assignment using this fucking thing.
23:31
<@ToxicFrog>
Reiver: well, more generally, it means "given known inputs, the output cannot necessarily be predicted"
23:31
<@ToxicFrog>
In this case, it means that something like, say, the call to display a popup box, if run multiple times in the same circumstances, only has an 80% chance of doing anything.
23:34
< gnolam>
... ouch.
23:35
< MyCatVerbs>
A little part of my soul just shrivelled up and died while reading that, TF.
23:35
<@ToxicFrog>
This does not make me well disposed towards the library, and in honesty, it has somewhat tainted my opinion of python as well.
23:35
<@ToxicFrog>
Since most of my python experience has involved Tk.
23:36
< MyCatVerbs>
...ouch.
23:38
<@Reiver>
...I see.
23:39
< MyCatVerbs>
That's like reading the SCUM manifesto first.
23:39
< MyCatVerbs>
Then reading Valerie Solanas' life history.
23:39
< MyCatVerbs>
"Ahhhh, no *wonder* she hated men so much. Poor girl." kinda thing.
23:39
< MyCatVerbs>
But, uh, with GUI toolkits and a gender swap, of course. And less irrationality. >>
23:40
<@ToxicFrog>
Python has lots of ways to irritate me even without Tk, though~
23:41
<@Reiver>
Whitespace delimiting is lovely for forcing pretty code. It's horrible for refactoring~
23:42
< MyCatVerbs>
But it's LL(1)! It causes Niklaus Virth's disembodied soul a ten-minute erection every time somebody implements a parser for it!
23:42
<@ToxicFrog>
So it's LL(1). And? Lots of languages are.
23:43
<@ToxicFrog>
Furthermore, I bet you could write totally unreadable code in Python if you really tried~
23:43
< MyCatVerbs>
Heh. I'd just implement a minimal von Neumann machine in it using a single huge array and write nasty pseudo-assembly code on *that*.
23:45
< MyCatVerbs>
Is C LL(1)? I know it's LR(1), but is one is a subset of the other?
23:46 Serah-Lost [~-@87.72.36.ns-26407] has quit [Quit: uptime:15wks 2days 3hrs 19mins]
23:53 MyCatVerbs [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has quit [Quit: Reconnecting]
23:53 Serah-Lost [~-@87.72.36.ns-26407] has joined #Code
23:54 MyCatVerbs [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has joined #code
23:58
< Serah-Lost>
Rebooting in a couple of mins again. ( System purge )
--- Log closed Mon Feb 19 00:00:30 2007
code logs -> 2007 -> Sun, 18 Feb 2007< code.20070217.log - code.20070219.log >