Hi Michael,
Interesting implementation, personally I'm not well versed in programming
with sets. Looks like a very nice style, will use this to check it out.
Thanks,
Ambrose
On Mon, Nov 7, 2011 at 2:26 AM, Michael Jaaka
wrote:
> Well, despite of fact that core.logic is fine tool and is worth of
Well, despite of fact that core.logic is fine tool and is worth of study, I
have implemented own solution to my problem.
Here is a full implementation: http://pastebin.com/Z5BETZd3
And the idea is to index each value in record perserving the record and
meaning of values. Then search by these va
There's nothing like a Learn You A core.logic, but Ambrose and Ryan
Senior's tutorials are pretty great.
https://github.com/frenchy64/Logic-Starter/wiki
http://objectcommando.com/
David
On Sat, Nov 5, 2011 at 3:34 PM, Michael Jaaka
wrote:
>
> Btw. Is there any fine tutorial for core.logic? By f
Btw. Is there any fine tutorial for core.logic? By fine I mean
something like learn haskell for great good.
On 5 Lis, 20:26, Michael Jaaka wrote:
> Now is ok, easy to grasp. How the lein dep declaration and clj import
> looks?
> Thank you both.
>
> On 5 Lis, 20:11, David Nolen wrote:
>
>
>
>
>
Now is ok, easy to grasp. How the lein dep declaration and clj import
looks?
Thank you both.
On 5 Lis, 20:11, David Nolen wrote:
> I would probably write the code like this:
>
> (defrel permission role op state)
>
> (defn add-permision [roles ops states]
> (doseq [r roles o ops s states]
>
I would probably write the code like this:
(defrel permission role op state)
(defn add-permision [roles ops states]
(doseq [r roles o ops s states]
(fact permission r o s)))
(add-permision #{:admin :operator} #{:reject :accept} #{:applied})
(defn permissiono [role op state]
(run* [q]
Thanks, it gave me insight into that framework.
Unfortunately it doesn't look friendly in usage.
Looks like there is a place for a clojure lib or wrapper around
core.logic.
It would be nice if it could answer to questions also in terms of
truth.
On 5 Lis, 18:24, Ambrose Bonnaire-Sergeant
wrote:
For wildcards you can use symbol-macrolet from tools.macro
(macro/symbol-macrolet [_ (lvar)]
(all
(== [_ _ [_ _ 'milk _ _] _ _] hs)
))
On Sat, Nov 5, 2011 at 1:24 PM, Ambrose Bonnaire-Sergeant <
abonnaireserge...@gmail.com> wrote:
> I gave the wildcard requirement a bit of though
I gave the wildcard requirement a bit of thought, no inspiration at the
moment.
Maybe someone else can suggest a strategy.
Ambrose
On Sun, Nov 6, 2011 at 1:14 AM, Ambrose Bonnaire-Sergeant <
abonnaireserge...@gmail.com> wrote:
> Hey Michael,
>
> Here's a solution using core.logic.
>
> ;; We can
Hey Michael,
Here's a solution using core.logic.
;; We can define a "permission" relation with "defrel".
(defrel permission roles ops state)
;; and a helper function to add each combination of permissions
(defn add-permision [roles ops states]
(for [r roles
o ops
s states]
Hi,
I would like to use logic programing to describe permissions. The
definition is
We have set of triples which looks like:
Set of roles; set of operations; set of states
Triples are defined in scope of some entity with states, wildcard is
defined with _
All I need is to answer on some operati
11 matches
Mail list logo