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;
}
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
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
ap, is there a reason this doesn't work with topN?
Thanks in advance,
-- Nikhil
---------
Nikhil Padmanabhan
nikhil.padmanab...@yale.edu
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] <