Re: Cleverness of the compiler

2013-11-24 Thread growler
On Monday, 25 November 2013 at 00:51:47 UTC, growler wrote: On Monday, 25 November 2013 at 00:08:52 UTC, Namespace wrote: I love this feature, but I'm unsure how it works. Can someone explain me, how the compiler deduce that he should read 4 bytes for each index (the 'at' func

Re: Cleverness of the compiler

2013-11-24 Thread growler
On Monday, 25 November 2013 at 00:08:52 UTC, Namespace wrote: I love this feature, but I'm unsure how it works. Can someone explain me, how the compiler deduce that he should read 4 bytes for each index (the 'at' function)? The type is void*, not int*. import std.stdio; import core.stdc.s

Re: Unable to use tradional tools to find memory leaks

2013-09-23 Thread growler
Might be related to or even the same issue reported here: http://forum.dlang.org/thread/bug-1005...@http.d.puremagic.com/issues/ This is a Valgrind issue though and not DMD related.

Re: SQLite3 segmentation at prepare statement

2013-09-18 Thread growler
On Wednesday, 18 September 2013 at 21:31:00 UTC, Charles Hixson wrote: I'm trying to use SQLite3 in D, but am getting a segmentation fault when I attempt to replace the exec statement with a prepare statement. What am I doing wrong? If the prepare statement is commented out, and the exec sta

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: why no to!bool(0) or to!bool(1) ?

2013-08-26 Thread growler
On Tuesday, 27 August 2013 at 05:22:00 UTC, H. S. Teoh wrote: On Tue, Aug 27, 2013 at 07:12:56AM +0200, Jesse Phillips wrote: On Tuesday, 27 August 2013 at 04:08:47 UTC, growler wrote: >Is there any reason why the following code fails to compile? > >--- >auto bfalse = to!bool(0);

Re: why no to!bool(0) or to!bool(1) ?

2013-08-26 Thread growler
On Tuesday, 27 August 2013 at 05:13:01 UTC, Jesse Phillips wrote: On Tuesday, 27 August 2013 at 04:08:47 UTC, growler wrote: Is there any reason why the following code fails to compile? --- auto bfalse = to!bool(0); auto btrue = to!bool(1); --- dmd2/src/phobos/std/conv.d(329): Error: template

why no to!bool(0) or to!bool(1) ?

2013-08-26 Thread growler
Is there any reason why the following code fails to compile? --- auto bfalse = to!bool(0); auto btrue = to!bool(1); --- dmd2/src/phobos/std/conv.d(329): Error: template std.conv.toImpl cannot deduce template function from argument types !(bool)(int) I can use a string, like so: --- auto bfalse