[DGD] getting started with DGD

Jeff Moore jeff at procata.com
Sat Mar 13 12:07:16 CET 2004


On Mar 13, 2004, at 2:52 AM, Noah Gibbs wrote:

>> Which function searches one string for another or find
>> the position of an element in an array?
>
>   You can search one string for another using "explode" if you're
> clever.  Or with parse_string.  The position of an element in an array
> is just going to require you to use a for() loop.

Wow.  these seem like fairly basic things.  Its like the three bears.  
for() is too low level (papa bear), parse_string is too high level 
(mama bear), and using explode for string search sounds the the crazy 
uncle bear that nobody wants to talk about.  :)

>> Is there a way to get a slice based on the end of a string, but not
>> using strlen.  something like [0..<1]?
>
>   Nope.  There's old stuff about this in the mailing list archives if
> you go look.

I found it.  Thanks.  I'm a bit surprised at how little DGD supplies in 
terms of array and string manipulation.  I can understand leaving 
things like inventory or player out of the driver, but I can hardly 
think of a network application that doesn't need to slice and dice a 
bunch of strings.

Doesn't pretty much every one end up having to write their own 
proprietary string library?

Thanks for the pointers.  I found everything I needed right where you 
said it would be.  :)

I'll have to look more closely a the recompile in place.  This is one 
of the things that interested me about DGD in the first place.  Is it 
possible to reach a dead end with your mud state where there is 
something that cannot be repaired without restarting?

(BTW, The empty AUTO file in phantasmal really confused me at first.)

Thanks,
Jeff

_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list