Re: Skynet 1M Fiber microbenchmark in D

2017-10-20 Thread Martin Nowak via Digitalmars-d-learn
On Wednesday, 18 October 2017 at 12:32:31 UTC, Nordlöw wrote: Further, are we forced to use the GC for Fiber allocation or can a sub-class of Fibers implement its own allocation strategy? You could use std.typecons.scoped!Fiber, though it'll easily overflow your stack. Unfortunately Scoped do

Re: Skynet 1M Fiber microbenchmark in D

2017-10-20 Thread Martin Nowak via Digitalmars-d-learn
On Wednesday, 18 October 2017 at 11:01:56 UTC, Per Nordlöw wrote: On Wednesday, 18 October 2017 at 09:01:30 UTC, Per Nordlöw wrote: Creates an actor (goroutine, whatever), which spawns 10 new actors, each of them spawns 10 more actors, etc. until one million actors are created on the final leve

Re: is(this : myClass)

2017-10-20 Thread Patrick via Digitalmars-d-learn
On Friday, 20 October 2017 at 23:01:25 UTC, Steven Schveighoffer wrote: On 10/20/17 6:23 PM, Patrick wrote: On Friday, 20 October 2017 at 22:15:36 UTC, Steven Schveighoffer wrote: On 10/20/17 5:55 PM, Patrick wrote: Due to the very specific nature of the 'is' operator, why wouldn't the compile

Re: is(this : myClass)

2017-10-20 Thread Steven Schveighoffer via Digitalmars-d-learn
On 10/20/17 7:04 PM, user1234 wrote: Strangely this is not always true, in other contexts this is seen as atype, although probably a bug class Foo {     class Bar : this {}     static assert(is(Bar : Foo)); } Definitely a bug. You should have to write typeof(this) (which is valid in this

Re: is(this : myClass)

2017-10-20 Thread Steven Schveighoffer via Digitalmars-d-learn
On 10/20/17 6:23 PM, Patrick wrote: On Friday, 20 October 2017 at 22:15:36 UTC, Steven Schveighoffer wrote: On 10/20/17 5:55 PM, Patrick wrote: Due to the very specific nature of the 'is' operator, why wouldn't the compiler know to implicitly query the class types? Why must it be explicitly wr

Re: is(this : myClass)

2017-10-20 Thread user1234 via Digitalmars-d-learn
On Friday, 20 October 2017 at 21:42:32 UTC, Jonathan M Davis wrote: On Friday, October 20, 2017 21:32:48 Patrick via Digitalmars-d-learn wrote: The compiler seems to reject the following code in a class method: bool test = is(this : myClass); Could some please explain this? "this" is not a

Re: is(this : myClass)

2017-10-20 Thread Patrick via Digitalmars-d-learn
On Friday, 20 October 2017 at 22:15:36 UTC, Steven Schveighoffer wrote: On 10/20/17 5:55 PM, Patrick wrote: Due to the very specific nature of the 'is' operator, why wouldn't the compiler know to implicitly query the class types? Why must it be explicitly written, typeof(this)? The compiler g

Re: is(this : myClass)

2017-10-20 Thread Steven Schveighoffer via Digitalmars-d-learn
On 10/20/17 5:55 PM, Patrick wrote: Due to the very specific nature of the 'is' operator, why wouldn't the compiler know to implicitly query the class types? Why must it be explicitly written, typeof(this)? The compiler generally doesn't "fix" errors for you, it tells you there is a problem,

Re: is(this : myClass)

2017-10-20 Thread Patrick via Digitalmars-d-learn
On Friday, 20 October 2017 at 21:42:32 UTC, Jonathan M Davis wrote: On Friday, October 20, 2017 21:32:48 Patrick via Digitalmars-d-learn wrote: The compiler seems to reject the following code in a class method: bool test = is(this : myClass); Could some please explain this? "this" is not a

Re: is(this : myClass)

2017-10-20 Thread Jonathan M Davis via Digitalmars-d-learn
On Friday, October 20, 2017 21:32:48 Patrick via Digitalmars-d-learn wrote: > The compiler seems to reject the following code in a class method: > > bool test = is(this : myClass); > > Could some please explain this? "this" is not a type. is(T : U) is true if T is implicitly convertible to U. T an

is(this : myClass)

2017-10-20 Thread Patrick via Digitalmars-d-learn
The compiler seems to reject the following code in a class method: bool test = is(this : myClass); Could some please explain this? Thanks, Patrick

Re: D on AArch64 CPU

2017-10-20 Thread David J Kordsmeier via Digitalmars-d-learn
On Thursday, 10 August 2017 at 07:00:55 UTC, David J Kordsmeier wrote: On Wednesday, 9 August 2017 at 08:37:53 UTC, Johannes Pfau wrote: Iain recently updated GDC & phobos up to 2.074 and we have a pull request for 2.075. So don't worry about fixing old GDC phobos/druntime versions, recent gd

Re: Generating DDOX documentation

2017-10-20 Thread FreeSlave via Digitalmars-d-learn
On Friday, 20 October 2017 at 10:47:57 UTC, Andrew Edwards wrote: Given a documented source file (eg. process.d), I can generate the DDOC version of the documentation with the -D switch of DMD as such: $ dmd -Dfprocess.html process.d What do I modify on that line to get the DDOX version o

Generating DDOX documentation

2017-10-20 Thread Andrew Edwards via Digitalmars-d-learn
Given a documented source file (eg. process.d), I can generate the DDOC version of the documentation with the -D switch of DMD as such: $ dmd -Dfprocess.html process.d What do I modify on that line to get the DDOX version of the same file? Thanks, Andrew