Re: How create a function that receive a function and run it in another threading?

2019-12-27 Thread Marcone via Digitalmars-d-learn
On Friday, 27 December 2019 at 07:06:52 UTC, mipri wrote: On Friday, 27 December 2019 at 06:08:16 UTC, Marcone wrote: import std; import core.thread; auto threading(lazy void fun){ return task!fun().executeInNewThread(); } void main(){ threading(writeln("Hello World!")); } I want

Re: How to debug in vscode Windows?

2019-12-27 Thread Andre Pany via Digitalmars-d-learn
On Friday, 27 December 2019 at 18:48:50 UTC, cfcd14f496326e429ce03c48650b7966 wrote: Hello. I spent many time to searching for find a solutions. Many posts not clearly or tell like brief. :( I tried "Microsoft C/C++(ms-vscode.cpptools)" and "Native Debug (webfreak.debug )" plugin. And I

Re: What type does byGrapheme() return?

2019-12-27 Thread H. S. Teoh via Digitalmars-d-learn
On Fri, Dec 27, 2019 at 06:26:58PM +0100, Robert M. Münch via Digitalmars-d-learn wrote: > I love these documentation lines in the D docs: > > auto byGrapheme(Range)(Range range) > > How should I know what auto is? Why not write the explicit type so > that I know what to expect? When

Re: Difference in compiletime vs compiletime or compiler bug?

2019-12-27 Thread Sjoerd Nijboer via Digitalmars-d-learn
On Friday, 27 December 2019 at 18:51:31 UTC, Adam D. Ruppe wrote: On Friday, 27 December 2019 at 18:49:32 UTC, Sjoerd Nijboer wrote: Should concatenating the list and mixing that in work too? yeah that'd work too. As long as all the overloads are coming from the same source, D allows it.

Re: Difference in compiletime vs compiletime or compiler bug?

2019-12-27 Thread Adam D. Ruppe via Digitalmars-d-learn
On Friday, 27 December 2019 at 18:49:32 UTC, Sjoerd Nijboer wrote: Should concatenating the list and mixing that in work too? yeah that'd work too. As long as all the overloads are coming from the same source, D allows it. but if you add something manually in the struct then you have two

Re: Difference in compiletime vs compiletime or compiler bug?

2019-12-27 Thread Sjoerd Nijboer via Digitalmars-d-learn
On Friday, 27 December 2019 at 18:34:49 UTC, Adam D. Ruppe wrote: On Friday, 27 December 2019 at 18:22:10 UTC, Sjoerd Nijboer wrote: When calling the mixin directly instead of through the template mixin it breaks with thesame error message. What exactly did you do here? I meant to say that

How to debug in vscode Windows?

2019-12-27 Thread cfcd14f496326e429ce03c48650b7966 via Digitalmars-d-learn
Hello. I spent many time to searching for find a solutions. Many posts not clearly or tell like brief. :( I tried "Microsoft C/C++(ms-vscode.cpptools)" and "Native Debug (webfreak.debug )" plugin. And I found this post: https://forum.dlang.org/post/jxnnfzjsytoneqvxe...@forum.dlang.org

Re: Difference in compiletime vs compiletime or compiler bug?

2019-12-27 Thread Adam D. Ruppe via Digitalmars-d-learn
On Friday, 27 December 2019 at 18:22:10 UTC, Sjoerd Nijboer wrote: When calling the mixin directly instead of through the template mixin it breaks with thesame error message. What exactly did you do here? struct C { static foreach (m; mixins) { mixin(m);

Difference in compiletime vs compiletime or compiler bug?

2019-12-27 Thread Sjoerd Nijboer via Digitalmars-d-learn
I've got a snippet of code which I have narrowed down to the following: 'import std.stdio; enum string[] mixins = ["public bool qux(int i, char c) { throw new Exception(\"not implemented\"); // Add all arguments to a struct and serialize that struct.

Re: What type does byGrapheme() return?

2019-12-27 Thread Steven Schveighoffer via Digitalmars-d-learn
On 12/27/19 12:26 PM, Robert M. Münch wrote: I love these documentation lines in the D docs: auto byGrapheme(Range)(Range range) How should I know what auto is? Why not write the explicit type so that I know what to expect? When declaring a variable as class/struct member I can't use

What type does byGrapheme() return?

2019-12-27 Thread Robert M. Münch via Digitalmars-d-learn
I love these documentation lines in the D docs: auto byGrapheme(Range)(Range range) How should I know what auto is? Why not write the explicit type so that I know what to expect? When declaring a variable as class/struct member I can't use auto but need the explicit type... I used

Re: D-ish way to work with strings?

2019-12-27 Thread H. S. Teoh via Digitalmars-d-learn
On Fri, Dec 27, 2019 at 01:23:57PM +0100, Robert M. Münch via Digitalmars-d-learn wrote: > On 2019-12-23 15:05:20 +, H. S. Teoh said: [...] > > What are you planning to do with your strings? > > Pretty simple: Have user editable content that is rendered using > different fonts supporting

Re: D-ish way to work with strings?

2019-12-27 Thread Robert M. Münch via Digitalmars-d-learn
On 2019-12-23 15:05:20 +, H. S. Teoh said: On Sun, Dec 22, 2019 at 06:27:03PM +0100, Robert M. Münch via Digitalmars-d-learn wrote: Want to add I'm talking about unicode strings. Wouldn't it make sense to handle everything as UTF-32 so that iteration is simple because code-point =

Re: D-ish way to work with strings?

2019-12-27 Thread Robert M. Münch via Digitalmars-d-learn
On 2019-12-22 18:45:52 +, Steven Schveighoffer said: switch to using char[]. Unfortunately, there's a lot of code out there that accepts string instead of const(char)[], which is more usable. I think many people don't realize the purpose of the string type. It's meant to be something that