Nicholas Londey:
So I tried rewriting the example on the dlang.org home page and
came up with the following.
import std.algorithm, std.exception, std.stdio;
double average(T)(T range)
{
enforce(!range.empty, "No inputs");
auto totals = range.map!(a => tuple(1.0,
cast(double)(a))).reduce
What is wrong?
Ping, anybody?
Is there a Bash way to pipe stdout and stderr *separately*
through ddemangle?
I'm aware of
2>&1
but this removes separation of stdout and stderr.
On 05/22/2014 11:29 AM, "Nordlöw" wrote:
> Is there a Bash way to pipe stdout and stderr *separately* through
> ddemangle?
>
> I'm aware of
>
> 2>&1
>
> but this removes separation of stdout and stderr.
2>&1 means "redirect file handle 2 to the same as file handle 1".
So it will redirect st
On Thursday, 22 May 2014 at 09:29:49 UTC, Nordlöw wrote:
Is there a Bash way to pipe stdout and stderr *separately*
through ddemangle?
I'm aware of
2>&1
but this removes separation of stdout and stderr.
You can use process substitution [1]:
dmd ... 2> >( ddemangle >&2 )
(or leave out
Hey, I'm really new to D, and pretty new to programming overall
too,
But I want to make a 3d Game, (just sth. small). I really like D
and want to do it in D, but in the Internet there is no shit
about programming a game in D ^^
Is there any engine written in D?
For example the CryEngine is for
On Thursday, 22 May 2014 at 15:39:36 UTC, David wrote:
Hey, I'm really new to D, and pretty new to programming overall
too,
But I want to make a 3d Game, (just sth. small). I really like
D and want to do it in D, but in the Internet there is no shit
about programming a game in D ^^
Is there an
On Thursday, 22 May 2014 at 15:48:50 UTC, John Colvin wrote:
On Thursday, 22 May 2014 at 15:39:36 UTC, David wrote:
Hey, I'm really new to D, and pretty new to programming
overall too,
But I want to make a 3d Game, (just sth. small). I really like
D and want to do it in D, but in the Internet t
On Thursday, 22 May 2014 at 15:39:36 UTC, David wrote:
Hey, I'm really new to D, and pretty new to programming overall
too,
But I want to make a 3d Game, (just sth. small). I really like
D and want to do it in D, but in the Internet there is no shit
about programming a game in D ^^
Is there an
Hi,
I am currently writing a fuse wrapper for D and try to support fuse
multithreading which is based on pthreads. However fuse doesn't offer me
a proper way to hook into the creation and joining process of threads.
I can attach the threads created by libfuse but cannot find a way to
properly det
Is there a way to get the length of an array out of slice bracket
in D?
Tks.
On Thursday, 22 May 2014 at 23:22:44 UTC, kaz wrote:
Is there a way to get the length of an array out of slice
bracket in D?
Tks.
Just use .length:
void main()
{
import std.stdio;
auto a = new int[5];
auto b = a[];
writeln(a.length, " ", b.length);
}
On Thursday, 8 May 2014 at 20:57:08 UTC, Taylor Hillegeist wrote:
So i was thinking i wonder if anyone has a d library for excel
and behold there it was. however, it seems like d has grown
since this was written.
I'm getting bunches of errors telling me that i can't override
a function withou
On 05/22/2014 04:22 PM, kaz wrote:
Is there a way to get the length of an array out of slice bracket in D?
Tks.
If you mean the length of the original array, no. Of course, the length
of the slice is trivial: slice.length.
The following article explains how slices don't know about other sli
Dear,
I would like to get struct's members and zip them with an action
as
struct A
{
int a;
int b;
}
std.range.zip( __traits( allmembers, A ), [(x) => x == 0, (y) =>
y > 3] );
like this i could apply an action to each field.
I tried this:
http://dpaste.dzfl.pl/747799ffa64e
but:
tuple
On Thursday, 8 May 2014 at 20:57:08 UTC, Taylor Hillegeist wrote:
So i was thinking i wonder if anyone has a d library for excel
and behold there it was. however, it seems like d has grown
since this was written.
I'm getting bunches of errors telling me that i can't override
a function withou
allMembers yields the names of all the members. Try .tupleof on
an object instead, that might work better.
On Thursday, 22 May 2014 at 19:21:26 UTC, David Soria Parra via
Digitalmars-d-learn wrote:
I know that thread_detachByAddr exists, but the Thread object
from
Thread.getAll or Thread.opApply doesn't expose the thread
address.
Would thread_detachThis work for you? Alternately, you can use
pt
On Wednesday, 21 May 2014 at 20:19:32 UTC, Ali Çehreli wrote:
I think this is a known issue with immutable and Variant, which
std.concurrency uses for unknown messages. This looks related:
https://issues.dlang.org/show_bug.cgi?id=5538
std.concurrency actually uses Variant as the transport
On Friday, 23 May 2014 at 01:17:18 UTC, bioinfornatics wrote:
Dear,
I would like to get struct's members and zip them with an action
as
struct A
{
int a;
int b;
}
std.range.zip( __traits( allmembers, A ), [(x) => x == 0, (y) =>
y > 3] );
like this i could apply an action to each field.
20 matches
Mail list logo