code logs -> 2007 -> Sat, 17 Mar 2007< code.20070316.log - code.20070318.log >
--- Log opened Sat Mar 17 00:00:56 2007
00:01 Derakon [~Derakon@Nightstar-12737.sea2.cablespeed.com] has joined #code
00:01
<@ToxicFrog>
Why resist?
00:01
< Derakon>
Hmm?
00:02
<@McMartin>
Unclassy.
00:02 * Derakon grumbles at table.remove for not accepting arbitrary table keys, but only numeric positions.
00:03
< Derakon>
I found myself with the interesting situation of having an object deleted in the C code but still extant in the Lua code, causing a ghost ship that fired very real bullets.
00:04
<@ToxicFrog>
Err.
00:04
<@ToxicFrog>
The entire point of table.remove is to remove stuff, then shuffle things arround so that you don't have a sparse array.
00:04
<@ToxicFrog>
Non-numeric keys cannot be sparse.
00:04
<@ToxicFrog>
If you want to remove them, just assign nil to them.
00:04
< Derakon>
I figured that'd leave the element in the table, though.
00:05
<@ToxicFrog>
No. This is, again, covered by the manual.
00:05
< Derakon>
Where?
00:05
< Derakon>
For gods sake, there's nothing coherent about the bloody thing. >.<
00:06
<@ToxicFrog>
...I could have sworn it was, and I remember reading it, but now I can't find it.
00:06
<@ToxicFrog>
Anyways.
00:06
< Derakon>
Heh.
00:07
<@ToxicFrog>
Assigning nil to a key deletes the key from the table and removes that reference to the value.
00:07
< Derakon>
Okay.
00:07
<@ToxicFrog>
Since uninitialized keys return nil on read anyways, there's no reason to keep it around.
00:09
<@Vornicus>
It sounds like Lua needs a nicer manual.
00:09
< Derakon>
It really does.
00:09
< Derakon>
What it has right now is more of a functional spec.
00:09
<@ToxicFrog>
Alternately:
00:09
<@ToxicFrog>
do
00:09
<@ToxicFrog>
local oldRemove = table.remove
00:09
<@ToxicFrog>
function table.remove(T, K)
00:09
<@ToxicFrog>
if type(K) == 'number' and K % 1 == 0 then
00:09
<@ToxicFrog>
-- integer key; use remove() on it
00:09
<@ToxicFrog>
return oldRemove(T, K)
00:09
<@ToxicFrog>
end
00:09
<@ToxicFrog>
local V = T[K]
00:09
<@ToxicFrog>
T[K] = nil
00:09
<@ToxicFrog>
return V
00:09
<@ToxicFrog>
end
00:09
<@ToxicFrog>
end
00:10
< Derakon>
So if you read and remember the entire thing, then you should be OK, but if you're like me, you probably just want a few primers, e.g. "how tables work".
00:11
<@ToxicFrog>
If called with an integer key, it passes it on to table.remove() to remove it and then shuffle down the remaining elements to close the gap; if called on anything else it just removes that element by assigning nil to it.
00:11
< Derakon>
Wow, I'm causing panics now. Fun.
00:11
<@ToxicFrog>
o.O
00:11
<@ToxicFrog>
(Hmm. Maybe I read 'tables can contain any value, except nil' and inferred the rest from that?)
00:12
<@ToxicFrog>
And I don't know what you're on about, the manual is great.
00:12
< Derakon>
PANIC: unprotected error in call to Lua API (attempt to index a nil value)
00:12
<@ToxicFrog>
You tried calling lua_gettable() and passed it nil instead of a table.
00:13
<@ToxicFrog>
Anyways, I tried "Programming in Lua", which is meant to be - in your words - a manual rather than a functional spec - and found it awful.
00:13
<@ToxicFrog>
The manual, OTOH, made a pleasant and clear afternoon's reading.
00:13
< Derakon>
...I forgot about PIL.
00:14
<@Vornicus>
I thought that PIL was /the/ place to learn about Lua.
00:14
< Derakon>
There's PIL, and then there's the reference manual.
00:14
<@ToxicFrog>
Personally, I hated it.
00:15
<@ToxicFrog>
I mean, yes, it applies to 5.0 instead of 5.1, but that's not a big deal; the changes are rather small.
00:15
<@ToxicFrog>
I just hated the style and layout.
00:16 * Vornicus ponders.
00:16
<@Vornicus>
I've always wanted to write something like a PIL or the Python Tutorial.
00:17
<@Vornicus>
GAH
00:17 * Vornicus beats himself about the face and neck.
00:17 * Derakon blinks.
00:17
<@ToxicFrog>
I pondered writing something like that for Lua, but (1) I'm much better at coding than writing and (2) we have the manual.
00:17
< Derakon>
(So anyway, the panics are because the engine is trying to load the object state after I've nillified it. Fixing that is going to require reworking how I destroy objects)
00:18
<@ToxicFrog>
(how do you currently destroy objects?)
00:18 ChalcyGone [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
00:18 * Vornicus keeps adding projects to the things he wants to do department!
00:18 * Vornicus must stop!
00:18
< Derakon>
(Set a "dead" flag in the object; when its state is loaded, the sprite tells the world to delete it at the beginning of the next frame)
00:18
< Derakon>
Heh.
00:19
< Derakon>
(This used to work in Niobium because all updates were initiated from within the sprite, which was more of a sprite+game object. Now that updates are initiated from within Lua, not so much.
00:19
< Derakon>
)
00:19
<@Vornicus>
What happened to Niobium anyway?
00:19 Forjeh [~Forj@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
00:19 Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
00:19 Forj [~Forj@Nightstar-869.bitstream.orcon.net.nz] has joined #code
00:20
< Derakon>
Niobium got bogged down in implementing fast, accurate collision detection on convex polygons.
00:20
< Derakon>
Er, concave.
00:21
< Derakon>
I note that I implemented bitmask-based detection in a matter of half an hour or so, whereas Niobium's system took upwards of a month and never worked quite right.
00:21
<@Vornicus>
ah so
00:21
< Derakon>
(Oh and also - Niobium used swept polygons, so it also had the teleportation bug covered)
00:22
<@ToxicFrog>
Derakon: what I did - although this was a rather simpler game - was simply to stick all the objects in a linked ring, and remove them from the ring when deleted.
00:23
<@ToxicFrog>
Calling a dtor which informs other objects as needed etc.
00:24
< Derakon>
Yeah, given the complexity and size of the area in question, I really can't go with something that simple.
00:24
< Derakon>
Fortunately, collision detection is currently a solved problem for this project. I don't anticipate returning to it.
00:24
< Derakon>
Anyway, I need to head out to karate now. So long.
00:24
<@ToxicFrog>
What, exactly, does collision detection have to do with the object removal algorithm? o.O
00:24
<@ToxicFrog>
Have fun.
00:25
< Derakon>
...heh, right. Ignore that then.
00:25 Derakon is now known as Derakon[AFK]
00:50 You're now known as TheWatcher[hereish]
01:08 You're now known as TheWatcher[afk]
01:15
< Serah>
Debian has no sound... GGrrrr.. Help?
01:17
< Doctor_Nick>
argasgegeg
01:17
< Doctor_Nick>
supreme commander is frustrating
01:17
< Doctor_Nick>
so i uninstalled it
01:39
<@Vornicus>
It is not your mother's RTS.
01:53 You're now known as TheWatcher
--- Log closed Sat Mar 17 02:13:55 2007
--- Log opened Sat Mar 17 02:14:26 2007
02:14 TheWatcher [~chris@Nightstar-29731.dsl.in-addr.zen.co.uk] has joined #code
02:14 Irssi: #code: Total of 19 nicks [7 ops, 0 halfops, 0 voices, 12 normal]
02:14 mode/#code [+o TheWatcher] by ChanServ
02:14
< Chalcedon>
there are many silly things about this language
02:14
< Chalcedon>
the necesity of declaring everything about three times is one of them
02:14 Irssi: Join to #code was synced in 25 secs
02:14
<@Vornicus>
Welcome to the world outside of Python.
02:15
<@Vornicus>
Sucks, don't it.
02:15 * Chalcedon nods
02:17
<@McMartin>
This does buy you the ability to ask "Can this object actually fulfill this API contract" in one machine instruction.
02:18
<@ToxicFrog>
Doctor_Nick: what's frustrating about it? o.O
02:18
<@ToxicFrog>
Chalcedon: this is basically a tradeoff; you get improved performance and error checking at the cost of going completely insane.
02:18
<@McMartin>
Unless, of course, you started with it
02:18 * Chalcedon shrug
02:19
<@McMartin>
In which case going the direction grants you enormous flexibility at the cost of OMGWTF I CAN'T FIND TYPOS UNTIL RUNTIME
02:19
<@McMartin>
Each has its benefits.
02:19
<@ToxicFrog>
It doesn't, AFAIK, have lists or tuples as an intrisic type; you have to fake them with either arrays or classes depending on what you're doing.
02:20
<@ToxicFrog>
(LLLs tend not to have these things)
02:20 * Chalcedon rolls eyes
02:20
< Chalcedon>
I have a list, but I've no idea how to end the silly thing
02:20 * Chalcedon thwap C#
02:21
<@ToxicFrog>
Er. How do you mean, end it?
02:21
<@McMartin>
I'd have to guess C# lists are always well-defined.
02:21
<@McMartin>
If not, that's pretty sad, given the guys designing it.
02:22
<@Vornicus>
Not that type safety is necessarily a win - Chalain once described static typing as safe bricks... which you can build a really teetery tower out of.
02:22
<@McMartin>
Heh.
02:22
<@McMartin>
On the other hand, C lets you build your teetery tower out of sand.
02:22
<@Vornicus>
hee
02:23
<@ToxicFrog>
(C++ lets you build it out of brick, but every fifth brick is actually a brick of C4?)
02:23
<@McMartin>
(Java and C# allow that too)
02:24
<@McMartin>
(C++ just names the C4 with the full chemical formula instead)
02:24
<@McMartin>
("Warning: possible structural hazard in (three kB of template expansion from the headers)"
02:24
<@McMartin>
)
02:25
<@McMartin>
In short, I'd claim type safety is always a win if you can get it. What it isn't is a magic bullet.
02:25
<@McMartin>
(... and actually, come to think of it, C++ doesn't have strong typing either. reinterpret_cast 4tmfl)
02:25
<@Vornicus>
I want IDEs that do better analysis.
02:26
<@McMartin>
Presumably you speak more at the I7 level, and not at the "takes a cluster of 50 machines 6 hours" level.
02:26
<@Vornicus>
Yeah
02:27
<@McMartin>
I7 cheats; the compiler generates all the tables as a side product.
02:31 Mahal is now known as MahalAFK
02:34
<@Vornicus>
but even I7's level of analysis could be done almost live. Especially on less ambiguous languages.
02:36
<@McMartin>
See also: Eclipse
02:36
<@McMartin>
FindBugs does a big pile of stuff
02:37
< Chalcedon>
TF: when you close the bracket it doesn't end the list, it thinks the bracket is part of the list
02:37
<@Vornicus>
Chalcy: McWTF?
02:37
<@ToxicFrog>
...
02:37
<@ToxicFrog>
That is whack
02:38
<@Vornicus>
Paste that crap, I have to see this.
02:38
< Chalcedon>
I /could/ be wrong
02:38
< Doctor_Nick>
oh no
02:38
< Chalcedon>
IList <"Adjectives.txt"; "Adverbs.txt">
02:38
< Chalcedon>
(I cut some out)
02:38
<@ToxicFrog>
Aah, you're back.
02:38 * ToxicFrog ambushes Doctor_Nick with a wing of T3 bombers
02:38
< Chalcedon>
I tried putting in a ; and that didnt work either
02:38
<@Vornicus>
Gah
02:39
<@Vornicus>
Okay, yeah, that's not the way it's done
02:39
< Chalcedon>
apparently not
02:39
< Chalcedon>
I'm having other issues now, the list will have to wait.
02:39
<@Vornicus>
The <> brackets are /templates/, they're used to define the types of items you're putting into the list.
02:39
<@ToxicFrog>
If this is the same convention as C++, the stuff in the <> is the type of thing you want to store in it.
02:39 * Chalcedon rolls eyes at herself
02:39
<@McMartin>
That would also make it the same convention as Java
02:41
<@ToxicFrog>
Java has templates?
02:41
<@Vornicus>
As of Java 5, yes.
02:41 * ToxicFrog flees from the room, screaming and setting stuff on fire
02:41
<@Vornicus>
Also automatic boxing and unboxing. Makes life easier.
02:41
< Chalcedon>
gah
02:42
< Chalcedon>
I have too many errors coming up to figure that one out right now
02:42 You're now known as TheWatcher[afk]
02:42
< Chalcedon>
of more pressing concern is /how the hell/ do I import a file
02:42
<@Vornicus>
Also, you don't want to use IList - that's an /interface/, not a class.
02:42 * Chalcedon thwap self again.
02:43
<@Vornicus>
It doesn't define how anything is done, just what things that implement it can do.
02:43
<@McMartin>
You don't import files in C#, I don't believe.
02:43
< Chalcedon>
no, I suppose thats the wrong word
02:43
<@McMartin>
The closest Python equivalent will be "from X import Y", I believe.
02:43 * McMartin isn't fully clear on how Assemblies work.
02:43
<@McMartin>
Other than "more structured than the wild anarchy that is Java"
02:43
< Chalcedon>
I am supposed to 'load files into their hidden RichTextBoxes'
02:44
<@McMartin>
... that sounds highly application-specific.
02:44 * Vornicus doesn't know how C# works, and is working off names and what he knows of C++ and Java.
02:44
< Chalcedon>
(it's my assignment)
02:44
<@ToxicFrog>
Chalcedon: I believe that is "load files from disk with file IO, and store their contents in the RichTextBoxes"
02:44
< Chalcedon>
that was my interpretation
02:44
<@ToxicFrog>
Which is not the same as importing, which loads parts of the program and which C# doesn't have anyways.
02:44
< Chalcedon>
what's driving me bananas is the example given by the text book doesn't work
02:45
< Chalcedon>
it says that 'Type or namespace StreamReader' does not exist
02:45
<@ToxicFrog>
If C# uses the same convention as C++ here, you need to #include something
02:45
<@ToxicFrog>
Which is C for "when the program is actually built, there will be stuff available that looks like this"
02:46
<@McMartin>
If, on the other hand, C# follows Java and Python, simply giving the fully qualified name (Java's equivalent is java.io.InputStreamReader) will suffice.
02:47
<@McMartin>
And you use import statements to let you drop the "java.io." part.
02:48
<@Vornicus>
I believe that C# steals liberally from Java on this point, but I don't know how.
02:49
<@McMartin>
I believe C# also includes mechanisms to make it harder to do the equivalent of LDPATH attacks.
02:50
< Chalcedon>
ah ha
02:50
< Chalcedon>
I found the problem
02:51
<@McMartin>
Hm?
02:55
< Chalcedon>
I missed an instruction (namely using System.IO)
02:55
< Chalcedon>
my excuse is that it was hidden several pages before the bit I was using
02:56
<@McMartin>
Ah. Sounds like using is equivalent to "from X import *"
02:58
< Chalcedon>
very similar I think
03:01 * Chalcedon beat something
03:01
< Chalcedon>
I hate having to repeat myself
03:04
<@Vornicus>
Good.
03:05
<@Vornicus>
One of the most important tenets of programming is "Don't Repeat Yourself"
03:05
< Chalcedon>
hehe
03:05
< Chalcedon>
the problem is I can't figure out how not to repeat myself
03:06
< Chalcedon>
I have to load eight files into eight different boxes
03:06
< Chalcedon>
I can get a loop going to load the eight files
03:06
<@Vornicus>
Can you make an array of references to boxes?
03:06
< Chalcedon>
my problem arises getting them into different boxes (because of course the name of each box is a name and not a string)
03:06
< Chalcedon>
yes
03:07
< Chalcedon>
but it doesn't recognise it when I call each item
03:07
< Chalcedon>
it tells me I can't do that to a string
03:07
<@Vornicus>
What do you mean doesn't recognize it?
03:07
<@Vornicus>
Show me the code.
03:07
<@McMartin>
... how exactly are you "referring" to boxes here?
03:09
< Chalcedon>
StreamReader inputStream = File.OpenText(@files[index]);
03:09
< Chalcedon>
string line;
03:09
< Chalcedon>
line = inputStream.ReadLine();
03:09
< Chalcedon>
while (line != null)
03:09
< Chalcedon>
{
03:09
< Chalcedon>
boxes[index].AppendText(line + "\n");
03:09
< Chalcedon>
line = inputStream.ReadLine();
03:09
< Chalcedon>
}
03:09
< Chalcedon>
inputStream.Close();
03:09
<@Vornicus>
Okay, how is boxes defined?
03:09
< Chalcedon>
it will open each file fine, but it objects when it gets to boxes[index[
03:09
< Chalcedon>
an array of strings
03:10
<@Vornicus>
It should be an array of RichTextFields or whatever they're called.
03:10
< Chalcedon>
I'm not sure what you mean McM
03:10 * Chalcedon pokes it
03:10
<@Vornicus>
Show me the code that defines boxes
03:13
< Chalcedon>
...I never thought of doing that before
03:14
< Chalcedon>
I think it works, I just need to check
03:14
<@McMartin>
Yeah, I meant the referring.
03:14
<@McMartin>
Putting variable names in strings would not be how it is done in C# or Python.
03:14
<@McMartin>
Or Java
03:14
<@Vornicus>
Or, for that matter, most other languages.
03:15
< Chalcedon>
ok, it works
03:15
< Chalcedon>
I could never figure out how to do that in Python either
03:15 * Chalcedon has had her world view changed somewhat
03:16
<@McMartin>
Mmm.
03:16
<@Vornicus>
Some sorta do it - Ruby, PostScript - but even then you use special syntax and it's usually to work around things in the language.
03:16
<@McMartin>
Vornicus: Well, Python does it too, with getattr, but.
03:16
<@McMartin>
Intorspection is not something you use casually.
03:16
< Chalcedon>
I have made a list of RichTextBoxes btw
03:16
<@Vornicus>
McM: true.
03:16
<@Vornicus>
Chalcy: woot.
03:16
< Chalcedon>
(just so that I don't wander of and leave you all hanging)
03:17 * Chalcedon hug Vornicus and offer McM a cookie
03:17 * Vornicus hugs Chalcy, applies roast stoat sammiches.
03:17
< Chalcedon>
oooh!
03:17 * Chalcedon nrom
03:17
<@McMartin>
Not sure offhand a good place to get coverage of the differences between references and values
03:17
< Chalcedon>
(thank you for your help)
03:17
<@McMartin>
At least not that don't already assume you're familiar with pointers, which are like references but let the h4xx0rz pwnz j00
03:23 Derakon[AFK] is now known as Derakon
03:23 * Derakon returns from karate. Evening.
03:23
< Derakon>
Also, I made pizza and an LJ post.
03:23 * Chalcedon blinks
03:24
<@Vornicus>
"^" : (10,2,BitXor), # <--- a line from a dictionary from Schlockian. BitXor is a reference to a /function/
03:25
<@Vornicus>
It's the only part of Schlockian I still understand - how it executes individual operators.
03:25
<@McMartin>
Heh
03:25
<@ToxicFrog>
Mmm, higher-order functions.
03:29 * McMartin reads LJ. "Ah yes."
03:29
<@McMartin>
We in the business call that Midichlorians Syndrome.
03:29
< Derakon>
I don't follow.
03:29
<@McMartin>
What happens when you give The Mysteries a pathetically half-assed explanation, only to find that everyone had just taken it to be part of the premise.
03:29
<@McMartin>
It makes them mad at you.
03:30
< Derakon>
Heh.
03:30
<@McMartin>
Before The Phantom Menace, it was Star Control 3 Syndrome, which did much the same with the Precursors.
03:31 * Vornicus names the Precursor race in VornMoO.
03:31
<@Vornicus>
But, then, they're human.
03:32
< Derakon>
Well, when I'm talking about mysteries, I more mean "I'm not going to bother explaining this random little thing; feel free to make up your own explanation and tie it into some grand storyline."
03:32
<@Vornicus>
Gadzair.
03:32
< Derakon>
Like that, yes.
03:32
< Derakon>
Or in EV, the Diphidia-Astex storyline.
03:32
<@Vornicus>
Which, I'm given to understand, the original author is making a sequel out of.
03:33
< Derakon>
There's a world where Astex Mining is dumping their hazmats. You can get a short storyline to collect evidence of this, but it doesn't resolve anything.
03:33
< Derakon>
One of the bigger plugins for EV, Pale, expands greatly on that storyline, blowing into a full-on war.
03:33
<@McMartin>
Well, yeah.
03:33
< Derakon>
And yes, a sequel to EVO is being made. Reign of the Council is the working title.
03:33
<@McMartin>
What's the O in EVO again?
03:33
< Derakon>
Override.
03:39
<@ToxicFrog>
...ok, that wasn't meant to happen.
03:39
< Derakon>
Hm?
03:39
<@ToxicFrog>
[NoMFabs] Making unbuildable: <LOC uel0301> Support Command Unit
03:40
< Derakon>
Heh.
03:40
<@ToxicFrog>
This mod is meant to remove all mass fabricators from the game.
03:40
<@ToxicFrog>
So I have it removing everything with the MASSFABRICATION category.
03:40
<@ToxicFrog>
Whoops, turns out some other units have that too.
03:40
< Derakon>
Like the units that build everything?
03:40
<@ToxicFrog>
Yep.
03:41
<@ToxicFrog>
In the case of Commanders it doesn't matter because you can't build them /anyways/.
03:41
<@ToxicFrog>
However, SCUs you're meant to be able to build.
03:42
<@Vornicus>
One thing that I really liked about C&C:RA was the ability to set up a skirmish with some prebuilt forces.
03:43
<@ToxicFrog>
SupComm has that, I think.
03:43
<@ToxicFrog>
At least, it has an option that looks like what you describe, I've never tried turning it on.
03:43
< Derakon>
Everyone starts with a nuke. ¬.¬
03:44
<@ToxicFrog>
...man, that would be a short and hilarious game.
03:47
<@Vornicus>
What do nukes do to shields?
03:47
< Derakon>
Bounce off at a random angle! ¬.¬
03:48
<@Vornicus>
...oh that would /suck/
03:49
< Doctor_Nick>
command and conquer 3 is alot more fun than supcomm <:)
03:50 * Vornicus watches Doctor_Nick get stoned to death
03:50
< Doctor_Nick>
it would be a foolish error in judgement to mistake me for a corpse
03:54
< Doctor_Nick>
is run lola run a good movie
03:54
<@Vornicus>
Yes.
03:55
< Derakon>
Seconded.
03:55
< Doctor_Nick>
k
03:55
< Doctor_Nick>
im gonna see it in... 5 minutes
03:59 * Derakon kicks ass all over the Gregorizers with his Broodhome.
04:00
<@Vornicus>
Gregorizers?
04:00
<@McMartin>
One of the Default 200-point teams in Super Melee.
04:01
< Derakon>
One of the included Super Melee fleets.
04:02
<@ToxicFrog>
Vornicus: that would be fairly entertaining, but no, they go right through shields without slowing down.
04:03 BlueTiger [BlueTiger@Nightstar-567.natsoe.res.rr.com] has joined #Code
04:03
<@Vornicus>
shiny.
04:04
<@Vornicus>
Feel sorry for everything inside the shield though...
04:04
< Derakon>
I assume nukes basically destroy everything in their radius?
04:04
<@Vornicus>
The Judgement Kitten I think takes four without dying.
04:04
< Derakon>
Okay, aside from T4s.
04:07 * Derakon eyes the Ambrosia SW forums.
04:07
< Derakon>
Why is it that whenever anyone announces that they're going to do a "put yourself into EVN!" plugin, everyone wants to be flying invincible ships with enough weaponry to make the US Military green?
04:08
<@McMartin>
... It's the space equivalent of a black trenchcoat, mirrorshades, and the katana that bisects mountains?
04:09
<@McMartin>
Also, any starfaring capship-scale weaponry would make the current US Military green~
04:09
<@Vornicus>
My personal EVO ship is a Crescent-kitted Freight-Courier. I don't really have one for EVN.
04:09
< Derakon>
Assume the US military has contemporary tech levels.
04:09 * McMartin snickers at the I7 code running the background chatter in his current scene.
04:09
<@McMartin>
"A [dude] catches your eye as you continue. "
04:10
< Derakon>
Vorn: I'm talking things like wanting to be represented by a Manta with CPLs, Hellhound Missiles, Ionic Particle Cannons, and invincible shielding.
04:10
<@McMartin>
"A [dude] shouting into a pay phone makes the next bit a little difficult to follow. "
04:10 * Vornicus ponders McM.
04:10
<@Vornicus>
this is silly.
04:10
<@McMartin>
The code surrounding the dudes is intricate and cunning.
04:11
<@Vornicus>
Manta... isn't that EVC, a civilian fighter?
04:11 * McMartin is evilly proud of it.
04:11
< Derakon>
No, I'm talking the Polaris fighters.
04:11
<@Vornicus>
Oh, that thing.
04:11
< Derakon>
Which are ludicrously overpowered as it is; they're the fastest ships in the game.
04:11
<@Vornicus>
and they have a particle cannon.
04:11
< Derakon>
Throw on weaponry that shouldn't even exist on capital ships, and it's just stupid.
04:11
<@Vornicus>
They can't Monty Python though, they're inertialess.
04:11
<@ToxicFrog>
Derakon: yes, pretty much.
04:11 * McMartin ponders.
04:12
< Derakon>
They traditionally have a fairly powerful forward beam. The CPL is a ludicrously powerful forward beam, and the IPC a ludicrously powerful *turreted* beam.
04:12
<@ToxicFrog>
Stuff on the edge of the blast might survive.
04:12
< Derakon>
No, they aren't inertialess. That's the Vell-Os fighters.
04:12
<@McMartin>
"That's a large cannon. I take it this ship is well-equipped with... compensators."
04:12
<@ToxicFrog>
Some T4s, notably the Judgement Kitten, can take multiple nuke hits.
04:12
<@ToxicFrog>
Doctor_Nick: I submit that you are, in fact, insane.
04:12 * Derakon nods to TF.
04:12
<@ToxicFrog>
Derakon: also, they are wicked shiny
04:12
< Derakon>
Nick's not here; he's getting drunk^W^Wwatching Run Lola Run.
04:12
<@Vornicus>
I could have sworn that at least some Polarish ships are inertialess.
04:13
< Derakon>
Just one, Vorn. the Raven, i.e. giant beetle of doom.
04:13
<@Vornicus>
oh.
04:14 * McMartin now has the Table of Mundane Interference to complement the Table of Badass One-Liners.
04:14
< Derakon>
The Vell-Os (i.e. psychic slaves) have all the shiny blue inertialess ships.
04:15
<@Vornicus>
McM: I really have to see this game, and this code, when you're done, it sounds like mass insanity.
04:15
<@ToxicFrog>
Derakon: you hit someplace with a nuke, and it vanishes in a pool of white light which gradually fades to reveal the mushroom cloud/crackling disk of energy/etc.
04:15 MyCatHungrs is now known as MyCatVerbs
04:15
<@McMartin>
Well, the Table of Badass One-Liners is to ensure that the player gets an appropriate reward for solving a puzzle a certain way.
04:16
<@McMartin>
In particular, the PC delivers a bad-ass oneliner, depending on exactly what was interrupted.
04:16
<@McMartin>
To do this properly involves consulting the Table of Badass One-Liners.
04:16
<@McMartin>
The Table of Mundane Interference involves manufacturing throwaway NPCs out of whole cloth and making the parser deal sensibly with them
04:17
<@McMartin>
Which is, I think, something that I7 is uniquely suited to do.
04:17
<@McMartin>
Doing this in I6 would have been 90 different kinds of nightmare, and my understanding of T3 is slight, but it looks like it would be hard to handle (though easier than I6).
04:18 * Vornicus tries out the Probe.
04:18
<@Vornicus>
WACKY.
04:18
< Derakon>
Heh.
04:18
< Derakon>
It's not worth as many points as the game thinks, in my opinion.
04:18
<@Vornicus>
I mean, totally fucked up, I had no idea how weird you could make controls.
04:20
< MyCatVerbs>
McMartin: what are these classification systems you're using here, please? I6 and I7 and T3 all sound like Chomskyish parser classifications or something.
04:21
<@Vornicus>
Inform 6 and Inform 7
04:21
<@McMartin>
Nope, just acronyms.
04:21
<@McMartin>
And TADS 3.
04:21
< MyCatVerbs>
Ahhh, sensible and mundane.
04:21
<@McMartin>
Inform 6 is a C/C++-like IF language.
04:22 MahalAFK is now known as Mahal
04:22
<@McMartin>
TADS 3 is a different language targeting a different VM and which is about as complex as the Java Standard libraries, but with maybe 10% of the documentation
04:22
<@Vornicus>
Inform 7 being, well, here's some code I wrote in Inform 7: Instead of going to the Mines when the player is not wearing the shades, say "It's too shineh! You have to turn back before you go blind."
04:22
<@McMartin>
Inform 7 is a freakish declarative IF language that is nevertheless extremely powerful.
04:23
<@Vornicus>
Yes, that's actually what I wrote.
04:24 * MyCatVerbs nods.
04:24
< MyCatVerbs>
Have seen it on wikipedia. It looks frighteningly like natural language.
04:24
< Derakon>
Ergh...computer is way too good with Yehat ships. >.<
04:25
<@Vornicus>
I've only written one IF; every paragraph or two I went back and looked at it and said "that can't possibly work, it looks too sane."
04:25
<@McMartin>
I've managed to break it.
04:25
<@McMartin>
But then, I'm trying to.
04:25 * McMartin is also working on a Fairly Sizable Work, at 31,000 or so words and counting.
04:25
<@Vornicus>
I confused it a few times, mostly because I didn't know how to chain rules.
04:26
< MyCatVerbs>
McMartin: and I get the impression you're good at that, too.
04:26
<@McMartin>
Breaking things, or IF?
04:26
<@McMartin>
My IF to date is... undistinguished.
04:26
<@Vornicus>
McM: how much of that is rulebooks and libraries and stuff?
04:26
<@McMartin>
Vorn: I'm not counting the Standard Rules.
04:27
<@Vornicus>
Right, I figured not, but how much of what you wrote is rules and libs that you could extract wholesale from the IF?
04:27
< MyCatVerbs>
McMartin: breaking things, deliberately.
04:27
<@McMartin>
But a fair amount of it is; I've got a lot of scripted and semi-scripted NPCs, and keeping track of their goals is Work.
04:27
<@McMartin>
Hmm. The important one -- the conversation code -- already has been.
04:27
<@McMartin>
The Generic Dudes code might be able to, but it's more likely to be something where I publish it as a small demo.
04:28
<@McMartin>
The conversation code is 1677 words.
04:28
<@McMartin>
... and on the I7 web site, though in slightly outdated form.
04:28
<@McMartin>
I'll probably produce a new version to go with the next I7 update, which fixes an annoyance that affects it.
04:30 ReivFeildtrip is now known as Reiver
04:31
<@McMartin>
Some of the things I broke, I note, are my fault, not its fault.
04:32
<@McMartin>
Including one particular "Argh, do what I meant, not what I said" case
04:32
<@McMartin>
In which I did an if test on whether one variable was a certain value.
04:32
<@McMartin>
Instead of whether it is
04:32
<@McMartin>
And so it was caching the value from the beginning of the turn, and testing that.
04:32
<@McMartin>
Wackiness ensued.
04:32
<@McMartin>
04:32 * McMartin replaces *** End of implementation *** with *** Wackiness ensues ***
04:33
<@Vornicus>
Heeeee
04:35
< MyCatVerbs>
Some day I'ma have tae write a Ruby or Lua (or something else similar) script to change all the file and class names in a Java project to random words out of a dictionary file.
04:35
<@McMartin>
x = new alt.god.damn.find.a.room()
04:35
< MyCatVerbs>
After doing that, it'd take me all of about fifteen minutes to start trawling for an electronic copy of Roger's Profanisaurus to feed it.
04:36
< MyCatVerbs>
Hmmm? Am I annoying you or something?
04:37 * McMartin was just proffering a line of resulting code
04:39
< Derakon>
And here I thought you were complaining about some overly amorous people in your coffeeshop or something.
04:40
< MyCatVerbs>
Ah, fair enough. But I'm far too lazy to write out a class hierarchy that long. XD
04:42
<@McMartin>
My usual problem has to do with people who have found a room, but it abuts my apartment directly and the walls are thin.
04:43 * Derakon nods.
04:43
<@Vornicus>
heh
04:46 * Derakon grumbles at his code, which is managing somehow to lose what layer the gorram sprite is on.
04:46
< Derakon>
Thus, when I try to delete the sprite, I look on the wrong layer and fail.
04:49 BlueTiger [BlueTiger@Nightstar-567.natsoe.res.rr.com] has left #Code []
04:51
< Derakon>
Hah! Yes, got it. World->sprites != World->gameSprites. I need better field names.
04:52
< Derakon>
(World->sprites holds all the prototypical sprites; World->gameSprites holds the sprites you actually see in-game)
04:53
<@ToxicFrog>
...why are the sprite prototypes in World?
04:53
< Derakon>
Because World maintains all resources. :\
04:53
<@ToxicFrog>
I generally consider "World" to be "everything the players can interact with"
04:53
< Derakon>
Yeah, it's a holdover from previous designs.
04:53
<@ToxicFrog>
Abstract resources are in Game (data structures) or Resource (stuff loaded from disk)
04:53
< Derakon>
I should sub out the non-instantiated parts to a Loader class or something.
05:03
<@Vornicus>
Attention Interloper!
05:03
<@Vornicus>
Heed this recorded message.
05:04 * Serah heeds the recorded message and pays attention.
05:04 MyCatVerbs is now known as MyCatSleeps
05:09 * Vornicus eyes.
05:09
<@McMartin>
?
05:09
<@Vornicus>
is the planet view doing normal mapping too?
05:09
< Derakon>
What, in SC2?
05:09
<@Vornicus>
Yeah.
05:09
<@McMartin>
I think that code went through a number of iterations.
05:09
<@McMartin>
I think it's faking it with Phong Lighting.
--- Log closed Sat Mar 17 05:09:50 2007
--- Log opened Sat Mar 17 05:09:55 2007
05:09 TheWatcher[afk] [~chris@Nightstar-29731.dsl.in-addr.zen.co.uk] has joined #code
05:09 Irssi: #code: Total of 19 nicks [7 ops, 0 halfops, 0 voices, 12 normal]
05:10 Irssi: Join to #code was synced in 28 secs
05:10
<@Vornicus>
I didn't think it was.
05:10 * Vornicus has been working on map projections all weeks, knows what that would look like.
05:11
<@Vornicus>
...doh. I should be more careful.
05:11 * Vornicus reloads from before landing on Mercury.
05:11
< Derakon>
HEH.
05:12
< Derakon>
Er, heh.
05:12
<@McMartin>
Europa's safer.
05:12
< Derakon>
You should mine both. *shrug*
05:12 * McMartin heads home.
05:14
< Derakon>
Fools! Dogar and Kazon only answer on channel 44!
05:18
<@Vornicus>
Doxygen has a cute icon.
05:20 * Derakon facepalms.
05:21 * Vornicus also facepalms
05:33 * ToxicFrog ka-owns Supreme Commander with thread-fu.
05:34
<@Vornicus>
Is this a good thing, or a bad thing?
05:34
<@ToxicFrog>
It's a good thing.
05:34
<@ToxicFrog>
I now have mexes that gradually become more efficient as time passes.
05:34
<@Vornicus>
What dance have you made it do?
05:34
<@Vornicus>
...wack
05:34 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has quit [Quit: no... ener... jacks... zzz]
05:35
<@ToxicFrog>
This is done by spawning a thread in the constructor that sleeps for IMEX_INCREMENT_PERIOD seconds, then twiddles it stats, calls self:UpdateProductionValues(), and goes back to sleep.
05:37
<@ToxicFrog>
(I tossed this design into the forums, and the devs came back with "yeah, that's how you call a method every N seconds; there's no RegisterTimedCallback() or anything")
05:37
<@Vornicus>
The devs are on the forums?
05:38
<@Vornicus>
that's kinda surprising
05:38 * Derakon beats the Behemoth Zenith fleet with 90 points to spare, woot.
05:39
< Derakon>
Having it send both Chmmr *and* one of the Utwig against my Orz, and then the other Utwig against my Chenjesu, was a godsend.
05:39
<@Vornicus>
What is your fleet?
05:39
<@ToxicFrog>
The devs are on the forums liek woah, and are glad to answer modding questions, post tutorials, and be Inscrutable when you ask them for plot points.
05:39
<@Vornicus>
Sweet.
05:40
< Derakon>
Androsynth, Chenjesu, Earthling, Slylandro, Arilou, Mmrnmhrm, Arilou, Supox, Thraddash, Syreen, Shofixti, Earthling, Orz.
05:40
< Derakon>
200 points precisely.
05:40
<@ToxicFrog>
(if they /weren
05:40
<@ToxicFrog>
(if they /weren't/ on the forums, I wouldn't have a message from them asking if I was interested in working for GPG after I graduate)
05:40
<@Vornicus>
05:40 Reiver is now known as ReivOut
05:40
<@Vornicus>
05:40
<@Vornicus>
05:41 * ToxicFrog giggles uncontrollably at Vorn's expression
05:41 * Derakon snerks.
05:43
<@ToxicFrog>
I think I broke him.
05:43
<@Vornicus>
daaaamn.
05:43
<@McMartin>
They seek your soul! Beware!
05:46
< Derakon>
#table = 0 will clear a table for me, yes?
05:47
< Derakon>
Er, table[#table] = 0.
05:47
<@ToxicFrog>
No to both.
05:47
<@ToxicFrog>
The former is a syntax error, the latter assigns 0 to the last integer index in the table.
05:47
< Derakon>
D'oh.
05:48
<@ToxicFrog>
Remember, # is a unary operator that evaluates to an integer.
05:48
<@ToxicFrog>
If you just want an empty table, table = {} will do it, but this won't update other references to the table, if any.
05:48
<@ToxicFrog>
If you want to empty an existing table, you'll need to delete all the entries by hand, which is enough of a pain that I have a function for it.
05:49
< Derakon>
Well, in this case, the entries are all references.
05:49
<@ToxicFrog>
Why does that matter?
05:50
< Derakon>
...oh, I see. {} gives me an empty table, but does not *empty* an existing table.
05:50
<@ToxicFrog>
Yes.
05:50
< Derakon>
So what does existingTable = {} do?
05:50
<@ToxicFrog>
It creates a new, empty table, and assigns it to the variable existingTable.
05:51
< Derakon>
Ah. And if existingTable was the only reference, then the old table that it pointed to is now up for garbage collection.
05:51
<@ToxicFrog>
Yes.
05:51
< Derakon>
So that *kinda* works, but is inelegant.
05:51
<@ToxicFrog>
But if it wasn't the only reference, the other references are still pointing to the old table.
05:51
< Derakon>
(Kinda works because I only have one refence to the table)
05:51
<@ToxicFrog>
Well, if it's the only other reference, this is faster than clearing the table by hand.
05:51
<@Vornicus>
Like used! Slightly shotgunned!
05:51
<@McMartin>
Derakon: If the table in question doesn't escape, it's not only more elegant, it's faste... dammit, TF
05:52
<@McMartin>
"That'll be $10!"
05:52
< Derakon>
I'm iterating over all the elements in the table anyway, though.
05:52
<@ToxicFrog>
So, yeah, if this is the only reference, just assign {} to it and you're good.
05:52
<@ToxicFrog>
...well, caveat.
05:52
< Derakon>
Heh.
05:52
<@ToxicFrog>
If this is the only reference and it has no metatable.
05:52
<@ToxicFrog>
If it has a metatable that you wish to preserve, you'll have to transfer it to the new table as well.
05:52
< Derakon>
Assigning {} would gank the metatable, yeah.
05:53
<@ToxicFrog>
(which is not hard and still faster than clearing it by hand)
05:53
<@ToxicFrog>
The issue with clearing it by hand is that deleting keys from a table while iterating over it with next (which pairs is a wrapper around) results in undefined behaviour.
05:54
<@ToxicFrog>
So you have to iterate over it once to build a list of keys, then iterate over the list of keys and clear them from the old table.
05:54
< Derakon>
Oooh, okay.
05:54 * Derakon shall assign {} to it then.
05:55
<@ToxicFrog>
Vornicus: anyways, apparently they Noticed that I spend most of my time on the forums talking code and helping the n00bs with Lua. Which SupComm uses for damn near everything.
05:56
< Derakon>
Okay, this is an interesting bug...I just sat there and let the "enemy" ship shoot me. And, when I ran out of health, it died. O_o
05:56
<@Vornicus>
pff
05:57
<@McMartin>
Wut
05:57
< Derakon>
Oh, wait, it wasn't that.
05:57
< Derakon>
I'd forgotten to check factions for the enemy's bullets, so every time he fired, he hurt himself.
05:57
<@McMartin>
Heh
05:58
<@Vornicus>
...pfff
05:58
<@McMartin>
Now that you mention it, I think I did that in Sable, too.
05:58
<@ToxicFrog>
(it's Lua 5.0, which means my varags functions keep going KAbLOOEY, but still. <3 )
05:58
<@ToxicFrog>
I did that in tSpacewar.
05:58
< Derakon>
It's a common problem.
05:58
<@ToxicFrog>
Except with an interesting twist.
05:58
<@McMartin>
In Spacewar it's intentional, is it not?
05:58
<@ToxicFrog>
You were meant to be able to hurt yourself with your own bullets.
05:58
<@ToxicFrog>
However...
05:58
< Derakon>
Not as soon as they appeared, surely.
05:59
<@ToxicFrog>
If you fire a bullet, the bullet gets a tick before your ship's next tick.
05:59
<@ToxicFrog>
Normally this was fine.
05:59
<@Vornicus>
It happens in UQM too - if you're flying backwards too fast in the Eluder you shoot yourself.
05:59
<@ToxicFrog>
However, bullets inherit ship velocity.
05:59
<@McMartin>
... Tricking the Mycon into doing it to itself is a classic tactic.
05:59
<@McMartin>
The Mycon will blow itself the fuck up every chance it gets.
05:59
<@ToxicFrog>
So, if you're flying backwards above a certain speed, firing causes the bullets to fly backwards into your ship, shredding it in short order.
05:59
<@McMartin>
In UQM, the shot starts N ticks out.
05:59
< Derakon>
I've shot myself with my own Mmrnmhrm missiles. ¬.¬
06:00
<@McMartin>
TF: That makes no sense at all.
06:00
<@ToxicFrog>
McMartin: why?
06:00
<@ToxicFrog>
You're moving backwards at 100 units/second.
06:00
<@McMartin>
And it's moving backwards at 95, yes?
06:00
<@McMartin>
So it should be 5 units from you, next tick.
06:00
<@ToxicFrog>
You fire a bullet forward at 80 units/second, so it has an absolute velocity of 20 units/second *in the same direction as your ship*
06:01
<@ToxicFrog>
And then the bullet gets a tick before the ship does.
06:01
<@ToxicFrog>
And slams into the ship.
06:01
< Derakon>
How can you be flying backwards and shooting forwards?
06:01
<@ToxicFrog>
Derakon: inertial.
06:01
<@McMartin>
... Oh, you're doing ray-interception.
06:01
<@ToxicFrog>
Accelerate the ship, then spin around and open fire.
06:01
<@ToxicFrog>
McMartin: I am?
06:01
< Derakon>
Then you're shooting backwards...
06:01
<@McMartin>
... otherwise you'd port through it.
06:01
<@ToxicFrog>
...err, sorry.
06:01
<@ToxicFrog>
No, no.
06:02
<@ToxicFrog>
Ok. let's try this with absolute directions.
06:02
<@McMartin>
Um.
06:02
<@ToxicFrog>
Ship is moving north at 100 units/tick. Ship is facing, and firing, south.
06:02
<@McMartin>
I just noticed you're checking collisions every time anything moves.
06:03
<@ToxicFrog>
Bullets are fired at 80 units/tick relative, which is 20 units/tick north; they spawn 10 units off the ship's bow.
06:03
<@McMartin>
Ding, we have our bug
06:03
<@ToxicFrog>
So, ship fires, bullet spawns 10 units to the south.
06:03
< Derakon>
80 ticks/relative should be 20 units/tick north.
06:03
<@ToxicFrog>
Bullet ticks, moves 20 units north.
06:03
<@ToxicFrog>
Which puts it 10 units inside the ship's hull.
06:03
<@McMartin>
Right.
06:03
<@ToxicFrog>
McMartin: well, I was checking collisions on projectiles.
06:04
<@McMartin>
See, the problem here is that it spawns an absolute distance from the bow.
06:04
< Derakon>
...good god, the computer is godly with the Slylandro.
06:04
<@McMartin>
It should be "ship is firing. Move ship. Spawn bullet as if it had ticked."
06:05
<@ToxicFrog>
I solved it by changing the sequence from "move ship, spawn bullet" to "spawn bullet, move ship"
06:05
<@McMartin>
Instead of actually giving it a tick.
06:05
<@McMartin>
That works too
06:05
< Derakon>
Hrm. Computer Orz does not use marines against Utwig. How stupid.
06:06
<@ToxicFrog>
The LuaSDL test programlet handles it by using a CollisionManager, which runs once per tick.
06:07
< Derakon>
And I just have factions, which can't shoot each other.
06:07
<@ToxicFrog>
With the result that, from a physics point of view, everything moves simultaneously.
06:07
< Derakon>
That too.
06:07
<@ToxicFrog>
And only things touching after moves are resolved count as collided.
06:07
< Derakon>
High-speed objects teleport through each other, etc.
06:07
<@ToxicFrog>
Well, yes
06:08
<@ToxicFrog>
That one I can't solve without tracing paths instead of positions, and I couldn't be arsed to do so
06:08
<@ToxicFrog>
Especially since at the speeds at which that manifests, you're basically guaranteed to smack into the sun in short order
06:08
<@McMartin>
And is solved more conveniently by Increasing The Frame Rate.
06:08
<@ToxicFrog>
And even if you don't, your bullets are suffering from the same effect and will pass harmlessly through your target~
06:08
< Derakon>
Mmm...at some point I should look into framerate-independent movement for FlatCosmos.
06:09
<@ToxicFrog>
Derakon: the traditional solution is to have some way of communicating to your OnTick() methods how much realtime has elapsed since last tick.
06:09
< Derakon>
Well, mainly I'm concerned about AI updates.
06:10
< Derakon>
E.g. ensuring that ships stayed pointing in the right direction.
06:10
<@ToxicFrog>
Aah.
06:10
<@ToxicFrog>
I toyed with smart AI for the missiles, but eventually settled for just having them point at the target.
06:11
<@ToxicFrog>
Which made them not exceptionally hard to dodge if you were skilled, which in turn made the ones with nuclear and xaser warheads much more prized~
06:12
< Doctor_Nick>
:D
06:12
< Derakon>
Because you needed to do more than just dodge them?
06:12
<@McMartin>
http://project-apollo.net/pie/achievement3.jpg
06:12 * Derakon snerks.
06:12
<@ToxicFrog>
Derakon: well, you don't merely have to dodge the missile, you have to dodge its engagement radius.
06:12
< Derakon>
Idly, the SC2 AI really needs to learn about taking damage insert of trying to shoot down every missile.
06:13
<@ToxicFrog>
Xaser missiles will ZOT you as soon as you enter range, for a fixed amount of damage.
06:13
<@ToxicFrog>
Nukes do less damage the further away you are, so they will wait until you are within their blast radius and moving away before detonating.
06:14
<@ToxicFrog>
(or until you're touching them, at which point the damage is obviously optimal)
06:15
< Derakon>
I actually don't think that case is needed.
06:15
<@ToxicFrog>
There was an early bug where xaser warheads wouldn't die after ZOTting, with the result that they would follow you around constantly thrashing you with radiation and typically killing you in under a second.
06:15
< Derakon>
Well, I suppose it depends on the granularity of movement.
06:15
< Derakon>
Tasty.
06:17
< Derakon>
Final battle: arilou vs. Slylandro. No surprises as to the outcome there.
06:17
<@McMartin>
Ow.
06:17 * Derakon finishes watching the computer beat itself up, goes to take a shower and bed.
06:17
< Derakon>
Night, all.
06:18
<@ToxicFrog>
'night
06:18 Derakon is now known as Derakon[AFK]
06:26
<@Vornicus>
...does the key layout only affect certain situations? I can't seem to use wasd in, for instance, the speaking thing.
06:27
<@McMartin>
Yeah. Menu controls and flight controls are independent.
06:28
<@McMartin>
I haven't been arsed to do the logic to make it work out right when some smartass decides Down should be thrust.
06:29
<@McMartin>
(Menu controls are also, for all practical purposes, hardcoded, but that is likely to eventually change.)
06:31
<@McMartin>
It's St. Pirate's day!
06:31
<@McMartin>
Luck of the ARRRRRRRish to you all!
06:31
<@Vornicus>
pfff
06:41 Mahal [~Mahal@Nightstar-4998.worldnet.co.nz] has quit [Quit: fuk off i got biskit]
06:44 Mahal [~Mahal@Nightstar-4998.worldnet.co.nz] has joined #Code
06:44 mode/#code [+o Mahal] by ChanServ
06:50 * ToxicFrog blinkblinks at the forums
06:50
<@ToxicFrog>
Ok, I'll do my best to help, but I think Scarmouth is an idiot.
06:51
<@ToxicFrog>
Him: self:method.foo.bar
06:51
<@ToxicFrog>
Me: method is a method, you should be using self:method(args)
06:51
< Doctor_Nick>
did someone say foo bar
06:51
<@ToxicFrog>
Him: self:method() (foo.bar)
06:52
<@ToxicFrog>
Ignorance is fine, but I don't see how you can possibly derive that construct ;.;
06:52
<@Vornicus>
heh
06:52
<@ToxicFrog>
Also, he claims that that code runs without errors but doesn't work (ie, the changes don't show up in game)
06:52
<@ToxicFrog>
This is manifestly impossible.
06:53
<@ToxicFrog>
Since I have the code for the method he's calling *in front of me right now*, and it does not return a function.
06:56
< Doctor_Nick>
man
06:56
< Doctor_Nick>
i have a hankerin' for a candy bar now
06:56 * ToxicFrog cannot supply candy, but can supply an endless rain of nuclear missiles.
06:58
< Doctor_Nick>
i have an ion cannon
06:58
<@ToxicFrog>
I can build stuff in orbit.
06:58
< Doctor_Nick>
i can dress myself
06:59
<@ToxicFrog>
This is noteworthy?
07:05 * ToxicFrog deploys the slep cannon
07:51 AnnoDomini [~farkoff@Nightstar-29463.neoplus.adsl.tpnet.pl] has joined #Code
07:53 Doctor_Nick [~fdsaf@Nightstar-27777.rag-a.fsu.edu] has quit [Ping Timeout]
08:13 Thaqui [~Thaqui@Nightstar-12370.jetstream.xtra.co.nz] has left #code [Leaving]
08:21 GeekSoldier [~Rob@Nightstar-3874.pools.arcor-ip.net] has joined #code
08:27 ReivOut is now known as Reiver
08:52 Vornicus is now known as Vornicus-Latens
08:55 GeekSoldier [~Rob@Nightstar-3874.pools.arcor-ip.net] has quit [Quit: Man who run behind car get exhausted]
09:03 * Chalcedon strangle something
09:04 * jerith cuddles the Chalcy.
09:04 * Chalcedon hug jerith
09:04
< Chalcedon>
I need to count the number of items in a text box.
09:05 Forj [~Forj@Nightstar-869.bitstream.orcon.net.nz] has quit [Quit: Gone]
09:05
<@jerith>
Hm...
09:05
< Chalcedon>
I can't do len(list) (because it's not currently a list - but it /can/ be treated like an array, /sometimes/)
09:06
<@jerith>
count = 0; for i in lst: count += 1 perhaps?
09:06
< Chalcedon>
I've been trying to do that
09:06
< Chalcedon>
everything I try it takes exception to.
09:07
< Chalcedon>
(part of the problem being it's C#, I can't actually do for i in list - it's for loop is more circumscribed - it has to be in a particular format)
09:10
<@jerith>
Ah, C#.
09:10
<@jerith>
I'm afraid I have no experience there.
09:13 * Chalcedon beats a lecturer
09:13 * Chalcedon hug a jerith
09:28 * Chalcedon eyes C#
09:30
<@jerith>
What I've heard about C# doesn't convince me that it's significatly different from Java.
09:30
< Reiver>
jerith: It's like Java, only coded by Microsoft~
09:31
< Chalcedon>
I wouldn't say anything to disagree with that, I don't know Java, but I've had some useful help from Java programmers
09:31 * Chalcedon wants Python back :(
09:31
< Chalcedon>
I'm giving up for the evening
09:31
<@jerith>
It's pretty much the same concepts, just implemented slightly differently.
09:32
<@jerith>
I'd say it's probably a little cleaner in that MS has had time to learn from Java's mistakes, but knowing mS that's not necessarily true.
09:34 * Chalcedon hugs
09:34
< Chalcedon>
night all
09:34 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Quit: ]
11:21
< Reiver>
You have $442.
11:21
< Reiver>
This price was achieved by item price + 12.5% Fancy Tax.
11:22
< Reiver>
How do you work out the origional item price?
11:22
< Reiver>
You can't just remove 12.5%, can you...
11:22
< Reiver>
*$422
11:22 * Reiver has apparently forgotten basic math. Even the formula would be fine. >.>
11:27
< EvilDarkLord>
422/1.125
11:28
< EvilDarkLord>
Taxedprice = x * 1.125 -> x = Taxedprice / 1.125.
11:31
< Reiver>
...You sure?
11:32 * Reiver frowns.
11:32
< Reiver>
y = x * 1.5 -> x = y / 1.5...
11:32
< Reiver>
...actually no that works I think.
11:32
< Reiver>
Hrm.
11:32 * EvilDarkLord patpat, grin.
11:32 KarmaBot [~karma.bot@Nightstar-29463.neoplus.adsl.tpnet.pl] has joined #Code
11:32
< Reiver>
!422/1.125
11:32
< KarmaBot>
[Reiver] 422/1.125 = 375.111111.
11:32
< Reiver>
hm
11:33
< EvilDarkLord>
!375*1.125
11:33
< KarmaBot>
[EvilDarkLord] 375*1.125 = 421.875.
11:33
< EvilDarkLord>
Lo and behold!
11:33
< Reiver>
!375-50
11:33
< KarmaBot>
[Reiver] 375-50 = 325.
11:33
< Reiver>
hm.
11:33
< Reiver>
...Yeah, I can afford that. Or close enough anyway.
11:34
< EvilDarkLord>
What are you buying?
11:34
< Reiver>
CPU+Case.
11:46 Reiver is now known as ReivZzz
11:49 Mahal is now known as MahalBedd
13:33 Derakon[AFK] [~Derakon@Nightstar-12737.sea2.cablespeed.com] has quit [Connection reset by peer]
15:15 You're now known as TheWatcher
15:17 GeekSoldier [~Rob@Nightstar-3874.pools.arcor-ip.net] has joined #code
15:21 GeekSoldier_ [~Rob@Nightstar-5565.pools.arcor-ip.net] has joined #code
15:22 GeekSoldier [~Rob@Nightstar-3874.pools.arcor-ip.net] has quit [Ping Timeout]
15:22 GeekSoldier_ is now known as GeekSoldier
15:43 GeekSoldier [~Rob@Nightstar-5565.pools.arcor-ip.net] has quit [Ping Timeout]
15:49 Doctor_Nick [~fdsaf@Nightstar-27777.rag-a.fsu.edu] has joined #code
15:53 Derakon [~Derakon@Nightstar-12737.sea2.cablespeed.com] has joined #code
16:09 GeekSoldier [~Rob@Nightstar-4364.pools.arcor-ip.net] has joined #code
16:17 * Derakon works on making his enemies more intelligent.
16:17
< Derakon>
I've added "if in range, then just strafe instead of accelerating" logic, which should help them keep me in their sights.
16:18
< Doctor_Nick>
dont make the enemies more intelligent, just make the player dumber
16:18 MyCatSleeps is now known as MyCatVerbs
16:18 * Derakon snerks.
16:18 * Doctor_Nick hands a hammer
16:18
< GeekSoldier>
It shouldn't be hard... compile it for Mac only.
16:18
< Doctor_Nick>
oh damn
16:18
< GeekSoldier>
:D
16:18 * Derakon facepalms.
16:18
< Doctor_Nick>
sassy molassy
16:19
< Derakon>
Geek, I don't suppose you realize what OS I'm using?
16:19
< KarmaBot>
According to prophecy.
16:20
< GeekSoldier>
I'm supposing Mac, based on your response.
16:20 * GeekSoldier grins.
16:20
< Derakon>
Indeed.
16:21
< GeekSoldier>
It was a joke. Out of the big three, I picked one at random, Mac was it. Could've been Windows or Linux just as easily.
16:21
< Derakon>
Ehh, I just generally find sweeping generalizations, even in jest, to be rather distasteful.
16:21
< GeekSoldier>
I apologize, then.
16:22
< Derakon>
Accepted.
16:25
< GeekSoldier>
I actually do not have much room to talk. I'm using Vista right now.
16:25
< Derakon>
Heh.
16:25
< Derakon>
No matter what OS you use, you're opening yourself to *some* kind of stereotype.
16:25
< GeekSoldier>
Indeed.
16:26
< Derakon>
E.g. Mac users are snotty artistes; Windows users don't know what they're doing; Linux users are greasy nerds...
16:27
< GeekSoldier>
It's easy to do. .. I fall into the latter two categories (actually a FreeBSD user [ elitist greasy nerd]).
16:27
< Derakon>
OSX is *like* BSD...¬.¬
16:27
< GeekSoldier>
I know.
16:31 * GeekSoldier reboots.
16:31 GeekSoldier [~Rob@Nightstar-4364.pools.arcor-ip.net] has quit [Quit: IceChat - Keeping PC's cool since 2000]
16:36
< Derakon>
Hmm...the manual doesn't appear to say what happens in Lua when you divide by zero.
16:36
< Derakon>
I guess it's still Not Recommended?
16:36
<@jerith>
Well, the universe doesn't like it much.
16:38 GeekSoldier [~Rob@Nightstar-4364.pools.arcor-ip.net] has joined #code
16:39
<@ToxicFrog>
Derakon: you get nan if you divide 0 by 0 and +inf or -inf otherwise.
16:39
< MyCatVerbs>
ToxicFrog: blimey.
16:40
< Derakon>
Okay, thanks.
16:40 * GeekSoldier divides by zero, watches self approach infinity.
16:40
<@ToxicFrog>
> print(1/0, 0/0, -1/0)
16:40
<@ToxicFrog>
inf nan -inf
16:40
< MyCatVerbs>
ToxicFrog: that'd make Lua one of the first languages I've ever seen that actually sticks to the IEEE floating point spec on that point, rather than pussying out and throwing an error.
16:42 * Derakon grumbles about how much geometry is involved in game programming.
16:43 * MyCatVerbs whaps Derakon upside the head with a quadratic.
16:43
< Derakon>
E.g. given a line segment and a distance d, find the point p at right-angles to the line segment, d away from one of the endpoints.
16:43
< MyCatVerbs>
Look on the bright side. At least it's bloody Euclidean.
16:43
< Derakon>
This is true.
16:43
< Derakon>
It's also Newtonian, thank god.
16:44 * Derakon is *not* implementing special relativity for this game!
16:50
< Derakon>
Hrm. If you square the legs of a triangle, does it have the same angles as before?
16:50
< Derakon>
No, it does not. Blast.
17:02
<@ToxicFrog>
Hmm.
17:02
<@ToxicFrog>
Someone who's more in-practice with C++: can I go: double ** kernel = new double[w][h]; ?
17:02
< Derakon>
No.
17:03
< Derakon>
You do double** kernel = new double*[w]; for (int i = 0; i < h; ++i){kernel[i] = new double[h];}
17:03
< Derakon>
Er, the bounds on that loop are wrong.
17:05
<@ToxicFrog>
Yeah, but I know what you mean.
17:05 * ToxicFrog thwaps C++
17:06
< Derakon>
It's an old language. *shrug*
17:10
< Derakon>
Which costs more - cos or sqrt?
17:10
<@ToxicFrog>
No idea.
17:10
<@ToxicFrog>
Use whichever is more readable.
17:11
< Derakon>
Heh. Right.
17:16
< Derakon>
Man, I *suck* at geometry now.
17:42
< Derakon>
Okay! I've written code that lets a ship circle another ship!
17:42
< Derakon>
This will be very useful, as soon as I give ships guns that can fire off-bore.
17:43
< Derakon>
As it is, currently holding still is a perfect defense. ¬.¬
18:14 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has joined #Code
18:26 You're now known as TheWatcher[afk]
18:26 Vornicus-Latens is now known as Vornicus
18:42 Forj [~Forj@Nightstar-869.bitstream.orcon.net.nz] has joined #code
18:49 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
18:49 mode/#code [+o Chalcedon] by ChanServ
19:13
<@Vornicus>
gnar. this is really the hardest part. I don't know how to do it right.
19:13
<@jerith>
?
19:13
<@Vornicus>
You know the map projection thing I've been trying to do.
19:14
<@jerith>
Ah.
19:14
<@jerith>
What's that for?
19:14
<@Vornicus>
Right now I'm trying to figure out how to get the corners of each individual pixel in the output map.
19:14
<@Vornicus>
no particular reason, I just noticed that a lot of games will texture a sphere and have really bad blur at the poles.
19:15
<@Vornicus>
So I'm trying to see if I can build a map projection that does not have that blur.
19:15
<@jerith>
Perhaps they're trying to use a rectangular projection or something?
19:16
<@Vornicus>
Usually they use equirectangular projection, usually.
19:17
<@jerith>
You have an excess of too many redundant usuallies in there.
19:17
<@Vornicus>
which for things like GalCiv2 is understandable, sorta. But a lot of games that just display spheres do it too, and that sucks.
19:17
<@Vornicus>
Yeah, well
19:18
<@Vornicus>
I have the map projection designed, but I can't figure out how to get the pixel corners so I can run the conversion.
19:18
<@Vornicus>
The big problem, again, is split points.
19:22
<@Vornicus>
I don't have to go /across/ any split points, going from equirectangular to my projection, but I do end up having to deal with the equirectangular projection having an edge that folds into a point.
19:33
< Doctor_Nick>
is there a stl implementation of a binary tree
19:34
<@ToxicFrog>
Probably, but once you find it you'll wish there wasn't.
19:35
< Doctor_Nick>
:P
19:36
<@Vornicus>
There is not a binary tree in and of itself.
19:36
<@Vornicus>
That said, map and set both use self-balancing binary trees.
19:36
< Doctor_Nick>
thats what i hear
19:36
< Derakon>
TF: if I wanted to check if a value on the stack was nil, would I have to use luaL_checktype? There doesn't seem to be a luaL_checknil.
19:36
< Doctor_Nick>
im trying to construct an expression tree and im wondering if i have to make my own binary tree
19:37
< Derakon>
Binary trees are not especially complicated to make.
19:37
< Doctor_Nick>
i know
19:37
<@ToxicFrog>
Derakon: lua_type(L, index) == LUA_TNIL
19:37
< Derakon>
...oh, right.
19:37
<@ToxicFrog>
lua_type
19:37
<@ToxicFrog>
int lua_type (lua_State *L, int index);
19:37
<@ToxicFrog>
Returns the type of the value in the given acceptable index, or LUA_TNONE for a non-valid index (that is, an index to an "empty" stack position). The types returned by lua_type are coded by the following constants defined in lua.h: LUA_TNIL, LUA_TNUMBER, LUA_TBOOLEAN, LUA_TSTRING, LUA_TTABLE, LUA_TFUNCTION, LUA_TUSERDATA, LUA_TTHREAD, and LUA_TLIGHTUSERDATA.
19:37
< Derakon>
Because the luaL_checkfoo functions return the value there, and there's no point in returning nil.
19:38
< Derakon>
Thanks.
19:38
<@Vornicus>
an expression (syntax?) tree is not the same as a binary tree.
19:38
<@ToxicFrog>
If what you actually want is an optional argument, look into luaL_optfoo
19:38
< Derakon>
No, what I'm trying to do is prevent my Sprites from getting their state out of Lua when they've already been deleted.
19:38
<@ToxicFrog>
Which is like luaL_checkfoo, except that if the argument is missing or nil it returns a default value instead of throwing an error.
19:38
< Derakon>
So I do a gettable, then I check to see if what I actually got was nil.
19:38
<@ToxicFrog>
Aah.
19:39
<@Vornicus>
It doesn't have the ordering constraint and doesn't guarantee that all parts will be binary.
19:41
<@Vornicus>
Indeed, many nodes will be much bigger than binary - C-like for loops, for instance
19:42
<@ToxicFrog>
Well, you can implement an AST on top on a bin-tree.
19:42
<@ToxicFrog>
But it's kind of a pain.
19:45 AnnoDomini [~farkoff@Nightstar-29463.neoplus.adsl.tpnet.pl] has quit [Killed (NickServ (GHOST command used by AbuDhabi))]
19:45 AnnoDomini [~farkoff@Nightstar-29540.neoplus.adsl.tpnet.pl] has joined #Code
19:45
<@ToxicFrog>
Doctor_Nick: what's it an AST for?
19:46 KBot [~karma.bot@Nightstar-29540.neoplus.adsl.tpnet.pl] has joined #Code
19:47
< KBot>
KarmaBot v1.19. online and ready. Type "!help commands" for command list.
19:47 KarmaBot [~karma.bot@Nightstar-29463.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
19:47
< Derakon>
Is that your bot, TF?
19:47 KBot is now known as KarmaBot
19:48
<@ToxicFrog>
No.
19:48
<@Vornicus>
Karmabot is Anno's.
19:48
<@ToxicFrog>
I only have three bots, two of them are mothballed and the third one doesn't use !commands.
19:48
< Derakon>
What's the Lua bot doing these days?
19:48
<@Vornicus>
It's a D&D bot.
19:51
<@ToxicFrog>
Derakon: Exploding when it gets a blank line from the server.
19:51
<@ToxicFrog>
IOW, it's usable but not fully debugged.
19:51
< Derakon>
A creative way to handle input, to be sure.
20:22 * Vornicus gnargs
20:22
< Doctor_Nick>
Error! Invalid action!
20:30 MahalBedd is now known as Mahal
20:33 Doctor_Nick [~fdsaf@Nightstar-27777.rag-a.fsu.edu] has quit [Quit: ]
20:47 AnnoDomini is now known as Yahir
20:50 * Janus kills all math with a rusty saw. Eats math's children.
20:55
< Janus>
What's it called when something tries to reach a certain point, but overshoots, and has to keep doing that a few times until it's steady? I'd look it up, but l don't even know the name.
20:55
< GeekSoldier>
Divergence?
20:55
< GeekSoldier>
no, that's not it...
20:59
< Janus>
Actually... if the divergence is negative, it might be it. Though, I'm not sure.
21:01
< Derakon>
Oscillation?
21:01
< Derakon>
Damped oscillation sounds a lot like that.
21:03
< Janus>
Oscillation, there we are!
21:03 * Janus glees all over the Derakon
21:03
< Derakon>
Ack!
21:04 * GeekSoldier hands Derakon the glee-cleaning rag.
21:06
<@Vornicus>
hot damn, it feels like it's 80 degrees out.
21:07
<@Vornicus>
...Accuweather says it's 63. I would like to know where they got that.
21:08
< Derakon>
Is it humid?
21:08
<@Vornicus>
No.
21:08
<@Vornicus>
23%.
21:08
< GeekSoldier>
had it been cold recently?
21:09
<@Vornicus>
Not that recently - I've spent the last week or so with my window open during the day.
21:09
< GeekSoldier>
because it was cold here for a while, and I found 65 quite warm yesterday.
21:09 Mahal is now known as MahalAFK
21:15 You're now known as TheWatcher
21:21 Thaqui [~Thaqui@Nightstar-12370.jetstream.xtra.co.nz] has joined #code
21:44 GeekSoldier [~Rob@Nightstar-4364.pools.arcor-ip.net] has quit [Quit: Not that there is anything wrong with that]
22:05 You're now known as TheWatcher[afk]
22:50 Forjeh [~Forj@Nightstar-869.bitstream.orcon.net.nz] has joined #code
22:51 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
22:51 Forj [~Forj@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
22:56 ReivZzz [~reiver@IRCop.Nightstar.Net] has quit [Ping Timeout]
22:56 ReivZzz [~reiver@Nightstar-2073.ubs-dsl.xnet.co.nz] has joined #Code
23:01 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
23:10 * Chalcedon beat something
23:10
< Yahir>
Ow.
23:11
<@ToxicFrog>
More C# woes?
23:11
< Chalcedon>
I never said that I beat you, merely something
23:11
< Chalcedon>
yes
23:11
< Chalcedon>
I need to change one character in a string to a capital letter
23:11
< Chalcedon>
I got it working but it changed all instances of that letter
23:11
< Chalcedon>
(this wasn't helpful)
23:13
<@ToxicFrog>
By one, you mean just the first one? Or a specific one?
23:13
<@ToxicFrog>
(show us the code!)
23:16
< Chalcedon>
just the first one
23:16
< Chalcedon>
and I don't have any even marginally working code
23:16
< Chalcedon>
I am trying a new idea at the moment
23:18
< Chalcedon>
it works, it works!
23:19
< Chalcedon>
you know, half the time I moan about something in here, I fix it myself shortly afterwards.
23:19
< Chalcedon>
The other half somebody makes a really useful comment/suggestion
23:21
<@Vornicus>
heh
23:21
< Chalcedon>
woohooo!
23:22
< Chalcedon>
I've met all the minimum requirements for my assignment
23:22
< Chalcedon>
(other than like appropriate comments and stuff)
23:22
< Chalcedon>
I started Friday.
23:23
<@Vornicus>
woot
23:23 * Vornicus fiddles
23:24
<@Vornicus>
You know, this was a lot easier than I thought - I just wrote a set of converter functions from ruby objects to PostScript.
23:27
< Chalcedon>
:)
23:35 Netsplit DeepThought.NY.US.Nightstar.Net <-> Blargh.CA.US.Nightstar.Net quits: ReivZzz, Chalcedon
23:37 Netsplit over, joins: Chalcedon
23:37 mode/#code [+o Chalcedon] by ChanServ
23:42 Yahir is now known as AnnoDomini
23:43
<@ToxicFrog>
argh
23:43
<@ToxicFrog>
Dog-molesting C++
23:46 ReivZzz [~reiver@Nightstar-28874.ubs-dsl.xnet.co.nz] has joined #Code
23:46 ReivZzz is now known as Reiver
23:48
<@ToxicFrog>
This would be so much easier if I could refer to members by strings.
23:48
<@ToxicFrog>
Maybe I should rewrite the goddamn thing in Lua, apart from the disk IO libraries.
23:48 * Chalcedon offer TF a cookie?
23:48 * ToxicFrog nibbles
--- Log closed Sun Mar 18 00:00:51 2007
code logs -> 2007 -> Sat, 17 Mar 2007< code.20070316.log - code.20070318.log >