How to get warnings about unused imports ?

2013-07-02 Thread Gabi
Hi, How to find unused imports ? It seems the compiler doesn't do it, but is there any other tool for that? This seems like small issue, but those unused imports pile up pretty quickly Regards, Gabi

Re: How to get warnings about unused imports ?

2013-07-03 Thread Gabi
On Wednesday, 3 July 2013 at 06:12:46 UTC, Namespace wrote: On Tuesday, 2 July 2013 at 21:49:37 UTC, Gabi wrote: Hi, How to find unused imports ? It seems the compiler doesn't do it, but is there any other tool for that? This seems like small issue, but those unused imports pile up p

How to define struct with function pointer member ?

2013-07-28 Thread Gabi
I tried: struct X { .. function double(Individual) someFun; .. } But get: Error: Declaration expected, not 'function' Thanks, Gabi

Re: How to define struct with function pointer member ?

2013-07-28 Thread Gabi
On Sunday, 28 July 2013 at 22:04:57 UTC, Gabi wrote: I tried: struct X { .. function double(Individual) someFun; .. } But get: Error: Declaration expected, not 'function' Thanks, Gabi Sorry I found the answer. Should have declared double function(...) someFun;

Re: How to define struct with function pointer member ?

2013-07-28 Thread Gabi
On Sunday, 28 July 2013 at 22:13:13 UTC, H. S. Teoh wrote: On Mon, Jul 29, 2013 at 12:04:55AM +0200, Gabi wrote: I tried: struct X { .. function double(Individual) someFun; [...] The correct syntax is: double function(Individual) someFun; T Yes thanks. Beginner's mistake :)

Variadic functions: How to pass another variadic function the variadic args?

2013-08-03 Thread Gabi
void F1(...) { } void F2(...) { //HOW TO pass F1(..) the args we were called with ? }

Re: Variadic functions: How to pass another variadic function the variadic args?

2013-08-03 Thread Gabi
On Saturday, 3 August 2013 at 14:58:49 UTC, bearophile wrote: Gabi: //HOW TO pass F1(..) the args we were called with ? import std.stdio; void f1(Args...)(Args args) { foreach (arg; args) arg.writeln; } void f2(Args...)(Args args) { f1(args); } void main() { f2(10

Re: Variadic functions: How to pass another variadic function the variadic args?

2013-08-03 Thread Gabi
On Saturday, 3 August 2013 at 18:48:17 UTC, monarch_dodra wrote: On Saturday, 3 August 2013 at 16:57:41 UTC, Gabi wrote: On Saturday, 3 August 2013 at 14:58:49 UTC, bearophile wrote: Gabi: //HOW TO pass F1(..) the args we were called with ? import std.stdio; void f1(Args...)(Args args

Started to work on a Lua wrapper. Please provide feedback & guidance

2013-08-03 Thread Gabi
I need a Lua 5.2.2 wrapper, So I started working on one.. I am new to D so probably there is a lot of room for improvements.. Any feedback is welcome.. import std.stdio:writeln, writefln; import std.exception:enforce; import std.conv; import std.string; alias void lua_State; alias long lua_In

Re: Started to work on a Lua wrapper. Please provide feedback & guidance

2013-08-05 Thread Gabi
On Monday, 5 August 2013 at 19:14:25 UTC, Jesse Phillips wrote: On Saturday, 3 August 2013 at 22:17:32 UTC, Gabi wrote: I need a Lua 5.2.2 wrapper, So I started working on one.. I am new to D so probably there is a lot of room for improvements.. Any feedback is welcome.. You'll pro

Re: Getting number of messages in MessageBox

2013-08-06 Thread Gabi
On Tuesday, 6 August 2013 at 06:15:20 UTC, Marek Janukowicz wrote: Ali Çehreli wrote: On 08/05/2013 04:18 PM, Marek Janukowicz wrote: I'm using std.concurrency message passing and I'd like to check which thread might be a bottleneck. The easiest would be check number of messages piled up for

Re: Getting number of messages in MessageBox

2013-08-06 Thread Gabi
On Tuesday, 6 August 2013 at 07:47:10 UTC, Marek Janukowicz wrote: dennis luehring wrote: the question is do the published counter then needs locking - and make it slow for all - just for beeing getable? Good point - but I believe the code operating on the counter is synchronized already, so