Re: Array operation with boolean operator

2013-03-14 Thread n00b
This has already been reported http://d.puremagic.com/issues/show_bug.cgi?id=5636

Array operation with boolean operator

2013-03-14 Thread n00b
I tried to use a boolean operator for an array operation : a[] = b[] < c[]; It compiles but seems to only fill a[] with the result of b[0] < c[0]. Is there any "rational" reason to that? And is there any way to use boolean operator for array operations?

inlining final functions

2013-02-26 Thread n00b
Is the following correct : class X { void foo() { ... } } class Y : X { final override void foo() { ... } } Y y = new Y; y.foo; //inlined X x = y; x.foo; //not inlined

Re: Recurrence

2013-02-19 Thread n00b
Le 19/02/2013 07:09, monarch_dodra a écrit : On Tuesday, 19 February 2013 at 10:37:31 UTC, n00b wrote: Hello. -- MyType increment(MyType previous) { //snip } auto myRec = std.range.recurrence!increment(initialMyType); - ... doesn't work. What am I doing wrong? The document

Recurrence

2013-02-19 Thread n00b
Hello. -- MyType increment(MyType previous) { //snip } auto myRec = std.range.recurrence!increment(initialMyType); - ... doesn't work. What am I doing wrong? The documentation doesn't seem to imply the function has to be passed as a string, if that's the issue.

Re: unnecessary casts

2013-01-30 Thread n00b
Le 30/01/2013 17:49, Namespace a écrit : Is the compiler (dmd) fit enough to detect and avoid unnecessary casts? E.g. [code] void foo(T)(T num) { int f = cast(int) num; // ... } foo(42); // cast is unnecessary foo(4.2); // cast is necessary [/code] Or should I wrote everytime [code] void foo(

Re: how can D program find it's own executable name on windows ?

2013-01-29 Thread n00b
Le 29/01/2013 10:33, rsk82 a écrit : Are there any build in function or must I resort to winapi ? int main(string[] argv) { writeln(argv[0] ~ " is what you are looking for"); } ^^

Garbage collector doesn't collect?

2013-01-29 Thread n00b
If I do the following... : foreach(string foo ; bigFilesList) { string file = cast(string)std.file.read(foo); } ...I run out of memory because the garbage collector apparently does not free previously loaded files, even though there isn't any reference left to them. ( I'm using D2.59,

Re: tiny std.datetime question

2013-01-16 Thread n00b
Le 16/01/2013 10:54, Jonathan M Davis a écrit : On Wednesday, January 16, 2013 09:15:39 n00b wrote: Nevermind, found it myself. SysTime* sys = new SysTime(standardTime, UTC()); sys.hour; Le 16/01/2013 08:07, n00b a écrit : Hello, I'm kinda ashamed to ask that here, but std.dat

Re: tiny std.datetime question

2013-01-16 Thread n00b
Nevermind, found it myself. SysTime* sys = new SysTime(standardTime, UTC()); sys.hour; Le 16/01/2013 08:07, n00b a écrit : Hello, I'm kinda ashamed to ask that here, but std.datetime documentation is so complex... I only want to get hour/minute from a t_time (no timezone). I'm mo

tiny std.datetime question

2013-01-16 Thread n00b
Hello, I'm kinda ashamed to ask that here, but std.datetime documentation is so complex... I only want to get hour/minute from a t_time (no timezone). I'm moving to D2, the equivalent code in D1 was: std.date.Date date; date.parse(std.date.toUTCString(time)); date.hour;

Re: Using multiple processors

2012-12-27 Thread n00b
Le 24/12/2012 05:18, thedeemon a écrit : On Sunday, 23 December 2012 at 08:00:56 UTC, n00b wrote: Hello. My program has a great deal of computation to do, so I thought I'd create several threads in order to use multiple processors. It worked fine with a simple "test" program, bu

Using multiple processors

2012-12-23 Thread n00b
Hello. My program has a great deal of computation to do, so I thought I'd create several threads in order to use multiple processors. It worked fine with a simple "test" program, but when I try to do this with the real program, only 1 processor is used. I'm using D1 and windows 7 64bit. What c

Re: Calling a DLL

2011-04-26 Thread n00b
Thanks a lot!

Calling a DLL

2011-04-25 Thread n00b
Hello, I'm not familiar with DLLs, I would like to know how can I call a function in User32.dll ? (specifically, RegisterWindowMessage) Thank you for any help!