Re: Pointer to method C++ style

2009-07-24 Thread Steven Schveighoffer
On Thu, 23 Jul 2009 22:09:12 -0400, Sergey Gromov snake.sc...@gmail.com wrote: Thu, 23 Jul 2009 11:54:40 -0400, Steven Schveighoffer wrote: On Wed, 22 Jul 2009 23:47:30 -0400, Sergey Gromov snake.sc...@gmail.com wrote: Is there a way to declare and statically initialize some sort of

Re: Pointer to method C++ style

2009-07-24 Thread grauzone
LOOKUP_TABLE[0] = Method(method1, Component.method1); LOOKUP_TABLE[1] = Method(method2, Component.method2); These two lines are weird. ``pragma(msg)`` shows that type of ``method1`` is ``void function()`` while it must be ``void delegate()`` for a non-static member because of

Re: Pointer to method C++ style

2009-07-24 Thread Steven Schveighoffer
On Fri, 24 Jul 2009 09:56:41 -0400, grauzone n...@example.net wrote: LOOKUP_TABLE[0] = Method(method1, Component.method1); LOOKUP_TABLE[1] = Method(method2, Component.method2); These two lines are weird. ``pragma(msg)`` shows that type of ``method1`` is ``void function()``

.patch

2009-07-24 Thread Dimitar Kolev
Hello I am new to D. My question is: How do you apply a .patch file? And then I guess I have to compile the compiler again? If yes which file do I pass to bud? Well more than 1 question.

Re: Pointer to method C++ style

2009-07-24 Thread Sergey Gromov
Fri, 24 Jul 2009 09:07:30 -0400, Steven Schveighoffer wrote: On Thu, 23 Jul 2009 22:09:12 -0400, Sergey Gromov snake.sc...@gmail.com wrote: Thu, 23 Jul 2009 11:54:40 -0400, Steven Schveighoffer wrote: LOOKUP_TABLE[0] = Method(method1, Component.method1);

Re: Pointer to method C++ style

2009-07-24 Thread Sergey Gromov
Fri, 24 Jul 2009 02:51:45 +0400, Sergey Gromov wrote: Thu, 23 Jul 2009 19:07:43 +0200, BLS wrote: Sergey Gromov wrote: Sorry, I'm not a guru at all, so ActiveX was a misnomer. What I'm writing is a simple in-process server DLL which implements a couple of interfaces. Oh, that's sad. :(

Re: .patch

2009-07-24 Thread BCS
Hello Dimitar, Hello I am new to D. Hello, welcome. My question is: How do you apply a .patch file? this seems to be somewhat usefull: http://docs.moodle.org/en/Development:How_to_apply_a_patch windows tools (linux will already have them):

C++ auto_ptr equivilant (Reddit)

2009-07-24 Thread Jesse Phillips
On the Reddit: Why no one uses D post someone seems to be genuinely interested in D's abilities and requested information on equivalents to std::map and std::auto_ptr I've done the best I can to point him in the correct directions. In any case here is the link.

formatting precision

2009-07-24 Thread Saaa
Isn't the precision of a float 8 decimal digits? .dig reports 6 Why isn't %.100g cropped to the max decimal digits of the accompanying type? floating point types are printed with 20 digits.

Re: .patch

2009-07-24 Thread Dimitar Kolev
BCS Wrote: Hello Dimitar, Hello I am new to D. Hello, welcome. My question is: How do you apply a .patch file? this seems to be somewhat usefull: http://docs.moodle.org/en/Development:How_to_apply_a_patch windows tools (linux will already have them):

How to see result of a mixin? (equivalent of running C preprocessor)

2009-07-24 Thread asd
I'm trying to get D-ObjC bridge working and I'm getting weird errors triggered somewhere deeply in a mix of templates and mixins that's too hard for me to understand. How can I analyze such problem in D? Is it possible to tell dmd to run only compile-time functions/templates and output that as

Re: How to see result of a mixin? (equivalent of running C preprocessor)

2009-07-24 Thread Ary Borenszweig
asd wrote: I'm trying to get D-ObjC bridge working and I'm getting weird errors triggered somewhere deeply in a mix of templates and mixins that's too hard for me to understand. How can I analyze such problem in D? Is it possible to tell dmd to run only compile-time functions/templates and

Re: How to see result of a mixin? (equivalent of running C preprocessor)

2009-07-24 Thread Ary Borenszweig
Ary Borenszweig wrote: asd wrote: I'm trying to get D-ObjC bridge working and I'm getting weird errors triggered somewhere deeply in a mix of templates and mixins that's too hard for me to understand. How can I analyze such problem in D? Is it possible to tell dmd to run only compile-time

setAssertHandler (druntime) segfaults

2009-07-24 Thread Lutger
There is a function setAssertHandler in druntime, but when I try to use it it segfaults. I'm not sure how it should be used, this is a complete example of what I try to do: import std.stdio; import core.exception; void handleAssertion(string file, size_t line, string msg = null) {

Re: formatting precision

2009-07-24 Thread Saaa
I just want to format in full precision. As far as I can see 6 digits is not the full precision e.g. 0x7EAB = 1.1342746e38

Re: setAssertHandler (druntime) segfaults

2009-07-24 Thread Lutger
Jarrett Billingsley wrote: On Fri, Jul 24, 2009 at 4:37 PM, Lutgerlutger.blijdest...@gmail.com wrote: There is a function setAssertHandler in druntime, but when I try to use it it segfaults. I'm not sure how it should be used, this is a complete example of what I try to do: import

Re: setAssertHandler (druntime) segfaults

2009-07-24 Thread Jarrett Billingsley
On Fri, Jul 24, 2009 at 5:46 PM, Lutgerlutger.blijdest...@gmail.com wrote: Jarrett Billingsley wrote: On Fri, Jul 24, 2009 at 4:37 PM, Lutgerlutger.blijdest...@gmail.com wrote: There is a function setAssertHandler in druntime, but when I try to use it it segfaults. I'm not sure how it should