Re: How to export a deduced template type to the enclosing scope?

2014-09-23 Thread kiran kumari via Digitalmars-d-learn
On Tuesday, 23 September 2014 at 22:09:11 UTC, Ali Çehreli wrote: I think similar questions were asked by others in different contexts before. I played with core.thread.Fibre a little bit. As others have done a number of times before, I tried to make the following syntax possible inside fiber

Re: Does remove immutability using cast to pass in a function make sense?

2014-09-23 Thread kiran kumari via Digitalmars-d-learn
On Tuesday, 23 September 2014 at 02:07:09 UTC, AsmMan wrote: I have this array: static immutable string[] months = ["jan", "fev", ...]; I need to pass it into canFind(). But it doesn't works with immutables so I need to cast it like in canFind(cast(string[]) months, month) to work. There's a

Re: Trying to get Derelict.opengl3.gl3 and derelict.glfw3.glfw3 to work together

2014-09-23 Thread kiran kumari via Digitalmars-d-learn
On Wednesday, 24 September 2014 at 03:08:55 UTC, csmith wrote: Hi everyone, I've got derelict.opengl3.gl3 and derelict.glfw3.glfw3 setup with dub and can get a window to open up and close with glfw3. I can also use glClear(GL_COLOR_BUFFER_BIT); however, beyond this most OpenGL commands fail a

Re: with (auto p = new ...)

2014-09-23 Thread kiran kumari via Digitalmars-d-learn
aOn Tuesday, 23 September 2014 at 15:19:59 UTC, Andre wrote: Hi, I just wonder why "with (auto p = new ...)" is not working. It would be some syntax sugar in this scenario: with (auto p = new Panel()) { parent = this; text = "bla";

Re: with (auto p = new ...)

2014-09-23 Thread Nordlöw
On Tuesday, 23 September 2014 at 20:16:29 UTC, andre wrote: Therefore it seems strange,the same does not work with auto. Yes, it seem logical to me allow this also in with and switch.

Trying to get Derelict.opengl3.gl3 and derelict.glfw3.glfw3 to work together

2014-09-23 Thread csmith via Digitalmars-d-learn
Hi everyone, I've got derelict.opengl3.gl3 and derelict.glfw3.glfw3 setup with dub and can get a window to open up and close with glfw3. I can also use glClear(GL_COLOR_BUFFER_BIT); however, beyond this most OpenGL commands fail and I can't seem to figure out how to fix it. Code: import

Re: Does remove immutability using cast to pass in a function make sense?

2014-09-23 Thread AsmMan via Digitalmars-d-learn
On Tuesday, 23 September 2014 at 03:34:22 UTC, Ali Çehreli wrote: If it still doesn't work for you please show us a minimal program that demonstrates the problem. Ali Ok, the case is the follow, I updated my dmd compiler some days ago (after my mono crashed and I lost some of D files, I pos

Re: How to export a deduced template type to the enclosing scope?

2014-09-23 Thread Ali Çehreli via Digitalmars-d-learn
On 09/23/2014 03:28 PM, monarch_dodra wrote: On Tuesday, 23 September 2014 at 22:09:11 UTC, Ali Çehreli wrote: So near and yet so far... :) Ali You explain "how" you want to achieve your goal, but I'm not sure I understand "what" the goal is. Perhaps if you explain that in more detail, I'd ha

Re: How to export a deduced template type to the enclosing scope?

2014-09-23 Thread monarch_dodra via Digitalmars-d-learn
On Tuesday, 23 September 2014 at 22:09:11 UTC, Ali Çehreli wrote: So near and yet so far... :) Ali You explain "how" you want to achieve your goal, but I'm not sure I understand "what" the goal is. Perhaps if you explain that in more detail, I'd have a better understanding of the problem.

How to export a deduced template type to the enclosing scope?

2014-09-23 Thread Ali Çehreli via Digitalmars-d-learn
I think similar questions were asked by others in different contexts before. I played with core.thread.Fibre a little bit. As others have done a number of times before, I tried to make the following syntax possible inside fiber code: yield(42); I wonder whether there is a clever trick to

Re: with (auto p = new ...)

2014-09-23 Thread Meta via Digitalmars-d-learn
I think this is just a language oversight. It's allowed in if statements, and people have made a good case for allowing it for switch statements. It just hasn't been implemented. I made an attempt one evening to implement it for switch statements, but I'm not at all familiar with DMD, so I put

Re: with (auto p = new ...)

2014-09-23 Thread andre via Digitalmars-d-learn
Yes, that is also working. As far as I remember (only my tablet currently available) also this works: Panel p; with(p = new Panel ()) {} Therefore it seems strange,the same does not work with auto. Kind regards André On Tuesday, 23 September 2014 at 19:49:22 UTC, Graham Fawcett wrote: Sorr

Re: with (auto p = new ...)

2014-09-23 Thread Graham Fawcett via Digitalmars-d-learn
Sorry, I sent that last message before I intended to. How about: auto b = new Button(); with (b) { ... } 'b' is explicitly outside of the scope of the 'with' block, which may not be what you intended. But you could use more braces to add an extra level of scope if that's an i

Re: with (auto p = new ...)

2014-09-23 Thread Graham Fawcett via Digitalmars-d-learn
How about: auto b - new Button(); with (b) { On Tuesday, 23 September 2014 at 15:19:59 UTC, Andre wrote: Hi, I just wonder why "with (auto p = new ...)" is not working. It would be some syntax sugar in this scenario: with (auto p = new Panel()) { parent = t

Re: with (auto p = new ...)

2014-09-23 Thread Nordlöw
On Tuesday, 23 September 2014 at 15:19:59 UTC, Andre wrote: I just wonder why "with (auto p = new ...)" is not working. It would be some syntax sugar in this scenario: I presume with is limited to expressions and not statements as the messages says. However, you can use if (auto p =

with (auto p = new ...)

2014-09-23 Thread Andre via Digitalmars-d-learn
Hi, I just wonder why "with (auto p = new ...)" is not working. It would be some syntax sugar in this scenario: with (auto p = new Panel()) { parent = this; text = "bla"; with (auto b = new Button()) {

Re: New changes to DDOC where is the tag coming from in parent classes?

2014-09-23 Thread Gary Willoughby via Digitalmars-d-learn
On Tuesday, 23 September 2014 at 10:54:35 UTC, Kagamin wrote: On Monday, 22 September 2014 at 20:44:25 UTC, Gary Willoughby wrote: Is there a master ddoc file being read from somewhere? https://github.com/D-Programming-Language/dmd/blob/master/src/doc.c#L132 Thanks! I'd bet my arse it's DDOC_

Re: Can't get Visual D to come up. No warnings, no errors, no nothing

2014-09-23 Thread evilrat via Digitalmars-d-learn
On Tuesday, 23 September 2014 at 10:29:10 UTC, remco johannes wrote: why you guys have problems with it? it is so simple, install isolated shell first, then install ingegrated shell, install visuald and now you have your visuald environment ready to use. i Tried al kind of combination and in

Re: New changes to DDOC where is the tag coming from in parent classes?

2014-09-23 Thread Kagamin via Digitalmars-d-learn
https://issues.dlang.org/show_bug.cgi?id=198

Re: New changes to DDOC where is the tag coming from in parent classes?

2014-09-23 Thread Kagamin via Digitalmars-d-learn
On Monday, 22 September 2014 at 20:44:25 UTC, Gary Willoughby wrote: Is there a master ddoc file being read from somewhere? https://github.com/D-Programming-Language/dmd/blob/master/src/doc.c#L132

Re: Does remove immutability using cast to pass in a function make sense?

2014-09-23 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/22/14 10:07 PM, AsmMan wrote: I have this array: static immutable string[] months = ["jan", "fev", ...]; I need to pass it into canFind(). But it doesn't works with immutables so I need to cast it like in canFind(cast(string[]) months, month) to work. There's a reason related to design why

Re: Can't get Visual D to come up. No warnings, no errors, no nothing

2014-09-23 Thread remco johannes via Digitalmars-d-learn
why you guys have problems with it? it is so simple, install isolated shell first, then install ingegrated shell, install visuald and now you have your visuald environment ready to use. i Tried al kind of combination and installing order - including the one you propossed - unfortunately it di

Re: Can't get Visual D to come up. No warnings, no errors, no nothing

2014-09-23 Thread Remco johannes via Digitalmars-d-learn
why you guys have problems with it? it is so simple, install isolated shell first, then install ingegrated shell, install visuald and now you have your visuald environment ready to use. i Tried al kind of combination and installing orer - including the one you propossed - unfortunately it did

Re: Can't get Visual D to come up. No warnings, no errors, no nothing

2014-09-23 Thread evilrat via Digitalmars-d-learn
On Tuesday, 23 September 2014 at 07:02:58 UTC, remco johannes wrote: On Monday, 22 September 2014 at 03:21:44 UTC, WhatMeWorry wrote: Anybody installed Visual D recently? As per the install instructions, I downloaded the Visual Studio isolated Shell 2013 and its integrated package. Everythin

Re: New changes to DDOC where is the tag coming from in parent classes?

2014-09-23 Thread Gary Willoughby via Digitalmars-d-learn
On Monday, 22 September 2014 at 20:44:25 UTC, Gary Willoughby wrote: Below is a change that results from re-generating my documentation using ddoc. I wonder where the new tags are coming from that wrap the parent class name. -class Button: tkd.widget.textwidget.TextWidget; +class Button:

Re: Can't get Visual D to come up. No warnings, no errors, no nothing

2014-09-23 Thread remco johannes via Digitalmars-d-learn
On Monday, 22 September 2014 at 03:21:44 UTC, WhatMeWorry wrote: Anybody installed Visual D recently? As per the install instructions, I downloaded the Visual Studio isolated Shell 2013 and its integrated package. Everything went smoothly. I then downloaded Visual D and installed it with no