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]

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

2013-12-16 Thread Nikhil Padmanabhan
work with topN? Thanks in advance, -- Nikhil - Nikhil Padmanabhan nikhil.padmanab...@yale.edu

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 ldc and

Typos in std.process.execute documentation?

2013-12-08 Thread Nikhil Padmanabhan
Hi, I just noticed what looks like two typos in the std.process.execute documentation : 1/ auto dmd = execute(dmd, myapp.d); should be auto dmd = execute([dmd, myapp.d]); 2/ if (status ==0) should be if (status !=0) Should I file a bug report, or is there a way I can simply submit

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.12.1

Building phobos fails on linux system

2013-12-06 Thread Nikhil Padmanabhan
Hi, I've been trying to build phobos on a linux system, and it's failing during the link step : /usr/bin/ld: unrecognized option '--no-warn-search-mismatch' Poking at this a little, I see that I'm running a relatively old version of ld : [np274@login-0-0 phobos]$ ld --version GNU ld

Re: Building phobos fails on linux system

2013-12-06 Thread Nikhil Padmanabhan
That fixed it! Thanks! On Friday, 6 December 2013 at 19:09:26 UTC, Dicebot wrote: On Friday, 6 December 2013 at 19:04:08 UTC, Nikhil Padmanabhan wrote: Hi, I've been trying to build phobos on a linux system, and it's failing during the link step : /usr/bin/ld: unrecognized option