Guys, I really need your expertise here.
I have lots of deeply nested vectors, which i need to manipulate
frequently (thousands of times)
What is the most effective way to do this ?
On Jan 17, 4:27 pm, Gabi wrote:
> Right. I thought that transient performing deep 'transientivity'.
> Here is a fix
> Just another option to consider:
> {:type :person, :name "Bill", :age 20}
Why then use defstruct at all? I think defstruct is useful, but it
would be even
more useful if I had nothing to fear if it "runs empty" sometime
because of
little design changes. It might be only experimental and later I
> I think your use of "workaround" is pejorative. And can it even be
> called a work around if it is a best practice even when there is
> nothing to work around?
I just can't understand why throwing an exception should be more
useful than returning some object you can actually work with.
I wouldn'
Unfortunately, that Wikibook is out of date. The `defservlet
On Jan 20, 1:19 am, Jeff Schwab wrote:
> Hi:
>
> The compojure wikibook claims that compojure provides a defservlet
> function, along with other syntactic conveniences that I seem to be
> missing. Grepping the git log didn't turn up an
Unfortunately, that wikibook is rather out of date by now. Compojure's
documentation is generally not in the best of states; however, I'm
holding off fixing it until I finish work on the next version in a
couple of months. There doesn't seem much point in writing docs for a
version that will soon b
Hi Gabi!
Can you tell us more about your problem, what do those deeply nested
vectors represent and how are you going to update them? (are all
updates batched in one part of your program?)
With transients current implementation you can't write an efficient update-in!
Christophe
On Wed, Jan 20,
These vectors represent trees which need to updated very frequently.
So If there was an efficient way to use transients to represent
transient trees the whole process would be much more efficient (so
each update to a tree would be done in place instead of creating new
one.) As discussed above, naiv
Gabi,
A similar technique is used with sparse matrices. You usually have
severals arrays, one for the non-zero elements, and another one for
indexing the column and a third for indexing the rows.
http://pasadena.wr.usgs.gov/office/baagaard/research/papers/thesis/figs/methods/sparseMatrix.gif
Thi
I need to add/delete much more frequently than just updating
actually.
On Jan 20, 4:59 pm, Sean Devlin wrote:
> Gabi,
> A similar technique is used with sparse matrices. You usually have
> severals arrays, one for the non-zero elements, and another one for
> indexing the column and a third for
How about a sorted set w/ a custom comparator? Of course, this rules
out transients, but maybe the flatness will make up for it?
On Jan 20, 10:15 am, Gabi wrote:
> I need to add/delete much more frequently than just updating
> actually.
>
> On Jan 20, 4:59 pm, Sean Devlin wrote:
>
> > Gabi,
> >
Can you elaborate more ? How can trees be represented in sorted sets?
On Jan 20, 5:24 pm, Sean Devlin wrote:
> How about a sorted set w/ a custom comparator? Of course, this rules
> out transients, but maybe the flatness will make up for it?
>
> On Jan 20, 10:15 am, Gabi wrote:
>
> > I need to
I concur: a map (or a sorted map if you need to emulate access to a
subtree) can be an option.
[[1 2] [3 4]] is represented by {[0 0] 1, [0 1] 2, [1 0] 3, [1 1] 4}
On Wed, Jan 20, 2010 at 4:24 PM, Sean Devlin wrote:
> How about a sorted set w/ a custom comparator? Of course, this rules
> out tr
I posted a question on SO about it. Interesting discussion:
http://stackoverflow.com/questions/2102606/algorithm-to-implement-non-binary-trees-using-1-dimensional-vector
On Jan 20, 5:39 pm, Christophe Grand wrote:
> I concur: a map (or a sorted map if you need to emulate access to a
> subtree) ca
"empty classes in Java" what does that mean?
as I said, structs are an optimization on maps, that optimization
doesn't work for empty structs, so empty structs "of course" don't
make sense
On Wed, Jan 20, 2010 at 12:39 AM, Andreas Wenger
wrote:
>> I think your use of "workaround" is pejorative.
Now your project can have the same documentation as Clojure, clojure-
contrib, and Incanter!
The standalone autodoc tool is now available. It can be run from the
command line and it integrates with Leiningen and ant. (Maven still to
come - let me know if you want to help.)
Autodoc builds full, st
On 19 Jan 2010, at 22:32, Stuart Sierra wrote:
You can include multiple definitions of the same method, with
different arguments, in a deftype.
(deftype Foo [f]
(bar [x] ...)
(bar [x y] ...))
Don't know if that's intended, but it works.
Indeed, thanks!
Assuming that this is an intentional
> These two are sufficient to convince many of the complexity of Concurrent
> programming. The way I try to convince people of the benefits of Clojure is
> by first explaining these 2 articles and then showing how easy life is with
> Clojure.
please also see CTM.
http://www.info.ucl.ac.be/~pvr/Va
Hi
using directly (not jline or others)
although pure REPL would be still fine, I have found how to make it work
in emacs WIN32
not sure if all of this is needed though
.emacs
(setq locale-coding-system 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(set-selec
In Clojure 1.1.0, the documentation states:
clojure.core/defmulti
([name docstring? attr-map? dispatch-fn & options])
Macro
Creates a new multimethod with the associated dispatch function.
The docstring and attribute-map are optional.
Options are key-value pairs and may be one of:
:defa
Any chance you could rethink your approach & use a zipper?
On Jan 20, 9:32 am, Gabi wrote:
> I posted a question on SO about it. Interesting
> discussion:http://stackoverflow.com/questions/2102606/algorithm-to-implement-non...
>
> On Jan 20, 5:39 pm, Christophe Grand wrote:
>
>
>
> > I concur:
Hi,
Java was my first language, and my favorite platform to work in, but I
do notice (especially after buying a mac and experiencing Mac OS X)
that gui programs written on the JVM are noticeably less responsive
than their native counterparts.
Some articles I read point to Java's use of garbage col
> Thanks for your opinions
for the most part, it is theoretically (and research implementations
have shown) that GC can be just as responsive from an end-user
perspective as manual memory management. i believe the price to pay is
usually a significantly larger memory footprint. and, there is nothi
That's fantastic news! I wholeheartedly recommend Autodoc, it has been
great for the Incanter project.
Here are examples of its output:
Clojure: http://richhickey.github.com/clojure/
Clojure-contrib: http://richhickey.github.com/clojure-contrib/
Incanter: http://liebke.github.com/incanter/
David
Tom Faulhaber writes:
> Now your project can have the same documentation as Clojure, clojure-
> contrib, and Incanter!
>
> The standalone autodoc tool is now available. It can be run from the
> command line and it integrates with Leiningen and ant. (Maven still to
> come - let me know if you want
Fantastic! Love it :)
--
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 with your
first post.
To unsubscribe from this group
James Reeves wrote:
Compojure's
documentation is generally not in the best of states; however, I'm
holding off fixing it until I finish work on the next version in a
couple of months.
Fair enough, thanks.
--
You received this message because you are subscribed to the Google
Groups "Clojure" g
> Looks great! A couple comments.
Thanks!
> * Adding "by unknown author" to namespaces that have no author metadata
> seems a bit superfluous.
Yeah, that's on my list to clean up. I did that in the old days to
shame the contrib authors into adding the metadata (and remind me to
bug them), but
2010/1/20 Jacek Generowicz :
> What is the purpose of the attribute map?
The attribute map is added to the meta-data of the created. Meta-data
contains info which can be used at runtime or to create documentation
but is not part of the object itself and does not affect equality.
Specifically for d
If you are talking about gui's written in swing you might have more
luck with AWT since that is supposed to be using native gui components
rather than doing it's rendering in java. I suspect that the
sluggishness of swing is due to the fact that it has to copy a lot of
data between the java heap an
hi,
in the repl when i (use 'foo) vs. (use :foo) they both return nil, so
it doesn't help me know that the former is right and the latter isn't.
i think. would it be sensible for use to return true or something more
positive than nil if it successfully brings in a namespace?
thanks.
--
You recei
30 matches
Mail list logo