[DGD] Dgd thread safety
Noah Gibbs
noah_gibbs at yahoo.com
Tue Oct 11 23:20:01 CEST 2005
--- Josh Cassell <jcassell at microsoft.com> wrote:
> The one question I still have from this is whether calling a function in
> an object could lead to thread conflict if no state is changed in the
> object itself,
Don't know the answer to this one. Anybody? Dworkin?
> stripped down version of the kernel lib
> for exploring performance and timing stuff.
There's no reason to strip down the Kernel Library itself for real use. I'd
recommend keeping it as thoroughly intact as possible - that way you won't have
problems when Dworkin upgrades DGD. Very often, the Kernel library shields you
from the API changes. You can find *plenty* of discussion on this on the
mailing list, but fundementally: please don't change the Kernel Library.
You'll cause yourself upgrade headaches if you do, and there's no real reason
to. Also, we'll have an easier time helping you with your problems if they
can't be specific to changes you've made to the Kernel.
> Btw sorry to go off topic, but why is there no built in support for
> regular expressions in Dgd? Is this because the parse_string and sscanf
> are plenty fast and could cover anything you could need?
Yup.
> Also using strings for bit manipulation is a bit strange feeling
You can also use ASNs. DGD supports unlimited-length numbers natively, and
they're a fine way to do bit manipulation if you need a very large number of
bits.
Or if you just need a few bits - use ints. DGD has no 'char' or 'byte' type,
we just use ints. They serve as well in DGD as in regular C, and with the same
rules and operators.
> My next project is to go through the parse_string code in the dgd source
> in an effort to figure out exactly what syntax of regular expressions
> are supported.
There's a lot on the mailing list about parse_string, and a couple of web
sites, including mine
(http://phantasmal.sourceforge.net/DGD/Programming/Parse_String.html). You can
also autogenerate parse_string grammars for regexps if you need to. It's
pretty easy to autogenerate parse_string grammars. If you need an example,
Phantasmal does so for its (currently unused) ParseD.
> The phantasmal mudlib has been a major tutor whenever I have had
> questions about how things are done and how to do stuff.
Thanks! I was doing something similar with a hybrid C/Perl MUD server, with
similar problems and much rewriting when I found DGD. That's actually how my
web site originated... I was looking for pretty much the same thing, but it
didn't exist until I wrote it :-)
You're more than welcome.
__________________________________
Yahoo! Music Unlimited
Access over 1 million songs. Try it free.
http://music.yahoo.com/unlimited/
More information about the DGD
mailing list