January 16, 2012
On Monday, 16 January 2012 at 19:27:16 UTC, F i L wrote:
> Whoops! opBinary should be opOpAssign in my examples.

wait... no, opBinary was the right one... i'm confusing myself here :D
January 16, 2012
Am 16.01.2012 03:54, schrieb JoeCoder:
> On 1/15/2012 1:42 PM, Walter Bright wrote:
>>
>> A nice vector math library for D that puts us competitive will be a nice
>> addition to Phobos.
>
> The gl3n library might be something good to build on:
> https://bitbucket.org/dav1d/gl3n
>
> It looks to be a continuation of the OMG library used by Deadlock, and
> is similar to the glm (http://glm.g-truc.net) c++ library which emulates
> glsl vector ops in software.
>
> We'd need to ask if it can be re-licensed from MIT to Boost.
Hi,

that's definitly possible! But to be honest, I don't  think putting gl3n into phobos is a good idea. Why does phobos, the std. lib, need a vector-lib? I haven't seen any other language with something like gl3n in the std. lib. Also I used my own PEP-8, C (K&R with spaces) style, it would be a real pain changing this to the Phobos style. One more point is, that it's not just a Vector-lib, it also does Matrix-, Quaternion-math, interpolation and implements some other useful mathematical functions (as found in GLSL).
Of course I am open to a discussion.

PS:// I already talked with Manu about this topic, and I don't wait too long, gl3n will have core.simd support soon.
January 16, 2012
On 1/16/2012 1:26 PM, David wrote:
> PS:// I already talked with Manu about this topic, and I don't wait too long,
> gl3n will have core.simd support soon.

Awesome. I was hoping that adding simd support would have a an "enabling" effect for a lot of great library improvements!
January 16, 2012
On Mon, 16 Jan 2012 22:26:55 +0100, David <d@dav1d.de> wrote:

> Am 16.01.2012 03:54, schrieb JoeCoder:
>> On 1/15/2012 1:42 PM, Walter Bright wrote:
>>>
>>> A nice vector math library for D that puts us competitive will be a nice
>>> addition to Phobos.
>>
>> The gl3n library might be something good to build on:
>> https://bitbucket.org/dav1d/gl3n
>>
>> It looks to be a continuation of the OMG library used by Deadlock, and
>> is similar to the glm (http://glm.g-truc.net) c++ library which emulates
>> glsl vector ops in software.
>>
>> We'd need to ask if it can be re-licensed from MIT to Boost.
> Hi,
>
> that's definitly possible! But to be honest, I don't  think putting gl3n into phobos is a good idea. Why does phobos, the std. lib, need a vector-lib?

To make it all the easier for those who want to make games in D?


> I haven't seen any other language with something like gl3n in the std. lib. Also I used my own PEP-8, C (K&R with spaces) style, it would be a real pain changing this to the Phobos style. One more point is, that it's not just a Vector-lib, it also does Matrix-, Quaternion-math, interpolation and implements some other useful mathematical functions (as found in GLSL).
> Of course I am open to a discussion.

IMO, we should have vectors, matrices, quaternions and all those other
neat things easily accessible in the language (dual quaternions? Are they
used in games?)


> PS:// I already talked with Manu about this topic, and I don't wait too long, gl3n will have core.simd support soon.

Looking forward to it.
January 16, 2012
On 1/16/2012 4:26 PM, David wrote:
> Why does phobos, the std. lib, need a vector-lib? I haven't seen any
> other language with something like gl3n in the std.

I guess this depends on the goals for phobos.  Is it minimal, or batteries included?  As for not seeing it in other languages, I don't think there's very many low-level, high performance languages that take a batteries-included approach to the standard library.

I'd argue that a std.math3d would be used just as much, if not more, than std.complex.
January 16, 2012
On 16 January 2012 22:32, JoeCoder <dnewsgroup2@yage3d.net> wrote:
> On 1/16/2012 4:26 PM, David wrote:
>>
>> Why does phobos, the std. lib, need a vector-lib? I haven't seen any other language with something like gl3n in the std.
>
>
> I guess this depends on the goals for phobos.  Is it minimal, or batteries included?  As for not seeing it in other languages, I don't think there's very many low-level, high performance languages that take a batteries-included approach to the standard library.
>
> I'd argue that a std.math3d would be used just as much, if not more, than std.complex.

Since when did people use std.complex? :~)

-- 
Iain Buclaw

*(p < e ? p++ : p) = (c & 0x0f) + '0';
January 17, 2012
>
> (dual quaternions? Are they
> used in games?)
>
> yes


January 17, 2012
David wrote:

> Am 16.01.2012 03:54, schrieb JoeCoder:
>> On 1/15/2012 1:42 PM, Walter Bright wrote:
>>>
>>> A nice vector math library for D that puts us competitive will be a nice addition to Phobos.
>>
>> The gl3n library might be something good to build on: https://bitbucket.org/dav1d/gl3n
>>
>> It looks to be a continuation of the OMG library used by Deadlock, and is similar to the glm (http://glm.g-truc.net) c++ library which emulates glsl vector ops in software.
>>
>> We'd need to ask if it can be re-licensed from MIT to Boost.
> Hi,
> 
> that's definitly possible! But to be honest, I don't  think putting gl3n
> into phobos is a good idea. Why does phobos, the std. lib, need a
> vector-lib? I haven't seen any other language with something like gl3n
> in the std. lib. Also I used my own PEP-8, C (K&R with spaces) style, it
> would be a real pain changing this to the Phobos style. One more point
> is, that it's not just a Vector-lib, it also does Matrix-,
> Quaternion-math, interpolation and implements some other useful
> mathematical functions (as found in GLSL).
> Of course I am open to a discussion.
> 
> PS:// I already talked with Manu about this topic, and I don't wait too long, gl3n will have core.simd support soon.

gl3n has a really good API with regards to game development
(resembling GLSL helps), although I guess changing to a more Phobos
style might be needed for inclusion. I think having it in the standard
library would be extremely useful, though - no need to implement it myself
then. Typical matrices used in gamedev (4x4 etc) woud be really useful as
well (as said before, I'd even like stuff like AABBoxes, but let's go for
vectors/matrices/quaternions first .
January 17, 2012
On 1/16/2012 7:21 PM, Danni Coy wrote:
>     (dual quaternions? Are they
>     used in games?)
>
> yes
>

While the GPU tends to do this particular step of the work, the answer in general is 'definitely'.  One of the most immediate applications of dual quats was to improve the image quality of joints on characters that twist and rotate at the same time (shoulder blades, wrists, etc), at a minimal increase (or in some cases equivalent) computational cost over older methods.

http://isg.cs.tcd.ie/projects/DualQuaternions/

January 17, 2012
Am 17.01.2012 05:31, schrieb Kiith-Sa:
> David wrote:
>
>> Am 16.01.2012 03:54, schrieb JoeCoder:
>>> On 1/15/2012 1:42 PM, Walter Bright wrote:
>>>>
>>>> A nice vector math library for D that puts us competitive will be a nice
>>>> addition to Phobos.
>>>
>>> The gl3n library might be something good to build on:
>>> https://bitbucket.org/dav1d/gl3n
>>>
>>> It looks to be a continuation of the OMG library used by Deadlock, and
>>> is similar to the glm (http://glm.g-truc.net) c++ library which emulates
>>> glsl vector ops in software.
>>>
>>> We'd need to ask if it can be re-licensed from MIT to Boost.
>> Hi,
>>
>> that's definitly possible! But to be honest, I don't  think putting gl3n
>> into phobos is a good idea. Why does phobos, the std. lib, need a
>> vector-lib? I haven't seen any other language with something like gl3n
>> in the std. lib. Also I used my own PEP-8, C (K&R with spaces) style, it
>> would be a real pain changing this to the Phobos style. One more point
>> is, that it's not just a Vector-lib, it also does Matrix-,
>> Quaternion-math, interpolation and implements some other useful
>> mathematical functions (as found in GLSL).
>> Of course I am open to a discussion.
>>
>> PS:// I already talked with Manu about this topic, and I don't wait too
>> long, gl3n will have core.simd support soon.
>
> gl3n has a really good API with regards to game development
> (resembling GLSL helps), although I guess changing to a more Phobos
> style might be needed for inclusion. I think having it in the standard
> library would be extremely useful, though - no need to implement it myself
> then. Typical matrices used in gamedev (4x4 etc) woud be really useful as
> well (as said before, I'd even like stuff like AABBoxes, but let's go for
> vectors/matrices/quaternions first .
AABB are also planed for gl3n.