Re: Fully-qualified symbol disambiguation is deprecated???

2016-09-08 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, September 08, 2016 18:26:40 Nick Sabalausky via Digitalmars-d- learn wrote: > On 09/08/2016 06:22 PM, Nick Sabalausky wrote: > > On 09/08/2016 06:13 PM, Steven Schveighoffer wrote: > >> And > >> there are still some straggling bugs which cause this message to be > >> erroneously

Re: D1: zlib string to decode

2016-09-08 Thread Era Scarecrow via Digitalmars-d-learn
On Thursday, 8 September 2016 at 16:19:44 UTC, jicman wrote: I have a zlib string that I want to decode. Anybody has any idea how to do that? I am trying to figure out what to send with a POST to create a new internal log and the person that created the form is no longer available, but I

Re: Fully-qualified symbol disambiguation is deprecated???

2016-09-08 Thread Ali Çehreli via Digitalmars-d-learn
On 09/08/2016 03:22 PM, Nick Sabalausky wrote: On 09/08/2016 06:13 PM, Steven Schveighoffer wrote: On 9/8/16 6:02 PM, Nick Sabalausky wrote: I'm getting deprecation messages ("Package...not accessible here, perhaps add static import") when simply trying to use fully-qualified symbol names to

Re: Fully-qualified symbol disambiguation is deprecated???

2016-09-08 Thread Nick Sabalausky via Digitalmars-d-learn
On 09/08/2016 06:22 PM, Nick Sabalausky wrote: On 09/08/2016 06:13 PM, Steven Schveighoffer wrote: And there are still some straggling bugs which cause this message to be erroneously printed. I'm pretty sure I've hit one of those :( Can't be certain though until I examine my specific case

Re: Fully-qualified symbol disambiguation is deprecated???

2016-09-08 Thread Nick Sabalausky via Digitalmars-d-learn
On 09/08/2016 06:13 PM, Steven Schveighoffer wrote: On 9/8/16 6:02 PM, Nick Sabalausky wrote: I'm getting deprecation messages ("Package...not accessible here, perhaps add static import") when simply trying to use fully-qualified symbol names to disambiguate a symbol. Is this really intended?

Re: Fully-qualified symbol disambiguation is deprecated???

2016-09-08 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/8/16 6:13 PM, Steven Schveighoffer wrote: On 9/8/16 6:02 PM, Nick Sabalausky wrote: I'm getting deprecation messages ("Package...not accessible here, perhaps add static import") when simply trying to use fully-qualified symbol names to disambiguate a symbol. Is this really intended? Yes.

Re: Fully-qualified symbol disambiguation is deprecated???

2016-09-08 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/8/16 6:02 PM, Nick Sabalausky wrote: I'm getting deprecation messages ("Package...not accessible here, perhaps add static import") when simply trying to use fully-qualified symbol names to disambiguate a symbol. Is this really intended? Yes. It's difficult to attribute the message

Re: Fully-qualified symbol disambiguation is deprecated???

2016-09-08 Thread Ali Çehreli via Digitalmars-d-learn
On 09/08/2016 03:02 PM, Nick Sabalausky wrote: I'm getting deprecation messages ("Package...not accessible here, perhaps add static import") when simply trying to use fully-qualified symbol names to disambiguate a symbol. Is this really intended? Sounds like the recent changes in 2.071:

Fully-qualified symbol disambiguation is deprecated???

2016-09-08 Thread Nick Sabalausky via Digitalmars-d-learn
I'm getting deprecation messages ("Package...not accessible here, perhaps add static import") when simply trying to use fully-qualified symbol names to disambiguate a symbol. Is this really intended?

Re: VisualD core.exception.RangeError@pipedmd(286): Range violation

2016-09-08 Thread Tofu Ninja via Digitalmars-d-learn
On Thursday, 8 September 2016 at 19:56:45 UTC, Rainer Schuetze wrote: I think I fixed both issues in this build: https://ci.appveyor.com/project/rainers/visuald/build/1.0.76/job/kq0a5bqpy7anou46/artifacts Well that was fast :) It does appear to be fixed on my machine, thanks a lot for the

Re: Generate unique members with recursive mixins or another solution?

2016-09-08 Thread Ali Çehreli via Digitalmars-d-learn
On 09/08/2016 02:55 AM, ilariel wrote: Is it possible to generate unique fields and members with recursive template mixins? I don't fully understand the question but my answer is yes, D can do this as well. :p Ali

Re: VisualD core.exception.RangeError@pipedmd(286): Range violation

2016-09-08 Thread Rainer Schuetze via Digitalmars-d-learn
On 08.09.2016 20:15, Rainer Schuetze wrote: On 08.09.2016 19:35, Tofu Ninja wrote: On Thursday, 8 September 2016 at 07:45:56 UTC, Rainer Schuetze wrote: Fixed it again. You can find a prebuilt binary of pipedmd.exe here:

Re: VisualD core.exception.RangeError@pipedmd(286): Range violation

2016-09-08 Thread Rainer Schuetze via Digitalmars-d-learn
On 08.09.2016 19:35, Tofu Ninja wrote: On Thursday, 8 September 2016 at 07:45:56 UTC, Rainer Schuetze wrote: Fixed it again. You can find a prebuilt binary of pipedmd.exe here: https://ci.appveyor.com/project/rainers/visuald/build/1.0.75/job/n9tf67jxcir6kpmg/artifacts Thanks for the

Re: VisualD core.exception.RangeError@pipedmd(286): Range violation

2016-09-08 Thread Tofu Ninja via Digitalmars-d-learn
On Thursday, 8 September 2016 at 07:45:56 UTC, Rainer Schuetze wrote: Fixed it again. You can find a prebuilt binary of pipedmd.exe here: https://ci.appveyor.com/project/rainers/visuald/build/1.0.75/job/n9tf67jxcir6kpmg/artifacts Thanks for the response, I think there is more going on than

D1: zlib string to decode

2016-09-08 Thread jicman via Digitalmars-d-learn
Hi. I have a zlib string that I want to decode. Anybody has any idea how to do that? I am trying to figure out what to send with a POST to create a new internal log and the person that created the form is no longer available, but I need to find what are the pieces and data that I need to

Re: Templates problem

2016-09-08 Thread deXtoRious via Digitalmars-d-learn
On Thursday, 8 September 2016 at 10:20:42 UTC, Russel Winder wrote: On Wed, 2016-09-07 at 20:29 +, deXtoRious via Digitalmars-d-learn wrote: […] More to the general point of the discussion, I find that most scientifically minded users of Python already appreciate some of the inherent

Re: UFCS not working with alias

2016-09-08 Thread Andre Pany via Digitalmars-d-learn
On Thursday, 8 September 2016 at 13:38:54 UTC, Steven Schveighoffer wrote: There is a workaround, identified by Vladimir Panteleev (https://blog.thecybershadow.net/2015/04/28/the-amazing-template-that-does-nothing/): import std.algorithm; bool fulfillsKeyPredicate(string s, string t)

Re: Functions, nothrow and assert

2016-09-08 Thread H. S. Teoh via Digitalmars-d-learn
On Thu, Sep 08, 2016 at 12:07:43PM +, Lodovico Giaretta via Digitalmars-d-learn wrote: [...] > To expand on the previous correct answers, nothrow is about not > throwing Exceptions. Exceptions are part of the normal flow of the > program: they are used to signal recoverable errors, much like

Re: Templates problem

2016-09-08 Thread data pulverizer via Digitalmars-d-learn
On Thursday, 8 September 2016 at 10:18:36 UTC, Russel Winder wrote: I am certainly hoping that Chapel will be the language to displace NumPy for serious computation in the Python-sphere. Given it's foundation in the PGAS model, it has all the parallelism needs, both cluster and local, built

Re: [GtkD] How to connect to notify::active signal?

2016-09-08 Thread Geert via Digitalmars-d-learn
On Saturday, 4 May 2013 at 09:59:12 UTC, Mike Wey wrote: On 05/04/2013 05:20 AM, Alexandr Druzhinin wrote: 04.05.2013 1:18, Mike Wey пишет: On 05/03/2013 06:30 PM, Alexandr Druzhinin wrote: I need to connect to "notify::active" signal for Switch widget to process changing of its state. The

Re: UFCS not working with alias

2016-09-08 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/7/16 4:26 AM, Andre Pany wrote: On Wednesday, 7 September 2016 at 08:08:34 UTC, rikki cattermole wrote: On 07/09/2016 8:06 PM, Andre Pany wrote: Should I open an enhancement request? No. It works outside of the function (part of lookup rules). I simplified my example too much. Yes in

Re: Classes new'd inside for loop are all the same instance?

2016-09-08 Thread Meta via Digitalmars-d-learn
On Thursday, 8 September 2016 at 12:36:29 UTC, drug wrote: is address of the variable c, that is allocated on the stack and has the same address on every iteration cast(void*)c return the value of variable c that is address of a class instance and is different for every iteration in other

Re: Templates problem

2016-09-08 Thread jmh530 via Digitalmars-d-learn
On Thursday, 8 September 2016 at 10:18:36 UTC, Russel Winder wrote: I am certainly hoping that Chapel will be the language to displace NumPy for serious computation in the Python-sphere. Given it's foundation in the PGAS model, it has all the parallelism needs, both cluster and local, built

Re: Classes new'd inside for loop are all the same instance?

2016-09-08 Thread drug via Digitalmars-d-learn
08.09.2016 15:24, lobo пишет: I am confused, which is normal, but I'd appreciate some help :-) If I create N classes in a for loop they are all the same instance. I would expect each to be a unique instance of the class. See the code below --- class C {} void main() { import std.stdio;

Re: Classes new'd inside for loop are all the same instance?

2016-09-08 Thread lobo via Digitalmars-d-learn
On Thursday, 8 September 2016 at 12:36:29 UTC, drug wrote: 08.09.2016 15:24, lobo пишет: [...] is address of the variable c, that is allocated on the stack and has the same address on every iteration cast(void*)c return the value of variable c that is address of a class instance and is

Re: Classes new'd inside for loop are all the same instance?

2016-09-08 Thread lobo via Digitalmars-d-learn
On Thursday, 8 September 2016 at 12:28:55 UTC, Meta wrote: On Thursday, 8 September 2016 at 12:24:48 UTC, lobo wrote: [...] I don't have time to explain at the moment, but change the `` to `cast(void*)c` and you will see what you expect. I will post an explanation soon. Thanks for the

Re: Classes new'd inside for loop are all the same instance?

2016-09-08 Thread rikki cattermole via Digitalmars-d-learn
On 09/09/2016 12:24 AM, lobo wrote: I am confused, which is normal, but I'd appreciate some help :-) If I create N classes in a for loop they are all the same instance. I would expect each to be a unique instance of the class. See the code below --- class C {} void main() { import

Re: Classes new'd inside for loop are all the same instance?

2016-09-08 Thread Meta via Digitalmars-d-learn
On Thursday, 8 September 2016 at 12:24:48 UTC, lobo wrote: I am confused, which is normal, but I'd appreciate some help :-) If I create N classes in a for loop they are all the same instance. I would expect each to be a unique instance of the class. See the code below --- class C {} void

Classes new'd inside for loop are all the same instance?

2016-09-08 Thread lobo via Digitalmars-d-learn
I am confused, which is normal, but I'd appreciate some help :-) If I create N classes in a for loop they are all the same instance. I would expect each to be a unique instance of the class. See the code below --- class C {} void main() { import std.stdio; auto c1 = new C();

Re: Functions, nothrow and assert

2016-09-08 Thread Lodovico Giaretta via Digitalmars-d-learn
On Thursday, 8 September 2016 at 11:40:17 UTC, Russel Winder wrote: Is the fact that: void f() nothrow { assert(1 == 0); } int main() { f(); return 0; } compiles fine but at run time f does indeed throw an exception what should happen? If

Re: Functions, nothrow and assert

2016-09-08 Thread Meta via Digitalmars-d-learn
On Thursday, 8 September 2016 at 11:45:32 UTC, Basile B. wrote: f() is nothrow because assert() throws an "AssertError" not an "Exception". Since Error descendants are not recoverable the program usually crashes. The program is guaranteed to crash unless you catch the error (not

Re: Functions, nothrow and assert

2016-09-08 Thread Basile B. via Digitalmars-d-learn
On Thursday, 8 September 2016 at 11:40:17 UTC, Russel Winder wrote: Is the fact that: void f() nothrow { assert(1 == 0); } int main() { f(); return 0; } compiles fine but at run time f does indeed throw an exception what should happen? If

Functions, nothrow and assert

2016-09-08 Thread Russel Winder via Digitalmars-d-learn
Is the fact that: void f() nothrow { assert(1 == 0); } int main() { f(); return 0; } compiles fine but at run time f does indeed throw an exception what should happen? If it is what does nothrow actually mean? -- Russel.

Re: Templates problem

2016-09-08 Thread Russel Winder via Digitalmars-d-learn
On Wed, 2016-09-07 at 16:21 +, Kagamin via Digitalmars-d-learn wrote: > On Wednesday, 7 September 2016 at 11:37:44 UTC, Russel Winder  > wrote: > > > > The real problem though is the terrifying error message. I am  > > having a hard time finding a way of pitching them to  > > Pythonistas. >

Re: Templates problem

2016-09-08 Thread Russel Winder via Digitalmars-d-learn
On Wed, 2016-09-07 at 20:29 +, deXtoRious via Digitalmars-d-learn wrote: > […] > More to the general point of the discussion, I find that most  > scientifically minded users of Python already appreciate some of  > the inherent advantages of lower level statically typed languages  > and often

Re: Templates problem

2016-09-08 Thread Russel Winder via Digitalmars-d-learn
On Wed, 2016-09-07 at 20:29 +, jmh530 via Digitalmars-d-learn wrote: > […] > Are you familiar with Chapel at all? The language allows the user  > to specify a domain with an array, facilitating sparsity or  > arrays distributed across different machines. For some reason I  > was reminded of

Generate unique members with recursive mixins or another solution?

2016-09-08 Thread ilariel via Digitalmars-d-learn
Is it possible to generate unique fields and members with recursive template mixins? Each mixin has their own scope even if outer scope shadows their scope. So could it be possible to generate template methods that can access members in their own scopes? Assuming the members are dispatches

Re: Instantiating a class with range template parameter

2016-09-08 Thread Jon Degenhardt via Digitalmars-d-learn
On Thursday, 8 September 2016 at 08:44:54 UTC, Lodovico Giaretta wrote: On Thursday, 8 September 2016 at 08:20:49 UTC, Jon Degenhardt wrote: [snip] I think that auto x = new Derived!(typeof(stdout.lockingTextWriter()))(); // note the parenthesis should work. But usually, you save the

Re: How compiler detects forward reference errors

2016-09-08 Thread Igor via Digitalmars-d-learn
Thank you all for your replies. I am trying to learn a bit about compiler and language design and I really like D among many other languages I read about so I am trying to learn from it as well.

Re: Data structures of mixed type

2016-09-08 Thread Andrea Fontana via Digitalmars-d-learn
On Thursday, 8 September 2016 at 08:56:13 UTC, Russel Winder wrote: What is the idiomatic way of having an array with a mix of int and float data? Maybe https://dlang.org/phobos/std_variant.html#.Algebraic ? Is relying on automated conversion of int to float acceptable? I don't think so:

Data structures of mixed type

2016-09-08 Thread Russel Winder via Digitalmars-d-learn
What is the idiomatic way of having an array with a mix of int and float data? Is relying on automated conversion of int to float acceptable? -- Russel. = Dr Russel Winder t: +44 20 7585 2200 voip:

Re: Instantiating a class with range template parameter

2016-09-08 Thread Lodovico Giaretta via Digitalmars-d-learn
On Thursday, 8 September 2016 at 08:20:49 UTC, Jon Degenhardt wrote: I've been generalizing output routines by passing an OutputRange as an argument. This gets interesting when the output routine is an virtual function. Virtual functions cannot be templates, so instead the template parameters

Instantiating a class with range template parameter

2016-09-08 Thread Jon Degenhardt via Digitalmars-d-learn
I've been generalizing output routines by passing an OutputRange as an argument. This gets interesting when the output routine is an virtual function. Virtual functions cannot be templates, so instead the template parameters need to be part of class definition and specified when instantiating

Re: VisualD core.exception.RangeError@pipedmd(286): Range violation

2016-09-08 Thread Rainer Schuetze via Digitalmars-d-learn
On 07.09.2016 22:10, Rainer Schuetze wrote: On 07.09.2016 19:28, Rainer Schuetze wrote: On 06.09.2016 06:38, Tofu Ninja wrote: I get "core.exception.RangeError@pipedmd(286): Range violation" whenever I try to build from visual D. Is there any workaround for this? It was reported[1]

Re: Get all files imported by a D source file

2016-09-08 Thread Yuxuan Shui via Digitalmars-d-learn
On Thursday, 8 September 2016 at 06:33:00 UTC, Jacob Carlborg wrote: On 2016-09-08 07:39, Yuxuan Shui wrote: Hi, I wonder if there's standardized way to gather which files are imported by a source file. I know I can run "dmd -v" and look for lines start with "import", but I don't know if

Re: Get all files imported by a D source file

2016-09-08 Thread Jacob Carlborg via Digitalmars-d-learn
On 2016-09-08 07:39, Yuxuan Shui wrote: Hi, I wonder if there's standardized way to gather which files are imported by a source file. I know I can run "dmd -v" and look for lines start with "import", but I don't know if this is the best way to do it. You can use the "-deps" flag. -- /Jacob