On Aug 4, 5:40 am, Phil Hagelberg wrote:
> Maven actually supports dependency resolution. While I don't like Maven
> much for most things, its dependency resolution mechanism and repository
> format is quite good.
Regarding Maven and Ivy, their dependency resolution appears to be
somewhat differ
> My guess would be you're seeing the overhead for pmap since the
> (inc 0.1) computation is so cheap. From the docs for pmap:
> "Only useful for computationally intensive functions where the time of
> f dominates the coordination overhead."
I don't think so, as the cheap computation (inc 0.
> Please correct me if I'm wrong, but both Maven and Ivy appear to be
> designed to resolve dependencies during build time.
Ivy can be used as set of Ant tasks, stand-alone command line tool or
as a library. If used as a library there is nothing stopping you to
resolve your dependencies at runti
On Aug 4, 10:57 am, Krešimir Šojat wrote:
> Ivy can be used as set of Ant tasks, stand-alone command line tool or
> as a library. If used as a library there is nothing stopping you to
> resolve your dependencies at runtime.
Could you give me an example of how you'd use Ivy in a standalone
capaci
Holy smokes. This is great. It's been said before and it'll be said again:
Rich really knows what he's doing.
This will make number crunching in Clojure even more attractive.
Question: Suppose I want to write code that will run on 1.0 but take
advantage of transients if available. Is there a more
On second thought, I see that my code snippet wouldn't work. The following
analogous code throws an exception.
(if (resolve 'foo) (foo 1) 1)
I also see that I can't use try-catch to catch symbol resolution exceptions.
Does this mean I have to test for the Clojure version before runtime? In an
an
Very clever, Meikel.
--~--~-~--~~~---~--~~
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 wit
On Tue, Aug 4, 2009 at 2:22 AM, Meikel Brandmeyer wrote:
>
> Hi,
>
> On Aug 3, 10:10 pm, John Harrop wrote:
>
> > (defn and-ns
> > "A non-short-circuiting \"and\" usable in reduce etc."
> > ([] true)
> > ([a] a)
> > ([a b] (and a b))
> > ([a b & more] (reduce and-ns (and a b) more)))
>
Hi
I'm playing with the new transient/persistent! features in Clojure. I
have implemented quicksort as described on wikipedia (http://
en.wikipedia.org/wiki/Quicksort#Algorithm). Here is the code:
(defn swap-index! [v i j]
(let [tmp (v i)]
(assoc! v i (v j))
(assoc! v j tmp)))
(defn p
On Aug 3, 6:19 pm, Meikel Brandmeyer wrote:
> Hi,
>
> On Aug 3, 10:16 am, Adie wrote:
>
> > for e.g
> > (import '(javax.persistence Persistence)
> > gives a
> > java.lang.ClassNotFoundException: javax.persistence.Persistence
> > (NO_SOURCE_FILE:0) error
>
> > How will i import javax.persistenc
Coming from Ruby land and having used other languages before, I feel
rubygems is quiet a good solution to this problem. Having something like
this in Clojure would be terrific for a person like me who is just starting
up.
>
> > $ clod install foo
> > => installing... done.
> > $ clj
> > user=> (us
Hi,
On Aug 4, 1:21 pm, James Reeves wrote:
> Could you give me an example of how you'd use Ivy in a standalone
> capacity? I was unable to find an example of Ivy being used in the
> same way one would use Rubygems or Apt.
You can do "java -jar ivy.jar --help" to see the options you have,
when
Hi to myself,
On Aug 4, 1:45 pm, Meikel Brandmeyer wrote:
> You can have separate servers for ivy.xmls and artifacts. However the
> problem is that this is configured on a per repository basis. So one
> can't
> have to two ivy.xmls in the same repository with different artifact
> patterns.
> At
On 4 kol, 13:21, James Reeves wrote:
> Could you give me an example of how you'd use Ivy in a standalone
> capacity? I was unable to find an example of Ivy being used in the
> same way one would use Rubygems or Apt.
In your project you would create standard ivy.xml and ivysettings.xml
files as
Looks very interesting !
One question: wouldn't seem more natural to have transient named transient!
and persistent! named persistent ?
I see a call to transient as "Enter the mutable world", so it seems to me
(transient! []) conveys more this meaning than (transient []).
I see a call to persist
On Tue, Aug 4, 2009 at 2:22 AM, Meikel Brandmeyer wrote:
>
> Hi,
>
> On Aug 3, 10:10 pm, John Harrop wrote:
>
>> (defn and-ns
>> "A non-short-circuiting \"and\" usable in reduce etc."
>> ([] true)
>> ([a] a)
>> ([a b] (and a b))
>> ([a b & more] (reduce and-ns (and a b) more)))
>
> Don'
Jonas wrote:
> Can you give any hints on how I can make the transient sort faster? I
> would like to get as close as possible to the native Java speed.
My guess is that you need primitive type hints. For example:
(let [pivot-value (v pivot-index)]
could be:
(let [pivot-value (int
On Tue, Aug 4, 2009 at 7:54 AM, Laurent PETIT wrote:
> Looks very interesting !
>
> One question: wouldn't seem more natural to have transient named transient!
> and persistent! named persistent ?
>
> I see a call to transient as "Enter the mutable world", so it seems to me
> (transient! []) conve
I get ~8% performance boost by turning swap-index! into a macro:
(defmacro swap-index! [v i j]
`(let [tmp# (~v ~i)]
(assoc! ~v ~i (~v ~j))
(assoc! ~v ~j tmp#)))
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Grou
ok...
2009/8/4 Rich Hickey
>
> On Tue, Aug 4, 2009 at 7:54 AM, Laurent PETIT
> wrote:
> > Looks very interesting !
> >
> > One question: wouldn't seem more natural to have transient named
> transient!
> > and persistent! named persistent ?
> >
> > I see a call to transient as "Enter the mutable
On Aug 4, 12:51 pm, Krešimir Šojat wrote:
> In your project you would create standard ivy.xml and ivysettings.xml
> files as described on Ivy site. Download Ivy (and Ant jars if you will
> create or use Packagers). After that you can retrieve your
> dependencies from command line
As Piyush menti
Rich,
First of all, thank you for informing the community about this before
you push it into Clojure 1.1/2.0. Developers are people, and it takes
time for us to adjust to change. Advance warning helps a lot.
As for the changes themselves, I don't know yet. Now, I've only
thought about this br
On Tue, Aug 4, 2009 at 3:55 PM, Albert Cardona wrote:
>
> Jonas wrote:
>> Can you give any hints on how I can make the transient sort faster? I
>> would like to get as close as possible to the native Java speed.
>
>
> My guess is that you need primitive type hints. For example:
>
> (let [piv
2009/8/4 James Reeves :
>
> On Aug 4, 12:51 pm, Krešimir Šojat wrote:
>> In your project you would create standard ivy.xml and ivysettings.xml
>> files as described on Ivy site. Download Ivy (and Ant jars if you will
>> create or use Packagers). After that you can retrieve your
>> dependencies fr
James,
Just go for it. You've certainly proved you can design a library.
Deliver something that works for you, and tell us if you think it's
ready. If it's better than other stuff (which I suspect it will be),
the community will start using it. If not, back to the drawing board.
Sean
On Aug 4
Hi,
On Aug 4, 3:38 pm, Lauri Pesonen wrote:
> (Note: I've been writing Ant macros for the past few weeks and
> I'm starting to develop a very serious case of XML allergy.)
You might want to take a look at Gradle[1]. It exchanges XML for
Groovy,
which might be an advantage or not. It uses Ivy u
Okay, I saw this and it *screams* Clojure
http://julian.togelius.com/mariocompetition2009/
It's a AI competition for playing Super Mario. The goal is to deliver
a solution on the JVM.
For me, this is an excuse for working through Norvig's classic text.
I'd be interested in what other people co
you can't really use this as regular old mutable data.
if you store it somewhere, and then you change it, the original will
break.
i don't really see how you could use this in a non-functional way and
still
have it work at all.
like, you probably won't actually be let-binding them very often.
see
I haven't tried the code, so caveat emptor:
If you convert partition to a macro *AND* use type-hints, I suspect
you'll see a win. The issue here is the primitive boxing that must
occur when when calling a function. It's my hope that when a macro is
used with the appropriate type hints, the Cloj
Meikel said,
>
> I think, "clojure context" is underestimating things. The high
> integration
> of external Java libraries makes it necessary that such dependencies
> can be handled in the same way.
>
>
On the other hand, will this package system be able to stradle and
accommodate future platforms
I think there may be a somewhat straightforward solution to improving
Clojure's performance when passing primitives between functions.
Here's my understanding of the problem: The IFn interface is a series
of invoke method signatures that take a number of java.lang.Objects as
parameters and return
I think there may be a somewhat straightforward solution to improving
Clojure's performance when passing primitives between functions.
Here's my understanding of the problem: The IFn interface is a series
of invoke method signatures that take a number of java.lang.Objects as
parameters and return
Whoops, submitted that a bit too soon.
I guess only couple of things to add:
(1) The cost of obtaining the primitive array and returning it to the
cache is likely no worse than operations on an ArrayList, so those
should be very cheap.
(2) The cost of coercing the primitive to a java.lang.Num
James Reeves writes:
> On Aug 4, 12:51 pm, Krešimir Šojat wrote:
>> In your project you would create standard ivy.xml and ivysettings.xml
>> files as described on Ivy site. Download Ivy (and Ant jars if you will
>> create or use Packagers). After that you can retrieve your
>> dependencies from
Actually, you probably wouldn't want to use an array. Instead, cache
could be made up of IPrimitiveHolder objects:
public interface IPrimitiveHolder {
public java.lang.Object toBoxedObject();
public int toChar();
public int toByte();
public int toInt();
...
}
On Aug 4, 8:06 am,
You are suggesting creating mutable boxed numbers with an object pool.
You might want to do this with a custom classes, not a one-element
array, because you want to be able to tell if this is your hack or
just someone is passing a one-element array ...
> Once the threadlocal cache is of sufficie
> You might want to do this with a custom classes, not a one-element
> array, because you want to be able to tell if this is your hack or
> just someone is passing a one-element array ...
Crossed in the air :)
Another question - at what point do the objects return to the pool?
It seems to me tha
On Aug 4, 8:12 am, Boris Mizhen - 迷阵 wrote:
> You are suggesting creating mutable boxed numbers with an object pool.
>
> You might want to do this with a custom classes, not a one-element
> array, because you want to be able to tell if this is your hack or
> just someone is passing a one-elemen
On Tue, Aug 4, 2009 at 11:02 AM, Mark Addleman wrote:
>
> I think there may be a somewhat straightforward solution to improving
> Clojure's performance when passing primitives between functions.
> Here's my understanding of the problem: The IFn interface is a series
> of invoke method signatures
>> I don't think this is true if you take closures into account.
>
> I hadn't thought about closures. I can see how closures can increase
> the number of primitive holder objects but I don't see that they
> inviolate the approach. It's possible that closures would explode the
> size of the objec
On Aug 4, 8:21 am, Rich Hickey wrote:
> On Tue, Aug 4, 2009 at 11:02 AM, Mark Addleman
> wrote:
>
> > I think there may be a somewhat straightforward solution to improving
> > Clojure's performance when passing primitives between functions.
> > Here's my understanding of the problem: The IFn
> Second, the caching is a barrier to escape analysis. Since rather than
> seeing a freshly-boxed integer 42, which can be optimized away, the
> compiler sees a branch into cache lookup code that returns something
> the compiler cannot know, thus it can't get rid of the lookup.
Rich, please pardon
> As a second point, I don't like the introduction of assoc!, conj!,
> etc. It just strikes me as another bug to have (oh, right, I need
> assoc! not assoc...).
At least you will get a very clear error, I think it's possible to get
a compile time error if you are dealing with a local.
It will be
These aren't criticisms, just trying to understand this better.
So assoc! etc. return a new instance of the transient? Or do they
return the same transient? If they return a new instance, what
exactly is the advantage (though, obviously there is one, from the
transcript). If they return the sa
On Aug 4, 12:35 pm, Howard Lewis Ship wrote:
> These aren't criticisms, just trying to understand this better.
>
> So assoc! etc. return a new instance of the transient?
They return the next value of the transient.
> Or do they
> return the same transient?
I'm not promising that they do.
>
On Tue, Aug 4, 2009 at 10:03 AM, Rich Hickey wrote:
>
>
>
> On Aug 4, 12:35 pm, Howard Lewis Ship wrote:
>> These aren't criticisms, just trying to understand this better.
>>
>> So assoc! etc. return a new instance of the transient?
>
> They return the next value of the transient.
>
>> Or do they
On Aug 4, 11:27 am, Boris Mizhen - 迷阵 wrote:
> > Second, the caching is a barrier to escape analysis. Since rather than
> > seeing a freshly-boxed integer 42, which can be optimized away, the
> > compiler sees a branch into cache lookup code that returns something
> > the compiler cannot know,
On Tue, Aug 4, 2009 at 1:06 PM, Howard Lewis Ship wrote:
>
> On Tue, Aug 4, 2009 at 10:03 AM, Rich Hickey wrote:
>>
>>
>>
>> On Aug 4, 12:35 pm, Howard Lewis Ship wrote:
>>> These aren't criticisms, just trying to understand this better.
>>>
>>> So assoc! etc. return a new instance of the transie
I'm a noob, so this is probably a dumb question but, how does this work with
closures? Can transients be closed over?
Like,
(defn make-transient-counter [init-val]
> (let [acounter (transient [init-val])]
> (fn [add-val] (assoc! acounter 0 (+ add-val (nth acounter 0))
>
Is that possib
On Tue, Aug 4, 2009 at 1:32 PM, John Newman wrote:
>
> I'm a noob, so this is probably a dumb question but, how does this work with
> closures? Can transients be closed over?
>
> Like,
>
>> (defn make-transient-counter [init-val]
>> (let [acounter (transient [init-val])]
>> (fn [add-val] (a
On Aug 4, 11:08 am, Jonas wrote:
> Hi
>
> I'm playing with the new transient/persistent! features in Clojure. I
> have implemented quicksort as described on wikipedia (http://
> en.wikipedia.org/wiki/Quicksort#Algorithm). Here is the code:
>
> (defn swap-index! [v i j]
> (let [tmp (v i)]
>
As Rich says, a cache would probably destroy the performance.
The current prerequisite to optimizing away boxed parameters, is that the
JVM can inline the function call and the JVM usually inlines a lot!
It can even inline code that C++ cannot, i.e. code that is virtual.
It avoids code bloat by on
I was looking into the question raised in the "Question about pmap"
thread, and noticed that on my Mac and on a Linux virtual machine, a
recent git version of clojure (about 1 week old) seems to use more
parallelism in 'pmap' than its source code in core.clj would imply is
the intent. The code th
On Tue, Aug 4, 2009 at 1:39 PM, Rich Hickey wrote:
>
> On Tue, Aug 4, 2009 at 1:32 PM, John Newman wrote:
> >
> > I'm a noob, so this is probably a dumb question but, how does this work
> with
> > closures? Can transients be closed over?
> >
> > Like,
> >
> >> (defn make-transient-counter [init-v
Johann:
Could it be that your CPU has a single floating-point unit shared by 4
cores on a single die, and thus only 2 floating-point units total for
all 8 of your cores? If so, then that fact, plus the fact that each
core has its own separate ALU for integer operations, would seem to
explain the
On Aug 4, 4:31 pm, John Harrop wrote:
> On Tue, Aug 4, 2009 at 1:39 PM, Rich Hickey wrote:
>
> > On Tue, Aug 4, 2009 at 1:32 PM, John Newman wrote:
>
> > > I'm a noob, so this is probably a dumb question but, how does this work
> > with
> > > closures? Can transients be closed over?
>
> > > L
Ugh. A couple minutes of more careful searching and I had the
answer. It isn't because the map used by pmap is eager, it is because
it optimizes for input collections that are chunked.
It seems worth considering modifying pmap to either:
(1) use a lazy version of map, with no optimization for
When reflection warning is on, i get 2 warnings on every my file:
reference to field getClass can't be resolved.
reference to field getClassLoader can't be resolved.
Is this something i should be worried about ?
--~--~-~--~~~---~--~~
You received this message bec
Thanks
On Mon, Aug 3, 2009 at 6:03 PM, Phil Hagelberg wrote:
> Leotis buchanan writes:
>
> > I located the process, using nstat, and then I killed it,This worked,
> > however this also killed my slime connection, which is bad, how can I
> > release the address without killing the slime connecti
59 matches
Mail list logo