On Friday, 22 September 2023 at 04:24:19 UTC, Vitaliy Fadeev
wrote:
able ?
how to use correctly?
```d
import std.parallelism;
auto async_task = task!fn( args ); // error
// Error: no property
`opCall` for type `app.A`, did you mean `new A`?
On Thursday, September 21, 2023 10:33:44 PM MDT Vitaliy Fadeev via
Digitalmars-d-learn wrote:
> On Friday, 22 September 2023 at 04:24:19 UTC, Vitaliy Fadeev
>
> wrote:
> > ...
>
> Skip this thread. I see solution.
>
> How to delete missed posts on this forum ?
This forum is esentially just a web
On Friday, 22 September 2023 at 04:33:44 UTC, Vitaliy Fadeev
wrote:
On Friday, 22 September 2023 at 04:24:19 UTC, Vitaliy Fadeev
wrote:
...
Skip this thread. I see solution.
How to delete missed posts on this forum ?
It's there forever, you have to live with that error ;)
See
On Friday, 22 September 2023 at 04:24:19 UTC, Vitaliy Fadeev
wrote:
...
Skip this thread. I see solution.
How to delete missed posts on this forum ?
On Sunday, 28 January 2018 at 04:44:23 UTC, thedeemon wrote:
On Saturday, 27 January 2018 at 20:49:43 UTC, Arun
Chandrasekaran wrote:
But really I'm not sure why you want static foreach here
I was just trying to see if static foreach can be used here, but
well, you showed that it's not
On Saturday, 27 January 2018 at 20:49:43 UTC, Arun Chandrasekaran
wrote:
Error: must use labeled break within static foreach
Just follow the compiler suggestion:
void main(string[] args) {
auto op = Operation.a;
foreach (_; 0 .. args.length) {
ops: final switch (op) {
On Saturday, 27 January 2018 at 17:54:53 UTC, thedeemon wrote:
On Saturday, 27 January 2018 at 11:19:37 UTC, Arun
Chandrasekaran wrote:
Simplified test case that still errors:
You got really close here. Here's a working version:
enum Operation {
a,
b
}
import std.traits, std.conv,
On Saturday, 27 January 2018 at 11:19:37 UTC, Arun Chandrasekaran
wrote:
Simplified test case that still errors:
You got really close here. Here's a working version:
enum Operation {
a,
b
}
import std.traits, std.conv, std.stdio;
void main(string[] args) {
auto op = Operation.a;
On Saturday, 27 January 2018 at 10:49:45 UTC, Arun Chandrasekaran
wrote:
On Saturday, 27 January 2018 at 10:38:25 UTC, Nicholas Wilson
wrote:
...
[snip]
Simplified test case that still errors:
```
enum Operation {
a,
b
}
import std.traits;
import std.conv;
void main(string[] args)
On Saturday, 27 January 2018 at 10:38:25 UTC, Nicholas Wilson
wrote:
On Saturday, 27 January 2018 at 10:28:10 UTC, Arun
Chandrasekaran wrote:
```
import std.parallelism;
auto pool = new TaskPool(options.threadCount);
foreach (_; 0 .. options.iterationCount) {
switch
On Saturday, 27 January 2018 at 10:28:10 UTC, Arun Chandrasekaran
wrote:
```
import std.parallelism;
auto pool = new TaskPool(options.threadCount);
foreach (_; 0 .. options.iterationCount) {
switch (options.operation) {
static foreach(e; EnumMembers!Operation) {
On Saturday, 27 January 2018 at 10:28:10 UTC, Arun Chandrasekaran
wrote:
Hi All,
Is there a way to rewrite this
[...]
Damn! The subject should've been something else.. naming is
surely hard..
On Tuesday, 11 December 2012 at 17:50:31 UTC, Ali Çehreli wrote:
On 12/11/2012 08:12 AM, Zardoz wrote:
Could you please move MapIntegrator() to module-level. Then it
should work.
Ali
I try it and now even with normal Map function give me errors
with dmd !
public Entity MapIntegrator (
On 12/12/2012 05:47 AM, Zardoz wrote:
On Tuesday, 11 December 2012 at 17:50:31 UTC, Ali Çehreli wrote:
On 12/11/2012 08:12 AM, Zardoz wrote:
Could you please move MapIntegrator() to module-level. Then it should
work.
Ali
I try it and now even with normal Map function give me errors with
On 12/11/2012 02:53 AM, Zardoz wrote:
auto acelByObjs = map!( (Entity o) {
Vector3 r = o.pos[0] - pos[0];
return r * (o.mass / pow((r.sq_length + epsilon2), 1.5));
} )(objects);
newAcel = reduce!(a + b)(acelByObjs);
It works very well with the std.algorithm Map and Reduce but when I try
Ali Çehreli:
The single pointer of the lambda is not sufficient to store
both without big changes in the compiler.
I think adding a heavier 3-word delegate is not too much hard to
do. But it makes the language more complex, so so far Walter is
not willing to introduce them.
But in the end
On Tuesday, 11 December 2012 at 15:22:49 UTC, Ali Çehreli wrote:
That used to work a couple of dmd versions ago. I think it was
a bug that it worked, so it stopped working after bug fixes.
If I'm not mistaken this is actually related to a compiler
implementation issue: Lambda's have a single
17 matches
Mail list logo