Re: Limited type matching?

2013-09-09 Thread Kenji Hara
On Monday, 9 September 2013 at 11:36:42 UTC, Andrej Mitrovic wrote: On 9/8/13, Namespace wrote: What is the problem? If the compiler is able to cast implicit from ushort to short, what is the problem of casting ushort[2] to short[2]? Oh I didn't even noticed it was a signed/unsigned issue.

Re: What's about virtual?

2013-09-09 Thread H. S. Teoh
On Mon, Sep 09, 2013 at 05:28:24PM -0700, Andrei Alexandrescu wrote: > On 9/9/13 12:47 PM, H. S. Teoh wrote: > >On Mon, Sep 09, 2013 at 09:37:07PM +0200, Namespace wrote: > >>It's been a while since Manu convinced Walter and Andrei to > >>introduce a virtual Keyword and to change the default from v

Re: What's about virtual?

2013-09-09 Thread Andrei Alexandrescu
On 9/9/13 12:47 PM, H. S. Teoh wrote: On Mon, Sep 09, 2013 at 09:37:07PM +0200, Namespace wrote: It's been a while since Manu convinced Walter and Andrei to introduce a virtual Keyword and to change the default from virtual methods to final methods. Anything new? Anybody working on that? I would

Re: What's about virtual?

2013-09-09 Thread Namespace
On Monday, 9 September 2013 at 19:52:34 UTC, Andrej Mitrovic wrote: On 9/9/13, H. S. Teoh wrote: And even then, it may anger a lot of existing users. I'm not sure about that. It seems people who actually write class-based code would prefer to have this (that's my limited analysis of IRC com

Re: What's about virtual?

2013-09-09 Thread Namespace
On Monday, 9 September 2013 at 19:48:50 UTC, H. S. Teoh wrote: On Mon, Sep 09, 2013 at 09:37:07PM +0200, Namespace wrote: It's been a while since Manu convinced Walter and Andrei to introduce a virtual Keyword and to change the default from virtual methods to final methods. Anything new? Anybo

Why is the rex.w prefix not generated for certain instructions in inline assembler blocks?

2013-09-09 Thread Joseph Cassman
The following artificial code sample fails to compile (DMD 2.063.2 run on Ubuntu 13.04 on an AMD Athlon II X4 635 processor) void main() { asm { mov RAX,0x1UL; mov R8,0x1UL; and RAX,0xUL; and

Re: What's about virtual?

2013-09-09 Thread H. S. Teoh
On Mon, Sep 09, 2013 at 10:05:18PM +0200, Andrej Mitrovic wrote: > On 9/9/13, H. S. Teoh wrote: > > Well, then I stand corrected. :) > > You may sit. You get a D. Just what I needed: another D in programming. :-P T -- A computer doesn't mind if its programs are put to purposes that don't mat

Any idea for a solution to handle overloads when dynamically implementing methods?

2013-09-09 Thread Gary Willoughby
Just wondered if i could pick you brains for a nice solution to dynamically add methods to a class, paying particular attention to overloads. I'm currently writing a mocking framework and everything's coming along nicely and i'm wondering how to handle replacing overloads of the mocked class.

Re: What's about virtual?

2013-09-09 Thread Andrej Mitrovic
On 9/9/13, H. S. Teoh wrote: > Well, then I stand corrected. :) You may sit. You get a D.

Re: What's about virtual?

2013-09-09 Thread H. S. Teoh
On Mon, Sep 09, 2013 at 09:37:07PM +0200, Namespace wrote: > It's been a while since Manu convinced Walter and Andrei to > introduce a virtual Keyword and to change the default from virtual > methods to final methods. > Anything new? Anybody working on that? I would love to see that > soon. This i

What's about virtual?

2013-09-09 Thread Namespace
It's been a while since Manu convinced Walter and Andrei to introduce a virtual Keyword and to change the default from virtual methods to final methods. Anything new? Anybody working on that? I would love to see that soon.

Re: What's about virtual?

2013-09-09 Thread H. S. Teoh
On Mon, Sep 09, 2013 at 09:52:21PM +0200, Andrej Mitrovic wrote: > On 9/9/13, H. S. Teoh wrote: > > And even then, it may anger a lot of existing users. > > I'm not sure about that. It seems people who actually write > class-based code would prefer to have this (that's my limited analysis > of IR

Re: What's about virtual?

2013-09-09 Thread Andrej Mitrovic
On 9/9/13, H. S. Teoh wrote: > And even then, it may anger a lot of existing users. I'm not sure about that. It seems people who actually write class-based code would prefer to have this (that's my limited analysis of IRC comments :p).

Re: Adding libraries to an executable

2013-09-09 Thread Anton Alexeev
On Friday, 6 September 2013 at 22:31:52 UTC, Jonathan M Davis wrote: On Friday, September 06, 2013 23:31:57 Anton Alexeev wrote: I've written a program which uses curl library. So on a PC without curl the program will not work until you install the library. Is there a way to put the curl library

Re: UFCS from within classes

2013-09-09 Thread Maxim Fomin
On Monday, 9 September 2013 at 17:07:59 UTC, Gyron wrote: Hey there, I've experimented a little with UFCS today and ran into a problem. My first question, which is kinda off-topic: Why does D use the int type if you give it a number started with 0x(hex), shouldn't it use uint for that ? It i

Re: UFCS from within classes

2013-09-09 Thread Gyron
On Monday, 9 September 2013 at 17:17:07 UTC, H. S. Teoh wrote: On Mon, Sep 09, 2013 at 07:07:58PM +0200, Gyron wrote: Hey there, I've experimented a little with UFCS today and ran into a problem. My first question, which is kinda off-topic: Why does D use the int type if you give it a number s

UFCS from within classes

2013-09-09 Thread Gyron
Hey there, I've experimented a little with UFCS today and ran into a problem. My first question, which is kinda off-topic: Why does D use the int type if you give it a number started with 0x(hex), shouldn't it use uint for that ? Here comes the real question: I've extended the int by one func

Re: UFCS from within classes

2013-09-09 Thread H. S. Teoh
On Mon, Sep 09, 2013 at 07:07:58PM +0200, Gyron wrote: > Hey there, I've experimented a little with UFCS today and ran into a > problem. > > My first question, which is kinda off-topic: > Why does D use the int type if you give it a number started with > 0x(hex), shouldn't it use uint for that ?

Re: A small and simple library for working with Qt.

2013-09-09 Thread Maxim Fomin
On Monday, 9 September 2013 at 08:06:17 UTC, MGW wrote: I am D since the spring. Without a simple GUI to work hard. I tried to deal with QtD quick disconnects, but I failed. I had to develop its small and very simple library to work with Qt. The working title of QtE. Works in Windows 32 and Lin

volatile

2013-09-09 Thread eles
Among the intended uses of volatile is to "allow access to memory mapped devices" (quoting wikipedia). This play an immense role in the embedded, signaling to the compiler that the content of that variable/address could change without notice. It is not because other thread would change it. I

Re: Limited type matching?

2013-09-09 Thread monarch_dodra
On Monday, 9 September 2013 at 11:36:42 UTC, Andrej Mitrovic wrote: On 9/8/13, Namespace wrote: What is the problem? If the compiler is able to cast implicit from ushort to short, what is the problem of casting ushort[2] to short[2]? Oh I didn't even noticed it was a signed/unsigned issue.

Re: Limited type matching?

2013-09-09 Thread Andrej Mitrovic
On 9/8/13, Namespace wrote: > What is the problem? If the compiler is able to cast implicit > from ushort to short, what is the problem of casting ushort[2] to > short[2]? Oh I didn't even noticed it was a signed/unsigned issue. I'm not sure whether or not it's a bug. But file it anyways and some

Re: Limited type matching?

2013-09-09 Thread Andrej Mitrovic
On 9/9/13, Namespace wrote: > Ok I fill a bug for that... Please do, that code should compile.

Re: A small and simple library for working with Qt.

2013-09-09 Thread MGW
On Monday, 9 September 2013 at 09:39:51 UTC, Chris wrote: On Monday, 9 September 2013 at 08:06:17 UTC, MGW wrote: I am D since the spring. Without a simple GUI to work hard. I tried to deal with QtD quick disconnects, but I failed. I had to develop its small and very simple library to work with

Re: Limited type matching?

2013-09-09 Thread Namespace
On Sunday, 8 September 2013 at 21:11:53 UTC, Namespace wrote: Code: import std.stdio; void foo(short x, short y) { } void foo(short[2] xy) { } void main() { foo(1, 2); /// works foo([1, 2]); /// works ushort[2] xy = [1, 2]; foo(xy); /// fails

Re: A small and simple library for working with Qt.

2013-09-09 Thread Chris
On Monday, 9 September 2013 at 08:06:17 UTC, MGW wrote: I am D since the spring. Without a simple GUI to work hard. I tried to deal with QtD quick disconnects, but I failed. I had to develop its small and very simple library to work with Qt. The working title of QtE. Works in Windows 32 and Lin

A small and simple library for working with Qt.

2013-09-09 Thread MGW
I am D since the spring. Without a simple GUI to work hard. I tried to deal with QtD quick disconnects, but I failed. I had to develop its small and very simple library to work with Qt. The working title of QtE. Works in Windows 32 and Linux 32. A very simple idea. Instances of classes get thro