On 16/05/13 16:48, Phillip Lord wrote:
I have one main user at the moment, although she is my PhD student; I
claim no coercion.
I am a Ph.D student myself and that's exactly where I will most likely
need ontologies...
Something tells me we're going to be in contact soon :)
Give me a shout if your are more interested. I'm more interested in
ontologies than in clojure. Clojure just happened to be a good solution
to the problem I faced with tawny.
You can count on that! In addition, whenever I find some free time I'd
like to have a look at the lib and familiarise myself with it...and who
knows, I may even have some (humble yet constructive) comments/feedback.
Also, I think you'll find Clojure is a joy to work with in most domains
(my main discipline is NLP but anything that involves
'heavy-data-lifting' is also a good candidate).
I'd write it like so:
(defn ontology-reasoner-fixture
[tests & {:keys [monitor]
:or {monitor r/reasoner-progress-monitor-silent}}]
(tests monitor))) ;;tests fn needs to accept an arg
I can't. This is use the clojure.test. The fixture gets passed a closure
that runs all the tests. It doesn't take an argument. Even if I could,
it would just pass the problem onward.
If I am doing this:
(r/isuperclass? p/FourCheesePizza p/CheesyPizza)
I really do not want to have pass in the progress monitor, at this
point. Worse, the reasoners are actually created as a side effect, and
this happens lazily. So, it's hard to know when.
aha! I see what you mean...how about 'with-bindings' then? something
like this should run the tests just fine:
(defn ontology-reasoner-fixture [tests]
(with-bindings {#'r/*reasoner-progress-monitor*
r/reasoner-progress-monitor-silent} tests))
...shorter, same behaviour and as a bonus you're not limited to vars
declared as dynamic. This should work with vanilla 'def' too :)
Jim
--
--
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 unsubscribe from this group and stop receiving emails from it, send an email
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.