From coldstuff@cold.org Sat Mar 2 20:51:51 2002 From: coldstuff@cold.org (Aldon Hynes) Date: Sat, 02 Mar 2002 15:51:51 -0500 Subject: [Coldstuff] Win32 $smtp sitenames wiki squeak alice Message-ID: Okay, so I've been poking around with a bunch of different stuff... I recently got ColdC (Driver: Genesis 1.1.9-1.0p0, Core: ColdCore 3.0.1999-08-28) running on my Windows NT box. My first attempt was to compile it using Cygwin. It complied fine, but then coldcc wouldn't compile the core. If anyone has suggestions on this, let me know. Then I found that recent Windows binaries exist at ftp://ftp.cold.org/cold/bin/, I downloaded them, compiled the core and I'm up and running. I started $pop3_daemon and found that I could get my ColdMail via Outlook. Nice. Then I tried to get the $smtp stuff to work. I noticed that the email address that I got when received the mail via pop three was aldon@cv933025-a cv9322025-a is the hostname that is entered in the DNS definition for my NT box. It appears to be omitting the rest of the domain however. When I attempt to reply to that address, I get The message could not be sent because one of the recipeints was rejected by the server. Server Response '571 Unwilling to accept or relay mail for cv933025-a>'. It appears as if the brackets are not properly being stripped off. As a side note, using raw telnet to send the mail, it works without the brackets. Any comments on getting the brackets to work? On setting a better hostname in Cold? As I read around a bit more, I found a reference in http://web.cold.org/old/sitenames.html to http://ice.cold.org/cold_servers/list Does anyone know where cold_servers/list has moved to? Any other suggestions on getting $smtp to work would be appreciated. As a side comment, as I read through older posts on ColdStuff, hoping to get a clue there, I found a reference to http://agora.cubik.org/wiki/view/Main/ColdMudDatabase This jumped out at me because I recently stumbled across Squeak. There were numerous references to wiki in squeak. Is anyone out there playing with wiki, squeak, cold or some interesting combination of those? My readings about squeak also lead me to alice, and the same question about alice applies. Always looking for fun new things to play with, Aldon From coldstuff@cold.org Fri Mar 8 01:08:59 2002 From: coldstuff@cold.org (Henry Stuka) Date: Thu, 07 Mar 2002 20:08:59 -0500 Subject: [Coldstuff] custom color Message-ID: I’m completely new to ColdC, and programming in general – MOOs being my only experience so far – and I was hoping someone could give me some pointers with regard to color in the ColdCore. I’m trying to implement a custom color system, where players can choose what colors they want to see for room descriptions, player names, etc. I’ve added variables to the player objects, such as base_color, room_color, and so on. Using eval with the statement: ;me.tell($compiler.compile_cml("{font color=" + base_color + ":This text is blue}")) => This text is blue [ seconds: 0.000000; operations: 2835 ] ...I get the output I want, but my questions are: 1) Is this a horribly inefficient way to do this? 2835 operations-? 2) Is running text through $compiler.compile_cml the best, fastest, or only way to use color in ColdCore?, and 3) how do you get *bold* colors? Apologize for my cluelessness – any help or direction would be much appreciated -- stuka _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. From coldstuff@cold.org Tue Mar 12 20:27:57 2002 From: coldstuff@cold.org (Michael Henry) Date: Tue, 12 Mar 2002 13:27:57 -0700 Subject: [Coldstuff] ColdDark Instant Crash In-Reply-To: <20020221172222.B16889@mojo.cold.org> References: <20020221131253.A15450@mojo.cold.org> <20020221211909.9006.qmail@web14503.mail.yahoo.com> <20020221172222.B16889@mojo.cold.org> Message-ID: <20020312202757.GC10913@prometheus> I figured out what keeps crashing ColdDark The common characted in all 3 lines that crashed cold for me is: Percent (%) followed by a space. In the last case I said: "... 99.999% uptime ..." Any ideas? Mike (derMike) From coldstuff@cold.org Tue Mar 12 20:44:23 2002 From: coldstuff@cold.org (Bruce Mitchener) Date: Tue, 12 Mar 2002 13:44:23 -0700 Subject: [Coldstuff] ColdDark Instant Crash References: <20020221131253.A15450@mojo.cold.org> <20020221211909.9006.qmail@web14503.mail.yahoo.com> <20020221172222.B16889@mojo.cold.org> <20020312202757.GC10913@prometheus> Message-ID: <3C8E68A7.3000604@cubik.org> Michael Henry wrote: > I figured out what keeps crashing ColdDark > > The common characted in all 3 lines that crashed cold for me is: > Percent (%) followed by a space. > > In the last case I said: > "... 99.999% uptime ..." > > Any ideas? You're just doing a say command and that happens? - Bruce From coldstuff@cold.org Tue Mar 12 20:39:03 2002 From: coldstuff@cold.org (Michael Henry) Date: Tue, 12 Mar 2002 13:39:03 -0700 Subject: [Coldstuff] ColdDark Instant Crash In-Reply-To: <3C8E68A7.3000604@cubik.org> References: <20020221131253.A15450@mojo.cold.org> <20020221211909.9006.qmail@web14503.mail.yahoo.com> <20020221172222.B16889@mojo.cold.org> <20020312202757.GC10913@prometheus> <3C8E68A7.3000604@cubik.org> Message-ID: <20020312203903.GE10913@prometheus> Sorry, I forgot to be clear. It was emote all 3 times. Bruce Mitchener wrote: > Michael Henry wrote: > >I figured out what keeps crashing ColdDark > > > >The common characted in all 3 lines that crashed cold for me is: > > Percent (%) followed by a space. > > > >In the last case I said: > > "... 99.999% uptime ..." > > > >Any ideas? > > You're just doing a say command and that happens? > > - Bruce > > _______________________________________________ > Cold-Coldstuff mailing list > Cold-Coldstuff@cold.org > http://web.cold.org/mailman/listinfo/cold-coldstuff From coldstuff@cold.org Tue Mar 12 20:52:43 2002 From: coldstuff@cold.org (Bruce Mitchener) Date: Tue, 12 Mar 2002 13:52:43 -0700 Subject: [Coldstuff] ColdDark Instant Crash References: <20020221131253.A15450@mojo.cold.org> <20020221211909.9006.qmail@web14503.mail.yahoo.com> <20020221172222.B16889@mojo.cold.org> <20020312202757.GC10913@prometheus> <3C8E68A7.3000604@cubik.org> <20020312203903.GE10913@prometheus> Message-ID: <3C8E6A9B.3020501@cubik.org> Michael Henry wrote: > Sorry, I forgot to be clear. > > It was emote all 3 times. That's interesting then. I haven't seen the code in ColdCore for emote in a while. Maybe it is using $string.format() or strfmt() now and there's a bug in that. Either way, that's easy to write a test case for. I'll look at it tonight hopefully. - Bruce From coldstuff@cold.org Wed Mar 13 00:35:04 2002 From: coldstuff@cold.org (Adam Cormany) Date: Tue, 12 Mar 2002 16:35:04 -0800 (PST) Subject: [Coldstuff] match_pattern Message-ID: <20020313003504.34698.qmail@web12807.mail.yahoo.com> Is there a way to do a match_pattern in a list? For example: I want to search for "fo*" in ["foo", "fooo", "fuh", fui"] Adam __________________________________________________ Do You Yahoo!? Try FREE Yahoo! Mail - the world's greatest free email! http://mail.yahoo.com/ From coldstuff@cold.org Wed Mar 13 08:00:25 2002 From: coldstuff@cold.org (Brad Roberts) Date: Wed, 13 Mar 2002 00:00:25 -0800 (PST) Subject: [Coldstuff] ColdDark Instant Crash In-Reply-To: <3C8E6A9B.3020501@cubik.org> Message-ID: I spent some time trying to reproduce this tonight both with 1.1.9a (basically 1.1.9 with some of the patches that went in to 1.1.10) and with the 1.2.x code that Bruce and I have been working on. No go.. I couldn't make emote crash. I asked derMike to also try to crash both versions and he was unable to also. I'm going to need more info on this.. a stack trace would be nice, access to a machine with the genesis binary, the source it was built from and core from an actual incident of the crash would be even better. Heck, a patch to fix the crash would be just dandy too, while I'm dreaming. Anyway.. I'd love to fix this but need more info since so far I'm not seeing the crash. Thanks, Brad On Tue, 12 Mar 2002, Bruce Mitchener wrote: > Date: Tue, 12 Mar 2002 13:52:43 -0700 > From: Bruce Mitchener > Reply-To: coldstuff@cold.org > To: coldstuff@cold.org > Subject: Re: [Coldstuff] ColdDark Instant Crash > > Michael Henry wrote: > > Sorry, I forgot to be clear. > > > > It was emote all 3 times. > > That's interesting then. > > I haven't seen the code in ColdCore for emote in a while. Maybe it is > using $string.format() or strfmt() now and there's a bug in that. > Either way, that's easy to write a test case for. > > I'll look at it tonight hopefully. > > - Bruce > > _______________________________________________ > Cold-Coldstuff mailing list > Cold-Coldstuff@cold.org > http://web.cold.org/mailman/listinfo/cold-coldstuff > From coldstuff@cold.org Wed Mar 13 17:21:40 2002 From: coldstuff@cold.org (Brandon Gillespie) Date: Wed, 13 Mar 2002 10:21:40 -0700 Subject: [Coldstuff] match_pattern In-Reply-To: <20020313003504.34698.qmail@web12807.mail.yahoo.com>; from acormany@yahoo.com on Tue, Mar 12, 2002 at 04:35:04PM -0800 References: <20020313003504.34698.qmail@web12807.mail.yahoo.com> Message-ID: <20020313102140.C28450@mojo.cold.org> On Tue, Mar 12, 2002 at 04:35:04PM -0800, Adam Cormany wrote: > Is there a way to do a match_pattern in a list? > > For example: > I want to search for "fo*" in ["foo", "fooo", "fuh", > fui"] Just iterate the list--there are several ways you could handle it. first-match, best match, all matches, etc. Something like (for a first-match iteration): for s in (list) { if ((m = match_pattern(s, pattern)) { return m; } } -Brandon Gillespie From coldstuff@cold.org Fri Mar 15 04:37:40 2002 From: coldstuff@cold.org (Christine Hall) Date: Fri, 15 Mar 2002 12:37:40 +0800 Subject: [Coldstuff] WEB.COLD.ORG Message-ID: <200203151830.g2FIUME24832@ns5.trafficmagnet.net> This is a multi-part message in MIME format --96e6666a-3912-4c4e-a577-dcea14816da2 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
Hi

I visited WEB.COLD.ORG, = and noticed that you're not listed on some search engines! I think we can = offer you a service which can help you increase traffic and the number of = visitors to your website.

I would like to introduce you to TrafficMagnet.net. We offer a unique = technology that will submit your website to over 300,000 search engines and = directories every month.


You'll be surprised by the low cost, and by how effective this website = promotion method can be.

To find out more about TrafficMagnet and the cost for submitting your = website to over 300,000 search engines and directories, visit www.TrafficMagnet.net.

I would love to hear from you.


Best Regards,

Christine Hall
Sales and Marketing
E-mail: christine@trafficmagnet.net
http://www.TrafficMagnet.net
--96e6666a-3912-4c4e-a577-dcea14816da2-- From coldstuff@cold.org Fri Mar 15 09:53:45 2002 From: coldstuff@cold.org (Jean-Christophe Brouze) Date: Fri, 15 Mar 2002 10:53:45 +0100 (CET) Subject: [Coldstuff] WEB.COLD.ORG In-Reply-To: <200203151830.g2FIUME24832@ns5.trafficmagnet.net> Message-ID: Hi Cold team, do you know this Christine Hall? your address was in the 'reply-to' field of that message; best regards. On Fri, 15 Mar 2002, Christine Hall wrote: > Hi > > I visited WEB.COLD.ORG, and noticed that you're not listed on some search > engines! I think we can offer you a service which can help you increase > traffic and the number of visitors to your website. > > I would like to introduce you to TrafficMagnet.net. We offer a unique > technology that will submit your website to over 300,000 search engines > and directories every month. > > [logo.gif] [gki.jpg] [signup.gif] > You'll be surprised by the low cost, and by how effective this website > promotion method can be. > > To find out more about TrafficMagnet and the cost for submitting your > website to over 300,000 search engines and directories, visit > www.TrafficMagnet.net. > > I would love to hear from you. > > > Best Regards, > > Christine Hall > Sales and Marketing > E-mail: christine@trafficmagnet.net > http://www.TrafficMagnet.net > -- Email address: jcb@core.auteurs-associes.com -- Jean-Christophe BROUZE - Auteurs & Associés http://auteurs-associes.com:443/~Jean-Christ/ http://auteurs-associes.com/ Phone: 33-4-50-75-26-01 - Natel: 33-6-60-37-74-01 From coldstuff@cold.org Fri Mar 15 13:14:26 2002 From: coldstuff@cold.org (Bruce Mitchener) Date: Fri, 15 Mar 2002 07:14:26 -0600 Subject: [Coldstuff] WEB.COLD.ORG References: Message-ID: <3C91F3B2.9090800@cubik.org> Jean-Christophe Brouze wrote: > Hi Cold team, > > do you know this Christine Hall? > your address was in the 'reply-to' field of that message; It was just a piece of spam that went out over the list. I guess Brandon doesn't have it set up so that non-subscribers can't post. :) - Bruce From coldstuff@cold.org Fri Mar 15 14:25:50 2002 From: coldstuff@cold.org (Grimslayde) Date: Fri, 15 Mar 2002 08:25:50 -0600 Subject: [Coldstuff] WEB.COLD.ORG References: <3C91F3B2.9090800@cubik.org> Message-ID: <000d01c1cc2d$4fc74aa0$9e0c060a@ACROFT2K> Yeah, but how can you NOT be enticed by that powerful diagram?! I was hooked the moment I saw that cool magnet. Did you SEE how those people just started STICKING to the site? Wow. That's cool. What a great marketing scheme... I'm gonna go buy one of those horseshoe magnets RIGHT NOW and see about hooking it up to my server, right after I talk to this fellow on the phone about that multi-level marketing thing endorsed by Sally Struthers. - Grim ----- Original Message ----- From: "Bruce Mitchener" To: Sent: Friday, March 15, 2002 7:14 AM Subject: Re: [Coldstuff] WEB.COLD.ORG > Jean-Christophe Brouze wrote: > > Hi Cold team, > > > > do you know this Christine Hall? > > your address was in the 'reply-to' field of that message; > > It was just a piece of spam that went out over the list. > > I guess Brandon doesn't have it set up so that non-subscribers can't > post. :) > > - Bruce > > _______________________________________________ > Cold-Coldstuff mailing list > Cold-Coldstuff@cold.org > http://web.cold.org/mailman/listinfo/cold-coldstuff > From coldstuff@cold.org Fri Mar 15 14:41:50 2002 From: coldstuff@cold.org (Aldon Hynes) Date: Fri, 15 Mar 2002 09:41:50 -0500 Subject: [Coldstuff] WEB.COLD.ORG In-Reply-To: <000d01c1cc2d$4fc74aa0$9e0c060a@ACROFT2K> Message-ID: Heh. I like the idea of using magnets. Maybe we can get a bunch of magnets for Linda to use to hold down her floppy disks! The other side of it is sending a response saying, well, if you found this site, already we have too many people finding the site. Aldon -----Original Message----- From: cold-coldstuff-admin@cold.org [mailto:cold-coldstuff-admin@cold.org]On Behalf Of Grimslayde Sent: Friday, March 15, 2002 9:26 AM To: coldstuff@cold.org Subject: Re: [Coldstuff] WEB.COLD.ORG Yeah, but how can you NOT be enticed by that powerful diagram?! I was hooked the moment I saw that cool magnet. Did you SEE how those people just started STICKING to the site? Wow. That's cool. What a great marketing scheme... I'm gonna go buy one of those horseshoe magnets RIGHT NOW and see about hooking it up to my server, right after I talk to this fellow on the phone about that multi-level marketing thing endorsed by Sally Struthers. - Grim ----- Original Message ----- From: "Bruce Mitchener" To: Sent: Friday, March 15, 2002 7:14 AM Subject: Re: [Coldstuff] WEB.COLD.ORG > Jean-Christophe Brouze wrote: > > Hi Cold team, > > > > do you know this Christine Hall? > > your address was in the 'reply-to' field of that message; > > It was just a piece of spam that went out over the list. > > I guess Brandon doesn't have it set up so that non-subscribers can't > post. :) > > - Bruce > > _______________________________________________ > 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 coldstuff@cold.org Mon Mar 18 18:55:43 2002 From: coldstuff@cold.org (Adam Cormany) Date: Mon, 18 Mar 2002 10:55:43 -0800 (PST) Subject: [Coldstuff] regexp revisited Message-ID: <20020318185543.46777.qmail@web12806.mail.yahoo.com> A few months ago I asked for help on a regexp issue I was having. Brandon attempted to help and had my problem 90% corrected, but I'm still running into problems with it. Hopefully this time I can get it solved for good:) I want to check a string for "{" or "{a", "{b", "{c" .. "{z", but I don't want to find "{a}", "{b}", "{c}" .. "{z}". How can I achieve this on cold with its regexp? Or is there a better way of doing this? The reason why I'm doing this is I want to find the above occurrences and change them from "{a" to "\{a". I don't want to touch the "{a}" since they are tags. I want to be able to do this globally through the string so if a string has something like: This { is only {a test {b}. it would translate it to This \{ is only a \{a test {b}. I'm doing this all for color. $compiler.parse_string_new called from $compiler.compile_cml doesn't like unclosed tags, as it sees "{a". Brandon suggested this: strsed("asdf{a} bcd", "({[^}]+[^}])", "\\%1"); but it's not working correctly. Any ideas or suggestions? Thanks for all your help, Adam __________________________________________________ Do You Yahoo!? Yahoo! Sports - live college hoops coverage http://sports.yahoo.com/ From coldstuff@cold.org Mon Mar 18 21:29:32 2002 From: coldstuff@cold.org (Bruce Mitchener) Date: Mon, 18 Mar 2002 14:29:32 -0700 Subject: [Coldstuff] regexp revisited References: <20020318185543.46777.qmail@web12806.mail.yahoo.com> Message-ID: <3C965C3C.9070100@cubik.org> Adam Cormany wrote: > A few months ago I asked for help on a regexp issue I > was having. Brandon attempted to help and had my > problem 90% corrected, but I'm still running into > problems with it. Hopefully this time I can get it > solved for good:) > > I want to check a string for "{" or "{a", "{b", "{c" > .. "{z", but I don't want to find "{a}", "{b}", "{c}" > .. "{z}". How can I achieve this on cold with its > regexp? Or is there a better way of doing this? If I couldn't get that to work directly, I'd probably take an approach using $string.global_regexp() (poor name) to divide the original string into fragments where the odd fragments don't match the regexp and the even ones do. Then you'd know that you need to process the odd ones to do the replace of { with \{. It sucks more, is less efficient, etc. But it also works. :) - Bruce From coldstuff@cold.org Fri Mar 22 02:05:56 2002 From: coldstuff@cold.org (coldstuff@cold.org) Date: Thu, 21 Mar 2002 21:05:56 -0500 Subject: [Coldstuff] set_method_access bug in genesis Message-ID: <20020321210556.A17342@aura.teferi.yi.org> There's a bug in set_method_access in Genesis which is causing errors to propagate incorrectly: ;catch any { catch any { .set_method_access('bad_method_name, 'bad_access_type); } with { return 'should_get_this; } } with { return 'should_not_get_this; } => 'should_not_get_this The problem is that COLDC_FUNC(set_method_access) in ops/object.c will call cthrow() twice if you supply both a bad method name and a bad access type. I'd assume a fix would be as simple as replacing the cthrow()s with THROW()s, although somebody who's more familiar with Genesis should verify this as I'm not sure why the non-returning cthrow() is ever used in the first place. From coldstuff@cold.org Fri Mar 22 03:11:51 2002 From: coldstuff@cold.org (Brad Roberts) Date: Thu, 21 Mar 2002 19:11:51 -0800 (PST) Subject: [Coldstuff] set_method_access bug in genesis In-Reply-To: <20020321210556.A17342@aura.teferi.yi.org> Message-ID: You're correct, both of those cthrows() should be turned into THROW()s. Index: object.c =================================================================== RCS file: /cvsroot/cold/genesis/src/ops/object.c,v retrieving revision 1.22.2.1 diff -u -r1.22.2.1 object.c --- object.c 10 Jan 2002 03:39:39 -0000 1.22.2.1 +++ object.c 22 Mar 2002 03:07:54 -0000 @@ -399,12 +399,12 @@ else if (sym == frob_id) access = MS_FROB; else - cthrow(type_id, "Invalid method access flag."); + THROW((type_id, "Invalid method access flag.")); access = object_set_method_access(cur_frame->object, SYM1, access); if (access == -1) - cthrow(type_id, "Method %I not found.", SYM1); + THROW((type_id, "Method %I not found.", SYM1)); pop(2); push_int(access); This diff is against 1.1.9, but it should apply fine to 1.1.10 also. I've not extensively (ok, I ran the test suite, which doesn't actually test set method access at all). But I'm 99.9% sure this is the right thing to do. I'll make sure that Bruce includes this in 1.1.11 when he puts it out. Good catch. Also, worth noting that, if my memory holds correctly, nested catches in the same method doesn't work. Or is it that a throw() won't be caught by the catch block that it's in? I forget exactly and don't have time right now to try a few tests to remind myself what the issue is. Later, Brad On Thu, 21 Mar 2002 pvx@wmute.net wrote: > Date: Thu, 21 Mar 2002 21:05:56 -0500 > From: pvx@wmute.net > Reply-To: coldstuff@cold.org > To: cold-coldstuff@cold.org > Subject: [Coldstuff] set_method_access bug in genesis > > There's a bug in set_method_access in Genesis which is causing errors to propagate incorrectly: > > ;catch any { catch any { .set_method_access('bad_method_name, 'bad_access_type); } with { return 'should_get_this; } } with { return 'should_not_get_this; } > => 'should_not_get_this > > The problem is that COLDC_FUNC(set_method_access) in ops/object.c will call cthrow() twice if you supply both a bad method name and a bad access type. I'd assume a fix would be as simple as replacing the cthrow()s with THROW()s, although somebody who's more familiar with Genesis should verify this as I'm not sure why the non-returning cthrow() is ever used in the first place. > _______________________________________________ > Cold-Coldstuff mailing list > Cold-Coldstuff@cold.org > http://web.cold.org/mailman/listinfo/cold-coldstuff > From coldstuff@cold.org Fri Mar 22 03:11:51 2002 From: coldstuff@cold.org (Brad Roberts) Date: Thu, 21 Mar 2002 19:11:51 -0800 (PST) Subject: [Coldstuff] set_method_access bug in genesis In-Reply-To: <20020321210556.A17342@aura.teferi.yi.org> Message-ID: You're correct, both of those cthrows() should be turned into THROW()s. Index: object.c =================================================================== RCS file: /cvsroot/cold/genesis/src/ops/object.c,v retrieving revision 1.22.2.1 diff -u -r1.22.2.1 object.c --- object.c 10 Jan 2002 03:39:39 -0000 1.22.2.1 +++ object.c 22 Mar 2002 03:07:54 -0000 @@ -399,12 +399,12 @@ else if (sym == frob_id) access = MS_FROB; else - cthrow(type_id, "Invalid method access flag."); + THROW((type_id, "Invalid method access flag.")); access = object_set_method_access(cur_frame->object, SYM1, access); if (access == -1) - cthrow(type_id, "Method %I not found.", SYM1); + THROW((type_id, "Method %I not found.", SYM1)); pop(2); push_int(access); This diff is against 1.1.9, but it should apply fine to 1.1.10 also. I've not extensively (ok, I ran the test suite, which doesn't actually test set method access at all). But I'm 99.9% sure this is the right thing to do. I'll make sure that Bruce includes this in 1.1.11 when he puts it out. Good catch. Also, worth noting that, if my memory holds correctly, nested catches in the same method doesn't work. Or is it that a throw() won't be caught by the catch block that it's in? I forget exactly and don't have time right now to try a few tests to remind myself what the issue is. Later, Brad On Thu, 21 Mar 2002 pvx@wmute.net wrote: > Date: Thu, 21 Mar 2002 21:05:56 -0500 > From: pvx@wmute.net > Reply-To: coldstuff@cold.org > To: cold-coldstuff@cold.org > Subject: [Coldstuff] set_method_access bug in genesis > > There's a bug in set_method_access in Genesis which is causing errors to propagate incorrectly: > > ;catch any { catch any { .set_method_access('bad_method_name, 'bad_access_type); } with { return 'should_get_this; } } with { return 'should_not_get_this; } > => 'should_not_get_this > > The problem is that COLDC_FUNC(set_method_access) in ops/object.c will call cthrow() twice if you supply both a bad method name and a bad access type. I'd assume a fix would be as simple as replacing the cthrow()s with THROW()s, although somebody who's more familiar with Genesis should verify this as I'm not sure why the non-returning cthrow() is ever used in the first place. > _______________________________________________ > Cold-Coldstuff mailing list > Cold-Coldstuff@cold.org > http://web.cold.org/mailman/listinfo/cold-coldstuff > From coldstuff@cold.org Thu Mar 28 02:18:54 2002 From: coldstuff@cold.org (Michael Mudge) Date: Wed, 27 Mar 2002 21:18:54 -0500 Subject: [Coldstuff] Bugs in Genesis... Message-ID: <3CA27D8E.B64616A7@mudge.com> Can anyone else reproduce this bug? ;`[a,b] in `[anythings, a, a] => Some very large number (or a driver crash) For example: ;`[1,2] in [7,8,9,1,1] I believe I encountered this same bug in bufidx() a few driver versions ago (which was fixed), and didn't realize it impacted the 'in' operator as well... - Kipp From coldstuff@cold.org Thu Mar 28 03:34:03 2002 From: coldstuff@cold.org (Allen Noe) Date: Wed, 27 Mar 2002 21:34:03 -0600 Subject: [Coldstuff] Bugs in Genesis... References: <3CA27D8E.B64616A7@mudge.com> Message-ID: <3CA28F2B.B587E0CA@usit.net> This is a multi-part message in MIME format. --------------99FDBD3E41C7844E9E401668 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Michael Mudge wrote: > > Can anyone else reproduce this bug? > > ;`[a,b] in `[anythings, a, a] > => Some very large number (or a driver crash) Looks like this is the bufidx bug fixed in 1.1.8. Here's a patch to make op_in use buffer_index instead of reimplementing the old version of it. Should work, but untested. --------------99FDBD3E41C7844E9E401668 Content-Type: text/plain; charset=us-ascii; name="in.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="in.patch" --- Genesis-1.1.10-STABLE/src/ops/operators.c Wed Jan 9 23:30:11 2002 +++ Genesis-1.1.10-STABLE/src/ops/operators.c.new Wed Mar 27 21:27:11 2002 @@ -2276,26 +2276,11 @@ if (s) pos = s - buf->s; } else if (d1->type == BUFFER) { - uchar * p, - * ss = d1->u.buffer->s; - int slen = d1->u.buffer->len, - len = buf->len; + uchar * ss = d1->u.buffer->s; + int slen = d1->u.buffer->len; + + pos = buffer_index(buf, ss, slen, 1) - 1; - s = buf->s; - p = (uchar *) memchr(s, *ss, len); - if (slen == 1) { - pos = p ? (p - s) : -1; - } else { - slen--; - while (p) { - if (MEMCMP(p + 1, ss + 1, slen) == 0) { - pos = (p - s); - break; - } - len -= (p - s) + 1; - p = (uchar *) memchr(p + 1, *ss, len); - } - } } else goto error; --------------99FDBD3E41C7844E9E401668-- From coldstuff@cold.org Thu Mar 28 06:58:14 2002 From: coldstuff@cold.org (Bruce Mitchener) Date: Thu, 28 Mar 2002 00:58:14 -0600 Subject: [Coldstuff] Bugs in Genesis... References: <3CA27D8E.B64616A7@mudge.com> <3CA28F2B.B587E0CA@usit.net> Message-ID: <3CA2BF06.3020600@cubik.org> How about someone send me a tested patch along with a patch for the tests to help prevent this sort of thing from happening again? (And really, these days, all patches should have accompanying tests for the test suite or I'm significantly less inclined to accept them. Patches to add tests are ALWAYS welcome and would be a great way to get used to the idea that you can and should contribute to the Cold community. :) ) Thanks, - Bruce Allen Noe wrote: > Michael Mudge wrote: > >>Can anyone else reproduce this bug? >> >>;`[a,b] in `[anythings, a, a] >>=> Some very large number (or a driver crash) >> > > Looks like this is the bufidx bug fixed in 1.1.8. > > Here's a patch to make op_in use buffer_index instead of reimplementing the old > version of it. Should work, but untested. > > > ------------------------------------------------------------------------ > > --- Genesis-1.1.10-STABLE/src/ops/operators.c Wed Jan 9 23:30:11 2002 > +++ Genesis-1.1.10-STABLE/src/ops/operators.c.new Wed Mar 27 21:27:11 2002 > @@ -2276,26 +2276,11 @@ > if (s) > pos = s - buf->s; > } else if (d1->type == BUFFER) { > - uchar * p, > - * ss = d1->u.buffer->s; > - int slen = d1->u.buffer->len, > - len = buf->len; > + uchar * ss = d1->u.buffer->s; > + int slen = d1->u.buffer->len; > + > + pos = buffer_index(buf, ss, slen, 1) - 1; > > - s = buf->s; > - p = (uchar *) memchr(s, *ss, len); > - if (slen == 1) { > - pos = p ? (p - s) : -1; > - } else { > - slen--; > - while (p) { > - if (MEMCMP(p + 1, ss + 1, slen) == 0) { > - pos = (p - s); > - break; > - } > - len -= (p - s) + 1; > - p = (uchar *) memchr(p + 1, *ss, len); > - } > - } > } else > goto error; > > From coldstuff@cold.org Thu Mar 28 07:05:08 2002 From: coldstuff@cold.org (Bruce Mitchener) Date: Thu, 28 Mar 2002 01:05:08 -0600 Subject: [Coldstuff] Bugs in Genesis... References: <3CA27D8E.B64616A7@mudge.com> <3CA28F2B.B587E0CA@usit.net> <3CA2BF06.3020600@cubik.org> Message-ID: <3CA2C0A4.401@cubik.org> Hey, how about I stop being a loser and holding off on Genesis releases for ages and ages? Maybe that would help encourage more patches for things. I'm terribly busy after being in San Jose last week for a conference, so, let's think about a 1.1.11 by sometime in April? And maybe even a 1.2.0 too. Yeah. - Bruce Bruce Mitchener wrote: > How about someone send me a tested patch along with a patch for the > tests to help prevent this sort of thing from happening again? > > (And really, these days, all patches should have accompanying tests for > the test suite or I'm significantly less inclined to accept them. > Patches to add tests are ALWAYS welcome and would be a great way to get > used to the idea that you can and should contribute to the Cold > community. :) ) From coldstuff@cold.org Thu Mar 28 07:18:25 2002 From: coldstuff@cold.org (Allen Noe) Date: Thu, 28 Mar 2002 01:18:25 -0600 Subject: [Coldstuff] Bugs in Genesis... References: <3CA27D8E.B64616A7@mudge.com> <3CA28F2B.B587E0CA@usit.net> <3CA2BF06.3020600@cubik.org> Message-ID: <3CA2C3C1.D77EBF09@usit.net> This is a multi-part message in MIME format. --------------A0B41C81C4E41DA0C3240539 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Bruce Mitchener wrote: > > How about someone send me a tested patch along with a patch for the > tests to help prevent this sort of thing from happening again? OK, here's a testcase. I still wouldn't call the patch tested, but it makes coldcc not segfault when compiling test.in. --------------A0B41C81C4E41DA0C3240539 Content-Type: text/plain; charset=us-ascii; name="test.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="test.patch" --- test/test.in.old Wed Jan 9 23:30:11 2002 +++ test/test.in Thu Mar 28 01:10:17 2002 @@ -682,6 +682,7 @@ "am" in "llama" ==> 3 "bc" in "llama" ==> 0 4 in 'foo ==> ~type + `[10, 13] in `[10, 10] ==> 0 Logic 1 && 1 ==> 1 1 && 0 ==> 0 @@ -773,6 +774,7 @@ dblog(" \"am\" in \"llama\" ==> " + toliteral("am" in "llama")); dblog(" \"bc\" in \"llama\" ==> " + toliteral("bc" in "llama")); dblog(" 4 in 'foo ==> " + toliteral((| 4 in 'foo |))); + dblog(" `[10, 13] in `[10, 10] ==> " + toliteral((| `[10, 13] in `[10, 10] |))); dblog(" Logic"); dblog(" 1 && 1 ==> " + toliteral(1 && 1)); dblog(" 1 && 0 ==> " + toliteral(1 && 0)); --------------A0B41C81C4E41DA0C3240539-- From coldstuff@cold.org Thu Mar 28 07:38:49 2002 From: coldstuff@cold.org (Bruce Mitchener) Date: Thu, 28 Mar 2002 01:38:49 -0600 Subject: [Coldstuff] Bugs in Genesis... References: <3CA27D8E.B64616A7@mudge.com> <3CA28F2B.B587E0CA@usit.net> <3CA2BF06.3020600@cubik.org> <3CA2C3C1.D77EBF09@usit.net> Message-ID: <3CA2C889.6050501@cubik.org> Allen Noe wrote: > Bruce Mitchener wrote: > >>How about someone send me a tested patch along with a patch for the >>tests to help prevent this sort of thing from happening again? >> > > OK, here's a testcase. I still wouldn't call the patch tested, but it makes > coldcc not segfault when compiling test.in. Thanks. You might check out Valgrind sometime. Pretty nice tool, kinda like Purify, but free and has no GUI: http://developer.kde.org/~sewardj/ (But the site seems to be randomly down, including right now.) Oh yeah, and it is really really slow. Expect your app to run 50-100 times slower. :) - Bruce From coldstuff@cold.org Thu Mar 28 09:31:44 2002 From: coldstuff@cold.org (Allen Noe) Date: Thu, 28 Mar 2002 03:31:44 -0600 Subject: [Coldstuff] vm_task bug? Message-ID: <3CA2E300.87685B06@usit.net> I've been testing a few things, trying to find a bug that may be related to open_connection, and I stumbled on something that may be a bug in the way vm_task does its driver-method calls. Core: object $sys; public method .startup() { arg @args; dblog("startup tid=" + toliteral(task_id())); open_connection("127.0.0.1", 42); suspend(); dblog("done"); shutdown(); }; public method .failed() { arg @args; dblog("failed tid=" + toliteral(task_id())); dblog("failed: " + toliteral(args)); resume(args[1]); dblog("out of resume"); }; Output: [...] Calling $sys.startup([])... startup tid=1 failed tid=1 failed: [1, ~refused] out of resume And it hangs here until I kill it. I traced genesis with gdb and it looks like vm_resume is noticing that task_id is the same as the TID it's being asked to resume, and just returns. The startup task just sits suspended forever. So I looked around the code a little, and copied the task_id = next_task_id++; line in vm_task() up to just after the first if, ran it again, and got this output: [...] Calling $sys.startup([])... startup tid=1 failed tid=3 failed: [1, ~refused] done out of resume This time it shuts down. So is this a bug? If it is, what would the best way to fix it be? From coldstuff@cold.org Thu Mar 28 09:54:21 2002 From: coldstuff@cold.org (Brad Roberts) Date: Thu, 28 Mar 2002 01:54:21 -0800 (PST) Subject: [Coldstuff] vm_task bug? In-Reply-To: <3CA2E300.87685B06@usit.net> Message-ID: Quick question, does this happen for any driver initiated method call or just $sys.startup()? $sys.startup() is a little special in that the engine isn't fully up and running the main loop yet, so its going to have trouble suspending. I suspect you are right in that a driver initiated task can't suspend at all. While it'd be an unfortunatly limitation, do you need to do this for any reason other than trying to track down some other potential bug? Of hand, I'm not sure there's a quick fix for letting them suspend. I really want to really overhaul the vm system to make it cleaner, the code is really a lot more complicated than it needs to be. Maybe I can address this problem then, but off the top of my head, driver method call suspension would be tricky. Not nearly as tricky as having a mechanism for builtin's and native's calling back into an $object.method() call, though. I want that to be doable at some point also. An example, and not necessairily a great one (give me a break, its 2am), would be to have tracebacks call $sys.traceback() or something along those lines. Later, Brad On Thu, 28 Mar 2002, Allen Noe wrote: > Date: Thu, 28 Mar 2002 03:31:44 -0600 > From: Allen Noe > Reply-To: coldstuff@cold.org > To: coldstuff@cold.org > Subject: [Coldstuff] vm_task bug? > > I've been testing a few things, trying to find a bug that may be related to > open_connection, and I stumbled on something that may be a bug in the way > vm_task does its driver-method calls. > > Core: > > object $sys; > > public method .startup() { > arg @args; > > dblog("startup tid=" + toliteral(task_id())); > open_connection("127.0.0.1", 42); > suspend(); > dblog("done"); > shutdown(); > }; > > public method .failed() { > arg @args; > > dblog("failed tid=" + toliteral(task_id())); > dblog("failed: " + toliteral(args)); > resume(args[1]); > dblog("out of resume"); > }; > > Output: > > [...] > Calling $sys.startup([])... > startup tid=1 > failed tid=1 > failed: [1, ~refused] > out of resume > > And it hangs here until I kill it. I traced genesis with gdb and it looks like > vm_resume is noticing that task_id is the same as the TID it's being asked to > resume, and just returns. The startup task just sits suspended forever. > > So I looked around the code a little, and copied the task_id = next_task_id++; > line in vm_task() up to just after the first if, ran it again, and got this > output: > > [...] > Calling $sys.startup([])... > startup tid=1 > failed tid=3 > failed: [1, ~refused] > done > out of resume > > This time it shuts down. So is this a bug? If it is, what would the best way to > fix it be? > _______________________________________________ > Cold-Coldstuff mailing list > Cold-Coldstuff@cold.org > http://web.cold.org/mailman/listinfo/cold-coldstuff > From coldstuff@cold.org Thu Mar 28 18:54:56 2002 From: coldstuff@cold.org (Allen Noe) Date: Thu, 28 Mar 2002 12:54:56 -0600 Subject: [Coldstuff] vm_task bug? References: Message-ID: <3CA36700.AE436454@usit.net> This is a multi-part message in MIME format. --------------60463A364E678E6688F2ACF6 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Well, I've done some more experiments and found that whatever the second method called by the driver is, it's going to have a TID of 1, just like startup. So, I guess it's not really much of a bug, just change the initial value of next_task_id to 2. I was thinking that maybe vm_task would be running methods with the TID of the last method to run, but that doesn't appear to be the case. --------------60463A364E678E6688F2ACF6 Content-Type: text/plain; charset=us-ascii; name="next_task_id.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="next_task_id.patch" --- Genesis-1.1.10-STABLE/src/execute.c Thu Mar 28 12:36:30 2002 +++ Genesis-1.1.10-STABLE/src/execute.c.new Thu Mar 28 12:42:44 2002 @@ -34,7 +34,7 @@ Int stack_pos, stack_size; Int *arg_starts, arg_pos, arg_size; Long task_id=1; -Long next_task_id=1; +Long next_task_id=2; Long call_environ=1; Long tick; --------------60463A364E678E6688F2ACF6--