Re: Proper generic way to get the hash of something?

2016-12-03 Thread Tofu Ninja via Digitalmars-d-learn
Well for now I am going to revert back to 2.071.2, 2.072 seems broke as fuck.

Re: Proper generic way to get the hash of something?

2016-12-03 Thread Tofu Ninja via Digitalmars-d-learn
Actually better question, why was this breaking change allowed? The semantics of hashOf have completely changed, why was this done??

Proper generic way to get the hash of something?

2016-12-03 Thread Tofu Ninja via Digitalmars-d-learn
What is the proper generic way to get the hash of something? It seems that hashOf has been changed to no longer call toHash on anything Just blindly casts to void[]. It actually seems now toHash doesn't call any of the specializations of core.internal.hash.hashOf except the one for void[].

[Derelict-GL3] GLSL: Syntax error unexpected tokens following #version

2016-12-03 Thread Payotz via Digitalmars-d-learn
So I've been trying to teach myself how to OpenGL, and there are errors whenever I try to compile my shaders. Errors are : http://i.imgur.com/5hRaQL8.png My shader code is as follows: /// #version 130 attribute vec3 position; void main() { gl_Position = vec4(position,1.0); } /// My

Re: Returning structs from COM

2016-12-03 Thread Nicholas Wilson via Digitalmars-d-learn
On Saturday, 3 December 2016 at 09:51:00 UTC, John C wrote: Some DirectX methods return structs by value, but when I try calling them I either get garbage or an access violation. [...] I know for ldc that function that return struct by value actually return by a hidden return parameter

Re: using assignment statement as conditional in a where

2016-12-03 Thread rikki cattermole via Digitalmars-d-learn
On 04/12/2016 7:26 AM, dan wrote: On Saturday, 3 December 2016 at 09:03:25 UTC, rikki cattermole wrote: On 03/12/2016 9:55 PM, dan wrote: [...] If you can use another compiler do so, gdc is on an old frontend/Phobos now. I recommend ldc or you know the reference compiler dmd if

Re: using assignment statement as conditional in a where

2016-12-03 Thread dan via Digitalmars-d-learn
On Saturday, 3 December 2016 at 09:03:25 UTC, rikki cattermole wrote: On 03/12/2016 9:55 PM, dan wrote: [...] If you can use another compiler do so, gdc is on an old frontend/Phobos now. I recommend ldc or you know the reference compiler dmd if performance/platform isn't an issue (not that

Re: Building with dub fails on Ubuntu 16.10.

2016-12-03 Thread moe via Digitalmars-d-learn
On Saturday, 3 December 2016 at 16:07:47 UTC, moe wrote: On Sunday, 11 September 2016 at 02:17:21 UTC, Vlasov Roman wrote: Hello, guys. I tried to build HelloWorld with dub, but i got strange linker error: [...] I just switched from Windows to linux (arch) and got the exact same problem.

Re: Building with dub fails on Ubuntu 16.10.

2016-12-03 Thread moe via Digitalmars-d-learn
On Sunday, 11 September 2016 at 02:17:21 UTC, Vlasov Roman wrote: Hello, guys. I tried to build HelloWorld with dub, but i got strange linker error: [...] I just switched from Windows to linux (arch) and got the exact same problem. Did you resolve this yet? I'm not very experienced with

Re: the best language I have ever met(?)

2016-12-03 Thread eugene via Digitalmars-d-learn
On Friday, 18 November 2016 at 17:54:52 UTC, Igor Shirkalin wrote: That was preface. Now I have server written in D for C++ pretty ancient client. Most things are three times shorter in size and clear (@clear? suffix). All programming paradigms were used. I have the same text in russian, but

Returning structs from COM

2016-12-03 Thread John C via Digitalmars-d-learn
Some DirectX methods return structs by value, but when I try calling them I either get garbage or an access violation. Usually COM methods return structs by pointer as a parameter, but these are returning the struct as the actual return value, as in this definition: extern(Windows):

Re: using assignment statement as conditional in a where

2016-12-03 Thread rikki cattermole via Digitalmars-d-learn
On 03/12/2016 9:55 PM, dan wrote: In c, you can have code like this: static void wtest( void ) { int f; while ( ( f = some_val( ) ) ) { printf(" our value is now: %d\n", f ); } } gcc compiles this without warning or error (at least if you use the double parentheses to assure the

using assignment statement as conditional in a where

2016-12-03 Thread dan via Digitalmars-d-learn
In c, you can have code like this: static void wtest( void ) { int f; while ( ( f = some_val( ) ) ) { printf(" our value is now: %d\n", f ); } } gcc compiles this without warning or error (at least if you use the double parentheses to assure the compiler that you realize you are