Re: D + .NET

2015-03-11 Thread Sativa via Digitalmars-d-learn
On Wednesday, 11 March 2015 at 08:45:15 UTC, Kagamin wrote: http://wiki.dlang.org/Libraries_and_Frameworks#GUI_Libraries Can you point out where it says anything about wpf or .NET? I'm having trouble finding it. I even searched for .net and wpf but still no luck ;/ Maybe you posted the wrong

D + .NET

2015-03-11 Thread Sativa via Digitalmars-d-learn
If I write a business model in D, how hard is it to hook up a presentation using something like wpf, win32, or even whatever mac does?

Efficient file search and extract

2014-11-04 Thread Sativa via Digitalmars-d-learn
Is there a very easy way to search a file for a string, then extract to a new file everything from that match on to the end of the file? I basically want to remove a header from a file(it's length is not fixed though). It seems I'm having to convert bytes to chars to strings and back and al

Re: std.parallelism curious results

2014-10-05 Thread Sativa via Digitalmars-d-learn
On Sunday, 5 October 2014 at 21:53:23 UTC, Ali Çehreli wrote: On 10/05/2014 02:40 PM, Sativa wrote: > foreach(i; thds) { ulong s = 0; for(ulong k = 0; k < > iter/numThreads; k++) The for loop condition is executed at every iteration and division is an expensive operation. Apparently, the

Re: std.parallelism curious results

2014-10-05 Thread Sativa via Digitalmars-d-learn
On Sunday, 5 October 2014 at 21:25:39 UTC, Ali Çehreli wrote: import std.stdio, std.cstream, std.parallelism, std.datetime, std.range, core.atomic; void main() { StopWatch sw; shared ulong sum1 = 0; ulong sum2 = 0, sum3 = 0, time1, time2, time3; enum numThreads = 4; // If nu

Re: std.parallelism curious results

2014-10-05 Thread Sativa via Digitalmars-d-learn
Two problems, one, you should create your threads outside the stop watch, it is not generally a fair comparison in the real world. It throws of the results for short tasks. Second, you are creating one thread per integer, this is bad. Do you really want to create 1B threads when you only have