Re: Dub and gitsubmodules

2019-11-05 Thread Andre Pany via Digitalmars-d-learn
On Tuesday, 5 November 2019 at 19:26:54 UTC, user5678 wrote: On Monday, 4 November 2019 at 13:37:47 UTC, Sebastiaan Koppe wrote: Does anyone know a reliable way of having a dub package that contains git submodules and is to be used as a dependency? I am looking for a way to ensure the

Re: Dub and gitsubmodules

2019-11-05 Thread user5678 via Digitalmars-d-learn
On Monday, 4 November 2019 at 13:37:47 UTC, Sebastiaan Koppe wrote: Does anyone know a reliable way of having a dub package that contains git submodules and is to be used as a dependency? I am looking for a way to ensure the submodules are initialised before a build. You can use the

How polymorphism work in D?

2019-11-05 Thread OiseuKodeur via Digitalmars-d-learn
I have this ``` import std.stdio : writeln; abstract class Foo { } class Bar : Foo { float value; this(float t_value) { value = t_value; } } class Baz : Foo { string name; this(string t_name) { name = t_name; } } void main() { Foo foo = new Bar(10); if (/* typeof

Re: How polymorphism work in D?

2019-11-05 Thread rikki cattermole via Digitalmars-d-learn
On 06/11/2019 6:43 PM, OiseuKodeur wrote: I have this ``` import std.stdio : writeln; abstract class Foo { } class Bar : Foo {     float value;     this(float t_value) { value = t_value; } } class Baz : Foo {     string name;     this(string t_name) { name = t_name; } } void main() {

Re: How polymorphism work in D?

2019-11-05 Thread OiseuKodeur via Digitalmars-d-learn
On Wednesday, 6 November 2019 at 06:05:25 UTC, rikki cattermole wrote: On 06/11/2019 6:43 PM, OiseuKodeur wrote: I have this ``` import std.stdio : writeln; abstract class Foo { } class Bar : Foo {     float value;     this(float t_value) { value = t_value; } } class Baz : Foo {    

Re: No UFCS with nested functions?

2019-11-05 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, November 5, 2019 9:16:27 AM MST ixid via Digitalmars-d-learn wrote: > On Monday, 4 November 2019 at 20:46:41 UTC, H. S. Teoh wrote: > > On Mon, Nov 04, 2019 at 07:51:26PM +, Tobias Pankrath via > > > > Digitalmars-d-learn wrote: > >> Why does the following not work? It works, if I

Re: Dub and gitsubmodules

2019-11-05 Thread user5678 via Digitalmars-d-learn
On Tuesday, 5 November 2019 at 20:28:49 UTC, Andre Pany wrote: On Tuesday, 5 November 2019 at 19:26:54 UTC, user5678 wrote: On Monday, 4 November 2019 at 13:37:47 UTC, Sebastiaan Koppe wrote: Does anyone know a reliable way of having a dub package that contains git submodules and is to be used

Re: A question about postblit constructor

2019-11-05 Thread Mike Parker via Digitalmars-d-learn
On Tuesday, 5 November 2019 at 10:32:03 UTC, Ferhat Kurtulmuş wrote: On Tuesday, 5 November 2019 at 10:31:05 UTC, Ferhat Kurtulmuş wrote: On Tuesday, 5 November 2019 at 10:13:59 UTC, Mike Parker wrote: [...] Yep, it is obvious that my code is wrong. s1 and s2 point to the same memory

Re: A question about postblit constructor

2019-11-05 Thread Ferhat Kurtulmuş via Digitalmars-d-learn
On Tuesday, 5 November 2019 at 12:06:44 UTC, Ferhat Kurtulmuş wrote: On Tuesday, 5 November 2019 at 11:20:47 UTC, Mike Parker wrote: On Tuesday, 5 November 2019 at 10:32:03 UTC, Ferhat Kurtulmuş wrote: [...] I meant the example as an answer to your statement, "I wonder how new memory is

Re: A question about postblit constructor

2019-11-05 Thread Ferhat Kurtulmuş via Digitalmars-d-learn
On Tuesday, 5 November 2019 at 11:20:47 UTC, Mike Parker wrote: On Tuesday, 5 November 2019 at 10:32:03 UTC, Ferhat Kurtulmuş wrote: On Tuesday, 5 November 2019 at 10:31:05 UTC, Ferhat Kurtulmuş wrote: [...] I meant the example as an answer to your statement, "I wonder how new memory is

Re: A question about postblit constructor

2019-11-05 Thread Ferhat Kurtulmuş via Digitalmars-d-learn
On Tuesday, 5 November 2019 at 12:09:15 UTC, Ferhat Kurtulmuş wrote: On Tuesday, 5 November 2019 at 12:06:44 UTC, Ferhat Kurtulmuş wrote: On Tuesday, 5 November 2019 at 11:20:47 UTC, Mike Parker wrote: On Tuesday, 5 November 2019 at 10:32:03 UTC, Ferhat Kurtulmuş wrote: [...] I meant the

GtkDcoding Blog Interruption

2019-11-05 Thread Ron Tarrant via Digitalmars-d-learn
My apologies. I'm experiencing a technical problem with the GtkD Coding Blog site. Today's post has been uploaded, but the site isn't being updated properly, so the new page isn't available. Everything works fine locally, so for the moment, I'm stumped. Until I can resolve this, please bear

A question about postblit constructor

2019-11-05 Thread Ferhat Kurtulmuş via Digitalmars-d-learn
I am trying to learn behavior of postblit constructor. Below code works as expected when I comment out malloc part of postblit constructor. It writes 4 if malloc part of postblit constructor is commented out. Otherwise it writes default init value of int which is 0. I wonder how new memory is

Re: Using shared memory and thread

2019-11-05 Thread welkam via Digitalmars-d-learn
On Monday, 4 November 2019 at 19:53:29 UTC, bioinfornatics wrote: 3/ variable flagged as `shared` does at mean the variable is put into L2 cache ? First caching is controlled by CPU not programmer. Second not all architectures share L2 between cores. 4 jaguar cores share L2 cache in consoles

Re: A question about postblit constructor

2019-11-05 Thread Ferhat Kurtulmuş via Digitalmars-d-learn
On Tuesday, 5 November 2019 at 10:13:59 UTC, Mike Parker wrote: On Tuesday, 5 November 2019 at 08:47:05 UTC, Ferhat Kurtulmuş wrote: value of int which is 0. I wonder how new memory is allocated without an explicit malloc here. Sorry for this noob question in advance, I could not find any

Re: A question about postblit constructor

2019-11-05 Thread Ferhat Kurtulmuş via Digitalmars-d-learn
On Tuesday, 5 November 2019 at 10:31:05 UTC, Ferhat Kurtulmuş wrote: On Tuesday, 5 November 2019 at 10:13:59 UTC, Mike Parker wrote: [...] Yep, it is obvious that my code is wrong. s1 and s2 point to the same memory address. I could obtain my desired behavior with copy constructor. The

Re: Using shared memory and thread

2019-11-05 Thread bioinfornatics via Digitalmars-d-learn
On Tuesday, 5 November 2019 at 00:07:40 UTC, bioinfornatics wrote: On Tuesday, 5 November 2019 at 00:04:05 UTC, bioinfornatics wrote: On Monday, 4 November 2019 at 22:19:29 UTC, bioinfornatics wrote: On Monday, 4 November 2019 at 21:53:45 UTC, bioinfornatics wrote: On Monday, 4 November 2019

Re: A question about postblit constructor

2019-11-05 Thread Mike Parker via Digitalmars-d-learn
On Tuesday, 5 November 2019 at 08:47:05 UTC, Ferhat Kurtulmuş wrote: value of int which is 0. I wonder how new memory is allocated without an explicit malloc here. Sorry for this noob question in advance, I could not find any doc mentioning a similar case. int* vals =

Re: No UFCS with nested functions?

2019-11-05 Thread ixid via Digitalmars-d-learn
On Monday, 4 November 2019 at 20:46:41 UTC, H. S. Teoh wrote: On Mon, Nov 04, 2019 at 07:51:26PM +, Tobias Pankrath via Digitalmars-d-learn wrote: Why does the following not work? It works, if I move the 'prop' out of 'foo'. UFCS is only supported for module-level functions, as far as I

Re: GtkDcoding Blog Interruption

2019-11-05 Thread Ron Tarrant via Digitalmars-d-learn
On Tuesday, 5 November 2019 at 12:31:04 UTC, Ron Tarrant wrote: Until I can resolve this, please bear with me. I'll keep you all updated of any progress. I've been in touch with GitHub support and they're in a yellow alert situation, meaning (I assume) that service for all sites hosted on