Re: DMD and GDC static libraries are incompatible on Linux?

2015-02-18 Thread ketmar via D.gnu
On Wed, 18 Feb 2015 22:40:16 +, Iain Buclaw via D.gnu wrote: > On 18 February 2015 at 22:31, ketmar via D.gnu > wrote: >> (ah, well, you can't even build shared phobos with GDC yet), and... >> >> > True story, GDC got there first with shared library support before D2 > was released. *Then* D

Re: DMD and GDC static libraries are incompatible on Linux?

2015-02-18 Thread Iain Buclaw via D.gnu
On 18 February 2015 at 22:31, ketmar via D.gnu wrote: > (ah, well, you can't even build shared phobos with GDC yet), and... > True story, GDC got there first with shared library support before D2 was released. *Then* D2 came out with TLS on by default for all static data. Shared libraries sudde

Re: DMD and GDC static libraries are incompatible on Linux?

2015-02-18 Thread ketmar via D.gnu
On Wed, 18 Feb 2015 22:13:04 +, Jeremy DeHaan wrote: > On Monday, 9 February 2015 at 19:24:22 UTC, Iain Buclaw wrote: >> GDC and DMD are not ABI compatible. There are many reasons why this is >> so, but the one that is likely affecting you is because DMD emits >> references to symbols that do

Re: DMD and GDC static libraries are incompatible on Linux?

2015-02-18 Thread Iain Buclaw via D.gnu
On 18 February 2015 at 22:13, Jeremy DeHaan via D.gnu wrote: > On Monday, 9 February 2015 at 19:24:22 UTC, Iain Buclaw wrote: >> >> GDC and DMD are not ABI compatible. There are many reasons why this >> is so, but the one that is likely affecting you is because DMD emits >> references to symbols

Re: DMD and GDC static libraries are incompatible on Linux?

2015-02-18 Thread Jeremy DeHaan via D.gnu
On Monday, 9 February 2015 at 19:24:22 UTC, Iain Buclaw wrote: GDC and DMD are not ABI compatible. There are many reasons why this is so, but the one that is likely affecting you is because DMD emits references to symbols that do not exist in GDC's runtime library. Iain. I was thinking abo

Re: Using static immutable Exceptions (or other way for NON-GC exceptions)

2015-02-18 Thread Liran Zvibel via D.gnu
On Wednesday, 18 February 2015 at 14:59:19 UTC, Iain Buclaw wrote: Yah. The only gotcha is if you fill up the chain, and it needs to realloc/grow the memory. Would only ever happen if you have deep levels of try { } catch(e) { throw e; } though Iain It could be a gcd compile time para

Re: Using static immutable Exceptions (or other way for NON-GC exceptions)

2015-02-18 Thread Iain Buclaw via D.gnu
On 18 February 2015 at 14:54, Liran Zvibel via D.gnu wrote: > On Wednesday, 18 February 2015 at 13:07:12 UTC, Iain Buclaw wrote: >> >> It may be a better solution to have a static TLS pointer that gets >> new'd upon thread start. Perhaps even make it a pre-allocated array >> so we might be able t

Re: Using static immutable Exceptions (or other way for NON-GC exceptions)

2015-02-18 Thread Liran Zvibel via D.gnu
On Wednesday, 18 February 2015 at 13:07:12 UTC, Iain Buclaw wrote: It may be a better solution to have a static TLS pointer that gets new'd upon thread start. Perhaps even make it a pre-allocated array so we might be able to get chained exceptions working in GDC runtime. Iain I like the id

Re: Using static immutable Exceptions (or other way for NON-GC exceptions)

2015-02-18 Thread Iain Buclaw via D.gnu
On 18 February 2015 at 13:38, Timo Sintonen via D.gnu wrote: > On Wednesday, 18 February 2015 at 13:07:12 UTC, Iain Buclaw wrote: >> >> On 18 February 2015 at 12:34, Timo Sintonen via D.gnu >> wrote: >>> >>> On Wednesday, 18 February 2015 at 12:12:04 UTC, Iain Buclaw wrote: >>> You can'

Re: Using static immutable Exceptions (or other way for NON-GC exceptions)

2015-02-18 Thread Timo Sintonen via D.gnu
On Wednesday, 18 February 2015 at 13:07:12 UTC, Iain Buclaw wrote: On 18 February 2015 at 12:34, Timo Sintonen via D.gnu wrote: On Wednesday, 18 February 2015 at 12:12:04 UTC, Iain Buclaw wrote: You can't throw without a GC allocation currently. I'm open to suggestions and patches welcom

Re: Using static immutable Exceptions (or other way for NON-GC exceptions)

2015-02-18 Thread Iain Buclaw via D.gnu
On 18 February 2015 at 12:34, Timo Sintonen via D.gnu wrote: > On Wednesday, 18 February 2015 at 12:12:04 UTC, Iain Buclaw wrote: > >> >> You can't throw without a GC allocation currently. I'm open to >> suggestions and patches welcome. >> >> See here: >> https://github.com/D-Programming-GDC/GDC/

Re: Using static immutable Exceptions (or other way for NON-GC exceptions)

2015-02-18 Thread Timo Sintonen via D.gnu
On Wednesday, 18 February 2015 at 12:12:04 UTC, Iain Buclaw wrote: You can't throw without a GC allocation currently. I'm open to suggestions and patches welcome. See here: https://github.com/D-Programming-GDC/GDC/blob/master/libphobos/libdruntime/gcc/deh.d#L152 Iain. I was just goimg

Re: Using static immutable Exceptions (or other way for NON-GC exceptions)

2015-02-18 Thread Iain Buclaw via D.gnu
On 18 February 2015 at 11:57, Liran Zvibel via D.gnu wrote: > Hi, > > We would like to use exceptions in some cases, but we don't want to allocate > them when we send them. > What we do with dmd is create bunch of "static immutable Throwable" members > in our objects during creation (for every pos

Using static immutable Exceptions (or other way for NON-GC exceptions)

2015-02-18 Thread Liran Zvibel via D.gnu
Hi, We would like to use exceptions in some cases, but we don't want to allocate them when we send them. What we do with dmd is create bunch of "static immutable Throwable" members in our objects during creation (for every possible case), then we just throw these members in the code. When co

Re: Undefined _D10TypeInfo_l6__initZ and _D15TypeInfo_Struct6__vtblZ added when instantiating template structs

2015-02-18 Thread Liran Zvibel via D.gnu
On Monday, 26 January 2015 at 23:21:23 UTC, Mike wrote: If you're compliling with -nophoboslib, you are also compiling without the runtime, not just phobos. GDC compiles them in one library, IIRC. Therefore, you have to implement those parts of the runtime the compiler inserts implicitly.

Re: Embedded D, top down?

2015-02-18 Thread Timo Sintonen via D.gnu
On Tuesday, 17 February 2015 at 22:07:38 UTC, Henri Sundelin wrote: Hello folks, I'm trying to evaluate a possibility to use D for an embedded case. We want to use the same application base from the high end to the low end. In this case high end means full Linux server, and low end must be a