[Bese-devel] string to list riddle
Ties Stuij
cjstuij at gmail.com
Mon Jan 9 14:47:03 UTC 2006
I've got an absurd problem on my hands here that keeps me banging my
head against the wall. I was just wondering if i am coping here with
an obvious ucw environment misconception or that i am utterly
clueless.
The problem is this: i'm trying to tie norvig's elisa code to a
web-interface. I feed the output of a form into the eliza internals.
The minor problem here is that the form output is a string and eliza
expects a list of symbols. Norvig himself supplies a string-to-list
convertor and everything works fine in the repl. HOWEVER, when i try
this setup in a ucw page, the response is not recognized. I can play
with the list created with string-to-list all i want: making a list
out of the individual elements for example. it doens't matter, eliza
won't recognize the sequence. On the other hand, if i play with a list
a bit which was a list from the start, when i put it back together
again it WILL be recognized. So there is something inheritly different
about the string-to-list list. Mind you: only in the ucw environment.
I loosened every pattern-match comparison in eliza to equalp: no
change in the situation.
facts:
- if i feed the eliza accessor a list in the page it returns the expected result
- in the page the string is converted correctly to a list of symbols
- everything works fine in the repl
- but when on a page the list is converted by string-to-list and then
is being fed to eliza, it is not recognized by the patternmatcher
inside eliza
- i tried a couple of string-to-list convertors, all working
satisfactionally in the repl, on the page, but not recognized by eliza
on the page
The situation is utterly absurd. Can someone make me sane again?
Ties
ps: for reference, one of the string-to-list functions
(defun read-line-no-punct (input)
(read-from-string (concatenate 'string "(" input ")" )))
More information about the bese-devel
mailing list