Thanks for your explanation.
Is there any good resource about that stuff other than
http://www.digitalmars.com/d/1.0/template.html
On Fri, 16 Jan 2009 20:30:53 +1300, Qian Xu
wrote:
When shall I use some_var.dup and when not?
Is there any guidlines?
--Qian
Yeah when you want one to be different than the other. If the lvalue is a
slice then there is no need though.
Jarrett Billingsley schrieb:
Team0xf has made a few traceback modules which work only with Tango on
Windows to fill in this info, but there's no reason it couldn't be
done on other platforms or with Phobos.
only with Tango? I've also seen some Phobos hacks on their site.
When shall I use some_var.dup and when not?
Is there any guidlines?
--Qian
On Thu, Jan 15, 2009 at 8:50 PM, Sergey Gromov wrote:
>
> You're correct, I missed that. Exception is derived from Throwable in
> druntime, and Throwable has a field 'info' of type TraceInfo with
> opApply in its interface.
>
> But it doesn't work, at least with DMD 2.023 on Windows. Attempts to
On Fri, Jan 16, 2009 at 10:50 AM, Sergey Gromov wrote:
> Thu, 15 Jan 2009 13:08:35 -0500, Kagamin wrote:
>
>> Bill Baxter Wrote:
>>
>>> Nothing built-in for this,
>>> but there are the backtrace hacks:
>>> http://team0xf.com/index.php?n=Site.Download
>>> Never tried those myself though.
>>>
>>> I
Thu, 15 Jan 2009 13:08:35 -0500, Kagamin wrote:
> Bill Baxter Wrote:
>
>> Nothing built-in for this,
>> but there are the backtrace hacks:
>> http://team0xf.com/index.php?n=Site.Download
>> Never tried those myself though.
>>
>> I use a debugger when I need a stack trace.
>> http://ddbg.mainia.
Charles Hixson wrote:
A) Yes, it works the way that you say. This damages it's utility.
B) I'm replying to a question as to how typedef could reasonably be
extended.
The point of a typedef is to provide additional type safety. This would
not exist if you could implicitly cast back and forth.
On Thu, Jan 15, 2009 at 6:57 PM, Hoenir wrote:
> Why is that "is" used here:
> static if(is(a == char*))
>
> I know is is normally used for identity comparison, but what does it do
> here?
is(blah blah) is a completely different thing than "x is y" ;)
is() is used to test, at compile time, for s
BCS schrieb:
I have a partial solution here:
http://www.dsource.org/projects/scrapple/browser/trunk/log_api/LogAPI.d
Feel free to steal whatever you want from it. If you are really
adventures and want to, I can get you SVN access and you can dump stuff
back into that.
Why is that "is" us
bearophile schrieb:
Hoenir:
So it needs to be recursive somehow.
The stuff I have linked you is recursive, of course.
Thanks. That's a whole lot of stuff.
Guess I really need to dig deeper into template stuff.
BCS schrieb:
Reply to Hoenir,
Denis Koroskin schrieb:
One note is that you should probably pass the object by reference:
void log(T)(ref T obj) { ... }// D1
void log(T)(ref const(T) obj) { ... } // D2
Good idea. btw ref'ing a class has no effect, has it?
ref object would allow yo
Hoenir:
> So it needs to be recursive somehow.
The stuff I have linked you is recursive, of course.
Bye,
bearophile
Reply to Hoenir,
Denis Koroskin schrieb:
One note is that you should probably pass the object by reference:
void log(T)(ref T obj) { ... }// D1
void log(T)(ref const(T) obj) { ... } // D2
Good idea. btw ref'ing a class has no effect, has it?
ref object would allow you to alter wha
Denis Koroskin schrieb:
One note is that you should probably pass the object by reference:
void log(T)(ref T obj) { ... }// D1
void log(T)(ref const(T) obj) { ... } // D2
Good idea. btw ref'ing a class has no effect, has it?
Actually discovered a flaw, if you e.g. pass an array of st
Bill Baxter Wrote:
> Nothing built-in for this,
> but there are the backtrace hacks:
> http://team0xf.com/index.php?n=Site.Download
> Never tried those myself though.
>
> I use a debugger when I need a stack trace.
> http://ddbg.mainia.de/releases.html (Windows - on Linux I think you
> can use G
On Thu, Jan 15, 2009 at 3:58 AM, Denis Koroskin <2kor...@gmail.com> wrote:
>
> DX10 headers have been ported long ago:
> http://dsource.org/projects/bindings/browser/trunk/win32/directx
>
Well awesome!
On Thu, 15 Jan 2009 15:30:51 +0100, Jarrett Billingsley
wrote:
On Thu, Jan 15, 2009 at 8:55 AM, Simen Kjaeraas
wrote:
munch("bar-baz", "-");
returns "". Is there a way to do this apart from writing my own
function?
I think you've got the behavior of munch backwards. It will eat any
c
On Thu, Jan 15, 2009 at 8:55 AM, Simen Kjaeraas wrote:
> munch("bar-baz", "-");
>
> returns "". Is there a way to do this apart from writing my own function?
I think you've got the behavior of munch backwards. It will eat any
characters that _are_ in the pattern string. Since 'b' is not in the
munch("bar-baz", "-");
returns "". Is there a way to do this apart from writing my own function?
--
Simen
Jarrett Billingsley:
> bearophile has apparently done so in his "libs" but I have no idea
> where you can download that.
If you use Phobos on D1 the d.string.put/putr to print generic structs, or use
a d.templates.Record struct:
http://www.fantascienza.net/leonardo/so/libs_d.zip
Bye,
bearophile
On Thu, Jan 15, 2009 at 5:58 PM, Denis Koroskin <2kor...@gmail.com> wrote:
> On Thu, 15 Jan 2009 00:17:30 +0300, Jarrett Billingsley
> wrote:
>
>> On Wed, Jan 14, 2009 at 2:58 PM, William Newbery
>> wrote:
>>
>>> 4)Support for directX: Specificaly I need to be able to use d3d9, d3dx9,
>>> d3d10,
On Thu, 15 Jan 2009 03:04:15 +0300, Hoenir wrote:
BCS schrieb:
http://codepad.org/Eu16XqFu
Thank you very much, it works like a charm.
I wrote a small function to log whatever object I pass to it:
void log(T)(T obj)
{
static if (is(T == struct) || is(T == class))
{
On Wed, 14 Jan 2009 22:58:55 +0300, William Newbery
wrote:
I use c++ extensivly, however I find several shortcoming of c++ highly
annoying, and it looks as if D addresses most of these problems for me,
however I'm not certain on certain points as Ive either been unable to
find any good in
On Thu, 15 Jan 2009 00:17:30 +0300, Jarrett Billingsley
wrote:
On Wed, Jan 14, 2009 at 2:58 PM, William Newbery
wrote:
4)Support for directX: Specificaly I need to be able to use d3d9,
d3dx9, d3d10, d3dx10 and xAudio2.
It's entirely possible. D natively supports COM interfaces and th
Jarrett Billingsley Wrote:
> On Wed, Jan 14, 2009 at 5:35 PM, William Newbery
> wrote:
> >> You do have options. DDL is a project which aims to perform dynamic
> >> linking on Windows, and it works damn well. It also has a lot of
> >> useful utility functions to i.e. look up symbols and types
26 matches
Mail list logo