Re: Storing data and code in a Db with LISP-like interface

From: Bill Atkins <>
Date: Sat, 01 Apr 2006 15:49:32 -0500
Message-ID: <>

"Neo" <> writes:

>> ... Not only should the function work for data entered
>> prior to writing the function but also for new data
>> entered after the function is written.
> Below script provides a further example of the above. Suppose we want
> the name whose symbol string is currently 'employe' to also have the
> symbol string 'employee' (note the additional 'e' at end). Will the
> original db, schema and user-defined function still work? See below:
> // Allow existing name whose symbol string is 'employe'
> // to have a second symbol string 'employee'.
> (create (and (select name instance *)
> (select * symbol 'employe')
> )
> symbol
> 'employee'
> )

Use standard style - don't put closing parentheses on their own lines and use hyphens instead of the accursed camel case.

> // Verify getRoot function works with employe and employee.
> // Both of the following display eve !!!
> (msgbox (getRoot employe adam))
> (msgbox (getRoot employee adam))
> Note that in the above expressions, employe is translated by parser
> into:
> (firstNode (select * name (firstNode (select * symbol (select 'e' 'm'
> 'p' 'l' 'o' 'y' 'e')))))

Does this even compile? If you want to refer to a specific character, use #\x where x is the character. But the question remains: why are you passing in each character of a word separately?

> And employee is translated by parser into:
> (firstNode (select * name (firstNode (select * symbol (select 'e' 'm'
> 'p' 'l' 'o' 'y' 'e' 'e')))))
> Both of the above queries find the same verb instance whose name has
> two similar symbol strings.

Your code is not very idiomatic, and is downright baffling at times, e.g.:

 (create (it) name (findElseCreate name instance 'accord'))

I have no idea what this means (and to be perfectly frank, no real interest in finding out). Received on Sat Apr 01 2006 - 22:49:32 CEST

Original text of this message