#pentagram@irc.freenode.net logs for 7 Sep 2003 (GMT)

Archive Today Yesterday Tomorrow
Pentagram homepage

[02:10:55] <-- Cyberworm has left IRC ("~{FSN}~ (v2.1) Webpage:(http://f-s-n.de.vu) Verweilt:(5 Stunden 13 Minuten 3")
[02:12:54] --> Kirben has joined #pentagram
[02:12:54] --- ChanServ gives channel operator status to Kirben
[03:26:26] <-- Fingolfin has left IRC ("42")
[11:41:35] --> Colourless has joined #Pentagram
[11:41:35] --- ChanServ gives channel operator status to Colourless
[11:45:10] <Colourless> hi
[11:48:23] <DarkeZzz> 'ello.
[11:50:11] <Colourless> so, what sort of output does your mythical usecode compiler output?
[11:50:44] <DarkeZzz> http://www.gamasutra.com/resource_guide/20020916/lambright_pfv.htm <- Interesting article about encapsulating the mecanics for transmitting game data across a network. Figured it might be interesting reading for savegame related stuff. *grin*
[11:51:17] <DarkeZzz> Compiler? Nothing really at the moment, one hopes appropriate binary opcodes in the future. *grin*
[11:51:33] <Colourless> hmmm ok
[11:51:47] <Colourless> i've just been thinking about an appropriate lla format these last few days
[11:52:08] <Colourless> hoping to write up some 'specifications' and to make some sort of example
[11:53:13] <DarkeZzz> lla? Appropriate assembler file format? Or are you meaning llo?
[11:53:21] <DarkeZzz> (That is object file format.)
[11:53:23] <Colourless> lla format of course would the strongly tied to the llo format
[11:53:27] <Colourless> assember
[11:53:29] <DarkeZzz> Ahh.
[11:54:48] <Colourless> i've been thinking, we don't 'have' to resolve intrinsic numbers when we are compiling
[11:55:02] <DarkeZzz> Cool. What's kinda tying up the compiler is the decompiler, as well as outputting the script, can output lla and llo too. So I keep getting into gridlock, having to complete one thing properly, so I can integrate in the other. *grin*
[11:55:20] * DarkeZzz nods.
[11:56:13] <Colourless> since we plan on dynamic linking, it would actually make lots of sense, if we had a used intrinsics segement in each object that listed all the used intrinsics, when will be resolved when dynamic linking
[11:56:32] <Colourless> dynamic linking being when object is loaded into memory
[11:57:01] <Colourless> (by pentagram)
[11:58:15] <DarkeZzz> So you'd essentially treat intrinsics the same as any other function name?
[11:58:22] <Colourless> yes pretty much
[11:59:04] <Colourless> though, still keeping separate opcodes, and such.
[11:59:56] <Colourless> my current thinking is there would be imports, exports, globals (maybe) and intrinsics segments in each llo file
[12:00:52] <Colourless> exact usage of globals segement though would need defining. Current thinking is it would just be a import table for globals
[12:01:30] * DarkeZzz nods.
[12:01:38] <Colourless> anyway, imports (could probably use a different name) would be for imported usecode routines/processes. exports, for exported usecode routines/processes
[12:01:46] <Colourless> globals for imported globals
[12:01:53] <Colourless> intrinsics for imported intrinsics
[12:02:51] <Colourless> thinking about global segement
[12:03:30] --> wjp has joined #pentagram
[12:03:30] --- ChanServ gives channel operator status to wjp
[12:03:58] <Colourless> we could have it so that we don't need all the globals initially defined
[12:04:07] <Colourless> if a usecode function wants an undefined global
[12:04:11] <Colourless> hi wjp
[12:04:16] <wjp> hi
[12:04:23] <Colourless> then that global could be created in some 'global' list
[12:04:57] <DarkeZzz> fold 'knows of' imported and exported functions, though it doesn't know what to do with them, and I haven't got global handling added yet, so that isn't used. So quite a bit of the glue code's there for the compiler output.
[12:05:41] <DarkeZzz> Yup.
[12:05:43] <DarkeZzz> Hi wjp!
[12:05:49] <Colourless> so when a llo object is loaded by pentagram, we search in a global map for the values for each of the needed globals. If a global doesn't exist, we create it and set it to 0
[12:06:19] <wjp> indexed by name, I guess? (the 'global map')
[12:06:24] <Colourless> yes
[12:06:49] <DarkeZzz> Yup. Pretty much what I had planned for globals too. *grin*
[12:07:57] <Colourless> if we want dynamic intrinsic linking, then name mangling might be wanted (actually it might be wanted anyway)
[12:08:58] <Colourless> some intrinsics are overloaded (same name, different args)
[12:09:05] <DarkeZzz> Needed actually, since... that. *grin*
[12:09:47] <Colourless> doesn't need to be anything fancy.
[12:10:04] <DarkeZzz> Nope.
[12:11:45] <Colourless> while c++ name mangling uses lots of different characters that don't seem to mean much (i.e. Z means unsigned char!?!), i'm thinking we could use things like s08, s16, s32 and s08, s16, s32 for the basic types
[12:12:29] <Colourless> uh u08, u16, u32
[12:13:09] <DarkeZzz> Need to make sure at least one "not a valid character in a function name", character is in it too before you list the types. Else things can go horribly wrong. *grin*
[12:13:39] <Colourless> for structure pointers things get a little more complex. need something to specify the name of the structure
[12:14:16] <wjp> a letter, followed by length of the name, followed by the name?
[12:14:26] <wjp> or the name encapsulated in non-alphanumeric chars
[12:14:31] <Colourless> yes that is often how it'd done
[12:14:43] <Colourless> (letter, len, name)
[12:15:25] <DarkeZzz> The only 'problem' is how to tell the difference between a standard 'call another script function' and 'call an intrinsic', I was originally going to do it by matching on function name, but that was when I wasn't going to dynamicly link them.
[12:15:31] <Colourless> for specifying a pointer, i don't see why we couldn't just use *
[12:16:22] * DarkeZzz wasn't intending upon supporting anything other then 'base' types for quite a while anyway, so at least for the moment structure related stuff isn't too important. *grin*
[12:16:37] <Colourless> :-)
[12:17:22] <Colourless> well, how exactly were you going to handle intrinsics?
[12:17:25] <DarkeZzz> Of course, 'base' types aren't really all that basic. Ranging from bools to ints to the complexity of std::string and std::list. *grin*
[12:17:34] <Colourless> lets say, Item::getX()
[12:18:02] <Colourless> how would you call, how would you declare
[12:19:26] <DarkeZzz> Well, firstly you'd have an inbuilt type 'Item', so it'd look something like: `anItem : Item; anItem.getX()`? Or am I miss interpreting you? 8grin*
[12:19:52] <DarkeZzz> Erf, or rather...
[12:20:13] <DarkeZzz> anItem : Item; anInt : Integer; anInt = anItem.getX();
[12:20:47] <Colourless> Item::getX() is an intrinsic function, that can be called on any game object
[12:21:41] <DarkeZzz> Which is, what 'Item' and 'NPC'?
[12:22:09] * DarkeZzz wishes he knew where he put his notes, he has something on this floating around in them. He suspect they're at work. *sigh*
[12:22:43] <Colourless> :-)
[12:25:02] <DarkeZzz> From memory, I was abstracting most of the 'complex' objects we're juggling around, into fundamental types. So things like 'Items' and 'NPCs' didn't have to be declared as structs, which is what I presume the original would have done, and we can do more nice optimisations and warnings and such on our knowlege of them.
[12:27:38] <Colourless> ok.
[12:29:00] <DarkeZzz> Was also going to expand said handling in the 'future' to encompass things like, for example, you derive a class from an 'Item', if you include inside that just the declaration something like `class Tree : Item { ItemName = "tree"; ...OTHER FUNCTIONS...};` it would know to spit out the appropriate 'onUse' function, (which would just bark 'tree'), if there wasn't one defined.
[12:29:27] * DarkeZzz feels surprisngly incoherent tonight.
[12:29:55] * DarkeZzz of course, has Many Grand Plans(tm), he just needs to get around to implementing them. *sigh*
[12:32:54] <Colourless> well, in the end it works like this: file format defined, you make compiler support them :-)
[12:37:24] <DarkeZzz> No, no, no. That's not how it works at *all*. What happens is you define the file format, then you start to code the compiler to support the file format, then you find a minor problem, or a neat feature you could add to compiler/fileformat/whatever, which requires a change in the file format, and it gets added, then compiler (and everything else) gets retargeted to this new file format, then you find something else that 'requires' a change in
[12:37:24] <DarkeZzz> the file format and...
[12:37:50] <Colourless> :-)
[12:37:59] <Colourless> so much for my fantasy
[12:38:02] <DarkeZzz> *That's* how compilers (and almost everything else for that matter!) get written. *grin*
[12:38:55] <DarkeZzz> One can only try to define the file format, then hope it's robust enough to stand up to the rigours of implmentation. *grin* Good luck!
[12:41:05] <Colourless> at least defining some format, is better than making it up as you go
[12:41:05] <Colourless> remember, that is not what pentagram is all about
[12:41:27] <Colourless> Pentagram: Program Design is Law!
[12:41:30] <DarkeZzz> Of course. *grin*
[12:41:34] * DarkeZzz cackles insanely!
[12:41:53] <wjp> Pentagram: implementation can wait until next week/month/year! ;-)
[12:42:32] <wjp> speaking of which, I think I'll go finish planescape: torment now ;-)
[12:42:33] <DarkeZzz> I did have an idea of the format. Was basicly going to use a flex file to store each object, toss the internal/external/globals/data sections in a seperate section by themselves and everything would Just Work(tm). *grin*
[12:42:39] * DarkeZzz cackles.
[12:42:40] <wjp> bbl
[12:42:51] <-- wjp has left IRC ("bbl")
[12:45:42] <Colourless> :-)
[12:46:25] <Colourless> the FLEX Object File Format
[12:46:50] <DarkeZzz> FLEXOFF? *blink* Or just F-OFF?
[12:47:11] <Colourless> i was thinking F-OFF :-)
[12:48:06] <Colourless> but, i don't know, for some reason i don't think that name is such a good idea :-)
[12:48:36] <DarkeZzz> The first sounds like a muscle building product, the second vaguely non-nice. *grin*
[12:50:30] <DarkeZzz> Hey, Fallout2 had the painfully named 'FUCK' (The Fallout Utility for Critter tinKering), and they had to fake it to get it like that... but yeah, I agree, still a bad acronym. *grin*
[12:50:38] <Colourless> could be worse. could be the Flex Usecode Object File Format
[12:50:44] <Colourless> FUcOFF
[12:51:18] * DarkeZzz snerks.
[12:51:30] <Colourless> or even Flex Usecode Kernel Object File Format :-)
[12:51:41] <DarkeZzz> Bad Dragon!
[12:52:31] <Colourless> I think i'll have to use that somewhere in some documentation or code comment :-)
[12:53:08] <DarkeZzz> Well... we are (I suppose) technically making kernel modules with .llo files...
[12:55:32] <Colourless> :-)
[12:56:13] --> Cinni has joined #pentagram
[12:56:17] <Cinni> Hi.
[12:56:47] <Cinni> Though I must sleep within the next few minutes, I have to say I like 'Flex Usecode Kernel Object File Format'.
[12:58:21] <Colourless> thankyou for your support :-)
[12:58:34] * DarkeZzz grumblemumblefluffs.
[12:59:07] * Cinni hands Colourless an underwire bra, to provide further support while she isn't here.
[12:59:25] * Colourless imagines that DarkeZzz wants to give us some Flex Usecode Kernel Object File Formats right now :-)
[12:59:30] <Colourless> uh, thanks for that :-)
[12:59:57] * Cinni vanishes in a fluff of smoke. "Next time, Gadget! Next time!"
[13:00:20] * DarkeZzz wavies. Night, evil one!
[13:00:28] * Cinni blushes.
[13:00:36] <-- Cinni has left IRC ("Sticks and stones may break my bones, but whips and chains excite me.")
[13:00:57] * DarkeZzz tosses random file formats at Colourless.
[13:05:33] <Colourless> i imagine that a Random File Format would be a more unreliable way of storing data
[13:05:44] <Colourless> s/more/most/
[13:08:03] <DarkeZzz> Nah. It's kinda like an .avi, it stores completely random crud, so you never know what's inside it, but you know you've got something relyably stored in there, you just can't relyably extract it. *grin*
[13:09:06] <Colourless> avi... i'm sure it seemed like a good idea at the time, but hell if i can understand why
[13:11:27] <DarkeZzz> I presume it was a way of making a nonstandard-standard format, that MS tends to like.
[13:12:33] <Colourless> well, MS doesn't even like it now, so that must leave you wondering :-)
[13:13:48] <Colourless> of course AVIs are based on RIFF files, which is a 'standard' file type (wavs and rmidi files are riffs too)
[13:14:52] <DarkeZzz> That's 'cause they're on the DRM bandwagon and trying to hype their Own, New, Format(tm). I would guess the original was simply used to confuse things, so you could only rely on WMP to 'correctly' play this myterious .avi file you downloaded, no matter what was in it. Market lockin, etc, etc. Whereas the new one's just riding the DRM hope, trying for marketshare.
[13:15:10] <DarkeZzz> s/hope/hype/
[13:16:56] <Colourless> reality of the situation is, i don't see any alternative
[13:16:56] <Colourless> s
[13:17:12] <Colourless> every media player maker has created their own file formats
[13:17:20] <DarkeZzz> Yup.
[13:17:55] <Colourless> Thumbs up to the industry. Nice work guys :-)
[13:18:28] * DarkeZzz snickers.
[13:19:53] <DarkeZzz> Kind of like cd burning software. Everyone has a different format to store ISO's on disk, all minorly different, with different names, so every burning application needs to support every different ISO format... thus defeating the whole point of the exercise in the first place. *grin*
[13:21:29] * DarkeZzz yawns and probably should follow Cinni off to bed. Sleepybunny.
[13:21:30] <Colourless> yeah. though, i don't entirely know if the companies involved really want to define a standard format for that stuff
[13:21:34] <DarkeZzz> Erm... not that way though.
[13:22:08] <DarkeZzz> Who knows. At least the base ISO format is standardised, I just wish they'd agree a little on their 'extensions' to it.
[13:30:22] --> Cless has joined #Pentagram
[13:30:50] <-- Colourless has left IRC (Nick collision from services.)
[13:30:54] --- Cless is now known as Colourless
[13:30:54] --- ChanServ gives channel operator status to Colourless
[13:50:14] --> wjp has joined #pentagram
[13:50:14] --- ChanServ gives channel operator status to wjp
[13:50:42] <wjp> there, all done :-)
[13:53:07] <Colourless> :-)
[13:57:16] <DarkeZzz> wjp: You can now, officially, blame Colourless for any... weird file format names. It's all *his* fault! *grin*
[14:00:07] * DarkeZzz offically sleeps. Zzzz... Night!
[14:00:24] <Colourless> hey, an independant observer agreed with my selection
[14:01:21] <DarkeZzz> Colourless: Independant? *blink* How about: "And observer just as crazy as either of us agreed with your selection"?
[14:02:22] <Colourless> eh, whatever
[14:03:02] <DarkeZzz> Anyway, naptime. Zzzz...
[15:45:47] --> Fingolfin has joined #pentagram
[15:45:47] --- ChanServ gives channel operator status to Fingolfin
[15:49:46] <Colourless> going
[15:49:52] <Colourless> bbl, maybe
[15:49:57] <-- Colourless has left IRC ("casts invisibility")
[16:21:53] <-- Kirben has left IRC (Read error: 104 (Connection reset by peer))
[16:45:17] <-- wjp has left IRC ("bbl")
[17:26:41] <-- eldron has left IRC (Connection timed out)
[19:09:05] --> eldron has joined #pentagram
[23:03:03] <-- eldron has left IRC (gibson.freenode.net irc.freenode.net)
[23:03:34] --> eldron has joined #pentagram