Re: 2D graphics options with Clojure?

2011-04-30 Thread Nathan Sorenson
Batik can serialize to both PNG and PDF. http://xmlgraphics.apache.org/batik/ I currently use Batik in a clojure project doing a lot of drawing of 2d vector-based images. It's a very extensive library but it suits my needs well. On Apr 29, 9:26 pm, stu stuart.hungerf...@gmail.com wrote: Hi,

Declarative Data Models

2011-04-30 Thread David Jagoe
G'day everyone, Are there any libraries or projects that are similar to Python Traits or Zope Schemas (http://pypi.python.org/pypi/zope.schema) for clojure. I am developing a compojure application and there is a lot of duplication between areas of the codebase, e.g. - Fields listed on the

Re: swank-cdt: Using Slime with the Clojure Debugging Toolkit

2011-04-30 Thread Christian Schuhegger
I am using maven directly to work with clojure and I had the problem with the tools.jar, too. I resolved it by adding the following block to my pom.xml: profiles profile iddefault-tools.jar/id activation property namejava.vendor/name valueSun

Re: Declarative Data Models

2011-04-30 Thread Ambrose Bonnaire-Sergeant
Hi David, I can only comment on a subset of your post. Records can be cumbersome to work with during early stages of development, when everything is rather volatile (when isn't it?). You might like to try using maps instead. They are easier to work with when you are working out what properties

Re: SubVector's (via 'subvec') do not support 'transient'

2011-04-30 Thread Armando Blancas
Check this out: http://clojure.org/Transients On Apr 29, 10:54 am, Nathan Sorenson n...@sfu.ca wrote: (transient (subvec [1 2 3 4 5] 0 2)) fails with a class cast exception. Is this expected/unavoidable? How do I know whether the vectors I'm passed are regular vectors or come via subvec? I'm

Re: 2D graphics options with Clojure?

2011-04-30 Thread Dave Ray
I've also had success with Batik for server-side image generation. As long as you don't mind SVG. Dave On Saturday, April 30, 2011, Nathan Sorenson n...@sfu.ca wrote: Batik can serialize to both PNG and PDF. http://xmlgraphics.apache.org/batik/ I currently use Batik in a clojure project doing

Re: Parallelism

2011-04-30 Thread Armando Blancas
does access to lets say second part of partitioned range cause first part to be materialized or no? Yes, it does. My second question is connected to first. If we have 4 cores and *pmap *starts 4 threads to perform our function on 4 parts of partitioned range, is this happening in parallel,

Re: 2D graphics options with Clojure?

2011-04-30 Thread Brenton
Stu, Just a quick thought, you can use Java2D for the images and then iText to create the PDFs. Brenton On Apr 29, 9:26 pm, stu stuart.hungerf...@gmail.com wrote: Hi, I'm developing a Clojure project that loads and creates a bunch of simple 2D geometry (lines, polygons, beziers, text etc).

Re: SubVector's (via 'subvec') do not support 'transient'

2011-04-30 Thread Nathan Sorenson
I've read that, and the claim seems to be that Vectors support transience. Within Clojure's abstraction SubVectors are Vectores: (vector? (subvec [1 2 3] 0 2)) = true. On Apr 30, 8:27 am, Armando Blancas armando_blan...@yahoo.com wrote: Check this out:http://clojure.org/Transients On Apr 29,

Re: SubVector's (via 'subvec') do not support 'transient'

2011-04-30 Thread Ken Wesson
On Sat, Apr 30, 2011 at 11:27 AM, Armando Blancas armando_blan...@yahoo.com wrote: On Apr 29, 10:54 am, Nathan Sorenson n...@sfu.ca wrote: (transient (subvec [1 2 3 4 5] 0 2)) fails with a class cast exception. Is this expected/unavoidable? How do I know whether the vectors I'm passed are

Re: SubVector's (via 'subvec') do not support 'transient'

2011-04-30 Thread Nathan Sorenson
Yes but the contract of subvec is that it returns a persistent vector and the resulting data structure returns true under the vector? predicate. I know that subvec returns a different type because I've looked at the Java source code but that's a leaky abstraction. On Apr 30, 10:57 am, Ken Wesson

Re: Declarative Data Models

2011-04-30 Thread Paul deGrandis
I'm not exactly sure of your specific use case, but you should take a look at clojure.template. It could be what you're looking for. http://clojuredocs.org/clojure_core/clojure.template Paul On Apr 30, 3:39 am, Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com wrote: Hi David, I can

Re: Parallelism

2011-04-30 Thread Miki
I think you'll find http://blip.tv/file/4645227 relevant to the subject. I shows the inner working of pmap. -- 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

Re: swank-cdt: Using Slime with the Clojure Debugging Toolkit

2011-04-30 Thread George Jahad
With Lance's help, I've gotten a better understanding of why CDT fails with Cake. The problem is that Cake makes use of Classlojure, (https://github.com/ninjudd/classlojure), which allows multiple versions of clojure to be loaded in the same vm simultaneously. (It's pretty cool!) Anyways that