Re: Generating a "Java bean" via Clojure?

2013-08-17 Thread Ryan Brush
Some Java frameworks will accept public final fields as Java bean fields. In that case, a Clojure record can be used directly (although I'm not sure if we're making an assumption about Clojure records that might change). This has actually worked for my limited needs in this space. The only othe

Revisiting forward-chaining rules in Clojure

2013-08-18 Thread Ryan Brush
Perhaps the best aspect of Clojure is how it can adopt the best ideas from other domains to concisely solve problems, as we've seen with core.logic, core.async and other libraries. I recently came across a problem domain that is easily expressed in forward-chaining rules, and found Clojure to be

Re: Revisiting forward-chaining rules in Clojure

2013-08-18 Thread Ryan Brush
gt; Shantanu > > On Sunday, 18 August 2013 23:46:14 UTC+5:30, Ryan Brush wrote: >> >> Perhaps the best aspect of Clojure is how it can adopt the best ideas >> from other domains to concisely solve problems, as we've seen with >> core.logic, core.async and other libr

Re: Revisiting forward-chaining rules in Clojure

2013-08-18 Thread Ryan Brush
d in the working memory -- but that could be factored out ad a ClojureScript alternative made available. I logged an issue to track that: https://github.com/rbrush/clara-rules/issues/4 On Sunday, August 18, 2013 11:51:46 PM UTC-5, Alan Moore wrote: > > On Sunday, August 18, 2013 1:41:56 P

Re: Revisiting forward-chaining rules in Clojure

2013-08-19 Thread Ryan Brush
tps://github.com/clojure-numerics/expresso > [2] http://kimavcrp.blogspot.de/ > > On Sun, Aug 18, 2013 at 9:54 PM, Shantanu Kumar > > wrote: > > Thanks for posting. I will certainly explore this. > > > > Did you look at Mimir? https://github.com/hraber

[ANN] clara-rules 0.1.0 released -- rules as a control structure

2013-09-23 Thread Ryan Brush
This is the first release of Clara, forward-chaining rules in Clojure. Details on the github site: https://github.com/rbrush/clara-rules I've also posted the rationale for what I'm doing here: http://www.toomuchcode.org/2013/09/rules-as-control-structure.html The gist is that forward-chaining

Re: [ANN] clara-rules 0.1.0 released -- rules as a control structure

2013-09-24 Thread Ryan Brush
mber 24, 2013 6:16:12 AM UTC+4, Ryan Brush wrote: >> >> This is the first release of Clara, forward-chaining rules in Clojure. >> >> Details on the github site: >> >> https://github.com/rbrush/clara-rules >> >> I've also posted the rationale

Re: [ANN] clara-rules 0.1.0 released -- rules as a control structure

2013-09-24 Thread Ryan Brush
ace of rules that can be affected by > new fact. So combined approach seems useful to me. > > [1]: > http://programmers.stackexchange.com/questions/114711/the-relation-between-business-rules-engines-and-constraint-programming-languages > [2]: http://osdir.com/ml/clojure/2013-03/msg00778.html > > On T

Re: [ANN] clara-rules 0.1.0 released -- rules as a control structure

2013-09-25 Thread Ryan Brush
> > Alan > > > On Monday, September 23, 2013 7:16:12 PM UTC-7, Ryan Brush wrote: >> >> This is the first release of Clara, forward-chaining rules in Clojure. >> >> Details on the github site: >> >> https://github.com/rbrush/clara-rules >>

Re: [ANN] clara-rules 0.1.0 released -- rules as a control structure

2013-09-26 Thread Ryan Brush
Not yet, although I would like to make use of simple maps natural. I had been toying with the idea of typing into the :type metadata that could be attached to a map, allowing expressions like: (defrule test-rule [:example/person-map-type (= "Alice" (:first-name this))] => (println "Hello,

Re: [ANN] clara-rules 0.1.0 released -- rules as a control structure

2013-09-26 Thread Ryan Brush
> request." >[:support/request [req] (== ?client (:client req)) >[:add/client/representive [req] ((req :clients) ?client) (== ?name > (:name req))] > => (println "Notify" ?name "that" ?client "has a support request") > ) > > >

[ANN] clara-rules 0.2.0 released

2013-10-08 Thread Ryan Brush
Version 0.2.0 of Clara, a forward-chaining rules engine in Clojure, has been released. Thanks to Marshall Bockrath-Vandegrift, Chris Zheng and especially Yuval Lando for contributing code and ideas to the project. The main features of this release including using arbitrary maps as facts, opt

[ANN] Clara 0.3.0: Rete in ClojureScript

2013-11-29 Thread Ryan Brush
Clara 0.3.0, a forward-chaining rules engine in pure Clojure, has been released. The headliner is ClojureScript support, although a handful of fixes and optimizations were included as well. Some discussion of the ClojureScript port is in that group: https://groups.google.com/forum/#!topic/cloj

[ANN] clara-rules 0.4 released

2014-02-06 Thread Ryan Brush
The 0.4.0 release of Clara is up on Clojars. The github page is at [1]. The theme of this release is "rules as data", which I wrote about at [2]. In a nutshell, all rules and the Rete network itself are defined by well-defined data structures (via Prismatic Schema), which opens a lot of doors:

Re: [ANN] Clojure RETE implementation - CLIPS-like expert system shell. New version 4.3

2014-05-13 Thread Ryan Brush
It's cool to see different approaches to Rete in Clojure. I think a solid implementation could really disrupt Drools. Why would I want to write in a limited rule language if I can get rule-like semantics and the expressiveness of Clojure at the same time? Of course I'm going to be biased toward

[ANN] Clojure RETE implementation - CLIPS-like expert system

2014-05-13 Thread Ryan Brush
Hi Tim, Yes. Clara does Rete-style structural sharing of equivalent rule constraints, and then compiles those constraints into Clojure expressions. This actually happens when a rule session is created for a set of rules, but this is memoized by default so you only pay that cost the first time.

Re: [ANN] Clojure RETE implementation - CLIPS-like expert system shell. New version 4.3

2014-05-14 Thread Ryan Brush
Hey Ru, I avoided Miss Manners simply because it doesn't represent the usage patterns I have or expect, so I just have been profiling against the data I have for my use case. Of course, Ms Manners may be a a better reflection of your needs, in which case it could be a good benchmark. Micro-ben

Re: [ANN] Clojure RETE implementation - CLIPS-like expert system shell. New version 4.3

2014-05-14 Thread Ryan Brush
I'm less familiar with Waltz. It looks like a good way to exercise some worst-case scenarios in the rule engines as well. Like Ms Manners I don't think this is a very representative usage pattern but it could expose problems in extreme cases. -Ryan On Wednesday, May 14, 2014 8:28:41 AM UTC-5,

[ANN] Clara 0.6.0

2014-07-27 Thread Ryan Brush
Clara, a rule engine in pure Clojure and ClojureScript, has released version 0.6.0. The headliners are: - Durability. There are no facilities to store and reload session state. I consider this experimental since the format may change non-passively between releases, but it can be used

Re: [ANN] Clara 0.6.0

2014-07-28 Thread Ryan Brush
Hey Alan, The Storm example was an experiment showing we could distribute the engine's working memory between processes, but the needs for it haven't materialized as much as other use cases, so I haven't been maintaining or growing that part of the system. This may change in the future. If th

[ANN] Clara Rules 0.7.0 Released

2014-11-28 Thread Ryan Brush
I just pushed release 0.7.0 of Clara, a forward-chaining production rule engine in Clojure. Beyond some bug fixes and performance improvements, the most significant new feature is described at [1]: support for any variable bound in a constraint is visible to arbitrary expressions in subsequent