www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - D examples

reply "Borneq" <borneq antyspam.hidden.pl> writes:
Where can I find D example programs, especially for LDC ?
Aug 13 2010
next sibling parent reply mwarning <moritzwarning web.de> writes:
On Fri, 13 Aug 2010 22:36:01 +0200, Borneq wrote:

 Where can I find D example programs, especially for LDC ?
Since ldc only supports D1/Tango, you can find examples on the Tango site: http://dsource.org/projects/tango import tango.io.Stdout; void main() { Stdout("Hello World").newline; }
Aug 13 2010
parent reply "Borneq" <borneq antyspam.hidden.pl> writes:
Użytkownik "mwarning" <moritzwarning web.de> napisał w wiadomości 
news:i44j4l$177i$1 digitalmars.com...
 Since ldc only supports D1/Tango, you can find examples on the Tango site:
 http://dsource.org/projects/tango
I compile examples and look into generated *.ll but i can't find garbage collector function for LLVM like llvm_gc_allocate,llvm_gc_initialize (http://llvm.org/releases/1.9/docs/GarbageCollection.html) only variable name was %.newclass_gc_alloc
Aug 15 2010
parent reply Leandro Lucarella <luca llucax.com.ar> writes:
Borneq, el 15 de agosto a las 22:28 me escribiste:
 Użytkownik "mwarning" <moritzwarning web.de> napisał w wiadomości
 news:i44j4l$177i$1 digitalmars.com...
Since ldc only supports D1/Tango, you can find examples on the Tango site:
http://dsource.org/projects/tango
I compile examples and look into generated *.ll but i can't find garbage collector function for LLVM like llvm_gc_allocate,llvm_gc_initialize (http://llvm.org/releases/1.9/docs/GarbageCollection.html) only variable name was %.newclass_gc_alloc
LDC doesn't use LLVM infrastructure for garbage collection. PS: Also note that you're looking at very old LLVM documentation, current release is 2.7 and latest LDC release works with 2.6. -- Leandro Lucarella (AKA luca) http://llucax.com.ar/ ---------------------------------------------------------------------- GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05) ---------------------------------------------------------------------- I'm a rabbit in your headlights Scared of the spotlight You don't come to visit I'm stuck on this bed
Aug 15 2010
parent reply "Borneq" <borneq antyspam.hidden.pl> writes:
Użytkownik "Leandro Lucarella" <luca llucax.com.ar> napisał w wiadomości 
news:20100815212755.GD5751 llucax.com.ar...
 LDC doesn't use LLVM infrastructure for garbage collection.
Garbage Collector is in Tango library?
Aug 15 2010
parent mwarning <moritzwarning web.de> writes:
On Mon, 16 Aug 2010 07:48:11 +0200, Borneq wrote:

 Użytkownik "Leandro Lucarella" <luca llucax.com.ar> napisał w wiadomości
 news:20100815212755.GD5751 llucax.com.ar...
 LDC doesn't use LLVM infrastructure for garbage collection.
Garbage Collector is in Tango library?
Yes, it's in the runtime part of the Tango library.
Aug 16 2010
prev sibling parent reply mwarning <moritzwarning web.de> writes:
On Fri, 13 Aug 2010 22:36:01 +0200, Borneq wrote:

 Where can I find D example programs, especially for LDC ?
I assume you want a 64bit D compiler. Apart from LDC, there is gdc (http://bitbucket.org/goshawk/gdc/wiki/Home). But I can't tell you how good gdc works yet.
Aug 13 2010
parent Michael P. <baseball.mjp gmail.com> writes:
mwarning Wrote:

 On Fri, 13 Aug 2010 22:36:01 +0200, Borneq wrote:
 
 Where can I find D example programs, especially for LDC ?
I assume you want a 64bit D compiler. Apart from LDC, there is gdc (http://bitbucket.org/goshawk/gdc/wiki/Home). But I can't tell you how good gdc works yet.
If you are going to be using 64-bit with gdc, please view this issue: http://bitbucket.org/goshawk/gdc/issue/51/1062-outstanding-issues There is a temporary patch for the broken 64-bit support.
Aug 13 2010