| Newsgroups |
gmane.comp.ai.powerloom |
| Message-ID |
<[email protected]> |
>>>>> "TR" == Thomas Russ <[email protected]> writes:
TR> On Feb 10, 2006, at 4:21 PM, [email protected] wrote:
>>
>> Are there any published examples of how to use the power loom
>> interface from common-lisp?
>>
>> I am getting errors that I find somewhat confusing, but bet that an
>> example or two would just clear everything up....
TR> Hmmm. For the most part, the functions that appear in the manual
TR> should just work out of Common Lisp. The certainly do at the level
TR> of the read-eval-print loop. You do have to make sure that you
TR> are in the STELLA package, though.
[...snip...]
TR> So, I'm guessing that maybe the problem has more to do with calling
TR> this directly from code? Part of the issue when calling Stella
TR> directly from Lisp code is that Stella has its own symbols, which
TR> will not be correctly formed by the normal lisp reader.
Yes, taht is correct. I didn't understand about the Stella symbols
--- I read over the PowerLoom manual, but now I see it was a mistake
to skip the Stella manual.
TR> Normally what I do in those situations is to actually write Stella code
TR> instead of Common Lisp (it turns out that if you know Lisp, Stella is
TR> not that difficult to pick up) and then use the translation functions
TR> that are available at the top level to see what it would look like
TR> in Common Lisp. That function is call PTRANS (short for Print
TR> TRANSlation):
TR> ? (ptrans (pli/s-retrieve "all (animal ?x)" null null))
TR> (PLI::S-RETRIEVE "all (animal ?x)" STELLA::NULL-STRING NULL)
[...snip...]
TR> One other pitfall is that Stella's QUOTE is not the same as
TR> the one that the Lisp reader introduces, so anything involving
TR> quoted structure will need to be done a bit differently.
OK, am I correct in reading the above as an indirect suggestion to
avoid the API functions that use lists, in favor of strings?
--
Robert P. Goldman
Senior Scientist
Smart Information Flow Technologies (d/b/a SIFT, LLC)
211 N. First St., Suite 300
Minneapolis, MN 55401
Voice: (612) 384-3454
Email: [email protected]