Re: [ANN] vectorz-clj - high performance vector maths for Clojure

2012-12-06 Thread Mikera
Great, let me know how it goes!

I just pushed matrix support today (v0.1.0), so hopefully that will make it 
usable for most game purposes. Though you might need to dip into the Java 
occasionally until I've build out the full Clojure API.

Let me know if you run into any API issues, I'm keen to fix these early 
rather than later

On Tuesday, December 4, 2012 1:52:11 AM UTC+8, Herwig Hochleitner wrote:
>
> I think this is a great addition to the ecosystem, thanks!
>
> Right now I'm considering doing a small game, just to give it a try.
>
>
> 2012/12/2 Mikera >
>
>> Sure - added instructions and uploaded version 0.0.1 to Clojars.
>>
>> Hopefully that works smoothly, any issues let me know.
>>
>> On Sunday, 2 December 2012 13:56:07 UTC, Michael Klishin wrote:
>>>
>>> 2012/12/2 Mikera 
>>>
>>> The Clojure library is here: 
>>> https://github.com/**mikera/vectorz-clj

>>>
>>> Please add installation/dependency instructions to the README.
>>>  -- 
>>> MK
>>>
>>> http://github.com/**michaelklishin 
>>> http://twitter.com/**michaelklishin 
>>>
>>>   -- 
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@googlegroups.com
>> Note that posts from new members are moderated - please be patient with 
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+u...@googlegroups.com 
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>>
>
>

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: [ANN] vectorz-clj - high performance vector maths for Clojure

2012-12-06 Thread Mikera
Good question.

I had a look at javax.vecmath, which is actually pretty good for a lot of 
purposes. Eventually I decided against using it (believe me, it would have 
been nice to re-use it so this was not a decision I took lightly!)

Here were the main issues:
- No support for large vectors / matrices. Maybe not critical for some game 
apps, but essential for simulations and machine learning. I feel a good 
vector library should be able to handle both.
- It's a bit too specialised around concrete classes. There aren't any 
abstractions that you can use for different vector types. Not fun in 
clojure when you want to work with abstractions (in vectorz I use an 
abstract base class AVector, for example, which makes it possible to 
implement many algorithms in a much more generic and flexible way)
- Performance is good in vecmath, but not perfect: there are some other 
optimisations worth making and I wanted the flexibility to do that. For 
example, it is often worth creating specialised matrix classes for scaling, 
identity etc.

On balance, I felt it was worth building a better library that fitted the 
broader design goals. 

On Tuesday, December 4, 2012 2:23:38 AM UTC+8, Michael Gardner wrote:

> On Dec 2, 2012, at 06:24 , Mikera > 
> wrote: 
>
> > Contributions / comments / suggestions very welcome. API is not yet set 
> in stone, so I'm very open to ideas on how to make it better. 
>
> Since the vast majority of physical applications will use 2D or 3D 
> vectors, did you consider building around javax.vecmath? I have to imagine 
> that would be faster than any generic vector implementation. I believe Zach 
> Tellman's cantor (no longer maintained) used a similar approach.

 
>

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: [ANN] vectorz-clj - high performance vector maths for Clojure

2012-12-03 Thread Michael Gardner
On Dec 2, 2012, at 06:24 , Mikera  wrote:

> Contributions / comments / suggestions very welcome. API is not yet set in 
> stone, so I'm very open to ideas on how to make it better.

Since the vast majority of physical applications will use 2D or 3D vectors, did 
you consider building around javax.vecmath? I have to imagine that would be 
faster than any generic vector implementation. I believe Zach Tellman's cantor 
(no longer maintained) used a similar approach.

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: [ANN] vectorz-clj - high performance vector maths for Clojure

2012-12-03 Thread Herwig Hochleitner
I think this is a great addition to the ecosystem, thanks!

Right now I'm considering doing a small game, just to give it a try.


2012/12/2 Mikera 

> Sure - added instructions and uploaded version 0.0.1 to Clojars.
>
> Hopefully that works smoothly, any issues let me know.
>
> On Sunday, 2 December 2012 13:56:07 UTC, Michael Klishin wrote:
>>
>> 2012/12/2 Mikera 
>>
>> The Clojure library is here: 
>> https://github.com/**mikera/vectorz-clj
>>>
>>
>> Please add installation/dependency instructions to the README.
>>  --
>> MK
>>
>> http://github.com/**michaelklishin 
>> http://twitter.com/**michaelklishin 
>>
>>   --
> 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, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: [ANN] vectorz-clj - high performance vector maths for Clojure

2012-12-02 Thread Mikera
Sure - added instructions and uploaded version 0.0.1 to Clojars.

Hopefully that works smoothly, any issues let me know.

On Sunday, 2 December 2012 13:56:07 UTC, Michael Klishin wrote:
>
> 2012/12/2 Mikera >
>
>> The Clojure library is here: https://github.com/mikera/vectorz-clj
>>
>
> Please add installation/dependency instructions to the README.
> -- 
> MK
>
> http://github.com/michaelklishin
> http://twitter.com/michaelklishin
>
>  

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

[ANN] vectorz-clj - high performance vector maths for Clojure

2012-12-02 Thread Mikera
Hi All,

I just open sourced a new Clojure library vectorz-clj with support for high 
performance vector maths in Clojure. It's fairly general purpose, and 
designed for use in 3D games, simulations and machine learning 
applications. I'm using it for my own machine learning apps and it is 
working very well (e.g. my talk at the Clojure Conj 2012 features some 
example usage)

Design goals:
 - Pure Java (i.e. avoid the need for dependencies on native code libraries 
like BLAS)
 - High performance, roughly defined as "as fast as you can reasonably get 
on the JVM"
 - Support multiple types of concrete vectors, e.g. primitive x,y,z 3D 
vectors as well as large general purpose (1000+ dimension vectors)
 - A nice Clojure API for vector operations (work in progress!)

The need for high performance means that underlying vectors need to be 
mutable (apologies to the purists!), however to make the API nice I've 
provided pure functional versions of operations as well as the in place 
operations that mutate their arguments. Hopefully this is a nice compromise 
between having access to high performance operations when you need them and 
allowing idiomatic Clojure usage when you don't e.g.

In-place "add!" mutates vector a:
  (add! a b)

Pure "add" creates a new vector:
  (let [result (add a b)] )

The Clojure library is here: https://github.com/mikera/vectorz-clj
The underlying vector data structures are in a separate Java 
library: https://github.com/mikera/vectorz

Contributions / comments / suggestions very welcome. API is not yet set in 
stone, so I'm very open to ideas on how to make it better.

  Mike.

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en