Stevan Apter wrote:
> yes it does.
What does what? Please don't top-post.
>
> prompts:
>
> e"hi. i'm going to be your worst nightmare"
> e"i think you're full of it."
> e"my mother told me so."
> e"no. you tell me about yours."
> e"you're obviously retarded."
> e"damn your eyes!"
> e"understand a kick in the pants?"
> e"i always ignore idiots."
> e"i am afraid of dinosaurs"
>
> responses:
>
> "have you always been going to be my worst nightmare?
> "why do you think i am full of it?"
> "tell me about your mother."
> "please don't be so personal."
> "can you elaborate on that?"
> "can you elaborate on that?"
> "that's very interesting. do go on."
> "why do you always ignore idiots?"
> "have you always been afraid of dinosaurs?"
The K (not the Q) program was:
e:{$[(#b)=i:(|/'b:(w@[EMAIL PROTECTED]
(w:(`$" "\:x@[EMAIL PROTECTED]
in".?"))in`)in\:/:A)?1b;E@[EMAIL PROTECTED]
" "~n:c@[EMAIL PROTECTED]
(c:{x@[EMAIL PROTECTED]
i)ss/:N;c
.q.ssr[c;n;" "/:$(),P'(w[k],p:1_'(0,1+k:b[i]?1b)_`,w)"I"$n]]}
I don't see "you", "your", "my", "myself", "yourself", etc.
So how can it change "your" to "my"?
I was talking about the K program; you're talking about the Q program.
>
> a few observations:
>
> the 'i' function gives you prompt-and-respond in the console by
> call 'e' until the user gives no prompt:
>
> i:{while[count r:read0 0;-1"? ",e r;]}
I was talking about the K program; you're talking about the Q program.
>
> the 'P' function maps first- and second-person:
>
> P:{(y,x,z)(x,y)?z}.`$(("you";"your";"yourself";"i'm";"i
am");("i";"my";"myself";"you are";"you're"))
So this will change "your" to "my". Will it, like the Ruby program,
change "my" to "your"?
>
> instead of rotating multiple-responses, the k version picks a
> response randomly from the set. this is less predictable than
> rotation.
That has the defect of possibly repeating the same response
immediately instead of cycling through all of the responses
before repeating.
>
> but i'm not surprised that the ruby version is so small. it's
> a nice language, and i like the enthusiasm of its practitioners.
>
> "William James" <w_a_x_man@[EMAIL PROTECTED]
> wrote in message
news:a404c407-ac00-4665-9f49-6bca822c1239@[EMAIL PROTECTED]
> > On Feb 24, 6:06 am, Mark Tarver <dr.mtar...@[EMAIL PROTECTED]
> wrote:
> >> Sorry I missed a couple of later attempts
> >>
> >> Lisp 150 LOC ................ Peter Norvig
> >> Qi (slightly revised) 63 LOC .................Mark Tarver
> >> Ruby 53 LOC .................William James
> >> Q 10 LOC ..................Steven Apter
> >> K 3 LOC ...................Steven Apter
> >> Ruby (again) 17 LOC ...................William James
> >> Mathematica 20 LOC .................. Szabolcs
> >>
> >> Mark
> >
> > The K version doesn't do everything that the Ruby
> > versions do. It doesn't change "I" in the user's
> > response to "you" when throwing it back at the user,
> > for example.
> >
> > When there are multiple possible replies to a user's
> > input, the Ruby program rotates those replies so that
> > not one will be repeated until all have been used.


|