Re: Multi-library project path issue

2012-05-24 Thread Jacob Carlborg
On 2012-05-25 08:15, #coder wrote: Hi, I am using the Mono-D for building a project with 3-4 library projects and one console project. Although I am using the Mono-D but I think this issue is not unique to Mono-D. Please advise me with a solution, if I am missing something obvious here. Issue;

Re: druntime investigation troubles

2012-05-24 Thread Jacob Carlborg
On 2012-05-24 21:49, Sean Kelly wrote: There's a difference in how unittest execution is handled. This could probably be sorted out though. Yeah, I've noticed that. Does the unit test really need to run when you call rt_init from C? -- /Jacob Carlborg

Multi-library project path issue

2012-05-24 Thread #coder
Hi, I am using the Mono-D for building a project with 3-4 library projects and one console project. Although I am using the Mono-D but I think this issue is not unique to Mono-D. Please advise me with a solution, if I am missing something obvious here. Issue; I have two "library" project wi

Re: null matches typed pointers before void pointers

2012-05-24 Thread bearophile
Maybe a compile-time error is better here. http://d.puremagic.com/issues/show_bug.cgi?id=8146

Re: druntime investigation troubles

2012-05-24 Thread Sean Kelly
On May 24, 2012, at 1:27 PM, "Steven Schveighoffer" wrote: > On Thu, 24 May 2012 15:44:28 -0400, Sean Kelly wrote: > >> On May 22, 2012, at 2:01 PM, Steven Schveighoffer wrote: >> >>> On Tue, 22 May 2012 15:16:30 -0400, Denis Shelomovskij >>> wrote: >>> 21.05.2012 2:13, Alex Rønne Pete

Re: druntime investigation troubles

2012-05-24 Thread Steven Schveighoffer
On Thu, 24 May 2012 15:44:28 -0400, Sean Kelly wrote: On May 22, 2012, at 2:01 PM, Steven Schveighoffer wrote: On Tue, 22 May 2012 15:16:30 -0400, Denis Shelomovskij wrote: 21.05.2012 2:13, Alex Rønne Petersen написал: On 20-05-2012 22:13, Jacob Carlborg wrote: On 2012-05-20 18:25, A

Re: druntime investigation troubles

2012-05-24 Thread Sean Kelly
On May 23, 2012, at 12:46 PM, Jacob Carlborg wrote: > On 2012-05-23 19:32, Denis Shelomovskij wrote: > >> What call have you found in "_d_criticalenter"? >> >> By the way, `_STI_critical_init` is called before C main (uncomment >> printf's and check), so it is definitely called not by druntime.

Re: std.concurrency.send

2012-05-24 Thread Sean Kelly
On May 19, 2012, at 2:13 PM, japplegame wrote: >> You don't need to mark Tids as shared. > Okay. I'm writting logger. Logger is global object and it is > running in its own separate thread (for example, writting logs to > remote database). > My application has several threads and all of them want

Re: druntime investigation troubles

2012-05-24 Thread Sean Kelly
On May 22, 2012, at 2:01 PM, Steven Schveighoffer wrote: > On Tue, 22 May 2012 15:16:30 -0400, Denis Shelomovskij > wrote: > >> 21.05.2012 2:13, Alex Rønne Petersen написал: >>> On 20-05-2012 22:13, Jacob Carlborg wrote: On 2012-05-20 18:25, Alex Rønne Petersen wrote: > Seems lik

Re: Reading ASCII file with some codes above 127 (exten ascii)

2012-05-24 Thread era scarecrow
On Wednesday, 23 May 2012 at 21:02:27 UTC, Paul wrote: I wonder about the speed between this method and Era's home-spun solution? My solution may have a flaw in it's lookup table; namely if I got one of the codes wrong. I used regex and a site to reference them all so I Hope it's right. I ca

Re: druntime investigation troubles

2012-05-24 Thread Sean Kelly
On May 23, 2012, at 7:49 AM, Jacob Carlborg wrote: > On 2012-05-23 13:31, Steven Schveighoffer wrote: >> On Wed, 23 May 2012 02:21:14 -0400, Jacob Carlborg wrote: >> >>> On 2012-05-22 23:01, Steven Schveighoffer wrote: >>> It looks like code that is not called on Windows. Which doesn't mak

Re: get Class from Pointer of member

2012-05-24 Thread Ali Çehreli
On 05/24/2012 10:25 AM, StefanvT wrote: Hey thank you!! :-) I already tried to use offsetof on my own. But I always try to cast to a pointer. And this fails horribly :o) So thank you. I think I need to have a deeper look at references and pointer in D! I should have mentioned that pointers

Re: get Class from Pointer of member

2012-05-24 Thread StefanvT
Hey thank you!! :-) I already tried to use offsetof on my own. But I always try to cast to a pointer. And this fails horribly :o) So thank you. I think I need to have a deeper look at references and pointer in D!

Re: null matches typed pointers before void pointers

2012-05-24 Thread bearophile
Justin Whear: Perhaps it should be ambiguous due to the special nature of null, Maybe a compile-time error is better here. Bye, bearophile

Re: get Class from Pointer of member

2012-05-24 Thread Ali Çehreli
On 05/24/2012 05:29 AM, StefanvT wrote: > I have such a function in C++: > > template > inline CB* get_class_from_field( FIELD CB::*field, FIELD* mp) { > return reinterpret_cast( > reinterpret_cast(mp) - > reinterpret_cast(&(reinterpret_cast(0)->*field))); > } I think get_object_from_field() w

Re: null matches typed pointers before void pointers

2012-05-24 Thread Justin Whear
On Thu, 24 May 2012 14:50:38 +0200, Andrej Mitrovic wrote: > I'm not sure if this is a bug or not: > > struct Foo { } > > void test(void* test) { assert(0); } > void test(Foo* test) { } > > void main() > { > test(null); > } > > The call matches the second overload: "void test(Foo* test)".

null matches typed pointers before void pointers

2012-05-24 Thread Andrej Mitrovic
I'm not sure if this is a bug or not: struct Foo { } void test(void* test) { assert(0); } void test(Foo* test) { } void main() { test(null); } The call matches the second overload: "void test(Foo* test)". But shouldn't this be an ambiguous call?

get Class from Pointer of member

2012-05-24 Thread StefanvT
Hi, I'm totally new to D. But it looks very interesting :-) I normally develop in C++. I have such a function in C++: template inline CB* get_class_from_field( FIELD CB::*field, FIELD* mp) { return reinterpret_cast( reinterpret_cast(mp) - reinterpret_cast(&(reinterpr

Re: pure functions calling impure functions at compile-time

2012-05-24 Thread Don Clugston
On 23/05/12 11:41, bearophile wrote: Simen Kjaeraas: Should this be filed as a bug, or is the plan that only pure functions be ctfe-able? (or has someone already filed it, perhaps) It's already in Bugzilla, see issue 7994 and 6169. It's just happening because the purity checking is currentl

Re: D under Linux Mint

2012-05-24 Thread snow
Thank you very much. I wrote the real paths into the dmd.conf and there was really a copy of dmd.conf in the usr/local/bin. I deleted everything there, except the dmd, dumpobj and the obj2asm and now its working.