s with many sub-
components as namespaces? Maybe one day we could have:
(ns myproject
(:require subproject.* :as :suffix) to require subproject.foo1
subproject.foo2...
Thanks
Stu
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To
:as a]
[foo.baz.b :as b]
[foo.baz.c :as c...]))
Is there an idiomatic way of coalescing these :require clauses into
a :require "farm" that can be simply :require'd or is this the wrong
way to manage namespaces in Clojure projects?
Any advice much appreciated,
Stu
-
lling next() until
isDone() and using currentSegment() to retrieve the point
coordinates.
I'd guess this kind of iterator is widely used in the Java world, so
can some kind person point to an example of Clojure code using a Java
iterator in this way?
Thanks in advance,
Stu
--
You receiv
s for
safely using mutable Java objects in Clojure--especially with Clojure
parallel programming constructs in mind.
Thanks in advance,
Stu
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroup
ay of going about this?
Many thanks to Dave and Stephen for your answers--just what I
needed.
Stu
--
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 member
s ".dirname(__FILE__)/..."
construct but this kind of approach doesn't seem a good fit for
Clojure or for the JVM facilities it provides.
Can anyone point to a Clojure project that does this well?
Thanks,
Stu
--
You received this message because you are subscribed to the Google
Grou
well.
Do you have any Clojure examples of Batik use I could look at?
Thanks,
Stu
--
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
airo toolkit is also an option via the Gnome Java bindings and
Java interop?
Are there other options that I'm missing that anyone would like to
report on?
Thanks in advance,
Stu
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To pos
es a Color with that constructor.
Thanks Alan -- I realize now there's a subtle but important
distinction there when doing Java interop.
Stu
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@go
e instance as I expected, but I think I'm
missing something with the rest of the Color constructor. I've tried
changing the components to a vector of floats or a Java array of
floats with no luck.
This is with Clojure 1.2 and the Java Platform SE 6 AWT classes.
Any advice much appreciated.
S
Hi,
I wanted to take the opportunity to thank the people who responded to
my question on thinking beyond O-O. The replies form a very useful
slice through Clojure design strategies and idiomatic use of the
language.
Thanks!
Stu
--
You received this message because you are subscribed to the
d to use richer data structures than vectors and
structs for the shapes so they carry some kind of type information? I
can see how a draw multi-method would work if the individual shapes
could be distinguished, or am I going about this the wrong way?
Any advice much appreciated,
Stu
--
You received
th/vector
> math=> (vector 10)
> 10
> math=> (cvector 10)
> [10]
Thanks for that -- please bear with me on this: does that mean that
given the flexible options available in the (ns...) form as shown
here, Clojure developers don't need to choose non-shadowed names like
or (defn ve
form?
I've also seen instances of naming changes to avoid the problem, e.g.
(defstruct ...) and (defn vector+ ...)
but not sure if that's making best use of Clojure namespaces?
Any advice much appreciated,
Stu
--
You received this message because you are subscribed to the Google
side-effects,
* An additional interface check in conj/assoc?
But if after calling (conj v 1), you can't use the 'v' reference anymore,
then did you really cause a side effect? Its another tree falling in the
woods situation.
Thanks,
Stu
On Wed, Aug 5, 2009 at 9:05 AM, Rich Hickey
This won't work unfortunately, because it means that the in-memory transaction
has already commited before the disk write is performed by the agent. If the
application crashed at that point, your write was not durable.
-- Sent from my Palm Pre
ataggart wrote:
On Jun 20, 4:59 pm, Rowdy Rednos
e key.
I know global state is Considered Harmful, but I think this would clarify
the usage of metadata, and remove duplication in the implementation of
Clojure.
Thoughts?
Stu
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google G
I agree. I think the "breaking into modules" approach is the only scalable
solution.
Someone else mentioned that clojure-contrib is/shouldbe an incubating area
for core, which seems reasonable. There should be a little more pushback
when a project wants to make it into contrib, and it should alrea
Yea, that would work. I don't think the (fn) should be defined anonymously
though, because I could see it being useful on its own. Give it a name!
Thanks,
Stu
On Mon, Mar 16, 2009 at 6:53 PM, Brian Doyle wrote:
>
>
> On Mon, Mar 16, 2009 at 4:21 PM, Stu Hood wrote:
>
>>
If you write your CSV -> XML processing as a function, you could pmap (
http://clojure.org/api#pmap) that function across the list of input files.
pmap will transparently create the threads as needed, and it will probably
be enough to saturate your disk.
Thanks,
Stu
On Mon, Mar 16, 2009 at 5
There is a interface 'Counted' that a lot of Clojure data structures
implement to indicate that they provide O(1) for (count).
Thanks,
Stu
On Fri, Mar 13, 2009 at 4:59 AM, Christophe Grand wrote:
>
> Christian Vest Hansen a écrit :
> > I think that count is O(n) for lists
Rich has done a lot of work to make sure that when you are working with
primitives, the JVM bytecode ends up being very similar to what Java would
generate. See http://clojure.org/java_interop#toc36
Thanks,
Stu
On Thu, Mar 12, 2009 at 6:20 PM, Howard Lewis Ship wrote:
>
> Well, at some
generated
when they were actually needed, and saved memory the rest of the time.
Thanks,
Stu
On Mon, Mar 2, 2009 at 1:17 AM, Laurent PETIT wrote:
> Hello,
>
> The way I think about it is "am I in a portion of code that does "pure
> functional stuff", or am I doing side eff
> but apply works very well for this use case: (apply < (range 10))
> and it stops as soon as it can:
Alright, I fold... thanks for clearing things up Christophe!
On Tue, Feb 3, 2009 at 3:13 PM, Christophe Grand wrote:
>
> Stu Hood a écrit :
> > I still think the
> >
ems like it would be very easy to allow (+) to
take a sequence.
I still think the
> (< (range 10))
... use case is really worthwhile though, and I don't see a way to
accomplish it with reduce.
Thanks,
Stu
On Tue, Feb 3, 2009 at 1:36 PM, Christophe Grand wrote:
>
> Hello,
>
change that is commutative/indempotent.
Also, RWDict fell apart on a quad core machine (independent of the
number of writes): I'll try with the alternative fairness setting like
you suggested.
Thanks,
Stu
On 1/16/09, Christian Vest Hansen wrote:
>
> Another thing you might want to
You do that.
-another Stuart
On Thu, Jan 15, 2009 at 10:32 PM, Stuart Sierra wrote:
>
> I was afraid that would happen. I'll fix it, probably tomorrow.
> -the other Stuart
>
> On Jan 15, 6:27 pm, Stuart Halloway wrote:
> > The improved error reposting in test-is breaks some tests, e.g. from
>
centages:
http://github.com/stuhood/clojure-conc/tree/master/results
Two conclusions:
1. The overhead for STM with low contention is very reasonable,
2. Optimism + MVCC + persistence fall down when faced with a majority of
writes. (see the 100% write case in the writes graph.)
Thanks,
Stu
On
28 matches
Mail list logo