Hi All,
On Fri, Dec 24, 2010 at 4:32 PM, Meikel Brandmeyer wrote:
> Most interesting is also the relation between the different versions on the
> given machine. Just the numbers of one algorithm aren't really comparable, I
> guess. (different machine, different load, different phase of moon, wh
Hi,
Am 24.12.2010 um 02:08 schrieb Ken Wesson:
> It's also possible that -server vs. -client is an issue here, also
> running it a few times in a row so JIT will have kicked in. I used
> -server and ran each test a few times until the numbers settled down
> before posting my timings here; I'm not
On Fri, Dec 24, 2010 at 12:06 AM, Benny Tsai wrote:
>> You're welcome. Sorry I couldn't be of greater help. If you want, I
>> could throw together a quickie macro for grabbing a few items from
>> either end of a seq.
> Sure, that would be cool :)
OK, here goes ...
(defmacro ends [[[firsts mid la
Sure, that would be cool :)
Sorry for the hijack, Marek!
On Dec 23, 5:09 pm, Ken Wesson wrote:
> On Thu, Dec 23, 2010 at 7:08 PM, Benny Tsai wrote:
> > On Dec 22, 11:42 am, Ken Wesson wrote:
> >> I don't think Clojure has that. Closest is
>
> >> (let [[f & rst] [1 2 3 4 5]
> >> l (last r
I am interested in the references to pods that are floating around the
internet. However, when i downloaded the github master repository, i
couldn't find pod anywhere. Of course there are 17 other branches...
Clojures support for mutable multithreading is great if there are no
side effects, but som
On Thu, Dec 23, 2010 at 7:08 PM, Benny Tsai wrote:
> On Dec 22, 11:42 am, Ken Wesson wrote:
>> I don't think Clojure has that. Closest is
>>
>> (let [[f & rst] [1 2 3 4 5]
>> l (last rst)
>> m (butlast rst)]
>> [f m l])
>>
>> Output is [1 (2 3 4) 5]
>>
>> Obviously, using the last e
On Thu, Dec 23, 2010 at 5:10 PM, Sean Corfield wrote:
> On Thu, Dec 23, 2010 at 12:31 PM, Mark Engelberg
> wrote:
>> Any ideas why people are getting such radically different results on
>> their machines? It's hard for library writers to write any kind of
>> optimized code if "optimized" on one
On Dec 22, 11:42 am, Ken Wesson wrote:
> I don't think Clojure has that. Closest is
>
> (let [[f & rst] [1 2 3 4 5]
> l (last rst)
> m (butlast rst)]
> [f m l])
>
> Output is [1 (2 3 4) 5]
>
> Obviously, using the last element is non-lazy. It may well be that in
> cases where you'd w
Neat trick! Thanks David :)
On Dec 22, 11:23 am, David Nolen wrote:
> On Wed, Dec 22, 2010 at 1:22 PM, David Nolen wrote:
> > On Wed, Dec 22, 2010 at 1:14 PM, Benny Tsai wrote:
>
> >> Hi Ken,
>
> >> > user=> (let [[x y & more] [1 2 3 4 5]] [x y more])
> >> > [1 2 (3 4 5)]
> >> > user=> (let [[
I think that's an even more opinionated "no". :)
On Dec 23, 4:54 pm, "nicolas.o...@gmail.com"
wrote:
> On Thu, Dec 23, 2010 at 10:29 PM, Meikel Brandmeyer wrote:
> > Hi,
>
> > Am 23.12.2010 um 23:15 schrieb nicolas.o...@gmail.com:
>
> >> If I were to write such a patch, would it be accepted?
>
>
On Thu, Dec 23, 2010 at 10:29 PM, Meikel Brandmeyer wrote:
> Hi,
>
> Am 23.12.2010 um 23:15 schrieb nicolas.o...@gmail.com:
>
>> If I were to write such a patch, would it be accepted?
>
> I lean now quite a bit out the window, but I dare say: „No.“ The reason I
> think so is that this is opiniona
On 23 Gru, 05:51, Robert McIntyre wrote:
> I think it would be really cool to have a function that gives the
> total number of bytes that a data structure consumes.
Here is a tiny utility I wrote some time ago; it's not very accurate,
but
might come in handy:
https://gist.github.com/417669
bes
Hi,
Am 23.12.2010 um 23:15 schrieb nicolas.o...@gmail.com:
> If I were to write such a patch, would it be accepted?
I lean now quite a bit out the window, but I dare say: „No.“ The reason I think
so is that this is opinionated.
Sincerely
Meikel
--
You received this message because you are su
On Thu, Dec 23, 2010 at 9:28 PM, Meikel Brandmeyer wrote:
> Hi,
>
> Am 23.12.2010 um 15:26 schrieb nicolas.o...@gmail.com:
>
>> Is there a way to make some mutable fields public in a deftype?
>
> I think it is opinionated, that this is not possible as the documentation
> states explicitly that th
On Thu, Dec 23, 2010 at 12:31 PM, Mark Engelberg
wrote:
> Any ideas why people are getting such radically different results on
> their machines? It's hard for library writers to write any kind of
> optimized code if "optimized" on one machine means "slower" on
> another.
FWIW, I've experienced r
Hi,
Am 23.12.2010 um 15:26 schrieb nicolas.o...@gmail.com:
> Is there a way to make some mutable fields public in a deftype?
I think it is opinionated, that this is not possible as the documentation
states explicitly that the fields will be private when made mutable. You could
write a special
Hi,
Am 23.12.2010 um 00:08 schrieb Stuart Halloway:
> Nothing about multiple small bundles prevents doing a bigger bundled release
> as well. There continues to be a "kitchen sink" contrib, and there can be a
> "batteries included" build of the newer libs too. Repositories are orthogonal
> to
Any ideas why people are getting such radically different results on
their machines? It's hard for library writers to write any kind of
optimized code if "optimized" on one machine means "slower" on
another.
--
You received this message because you are subscribed to the Google
Groups "Clojure" g
To motivate contributors, I'd recommend that now would be a great time
for someone on the clojure/core team to post a summary of the
highlights of what has been accomplished this year, and some of the
key things on the agenda for next year.
--
You received this message because you are subscribed
On Thu, Dec 23, 2010 at 3:03 PM, Remco van 't Veer wrote:
> On my system it is about 10x faster than the code in the original
> thread. Together with the amount of time saved writing it, it's full
> seconds, maybe even minutes faster! I guess your nanoseconds and are
> not my nanoseconds.. ;)
On Wed, Dec 22, 2010 at 9:40 PM, Alex Baranosky <
alexander.barano...@gmail.com> wrote:
> Hi
>
> I've been playing with multimethods, and trying to see if there was a way
> to dispatch on a non-specific result of the dispatching function, such as a
> range, like this:
>
> (defn how-to-move [map1 m
On 2010/12/23 18:30, Ken Wesson wrote:
> On Thu, Dec 23, 2010 at 3:24 AM, Remco van 't Veer wrote:
>> Simpler and faster:
>>
>> (count (clojure.string/replace s " " ""))
>
> Simpler, yes, but not at all faster:
>
> Time (in nanoseconds): 120485.9396
>
> This is about comparable to the slow, unop
I completely disagree. If arbitrary load order were sufficient, there
wouldn't be (prefer-method). (And CL wouldn't have a complex
heuristic for ordering.) In reality, you may be extending someone
else's library by calling (defmethod) on their (defmulti). And you
could be using someone else's l
On Thu, Dec 23, 2010 at 1:37 PM, Jay Fields wrote:
> 2010/12/23 Ken Wesson
>>
>> It most certainly is not.
>
> Yes, it is.
Is not!
>> Unlike cond clauses, methods might be
>> scattered in different parts of a large code base
>
> _might_ be. But they don't need to be.
It suffices for my argumen
2010/12/23 Ken Wesson
> It most certainly is not.
>
Yes, it is.
> Unlike cond clauses, methods might be
> scattered in different parts of a large code base
_might_ be. But they don't need to be. I'd rather group my methods, know
what I'm doing, and have to configure less. Anything that requi
(set! *unchecked-math* true)
(defn count-num-chars ^long [^String s]
(let [l (.length s)
c \space]
(loop [i 0 acc 0]
(if (< i l)
(recur (inc i)
(if (identical? (.charAt s i) c) acc
(inc acc)))
acc
Clojure 1.3.0-master-SNAPSH
On Thu, Dec 23, 2010 at 5:13 AM, Jay Fields wrote:
> (Outer$Inner.) currently works as long as you (ns foo (:import [bar
> Outer$Inner]))
Ah, good to know. I didn't actually have a test case handy - I just
wondered how Clojure handled $ in such symbol names, give the OP
comment.
--
Sean A Corfi
On Thu, Dec 23, 2010 at 3:24 AM, Remco van 't Veer wrote:
> Simpler and faster:
>
> (count (clojure.string/replace s " " ""))
Simpler, yes, but not at all faster:
Time (in nanoseconds): 120485.9396
This is about comparable to the slow, unoptimized loop posted at the
start of this thread. Frank
On Thu, Dec 23, 2010 at 8:51 AM, Jay Fields wrote:
> Ken said:
> "That seems sucky. What about adding a priority parameter to your
> defmethod-analogue? The predicates are kept sorted by priority."
> I disagree. To use your terms, I think your solution is equally "sucky".
It most certainly is not
On Thu, Dec 23, 2010 at 11:29 AM, Paul Mooser wrote:
> So, doesn't this represent a bug at least ? I'm sometimes confused
> when this sort of issue doesn't get more attention, and I'm uncertain
> what the process is for filing a bug, since my impression is that we
> are supposed to have issues va
So, doesn't this represent a bug at least ? I'm sometimes confused
when this sort of issue doesn't get more attention, and I'm uncertain
what the process is for filing a bug, since my impression is that we
are supposed to have issues validated by discussion on the group
before filing an actual tic
On Dec 23, 10:41 am, David Nolen wrote:
> I would ping the devs of cake and make sure that they are aware of the
> issue.
>
> David
Did so already -
http://groups.google.com/group/clojure-cake/browse_thread/thread/addf355043dcc2d7
Amitava
--
You received this message because you are subscribe
On Thu, Dec 23, 2010 at 10:33 AM, Amitava Shee wrote:
>
> > I don't know the details, but the ticket is here:
> >
> > http://dev.clojure.org/jira/browse/CLJ-31?page=com.atlassian.jira.plu...
> >
> > Perhaps better if the REPL caught exceptions in the manner that Clojure's
> > REPL does:
> >
> > ht
> I don't know the details, but the ticket is here:
>
> http://dev.clojure.org/jira/browse/CLJ-31?page=com.atlassian.jira.plu...
>
> Perhaps better if the REPL caught exceptions in the manner that Clojure's
> REPL does:
>
> https://github.com/clojure/clojure/blob/master/src/clj/clojure/main.c...
>
On Dec 23, 4:51 am, Robert McIntyre wrote:
> I think it would be really cool to have a function that gives the
> total number of bytes that a data structure consumes.
>
> so something like:
>
> (total-memory [1 2 [1 2]])
>
> would return however many bytes this structure is.
>
> Is there already s
Dear all,
Is there a way to make some mutable fields public in a deftype?
Best regards,
Nicolas
--
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 moder
On Nov 28, 2010, at 9:07 PM, Jeremy Dunck wrote:
In Dec 2009, Rich asked the community to step up and support core
development -- and the community came through.
I'm interested in clojure, but not using it professionally yet. I was
wondering if funding for 2011 has already been worked out, or
Ken said:
"That seems sucky. What about adding a priority parameter to your
defmethod-analogue? The predicates are kept sorted by priority."
I disagree. To use your terms, I think your solution is equally "sucky".
Sometimes adding config parameters makes sense and sometimes it adds noise. In
th
(Outer$Inner.) currently works as long as you (ns foo (:import [bar
Outer$Inner]))
I couldn't tell if you were asking, but I thought I'd mention it for those that
have never noticed.
Sent from my iPhone
On Dec 22, 2010, at 5:41 PM, Sean Corfield wrote:
> Since nested classes in Java get com
If you want to know how your program uses memory, try using some Java
profiling tool like VisualVM shipped with JDK.
On Wed, 22 Dec 2010 23:51:48 -0500
Robert McIntyre wrote:
> I think it would be really cool to have a function that gives the
> total number of bytes that a data structure consume
limux writes:
> The clojure has released the 1.2 version, while swank-clojure.el is
> used 1.1 yet, Is swank-clojure deprecated at all?
Well, to be more precise; yes, swank-clojure.el is now unnecessary. You
only need clojure-mode and slime. But see Phil's page for the details.
-Steve
--
You
limux writes:
> The clojure has released the 1.2 version, while swank-clojure.el is
> used 1.1 yet, Is swank-clojure deprecated at all?
Nope. Version 1.3 was just released. Take a look here for more info:
https://github.com/technomancy/swank-clojure
-Steve
--
You received this message becau
Simpler and faster:
(count (clojure.string/replace s " " ""))
On 2010/12/22 18:52, Rayne wrote:
> I have a piece of code, and I'd like to see how fast it can be.
>
> (defn count-num-chars [^String s]
> (loop [s s acc 0]
> (if (seq s)
> (recur (rest s) (if (= (first s) \space) acc
On 2010/12/23 05:51, Robert McIntyre wrote:
> I think it would be really cool to have a function that gives the
> total number of bytes that a data structure consumes.
>
> so something like:
>
> (total-memory [1 2 [1 2]])
>
> would return however many bytes this structure is.
>
> Is there already
44 matches
Mail list logo