Hi James ,
Yes . That works perfectly..
Thanks a lot.. Sorry for my late reply.
Did not recognise that was a whitespace issue..!!
On Sunday, November 17, 2013 10:05:50 PM UTC+1, sindhu hosamane wrote:
Hello friends ,
(?- (stdout)[?category]((select-fields info-tap [?category]) ?category)
)
Hi James ,
Yes . That works perfectly..
Thanks a lot.. Sorry for my late reply.
Did not recognise that was a whitespace issue..!!
Best Regards,
Sindhu
--
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to
Thanks guys for the useful answers :)
Ryan
On Wednesday, December 4, 2013 1:27:57 AM UTC+2, James Ferguson wrote:
`update-in` could be helpful, depending on what exactly you're doing.
(doseq [keyA keys, keyB otherkeys]
(update-in m [keyA keyB] some-function))
On Tuesday, December 3,
Have had some folks ask about the Carmine appender performance I quoted -
the 50k/sec figure is conservative if we're talking about server hardware.
If you're not logging awfully large arguments (large state maps, etc.) -
you'll basically see standard [unpipelined] Redis write performance for
Has anyone tried to invoke overloaded methods on a hessian proxy?
My hessian interface has two overloaded methods.
*public SetChanges getChanges(Session session)*;
public SetChanges getChanges(String session);
I couldn't manage to call *getChanges(Session session).*
user (set!
problem solved: HessianProxyFactory.setOverloadEnabled(true)
--
--
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
On Wed, Dec 4, 2013 at 6:04 AM, James Laver james.la...@gmail.com wrote:
- :form-params uses string keys not keywords so it then needs to be
keywordified before it’s suitable for passing to the database layer
Which DB layer requires keywords? Not java.jdbc - it's perfectly happy
with string
Hi all,
while taking a watch to the OpenCV (Open Computer Vision) lib I wrote a very
short tutorial on how to setup a clojure environment to start interacting with
OpenCV with a CLJ REPL.
https://github.com/magomimmo/opencv/blob/2.4.7-macosx/samples/clojure/simple-sample/README.md
I wrote it
user (def a-blah (atom [1 2 3]))#'user/a-blahuser (defn blah [] (let [x (first @a-blah)] (swap! a-blah rest) x))#'user/blahuser (blah)1user (blah)2user (blah)3user (blah)nil 06.12.2013, 03:46, "David Simmons" shortlypor...@gmail.com:Hi I'd like to be able to define a function that is passed a
Hi
I'd like to be able to define a function that is passed a vector of items
and returns a function such that each time the returned function is called
it returns the next item in my-vector.
For example
(def blah (my-function [1 2 3])
(blah) = 1
(blah) = 2
(blah) = 3
Is this possible?
Would this work?
(defn blah [coll]
(lazy-seq
(when-let [s (seq coll)]
(cons (first s) (blah (rest s
))
You can look up:
http://clojure.org/lazy
Thanks
Guru
On Thu, Dec 5, 2013 at 10:46 AM, David Simmons shortlypor...@gmail.comwrote:
Hi
I'd like to be able to
Guru and Kelker
thanks for such prompt replies.
I'll give both a try.
cheers
Dave
--
--
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
Kelker Ryan's solution isn't quite what you asked for (you asked for a
function that takes a vector and returns an iterator, whereas his version
stores the vector in a global var), but it can easily be adapted to what
you wanted:
(defn make-blah [v]
(let [a (atom v)]
(fn [] (let [x (first
Maps, keywords, and symbols when used as operators allow optional second
arguments for 'default-not-found' values is if to 'get'.
E.g.
({:a 1} :b 'b) = b
However sets don't support this behavior (though they do with 'get') and
vectors don't allow the optional default-not-found in their pseudo
Hi Puzzler
I like the first approach you defined and it works perfectly thank you.
cheers
Dave
--
--
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
It's worth pointing out that if you really care about using it across
multiple threads, an atom really isn't the right tool for the job. You
should use a ref in order to place both the first and the rest into a
single transaction:
(defn make-blah [v]
(let [a (ref v)]
(fn [] (dosync (let [x
I'm happy to announce that after Ambrose BS commissioned me to continue
working on my CinC libraries as part of his typed-clojure campaign
(http://www.indiegogo.com/projects/typed-clojure), Cognitect
(http://cognitect.com/) offered me sponsorship for my work on CinC
contrib libraries.
The
Although I think that a ref is the right tool for this purpose, for the
sake of completeness, I'll illustrate the threadsafe way to use an atom
here:
(defn make-blah [v]
(let [a (atom v)]
(fn [] (let [current-val @a]
(if (compare-and-set! a current-val (rest current-val))
It's also doable with just swap!, fwiw:
(defn make-blah [xs]
(let [a (atom [nil xs])]
(fn []
(first (swap! a
(fn [[_ tail]]
[(first tail) (next tail)]))
Dave
On Thu, Dec 5, 2013 at 12:43 PM, Mark Engelberg
This is possible with atoms and refs and such, but I wonder if the use-case
can't simply be handled with existing seq functions?
This is going against the grain of clojure's FP approach.
Since no one's mentioned it yet, if it's possible for the caller of this
function to be defined in terms of
On 5 December 2013 20:58, Gary Trakhman gary.trakh...@gmail.com wrote:
This is possible with atoms and refs and such, but I wonder if the
use-case can't simply be handled with existing seq functions?
This is going against the grain of clojure's FP approach.
Right. It would be useful to know
Just for fun, here's a core.async version:
(require '[clojure.core.async :as async])
(defn make-blah [v]
(let [ch (async/to-chan v)]
(fn [] (async/!! ch
But I agree with the others that this kind of thing is rarely needed in
Clojure.
--
--
You received this message because you are
After lurking around the Clojure community for well over a year now I
thought it might be time for me to share some hacks I’ve made while working
on a hobby project, so I pushed a few repos tonight.
https://github.com/molst/annagreta - simplistic authorization
https://github.com/molst/treq
I happen to be working on the prototype for the caribou plugin layer right
now (which may or may not be related to what you mean by pluggable). The
default caribou template combines a number of libs that can in many cases
be used independently of one another. We use ring and clojure.java.jdbc
Wow! Congrats!
Ambrose
On Fri, Dec 6, 2013 at 4:42 AM, Nicola Mometto brobro...@gmail.com wrote:
I'm happy to announce that after Ambrose BS commissioned me to continue
working on my CinC libraries as part of his typed-clojure campaign
(http://www.indiegogo.com/projects/typed-clojure),
I don't think there's any good reason for sets not to support the default
arg. Vector is a little weird due to the index nature of the keys but could
be done. If you want to file tickets for these, I don't think anything is
in the system on it already. I would separate sets and vectors into two
Hi Joseph Guhlin,
Thanks your idea helped and i could send some sample data to my neo4j
database.
Thank you very much... :)
On Monday, December 2, 2013 3:41:53 PM UTC+5:30, Himakshi Mangal wrote:
Hi...
I am using clojure to import dbpedia data into neo4j.
Here's the code:
(ns
I'm trying to come up with a function that will take a namespace containing
Record definitions and convert it into a :readers map for EDN parsing.
Right now, I'm just doing it manually, but as the number of records grows,
this feels sillier and sillier. I haven't found anything in the core
28 matches
Mail list logo