Re: A New Core.logic Primer

2012-03-15 Thread Edmund
Righto, I'll add this to the discussion. On Thursday, 15 March 2012 21:53:51 UTC, David Nolen wrote: > > On Thu, Mar 15, 2012 at 5:41 PM, Sean Corfield wrote: > >> On Thu, Mar 15, 2012 at 2:16 PM, Baishampayan Ghose >> wrote: >> > There is run, but `run` takes an extra argument `n` and will solv

Re: A New Core.logic Primer

2012-03-15 Thread David Nolen
On Thu, Mar 15, 2012 at 5:41 PM, Sean Corfield wrote: > On Thu, Mar 15, 2012 at 2:16 PM, Baishampayan Ghose > wrote: > > There is run, but `run` takes an extra argument `n` and will solve for > > only `n` results while `run*` solves for all. > > Ah, OK. That makes sense. Perhaps that could be add

Re: A New Core.logic Primer

2012-03-15 Thread Sean Corfield
On Thu, Mar 15, 2012 at 2:16 PM, Baishampayan Ghose wrote: > There is run, but `run` takes an extra argument `n` and will solve for > only `n` results while `run*` solves for all. Ah, OK. That makes sense. Perhaps that could be added to the primer? (just curious: why not run-all?) > Also, core.l

Re: A New Core.logic Primer

2012-03-15 Thread David Nolen
On Thu, Mar 15, 2012 at 5:16 PM, Baishampayan Ghose wrote: > On Thu, Mar 15, 2012 at 2:04 PM, Sean Corfield > wrote: > > And why is it run* and not run? > > There is run, but `run` takes an extra argument `n` and will solve for > only `n` results while `run*` solves for all. > > Also, core.logic

Re: A New Core.logic Primer

2012-03-15 Thread Baishampayan Ghose
On Thu, Mar 15, 2012 at 2:04 PM, Sean Corfield wrote: > And why is it run* and not run? There is run, but `run` takes an extra argument `n` and will solve for only `n` results while `run*` solves for all. Also, core.logic is essentially a faithful port of miniKanren and there is a lot of value i

Re: A New Core.logic Primer

2012-03-15 Thread Sean Corfield
On Thu, Mar 15, 2012 at 1:28 PM, David Nolen wrote: > On Thu, Mar 15, 2012 at 4:21 PM, Sean Corfield > wrote: >> (require '[clojure.core.logic :as ?]) >> >> (?/run [q] ;; instead of run* >>  (?/cons 1 q (cons 1 [2 3]))) ;; instead of (conso 1 q (cons 1 [2 3])) > > That's a perfectly valid way to

Re: A New Core.logic Primer

2012-03-15 Thread David Nolen
On Thu, Mar 15, 2012 at 4:28 PM, David Nolen wrote: > On Thu, Mar 15, 2012 at 4:21 PM, Sean Corfield wrote: > >> On Thu, Mar 15, 2012 at 12:21 PM, David Nolen >> wrote: >> > It has nothing to do w/ qualified or not qualified, namespaces or >> anything >> > else. In some programs you may want to

Re: A New Core.logic Primer

2012-03-15 Thread David Nolen
On Thu, Mar 15, 2012 at 4:21 PM, Sean Corfield wrote: > On Thu, Mar 15, 2012 at 12:21 PM, David Nolen > wrote: > > It has nothing to do w/ qualified or not qualified, namespaces or > anything > > else. In some programs you may want to freely mix functions and > relations. > > But that's what name

Re: A New Core.logic Primer

2012-03-15 Thread Sean Corfield
On Thu, Mar 15, 2012 at 12:21 PM, David Nolen wrote: > It has nothing to do w/ qualified or not qualified, namespaces or anything > else. In some programs you may want to freely mix functions and relations. But that's what namespaces are for in Clojure, yes? Seems like this would be equally clea

Re: A New Core.logic Primer

2012-03-15 Thread David Nolen
On Thu, Mar 15, 2012 at 3:08 PM, Sean Corfield wrote: > In other words, you want access to both unqualified cons and conso, > rest and resto etc in the same code? Yet core.logic overrides == and > so you either have to namespace that or exclude it (the examples seem > to do the latter) which seems

Re: A New Core.logic Primer

2012-03-15 Thread Daniel Gagnon
On Thu, Mar 15, 2012 at 3:08 PM, Sean Corfield wrote: > On Thu, Mar 15, 2012 at 10:49 AM, David Nolen > wrote: > >> > It's a convention from The Reasoned Schemer. It's just an easy way to > >> > differentiate goals from regular functions. > > What's the rationale in TRS for that? (and "conde") Li

Re: A New Core.logic Primer

2012-03-15 Thread Sean Corfield
On Thu, Mar 15, 2012 at 10:49 AM, David Nolen wrote: >> > It's a convention from The Reasoned Schemer. It's just an easy way to >> > differentiate goals from regular functions. What's the rationale in TRS for that? (and "conde") Like Phil (and no doubt others) it seems an odd convention, without

Re: A New Core.logic Primer

2012-03-15 Thread David Nolen
On Thu, Mar 15, 2012 at 1:41 PM, Phil Hagelberg wrote: > David Nolen writes: > > > On Thu, Mar 15, 2012 at 12:59 PM, Daniel Gagnon >> wrote: > > > > Could this tutorial explain the foremost question people have > > when seeing core.logic: why is o appened to the names of all > > tho

Re: A New Core.logic Primer

2012-03-15 Thread Phil Hagelberg
David Nolen writes: > On Thu, Mar 15, 2012 at 12:59 PM, Daniel Gagnon > wrote: > > Could this tutorial explain the foremost question people have > when seeing core.logic: why is o appened to the names of all > those functions? > > > It's a convention from The Reasoned Schemer. It's ju

Re: A New Core.logic Primer

2012-03-15 Thread David Nolen
On Thu, Mar 15, 2012 at 12:59 PM, Daniel Gagnon wrote: > Could this tutorial explain the foremost question people have when seeing > core.logic: why is o appened to the names of all those functions? It's a convention from The Reasoned Schemer. It's just an easy way to differentiate goals from re

Re: A New Core.logic Primer

2012-03-15 Thread Daniel Gagnon
Could this tutorial explain the foremost question people have when seeing core.logic: why is o appened to the names of all those functions? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com N

Re: A New Core.logic Primer

2012-03-15 Thread Jim - FooBar();
amazing stuff guys!!! Jim On 14/03/12 19:00, David Nolen wrote: Thanks to Edmund Jackson we have a new primer for core.logic: https://github.com/clojure/core.logic/wiki/A-Core.logic-Primer Feedback appreciated! David -- You received this message because you are subscribed to the Google Group

Re: A New Core.logic Primer

2012-03-15 Thread David Nolen
On Thu, Mar 15, 2012 at 9:05 AM, Milton Silva wrote: > This primer is a good introduction to core.logic operators. What I think > is missing is a tutorial that answers these questions: > > What type of problems does core.logic excel at solving? > How do you solve problems with core.logic? > How d

Re: A New Core.logic Primer

2012-03-15 Thread Milton Silva
This primer is a good introduction to core.logic operators. What I think is missing is a tutorial that answers these questions: What type of problems does core.logic excel at solving? How do you solve problems with core.logic? How does it enable simplicity? (Rich said in "simple made easy" that

Re: A New Core.logic Primer

2012-03-15 Thread Edmund
Hi Thorsten, Thanks for reading and the great feedback. In response, yes lvars introduced by fresh stay 'inside' the run* which only returns the query lvar. Your other comments are 100% correct and I will update the document to reflect them. Thanks again, Edmund On Thursday, 15 March 2

Re: A New Core.logic Primer

2012-03-15 Thread Thorsten Wilms
On 03/14/2012 08:00 PM, David Nolen wrote: Thanks to Edmund Jackson we have a new primer for core.logic: https://github.com/clojure/core.logic/wiki/A-Core.logic-Primer Feedback appreciated! Hi! Does a run* expression evaluate to only the query-variable, while lvars introduced with fresh stay

Re: A New Core.logic Primer

2012-03-14 Thread Daniel Gagnon
> > >> Dan, you probably read that recently about Datalog, while you were > reviewing Datomic. Ain't that right? :) > > I didn't check out Datomic yet. I'll do that soon. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send emai

Re: A New Core.logic Primer

2012-03-14 Thread Daniel Jomphe
On Wednesday, March 14, 2012, Dan wrote: > > David Nolen wrote: > >> Thanks to Edmund Jackson we have a new primer for core.logic: >> https://github.com/clojure/core.logic/wiki/A-Core.logic-Primer > > > [...] I think you should say a word about prolog and mention that unlike > it core.logic isn't

Re: A New Core.logic Primer

2012-03-14 Thread Sean Corfield
On Wed, Mar 14, 2012 at 2:43 PM, Linus Ericsson wrote: > :dependencies [[org.clojure/clojure "1.3.0"] >   [core.logic "0.6.1-SNAPSHOT"]] You want: [org.clojure/core.logic "0.6.7"] http://dev.clojure.org/display/design/Where+Did+Clojure.Contrib+Go has a link to Maven Central versions of all the c

Re: A New Core.logic Primer

2012-03-14 Thread Linus Ericsson
2012/3/14 David Nolen > On Wed, Mar 14, 2012 at 4:09 PM, Daniel Gagnon wrote: > >> >> >> On Wed, Mar 14, 2012 at 3:00 PM, David Nolen wrote: >> >>> Thanks to Edmund Jackson we have a new primer for core.logic: >>> https://github.com/clojure/core.logic/wiki/A-Core.logic-Primer >>> >>> Feedback app

Re: A New Core.logic Primer

2012-03-14 Thread David Nolen
On Wed, Mar 14, 2012 at 4:09 PM, Daniel Gagnon wrote: > > > On Wed, Mar 14, 2012 at 3:00 PM, David Nolen wrote: > >> Thanks to Edmund Jackson we have a new primer for core.logic: >> https://github.com/clojure/core.logic/wiki/A-Core.logic-Primer >> >> Feedback appreciated! >> >> David >> > > It's

Re: A New Core.logic Primer

2012-03-14 Thread Daniel Gagnon
On Wed, Mar 14, 2012 at 3:00 PM, David Nolen wrote: > Thanks to Edmund Jackson we have a new primer for core.logic: > https://github.com/clojure/core.logic/wiki/A-Core.logic-Primer > > Feedback appreciated! > > David > It's pretty good and I think it's very accessible. If you compare to Learn Pr

A New Core.logic Primer

2012-03-14 Thread David Nolen
Thanks to Edmund Jackson we have a new primer for core.logic: https://github.com/clojure/core.logic/wiki/A-Core.logic-Primer Feedback appreciated! David -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@goo