Re: Latest GDB version problems

2013-06-01 Thread sha0coder
(gdb) p s $1 = 578159222890430469 No luck :( try this: (gdb) x/dwx &mystirng 0xb4f4: 0x003c<- size of string (gdb) 0xb4f8: 0xb7ca2540<- ptr to the string (gdb) x/s 0xb7ca2540 0xb7ca2540: "this is my string" (gdb) add this macro to your ~/.gdbinit de

Re: Latest GDB version problems

2013-06-01 Thread sha0coder
On Monday, 10 May 2010 at 19:25:05 UTC, Piotrek wrote: W dniu 10.05.2010 21:02, Robert Clipsham pisze: You are not using a version of gdb with D support if s is not displayed as a string. This said, I've only ever looked at variables using print or a backtrace, could you try 'p s' and see what

Re: Initializing assoc array to non-null

2013-06-01 Thread Jonathan M Davis
On Saturday, June 01, 2013 21:45:26 d coder wrote: > Thanks Jonathan > > Do you think this could make a good enhancement request? Yes. There are some key things like that in AAs that should be improved. There's also no way to clear an AA. There are people who call clear (which has now be rename

Re: Initializing assoc array to non-null

2013-06-01 Thread d coder
Thanks Jonathan Do you think this could make a good enhancement request? Regards - Puneet On Sat, Jun 1, 2013 at 9:34 PM, Jonathan M Davis wrote: > On Saturday, June 01, 2013 20:21:42 d coder wrote: > > Greetings > > > > Is there a way to initialize an associative array to a non-null (but > s

Re: Initializing assoc array to non-null

2013-06-01 Thread Jonathan M Davis
On Saturday, June 01, 2013 20:21:42 d coder wrote: > Greetings > > Is there a way to initialize an associative array to a non-null (but still > empty) state? The only way I know is by adding an element and then removing > it. Did I miss something obvious? Basically I want to write lines 7-8 in > t

Re: how to use shared keyword in 2.063 version?

2013-06-01 Thread Jonathan M Davis
On Saturday, June 01, 2013 10:03:28 Andrey wrote: > On Saturday, 1 June 2013 at 00:58:00 UTC, Jonathan M Davis wrote: > > On Friday, May 31, 2013 23:26:19 Anthony Goins wrote: > >> To create a shared object you need shared this ctor. > >> > >> immutable this() for immutable, > >> > >> and const t

Initializing assoc array to non-null

2013-06-01 Thread d coder
Greetings Is there a way to initialize an associative array to a non-null (but still empty) state? The only way I know is by adding an element and then removing it. Did I miss something obvious? Basically I want to write lines 7-8 in the following code in a cleaner fashion. Any ideas? Regards - P

Re: Segfault on simple program?

2013-06-01 Thread Shriramana Sharma
On Sat, Jun 1, 2013 at 7:57 PM, Anthony Goins wrote: > > Sometimes running ldconfig will solve wierd problems like this. Thanks and I tried that just now but no fruit. :-( -- Shriramana Sharma ஶ்ரீரமணஶர்மா श्रीरमणशर्मा

Re: Segfault on simple program?

2013-06-01 Thread Anthony Goins
On Saturday, 1 June 2013 at 11:43:15 UTC, Shriramana Sharma wrote: On Jun 1, 2013 3:46 PM, "Ali Çehreli" wrote: If so, I would remove GDC and try installing only dmd 2.063 again. Tried that in all sorts of combinations. Still no use. Would there be some config files conflicting? But such co

UFCS for classes with opCall( ... )

2013-06-01 Thread ParticlePeter
Hello, after watching Walters Talk about Component Programming ( link Bellow ) I was quite fond of his pipelining approach. I tried the following and had to realize that this way using UFCS isn't working ( or I do something wrong ). // I want to write On Canvas1 | draw Shape1 | draw Shape2 |

Re: Segfault on simple program?

2013-06-01 Thread Shriramana Sharma
On Jun 1, 2013 3:46 PM, "Ali Çehreli" wrote: > If so, I would remove GDC > and try installing only dmd > 2.063 again. Tried that in all sorts of combinations. Still no use. Would there be some config files conflicting? But such conflicts would be reflected at compile time, not runtime, right? S

Re: Are heap objects never moved by the garbage collector?

2013-06-01 Thread Diggory
On Saturday, 1 June 2013 at 08:11:05 UTC, sclytrack wrote: On Friday, 31 May 2013 at 16:31:39 UTC, Carl Sturtivant wrote: "The D Programming Language" (TDPL) p.178 asserts the following. "The objects themselves stay put, that is their locations in memory never change after creation." I ta

C floating point functions don't set overflow/underflow flags?

2013-06-01 Thread Johannes Pfau
I'm currently porting the last missing inline asm in std.math to gdc syntax. There's one unittest which I just couldn't get working: It checks for underflow/overflow flags after calling the exp function. In gdc we currently forward std.math.exp to core.stdc.math.expl and it turns out that the stdc

Re: Segfault on simple program?

2013-06-01 Thread Ali Çehreli
On 06/01/2013 01:34 AM, Shriramana Sharma wrote: > All programs compiled by *DMD* produce a segfault. Programs compiled > by GDC work just fine. It is likely that GDC is from the D1 era. > What is this, some sort of incompatibility between compilers? If one is D1 and the other is current D, it

Re: Segfault on simple program?

2013-06-01 Thread Shriramana Sharma
On Sat, Jun 1, 2013 at 1:27 PM, Shriramana Sharma wrote: > > Nevertheless, the horrible fact is that not only this program I > initially posted on this thread but any and all D programs I compile > produce a segfault! All programs compiled by *DMD* produce a segfault. Programs compiled by GDC wor

Re: Are heap objects never moved by the garbage collector?

2013-06-01 Thread sclytrack
On Friday, 31 May 2013 at 16:31:39 UTC, Carl Sturtivant wrote: "The D Programming Language" (TDPL) p.178 asserts the following. "The objects themselves stay put, that is their locations in memory never change after creation." I take this to mean that the D garbage collector doesn't move liv

Re: how to use shared keyword in 2.063 version?

2013-06-01 Thread Andrey
On Saturday, 1 June 2013 at 00:58:00 UTC, Jonathan M Davis wrote: On Friday, May 31, 2013 23:26:19 Anthony Goins wrote: To create a shared object you need shared this ctor. immutable this() for immutable, and const this() for const. Check out the change log. #2 on the list. Either that or y

Re: Segfault on simple program?

2013-06-01 Thread Shriramana Sharma
On Sat, Jun 1, 2013 at 6:39 AM, Shriramana Sharma wrote: > I don't have any D-related packages on my system other than the stock > DMD AMD64 package. Even libphobos2-4.6-dev which is available for > Raring is not installed. That was actually slightly incorrect. I had installed gdc apart from dmd