On Saturday, December 01, 2012 03:05:00 js.mdnq wrote:
> Let O be an object with opCast overridden, then
>
>
> writeln(O); //prints string
> writeln(cast(void *)O)) // error, works fine if I comment out the
> opCast override
> writeln(&O) // address of pointer to O, not what I want.
>
> I want t
Let O be an object with opCast overridden, then
writeln(O); //prints string
writeln(cast(void *)O)) // error, works fine if I comment out the
opCast override
writeln(&O) // address of pointer to O, not what I want.
I want to compare a few objects based on their location. (I know
this is bad
I'm running into an issue of trying to get back the normal this
pointer ;/
If I so `alias a this;` how do I get the pointer to the object
back for other purposes?
On 12/01/2012 12:13 AM, Aytug wrote:
So I have installed dmd, gdc, emacs and d-mode.el on my Debian
machine.
I can compile the program fine with M-compile. The problem starts
after that.
I cannot run the output file properly from within emacs. Either
there is a way and I cannot find it, or ther
On Friday, 30 November 2012 at 23:13:10 UTC, Aytug wrote:
So I have installed dmd, gdc, emacs and d-mode.el on my Debian
machine.
I can compile the program fine with M-compile. The problem
starts
after that.
I cannot run the output file properly from within emacs. Either
there is a way and I
So I have installed dmd, gdc, emacs and d-mode.el on my Debian
machine.
I can compile the program fine with M-compile. The problem starts
after that.
I cannot run the output file properly from within emacs. Either
there is a way and I cannot find it, or there really is no way.
What I try instea
On Friday, 30 November 2012 at 19:52:26 UTC, Jonathan M Davis
wrote:
If you're compiling with -property, filter must have the parens
for the
function call as it's a function, not a property. The !() is
for the template
arguments and is separate from the parens for the function
call. That mean
On Friday, 30 November 2012 at 21:46:47 UTC, Rob T wrote:
On Friday, 30 November 2012 at 14:14:36 UTC, js.mdnq wrote:
On Friday, 30 November 2012 at 14:02:42 UTC, Andrej Mitrovic
wrote:
On 11/30/12, js.mdnq wrote:
alias t this;
This should explain: http://dlang.org/class.html#AliasThis
Th
On Friday, 30 November 2012 at 14:14:36 UTC, js.mdnq wrote:
On Friday, 30 November 2012 at 14:02:42 UTC, Andrej Mitrovic
wrote:
On 11/30/12, js.mdnq wrote:
alias t this;
This should explain: http://dlang.org/class.html#AliasThis
Thanks, I'm sure I saw that at some point but I guess it just
On Friday, 30 November 2012 at 19:52:26 UTC, Jonathan M Davis
wrote:
If you're compiling with -property, filter must have the parens
for the
function call as it's a function, not a property. The !() is
for the template
arguments and is separate from the parens for the function
call. That means
On Friday, November 30, 2012 13:02:50 Dan wrote:
> On Friday, 30 November 2012 at 07:29:59 UTC, Joshua Niehus wrote:
> > On Friday, 30 November 2012 at 06:29:01 UTC, Joshua Niehus
> >
> > wrote:
> >> I think if you go breadth first, you can filter out the
> >> unwanted directories before it delves
On Friday, 30 November 2012 at 19:09:12 UTC, Maxim Fomin wrote:
On Friday, 30 November 2012 at 18:44:31 UTC, RenatoUtsch wrote:
$ dmd testReturn.d
...
because you didn't compiled the second file.
Man, I was going to say that it didn't work, that I tested it
before, but then I noticed that
On Friday, 30 November 2012 at 18:44:31 UTC, RenatoUtsch wrote:
$ dmd testReturn.d
...
because you didn't compiled the second file.
11/30/2012 11:29 AM, Joshua Niehus пишет:
On Friday, 30 November 2012 at 06:29:01 UTC, Joshua Niehus wrote:
I think if you go breadth first, you can filter out the unwanted
directories before it delves into them
oh wait... it probably still looks through all those dir's.
What about this?
impo
11/30/2012 12:36 AM, Ali Çehreli пишет:
On 11/29/2012 12:06 PM, Michael wrote:
>> Because you used uint instead of ubyte, array is bigger, memory
>> exhausts faster.
> Oh, I see.
>
>>> 3. Why it helps?
>>> GC.free(data.ptr);
>>
>> Initial leak happened because for some reason array alloc
Hello,
I was trying to play with modules and import, but I couldn't
understand why this code is giving linker errors:
/classy/widget.d
module classy.widget;
class ReturnItself
{
public ref ReturnItself returnItself()
{
return this;
On Friday, 30 November 2012 at 12:02:51 UTC, Dan wrote:
Good idea, thanks. I could not get original to compile as is -
but the concept is just what was needed. I got an error on line
8:
Error: not a property dirEntries(path, cast(SpanMode)0,
true).filter!(__lambda2)
I'm using a quite recent ve
Amazing! It works! Thank you so much :)
On Fri, Nov 30, 2012 at 04:57:44PM +0100, Chopin wrote:
> I tried the following:
>
> import std.stdio;
> import std.regex;
>
> bool lol(string name, string val)
> {
> if (name == "lal")
> if (val[0..3] == "2124")
> return true;
> return false;
> }
>
> bool lal(string
I tried the following:
import std.stdio;
import std.regex;
bool lol(string name, string val)
{
if (name == "lal")
if (val[0..3] == "2124")
return true;
return false;
}
bool lal(string name, string val) { return false; }
alias bool delegate(string, string) DgType;
voi
On Fri, Nov 30, 2012 at 04:41:40PM +0100, Chopin wrote:
> Hi!
>
> I've never used delegates before etc. not really familiar with it.
[...]
You could try something like this:
alias bool delegate(string, string) DgType;
DgType[] arrayOfDelegates;
T
--
Why waste time learning, w
Hi!
I've never used delegates before etc. not really familiar with it.
I was trying something like this:
import std.stdio;
import std.regex;
bool lol(string name, string val)
{
if (name == "lal")
if (val[0..3] == "2124")
return true;
return false;
}
bool lal(string
js.mdnq:
It seems one can accomplish this using delegates assigned by
generic functions.
If you care so much for performance, when you work with D
delegates it's useful to know the difference between static/scope
delegates (that are just a fat pointer) and closures (that often
induce a heap
On Friday, 30 November 2012 at 14:02:42 UTC, Andrej Mitrovic
wrote:
On 11/30/12, js.mdnq wrote:
alias t this;
This should explain: http://dlang.org/class.html#AliasThis
Thanks, I'm sure I saw that at some point but I guess it just
didn't sink in. This seems really cool and might solve a pr
I've seen this technique pop up in several things and I'm curious
to what it is/how it's used?
alias t this;
does what? It seems like it's used as a way to "trick" the
compiler into doing some cool/useful things?
It seems one can accomplish this using delegates assigned by
generic functions. The delegate will end hold holding the "state"
of the function. It sort of acts like a binder. It seems to work
but more testing needs to be done. I'm not sure how efficient it
is or if there is a better way but bas
On Friday, 30 November 2012 at 03:40:31 UTC, Ali Çehreli wrote:
On 11/29/2012 07:24 PM, jerro wrote:
On Friday, 30 November 2012 at 02:59:06 UTC, js.mdnq wrote:
I have a struct I am trying convert from int's to the type.
Since I
can't add a opCast overload to an int I don't know how to do
it.
On Friday, 30 November 2012 at 07:29:59 UTC, Joshua Niehus wrote:
On Friday, 30 November 2012 at 06:29:01 UTC, Joshua Niehus
wrote:
I think if you go breadth first, you can filter out the
unwanted directories before it delves into them
Good idea, thanks. I could not get original to compile as
28 matches
Mail list logo