Re: Belgian Clojure base meetup?

2012-12-18 Thread Frederik De Bleser
I'd love to see a Belgian Clojure meetup! I'm from Antwerp. Kind regards, Frederik -- 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

Combining maps and finite domains in core.logic returns only one result

2012-12-10 Thread Frederik De Bleser
Hey, I'm trying to combine maps with finite domains with some odd results. A simple query using finite domains correctly returns all values: (run* [q] (fresh [x] (infd x (interval 1 3)) (== q x))) ;= (1 2 3) But putting this result in a map returns only the first value: (run* [q]

Re: Combining maps and finite domains in core.logic returns only one result

2012-12-10 Thread Frederik De Bleser
FYI this works with vectors: (run* [q] (fresh [x] (infd x (interval 1 3)) (== q [x]))) ;= ([1] [2] [3]) But lcons seems to fail as well: (run* [q] (fresh [x] (infd x (interval 1 3)) (== q (lcons x 'foo ;= ((1 . foo)) Kind regards, Frederik -- You received this

Re: Using a dynamic number of lvars in core.logic.

2012-11-27 Thread Frederik De Bleser
I had some trouble because all goals need to take in the list of lvars. `infd` doesn't take in a list, but your sudoku blog post has `all-infd` which does the trick: (defn all-infd Assign a domain to all vars. [vars domain] (if (seq vars) (all (domfd

Re: help choosing dev environment for clojure

2012-11-26 Thread Frederik De Bleser
+ 1 for Light Table. The instarepl is a very useful tool for learning and exploring Clojure. F Op zondag 25 november 2012 22:00:36 UTC+1 schreef René Groß het volgende: You could consider lighttable by chris granger as well. It is at a very early stage, but pretty much usable for hacking

Using a dynamic number of lvars in core.logic.

2012-11-26 Thread Frederik De Bleser
Using core.logic, I sometimes have the need to create a variable number of fresh lvars. For example, I want to create all possible combinations of n numbers between min and max. Currently the only way I found how to do this was building the expression and evalling it: (defn generate-symbols

Re: Using a dynamic number of lvars in core.logic.

2012-11-26 Thread Frederik De Bleser
Hey David, I don't quite understand how I would apply your suggestion this with my example. 1. So the all function creates a choice point. How do I create lvars? I tried: (run* [q] (let [vars (repeatedly 3 #(gensym 'x))] (all (== q vars ;= ((x4388 x4389 x4390)) Shouldn't I

Re: refer-clojure seems to have no effect.

2012-11-23 Thread Frederik De Bleser
Just use a different namespace. Thanks! That did the trick. Regards, Frederik -- 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

refer-clojure seems to have no effect.

2012-11-22 Thread Frederik De Bleser
Hi, I'm trying to use core.logic using the following namespace expression (modelled on core.logic's own test file): (ns user (:refer-clojure :exclude [==]) (:use clojure.core.logic)) However, this gives the following warning: WARNING: == already refers to: