Re: [Chicken-users] new egg: glm

2013-04-17 Thread Kristian Lein-Mathisen
Hi guys,

I decided to use a MIT license like Dan suggested. It's what GLM uses, and
it will probably make life easier if at some point we want to embed the GLM
sources into this egg (GLM is a header-only implementation).

It should be fairly stable now and hopefully usable, but please help me
test! I've tagged version 1.0 and made a release-info file:

https://github.com/Adellica/chicken-glm/raw/master/glm.release-info

I'd be glad to see this in the official egg-index!
Thanks,
K.


On Tue, Apr 16, 2013 at 12:03 AM, Mario Domenech Goulart 
mario.goul...@gmail.com wrote:

 Hi Kristian,

 On Mon, 15 Apr 2013 23:24:25 +0200 Kristian Lein-Mathisen 
 kristianl...@gmail.com wrote:

  I'll license it with whatever fits the Chicken model and community.
  Is that BSD perhaps?

 Yes.

 Best wishes.
 Mario
 --
 http://parenteses.org/mario

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] new egg: glm

2013-04-17 Thread Mario Domenech Goulart
On Wed, 17 Apr 2013 14:21:22 +0200 Kristian Lein-Mathisen 
kristianl...@gmail.com wrote:

 I decided to use a MIT license like Dan suggested. It's what GLM
 uses, and it will probably make life easier if at some point we want
 to embed the GLM sources into this egg (GLM is a header-only
 implementation).

 It should be fairly stable now and hopefully usable, but please help
 me test! I've tagged version 1.0 and made a release-info file:

 https://github.com/Adellica/chicken-glm/raw/master/glm.release-info

 I'd be glad to see this in the official egg-index!

Thank you, Kristian.  I've added it to the coop.

Best wishes.
Mario
-- 
http://parenteses.org/mario

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] new egg: glm

2013-04-15 Thread Kristian Lein-Mathisen
Dear Chickeners!

In my OpenGL and physics-simulation adventures I have fequently come across
the need for a small math library in Chicken. I spent some time looking at
the eggs out there, but some of them seemed a little overkill for my needs,
so I decided to roll my own.

I was looking for:
- binary compatible with C/OpenGL/GLSL data-storage (f32vectors and friends)
- simple to use and short naming/syntax
- can multiply/add etc vector/matrix
- includes some transformation helpers like translate, rotate and scale
- not a lot of dependencies

In C++ land, it seems like GLM math library is popular, and it matches the
criteria above (except language). A few days in, I've got a fairly
functional math util egg:

https://github.com/Adellica/chicken-glm

Feedback is very welcome! In particular, because of all the different types
(vec2, vec3, ivec2 etc), I wrote a template macro which does basic
substring substitution:

(template
 `((D 2 3 4))
 (define (make-vecD  fill) (make-f32vector D fill))
 (define (make-dvecD fill) (make-f64vector D fill))
 (define (make-ivecD fill) (make-s32vector D fill))
 (define (make-uvecD fill) (make-u32vector D fill))
 (define (make-bvecD fill) (make-u8vector D fill)))

That will expand the body three times, each time substituting D with 2~4.
This works quite nicely and saves me a lot of copy-paste, but I don't know
if it's in the Scheme spirit. Any thoughts?

Vectors use structures from srfi-4, and matrices get their own record
(storing column-count along with its srfi-4 vector).

Once chicken-glm stabelizes a little, I'd like to make it reachable from
chicken-install.
K.
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] new egg: glm

2013-04-15 Thread Dan Leslie

Wild!

I've looked at binding GLM a few times but shied away from the wall of 
templates. Your solution is a rather elegant hack, IMHO, leaving little 
to the clients of your bindings to fuss about.


What's the license?

-Dan

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] new egg: glm

2013-04-15 Thread Kristian Lein-Mathisen
I'm glad to hear, I hope this will come in handy.

I'll license it with whatever fits the Chicken model and community. Is that
BSD perhaps?

It still needs a bit of work though, let me know if there are any feature
requests and I'll see what I can do.

K.
On Apr 15, 2013 7:14 PM, Dan Leslie d...@ironoxide.ca wrote:

 Wild!

 I've looked at binding GLM a few times but shied away from the wall of
 templates. Your solution is a rather elegant hack, IMHO, leaving little to
 the clients of your bindings to fuss about.

 What's the license?

 -Dan

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] new egg: glm

2013-04-15 Thread Mario Domenech Goulart
Hi Kristian,

On Mon, 15 Apr 2013 23:24:25 +0200 Kristian Lein-Mathisen 
kristianl...@gmail.com wrote:

 I'll license it with whatever fits the Chicken model and community.
 Is that BSD perhaps?

Yes.

Best wishes.
Mario
-- 
http://parenteses.org/mario

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users