Re: User defined attributes use

2013-09-15 Thread ilya-stromberg
On Sunday, 15 September 2013 at 18:31:40 UTC, simendsjo wrote: On Sunday, 15 September 2013 at 17:34:06 UTC, matovitch wrote: Hi everyone, I read the documentation about user defined attributes, but I don't see their uses. Ok, it'a a template expression you can link to a declaration, but what

Re: Mixin namespace ambiguity?

2013-09-15 Thread Kenji Hara
On Sunday, 15 September 2013 at 18:31:30 UTC, Marek Janukowicz wrote: The code to reproduce the problem consists of 3 modules: mix.d: module mix; mixin template A( alias x) { string a () { return x; } } aux.d: module aux; import mix; mixin A!("a in aux") X; st

Re: Compile time data structure

2013-09-15 Thread Ali Çehreli
Could you please provide complete code. Thank you, Ali

Compile time data structure

2013-09-15 Thread Marek Janukowicz
I need to gather some data in compile time basing on UDA. struct Attr { string name; } mixin template Model() { static string[string] columns () { string[string] cols; alias type = typeof(this); // Basically - get all members with @Attr UDA and build AA out of those foreach(

Re: N step fft in D language

2013-09-15 Thread growler
On Sunday, 15 September 2013 at 20:58:54 UTC, Kadir Erdem Demir wrote: On Sunday, 15 September 2013 at 15:39:14 UTC, John Colvin wrote: On Sunday, 15 September 2013 at 15:15:28 UTC, Kadir Erdem Demir wrote: I am using fft function from std.numeric Complex!double[] resultfft = fft(timeDomainAmp

Re: N step fft in D language

2013-09-15 Thread John Colvin
On Sunday, 15 September 2013 at 20:58:54 UTC, Kadir Erdem Demir wrote: On Sunday, 15 September 2013 at 15:39:14 UTC, John Colvin wrote: On Sunday, 15 September 2013 at 15:15:28 UTC, Kadir Erdem Demir wrote: I am using fft function from std.numeric Complex!double[] resultfft = fft(timeDomainAmp

Re: N step fft in D language

2013-09-15 Thread David Nadlinger
On Sunday, 15 September 2013 at 20:58:54 UTC, Kadir Erdem Demir wrote: I believe I am well aware of the things which are explained in the link. There is a sentence in link which says : "The first bin in the FFT is DC (0 Hz), the second bin is Fs / N, where Fs is the sample rate and N is the si

Re: N step fft in D language

2013-09-15 Thread Kadir Erdem Demir
On Sunday, 15 September 2013 at 15:39:14 UTC, John Colvin wrote: On Sunday, 15 September 2013 at 15:15:28 UTC, Kadir Erdem Demir wrote: I am using fft function from std.numeric Complex!double[] resultfft = fft(timeDomainAmplitudeVal); The parameter timeDomainAmplitudeVal is audio amplitude dat

Mixin namespace ambiguity?

2013-09-15 Thread Marek Janukowicz
The code to reproduce the problem consists of 3 modules: mix.d: module mix; mixin template A( alias x) { string a () { return x; } } aux.d: module aux; import mix; mixin A!("a in aux") X; string b () { return "b in aux"; } main.d: module m

Re: User defined attributes use

2013-09-15 Thread simendsjo
On Sunday, 15 September 2013 at 17:34:06 UTC, matovitch wrote: Hi everyone, I read the documentation about user defined attributes, but I don't see their uses. Ok, it'a a template expression you can link to a declaration, but what are they useful for ? (not sure about the syntax ;-)) Can yo

Re: Communication between Java and D application

2013-09-15 Thread Michael
Pipes or sockets

Re: Communication between Java and D application

2013-09-15 Thread Jonathan M Davis
On Sunday, September 15, 2013 14:47:24 Anton Alexeev wrote: > I meant that the programs are running. So there is a runnung > program in D and a running program in Java. What is the best way > to communicate between them? Have them communicate via sockets just like you'd talk to a program on anothe

Re: User defined attributes use

2013-09-15 Thread Jacob Carlborg
On 2013-09-15 19:34, matovitch wrote: Hi everyone, I read the documentation about user defined attributes, but I don't see their uses. I'm using it in my serialization library: struct Foo { int a; @nonSerialized int b; } Indicates "b" will not be serialized. struct Bar { int a;

Re: GC.collect bug ?

2013-09-15 Thread Maxim Fomin
On Friday, 13 September 2013 at 15:24:17 UTC, Temtaime wrote: Hello for all ! I need to call all objects destructors in one place. It's guaranted, that there is no objects instances. I tried use GC.collect but it's produces strange results. import std.stdio; import core.memory; class A {

User defined attributes use

2013-09-15 Thread matovitch
Hi everyone, I read the documentation about user defined attributes, but I don't see their uses. Ok, it'a a template expression you can link to a declaration, but what are they useful for ? (not sure about the syntax ;-)) Can you declare a template constraint as a user defined attribute to

Re: GC.collect bug ?

2013-09-15 Thread thedeemon
On Friday, 13 September 2013 at 15:24:17 UTC, Temtaime wrote: auto a = new A; a = null; GC.collect(); I suspect the compiler sees that "a" isn't used anywhere down the function, so it optimizes away "a = null", hence it's not null when GC happens. Better look at genera

Re: N step fft in D language

2013-09-15 Thread matovitch
On Sunday, 15 September 2013 at 15:15:28 UTC, Kadir Erdem Demir wrote: I am using fft function from std.numeric Complex!double[] resultfft = fft(timeDomainAmplitudeVal); The parameter timeDomainAmplitudeVal is audio amplitude data. Sample rate 44100 hz and there is 131072(2^16) samples I am

Re: N step fft in D language

2013-09-15 Thread John Colvin
On Sunday, 15 September 2013 at 15:15:28 UTC, Kadir Erdem Demir wrote: I am using fft function from std.numeric Complex!double[] resultfft = fft(timeDomainAmplitudeVal); The parameter timeDomainAmplitudeVal is audio amplitude data. Sample rate 44100 hz and there is 131072(2^16) samples I am

N step fft in D language

2013-09-15 Thread Kadir Erdem Demir
I am using fft function from std.numeric Complex!double[] resultfft = fft(timeDomainAmplitudeVal); The parameter timeDomainAmplitudeVal is audio amplitude data. Sample rate 44100 hz and there is 131072(2^16) samples I am seeing that resultfft has the same size as timeDomainAmplitudeVal(13107

Re: Communication between Java and D application

2013-09-15 Thread Anton Alexeev
I meant that the programs are running. So there is a runnung program in D and a running program in Java. What is the best way to communicate between them?