Re: Vector Swizzling in D

2012-03-15 Thread Don Clugston
On 14/03/12 18:46, Boscop wrote: On Wednesday, 14 March 2012 at 17:35:06 UTC, Don Clugston wrote: In the last bit of code, why not use CTFE for valid(string s) instead of templates? bool valid(string s) { foreach(c; s) { if (c 'w' || c 'z') return false; } return true; } In fact you can use

Re: Vector Swizzling in D

2012-03-15 Thread Boscop
Thanks for the suggestions, I updated the article with an improved CTFE version at the end.

Re: Vector Swizzling in D

2012-03-14 Thread Dmitry Olshansky
On 14.03.2012 18:57, Boscop wrote: Hi everyone, I wrote a blog post for people who know a bit of D and want to dig deeper, it shows different approaches to get vector swizzling syntax in D: http://boscop.tk/blog/?p=1 There is nothing revolutionary involved but it might still be useful

Re: Vector Swizzling in D

2012-03-14 Thread Dmitry Olshansky
On 14.03.2012 19:03, Dmitry Olshansky wrote: On 14.03.2012 18:57, Boscop wrote: Hi everyone, I wrote a blog post for people who know a bit of D and want to dig deeper, it shows different approaches to get vector swizzling syntax in D: http://boscop.tk/blog/?p=1 There is nothing revolutionary

Re: Vector Swizzling in D

2012-03-14 Thread H. S. Teoh
On Wed, Mar 14, 2012 at 03:57:02PM +0100, Boscop wrote: Hi everyone, I wrote a blog post for people who know a bit of D and want to dig deeper, it shows different approaches to get vector swizzling syntax in D: http://boscop.tk/blog/?p=1 There is nothing revolutionary involved

Re: Vector Swizzling in D

2012-03-14 Thread Don Clugston
On 14/03/12 15:57, Boscop wrote: Hi everyone, I wrote a blog post for people who know a bit of D and want to dig deeper, it shows different approaches to get vector swizzling syntax in D: http://boscop.tk/blog/?p=1 There is nothing revolutionary involved but it might still be useful

Re: Vector Swizzling in D

2012-03-14 Thread Boscop
On Wednesday, 14 March 2012 at 17:35:06 UTC, Don Clugston wrote: In the last bit of code, why not use CTFE for valid(string s) instead of templates? bool valid(string s) { foreach(c; s) { if (c 'w' || c 'z') return false; } return true; } In fact you can use CTFE for the