Re: Rebind template

2016-08-20 Thread Jack Applegame via Digitalmars-d-learn
On Sunday, 21 August 2016 at 00:06:07 UTC, Engine Machine wrote: On Saturday, 20 August 2016 at 22:21:00 UTC, ag0aep6g wrote: On 08/21/2016 12:11 AM, Engine Machine wrote: Is there a way to rebind the arguments of a template? template foo(X) { // X is like A!(a,b,c) Y = Rebind!(X,d,e,f);

Re: Linking to static libraries with a local DMD install

2016-08-20 Thread rikki cattermole via Digitalmars-d-learn
On 21/08/2016 5:01 PM, Henry GOuk wrote: On Sunday, 21 August 2016 at 04:32:29 UTC, rikki cattermole wrote: On 21/08/2016 3:54 PM, Henry GOuk wrote: Please post the error message, without it we're guessing. $ dub build Performing "debug" build using dmd for x86_64. vibe-d:utils 0.7.29: target

Re: Linking to static libraries with a local DMD install

2016-08-20 Thread Henry GOuk via Digitalmars-d-learn
On Sunday, 21 August 2016 at 04:32:29 UTC, rikki cattermole wrote: On 21/08/2016 3:54 PM, Henry GOuk wrote: Please post the error message, without it we're guessing. $ dub build Performing "debug" build using dmd for x86_64. vibe-d:utils 0.7.29: target for configuration "library" is up to dat

Re: Linking to static libraries with a local DMD install

2016-08-20 Thread rikki cattermole via Digitalmars-d-learn
On 21/08/2016 3:54 PM, Henry GOuk wrote: Hi, Due to some security limitations, I've had to install DMD in my home folder on one of my university computers. When trying to build a basic vibe.d application (i.e., the one created by dub init test --type=vibe.d), linking fails with a large number o

Linking to static libraries with a local DMD install

2016-08-20 Thread Henry GOuk via Digitalmars-d-learn
Hi, Due to some security limitations, I've had to install DMD in my home folder on one of my university computers. When trying to build a basic vibe.d application (i.e., the one created by dub init test --type=vibe.d), linking fails with a large number of undefined references to functions in

What is the correct way to run the auto-tester tests on FreeBSD?

2016-08-20 Thread Jeremy DeHaan via Digitalmars-d-learn
I'm trying to figure out how to run the auto-tester tests locally on FreeBSD and I'm running into an issue. I managed to get the tests to run on a 32 bit after a fashion, but I can't seem to get the tests to run successfully on the 64 bit version. Here's what I've done so far. git cloned dmd,

Re: Rebind template

2016-08-20 Thread Engine Machine via Digitalmars-d-learn
On Saturday, 20 August 2016 at 22:21:00 UTC, ag0aep6g wrote: On 08/21/2016 12:11 AM, Engine Machine wrote: Is there a way to rebind the arguments of a template? template foo(X) { // X is like A!(a,b,c) Y = Rebind!(X,d,e,f); // Y is like A!(d,e,f); } foo(A!(a,b,c)); ? template Rebin

Re: Rebind template

2016-08-20 Thread ag0aep6g via Digitalmars-d-learn
On 08/21/2016 12:11 AM, Engine Machine wrote: Is there a way to rebind the arguments of a template? template foo(X) { // X is like A!(a,b,c) Y = Rebind!(X,d,e,f); // Y is like A!(d,e,f); } foo(A!(a,b,c)); ? template Rebind(alias instance, newArgs...) { import std.traits: Templat

Re: Rebind template

2016-08-20 Thread Engine Machine via Digitalmars-d-learn
On Saturday, 20 August 2016 at 22:11:40 UTC, Engine Machine wrote: Is there a way to rebind the arguments of a template? template foo(X) { // X is like A!(a,b,c) Y = Rebind!(X,d,e,f); // Y is like A!(d,e,f); } foo(A!(a,b,c)); ? I'd also be happy if I could just remove the last eleme

Rebind template

2016-08-20 Thread Engine Machine via Digitalmars-d-learn
Is there a way to rebind the arguments of a template? template foo(X) { // X is like A!(a,b,c) Y = Rebind!(X,d,e,f); // Y is like A!(d,e,f); } foo(A!(a,b,c)); ?

Re: CT Inheritence structures

2016-08-20 Thread Engine Machine via Digitalmars-d-learn
On Saturday, 20 August 2016 at 06:28:47 UTC, Enamex wrote: On Saturday, 20 August 2016 at 00:46:15 UTC, Engine Machine wrote: I am trying to get Timon Gehr's code working, with some modifications: void main() { import std.traits; auto a = new Type!("Animal", "Dog", "Pug")();

Re: CT Inheritence structures

2016-08-20 Thread Engine Machine via Digitalmars-d-learn
On Saturday, 20 August 2016 at 09:42:08 UTC, Jack Applegame wrote: On Saturday, 20 August 2016 at 00:46:15 UTC, Engine Machine wrote: Any ideas? Something like this? mixin template TypeData(string type: "Animal") { int y; } mixin template TypeData(string type: "Dog") { int z; } mixin t

Re: CT Inheritence structures

2016-08-20 Thread Jack Applegame via Digitalmars-d-learn
On Saturday, 20 August 2016 at 00:46:15 UTC, Engine Machine wrote: Any ideas? Something like this? mixin template TypeData(string type: "Animal") { int y; } mixin template TypeData(string type: "Dog") { int z; } mixin template TypeData(string type: "Pug") { int s; } template Type(s

Re: MurmurHash3 behaviour

2016-08-20 Thread Ilya Yaroshenko via Digitalmars-d-learn
On Saturday, 20 August 2016 at 09:15:00 UTC, Ilya Yaroshenko wrote: On Friday, 19 August 2016 at 20:28:13 UTC, Cauterite wrote: Regarding the MurmurHash3 implementation in core.internal.hash, it is my understanding that: // assuming a and b are uints bytesHash([a, b], 0) == bytesHash([b

Re: MurmurHash3 behaviour

2016-08-20 Thread Ilya Yaroshenko via Digitalmars-d-learn
On Friday, 19 August 2016 at 20:28:13 UTC, Cauterite wrote: Regarding the MurmurHash3 implementation in core.internal.hash, it is my understanding that: // assuming a and b are uints bytesHash([a, b], 0) == bytesHash([b], bytesHash([a], 0)) Is this correct? I'm just not quite certain of

Re: MurmurHash3 behaviour

2016-08-20 Thread Seb via Digitalmars-d-learn
On Friday, 19 August 2016 at 21:29:43 UTC, Cauterite wrote: On Friday, 19 August 2016 at 21:03:22 UTC, Seb wrote: http://dlang.org/phobos-prerelease/std_digest_murmurhash.html Ah great, I just finished writing my own murmurhash digest module ( https://github.com/Cauterite/phobos/blob/murmur/