Compile error using synchronized in ldc (but not dmd)

2013-12-08 Thread Nikhil Padmanabhan
Hello, The following code snippet fails to compile on ldc2 (0.12.1), but successfully compiles on dmd 2.064.2 : struct Particle { double x,y,z,w,x2; this(double[] arr) { x = arr[0]; y = arr[1]; z=arr[2]; w=arr[3]; x2 = x*x + y*y + z*z; }

Re: Compile error using synchronized in ldc (but not dmd)

2013-12-08 Thread Nikhil Padmanabhan
Just a quick follow-up : replacing the array operation by a foreach works around this issue, but I don't understand why it failed in the first place. On Monday, 9 December 2013 at 04:26:01 UTC, Nikhil Padmanabhan wrote: Hello, The following code snippet fails to compile on ldc2 (0

segfault when using std.parallelism and std.process.executeShell

2013-12-12 Thread Nikhil Padmanabhan
Hi, The following code dies with a segfault : import std.stdio, std.parallelism, std.process; void main() { auto a=["hello","world","goodbye"]; foreach(s; parallel(a,1)) { auto ls=executeShell("echo "~s); writeln(ls.output); } } both in l

using std.algorithm.topN with std.range.zip fails with undefined swap

2013-12-16 Thread Nikhil Padmanabhan
ap, is there a reason this doesn't work with topN? Thanks in advance, -- Nikhil --------- Nikhil Padmanabhan nikhil.padmanab...@yale.edu

using std.algorithm.topN with std.range.zip fails with undefined swap

2013-12-17 Thread Nikhil Padmanabhan
Hi, Trying to compile : import std.stdio, std.range, std.algorithm; void main() { auto a = [2.0,1.0,3.0]; struct Point { double x; } auto b = [Point(4.0), Point(5.0), Point(6.0)]; topN!("a[0] < b[0]")(zip(a,b),1); //sort!("a[0] <