Re: How does one determine the UDAs of all symbols contained in a given module?

2017-07-20 Thread Andrew Edwards via Digitalmars-d-learn
On Wednesday, 19 July 2017 at 14:23:25 UTC, Jacob Carlborg wrote: Here's an example: Thanks... Minus the AliasSeq bit, this is pretty much what I've been working with since talking to Brain. The main problem I'm facing is that it fails to compileif any of the symbols in the imported module

Re: How to debug in vscode with mago-mi?

2017-07-20 Thread Domain via Digitalmars-d-learn
On Thursday, 20 July 2017 at 15:31:55 UTC, WebFreak001 wrote: On Monday, 17 July 2017 at 08:44:46 UTC, Domain wrote: Could anyone show me how to debug in vscode with mago-mi? I have installed vscode with Native Debug, SDLang. I have tried dlang-vscode and code-d. [...] Is the application

Re: Base class' constructor is not implicitly inherited for immutable classes. A bug or a feature?

2017-07-20 Thread arturg via Digitalmars-d-learn
On Wednesday, 19 July 2017 at 16:00:56 UTC, Piotr Mitana wrote: Hello, I have this code: immutable class Base { this() {} } immutable class Derived : Base {} void main() { new immutable Derived(); } I'd like class Derived to automatically inherit the default constructor from

Re: Array of Template instantiations

2017-07-20 Thread Meta via Digitalmars-d-learn
On Thursday, 20 July 2017 at 13:11:56 UTC, Alex wrote: On Thursday, 20 July 2017 at 12:33:43 UTC, Alex wrote: The Problem is, i dont know what type WHAT_TYPE is / i don´t know how to build a loopable something of futures. Ok, i think i understood now. my function `load` returns

Re: How to replace pairs tags with regexp

2017-07-20 Thread Suliman via Digitalmars-d-learn
Ali Thanks! I opened answer form before you answered me!

Re: How to replace pairs tags with regexp

2017-07-20 Thread Suliman via Digitalmars-d-learn
Question above do not actual now. Now I have got next problem. import std.stdio; import std.regex; import std.file; void main() { auto text = "#Header my header text ##SubHeader my sub header text ###Sub3Header my sub 3 text #Header2 my header2 text";

Re: How to replace pairs tags with regexp

2017-07-20 Thread Ali Çehreli via Digitalmars-d-learn
On 07/20/2017 06:39 AM, Suliman wrote: I have got next code: import std.stdio; import std.regex; import std.file; void main() { auto text = readText("book.txt"); auto inlineCodeBlock = regex("`([^`\n]+)`"); auto bigCodeBlock = regex(r"`{3}[\s\S]*?`{3}"); foreach(t;

Re: opEquals nothrow

2017-07-20 Thread w0rp via Digitalmars-d-learn
On Thursday, 20 July 2017 at 15:10:24 UTC, Aldo wrote: On Thursday, 20 July 2017 at 14:59:50 UTC, Steven Schveighoffer wrote: On 7/20/17 10:38 AM, Aldo wrote: Hello, im tring to add nothrow keyword in my code, but compilation fails : function 'object.opEquals' is not nothrow its a simple

Re: opEquals nothrow

2017-07-20 Thread Anonymouse via Digitalmars-d-learn
On Thursday, 20 July 2017 at 15:10:24 UTC, Aldo wrote: extern(C) nothrow { void onMouseClick(GLFWwindow* window, int button, int action, int d) { try { // my code } catch { } } } Tangent but an easy way of nothrowing:

Re: opEquals nothrow

2017-07-20 Thread Steven Schveighoffer via Digitalmars-d-learn
On 7/20/17 11:10 AM, Aldo wrote: On Thursday, 20 July 2017 at 14:59:50 UTC, Steven Schveighoffer wrote: On 7/20/17 10:38 AM, Aldo wrote: Hello, im tring to add nothrow keyword in my code, but compilation fails : function 'object.opEquals' is not nothrow its a simple comparison between 2

Re: How to debug in vscode with mago-mi?

2017-07-20 Thread WebFreak001 via Digitalmars-d-learn
On Monday, 17 July 2017 at 08:44:46 UTC, Domain wrote: Could anyone show me how to debug in vscode with mago-mi? I have installed vscode with Native Debug, SDLang. I have tried dlang-vscode and code-d. [...] Is the application actually being put in bin/app.exe? Also try a different

Re: opEquals nothrow

2017-07-20 Thread Aldo via Digitalmars-d-learn
On Thursday, 20 July 2017 at 14:59:50 UTC, Steven Schveighoffer wrote: On 7/20/17 10:38 AM, Aldo wrote: Hello, im tring to add nothrow keyword in my code, but compilation fails : function 'object.opEquals' is not nothrow its a simple comparison between 2 objects. How to make opEquals

Re: opEquals nothrow

2017-07-20 Thread Steven Schveighoffer via Digitalmars-d-learn
On 7/20/17 10:38 AM, Aldo wrote: Hello, im tring to add nothrow keyword in my code, but compilation fails : function 'object.opEquals' is not nothrow its a simple comparison between 2 objects. How to make opEquals nothrow ? You can't. Object.opEquals is not nothrow, so object.opEquals is

Re: opEquals nothrow

2017-07-20 Thread bauss via Digitalmars-d-learn
On Thursday, 20 July 2017 at 14:38:03 UTC, Aldo wrote: Hello, im tring to add nothrow keyword in my code, but compilation fails : function 'object.opEquals' is not nothrow its a simple comparison between 2 objects. How to make opEquals nothrow ? thanks Could you show some code.

opEquals nothrow

2017-07-20 Thread Aldo via Digitalmars-d-learn
Hello, im tring to add nothrow keyword in my code, but compilation fails : function 'object.opEquals' is not nothrow its a simple comparison between 2 objects. How to make opEquals nothrow ? thanks

Re: Base class' constructor is not implicitly inherited for immutable classes. A bug or a feature?

2017-07-20 Thread Eugene Wissner via Digitalmars-d-learn
On Wednesday, 19 July 2017 at 16:00:56 UTC, Piotr Mitana wrote: Hello, I have this code: immutable class Base { this() {} } immutable class Derived : Base {} void main() { new immutable Derived(); } I'd like class Derived to automatically inherit the default constructor from

Re: Base class' constructor is not implicitly inherited for immutable classes. A bug or a feature?

2017-07-20 Thread bauss via Digitalmars-d-learn
On Wednesday, 19 July 2017 at 16:00:56 UTC, Piotr Mitana wrote: Hello, I have this code: immutable class Base { this() {} } immutable class Derived : Base {} void main() { new immutable Derived(); } I'd like class Derived to automatically inherit the default constructor from

How to replace pairs tags with regexp

2017-07-20 Thread Suliman via Digitalmars-d-learn
I have got next code: import std.stdio; import std.regex; import std.file; void main() { auto text = readText("book.txt"); auto inlineCodeBlock = regex("`([^`\n]+)`"); auto bigCodeBlock = regex(r"`{3}[\s\S]*?`{3}"); foreach(t;

Re: Array of Template instantiations

2017-07-20 Thread Alex via Digitalmars-d-learn
On Thursday, 20 July 2017 at 12:33:43 UTC, Alex wrote: The Problem is, i dont know what type WHAT_TYPE is / i don´t know how to build a loopable something of futures. Ok, i think i understood now. my function `load` returns `KpiResponseEntity` so Future!(KpiResponseEntity)[] futures; seems

Array of Template instantiations

2017-07-20 Thread Alex via Digitalmars-d-learn
Hi, i don't even know if the subject makes any sense :) What i want to achieve is: instead of making: auto v_a = async( , queryA ); auto v_b = async( , queryB ); auto v_c = async( , queryC ); ( async is a function from vibe and returns a "Future" - see

Commandline args to rdmd --eval=...

2017-07-20 Thread closescreen via Digitalmars-d-learn
Hello, all. Is it possible to pass cli args to rdmd eval-program? F.e. if I try: rdmd --eval="args.writeln" -- 123 then: Cannot have both --eval and a program file ('123') In perl it's possible: perl -e'print join ",", @ARGV' 123 234 # 123,234