<div class="gmail_quote">On 6 February 2012 10:49, a <span dir="ltr"><<a href="mailto:a@a.com">a@a.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Saturday, 4 February 2012 at 23:15:17 UTC, Manu wrote:<br>
<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
First criticism I expect is for many to insist on a class-style vector<br>
library, which I personally think has no place as a low level, portable API.<br>
Everyone has a different idea of what the perfect vector lib should look<br>
like, and it tends to change significantly with respect to its application.<br>
<br></div><div class="im">
I feel this flat API is easier to implement, maintain, and understand, and<br>
I expect the most common use of this lib will be in the back end of peoples<br>
own vector/matrix/linear algebra libs that suit their apps.<br>
<br>
My key concern is with my function names... should I be worried about name<br>
collisions in such a low level lib? I already shadow a lot of standard<br>
float functions...<br>
I prefer them abbreviated in this (fairly standard) way, keeps lines of<br>
code short and compact. It should be particularly familiar to anyone who<br>
has written shaders and such.<br>
</div></blockquote>
<br>
I prefer the flat API and short names too.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Opinions? Shall I continue as planned?<br>
</blockquote>
<br></div>
Looks nice. Please do continue :)<br>
<br>
You have only run this on a 32 bit machine, right? Cause I tried to compile this simple example and got some errors about converting ulong to int:<br></blockquote><div><br></div><div>True, I have only been working in x86 GDC so far, but I just wanted to get feedback about my approach and API design at this point.</div>
<div>It seems there are no serious objections, I'll continue as is. I have an ARM compiler too now, so I'll be implementing/testing against that as reference also.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
auto testfun(float4 a, float4 b)<br>
{<br>
return swizzle!("yxwz")(a);<br>
}<br>
<br>
It compiles if I do this changes:<br>
<br>
566c566<br>
< foreach(i; 0..N)<br>
---<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
foreach(int i; 0..N)<br>
</blockquote>
574c574<br>
< int i = countUntil(s, swizzleKey[0]);<br>
---<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
int i = cast(int)countUntil(s, swizzleKey[0]);<br>
</blockquote>
591c591<br>
< foreach(j, c; s) // find the offset of the ---<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
foreach(int j, c; s) // find the offset of the</blockquote>
</blockquote></div><br>