Re: clojure-mini kanren implementation of nonvar

2010-11-06 Thread jim
David, That's exactly right. (Pending a review of "The Reasoned Schemer" when I get home) Jim On Nov 6, 11:18 am, David Nolen wrote: > On Sat, Nov 6, 2010 at 5:02 AM, Sunil S Nandihalli < > > sunil.nandiha...@gmail.com> wrote: > > after looking through his source code ... I discovered that repl

Re: clojure-mini kanren implementation of nonvar

2010-11-06 Thread David Nolen
On Sat, Nov 6, 2010 at 5:02 AM, Sunil S Nandihalli < sunil.nandiha...@gmail.com> wrote: > after looking through his source code ... I discovered that replacing > cond-u with cond-a gives me the expected output .. but I am unable to > explain what I have found... > Regards, > Sunil. > mem-o is the

Re: clojure-mini kanren implementation of nonvar

2010-11-06 Thread Sunil S Nandihalli
lli < > sunil.nandiha...@gmail.com> wrote: > >> Hello everybody, >> I know that mini-kanren does not have "nonvar" I was trying to emulate its >> effect by using >> >> (cond-u >> ((& x :unassigned) >>fail) >> (succ

Re: clojure-mini kanren implementation of nonvar

2010-11-06 Thread Sunil S Nandihalli
, Nov 4, 2010 at 11:36 PM, Sunil S Nandihalli < >> sunil.nandiha...@gmail.com> wrote: >> >>> Hello everybody, >>> I know that mini-kanren does not have "nonvar" I was trying to emulate >>> its effect by using >>> >>> (cond-u >&

Re: clojure-mini kanren implementation of nonvar

2010-11-05 Thread Sunil S Nandihalli
10 at 7:16 PM, David Nolen wrote: > On Thu, Nov 4, 2010 at 11:36 PM, Sunil S Nandihalli < > sunil.nandiha...@gmail.com> wrote: > >> Hello everybody, >> I know that mini-kanren does not have "nonvar" I was trying to emulate its >> effect by using >> >&

Re: clojure-mini kanren implementation of nonvar

2010-11-05 Thread David Nolen
On Thu, Nov 4, 2010 at 11:36 PM, Sunil S Nandihalli < sunil.nandiha...@gmail.com> wrote: > Hello everybody, > I know that mini-kanren does not have "nonvar" I was trying to emulate its > effect by using > > (cond-u > ((& x :unassigned) >fail) &

clojure-mini kanren implementation of nonvar

2010-11-04 Thread Sunil S Nandihalli
Hello everybody, I know that mini-kanren does not have "nonvar" I was trying to emulate its effect by using (cond-u ((& x :unassigned) fail) (succeed)) The idea is if x is not assigned it would successfully unify with :unassigned (ofcourse I am assuming that none of the valid

Re: News on Mini Kanren / Javascript generator; when is an implementation sufficiently original?

2009-10-26 Thread Michel Alexandre Salim
ative. >> >> I have recently made available a Scala-based Kanren implementation; >> the differences between Scala and Scheme means that the code is >> sufficiently original. Most of the code was written based on the >> descriptions of how Mini Kanren works, and not the Sche

Re: News on Mini Kanren / Javascript generator; when is an implementation sufficiently original?

2009-10-25 Thread Rich Hickey
> the differences between Scala and Scheme means that the code is > sufficiently original. Most of the code was written based on the > descriptions of how Mini Kanren works, and not the Scheme > implementation. And I have signed the Clojure contributor CA. > > Would a clean-room imple

News on Mini Kanren / Javascript generator; when is an implementation sufficiently original?

2009-10-24 Thread Michel Salim
. Most of the code was written based on the descriptions of how Mini Kanren works, and not the Scheme implementation. And I have signed the Clojure contributor CA. Would a clean-room implementation based on the Scala code be considered sufficiently owned for inclusion in contrib? Am I considered

Re: Mini-Kanren

2009-02-26 Thread jim
Looking at the code, lcons does indeed require two parms. I must've been zoned out when I wrote the comment. Thanks for catching that. On Feb 26, 9:10 am, Pierpaolo Bernardi wrote: > no. in scheme (and in all modern lisps), cons is a 2 arguments procedure. > Giving it 1 is an error. > > Some v

Re: Mini-Kanren

2009-02-26 Thread Pierpaolo Bernardi
On Thu, Feb 26, 2009 at 4:03 PM, jim wrote: > > I don't have a Scheme here to check it out, but doesn't > > (cons 1) > > yield > > '(1) no. in scheme (and in all modern lisps), cons is a 2 arguments procedure. Giving it 1 is an error. Some very old lisp dialects supplied NIL in place of missin

Re: Mini-Kanren

2009-02-26 Thread jim
I don't have a Scheme here to check it out, but doesn't (cons 1) yield '(1) or am I wrong? In either case how could it be stated more accurately/clearly? Thanks Jim On Feb 26, 7:52 am, "Michel S." wrote: > Hi Jim, > > "In Scheme, passing cons one parameter encloses that parameter in a > li

Re: Mini-Kanren

2009-02-26 Thread Michel S.
Hi Jim, On Feb 25, 6:38 pm, jim wrote: > I've just uploaded a file that has the Mini-Kanren logic programming > system described in "The Reasoned Schemer" implemented in idiomatic > Clojure. The file is: > > http://clojure.googlegroups.com/web/mini_kanren.clj >

Mini-Kanren

2009-02-25 Thread jim
I've just uploaded a file that has the Mini-Kanren logic programming system described in "The Reasoned Schemer" implemented in idiomatic Clojure. The file is: http://clojure.googlegroups.com/web/mini_kanren.clj I'm offering this as a candidate for inclusion into clojure