Jump to page: 1 2
Thread overview
A special treat
Feb 09, 2010
Steve Teale
Feb 09, 2010
Clemens
Feb 09, 2010
Steve Teale
Feb 09, 2010
Craig Black
Feb 09, 2010
Justin Johansson
Feb 09, 2010
Don
Feb 09, 2010
Walter Bright
Feb 09, 2010
Walter Bright
Feb 09, 2010
Walter Bright
Feb 09, 2010
Justin Johansson
Feb 09, 2010
Don
Feb 10, 2010
Jacob Carlborg
February 09, 2010
When D2 is 'frozen', as a special treat would it be possible for it to be able to generate object files that could be converted into shared libraries, and for Phobos to be a shared library to support same.

I have tried every which way I can think of to create shared libraries using D. The closest I have come is with the old 1.030 GDC, and even with that there are problems. I've tried to describe the current situation in some detail on the blog section of my <a href="http:// www.britseyeview.com/GDC-newbie.html">GDC-newbie page</a>. It is too long to post on the newsgroup.

The inability to do this is a real show-stopper for D on Linux, and unless things have got better since I last tried, the same can be said for Windows DLLs.

Please!
Steve
February 09, 2010
Steve Teale Wrote:

> When D2 is 'frozen', as a special treat would it be possible for it to be able to generate object files that could be converted into shared libraries, and for Phobos to be a shared library to support same.
> 
> I have tried every which way I can think of to create shared libraries using D. The closest I have come is with the old 1.030 GDC, and even with that there are problems. I've tried to describe the current situation in some detail on the blog section of my <a href="http:// www.britseyeview.com/GDC-newbie.html">GDC-newbie page</a>. It is too long to post on the newsgroup.
> 
> The inability to do this is a real show-stopper for D on Linux, and unless things have got better since I last tried, the same can be said for Windows DLLs.
> 
> Please!
> Steve

Sorry if I'm stating the obvious, but have you looked at DDL?

http://www.dsource.org/projects/ddl/

Clemens
February 09, 2010
O>> Please!
>> Steve
> 
> Sorry if I'm stating the obvious, but have you looked at DDL?
> 
> http://www.dsource.org/projects/ddl/
> 
> Clemens

D1/Tango/not maintained/awful or no documentation - what more can I say?

Thanks
Steve


February 09, 2010
On Tue, 09 Feb 2010 10:53:47 -0500, Steve Teale <steve.teale@britseyeview.com> wrote:

> When D2 is 'frozen', as a special treat would it be possible for it to be
> able to generate object files that could be converted into shared
> libraries, and for Phobos to be a shared library to support same.
>
> I have tried every which way I can think of to create shared libraries
> using D. The closest I have come is with the old 1.030 GDC, and even with
> that there are problems. I've tried to describe the current situation in
> some detail on the blog section of my <a href="http://
> www.britseyeview.com/GDC-newbie.html">GDC-newbie page</a>. It is too long
> to post on the newsgroup.
>
> The inability to do this is a real show-stopper for D on Linux, and
> unless things have got better since I last tried, the same can be said
> for Windows DLLs.
>
> Please!

Many (including myself) have expressed the real requirement for shared libraries.  Sometimes the response is "oh who needs shared libraries anyways, there is so much memory in todays computers" and the other response is that "Windows DLLs suck, so we can't do it".

I agree it needs to be figured out before D is considered a viable professional language.  I don't think it's impossible, but someone just needs to spend the time.

Another new problem to pile on to Windows DLLs is the new requirement for default thread local storage.  See this bug that is very unlikely to get fixed (by Microsoft):

http://d.puremagic.com/issues/show_bug.cgi?id=3342

So the tradeoff is, either use crappy TLS (using a function to look up global variables) or only support Windows Vista and later.  If Windows 7 hadn't come out, I'd say requiring Vista is about as bad as not having DLLs :)

-Steve
February 09, 2010
Steven Schveighoffer wrote:
> On Tue, 09 Feb 2010 10:53:47 -0500, Steve Teale <steve.teale@britseyeview.com> wrote:
> 
>> When D2 is 'frozen', as a special treat would it be possible for it to be
>> able to generate object files that could be converted into shared
>> libraries, and for Phobos to be a shared library to support same.
>>
>> I have tried every which way I can think of to create shared libraries
>> using D. The closest I have come is with the old 1.030 GDC, and even with
>> that there are problems. I've tried to describe the current situation in
>> some detail on the blog section of my <a href="http://
>> www.britseyeview.com/GDC-newbie.html">GDC-newbie page</a>. It is too long
>> to post on the newsgroup.
>>
>> The inability to do this is a real show-stopper for D on Linux, and
>> unless things have got better since I last tried, the same can be said
>> for Windows DLLs.
>>
>> Please!
> 
> Many (including myself) have expressed the real requirement for shared libraries.  Sometimes the response is "oh who needs shared libraries anyways, there is so much memory in todays computers" and the other response is that "Windows DLLs suck, so we can't do it".
> 
> I agree it needs to be figured out before D is considered a viable professional language.  I don't think it's impossible, but someone just needs to spend the time.
> 
> Another new problem to pile on to Windows DLLs is the new requirement for default thread local storage.  See this bug that is very unlikely to get fixed (by Microsoft):
> 
> http://d.puremagic.com/issues/show_bug.cgi?id=3342
> 
> So the tradeoff is, either use crappy TLS (using a function to look up global variables) or only support Windows Vista and later.  If Windows 7 hadn't come out, I'd say requiring Vista is about as bad as not having DLLs :)
> 
> -Steve

A lot of Phobos consists of templates, which would be difficult to put in a shared library.

Andrei
February 09, 2010
"Andrei Alexandrescu" <SeeWebsiteForEmail@erdani.org> wrote in message news:hks6qm$26r3$1@digitalmars.com...
> Steven Schveighoffer wrote:
>> On Tue, 09 Feb 2010 10:53:47 -0500, Steve Teale <steve.teale@britseyeview.com> wrote:
>>
>>> When D2 is 'frozen', as a special treat would it be possible for it to be
>>> able to generate object files that could be converted into shared
>>> libraries, and for Phobos to be a shared library to support same.
>>>
>>> I have tried every which way I can think of to create shared libraries
>>> using D. The closest I have come is with the old 1.030 GDC, and even with
>>> that there are problems. I've tried to describe the current situation in
>>> some detail on the blog section of my <a href="http://
>>> www.britseyeview.com/GDC-newbie.html">GDC-newbie page</a>. It is too long
>>> to post on the newsgroup.
>>>
>>> The inability to do this is a real show-stopper for D on Linux, and
>>> unless things have got better since I last tried, the same can be said
>>> for Windows DLLs.
>>>
>>> Please!
>>
>> Many (including myself) have expressed the real requirement for shared libraries.  Sometimes the response is "oh who needs shared libraries anyways, there is so much memory in todays computers" and the other response is that "Windows DLLs suck, so we can't do it".
>>
>> I agree it needs to be figured out before D is considered a viable professional language.  I don't think it's impossible, but someone just needs to spend the time.
>>
>> Another new problem to pile on to Windows DLLs is the new requirement for default thread local storage.  See this bug that is very unlikely to get fixed (by Microsoft):
>>
>> http://d.puremagic.com/issues/show_bug.cgi?id=3342
>>
>> So the tradeoff is, either use crappy TLS (using a function to look up global variables) or only support Windows Vista and later.  If Windows 7 hadn't come out, I'd say requiring Vista is about as bad as not having DLLs :)
>>
>> -Steve
>
> A lot of Phobos consists of templates, which would be difficult to put in a shared library.
>
> Andrei

Sure but I bet a lot of it doesn't consist of templates.  Even with highly templated code, there is still a lot to be gained from this IMO.

-Craig 

February 09, 2010
On Tue, 09 Feb 2010 12:42:46 -0500, Andrei Alexandrescu <SeeWebsiteForEmail@erdani.org> wrote:

> Steven Schveighoffer wrote:
>> On Tue, 09 Feb 2010 10:53:47 -0500, Steve Teale <steve.teale@britseyeview.com> wrote:
>>
>>> When D2 is 'frozen', as a special treat would it be possible for it to be
>>> able to generate object files that could be converted into shared
>>> libraries, and for Phobos to be a shared library to support same.
>>>
>>> I have tried every which way I can think of to create shared libraries
>>> using D. The closest I have come is with the old 1.030 GDC, and even with
>>> that there are problems. I've tried to describe the current situation in
>>> some detail on the blog section of my <a href="http://
>>> www.britseyeview.com/GDC-newbie.html">GDC-newbie page</a>. It is too long
>>> to post on the newsgroup.
>>>
>>> The inability to do this is a real show-stopper for D on Linux, and
>>> unless things have got better since I last tried, the same can be said
>>> for Windows DLLs.
>>>
>>> Please!
>>  Many (including myself) have expressed the real requirement for shared libraries.  Sometimes the response is "oh who needs shared libraries anyways, there is so much memory in todays computers" and the other response is that "Windows DLLs suck, so we can't do it".
>>  I agree it needs to be figured out before D is considered a viable professional language.  I don't think it's impossible, but someone just needs to spend the time.
>>  Another new problem to pile on to Windows DLLs is the new requirement for default thread local storage.  See this bug that is very unlikely to get fixed (by Microsoft):
>>  http://d.puremagic.com/issues/show_bug.cgi?id=3342
>>  So the tradeoff is, either use crappy TLS (using a function to look up global variables) or only support Windows Vista and later.  If Windows 7 hadn't come out, I'd say requiring Vista is about as bad as not having DLLs :)
>>  -Steve
>
> A lot of Phobos consists of templates, which would be difficult to put in a shared library.

There is druntime, all the typeinfos, and much of phobos' templates will likely be used in other parts of phobos.  For example, if an XML library is template based on the character width, but one part of phobos uses the xml library based on char (for properties or something), then instantiating that template with char in your program code will leave the char-generated version in the phobos dynamic lib.

The savings will be real.  Most templated code is used in similar ways and so those uses can be consolidated into one shared library.  It might even be worth pre-generating common templates even if they are not specifically used.

-Steve
February 09, 2010
Steve Teale wrote:
> When D2 is 'frozen', as a special treat would it be possible for it to be able to generate object files that could be converted into shared libraries, and for Phobos to be a shared library to support same.
> 
> I have tried every which way I can think of to create shared libraries using D. The closest I have come is with the old 1.030 GDC, and even with that there are problems. I've tried to describe the current situation in some detail on the blog section of my <a href="http://
> www.britseyeview.com/GDC-newbie.html">GDC-newbie page</a>. It is too long to post on the newsgroup.
> 
> The inability to do this is a real show-stopper for D on Linux, and unless things have got better since I last tried, the same can be said for Windows DLLs.
> 
> Please!
> Steve

The inability to make Windows DLLs is, IMHO, the #1 show-stopper for D. It'll definitely get attention.
February 09, 2010
Andrei Alexandrescu wrote:
>> Many (including myself) have expressed the real requirement for shared libraries.  Sometimes the response is "oh who needs shared libraries anyways, there is so much memory in todays computers" and the other response is that "Windows DLLs suck, so we can't do it".
>>
>> I agree it needs to be figured out before D is considered a viable professional language.  I don't think it's impossible, but someone just needs to spend the time.
>>
>> Another new problem to pile on to Windows DLLs is the new requirement for default thread local storage.  See this bug that is very unlikely to get fixed (by Microsoft):
>>
>> http://d.puremagic.com/issues/show_bug.cgi?id=3342
>>
>> So the tradeoff is, either use crappy TLS (using a function to look up global variables) or only support Windows Vista and later.  If Windows 7 hadn't come out, I'd say requiring Vista is about as bad as not having DLLs :)
>>
>> -Steve

> A lot of Phobos consists of templates, which would be difficult to put in a shared library.
> Andrei

With respect, Andrei, that note is an irrelevant aside.  There are not
many applications or application libraries that consist solely of
templates.  Shared libraries are sometimes the only way you can extend
applications in Linux.  e.g. Apache server modules.  (No need to
mention FastCGI workaround).

Ditto Windows & DLL's.

Justin
February 09, 2010
Steve Teale wrote:
> The inability to do this is a real show-stopper for D on Linux, and unless things have got better since I last tried, the same can be said for Windows DLLs.

The dmd/samples/d/dserver.d is an example of a Windows DLL in D.
« First   ‹ Prev
1 2