Hi,
Am 10.05.2011 um 01:49 schrieb Simon Katz:
> Passing the class object does exactly what I want.
Then passing a factory function will work, too—without reflection. Much more
performance impact then checking a short string for a dot.
Sincerely
Meikel
--
You received this message because yo
On 10 May 2011 07:24, Shree Mulay wrote:
> For the life of me, I can't get sessions to work, immaterial of which
> tutorial I try and get going??? Is there any tutorial out there that
> explicitly explains everything for a newb like me? After several
> round, I did successfully get form params to
Hi Bojan,
I've added a basic support to post something against the Facebook
Graph API. The documentation for this new feature can be found under
https://github.com/maxweber/clj-facebook-graph
Best regards
Max
On 9 Mai, 20:22, Bojan Jovičić wrote:
> Hi Max,
> I have started investigating this,
Thank you very much.
On May 10, 1:32 am, Justin Kramer wrote:
> 'read' and 'read-string' are what you're looking for. They each read a
> single Clojure object from an input source (PushbackReader for read,
> String for read-string).
>
> Alternatively, something like this can read all top-level fo
Ken:
FYI, the best treatment of this problem I have seen is this one:
http://www.cs.utoronto.ca/~hehner/PPP.pdf
Adam
--
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 n
Hi,
from what you write I get the feeling, that you may be doing things in a too
complicated manner. Maybe I am wrong.
In any case, although it may not be Clojure but Common Lisp, you might want
to take a look at the HTML generation in Peter Seibels excellent Practical
Common Lisp: See chapte
On May 10, 8:27 am, Meikel Brandmeyer wrote:
> Hi,
>
> Am 10.05.2011 um 01:49 schrieb Simon Katz:
>
> > Passing the class object does exactly what I want.
>
> Then passing a factory function will work, too—without reflection. Much more
> performance impact then checking a short string for a dot.
On 05/09/2011 10:15 PM, Thorsten Wilms wrote:
I tried to turn that into a transformation:
(defn substitute-token
[& values]
#(map (fn [m] (update-in m [:content]
(fn [c] (apply (partial replace-str
"token" %) c
values))
Apparently I had my brain knotted, but raek and fliebel on IRC helped
"How do I actually just load code w/o evaluating it?"
mostly when you want something like this, you want a macro. Manipulating
code is also done within macros.
http://www.gigamonkeys.com/book/macros-standard-control-constructs.html
http://www.gigamonkeys.com/book/macros-defining-your-own.html
Jon
On Tue, May 10, 2011 at 10:26 AM, Jonathan Fischer Friberg <
odysso...@gmail.com> wrote:
> "How do I actually just load code w/o evaluating it?"
> mostly when you want something like this, you want a macro. Manipulating
> code is also done within macros.
>
Yeah, I would consider the whole code-i
You might want to take a look at the clojars project:
https://github.com/ato/clojars-web
It's not quite to the scale you're looking for, but it's a start.
Also keep in mind that a lot of business apps in Clojure look more
like libraries (for a specific domain problem) than applications, so
lookin
Dear Max,
this works like a charm.
Thank you very much for real fast response.
--
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 pa
(def e1 {:a 1 :b "b" :c 300 })
(def e2 {:a1 :d "blah"})
how to merge to get that?
{:a 1 :b "b" :c 300 :d "blah"}
also is there a way to merge if the ArrayMap was in a vector?
Thanks.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this
Don't be put off by these initial difficulties; this stuff is really
different. I found this paper a very good read:
http://www.cs.kent.ac.uk/people/staff/dat/miranda/whyfp90.pdf
It puts the finger on a common problem:
"Such a catalogue of “advantages” is all very well, but one must not
be surpri
use (merge e1 e2)
Jonathan
On Tue, May 10, 2011 at 6:11 PM, clj123123 wrote:
> (def e1 {:a 1 :b "b" :c 300 })
> (def e2 {:a1 :d "blah"})
>
> how to merge to get that?
>
> {:a 1 :b "b" :c 300 :d "blah"}
>
>
> also is there a way to merge if the ArrayMap was in a vector?
>
> Thanks.
>
> --
> You
On May 9, 12:09 am, David Nolen wrote:
> On Sun, May 8, 2011 at 4:43 PM, Dmitry Kakurin
> wrote:
>
> > Very well, something along these lines would be my guess too.
> > But that would mean that in case 2 protocols are no faster
> > than multimethods.
They are much faster than multimethods beca
I wanted to merge ArrayMap in a vector. Is there a way to do that?
I put this together but wondering it there's already a library for
that.
(defn merge-by-field
"xt must have field vals unique"
[xs xt field]
(let [fmerge (fn [id s]
(merge s (first (filter #(= id (val (find % f
user> (let [inputs (concat e1 e2)]
(map (partial apply merge)
(vals (group-by :a inputs
({:d "blah", :a 1, :b "b", :c 300} {:d "blah2", :a 2, :b "a", :c 500})
On May 10, 10:10 am, clj123123 wrote:
> I wanted to merge ArrayMap in a vector. Is there a way to do that?
> I pu
On 10 May, 2011, at 13:50 , Adam Burry wrote:
> FYI, the best treatment of this problem I have seen is this one:
> http://www.cs.utoronto.ca/~hehner/PPP.pdf
There's also a compact Clojure solution based on the probability monad:
https://github.com/richhickey/clojure-contrib/blob/master/src/examp
G'day everyone,
Forgive me if this is not the appropriate place for this message, but
I'm in San Francisco for a few days from Johannesburg, South Africa.
Any clojure users keen on meeting up? Any clojure events going on that
I haven't spotted on-line?
I run a business using Clojure for web devel
On Tue, May 10, 2011 at 2:59 PM, Konrad Hinsen
wrote:
> On 10 May, 2011, at 13:50 , Adam Burry wrote:
>
>> FYI, the best treatment of this problem I have seen is this one:
>> http://www.cs.utoronto.ca/~hehner/PPP.pdf
>
> There's also a compact Clojure solution based on the probability monad:
>
> h
Hi,
Is it possible to make Clojure run the following toy program faster
(without changing the algorithm)?
(defn primeQ [n] (primes 2 (/ n 2) n))
(defn divQ [d n] (= (mod n d) 0))
(defn primes [d2 t2 n2]
(loop [d (int d2) t (int t2) n (int n2)]
(if (divQ d n) false
(if (> d t) true
On Tue, May 10, 2011 at 2:21 PM, Carl Cotner wrote:
> Hi,
>
> Is it possible to make Clojure run the following toy program faster
> (without changing the algorithm)?
>
> (defn primeQ [n] (primes 2 (/ n 2) n))
>
> (defn divQ [d n] (= (mod n d) 0))
>
> (defn primes [d2 t2 n2]
> (loop [d (int d2) t
Addendum: if you are using Clojure 1.3 alpha, function calls may avoid
boxing, but still have a call overhead, so you probably still want to
avoid them in your loops, and unchecked primitive math is done
differently. Check the documentation on that.
--
You received this message because you are su
On Tue, May 10, 2011 at 2:21 PM, Carl Cotner wrote:
> Hi,
>
> Is it possible to make Clojure run the following toy program faster
> (without changing the algorithm)?
>
> (defn primeQ [n] (primes 2 (/ n 2) n))
>
> (defn divQ [d n] (= (mod n d) 0))
>
> (defn primes [d2 t2 n2]
> (loop [d (int d2) t
Unfortunately, you just missed the monthly Bay Area user group meetup,
which was yesterday. But with Google I/O going on, maybe there are
enough people around that an impromptu meetup would be plausible.
Zach
On May 10, 1:07 pm, David Jagoe wrote:
> G'day everyone,
>
> Forgive me if this is not
On Tue, May 10, 2011 at 7:13 PM, Krukow wrote:
> > > And I've got an impression that protocols are described to be as fast
> as
> > > interface dispatch (callvirt).
>
> Almost as fast in case one. There is an indirection because of
> dispatch.
>
There is special support at the call site by the c
On 10 May 2011 15:00, Zach Tellman wrote:
> Unfortunately, you just missed the monthly Bay Area user group meetup,
Yeah I saw that... gutted!
> which was yesterday. But with Google I/O going on, maybe there are
> enough people around that an impromptu meetup would be plausible.
That would be g
(vary-meta (promise) assoc :foo 1) hangs in Clojure 1.2. I suspect
that vary-meta is somehow triggering an attempt to deref the promise.
--
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
(promise) hangs in 1.2, if you try to print it from the repl. There's
a ticket somewhere for better handling of non-delivered promises.
On May 10, 5:01 pm, Ken Wesson wrote:
> (vary-meta (promise) assoc :foo 1) hangs in Clojure 1.2. I suspect
> that vary-meta is somehow triggering an attempt to d
On Tue, May 10, 2011 at 8:04 PM, Alan wrote:
> (promise) hangs in 1.2, if you try to print it from the repl. There's
> a ticket somewhere for better handling of non-delivered promises.
Ah, damn. It should see if it's delivered or not and print
# or similar in that case rather than try to print it
I sent my contributor agreement through mail, months ago. I would to
know if was received, my requests was to clojure and clojure-contrib
projects
I didn't received any feedback yet.
Thanks a lot
--
“Success is having to worry about every damn thing in the world,
except money.” - Johnny Cash
-
Maybe try looking at the source of a project on github using logins/
sessions. One I'm currently using for reference is from 4clojure
https://github.com/dbyrne/4clojure
On May 10, 2:24 am, Shree Mulay wrote:
> For the life of me, I can't get sessions to work, immaterial of which
> tutorial I try
Hi Bruno,
Unless Rich has received your CA within the past couple weeks, I would say
he never received it.
The compete list of CAs that he is received (within the past couple weeks)
is here:
http://clojure.org/contributing
I'm assuming you sent it to the PO Box listed? Did you do anything spec
Hello everybody,
I tried to use clojure.set/rename-keys .. I kind of felt it has a little
odd behaviour... for example ..
(clojure.set/rename-keys {1 :a 2 :b 3 :c} {1 2 2 3 3 4})
returns
{4 :a}
I think a more reasonable behavior would be to have it return
{2 :a 3 :b 4 :c}
a further enhancem
Thanks, David, for your reply. I enjoyed your blog post, and I will
try 1.3 alpha!
Carl
On May 10, 5:58 pm, David Nolen wrote:
> It doesn't answer your question but maybe this will help you get some ideas
> on how to optimize your
> code:http://dosync.posterous.com/lispers-know-the-value-of-ev
On May 10, 5:47 pm, Ken Wesson wrote:
> Addendum: if you are using Clojure 1.3 alpha, function calls may avoid
> boxing, but still have a call overhead, so you probably still want to
> avoid them in your loops, and unchecked primitive math is done
> differently. Check the documentation on that.
T
Thanks for your thorough reply, Ken.
On May 10, 5:43 pm, Ken Wesson wrote:
>
> [...]
>
> 1: Algorithmic smarts. Division is expensive. Replace divQ's
> implementation in terms of mod with the algorithm binary GCD and it
> will probably be faster. Likewise the / n 2 in primeQ can be changed
> to a
On Tue, May 10, 2011 at 10:14 PM, Carl Cotner wrote:
> Thanks for your thorough reply, Ken.
You're welcome.
>> 3: Technical speedups. Avoid function calls inside inner loops, which
>> cause boxing and require var dereferencing. Fold divQ into primes,
>> since it's only used once in there.
>
> Ju
Thanks for the feedback and pointers.
On May 10, 11:37 am, Timothy Baldridge wrote:
> On Tue, May 10, 2011 at 10:26 AM, Jonathan Fischer Friberg <
>
> odysso...@gmail.com> wrote:
> > "How do I actually just load code w/o evaluating it?"
> > mostly when you want something like this, you want a m
I agree there are going to be problems with implementation as-well .. for
example if not all the keys in the current map are not in the kmap ... but
situation can be handled however, if we passed a function this is going to
be harder .. ..
On Wed, May 11, 2011 at 8:26 AM, Sunil S Nandihalli <
suni
On 10 May 2011, at 22:46, Ken Wesson wrote:
Interesting. It is, as I thought, very short with monads -- though
that version doesn't really use randomness, but instead enumerates all
the possibilities. You'd need slightly different monads to thread a
random bit-stream through instead of enumerati
42 matches
Mail list logo