From rozzin at geekspace.com Sun Jan 5 21:58:57 2003 From: rozzin at geekspace.com (Joshua Judson Rosen) Date: Sun Jan 5 19:59:05 2003 Subject: [Coldstuff] logic-programming? Message-ID: <20030106025856.GD30282@linger.twisted-muse.org> Has anyone had any thoughts about (or, better: done anything with) logic-programming in Cold? -- M: Does it work? N: Yes. M: Did you test it? N: What do you mean? -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://mojo.cold.org/pipermail/cold-coldstuff/attachments/20030105/54cd540d/attachment.bin From bruce at cubik.org Mon Jan 6 00:18:53 2003 From: bruce at cubik.org (Bruce Mitchener) Date: Mon Jan 6 00:20:46 2003 Subject: [Coldstuff] logic-programming? References: <20030106025856.GD30282@linger.twisted-muse.org> Message-ID: <3E192DDD.6060903@cubik.org> Joshua Judson Rosen wrote: > Has anyone had any thoughts about (or, better: done anything with) > logic-programming in Cold? I've a fair bit of thought put into this subject, but not Cold-specific. What sorts of things are you interested in doing? What are you really asking here? Are you interested in LogiMOO type things? Cyc-like things? Some basic Prolog usage? What've you seen that is inspiring you in terms of the existing research in the field? This whole subject may be better suited for MUD-Dev as well. - Bruce From bruce at cubik.org Mon Jan 6 00:21:42 2003 From: bruce at cubik.org (Bruce Mitchener) Date: Mon Jan 6 00:23:30 2003 Subject: [Fwd: Re: [Coldstuff] How did ColdCore 'use' a character?] Message-ID: <3E192E86.6070602@cubik.org> I sent this last week, but the overly restrictive mail server configuration on cold.org prevented it from going through. - Bruce -------------- next part -------------- An embedded message was scrubbed... From: Bruce Mitchener Subject: Re: [Coldstuff] How did ColdCore 'use' a character? Date: Mon, 30 Dec 2002 18:49:36 -0700 Size: 1051 Url: http://mojo.cold.org/pipermail/cold-coldstuff/attachments/20030106/07469133/ColdstuffHowdidColdCoreuseacharacter.eml From bruce at cubik.org Mon Jan 6 00:22:07 2003 From: bruce at cubik.org (Bruce Mitchener) Date: Mon Jan 6 00:23:54 2003 Subject: [Fwd: Re: [Coldstuff] The Cold Dark] Message-ID: <3E192E9F.8070300@cubik.org> I sent this last week, but the overly restrictive mail server configuration on cold.org prevented it from going through. - Bruce -------------- next part -------------- An embedded message was scrubbed... From: Bruce Mitchener Subject: Re: [Coldstuff] The Cold Dark Date: Mon, 30 Dec 2002 18:51:25 -0700 Size: 1030 Url: http://mojo.cold.org/pipermail/cold-coldstuff/attachments/20030106/48cc40aa/ColdstuffTheColdDark.eml From brandon at roguetrader.com Mon Jan 6 08:28:45 2003 From: brandon at roguetrader.com (Brandon Gillespie) Date: Mon Jan 6 08:29:13 2003 Subject: [Fwd: Re: [Coldstuff] The Cold Dark] In-Reply-To: <3E192E9F.8070300@cubik.org> References: <3E192E9F.8070300@cubik.org> Message-ID: <3E19A0AD.4040707@roguetrader.com> Bruce Mitchener wrote: > I sent this last week, but the overly restrictive mail server > configuration on cold.org prevented it from going through. Overly restrictive is in the eye of the beholder. When I receive daily bounce messages for the mailing list trying to block spam, and weekly my personal mail box receives 300 some odd pieces of spam mail. The new blacklists restrict this from happening, quite nicely infact. If you are having problems mailing, contact me through alternate means (on the cold dark works, or email me at iomega.com with the username gillespie), and I can insert your email address into an exceptions list. -Brandon From brandon at roguetrader.com Mon Jan 6 08:35:40 2003 From: brandon at roguetrader.com (Brandon Gillespie) Date: Mon Jan 6 08:36:04 2003 Subject: [Fwd: Re: [Coldstuff] The Cold Dark] In-Reply-To: <3E192E9F.8070300@cubik.org> References: <3E192E9F.8070300@cubik.org> Message-ID: <3E19A24C.3060203@roguetrader.com> Bruce Mitchener wrote: > Brandon Gillespie wrote: > >> B. Jack wrote: >> >>> I've just come to notice that the Cold Dark Server has been down for >>> some time. Does anyone know what happened to it? >> >> >> It has become highly unstable as of late, and I am going to fire it up >> under a debugger. > > > I don't know of crash bugs in the current releases .. you haven't done > any independent hackong on the version of Cold that tCD is running, have > you? Or are you running an older release? (Which version are you running?) I upgraded from solaris8/x86 to Solaris9/sparc and recompiled with gcc3.2. version is one of the latest, i'll have to check later. -Brandon From acormany at yahoo.com Tue Jan 7 15:10:57 2003 From: acormany at yahoo.com (Adam Cormany) Date: Tue Jan 7 16:12:02 2003 Subject: [Coldstuff] .print problem, logging question Message-ID: <20030107231057.12731.qmail@web12805.mail.yahoo.com> I'm trying add a few things during username creation at login. I have an object with a prose and I would like to print it out to the user during creation. Here's what I have: <$ctext_frob, [["This IS", <$format, ["p", [], [], 'do_p]>, "just", <$format, ["p", [], [], 'do_p]>, " a", <$format, ["p", [], [], 'do_p]>, "test", <$format, ["p", [], [], 'do_p]>, "class ....", <$format, ["p", [], [], 'do_p]>], #[['this, $testclass_class]]]> I'm not able to .print this at all and I don't see any errors on the screen as well. Basically I have 2 questions. 1) Should I be using something other then .print or should I not be using ctext_frobs during $login_interface. 2) I love getting help on the mailling list, but I would like to also track down what I'm doing wrong myself instead of bugging everyone all the time. Is there somewhere that I can debug/track where my error is? I know of /logs/db.log, but this doesn't seem to catch all errors(I don't see my login creation error in it). Thanks in advance for everyones help __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com From brandon at roguetrader.com Tue Jan 7 16:55:59 2003 From: brandon at roguetrader.com (Brandon Gillespie) Date: Tue Jan 7 16:56:24 2003 Subject: [Coldstuff] .print problem, logging question In-Reply-To: <20030107231057.12731.qmail@web12805.mail.yahoo.com> References: <20030107231057.12731.qmail@web12805.mail.yahoo.com> Message-ID: <3E1B690F.3020109@roguetrader.com> Adam Cormany wrote: > I'm trying add a few things during username creation > at login. I have an object with a prose and I would > like to print it out to the user during creation. > Here's what I have: > > <$ctext_frob, [["This IS", <$format, ["p", [], [], > 'do_p]>, "just", <$format, ["p", [], [], 'do_p]>, " > a", <$format, ["p", [], [], 'do_p]>, "test", <$format, > ["p", [], [], 'do_p]>, "class ....", <$format, > ["p", [], [], 'do_p]>], #[['this, $testclass_class]]]> > > I'm not able to .print this at all and I don't see any > errors on the screen as well. Basically I have 2 > questions. > > 1) Should I be using something other then .print or > should I not be using ctext_frobs during > $login_interface. As far as I recall, I do not believe that $login_interface supports ctext, it only supports lists of strings. You could probably add ctext to it, just look at what $user._tell does, and port the relevant parts to $login_interface.print. > 2) I love getting help on the mailling list, but I > would like to also track down what I'm doing wrong > myself instead of bugging everyone all the time. Is > there somewhere that I can debug/track where my error > is? I know of /logs/db.log, but this doesn't > seem to catch all errors(I don't see my login creation > error in it). $login_interface is a beasty to work on, because not all of the user's "environment" has been setup yet, which handles error management. -Brandon From rozzin at geekspace.com Tue Jan 7 23:05:20 2003 From: rozzin at geekspace.com (Joshua Judson Rosen) Date: Tue Jan 7 21:08:35 2003 Subject: [Coldstuff] logic-programming? In-Reply-To: <3E192DDD.6060903@cubik.org> References: <20030106025856.GD30282@linger.twisted-muse.org> <3E192DDD.6060903@cubik.org> Message-ID: <20030108040520.GG30282@linger.twisted-muse.org> On Mon, Jan 06, 2003 at 12:18:53AM -0700, Bruce Mitchener wrote: > This whole subject may be better suited for MUD-Dev as well. If it gets into general logic-based MUD-programming, I'll take it there. For now, I'm just interested in hearing if anyone has done or is doing anything with Cold in particular. > Joshua Judson Rosen wrote: > >Has anyone had any thoughts about (or, better: done anything with) > >logic-programming in Cold? > > I've a fair bit of thought put into this subject, but not Cold-specific. > What sorts of things are you interested in doing? What are you really > asking here? Well, um..., actually..., I was sort-of hoping to figure that out as people told me what the phrase, "logic-programming in Cold", triggered in their minds.... > Are you interested in LogiMOO type things? I don't have any experience with LogiMOO, so I don't know. I'm reading Tarau's et al's description, linked from Agora, now.... Some of the features described therein (e.g.: the `extensible language coveraged') do sound like things that I'd like to use in my `MUD' that I'm developing, though I don't plan on developing those in ColdC, if I can help it--the plan is initially to use Python (it's the graphics-libraries) and then maybe plug in some Scheme modules. I'm looking at Cold more like a `legacy' system to support--I'd like to bridge my system to TCD so that I can walk into it and interact with things there without leaving my little environment. Well, also for the hack-value.... > Cyc-like things? I haven't used Cyc for anything--I've been reading through the documentation, though.... So far, CycL (whithout Cyc's knowledgebase) reminds me of Schelog..., which I remember liking. > Some basic Prolog usage? Yes, I think so, so far. I'm quite new to logic-programming.... I learned about functional programming and thought that it was really nice, but a little funny, because the mathematician in me was saying `but functions are just a special-case of relations! where's relational programming!?' I read some sort-of vague/cursory statements about logic-programming in prolog, and thought `hey--that sounds sort-of like the relational programming environment that I want', and sort-of tripped over Schelog and then played with it for a while, because I was into and comfortable with Scheme by that point. So, now I'm -starting- into prolog.... I've also been thinking on something that I've been calling "conversational programming", but I can't find the source of that name, just now--I had thought that I got it from McCarthy's `Elephant 2000' paper, but apparently I didn't, and I can't quite remember what influces I *did* take from that paper.... > What've you seen that is inspiring you in terms of the existing research > in the field? Not a lot.... I of course don't mean that I've been having an adverse reaction to things, just that I haven't seen much. Period. I'm just sort-of dinking around, at the moment. I have a lot of ideas that I'm still trying sort out and figure out who's already had them and how.... I think that logic-programming seems attractive mainly as a more generalised way of saying things, and maybe as a best fit to more of the things that I think that I want to think than other systems. ... But, I was asking about doing logic-programming in Cold..., so I'll get back to that: The scenario with which I'm concerned, at the moment, is something like using logic-forms as an intermediary between systems (e.g.: between my Python-based system and TCD). I'd like to generate an event or something in my Python app, render it into some logic-forms, send those forms to Cold, and have Cold parse them into whatever makes sense. In converting things into Cold structures, I'd like to preserve any vagueness and multiplicity of relatives and whatnot. I'd like to be able to convert back from Cold and have it be the same as what was converted to Cold in the first place.... I feel like I'm rambling too much and not saying anything--sorry.... Maybe I want to write a prolog-interpeter in Cold, and be able to go back-and-forth between ColdC and prolog like Schelog goes back-and-forth between prolog and Scheme. If one was to write something like that, what would it look like? -- "If one is really a superior person, the fact is likely to leak out without too much assistance." --John Andrew Holmes -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://mojo.cold.org/pipermail/cold-coldstuff/attachments/20030107/a5e60913/attachment.bin From acormany at yahoo.com Wed Jan 8 05:43:30 2003 From: acormany at yahoo.com (Adam Cormany) Date: Wed Jan 8 06:46:22 2003 Subject: [Coldstuff] .print problem, logging question In-Reply-To: <3E1B690F.3020109@roguetrader.com> Message-ID: <20030108134330.27532.qmail@web12806.mail.yahoo.com> I think I have it resolved now. I did what you said and looked at $user._tell and moved relevant code over. For anyone that cares to do the same, I did: 1) @copy $login_interface.print $login_interface.print_20030108 2) Changed my $login_interface.print to look like: arg what, @args; var line; switch (type(what)) { case 'frob: what = $parse_lib.filter_ctext(what, #[['formatter, formatter], ["viewer", this()]]); case 'list: for line in (what) .print(line, @args); return; case 'buffer: throw(~nobuf, "You are not allowed to send buffers."); } .connection().write(what); 3) This bombs out and I'm guessing the previous .print bombs out also because there is no "formatter" variable on $login_interface. Going by what my $user,formatter is set at, I: @av $login_interface,formatter $plain_format That should do it. Works like a charm on my ctext_frobs now. Hopefully this helps someone else also... As far as debugging, tracing, etc on cold. I just went back to setting up a bunch of $user_soth.tell()'s to find out where it was choking. If anyone finds a better way of logging/debugging/tracing bugs, please feel free to share it. I'd love to see a better approach on trapping the system errors. Thanks for your help, Adam --- Brandon Gillespie wrote: > Adam Cormany wrote: > > I'm trying add a few things during username > creation > > at login. I have an object with a prose and I > would > > like to print it out to the user during creation. > > Here's what I have: > > > > <$ctext_frob, [["This IS", <$format, ["p", [], [], > > 'do_p]>, "just", <$format, ["p", [], [], 'do_p]>, > " > > a", <$format, ["p", [], [], 'do_p]>, "test", > <$format, > > ["p", [], [], 'do_p]>, "class ....", > <$format, > > ["p", [], [], 'do_p]>], #[['this, > $testclass_class]]]> > > > > I'm not able to .print this at all and I don't see > any > > errors on the screen as well. Basically I have 2 > > questions. > > > > 1) Should I be using something other then .print > or > > should I not be using ctext_frobs during > > $login_interface. > > As far as I recall, I do not believe that > $login_interface supports > ctext, it only supports lists of strings. You could > probably add ctext > to it, just look at what $user._tell does, and port > the relevant parts > to $login_interface.print. > > > 2) I love getting help on the mailling list, but I > > would like to also track down what I'm doing wrong > > myself instead of bugging everyone all the time. > Is > > there somewhere that I can debug/track where my > error > > is? I know of /logs/db.log, but this > doesn't > > seem to catch all errors(I don't see my login > creation > > error in it). > > $login_interface is a beasty to work on, because not > all of the user's > "environment" has been setup yet, which handles > error management. > > -Brandon > > _______________________________________________ > Cold-Coldstuff mailing list > Cold-Coldstuff@cold.org > http://web.cold.org/mailman/listinfo/cold-coldstuff __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com From roys at mindspring.com Sun Jan 12 08:43:45 2003 From: roys at mindspring.com (Roy Sutton) Date: Sun Jan 19 11:10:21 2003 Subject: [Coldstuff] Inherited settings Message-ID: <5.1.0.14.2.20030112082936.01c02db0@mail.mindspring.com> I'm curious how other have tackled the issue of inherited settings. I'll explain what I'm referring to in a bit more detail: As an example, setting the 'size' variable on an object's does not change the size on any of its children. It seems to me that in order to get the most out of the object oriented nature of ColdC that having both code and (only) certain settings be inheritable makes a lot of sense. As a better example, assume we have a $wearable object, from this object we derive clothing and weapons. All weapons will share certain default settings for wearable objects and it doesn't make sense to require the builders to set all those each time, particularly message related to readying/unreadying the weapon. To duplicate the message on each child would be expensive, however not allowing the builder to customize them also doesn't make sense. There are several ways to handle this: 1) Write init methods that initialize all the pertinent variables on each child object as created. Downside: Memory overhead, changes to the parent do not propagate. 2) Write a routine that searches backwards down the object hierarchy looking for an ancestor which actually does define the variable. Downside: Slow 3) Write accessor functions for inherited variables and have a settings system that reprograms the body of the accessor function on the parent or child as necessary. Downside: ?? (Untested at this point) 4) Hard-code the defaults and make the builders customize everything. Downside: No consistency, memory overhead(?) In analyzing the problem it seems that we can assume that reading will be more common than writing so extra overhead on setting in the interests of speed of fetching is (usually) a good trade-off. Finally, am I making too much out of this issue or is it something that others have pondered over? Roy P.S. Does anyone have any tools for recovering from a corrupt binary database? Any insights into what causes them? From gary at undiscoveredworlds.com Sun Jan 19 12:37:36 2003 From: gary at undiscoveredworlds.com (Gary Whitten) Date: Sun Jan 19 11:11:10 2003 Subject: [Coldstuff] Time Issues w/Win 32 In-Reply-To: <20030108134330.27532.qmail@web12806.mail.yahoo.com> Message-ID: I'm having some issues where I'm getting messed up time-date stuff when I add a method using @program or change it using @edit. It seems to put the year and day of month in but not the month itself. Ex: // $#Edited: 06 03 10:27 $user_gary In a slightly related question, why is this line: // Created 26--1995 as a part of ColdCore, see: @help Credit appended to the listing of the method? This is a completely new method written by me, and if anything, it should indicate that, not what it does. Thanks in advance. Gary From gary at undiscoveredworlds.com Sun Jan 19 14:23:26 2003 From: gary at undiscoveredworlds.com (Gary Whitten) Date: Sun Jan 19 12:22:54 2003 Subject: [Coldstuff] Time Issues w/Win 32 In-Reply-To: Message-ID: Well, thanks to Aldon and Dio on tCD, I am pretty much set on this. I have a pretty good idea of what works and what doesn't work in Win32. Here's the list I have, can anyone offer any input to this to make it more accurate or complete so I can document it properly? TIA. %a = day of week %b = 3-letter abbreviation of month %d = day of month %Y = 4-digit year %T = hour:min (24 hour clock) time format %H = hour %M = minute %S = seconds %Z = Time zone string %m = numeric month %h = used in original $programmer.program_cmd but left it blank under a Win32 system. I'm having some issues where I'm getting messed up time-date stuff when I add a method using @program or change it using @edit. It seems to put the year and day of month in but not the month itself. Ex: // $#Edited: 06 03 10:27 $user_gary In a slightly related question, why is this line: // Created 26--1995 as a part of ColdCore, see: @help Credit appended to the listing of the method? This is a completely new method written by me, and if anything, it should indicate that, not what it does. From jlsysinc at alltel.net Sun Jan 19 15:06:09 2003 From: jlsysinc at alltel.net (Jon A. Lambert) Date: Sun Jan 19 13:06:40 2003 Subject: [Coldstuff] Time Issues w/Win 32 References: Message-ID: <001801c2bff6$3540bb90$0200000a@agamemnon> Gary Whitten wrote: > Well, thanks to Aldon and Dio on tCD, I am pretty much set on this. I have > a pretty good idea of what works and what doesn't work in Win32. Here's the > list I have, can anyone offer any input to this to make it more accurate or > complete so I can document it properly? TIA. > > %a = day of week > %b = 3-letter abbreviation of month > %d = day of month > %Y = 4-digit year > %T = hour:min (24 hour clock) time format > %H = hour > %M = minute > %S = seconds > %Z = Time zone string > %m = numeric month > > %h = used in original $programmer.program_cmd but left it blank under a > Win32 system. > %h and %T are posix format specifiers for strftime(). The rest are all ansi format specifiers for strftime(). The ansi format specifiers will work using both VC++ and BC++ runtime libraries. All of these work under the cygwin runtime library which allows both ansi and posix specifiers. The posix specifiers willl work under BC++ if locales are used. I'm not sure about VC++. -- J. Lambert From gary at undiscoveredworlds.com Sun Jan 19 15:14:42 2003 From: gary at undiscoveredworlds.com (Gary Whitten) Date: Sun Jan 19 13:14:11 2003 Subject: [Coldstuff] Time Issues w/Win 32 In-Reply-To: <001801c2bff6$3540bb90$0200000a@agamemnon> Message-ID: So ansi format specifiers may be more portable? I'd like to put things in that are most likely to work no matter what platform they run on. Also are there other codes that you're aware of that I didn't list here? Speaking of that, since I'm currently developing on a Win32 box does that mean that it's going to have to stay that way or can I pick everything up and drop it into a Unix style installation? If that's an over-simplification, sorry, just trying to know where I stand with this. Gary Whitten wrote: > Well, thanks to Aldon and Dio on tCD, I am pretty much set on this. I have > a pretty good idea of what works and what doesn't work in Win32. Here's the > list I have, can anyone offer any input to this to make it more accurate or > complete so I can document it properly? TIA. > > %a = day of week > %b = 3-letter abbreviation of month > %d = day of month > %Y = 4-digit year > %T = hour:min (24 hour clock) time format > %H = hour > %M = minute > %S = seconds > %Z = Time zone string > %m = numeric month > > %h = used in original $programmer.program_cmd but left it blank under a > Win32 system. > %h and %T are posix format specifiers for strftime(). The rest are all ansi format specifiers for strftime(). The ansi format specifiers will work using both VC++ and BC++ runtime libraries. All of these work under the cygwin runtime library which allows both ansi and posix specifiers. The posix specifiers willl work under BC++ if locales are used. I'm not sure about VC++. -- J. Lambert From ccrawford at seventh.net Sun Jan 19 13:22:12 2003 From: ccrawford at seventh.net (Corey Crawford) Date: Sun Jan 19 13:22:08 2003 Subject: [Coldstuff] Time Issues w/Win 32 References: Message-ID: <007101c2bff8$7417b2e0$2900000a@seven> You can see a list at: http://unixhelp.ed.ac.uk/CGI/man-cgi?strftime+3 Any current ANSI man page for strftime should have a list. --- Corey Crawford ccrawford@seventh.net ----- Original Message ----- From: "Gary Whitten" To: Sent: Sunday, January 19, 2003 1:14 PM Subject: RE: [Coldstuff] Time Issues w/Win 32 > So ansi format specifiers may be more portable? I'd like to put things in > that are most likely to work no matter what platform they run on. Also are > there other codes that you're aware of that I didn't list here? > > Speaking of that, since I'm currently developing on a Win32 box does that > mean that it's going to have to stay that way or can I pick everything up > and drop it into a Unix style installation? If that's an > over-simplification, sorry, just trying to know where I stand with this. > > > Gary Whitten wrote: > > Well, thanks to Aldon and Dio on tCD, I am pretty much set on this. I > have > > a pretty good idea of what works and what doesn't work in Win32. Here's > the > > list I have, can anyone offer any input to this to make it more accurate > or > > complete so I can document it properly? TIA. > > > > %a = day of week > > %b = 3-letter abbreviation of month > > %d = day of month > > %Y = 4-digit year > > %T = hour:min (24 hour clock) time format > > %H = hour > > %M = minute > > %S = seconds > > %Z = Time zone string > > %m = numeric month > > > > %h = used in original $programmer.program_cmd but left it blank under a > > Win32 system. > > > > %h and %T are posix format specifiers for strftime(). > The rest are all ansi format specifiers for strftime(). > > The ansi format specifiers will work using both VC++ and BC++ runtime > libraries. > All of these work under the cygwin runtime library which allows both ansi > and posix specifiers. > The posix specifiers willl work under BC++ if locales are used. I'm not > sure about VC++. > > -- > J. Lambert > > _______________________________________________ > Cold-Coldstuff mailing list > Cold-Coldstuff@cold.org > http://web.cold.org/mailman/listinfo/cold-coldstuff > From jlsysinc at alltel.net Sun Jan 19 15:51:15 2003 From: jlsysinc at alltel.net (Jon A. Lambert) Date: Sun Jan 19 13:51:46 2003 Subject: [Coldstuff] Time Issues w/Win 32 References: Message-ID: <002a01c2bffc$822323c0$0200000a@agamemnon> Gary Whitten wrote: > So ansi format specifiers may be more portable? Ansi C requires strftime() to be supported and the ansi format specifiers. So yes. > I'd like to put things in > that are most likely to work no matter what platform they run on. Also are > there other codes that you're aware of that I didn't list here? I believe these are all ansi compliant (the best source would be the C ISO standards) %% Character % %a Abbreviated weekday name %A Full weekday name %b Abbreviated month name %B Full month name %c Date and time %d Two-digit day of month (01 - 31) %H Hour of the day, 24 hour day %I Two-digit hour, 12 hour day (01 - 12) %j Three-digit day of year (001 - 366) %m Two-digit month as a decimal number (1 - 12) %M 2-digit minute (00 - 59) %p AM or PM %S Two-digit second (00 - 59) %U Two-digit week number where Sunday is the first day of the week (00 - 53) %w Weekday where 0 is Sunday (0 - 6) %W Two-digit week number where Monday is the first day of week the week (00 - 53) %x Date %X Time %y Two-digit year without century (00 to 99) %Y Year with century %Z, %z Time zone name, or no characters if no time zone > Speaking of that, since I'm currently developing on a Win32 box does that > mean that it's going to have to stay that way or can I pick everything up > and drop it into a Unix style installation? If that's an > over-simplification, sorry, just trying to know where I stand with this. I've had no problems producing textdumps from either Win32 or Linux installations and recompiling them into either. Some versions had problems handling CRLF/LF issues but those I believe were ironed out. You may not move the binary database file between different OS installations only textdumps. J. Lambert From gary at undiscoveredworlds.com Sun Jan 19 19:06:14 2003 From: gary at undiscoveredworlds.com (Gary Whitten) Date: Sun Jan 19 17:05:44 2003 Subject: [Coldstuff] Time Issues w/Win 32 In-Reply-To: <002a01c2bffc$822323c0$0200000a@agamemnon> Message-ID: Ok, good to know, which brings up a question I've been trying to get answered for awhile. What is the exact syntax for a text dump that has everything in it to move somewhere else? Gary -----Original Message----- From: cold-coldstuff-bounces@cold.org [mailto:cold-coldstuff-bounces@cold.org]On Behalf Of Jon A. Lambert Sent: Sunday, January 19, 2003 3:51 PM To: coldstuff@cold.org Subject: Re: [Coldstuff] Time Issues w/Win 32 > Speaking of that, since I'm currently developing on a Win32 box does that > mean that it's going to have to stay that way or can I pick everything up > and drop it into a Unix style installation? If that's an > over-simplification, sorry, just trying to know where I stand with this. I've had no problems producing textdumps from either Win32 or Linux installations and recompiling them into either. Some versions had problems handling CRLF/LF issues but those I believe were ironed out. You may not move the binary database file between different OS installations only textdumps. J. Lambert From roys at mindspring.com Sun Jan 19 21:10:08 2003 From: roys at mindspring.com (Roy Sutton) Date: Sun Jan 19 19:12:15 2003 Subject: [Coldstuff] Time Issues w/Win 32 In-Reply-To: References: <002a01c2bffc$822323c0$0200000a@agamemnon> Message-ID: <5.1.0.14.2.20030119210429.030e4768@mail.mindspring.com> I always use bin/coldcc -d -# -b binary.bak Note: You need the -# or you don't get the object names in the textdump. I wrote up a shell script to do that, compress the backup and stick it into a directory every hour (for now). Roy At 07:06 PM 1/19/2003, Gary Whitten wrote: >Ok, good to know, which brings up a question I've been trying to get >answered for awhile. > >What is the exact syntax for a text dump that has everything in it to move >somewhere else? > >Gary From brandon at roguetrader.com Sun Jan 19 19:22:06 2003 From: brandon at roguetrader.com (Brandon Gillespie) Date: Sun Jan 19 19:21:50 2003 Subject: [Coldstuff] Time Issues w/Win 32 In-Reply-To: <5.1.0.14.2.20030119210429.030e4768@mail.mindspring.com> References: <002a01c2bffc$822323c0$0200000a@agamemnon> <5.1.0.14.2.20030119210429.030e4768@mail.mindspring.com> Message-ID: <3E2B5D4E.1030409@roguetrader.com> Roy Sutton wrote: > I always use bin/coldcc -d -# -b binary.bak > > Note: You need the -# or you don't get the object names in the textdump. > > I wrote up a shell script to do that, compress the backup and stick it > into a directory every hour (for now). There is a script which is fairly comprehensive and reliable in doing this, in the coldcore distribution and on the ftp site: ftp://ftp.cold.org/pub/cold/contrib/scripts/backup2.gz It is written in perl. -Brandon From gary at undiscoveredworlds.com Sun Jan 19 22:09:02 2003 From: gary at undiscoveredworlds.com (Gary Whitten) Date: Sun Jan 19 20:08:32 2003 Subject: [Coldstuff] Time Issues w/Win 32 In-Reply-To: <3E2B5D4E.1030409@roguetrader.com> Message-ID: Ah, ok, so it has nothing to do with the @dump command inside the program itself. No wonder I never got it to work :) -----Original Message----- From: cold-coldstuff-bounces@cold.org [mailto:cold-coldstuff-bounces@cold.org]On Behalf Of Brandon Gillespie Sent: Sunday, January 19, 2003 9:22 PM To: coldstuff@cold.org Subject: Re: [Coldstuff] Time Issues w/Win 32 Roy Sutton wrote: > I always use bin/coldcc -d -# -b binary.bak > > Note: You need the -# or you don't get the object names in the textdump. > > I wrote up a shell script to do that, compress the backup and stick it > into a directory every hour (for now). There is a script which is fairly comprehensive and reliable in doing this, in the coldcore distribution and on the ftp site: ftp://ftp.cold.org/pub/cold/contrib/scripts/backup2.gz It is written in perl. -Brandon _______________________________________________ Cold-Coldstuff mailing list Cold-Coldstuff@cold.org http://web.cold.org/mailman/listinfo/cold-coldstuff From gary at undiscoveredworlds.com Mon Jan 20 00:17:34 2003 From: gary at undiscoveredworlds.com (Gary Whitten) Date: Sun Jan 19 22:17:03 2003 Subject: [Coldstuff] Time Issues w/Win 32 In-Reply-To: <3E2B5D4E.1030409@roguetrader.com> Message-ID: Well, have popped this open, nicely commented, thank you Brandon. Looks pretty awesome. Too bad I'm running on a Win32 system. :) -----Original Message----- From: cold-coldstuff-bounces@cold.org [mailto:cold-coldstuff-bounces@cold.org]On Behalf Of Brandon Gillespie Sent: Sunday, January 19, 2003 9:22 PM To: coldstuff@cold.org Subject: Re: [Coldstuff] Time Issues w/Win 32 There is a script which is fairly comprehensive and reliable in doing this, in the coldcore distribution and on the ftp site: ftp://ftp.cold.org/pub/cold/contrib/scripts/backup2.gz It is written in perl. -Brandon From roys at mindspring.com Mon Jan 20 07:37:22 2003 From: roys at mindspring.com (Roy Sutton) Date: Mon Jan 20 05:39:32 2003 Subject: [Coldstuff] Time Issues w/Win 32 In-Reply-To: <3E2B5D4E.1030409@roguetrader.com> References: <5.1.0.14.2.20030119210429.030e4768@mail.mindspring.com> <002a01c2bffc$822323c0$0200000a@agamemnon> <5.1.0.14.2.20030119210429.030e4768@mail.mindspring.com> Message-ID: <5.1.0.14.2.20030120073423.03201bb0@mail.mindspring.com> I notice the script does -not- use the -# option for coldcc. Why would anyone -not- want to use -#? Unless I'm misunderstanding this if you restore from one of these backups you lose all your names ($root, $thing, etc.). Is there some reason other than code which was written to use object numbers that would make you want to use this option? Roy At 09:22 PM 1/19/2003, Brandon Gillespie wrote: >Roy Sutton wrote: >>I always use bin/coldcc -d -# -b binary.bak >>Note: You need the -# or you don't get the object names in the textdump. > >There is a script which is fairly comprehensive and reliable in doing >this, in the coldcore distribution and on the ftp site: > >ftp://ftp.cold.org/pub/cold/contrib/scripts/backup2.gz From brandon at roguetrader.com Mon Jan 20 07:49:43 2003 From: brandon at roguetrader.com (Brandon Gillespie) Date: Mon Jan 20 07:48:33 2003 Subject: [Coldstuff] Time Issues w/Win 32 In-Reply-To: References: Message-ID: <3E2C0C87.2010008@roguetrader.com> Gary Whitten wrote: > Well, have popped this open, nicely commented, thank you Brandon. Looks > pretty awesome. Too bad I'm running on a Win32 system. :) perl is available for win32, you would probably just have to adjust a few paths and install bzip2. -Brandon From brandon at roguetrader.com Mon Jan 20 07:51:01 2003 From: brandon at roguetrader.com (Brandon Gillespie) Date: Mon Jan 20 07:49:51 2003 Subject: [Coldstuff] Time Issues w/Win 32 In-Reply-To: <5.1.0.14.2.20030120073423.03201bb0@mail.mindspring.com> References: <5.1.0.14.2.20030119210429.030e4768@mail.mindspring.com> <002a01c2bffc$822323c0$0200000a@agamemnon> <5.1.0.14.2.20030119210429.030e4768@mail.mindspring.com> <5.1.0.14.2.20030120073423.03201bb0@mail.mindspring.com> Message-ID: <3E2C0CD5.5080207@roguetrader.com> Roy Sutton wrote: > I notice the script does -not- use the -# option for coldcc. Why would > anyone -not- want to use -#? Unless I'm misunderstanding this if you > restore from one of these backups you lose all your names ($root, > $thing, etc.). Is there some reason other than code which was written > to use object numbers that would make you want to use this option? Actually, the only time you WANT to use -# is if you are renumbering your objects, which can be dangerous anyway. The names are still retained with or without -#. If you do not include -# then the database dbref numbers stay the same. If you include -# then it rips out all of the dbref numbers, and the next compile picks new numbers. The danger here is if something is referencing a number, and not an objectname. -Brandon From gary at undiscoveredworlds.com Mon Jan 20 09:52:03 2003 From: gary at undiscoveredworlds.com (Gary Whitten) Date: Mon Jan 20 07:51:28 2003 Subject: [Coldstuff] Time Issues w/Win 32 In-Reply-To: <3E2C0C87.2010008@roguetrader.com> Message-ID: Hmmm, ok. Probably comment out the permissions stuff as well, probably. If you think of anything else that might need to be adjusted, let me know. -----Original Message----- From: cold-coldstuff-bounces@cold.org [mailto:cold-coldstuff-bounces@cold.org]On Behalf Of Brandon Gillespie Sent: Monday, January 20, 2003 9:50 AM To: coldstuff@cold.org Subject: Re: [Coldstuff] Time Issues w/Win 32 Gary Whitten wrote: > Well, have popped this open, nicely commented, thank you Brandon. Looks > pretty awesome. Too bad I'm running on a Win32 system. :) perl is available for win32, you would probably just have to adjust a few paths and install bzip2. -Brandon _______________________________________________ Cold-Coldstuff mailing list Cold-Coldstuff@cold.org http://web.cold.org/mailman/listinfo/cold-coldstuff From gary at undiscoveredworlds.com Mon Jan 20 20:49:16 2003 From: gary at undiscoveredworlds.com (Gary Whitten) Date: Mon Jan 20 18:48:40 2003 Subject: [Coldstuff] $root.credit method in ColdCore Message-ID: All I had asked a question related to this either on the Cold Dark or here or both yesterday regarding time date stamps. I have the issue of the missing month fixed, however there is another issue. @program $root.credit() +access=pub var line; if ('core in (flags || [])) { line = "Created "; if (.created_on() > 0) line += $time.format("%d-%b-%Y", .created_on()) + " "; line = [line + "as a part of ColdCore, see: @help Credit"]; } else { line = []; } if (credit) return credit + line; return line; . It seems that no matter what is written, this line: // Created 26-Mar-1995 as a part of ColdCore, see: @help Credit gets added on when I add a method using @program (accessing $programmer.program_cmd)) Now, there is a line that was added that said: // $#Edited: Mon, 20 Jan 2003 20:00 $user_gary which was the right time and user.. I'd like to have that information on the created line but I'm unsure as why that Created line always pops up and until it does, I hesitate to edit that stuff. I do not want to void the usefuness of knowing what methods are from the Core, but do want to know who did what when accurately. If anyone can give me some insight on this, that would be great. Gary From ccrawford at seventh.net Mon Jan 20 18:56:52 2003 From: ccrawford at seventh.net (Corey Crawford) Date: Mon Jan 20 18:56:50 2003 Subject: [Coldstuff] $root.credit method in ColdCore References: Message-ID: <004301c2c0f0$5ebe9eb0$2900000a@seven> Gary, It only puts the "Created on blah blah" line if there is a 'core flag in the object's flags. If you are editing root or some other "base" core object then you will get this. If you create your own objects it will not include this unless you set a core flag on it. :) --- Corey Crawford ccrawford@seventh.net ----- Original Message ----- From: "Gary Whitten" To: "Coldstuff" Sent: Monday, January 20, 2003 6:49 PM Subject: [Coldstuff] $root.credit method in ColdCore > All > > I had asked a question related to this either on the Cold Dark or here or > both yesterday regarding time date stamps. I have the issue of the missing > month fixed, however there is another issue. > > @program $root.credit() +access=pub > var line; > > if ('core in (flags || [])) { > line = "Created "; > if (.created_on() > 0) > line += $time.format("%d-%b-%Y", .created_on()) + " "; > line = [line + "as a part of ColdCore, see: @help Credit"]; > } else { > line = []; > } > if (credit) > return credit + line; > return line; > . > > It seems that no matter what is written, this line: > > // Created 26-Mar-1995 as a part of ColdCore, see: @help Credit > > gets added on when I add a method using @program (accessing > $programmer.program_cmd)) > > Now, there is a line that was added that said: > > > // $#Edited: Mon, 20 Jan 2003 20:00 $user_gary > > which was the right time and user.. I'd like to have that information on > the created line but I'm unsure as why that Created line always pops up and > until it does, I hesitate to edit that stuff. I do not want to void the > usefuness of knowing what methods are from the Core, but do want to know who > did what when accurately. > > If anyone can give me some insight on this, that would be great. > > Gary > > > _______________________________________________ > Cold-Coldstuff mailing list > Cold-Coldstuff@cold.org > http://web.cold.org/mailman/listinfo/cold-coldstuff > From gary at undiscoveredworlds.com Mon Jan 20 21:46:53 2003 From: gary at undiscoveredworlds.com (Gary Whitten) Date: Mon Jan 20 19:46:21 2003 Subject: [Coldstuff] $root.credit method in ColdCore In-Reply-To: <004301c2c0f0$5ebe9eb0$2900000a@seven> Message-ID: Ok, I guess I didn't realize that $user was a core object although it makes sense, I suppose. The main issue here is that I'd rather not have something I've written in 2003 have a date listed of 1995 on it. I guess I'm going to put this on my to-do list of things to alter later when I have a better grasp of things. It isn't going to kill me now but if I ever get to the point when I have more people working on this, it'd sure be nice to have an accurate who/when on who did a method so I know who to look for if there's an issue. Gary --- Gary, It only puts the "Created on blah blah" line if there is a 'core flag in the object's flags. If you are editing root or some other "base" core object then you will get this. If you create your own objects it will not include this unless you set a core flag on it. :) --- Corey Crawford ccrawford@seventh.net From brandon at roguetrader.com Mon Jan 20 20:00:08 2003 From: brandon at roguetrader.com (Brandon Gillespie) Date: Mon Jan 20 19:58:03 2003 Subject: [Coldstuff] $root.credit method in ColdCore In-Reply-To: References: Message-ID: <3E2CB7B8.1090903@roguetrader.com> Gary Whitten wrote: > Ok, I guess I didn't realize that $user was a core object although it makes > sense, I suppose. The main issue here is that I'd rather not have something > I've written in 2003 have a date listed of 1995 on it. I guess I'm going to > put this on my to-do list of things to alter later when I have a better > grasp of things. It isn't going to kill me now but if I ever get to the > point when I have more people working on this, it'd sure be nice to have an > accurate who/when on who did a method so I know who to look for if there's > an issue. There is individual method credit, which is placed into the method when you @edit or @program it. The .credit is shown outside of the method in a @list (notice the placement of the '.' ending the method). The credit is intended as an object-wide credit, where the edit comments are granular to individual methods. -Brandon From gary at undiscoveredworlds.com Mon Jan 20 22:13:29 2003 From: gary at undiscoveredworlds.com (Gary Whitten) Date: Mon Jan 20 20:13:00 2003 Subject: [Coldstuff] $root.credit method in ColdCore In-Reply-To: <3E2CB7B8.1090903@roguetrader.com> Message-ID: I see, so if I were to add something to .credit which altered the line so that it showed something like "// Object $user created on 26-Mar-1995 as a part of ColdCore, see: @help Credit" that would be more in line with what it was intended to display? Gary Whitten wrote: > Ok, I guess I didn't realize that $user was a core object although it makes > sense, I suppose. The main issue here is that I'd rather not have something > I've written in 2003 have a date listed of 1995 on it. I guess I'm going to > put this on my to-do list of things to alter later when I have a better > grasp of things. It isn't going to kill me now but if I ever get to the > point when I have more people working on this, it'd sure be nice to have an > accurate who/when on who did a method so I know who to look for if there's > an issue. There is individual method credit, which is placed into the method when you @edit or @program it. The .credit is shown outside of the method in a @list (notice the placement of the '.' ending the method). The credit is intended as an object-wide credit, where the edit comments are granular to individual methods. -Brandon _______________________________________________ Cold-Coldstuff mailing list Cold-Coldstuff@cold.org http://web.cold.org/mailman/listinfo/cold-coldstuff From acormany at yahoo.com Tue Jan 21 09:50:00 2003 From: acormany at yahoo.com (Adam Cormany) Date: Tue Jan 21 10:50:04 2003 Subject: [Coldstuff] General Question re: preference of setting dictionary values Message-ID: <20030121175000.50355.qmail@web12803.mail.yahoo.com> I was working with dictionaries earlier and was wondering which would be better, to use a string or a symbol. I can easily set either, but is there an advantage over another? For instance, #[["foo", ["xyx", $abc, 123]]] vrs. #[["foo", ['xyz, $abc, 123]]] or even #[['foo, ['xyz, $abc, 123]]] Which would be more efficient, faster, better, etc? Just curious... __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com From ccrawford at seventh.net Tue Jan 21 11:00:22 2003 From: ccrawford at seventh.net (Corey Crawford) Date: Tue Jan 21 10:59:11 2003 Subject: [Coldstuff] General Question re: preference of setting dictionaryvalues In-Reply-To: <20030121175000.50355.qmail@web12803.mail.yahoo.com> Message-ID: Someone please correct me if I'm wrong, but I think it goes like this.. When you use a symbol it actually serializes the string (turns it into a number). Ie: 'xyz becomes 12345. This is advantageous when comparing two string values (doing 12345 == 12345 is a lot faster than comparing "xyz" to "xyz"). Also, the amount of memory used is less since strings generally take up more room than an integer. The way I see it, if I'm going to be using the string in a lot of places, especially for comparison, then it's a good idea to make it a symbol. An example of this would be words used as flags for a user object. But if it's just there for information/display purposes and won't be used in any kind of computation or comparison (or what have you) then using a string is just fine. Maybe someone out there has a better rule of thumb for when to use a symbol versus a string? :) --- Corey Crawford ccrawford@seventh.net -----Original Message----- From: cold-coldstuff-bounces@cold.org [mailto:cold-coldstuff-bounces@cold.org]On Behalf Of Adam Cormany Sent: Tuesday, January 21, 2003 10:50 AM To: Cold Subject: [Coldstuff] General Question re: preference of setting dictionaryvalues I was working with dictionaries earlier and was wondering which would be better, to use a string or a symbol. I can easily set either, but is there an advantage over another? For instance, #[["foo", ["xyx", $abc, 123]]] vrs. #[["foo", ['xyz, $abc, 123]]] or even #[['foo, ['xyz, $abc, 123]]] Which would be more efficient, faster, better, etc? Just curious... __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com _______________________________________________ Cold-Coldstuff mailing list Cold-Coldstuff@cold.org http://web.cold.org/mailman/listinfo/cold-coldstuff From brandon at roguetrader.com Tue Jan 21 11:13:30 2003 From: brandon at roguetrader.com (Brandon Gillespie) Date: Tue Jan 21 11:12:08 2003 Subject: [Coldstuff] General Question re: preference of setting dictionaryvalues In-Reply-To: References: Message-ID: <3E2D8DCA.2060705@roguetrader.com> Yes, you are correct, although it does not necessarily use less memory because it still has to keep the string around _somewhere_. On top of that, I do believe that within a dictionary strings are converted to symbols anyway (you never see it). However, it would be faster to use a symbol still because you wouldn't have to go through the process of converting the string to a symbol for the lookup. -Brandon Corey Crawford wrote: > Someone please correct me if I'm wrong, but I think it goes like this.. > > When you use a symbol it actually serializes the string (turns it into a > number). Ie: 'xyz becomes 12345. This is advantageous when comparing two > string values (doing 12345 == 12345 is a lot faster than comparing "xyz" to > "xyz"). Also, the amount of memory used is less since strings generally take > up more room than an integer. > > The way I see it, if I'm going to be using the string in a lot of places, > especially for comparison, then it's a good idea to make it a symbol. An > example of this would be words used as flags for a user object. But if it's > just there for information/display purposes and won't be used in any kind of > computation or comparison (or what have you) then using a string is just > fine. > > Maybe someone out there has a better rule of thumb for when to use a symbol > versus a string? :) From ccrawford at seventh.net Tue Jan 21 11:19:00 2003 From: ccrawford at seventh.net (Corey Crawford) Date: Tue Jan 21 11:17:44 2003 Subject: [Coldstuff] General Question re: preference of settingdictionaryvalues In-Reply-To: <3E2D8DCA.2060705@roguetrader.com> Message-ID: [Brandon Gillespie wrote:] > Yes, you are correct, although it does not necessarily use less memory > because it still has to keep the string around _somewhere_. Yah, but I was thinking that with a symbol it only holds that string *once* where as if you don't use a symbol then you are holding that same string in memory multipule times. Is that not the case? --- Corey Crawford ccrawford@seventh.net From gary at undiscoveredworlds.com Thu Jan 23 18:41:56 2003 From: gary at undiscoveredworlds.com (Gary Whitten) Date: Thu Jan 23 16:41:26 2003 Subject: [Coldstuff] World Time and coordinates In-Reply-To: Message-ID: Between myself and my team, we think we've noticed some indications of time zones and/or coordinates in Cold Core. I was wondering if anyone has used them and what their thoughts were on them. This is something I'd like to do at some point and since I'm working on other things and the list has been quiet of late, I figured I'd toss out this out to garner some information for later. :) Gary From acormany at yahoo.com Tue Jan 28 09:25:33 2003 From: acormany at yahoo.com (Adam Cormany) Date: Tue Jan 28 10:25:39 2003 Subject: [Coldstuff] $integer.add not found. context error. Message-ID: <20030128172533.32516.qmail@web12805.mail.yahoo.com> Recently I've been having problems with $user. Everytime I would do @show $user, @show me, etc, I would get: $integer.add not found. I was thinking that I created this error with code that I've done perhaps so I reloaded a backup from a day or 2 before I got the error. Everything seemed to be fine. I didn't touch the code after I reloaded. The next day I logged into my cold and was getting the same error. I tracked the error through $command_parser and many many methods. Finally I tracked the error to $user.match_environment. The line: context = context.add(gend.pronoun('po), match); was generating the error because context on $user_soth was 0 for some reason. I changed the line to: context = setadd(context || [], gend.pronoun('po)); This seems to have corrected my problem. I wasn't sure if anyone else has had this problem or if this would help anyone down the road. Believe me, you don't want to try to track down errors through $command_parser.parse(). It calls methods which calls methods which calls methods and so on. Not fun. I honestly don't think I touched context prior to this so I'm not sure if I caused this problem or if it just finally showed itself now. Finally, my questions: 1) Has anyone else seen this before? 2) What exactly is the variable $user,context for? Thanks for any help, Adam __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com From grimslayde at sbcglobal.net Tue Jan 28 15:52:07 2003 From: grimslayde at sbcglobal.net (Grimslayde) Date: Tue Jan 28 14:52:15 2003 Subject: [Coldstuff] $integer.add not found. context error. References: <20030128172533.32516.qmail@web12805.mail.yahoo.com> Message-ID: <002f01c2c717$819276f0$0c0d060a@npd.com> Never had that problem before in all my misadventures, but I can tell you what context is used for. Whenever .match_environment is called on a user object, the context variable is set as you match stuff that match up to things like it, he, she, and here. For instance, I can do "@disp me" then "look him" and BANGO, it targets me. Neato, eh? Check out the .match_environment methods on the user object. It'll make more sense from there. ----- Original Message ----- From: "Adam Cormany" To: "Cold" Sent: Tuesday, January 28, 2003 11:25 AM Subject: [Coldstuff] $integer.add not found. context error. > Recently I've been having problems with $user. > Everytime I would do @show $user, @show me, etc, I > would get: > $integer.add not found. > > I was thinking that I created this error with code > that I've done perhaps so I reloaded a backup from a > day or 2 before I got the error. Everything seemed to > be fine. I didn't touch the code after I reloaded. The > next day I logged into my cold and was getting the > same error. > > I tracked the error through $command_parser and many > many methods. Finally I tracked the error to > $user.match_environment. The line: > > context = context.add(gend.pronoun('po), match); > > was generating the error because context on $user_soth > was 0 for some reason. I changed the line to: > > context = setadd(context || [], gend.pronoun('po)); > > This seems to have corrected my problem. > > I wasn't sure if anyone else has had this problem or > if this would help anyone down the road. Believe me, > you don't want to try to track down errors through > $command_parser.parse(). It calls methods which calls > methods which calls methods and so on. Not fun. > > I honestly don't think I touched context prior to this > so I'm not sure if I caused this problem or if it just > finally showed itself now. > > Finally, my questions: > 1) Has anyone else seen this before? > 2) What exactly is the variable $user,context for? > > Thanks for any help, > Adam > > __________________________________________________ > Do you Yahoo!? > Yahoo! Mail Plus - Powerful. Affordable. Sign up now. > http://mailplus.yahoo.com > _______________________________________________ > Cold-Coldstuff mailing list > Cold-Coldstuff@cold.org > http://web.cold.org/mailman/listinfo/cold-coldstuff From gary at undiscoveredworlds.com Tue Jan 28 23:00:58 2003 From: gary at undiscoveredworlds.com (Gary Whitten) Date: Tue Jan 28 21:00:14 2003 Subject: [Coldstuff] Common object references in methods In-Reply-To: <002f01c2c717$819276f0$0c0d060a@npd.com> Message-ID: Hi folks After working on some stuff tonight I realized that I am a bit fuzzy on the most common references used in writing methods. Some of the ones I know about are: caller sender user here this .location Are there other such ones that tend to appear in the majority of methods that people here write and if so, could someone take a moment to mention them? Thanks a bunch :) Gary From grimslayde at sbcglobal.net Wed Jan 29 14:24:10 2003 From: grimslayde at sbcglobal.net (Grimslayde) Date: Wed Jan 29 13:24:18 2003 Subject: [Coldstuff] Common object references in methods References: Message-ID: <000a01c2c7d4$631b8fa0$0c0d060a@npd.com> Heya Gary, Here's my take on your request: caller() - function that returns the object number of the object that... uh... defines the method which called the current method. Right. Get that? sender() - function that returns the object number of the object that CALLED the current method. Kinda confusing, I know but here's an example to show the difference... use the eval statement like this so: ;caller() => $programmer (Generic Programmer) ;sender() => $user_grimslayde (Grimslayde) You are using the eval command when doing this, so caller returns $programmer because the eval method is defined on the $programmer object. Sender returns my object reference because I'm the one CALLING that method. Make sense? user() - Ummm... not sure on this, never much used it. Documentation talks about tasks and ownership and other scarey stuff. I'm going to hide now. here - Not sure where you are getting this from but I can only guess it's from environment matching, cuz it isn't a function. When a $located child calls .match_environment(), if the string it's trying to match is "here" then it returns the $located's current location object reference. Check out $located.match_environment, you'll see what's going on. this() - returns the object reference of the object the method is defined on. location - this is a method defined on $located that returns the object's current location. I use all manner of methods/functions, really depends on what you're trying to do. If it's a function, it's in the help documentation... and if the documentation is too cryptic then experiment! I'd also suggest you check out commands like @trace and @grep to really dig down in the core and figure out what's going on, how it's happening, and why! Hope that helps ye a little bit, if not speak up. - Grim ----- Original Message ----- From: "Gary Whitten" To: Sent: Tuesday, January 28, 2003 10:00 PM Subject: [Coldstuff] Common object references in methods > Hi folks > > After working on some stuff tonight I realized that I am a bit fuzzy on the > most common references used in writing methods. > > Some of the ones I know about are: > > caller > sender > user > here > this > .location > > Are there other such ones that tend to appear in the majority of methods > that people here write and if so, could someone take a moment to mention > them? > > Thanks a bunch :) > > Gary > > _______________________________________________ > Cold-Coldstuff mailing list > Cold-Coldstuff@cold.org > http://web.cold.org/mailman/listinfo/cold-coldstuff From gary at undiscoveredworlds.com Thu Jan 30 23:16:48 2003 From: gary at undiscoveredworlds.com (Gary Whitten) Date: Thu Jan 30 21:15:56 2003 Subject: [Coldstuff] Common object references in methods In-Reply-To: <000a01c2c7d4$631b8fa0$0c0d060a@npd.com> Message-ID: Hey Grym, hope you're well. Actually, I wasn't looking for descriptions of the ones I had listed but was looking for other common object references that I did NOT list that I may not be aware of. It was basically my train of thought that if there are references more commonly used than others, then knowing about them will help me narrow down some learning by learning what most people use instead of perhaps learning something really obscure that I might never use. Gary From gary at undiscoveredworlds.com Thu Jan 30 23:42:18 2003 From: gary at undiscoveredworlds.com (Gary Whitten) Date: Thu Jan 30 21:41:25 2003 Subject: [Coldstuff] Built in code for multiple descriptions? In-Reply-To: Message-ID: Hi Is there built in code for multiple descriptions for different rooms say based on day/night or seasons for Cold Core? I've taken a peek here and there and haven't seen anything but was wondering if anyone knew either way for sure and if it does exist, point me in the right direction? Thanks! Gary (who else?!) From brandon at roguetrader.com Fri Jan 31 08:34:03 2003 From: brandon at roguetrader.com (Brandon Gillespie) Date: Fri Jan 31 08:30:52 2003 Subject: [Coldstuff] Built in code for multiple descriptions? In-Reply-To: References: Message-ID: <3E3A976B.90602@roguetrader.com> Gary Whitten wrote: > Hi > > Is there built in code for multiple descriptions for different rooms say > based on day/night or seasons for Cold Core? > > I've taken a peek here and there and haven't seen anything but was wondering > if anyone knew either way for sure and if it does exist, point me in the > right direction? > > Thanks! > > Gary (who else?!) Yes, using CML. It isn't the prettiest, but it works. Do an @exam here when in the courtyard. -Brandon From gary at undiscoveredworlds.com Fri Jan 31 10:52:39 2003 From: gary at undiscoveredworlds.com (Gary Whitten) Date: Fri Jan 31 08:51:43 2003 Subject: [Coldstuff] Built in code for multiple descriptions? In-Reply-To: <3E3A976B.90602@roguetrader.com> Message-ID: OK, great, I see that. Maybe I'm completely missing it but looking over the help areas for CML, I see all sorts of stuff. What I don't see, however, is 'How do you put it in place to be used?' It's probably something simple and possibly obvious but there aren't any examples. -----Original Message----- From: cold-coldstuff-bounces@cold.org [mailto:cold-coldstuff-bounces@cold.org]On Behalf Of Brandon Gillespie Sent: Friday, January 31, 2003 10:34 AM To: coldstuff@cold.org Subject: Re: [Coldstuff] Built in code for multiple descriptions? Gary Whitten wrote: > Hi > > Is there built in code for multiple descriptions for different rooms say > based on day/night or seasons for Cold Core? > > I've taken a peek here and there and haven't seen anything but was wondering > if anyone knew either way for sure and if it does exist, point me in the > right direction? > > Thanks! > > Gary (who else?!) Yes, using CML. It isn't the prettiest, but it works. Do an @exam here when in the courtyard. -Brandon _______________________________________________ Cold-Coldstuff mailing list Cold-Coldstuff@cold.org http://web.cold.org/mailman/listinfo/cold-coldstuff From grimslayde at sbcglobal.net Fri Jan 31 09:53:49 2003 From: grimslayde at sbcglobal.net (Grimslayde) Date: Fri Jan 31 08:53:59 2003 Subject: [Coldstuff] Common object references in methods References: Message-ID: <001401c2c940$f3f058e0$0c0d060a@npd.com> Hrmmm... whew... well, that's a tougher question to answer, but I'll give it a shot. It really all depends on what part of the core you are coding on. But generally speaking, it'd be good to familiarize yerself with the use of .perms() and .is() for some coding security. Uhmmmm... *glances through code* Understanding what traceback() spits back on an error can really save ya in the midst of a catch. What else? *sips soda and contemplates* Ah, well, there's always your data types. Get to know them intimately. Not just $list or $dictionary(though will be your bestest friends ever), but simple stuff like the $string and $integer. There are methods on those suckas that can do some great stuff. When dealing with the virtual physical world, it's a good idea to follow the descendants of $located. That way you'll know how things are located, where that kind of stuff is stored, etc. As Brandon mentioned, you can go far with text tricks with CML. It's a bit too obtuse to use on the fly but for room descriptions and the like you can do nifty stuff. Learn it! Gah... that's about it that I can think of at the moment. Just the basics, really. Get to know those and the rest will follow. Hope this helps ya more than the last... *winks* ----- Original Message ----- From: "Gary Whitten" To: Sent: Thursday, January 30, 2003 10:16 PM Subject: RE: [Coldstuff] Common object references in methods > Hey Grym, hope you're well. > > Actually, I wasn't looking for descriptions of the ones I had listed but was > looking for other common object references that I did NOT list that I may > not be aware of. It was basically my train of thought that if there are > references more commonly used than others, then knowing about them will help > me narrow down some learning by learning what most people use instead of > perhaps learning something really obscure that I might never use. > > Gary > > _______________________________________________ > Cold-Coldstuff mailing list > Cold-Coldstuff@cold.org > http://web.cold.org/mailman/listinfo/cold-coldstuff From grimslayde at sbcglobal.net Fri Jan 31 10:04:45 2003 From: grimslayde at sbcglobal.net (Grimslayde) Date: Fri Jan 31 09:04:59 2003 Subject: [Coldstuff] Built in code for multiple descriptions? References: Message-ID: <001501c2c942$7c241840$0c0d060a@npd.com> Check this jazz out... ;.location().prose() => <$ctext_frob, [["Soft azure light illuminates this octagonal room, cast from bold runes inscribed upon a border along the ceiling. A wide fireplace lies to one side of the room while across from it is a massive marble-topped desk. Bookshelves inset into the wall cover every inch of space, holding tomes of ancient, forgotten, and sometimes forbidden lore. The room has a comfortable, studious feel to it."], #[["precipitation", "fine"], ["humidity", "fine"], ["temperature", "warm"], ["visibility", "clear"], ["clouds", "clear"], ["wind", "serene"], ["weather", "nice"], ["weather_desc", <$ctext_frob, [["The weather is nice. The sun is shining and all that."], #[['this, $weather_nice]]]>], ["season", "spring"], ['daytime, [10, 'morning, 'day]], ['evaluator, $realm_base_eval], ['this, $home_grimslayde]]]> This is the prose of my home. You can see that it formats my description into a $ctext_frob, right? See where it has other frobs in there for stuff like weather and suchness? You could implement your day/night descriptions there using CML generators and formatters. As a coder I have other priorities and as a builder I am far too lazy to make 2 room descs for each room... but it'd still be an interesting thing to develop. If you wanted to it by some other means, you could alter the prose method on the $place or deeper in to check for it's realm time, then return a day/night desc from there to be parsed through the CML stuffage.*shrugs* Though you'd need to implement some means of storing and setting two descs on the room if ye did that. Might be easier just to put it all in one desc and use CML to pick and choose what elements to put in the desc by time of day... that way you could go so far as to have morning, noon, dusk, night elements in the descriptions. Oooooh... now that'd be neat. Not necessarily two completely separate descs, but have elements that are only visible at certain times of the day! Just typing aloud here... ya'll jump in with whatcha think! ----- Original Message ----- From: "Gary Whitten" To: Sent: Friday, January 31, 2003 9:52 AM Subject: RE: [Coldstuff] Built in code for multiple descriptions? > OK, great, I see that. Maybe I'm completely missing it but looking over the > help areas for CML, I see all sorts of stuff. What I don't see, however, is > 'How do you put it in place to be used?' It's probably something simple and > possibly obvious but there aren't any examples. > > -----Original Message----- > From: cold-coldstuff-bounces@cold.org > [mailto:cold-coldstuff-bounces@cold.org]On Behalf Of Brandon Gillespie > Sent: Friday, January 31, 2003 10:34 AM > To: coldstuff@cold.org > Subject: Re: [Coldstuff] Built in code for multiple descriptions? > > > Gary Whitten wrote: > > Hi > > > > Is there built in code for multiple descriptions for different rooms say > > based on day/night or seasons for Cold Core? > > > > I've taken a peek here and there and haven't seen anything but was > wondering > > if anyone knew either way for sure and if it does exist, point me in the > > right direction? > > > > Thanks! > > > > Gary (who else?!) > > Yes, using CML. It isn't the prettiest, but it works. Do an @exam here > when in the courtyard. > > -Brandon > > _______________________________________________ > Cold-Coldstuff mailing list > Cold-Coldstuff@cold.org > http://web.cold.org/mailman/listinfo/cold-coldstuff > > _______________________________________________ > Cold-Coldstuff mailing list > Cold-Coldstuff@cold.org > http://web.cold.org/mailman/listinfo/cold-coldstuff From gary at undiscoveredworlds.com Fri Jan 31 11:06:54 2003 From: gary at undiscoveredworlds.com (Gary Whitten) Date: Fri Jan 31 09:05:58 2003 Subject: [Coldstuff] Common object references in methods In-Reply-To: <001401c2c940$f3f058e0$0c0d060a@npd.com> Message-ID: Hey Grym, it's all a help, trust me :) Even if not for me, someone else could look at the archives and go 'Ahhh, so THAT's what that did!'. :) Anyhow, thanks for the tips about checking out the methods on some of the other objects. I'd never heard of or noticed $integer before, so that's cool. $list and $dictionary do seem quite handy and I'm going to be learning them soon but I wouldn't mind putting that off just a bit longer. :) :) I've checked out $location before and also just 'discovered' $physical with the stuff with visibility on it (kinda cool stuff there) and also $described (not sure if that's relevant to my description thing yet). This is so cool and so powerful, it's great and it's why I chose Cold. The help system is actually fairly decent, which is nice. I'd rather have a word doc or pdf but that's just me. I really lament, however, the lack of examples in the help nodes. :( To me, those are what really take the usually very dry language of a help node/man page and say 'Hey, it looks like this' and it just CLICKS, yanno? Oh well, if anyone can give some examples in the CML thing to help me bridge that gap that'd be very helpful. :) -----Original Message----- From: cold-coldstuff-bounces@cold.org [mailto:cold-coldstuff-bounces@cold.org]On Behalf Of Grimslayde Sent: Friday, January 31, 2003 10:54 AM To: coldstuff@cold.org Subject: Re: [Coldstuff] Common object references in methods Hrmmm... whew... well, that's a tougher question to answer, but I'll give it a shot. It really all depends on what part of the core you are coding on. But generally speaking, it'd be good to familiarize yerself with the use of .perms() and .is() for some coding security. Uhmmmm... *glances through code* Understanding what traceback() spits back on an error can really save ya in the midst of a catch. What else? *sips soda and contemplates* Ah, well, there's always your data types. Get to know them intimately. Not just $list or $dictionary(though will be your bestest friends ever), but simple stuff like the $string and $integer. There are methods on those suckas that can do some great stuff. When dealing with the virtual physical world, it's a good idea to follow the descendants of $located. That way you'll know how things are located, where that kind of stuff is stored, etc. As Brandon mentioned, you can go far with text tricks with CML. It's a bit too obtuse to use on the fly but for room descriptions and the like you can do nifty stuff. Learn it! Gah... that's about it that I can think of at the moment. Just the basics, really. Get to know those and the rest will follow. Hope this helps ya more than the last... *winks* From grimslayde at sbcglobal.net Fri Jan 31 10:25:19 2003 From: grimslayde at sbcglobal.net (Grimslayde) Date: Fri Jan 31 09:25:41 2003 Subject: [Coldstuff] Common object references in methods References: Message-ID: <002301c2c945$61e6fe90$0c0d060a@npd.com> I haven't used CML much since my last Bad Crash That Really Sucked many moons ago, but here's a quick example of how I used the time generator in a room description to make a dynamic clock thingie. The muted din of chatter and activity are all about this place. A smokey haze clings to the ceiling, through which glowing runes cast illumination. A waterclock set beside the bar reads the current system time as [time:%R] CST. This quaint tavern serves as an escape from the hectic life of the in-character world. It's a chance to shed your persona and relax as yourself. So go on, find yourself a table and put your feet up for a bit. Generators do stuff like evaluate data or run a quick method/function. Formatters... uh... format. Yeah. Haven't much explored this stuff yet, does it show? ----- Original Message ----- From: "Gary Whitten" To: Sent: Friday, January 31, 2003 10:06 AM Subject: RE: [Coldstuff] Common object references in methods > Hey Grym, it's all a help, trust me :) Even if not for me, someone else > could look at the archives and go 'Ahhh, so THAT's what that did!'. :) > > Anyhow, thanks for the tips about checking out the methods on some of the > other objects. I'd never heard of or noticed $integer before, so that's > cool. > > $list and $dictionary do seem quite handy and I'm going to be learning them > soon but I wouldn't mind putting that off just a bit longer. :) :) > > I've checked out $location before and also just 'discovered' $physical with > the stuff with visibility on it (kinda cool stuff there) and also $described > (not sure if that's relevant to my description thing yet). > > This is so cool and so powerful, it's great and it's why I chose Cold. The > help system is actually fairly decent, which is nice. I'd rather have a > word doc or pdf but that's just me. I really lament, however, the lack of > examples in the help nodes. :( To me, those are what really take the > usually very dry language of a help node/man page and say 'Hey, it looks > like this' and it just CLICKS, yanno? > > Oh well, if anyone can give some examples in the CML thing to help me bridge > that gap that'd be very helpful. :) > > -----Original Message----- > From: cold-coldstuff-bounces@cold.org > [mailto:cold-coldstuff-bounces@cold.org]On Behalf Of Grimslayde > Sent: Friday, January 31, 2003 10:54 AM > To: coldstuff@cold.org > Subject: Re: [Coldstuff] Common object references in methods > > > Hrmmm... whew... well, that's a tougher question to answer, but I'll give it > a shot. It really all depends on what part of the core you are coding on. > But generally speaking, it'd be good to familiarize yerself with the use of > .perms() and .is() for some coding security. Uhmmmm... *glances through > code* Understanding what traceback() spits back on an error can really save > ya in the midst of a catch. > > What else? > > *sips soda and contemplates* > > Ah, well, there's always your data types. Get to know them intimately. Not > just $list or $dictionary(though will be your bestest friends ever), but > simple stuff like the $string and $integer. There are methods on those > suckas that can do some great stuff. > > When dealing with the virtual physical world, it's a good idea to follow the > descendants of $located. That way you'll know how things are located, where > that kind of stuff is stored, etc. > > As Brandon mentioned, you can go far with text tricks with CML. It's a bit > too obtuse to use on the fly but for room descriptions and the like you can > do nifty stuff. Learn it! > > Gah... that's about it that I can think of at the moment. Just the basics, > really. Get to know those and the rest will follow. Hope this helps ya more > than the last... *winks* > > > _______________________________________________ > Cold-Coldstuff mailing list > Cold-Coldstuff@cold.org > http://web.cold.org/mailman/listinfo/cold-coldstuff From brandon at roguetrader.com Fri Jan 31 10:44:07 2003 From: brandon at roguetrader.com (Brandon Gillespie) Date: Fri Jan 31 10:40:54 2003 Subject: [Coldstuff] Built in code for multiple descriptions? In-Reply-To: References: Message-ID: <3E3AB5E7.5060708@roguetrader.com> Gary Whitten wrote: > OK, great, I see that. Maybe I'm completely missing it but looking over the > help areas for CML, I see all sorts of stuff. What I don't see, however, is > 'How do you put it in place to be used?' It's probably something simple and > possibly obvious but there aren't any examples. When you @exam, it generally shows you the command you use to set the same value. So for the room description, you just @describe here and include the CML inside the description. From owel at ptd.net Fri Jan 31 15:45:31 2003 From: owel at ptd.net (owel@ptd.net) Date: Fri Jan 31 13:43:31 2003 Subject: [Coldstuff] Connecting Flash to Cold Core Message-ID: <002f01c2c969$b4168900$9900a8c0@alpha> Flash has the ability to open sockets, intended to receive XML data, however they can accept plain text that has to be parsed by the person writing the Flash movie. I have been able to successfully connect Flash to the core and send data to the core, however Flash never seemed to be reading the output. I found that in Flash, whether or not the message is in XML format, it must be terminated by a zero byte. So, I looked up my test account's $login_connection, and did: ;$login_connection_1023.write(`[0]) At that point, all the previously sent information was displayed in Flash. What I'm looking for at this point is information on how I can safely have the core send `[0] after each .write so that Flash will read the data after each line, just like a normal client. I tried adding cwrite(`[0]); to $connection.write after cwrite(what);, but that seemed to ruin the display of the data in other clients, where parts of the text weren't displayed. Any help is appreciated in advance. From grimslayde at sbcglobal.net Fri Jan 31 14:59:10 2003 From: grimslayde at sbcglobal.net (Grimslayde) Date: Fri Jan 31 13:59:21 2003 Subject: [Coldstuff] Connecting Flash to Cold Core References: <002f01c2c969$b4168900$9900a8c0@alpha> Message-ID: <005101c2c96b$9ba60e70$0c0d060a@npd.com> Hey, another Flasher! Alright!!! I'm developing a Flash-based webclient as well and I went through the same woes as ye when it comes to this zero-byte termination. It's a simple fix, though. I created a separate connection daemon for Flash connections, and with it I developed a flash interface and connection object that the daemon uses. You've gotta tweak the write method on the flash connection object (don't do this to yer regular $connection). Here's a bare-bones version of what I did: @program $flash_connection.write() +access=pub arg what; switch (type(what)) { case 'string: what = strings_to_buf([what], `[]); case 'list: what = strings_to_buf(what, `[]); case 'buffer: what = what; default: throw(~type, "Write: strings, list of strings and buffers."); } what += `[0]; cwrite(what); return what; . It's pretty much the same as the original write method, only after it parses the string into a buffer it slaps that 0 byte on the end of it. Hope that helps ye. Happy Flashing, comrade. Drop me a line when ya have something to show off. - Grim ----- Original Message ----- From: To: Sent: Friday, January 31, 2003 2:45 PM Subject: [Coldstuff] Connecting Flash to Cold Core Flash has the ability to open sockets, intended to receive XML data, however they can accept plain text that has to be parsed by the person writing the Flash movie. I have been able to successfully connect Flash to the core and send data to the core, however Flash never seemed to be reading the output. I found that in Flash, whether or not the message is in XML format, it must be terminated by a zero byte. So, I looked up my test account's $login_connection, and did: ;$login_connection_1023.write(`[0]) At that point, all the previously sent information was displayed in Flash. What I'm looking for at this point is information on how I can safely have the core send `[0] after each .write so that Flash will read the data after each line, just like a normal client. I tried adding cwrite(`[0]); to $connection.write after cwrite(what);, but that seemed to ruin the display of the data in other clients, where parts of the text weren't displayed. Any help is appreciated in advance. _______________________________________________ Cold-Coldstuff mailing list Cold-Coldstuff@cold.org http://web.cold.org/mailman/listinfo/cold-coldstuff From xidus at xidus.net Fri Jan 31 14:52:42 2003 From: xidus at xidus.net (Jeremy Weatherford) Date: Fri Jan 31 15:52:51 2003 Subject: [Coldstuff] Connecting Flash to Cold Core In-Reply-To: <002f01c2c969$b4168900$9900a8c0@alpha> Message-ID: Not much to say here... yes, that's the way to make Flash work. No, it won't play nice with normal clients. Null bytes aren't something normal terminals are expected to display. Thus, you'll need some way to differentiate. How about setting up a login-only command that the Flash client automatically sends when it connects to change its connection to a $flash_connection, as suggested by Grimslayde? Jeremy Weatherford xidus@xidus.net http://xidus.net On Fri, 31 Jan 2003 owel@ptd.net wrote: > Flash has the ability to open sockets, intended to receive XML data, however they can accept plain text that has to be parsed by the person writing the Flash movie. I have been able to successfully connect Flash to the core and send data to the core, however Flash never seemed to be reading the output. > > I found that in Flash, whether or not the message is in XML format, it must be terminated by a zero byte. > > So, I looked up my test account's $login_connection, and did: > > ;$login_connection_1023.write(`[0]) > > At that point, all the previously sent information was displayed in Flash. > > What I'm looking for at this point is information on how I can safely have the core send `[0] after each .write so that Flash will read the data after each line, just like a normal client. I tried adding cwrite(`[0]); to $connection.write after cwrite(what);, but that seemed to ruin the display of the data in other clients, where parts of the text weren't displayed. > > Any help is appreciated in advance. > _______________________________________________ > Cold-Coldstuff mailing list > Cold-Coldstuff@cold.org > http://web.cold.org/mailman/listinfo/cold-coldstuff > From grimslayde at sbcglobal.net Fri Jan 31 17:10:17 2003 From: grimslayde at sbcglobal.net (Grimslayde) Date: Fri Jan 31 16:10:39 2003 Subject: [Coldstuff] Connecting Flash to Cold Core References: Message-ID: <006501c2c97d$f444a6b0$0c0d060a@npd.com> My core is running on two ports. One for standard logins and one for Flash. Thus, $login_daemon and $flash_daemon are my attentive little minions. I made the $flash_interface because the login sequence was different for the client than it would be for standard. The content that gets tossed back and forth between the client and core is very different from the standard, thus the special write method on the $flash_connection object. The premise of connecting and logging in are the same, though. You connect to $flash_daemon, it passes the connection over to a fresh $flash_connection and tags a $flash_interface on it to interpret login stuff. On login the interface gets passed from $flash_interface to the user object just like normal. So far it works wonderfully. I only have one be-yatch thus far, and there's nothing I can do about it. It works beautifully until you get to stuff like conencating huge strings (like adding output to the window after awhile). That's when you really note the strain in CPU usage and it starts to lag. SO, my warning to you Flashers out there doing this: have some method of either clearing the output window OR capping the limit on it. Happy coding, folks. I'm out for the day!!! - Grim ----- Original Message ----- From: "Jeremy Weatherford" To: Sent: Friday, January 31, 2003 4:52 PM Subject: Re: [Coldstuff] Connecting Flash to Cold Core > Not much to say here... yes, that's the way to make Flash work. No, it > won't play nice with normal clients. Null bytes aren't something normal > terminals are expected to display. Thus, you'll need some way to > differentiate. How about setting up a login-only command that the Flash > client automatically sends when it connects to change its connection to a > $flash_connection, as suggested by Grimslayde? > > Jeremy Weatherford > xidus@xidus.net > http://xidus.net > > > On Fri, 31 Jan 2003 owel@ptd.net wrote: > > > Flash has the ability to open sockets, intended to receive XML data, however they can accept plain text that has to be parsed by the person writing the Flash movie. I have been able to successfully connect Flash to the core and send data to the core, however Flash never seemed to be reading the output. > > > > I found that in Flash, whether or not the message is in XML format, it must be terminated by a zero byte. > > > > So, I looked up my test account's $login_connection, and did: > > > > ;$login_connection_1023.write(`[0]) > > > > At that point, all the previously sent information was displayed in Flash. > > > > What I'm looking for at this point is information on how I can safely have the core send `[0] after each .write so that Flash will read the data after each line, just like a normal client. I tried adding cwrite(`[0]); to $connection.write after cwrite(what);, but that seemed to ruin the display of the data in other clients, where parts of the text weren't displayed. > > > > Any help is appreciated in advance. > > _______________________________________________ > > Cold-Coldstuff mailing list > > Cold-Coldstuff@cold.org > > http://web.cold.org/mailman/listinfo/cold-coldstuff > > > > > _______________________________________________ > Cold-Coldstuff mailing list > Cold-Coldstuff@cold.org > http://web.cold.org/mailman/listinfo/cold-coldstuff From michael at mudge.com Fri Jan 31 19:18:16 2003 From: michael at mudge.com (michael@mudge.com) Date: Fri Jan 31 20:18:22 2003 Subject: [Coldstuff] Connecting Flash to Cold Core Message-ID: <20030131191817.12414.h011.c000.wm@mail.mudge.com.criticalpath.net> I did this two years ago; right when Flash 5 came out with the ability. Be sure to convert your text to HTML, or else the XML parser might think it's XML (ie: convert "<" into "<") Have a look at my nifty Flash-to-ColdC applet on ColdC.com (at the bottom). - Kipp On Fri, 31 Jan 2003, owel@ptd.net wrote: > > Flash has the ability to open sockets, intended to receive XML data, however > they can accept plain text that has to be parsed by the person writing the > Flash movie. I have been able to successfully connect Flash to the core and > send data to the core, however Flash never seemed to be reading the output. > > I found that in Flash, whether or not the message is in XML format, it must be > terminated by a zero byte. > > So, I looked up my test account's $login_connection, and did: > > ;$login_connection_1023.write(`[0]) > > At that point, all the previously sent information was displayed in Flash. > > What I'm looking for at this point is information on how I can safely have the > core send `[0] after each .write so that Flash will read the data after each > line, just like a normal client. I tried adding cwrite(`[0]); to > $connection.write after cwrite(what);, but that seemed to ruin the display of > the data in other clients, where parts of the text weren't displayed. > > Any help is appreciated in advance. > _______________________________________________ > Cold-Coldstuff mailing list > Cold-Coldstuff@cold.org > http://web.cold.org/mailman/listinfo/cold-coldstuff