user (time (dotimes [i 10] (contribmath-ceil (rand
Elapsed time: 4500.530303 msecs
On May 3, 12:38 am, bOR_ boris.sch...@gmail.com wrote:
user (time (dotimes [i 10] (contribmath-ceil (rand
Elapsed time: 4500.530303 msecs
nil
user (time
see inline
On Friday, 29 April 2011 04:25:58 UTC+1, kovasb wrote:
Thats some serious hacking. Definitely agree that distributed clojure
would be awesome.
Two points/questions:
1) Is this just a bug in DynamicClassLoader? Why doesn't it call
super.defineClass instead of falling back on the
Hey everyone,
I'm busy implementing a macro whose usage looks like this:
(defentity Person
{:name {:type String :validator name-validator}
:id-number {:type String :validator id-number-validator}
:height{:type Float :default 0.0}
:weight{:type Float :default 0.0}
Why not?
user (time (dotimes [_ 10] (Math/ceil 0.1)))
Elapsed time: 626.867 msecs
David
On Tue, May 3, 2011 at 3:38 AM, bOR_ boris.sch...@gmail.com wrote:
user (time (dotimes [i 10] (contribmath-ceil (rand
Elapsed time: 4500.530303 msecs
nil
user (time (dotimes [i
Hello,
Evaluating the form
(let [cache (atom {})]
(defmacro eval-cached
Just as eval, however it will return an existing object if it has
already been evaluated with it
[obj]
(when-not (contains? @cache obj)
(reset! cache (assoc @cache obj (eval obj
Hello,
I would like to announce the version 0.1 of the Lacij library,
a graph visualization library written in Clojure.
I would be really happy with any feedbacks and comments, on the code
or the architecture. Help is welcome to implement additional layout
algorithms.
From the README file:
Hello again,
This has solved the issue:
(let [cache (atom {})
cache-eval (fn [obj]
(when-not (contains? @cache obj)
(reset! cache (assoc @cache obj (eval obj
(@cache obj))]
(defmacro def-cached
Just as def, however it will return an existing object
Because I did not remember Math/ceil :-).
Point is, is there any consensus on what math library to use? Is (Math/...
in general the fastest?
--
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
On Tue, May 3, 2011 at 9:50 AM, bOR_ boris.sch...@gmail.com wrote:
Because I did not remember Math/ceil :-).
Point is, is there any consensus on what math library to use? Is (Math/...
in general the fastest?
For basic math, I'm not sure what could be faster than Java primitive
operators and
Keys from literal maps aren't sorted; you need a sorted map.
user= (keys {:z 1 :f 2 :a 0})
(:z :a :f)
user= (keys (sorted-map :z 1 :f 2 :a 0))
(:a :f :z)
On May 3, 4:08 am, David Jagoe davidja...@gmail.com wrote:
Hey everyone,
I'm busy implementing a macro whose usage looks like this:
I'm sure this can be simplyfied:
(defn mlg [attrs data]
(if (empty? attrs)
[ (reduce + (map :mv data)) {:children data}]
(let [parts (group-by (first attrs) data)
subtrees (map (fn [[value data]]
[value (mlg (rest attrs) (map #(dissoc % (first
On May 3, 2011, at 7:08 AM, David Jagoe wrote:
Can I rely on (keys some-literal-map) always returning the keys in the
order they were defined in the literal map?
In general, the key order is not guaranteed, but an array-map will maintain the
insertion order of the keys. Use the array-map
I'm sure this can be simplyfied:
(defn mlg [attrs data]
(if (empty? attrs)
[ (reduce + (map :mv data)) {:children data}]
(let [parts (group-by (first attrs) data)
subtrees (map (fn [[value data]]
[value (mlg (rest attrs) (map #(dissoc % (first
Whoa! Thanks Juan. I will start to understand/analyze this...
From: clojure@googlegroups.com [mailto:clojure@googlegroups.com] On
Behalf Of JuanManuel Gimeno Illa
Sent: Tuesday, May 03, 2011 11:40 AM
To: clojure@googlegroups.com
Subject: Re: RE: Multi-level
Thanks for the responses.
On 3 May 2011 17:39, Steve Miner stevemi...@gmail.com wrote:
On May 3, 2011, at 7:08 AM, David Jagoe wrote:
For your specific purpose, I would be careful about using a map as an
entity specification. If the order is significant, a vector of field
specifiers would
Hi Pierre
This looks very cool, I'd love to try it.
The version on clojars is 0.1.0-SNAPSHOT, could you upload 0.1.0?
How do you build it from source? I can't locate a build script.
Thanks,
Ambrose
On Tue, May 3, 2011 at 9:26 PM, Pierre Allix
pierre.allix.w...@googlemail.com wrote:
Hello,
I've previously linked[1] to my preview of Clojure Atlas – my attempt at
producing a more useful, more tractable medium for understanding programming
languages and the libraries that go along with them – so I won't repeat that
material here. I did think I'd let the list know that Clojure Atlas
You had:
(defmacro eval-cached [obj]
(when-not (contains? @cache obj)
(reset! cache (assoc @cache obj (eval obj
(@cache obj))
and:
(eval-cached fbody)
This results in eval-cached being called with obj bound to the symbol
'fbody rather than to the second argument to def-cached --
On Tue, May 3, 2011 at 8:03 AM, David Nolen dnolen.li...@gmail.com wrote:
Why not?
user (time (dotimes [_ 10] (Math/ceil 0.1)))
Elapsed time: 626.867 msecs
David
It's optimizing your loop away, or else you're using ridiculously
powerful hardware.
user= (time (dotimes [_ 100]
I wrote a simple implementation:
http://gist.github.com/953966https://gist.github.com/953966
(only supports operators)
It's not very elegant (I don't know how to use fnparse..), but it is
functional.
What it does is find out what the next element in the operator stack and the
out stack should be,
On Tue, May 3, 2011 at 2:34 PM, Chas Emerick cemer...@snowtide.com wrote:
There is a free (nagging) demo, but I assure you kittens will purr just for
you if you support Clojure Atlas' future development with your purchase.
You've put this thing behind a *paywall*? It's *information*. If you
There is a free (nagging) demo, but I assure you kittens will purr just
for
you if you support Clojure Atlas' future development with your purchase.
You know it's nice, the search is pretty cool. But it takes me longer to go
and search, or to chase little (i) symbols around than it does to
On Mon, May 2, 2011 at 8:23 PM, Nicolas Buduroi nbudu...@gmail.com wrote:
Is there a more functional way of writing it?
If you have imperative code implementing a conceptually-pure function,
the answer to this is always yes, in at least a trivial sense: you
can write a pure-functional
On Tue, May 3, 2011 at 3:15 PM, Timothy Baldridge tbaldri...@gmail.com wrote:
There is a free (nagging) demo, but I assure you kittens will purr just
for
you if you support Clojure Atlas' future development with your purchase.
You know it's nice, the search is pretty cool. But it takes me
On Tue, May 3, 2011 at 2:51 PM, Ken Wesson kwess...@gmail.com wrote:
It's optimizing your loop away, or else you're using ridiculously
powerful hardware.
user= (time (dotimes [_ 100] (Math/ceil (rand
Elapsed time: 142.86748 msecs
nil
Maybe, maybe not:
(do
(set! *unchecked-math*
Boo. Keep the paywall. Don't make me look at ads. And for the record,
you're not paying for information, but rather to have the information
presented in a particular way.
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send
This is awesome job, Chas, thanks for creating this!
2011/5/3 Chas Emerick cemer...@snowtide.com
I've previously linked[1] to my preview of Clojure Atlas – my attempt at
producing a more useful, more tractable medium for understanding programming
languages and the libraries that go along with
On May 3, 2011, at 3:15 PM, Timothy Baldridge wrote:
There is a free (nagging) demo, but I assure you kittens will purr just for
you if you support Clojure Atlas' future development with your purchase.
You know it's nice, the search is pretty cool. But it takes me longer to go
and
On Tuesday, May 3, 2011 3:20:25 PM UTC-4, David Nolen wrote:
On Tue, May 3, 2011 at 2:51 PM, Ken Wesson kwes...@gmail.com wrote:
It's optimizing your loop away, or else you're using ridiculously
powerful hardware.
user= (time (dotimes [_ 100] (Math/ceil (rand
Elapsed time:
On Tue, May 3, 2011 at 2:28 PM, Jeffrey Schwab j...@schwabcenter.comwrote:
Boo. Keep the paywall. Don't make me look at ads. And for the record,
you're not paying for information, but rather to have the information
presented in a particular way.
Well I think it's more of the case that
On May 3, 2011, at 3:28 PM, Jeffrey Schwab wrote:
Boo. Keep the paywall. Don't make me look at ads. And for the record,
you're not paying for information, but rather to have the information
presented in a particular way.
No worries, I've zero intention of using advertising of any sort.
On Tuesday, May 3, 2011 3:31:33 PM UTC-4, tbc++ wrote:
On Tue, May 3, 2011 at 2:28 PM, Jeffrey Schwab je...@schwabcenter.comwrote:
Boo. Keep the paywall. Don't make me look at ads. And for the record,
you're not paying for information, but rather to have the information
presented in
Since this thread from October focused on clojure.core/resultset-seq,
I thought I'd bump it again in the context of the (new)
clojure.java.jdbc library (formerly clojure.contrib.sql).
In order to support naming strategies, c.j.j uses an internal,
modified copy of resultset-seq that allows you to
Am 02.05.2011 23:14, schrieb David Nolen:
The relevant clojure-dev thread.
http://groups.google.com/group/clojure-dev/browse_thread/thread/f4907ebca8ef6e11
It's not clear whether the core team and the various contributors are
interested in supporting the behavior you want. It's also not clear
Hello everybody,
Can somebody tell me as to which is the location for the current version
of data.finger-tree .. the one I found via google was
git://github.com/clojure/data.finger-tree.git
Thanks,
Sunil..
--
You received this message because you are subscribed to the Google
Groups Clojure
Yes, that is the latest source.
One JAR has been released to the Maven Central Repository:
http://repo2.maven.org/maven2/org/clojure/data.finger-tree/0.0.1/
-Stuart S
clojure.com
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group,
IMHO c.j.j/resultset-seq should perform something like the following:
;; i want my columns as strings exactly how they are in the db
(resultset-seq rs)
(resultset-seq rs identity)
;; i want my columns as lower-case keywords
(resultset-seq rs (comp keyword lower-case))
;; i want my columns as
On Tue, May 3, 2011 at 11:34 AM, Chas Emerick cemer...@snowtide.com wrote:
I've previously linked[1] to my preview of Clojure Atlas – my attempt at
producing a more useful, more tractable medium for understanding programming
languages and the libraries that go along with them – so I won't
Anything implemented with multimethods (contrib.generic) will be slow
compared to primitives and Java methods invoked on primitives. Also try out
the better primitive math ops in the 1.3.0-alphas.
-Stuart
clojure.com
--
You received this message because you are subscribed to the Google
No. Clojure template (which I wrote) is a backwards way of doing macros. It
happens to be useful in clojure.test, but nowhere else.
-Stuart S
clojure.com
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to
On Tue, May 3, 2011 at 3:06 PM, Sean Corfield seancorfi...@gmail.com wrote:
It doesn't appear to include any of the contrib libraries (I know
that's a mammoth task for 1.2.0). Do you plan to include the new
contrib libraries in 1.3.0 since they seem more integrated now?
I also could not find:
On Tuesday, 3 May 2011 15:02:02 UTC-4, odyssomay wrote:
I wrote a simple implementation:
http://gist.github.com/953966https://gist.github.com/953966
(only supports operators)
It's not very elegant (I don't know how to use fnparse..), but it is
functional.
What it does is find out what
One small question, how would you modify your version to output
s-expressions?
--
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
On May 3, 5:22 pm, André Thieme splendidl...@googlemail.com wrote:
Some of the limitations:
1. (defmacro x [] `(let [a# ~(atom 0)]))
2. (defmacro y [] `(let [a# ~(comp inc inc)])) ; from that link
3. (defmacro z [] `(let [a# ~((fn [x#] (fn [] x#)) 0)]))
All three calls fail, (x) and (y)
On May 3, 2011, at 6:06 PM, Sean Corfield wrote:
It's a very cool way to visualize the Clojure world and to explore
what's available. One thing I found - which would definitely stop me
paying for it as-is - I get lost when I drill down: there's no way to
navigate 'back' to what I was looking
On May 3, 2011, at 6:29 PM, Sean Corfield wrote:
On Tue, May 3, 2011 at 3:06 PM, Sean Corfield seancorfi...@gmail.com wrote:
It doesn't appear to include any of the contrib libraries (I know
that's a mammoth task for 1.2.0). Do you plan to include the new
contrib libraries in 1.3.0 since
ALT-[LEFT|RIGHT] ARROW - nav back/forward
I was very pleased to have proper browsing history support - great way
to do breadcrumbs.
P.S.
When I started learning clojure a year ago, one of the biggest pain
points was not having a resource like this.
Dynamic languages, in general, and clojure, in
This is related to my multi-level bucketing problem which I am starting
new thread.
The code is at:
https://gist.github.com/952861
I am referring to the sum-by function which was provided by fellow
clojurer in this group. It choked when I passed in data of size one
million - meaning I
I've refactored your code into this: https://gist.github.com/954579
On Tuesday, 3 May 2011 15:02:02 UTC-4, odyssomay wrote:
I wrote a simple implementation:
http://gist.github.com/953966https://gist.github.com/953966
(only supports operators)
It's not very elegant (I don't know how to use
On Tue, May 3, 2011 at 4:39 PM, Chas Emerick cemer...@snowtide.com wrote:
That's interesting; I very intentionally built in proper support for
browser back/forward actions (as you discovered), thinking that that would be
a good local maxima in terms of history navigation.
I guess I could get
Hi,
being tired of wandering through a few thousand lines of XML Spring bean
definitions, I finally wrote a library
to start moving away from Spring/XML. It's definitively nicer doing dependency
injection/auto-wiring using Clojure.
This is part of our global effort here to confine Java as much
52 matches
Mail list logo