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 internal?



Finally we unify a and q leaving both with the value of their 
intersection: (1, 2, 3) intersection (3, 4, 5), (3)
I stumbled over this sentence because of the (1, 2, 3) intersection (3, 
4, 5), (3) part. Sudden use of infix, with the result after a comma? 
Just writing (3) would be clearer.



Regarding conde, I had to reread that section carefully. Consider to 
first explain conde with single-goal clauses, to then mention that each 
clause is actually a list of goals with AND-logic (simple case first, 
expand afterwards).



In the Conso (the Magnificent) section, use of return inside of the 
code blocks is inconsistent with the rest of the article.


I do not understand the explanations to the last 2 examples, even though 
I think I understand the logic. The use of list [1] and list [2] is not 
easy to read, how about writing out first and second list?


I would think that:

  (run* [q]
(conso q [2 3] [1 2 3]))

returns (1); q is the element that when added as head to the first list, 
results in a list equal to the second list (if such an element exists).


  (run* [q]
(conso 1 [2 q] [1 2 3]))

returns (3); q is the element of the first list that when 1 is added as 
head to the first list results in a list equal to the second list (if 
such an element exists).


So conso constraints whatever lvars are present in an attempt to unify 
the cons of its first 2 arguments with its third argument, restricting 
the arguments to be atom-or-list, list, list?



Otherwise an enlightening and inspiring read, thank you!


--
Thorsten Wilms

thorwil's design for free software:
http://thorwil.wordpress.com/

--
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
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


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 2012 09:44:35 UTC, thorwil wrote:

 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 internal?


 Finally we unify a and q leaving both with the value of their 
 intersection: (1, 2, 3) intersection (3, 4, 5), (3)
 I stumbled over this sentence because of the (1, 2, 3) intersection (3, 
 4, 5), (3) part. Sudden use of infix, with the result after a comma? 
 Just writing (3) would be clearer.


 Regarding conde, I had to reread that section carefully. Consider to 
 first explain conde with single-goal clauses, to then mention that each 
 clause is actually a list of goals with AND-logic (simple case first, 
 expand afterwards).


 In the Conso (the Magnificent) section, use of return inside of the 
 code blocks is inconsistent with the rest of the article.

 I do not understand the explanations to the last 2 examples, even though 
 I think I understand the logic. The use of list [1] and list [2] is not 
 easy to read, how about writing out first and second list?

 I would think that:

(run* [q]
  (conso q [2 3] [1 2 3]))

 returns (1); q is the element that when added as head to the first list, 
 results in a list equal to the second list (if such an element exists).

(run* [q]
  (conso 1 [2 q] [1 2 3]))

 returns (3); q is the element of the first list that when 1 is added as 
 head to the first list results in a list equal to the second list (if 
 such an element exists).

 So conso constraints whatever lvars are present in an attempt to unify 
 the cons of its first 2 arguments with its third argument, restricting 
 the arguments to be atom-or-list, list, list?


 Otherwise an enlightening and inspiring read, thank you!


 -- 
 Thorsten Wilms

 thorwil's design for free software:
 http://thorwil.wordpress.com/



-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

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 they 
can replace conditionals, so a tutorial that explores that would be 
interesting)

On Wednesday, March 14, 2012 7:00:57 PM UTC, 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


On Wednesday, March 14, 2012 7:00:57 PM UTC, 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
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: A New Core.logic Primer

2012-03-15 Thread David Nolen
On Thu, Mar 15, 2012 at 9:05 AM, Milton Silva milton...@gmail.com 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 does it enable simplicity? (Rich said in simple made easy that they
 can replace conditionals, so a tutorial that explores that would be
 interesting)


Until someone writes this up - I recommend getting a good book on Prolog.
Bratko and/or Sterling Shapiro.

David

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

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
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient 
with your first post.

To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en 


--
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
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


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
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: A New Core.logic Primer

2012-03-15 Thread David Nolen
On Thu, Mar 15, 2012 at 12:59 PM, Daniel Gagnon redalas...@gmail.comwrote:

 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 regular functions.

David

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: A New Core.logic Primer

2012-03-15 Thread Phil Hagelberg
David Nolen dnolen.li...@gmail.com writes:

 On Thu, Mar 15, 2012 at 12:59 PM, Daniel Gagnon redalas...@gmail.com
 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 regular functions.

Wouldn't it be more idiomatic Clojure to use namespaces?

-Phil

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: A New Core.logic Primer

2012-03-15 Thread David Nolen
On Thu, Mar 15, 2012 at 1:41 PM, Phil Hagelberg p...@hagelb.org wrote:

 David Nolen dnolen.li...@gmail.com writes:

  On Thu, Mar 15, 2012 at 12:59 PM, Daniel Gagnon redalas...@gmail.com
  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 regular functions.

 Wouldn't it be more idiomatic Clojure to use namespaces?

 -Phil


core.logic embraces freely mixing functional and logic programming.

David

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: A New Core.logic Primer

2012-03-15 Thread Sean Corfield
On Thu, Mar 15, 2012 at 10:49 AM, David Nolen dnolen.li...@gmail.com 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 explanation.

 Wouldn't it be more idiomatic Clojure to use namespaces?

That was my first reaction too.

 core.logic embraces freely mixing functional and logic programming.

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 to run counter to that. It's not a big
deal. It's just a bit jarring when you first start using core.logic
(which is a very cool library BTW).
-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

Perfection is the enemy of the good.
-- Gustave Flaubert, French realist novelist (1821-1880)

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: A New Core.logic Primer

2012-03-15 Thread Daniel Gagnon
On Thu, Mar 15, 2012 at 3:08 PM, Sean Corfield seancorfi...@gmail.comwrote:

 On Thu, Mar 15, 2012 at 10:49 AM, David Nolen dnolen.li...@gmail.com
 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 explanation.

  Wouldn't it be more idiomatic Clojure to use namespaces?

 That was my first reaction too.


I find it a jarring clash with the rest of Clojure because I'm used to see
things that are elegant or being given a good rationale of how it's a good
trade-off for practical purposes. Here, it seems arbitrary and it just
doesn't feel righto.

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: A New Core.logic Primer

2012-03-15 Thread David Nolen
On Thu, Mar 15, 2012 at 3:08 PM, Sean Corfield seancorfi...@gmail.comwrote:

 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 to run counter to that. It's not a big
 deal. It's just a bit jarring when you first start using core.logic
 (which is a very cool library BTW).


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.
Tacking on an o is a simple convention to easily differentiate relations
from normal functions. Take it or leave it :)

David

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: A New Core.logic Primer

2012-03-15 Thread Sean Corfield
On Thu, Mar 15, 2012 at 12:21 PM, David Nolen dnolen.li...@gmail.com 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 clean:

(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]))
-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

Perfection is the enemy of the good.
-- Gustave Flaubert, French realist novelist (1821-1880)

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: A New Core.logic Primer

2012-03-15 Thread David Nolen
On Thu, Mar 15, 2012 at 4:28 PM, David Nolen dnolen.li...@gmail.com wrote:

 On Thu, Mar 15, 2012 at 4:21 PM, Sean Corfield seancorfi...@gmail.comwrote:

 On Thu, Mar 15, 2012 at 12:21 PM, David Nolen dnolen.li...@gmail.com
 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 clean:

 (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]))
 --
 Sean A Corfield -- (904) 302-SEAN
 An Architect's View -- http://corfield.org/
 World Singles, LLC. -- http://worldsingles.com/


 That's a perfectly valid way to use core.logic and some people do.

 People can divide up their core.logic code bases however they see fit. I
 personally see no benefit in putting relations in a different namespace.

 David


Also for sophisticated intermingling of fns and relations (see cKanren)
you'll probably run into needless hassles with circular dependencies.

David

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: A New Core.logic Primer

2012-03-15 Thread Sean Corfield
On Thu, Mar 15, 2012 at 1:28 PM, David Nolen dnolen.li...@gmail.com wrote:
 On Thu, Mar 15, 2012 at 4:21 PM, Sean Corfield seancorfi...@gmail.com
 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 use core.logic and some people do.

Except that you have to remember it's run* and conso and resto and
conde etc which was my real point.

And why is it run* and not run?

 People can divide up their core.logic code bases however they see fit. I
 personally see no benefit in putting relations in a different namespace.

Apparently some users of the library do see a benefit :)
-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

Perfection is the enemy of the good.
-- Gustave Flaubert, French realist novelist (1821-1880)

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: A New Core.logic Primer

2012-03-15 Thread Baishampayan Ghose
On Thu, Mar 15, 2012 at 2:04 PM, Sean Corfield seancorfi...@gmail.com 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 in keeping it that way since it will allow us
to port over newer work that's happening around miniKanren, eg.
cKanren.

Regards,
BG

-- 
Baishampayan Ghose
b.ghose at gmail.com

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: A New Core.logic Primer

2012-03-15 Thread David Nolen
On Thu, Mar 15, 2012 at 5:16 PM, Baishampayan Ghose b.gh...@gmail.comwrote:

 On Thu, Mar 15, 2012 at 2:04 PM, Sean Corfield seancorfi...@gmail.com
 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 in keeping it that way since it will allow us
 to port over newer work that's happening around miniKanren, eg.
 cKanren.

 Regards,
 BG


+1

As people actually dig into core.logic I think the rationale will become
apparent. I'm not in any rush to diverge from a project which has had 8+
years of hammock time.

David

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: A New Core.logic Primer

2012-03-15 Thread Sean Corfield
On Thu, Mar 15, 2012 at 2:16 PM, Baishampayan Ghose b.gh...@gmail.com 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.logic is essentially a faithful port of miniKanren and
 there is a lot of value in keeping it that way since it will allow us
 to port over newer work that's happening around miniKanren, eg.
 cKanren.

That's more of a rationale, and I can accept that - adding a note to
that effect to the primer will help others understand, I suspect.
-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

Perfection is the enemy of the good.
-- Gustave Flaubert, French realist novelist (1821-1880)

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: A New Core.logic Primer

2012-03-15 Thread David Nolen
On Thu, Mar 15, 2012 at 5:41 PM, Sean Corfield seancorfi...@gmail.comwrote:

 On Thu, Mar 15, 2012 at 2:16 PM, Baishampayan Ghose b.gh...@gmail.com
 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?)


core.logic's core API matches as closely as possible the one provided by
the original Scheme miniKanren. While this may give core.logic a Scheme-y
flavor, I'm not willing to give up on the benefits, for example:

https://github.com/webyrd/TAPL-in-miniKanren-cKanren-core.logic

I agree we should probably mention run N.

David

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

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 seancorfi...@gmail.comwrote:

 On Thu, Mar 15, 2012 at 2:16 PM, Baishampayan Ghose b.gh...@gmail.com 
 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?)


 core.logic's core API matches as closely as possible the one provided by 
 the original Scheme miniKanren. While this may give core.logic a Scheme-y 
 flavor, I'm not willing to give up on the benefits, for example:

 https://github.com/webyrd/TAPL-in-miniKanren-cKanren-core.logic

 I agree we should probably mention run N.

 David


-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: A New Core.logic Primer

2012-03-14 Thread Daniel Gagnon
On Wed, Mar 14, 2012 at 3:00 PM, David Nolen dnolen.li...@gmail.com 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
Prolog Now! http://www.learnprolognow.org/lpnpage.php?pageid=online it
lacks in the Pulp Fiction references department but it's still good.

I think you should say a word about prolog and mention that unlike it
core.logic isn't turing complete and can't have infinite loops (unless I'm
mistaken about core.logic).

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: A New Core.logic Primer

2012-03-14 Thread David Nolen
On Wed, Mar 14, 2012 at 4:09 PM, Daniel Gagnon redalas...@gmail.com wrote:



 On Wed, Mar 14, 2012 at 3:00 PM, David Nolen dnolen.li...@gmail.comwrote:

 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
 Prolog Now! http://www.learnprolognow.org/lpnpage.php?pageid=online it
 lacks in the Pulp Fiction references department but it's still good.

 I think you should say a word about prolog and mention that unlike it
 core.logic isn't turing complete and can't have infinite loops (unless I'm
 mistaken about core.logic)


core.logic suffers the same pitfalls as Prolog for the most part :)

David

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: A New Core.logic Primer

2012-03-14 Thread Linus Ericsson
2012/3/14 David Nolen dnolen.li...@gmail.com

 On Wed, Mar 14, 2012 at 4:09 PM, Daniel Gagnon redalas...@gmail.comwrote:



 On Wed, Mar 14, 2012 at 3:00 PM, David Nolen dnolen.li...@gmail.comwrote:

 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
 Prolog Now! http://www.learnprolognow.org/lpnpage.php?pageid=online it
 lacks in the Pulp Fiction references department but it's still good.

 I think you should say a word about prolog and mention that unlike it
 core.logic isn't turing complete and can't have infinite loops (unless I'm
 mistaken about core.logic)


 core.logic suffers the same pitfalls as Prolog for the most part :)


Thank you for making learning resources availiable in this vibrant and
powerful clojure-functionality.

I'm missing a (very) short note on how to get started. Using leiningen
with

:dependencies [[org.clojure/clojure 1.3.0]
  [core.logic 0.6.1-SNAPSHOT]]

and defining a file for the primer as

(ns logictest.primer
  (:refer-clojure :exclude [==])
  (:use [clojure.core.logic]))

according to the Readme.md just renders a

Could not locate clojure/core/logic__init.class or clojure/core/logic.clj
on classpath: for me when executed, which is unexpected.

Will carry on trying, but I remeber this have bitten me before when trying
to hacking core.logic. What is a correct minimal experimental setup?

/Linus

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: A New Core.logic Primer

2012-03-14 Thread Sean Corfield
On Wed, Mar 14, 2012 at 2:43 PM, Linus Ericsson
oscarlinuserics...@gmail.com 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 contrib libraries and has
this for core.logic:

http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.clojure%22%20AND%20a%3A%22core.logic%22
-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

Perfection is the enemy of the good.
-- Gustave Flaubert, French realist novelist (1821-1880)

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


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 turing complete and can't have infinite loops (unless 
 I'm mistaken about core.logic).


Dan, you probably read that recently about Datalog, while you were 
reviewing Datomic. Ain't that right? :)

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

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 email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en