#pentagram@irc.freenode.net logs for 10 May 2003 (GMT)

Archive Today Yesterday Tomorrow
Pentagram homepage

[00:22:09] --> Kirben has joined #pentagram
[00:22:09] --- ChanServ gives channel operator status to Kirben
[00:39:36] <-- servus_away has left IRC (Read error: 110 (Connection timed out))
[01:59:33] --> servus has joined #pentagram
[03:52:19] --> Ember has joined #pentagram
[04:09:18] <-- DarkeZzz has left IRC (Read error: 110 (Connection timed out))
[07:47:15] --> Cashman has joined #pentagram
[07:48:14] <-- Cashman has left IRC (Client Quit)
[08:15:39] --> Cashman has joined #pentagram
[08:19:14] <-- Cashman has left IRC (Client Quit)
[08:21:45] * Ember watches Cashman appear and disappear in quick succession. Makes sense, cash always seems to disappear quickly around her. ^.^
[09:49:21] <-- servus has left IRC ()
[10:27:23] --> wjp has joined #pentagram
[10:27:23] --- ChanServ gives channel operator status to wjp
[10:32:24] --- Ember is now known as Darke
[10:32:31] --- ChanServ gives channel operator status to Darke
[10:44:06] --> Colourless has joined #Pentagram
[10:44:07] --- ChanServ gives channel operator status to Colourless
[10:55:02] --> sbx has joined #pentagram
[10:58:58] <Colourless> committed some changes to pentagram. i forgot to mention something in the change log, i removed all the resolution constants, execpt for SetVideoMode() itself
[11:04:46] * Darke ooohs.
[11:05:41] <Colourless> i found one massive limitation with current things... i didn't have away to create Look() process for the traced items..... since we can't assign an item num to usecode processes
[11:06:22] <Colourless> or can we?
[11:07:05] <wjp> the constructor takes an item I think
[11:07:11] <Colourless> ah, we can it seems
[11:07:30] <Colourless> Item::I_look
[11:08:49] <Colourless> other problem, for permanent NPCs, the class number is not the shape, it's NPC num + 1024
[11:09:35] <wjp> hm, you broke the gcc asm Fill32 :-)
[11:09:54] <Colourless> you can fix it :-)
[11:11:44] <wjp> indeed I can :-)
[11:12:01] <Colourless> it seem my faith was not misplaced
[11:12:06] * Darke lets wjp fix it. *grin*
[11:12:10] <Colourless> s/seem/seems/
[11:15:41] <wjp> did you optimize sorting further?
[11:15:53] <wjp> I seem to be getting slightly lower numbers here
[11:16:06] <Colourless> the optimization would be most marginal
[11:16:16] <Colourless> i removed 6 subtractions! :-)
[11:16:21] <wjp> oh wow :-)
[11:17:43] <Colourless> running the avatars look function is... unwise :-)
[11:18:14] <Darke> Why? It works? *grin*
[11:19:09] <Colourless> yes, sort of ;-)
[12:15:33] <wjp> k, I added some basic error checking to usecode calls
[12:16:21] <Colourless> :-)
[12:16:45] <wjp> (enough to stop it from crashing when you click on objects without usecode)
[12:17:28] <Colourless> good :-)
[12:18:05] <wjp> hm, the infinite loop with the avatar seems to be the cheat menu?
[12:20:31] <Colourless> yes it is
[12:21:09] <wjp> I wonder which missing flag/intrinsic (or broken opcode) causes that to show up
[12:21:29] <Colourless> get flags?
[12:21:36] <Colourless> a global?
[12:21:54] <Colourless> the disassembly of the avatars func should reveal it
[12:22:29] <wjp> 00BD: 0F calli 00h 00FCh (AvatarCanCheat())
[12:22:29] <wjp> ?
[12:22:45] <Colourless> ah yeah that would probably be part of it :-)
[12:23:00] <wjp> we seem to be returning 4 there
[12:23:14] <wjp> (which is the return value of the previous intrinsic :-) )
[12:23:23] <Colourless> sounds most... wrong :-)
[12:23:26] <wjp> s/intrinsic/spawn/, or whatever
[12:24:01] <wjp> hm, no, wait; it defaults to creating a dummy process
[12:24:07] <wjp> (and returns the pid of that process)
[12:24:21] <Colourless> creating a dummy process is most wrong :-)
[12:24:22] <wjp> I know it's a most unsensible default :-)
[12:24:39] <Colourless> not just sounds wrong... IS wrong :-)
[12:24:41] <wjp> but it caused some more interesting usecode functions to run for testing
[12:25:20] <Colourless> well then perhaps we could create a list of which funcs are processes and which aren't
[12:25:30] <wjp> k, returning 0 removes the loop
[12:25:40] <wjp> (unsurprisinly)
[12:25:45] <wjp> s/in/ing/
[12:26:01] <Colourless> you know, pentagram is hardly functional, and there is almost already cheats :-)
[12:26:12] <wjp> :-)
[12:26:41] <wjp> would be weird to have the cheat menu running before being able to actually control the avatar :-)
[12:27:01] <Colourless> well, it would check many of the intrinsics
[12:27:02] <wjp> hm, interesting part of this canAvatarCheat intrinsic is that we can wire it into our own cheat mode
[12:27:09] <Colourless> has all sorts of odd functions
[12:27:17] <wjp> of course
[12:27:23] <wjp> it wouldn't actually do much :-)
[12:27:56] <Colourless> today, pentagram got just that much closer to being finished :-)
[12:28:07] <Colourless> usecode not actually gets executed
[12:28:19] <Colourless> i think we should removed the 'test' usecode call from pentagram starup
[12:28:29] <Colourless> s/not/now/
[12:29:45] * wjp nods
[12:30:11] <wjp> might as well
[12:31:35] <wjp> committed
[12:33:10] * Darke entusiastically yays!
[12:33:23] * Darke is idleish building shelves at the moment. *grin*
[12:33:37] <Colourless> WoW!
[12:33:44] * sbx gives Darke an h.
[12:34:27] * Darke wishes it was as easy and seditative as programming. Then again, he'd prefer if his shelving didn't spontaneously collapse for no good reason once every few days.
[12:34:45] * Darke inserts it into sbx, making him shbx.
[12:37:37] * sbx glares at Darke and removes the h making him sbx. He places the unwanted letter into his pocket.
[12:38:32] <Colourless> line 161 item.cpp... why?
[12:39:04] <wjp> I was just wondering about that too, actually
[12:39:24] <wjp> did I put that there?
[12:39:39] <wjp> it seems I did
[12:40:30] <wjp> I'm sure it had a good reason at the time :-)
[12:40:44] <Colourless> i don't see any reason now :-)
[12:40:50] <wjp> me neither
[12:41:06] <wjp> I put it in on 10 april
[12:41:15] * Darke oooohs... it prints 'tree' when you click on a tree!
[12:41:24] <wjp> and "man" when you click on Devon
[12:41:31] <wjp> and "fish" when you click on a fish, and ... :-)
[12:41:40] * Darke is in a very OooooohShiny! mood tonight. *grin*
[12:41:48] <Colourless> boat... when you click on something nameless
[12:41:53] * Darke clicks on sbx.
[12:42:04] <wjp> Oooh! Shiny ones!
[12:42:14] <wjp> Colourless: ?
[12:42:23] * sbx says "?"
[12:42:31] <Colourless> boat = boat :-)
[12:42:36] <Colourless> cespenar!
[12:42:50] <wjp> Colourless: bingo :-)
[12:43:18] <Darke> Hmm... still can't click on the avatar it seems. *grin*
[12:43:27] <wjp> why not?
[12:43:29] <Colourless> one can never forget cespenar :-)
[12:43:35] <Colourless> still infinite loops
[12:43:44] <wjp> hm, works here
[12:43:45] <Darke> Yup. *grin*
[12:43:53] * wjp wonders what he forgot to commit
[12:44:10] <Colourless> u8instrisics.h perhaps?
[12:44:16] <wjp> no
[12:44:28] <wjp> oh, UCMachine
[12:44:34] <Darke> It just keeps on adding processes. *grin*
[12:44:58] <Colourless> darke, calculate how long it will take to run out of pids :-)
[12:45:27] <Darke> It's going at about one pid a second here. *grin*
[12:45:35] <wjp> don't they disappear again too?
[12:45:46] <Colourless> i don't know
[12:45:54] <Colourless> it's not like i've looked at what it's doing :-)
[12:46:21] <Darke> Goes twice as fast if pentagram is minimised. *grin*
[12:46:55] <Colourless> it's calling an unhandled intrinsic (probably ask())
[12:47:07] <Darke> Doesn't look like we need to worry about memory usage at the moment. Sitting rock solid on 12meg, even though it keeps spawning processes. *grin*
[12:47:26] <Darke> (Not that *that* would chew up much memory, but still...)
[12:47:41] <Darke> What's the maximum number of pids anyway?
[12:47:50] <Colourless> 32767
[12:48:11] <Colourless> 0 = reserved, >= 32768 reserved
[12:48:13] <Darke> It's just over 2k processes so far, and it's been running 4 minutes.
[12:48:27] <Colourless> the 'default
[12:48:31] <Colourless> process may terminate
[12:48:51] <Colourless> the default being DelayProcess(4)
[12:49:52] <Colourless> and it does
[12:50:08] <Colourless> so we are not 'leaking' the pids will just recycle once you hit the limit
[12:53:47] <Darke> Cool.
[13:54:19] <Darke> Looks like it worked. Have had it running for 55 minutes now, and it's wrapped around. *grin*
[13:57:44] <wjp> :-)
[13:58:27] * Darke will probably kill it once the hour is up. *grin*
[13:58:27] <Colourless> nice stress test :-)
[13:59:00] <Darke> No change on memory use, btw, still sitting on exactly the same numbers it started with. *grin*
[14:00:16] <Darke> Killed. It created a log file 170Meg in size. *grin*
[14:00:46] <Colourless> you mad?
[14:01:01] <Darke> Eh?
[14:02:14] <Colourless> logging the output
[14:03:42] <Darke> Why wouldn't I? I could just pipe it to /dev/null, but figured I might as well drop it to a file. Sped the execution up by a factor of 2 because it didn't have to dump to console too. *grin*
[14:32:05] <Darke> Hmm... y'know, your memory spikes up quite a bit when you open up a 170Meg file in vi.
[14:33:41] <Darke> Wrapped from 32767 to pid 6...
[14:34:01] <Darke> then to pid 2... *blink*
[14:34:41] <wjp> it reuses them in the order they were freed
[14:34:43] <wjp> (IIRC Colourless' algo correctly)
[14:34:47] <wjp> s/IIRC/IIR/
[14:36:04] <Darke> Then 4, 11, 9, 7, 10, 5, 8, 12, 13, 14, 15, 16, 17... seems to go up normally from there.
[14:37:25] <Darke> So it seems to have missed 3. Wierd.
[14:37:39] <wjp> that one's probably still running :-)
[14:39:20] <Darke> Wouldn't surprise me. It's never reused. I wonder what it's for? pid=1 is the original caller process, 401, and that's the one creating all these processes. *grin*
[14:39:57] <Colourless> probably something else that was spawned that you don't realize
[14:41:48] * Darke ahs!
[14:41:51] <Darke> running process 3, class 581, offset 29d8
[14:42:03] <wjp> 00DE: 57 spawn 04 00 0581:29D8 (FREE::29D8)
[14:42:10] <Darke> It gets suspended and never restarted. *grin*
[14:42:45] <Darke> Possibly because it finished... hmm...
[14:43:22] <wjp> it does something with sfx
[14:43:49] <-- sbx has left IRC ("X-Chat [1.6.4]")
[14:44:30] <wjp> possibly plays sound and waits until it is finished
[14:44:56] <wjp> it runs 581:1C19 while waiting, though
[14:45:00] <Darke> Makes sense.
[14:45:28] <wjp> 1C19 calls two functions which call getCurrentTimerTick
[14:46:02] <Darke> BTW, the offsets given in the output, don't seem to match the offsets in the output of disasm. Are they just not accounting for header information?
[14:46:30] * Darke ahs, yes.
[14:46:37] <wjp> hm? they should match
[14:46:51] <Darke> Actually, no. *ponder*
[14:46:55] <Darke> They don't seem to here.
[14:47:27] <Darke> The offset given, doesn't match the bit of code. in the disassembly output. At least not what I was looking at. Will check again.
[14:49:55] <wjp> by how much are they off?
[14:50:17] <Darke> Ah. Was looking at the wrong bit of pentagram output. The interleaving is for obvious reasons, a bit messy. *grin*
[14:51:23] * Darke was looking at a 401 offset and comparing it with the disasm of 581. *grin*
[14:52:28] <-- Kirben has left IRC (Read error: 104 (Connection reset by peer))
[14:53:12] <-- Colourless has left IRC ("casts invisibility")
[14:57:14] <Darke> Any particular use you can think of for this rather large log before I delete it? *grin*
[14:57:25] <wjp> none whatsoever :-)
[14:57:42] <Darke> Actually, it would bzip2 up rather nicely, maybe I should keep it? *grin*
[14:58:07] <wjp> I won't stop you :-)
[14:58:35] * Darke bzips it up anyway, just for curiousity. *grin*
[15:26:22] <Darke> It got squished from 170Meg down to 1.2Meg. Nice. *grin*
[15:28:43] <wjp> it _is_ just a bit repetitive, of course :-)
[15:28:56] <Darke> Just a little. *grin*
[16:22:54] * Darke waits for gcc to chew through a recursion of header files, remembering precicely why usecode-script isn't going to have any of them at all. *grin*
[16:34:17] * Darke watches pentagram crash 'n burn when he adds the consle only mode. The FORGET_OBJECT and FORGET_ARRAY macros are hiding in pent_include.h if anyone's interested. *grin*
[16:36:34] * Darke suddenly trips over all the assumptions as to what is running and what isn't. Looks like a minimal system might be a little bigger then he expected. *grin*
[16:37:13] <Darke> UCMachine needs to be part of the minimal system too.
[16:42:56] <Darke> Application::run() calls paint() which naturally enough assumes that the screen is setup, which it isn't. *grin*
[16:46:50] <Darke> It works! 'Cept there's no way to... err... terminate it. I think we might need two run loops, run with console only and one with everything (App::run and App::runConsole?) or something.
[16:48:00] <Darke> Even doing nothing, pentagram tries to take up 100% of the cpu. I think we need to make it play nice at some point in time. *grin*
[16:54:09] * Darke thinks we need an idle timeout. If nothing is happening for more then 2 minutes we should terminate with a "You're supposed to *do* something y'know?" message. *grin*
[17:13:53] <Darke> Is 'framenum' in Application::run() anything special other then a chronologicly unique id for each frame? Or is it going to be anything more special?
[17:25:20] <Darke> Is the return value from Process::run() is whether we need to redraw the screen because we've done something? (true==paint, false==do nothing?)
[17:33:37] <wjp> hm, it's not really fixed yet
[17:36:58] <wjp> it might be better to handle the 'dirty' bit elsewhere
[17:38:08] <wjp> not sure about framenum; ticknum or something might make more sense there
[17:49:03] * Darke nods.
[17:50:15] <Darke> So it's more of currently 'true==did something', 'false=did nothing'? Or a case that if you're doing something that's going to have no external effect (say... disassembling?) just return false?
[17:50:47] <wjp> we're not using the return value at all currently
[17:51:15] * Darke is tempted to write a quick perl script to output a standard Process framework, specialised to whatever class you want to create. It's too simple. Way too simple.
[17:51:28] <Darke> Noticed. *grin*
[18:04:50] <Darke> My plan with disasm, etc, is to have to 'external' ways of calling them, and having them as fully fledged processes within the engine, so they could be inited and executed at any point in the game, for various random reasons.
[18:06:49] <Darke> So basically you either run `./pentagram --disasm --whatever-options-I-want-to-disasm-it-with`, or run `./disasm --whatever-options-I-want-to-disasm-it-with`, which is simply a wrapper around the Applications constructor that salts the argv/argc list with a pre/postpended '--disasm' (or something similar) and execs Application::run as per usual.
[18:08:26] <Darke> Now the thing is, everything logically works fine... except for the arguement passing. In this scenario, Applications needs to know the arguments that all the potential Processes it can create can possibly have, so it can parse the arguments list. Which is probably not a good thing.
[18:09:24] <Darke> (Since, of course, it needs to parse the arguments to extract a '--disasm' or similar flag to know not to just run pentagram as normal.)
[18:13:43] <wjp> bbl, dinner
[18:15:09] * Darke probably should slink off to sleep, he's got a really, really basic error that for the life of him he can't work out what the problem is. Cognition seems to be low. *grin*
[18:40:24] <wjp> b
[18:40:34] <wjp> that's usually a good to sleep, yes :-)
[18:40:34] <Darke> We also need someway of hinting to Applications from deep in another class/process, that it should terminate if nothing else of importance is happening. (Such as if it's running a stand alone disassembler.) I've currently just slipped Applications::application into the public section and added a 'ForceQuit' function, which just sets isRunning=false, which works, but has an elegance quotient of epsilon.
[18:40:40] <wjp> s/good/good time/
[18:41:22] * Darke fixed the bug btw, the problem was he hadn't done a %s/UCPROCESS_H/DISASMPROCESS_H/g on the appropriate header file. *grin*
[18:42:33] * Darke thinks he'll have to write that script he mentioned, else he'll have that, or some other trivial problem on *every* new process he writes. No doubt by the time he's finished he'll have a nice collection of them. *grin*
[18:46:05] * Darke rereads his rambling above and thinks saying, "I've done something incredibly stupid. This, of course, has an elegance quotient of epsilon.", is rather... well... stupid. Or at least tautological. *grin*
[18:55:24] --- Darke is now known as DarkeZzz
[20:28:10] --> Dark-Star has joined #pentagram
[23:20:14] <-- Dark-Star has left IRC ()
[23:25:30] <-- wjp has left IRC ("Zzzz...")