Re: Resiliency To New Data Requirements

From: Neo <neo55592_at_hotmail.com>
Date: 6 Aug 2006 14:07:10 -0700
Message-ID: <1154898430.343257.34540_at_75g2000cwc.googlegroups.com>


> > (new 'bob 'sage)
> > (new 'on 'state)
> > (create bob state on)
>
> ... I really don't know what the results of those functions are.

In breif, new creates a new thing (node if you prefer) in the db to represent desired thing (ie bob, jayDee, neo, on, off, etc). In breif, create function creates a sentence using things that already exist in the db. A sentence indicates a relationship between things. In dbd, a sentence itself is a thing, thus it can be used in subsequent sentences.

Below is a more complete description of the new function from website:

Description:
The new function creates a new thing in the db. User calls the new function to represent desired thing (ie john, mary).

General Format:
(new ['name] ['class1] ['class2] ...)

where:
The first input names the new thing.
The second and remaining inputs specify the new thing's classes. If the specified classes do not exist, they is added and related as items of the class directory.

Examples:

(new)
(new 'john)
(new 'mary 'person)
(new 'bob 'person 'doctor)

The expression (new 'mary 'person) is shorthand for following, assuming the class person did not already exist:

(create (new) name (word+ 'mary))
(create (new) name (word+ 'person))
(create mary class person)
(create person instance mary)
(create clsDir item person)


> > (; Find sage's relationship to bob)
> > (; Finds instance)
> > (select sage * bob)
>
> See, the train really leaves the tracks here:
> what are those stars? (let along, what is that function?)

To understand, one needs to realize that the shorthand expression (new 'bob 'sage) earlier in the script included the expression (create sage instance bob). Thus query expression (select sage * bob) returns instance. Would any of the following alternate syntaxes be preferrable?

(select* sage * bob)

(select sage ? bob)
(select? sage ? bob)

(find sage ? bob)
(find? sage ? bob)

(get sage ? bob)
(get? sage ? bob)

> > (; Represent that classifications sages and jerks are opposites)
> > (new 'opposite 'verb)
> > (create sage opposite jerk)
> > (create jerk opposite sage)
>
> Say, what? Again with the new and create.

Same explanation of new and create functions above.

> And, from previous posts, I remember that verbs are relators;

In dbd, verb and relator are roughly equivalent.

> is verb a magic word?

No, but it is part of system data, meaning dbd added it in the db when the db was first initialized. www.dbfordummies.com/basic/SysData.asp

> Why were there no (new 'sage 'adj) and (new 'jerk 'adj) ...

Because, I interpretted sage and jerk as classifictions of jayDee, bob and neo rather than as adjectives based on Tutorial D example.

> ... and (new 'state 'noun) above?

Because I didn't see state classified as a noun in Tutorial D example.

> Do [you?] expect me to code:
> var opposite real relation {this char, that char} key {this, that} ;
> opposite += relation {
> tuple {this 'sage', that 'jerk},
> tuple {this 'jerk', that 'sage'} } ;
>
> Well, I won't. The values in such a relation correspond to the names of relation variables.

Ok, but I would still like to see Tutorial D's script to match dbd's extension of original example.

> [When does a design become self-aware? What critical threshold must be surpassed? Yes, you in the back; Seamode, is it?]

Hofstadter ponders the same point in his book "Gödel, Escher, Bach: an Eternal Golden Braid".

> ... But whether [sage and jerk are] antonyms ... doesn't have anything to do with what the database can deduce.

Ok, but I would still like to see Tutorial D's script to match dbd's extension of original example.

> > (; Find things whose classification is opposite of neo's)
> > (; Finds bob and jayDee)
> > (select (select (select neo class *) opposite *) instance *)
>
> Class? Instance?

See expanded expressions for the new function above. The shorthand expression (new 'neo 'jerk) expands to include the expressions (create jerk instance neo), (create neo class jerk), etc.

> > (create on opposite off)
> > (create off opposite on)
> >
> > (; Find things whose state is opposite of neo's)
> > (; Finds bob)
> > (select * state (select (select neo state *) opposite *))
>
> And here the train plunges into the abyss. I parse this as
> an expression comprised of the elements:
> ^ the function select and three inputs
> ^ a magic star
> ^ a noun
> ^ an expression comprised of
> ^ the function select and three inputs
> ^ an expression...
> ^ a verb
> ^
>
> but I have no way to interpret this.

One way to interpret the above dbd query is: (select * state X1) where X1 is (select X2 opposite *) where X2 is (select neo state *)

above simplifies to:
(select * state X1) where X1 is (select X2 opposite *) where X2 is off

above simplifies to:
(select * state X1) where X1 is (select off opposite *)

above simplifies to:
(select * state X1) where X1 is on

above simplifies to:
(select * state on)

above simplifies to:
bob

> Lets back up:
> nouns are _____.

Things.

> verbs are _____.

Things.

> adjectives are _____.

Things.

> function new takes two inputs and does _____.

The new function can take 0 to many inputs, see above. It create a thing in the db to represent desired thing (ie jayDee, bob, neo, etc).

> function create takes three inputs and does _____ yielding _____.

The create function can take 2 to many inputs and yields a sentence that represents the relationship between them.

> function select takes three inputs and does _____ yielding _____.

The select function can take 1 to many inputs. It normally returns the specified sentence. If one of the inputs is an asterisk, it return the thing in that position of the sentence.

> stars mean _____.

The asterisk lets the select function know which element of sentence to find/select/get.

Some of the above questions are answered in the following two areas of website:
www.dbfordummies.com/basic/thing.asp
www.dbfordummies.com/NLI/default.asp Received on Sun Aug 06 2006 - 23:07:10 CEST

Original text of this message