Examples using Tango
Jesse Phillips
jessekphillips+D at gmail.com
Wed Dec 29 14:05:58 PST 2010
Daren Scot Wilson Wrote:
> I've been interested for a long time in learning D and using it for image
> processing and physics number crunching. Now I've got a few days in a row
> to study. Unfortunately I'm getting stuck even with "Hello World" due to
> most examples of D I find seem to be using Phobos instead of Tango.
http://www.dsource.org/projects/tango/wiki/Examples
> Indeed, I'm not clear as to which is the best to use. For me, "best" is
> defined primarily as "it works on my machine" but secondarily I care about
> speed and ease of use.
32bit does run on a 64bit system. Work is being done for 64bit support in DMD.
D2's Standard Library is still in flux. Several modules are deprecated and not properly marked.
http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel#Roadmap
> I'm using LDC (the llvm-based compiler) because it's 64-bit and maybe can
> handle D2. The D1/D2 doesn't matter a lot, though the statement "D version
> 2 which is recommended for new projects" on the home page sways me to use
> D2. But 64 bit is vital, since I want to work on huge arrays. The only
> limitation of LDC is apparently it works only with Tango.
http://www.prowiki.org/wiki4d/wiki.cgi?D__Tutorial/StartingWithD/Compiler
LDC is D1 Tango only. GDC has received updates to the latest versions of D1 and 2. There has been work on getting Phobos 2 to support 64bit, I don't know the issues with it or its status.
> If I could rub a genie's lamp and have three wishes granted, they are:
>
> 1) Is it possible to get the source and compile Phobos for use with LVM?
You can find LDC source on Dsource.org though it won't be as simple as compiling it to get it working with Phobos.
> 2) Existing code examples should always indicate whether they use Tango or
> Phobos. Ideally, every example would be presented twice, once for each.
> This might be redundant or pointless for old-timers and D experts, but for
> newbies like me it would help avoid wasting time.
Most examples are posted to a Wiki page, please mark them as you find issues. Generally un-marked indicates D1 Phobos; marked as Tango means D1; marked as D2 means Phobos. Things are not well marked, but anyone can help.
http://www.prowiki.org/wiki4d/wiki.cgi?D__Tutorial/StartingWithD
> 3) I'd like to see a translation page with two columns, Phobos and Tango,
> showing how to do the most common things we all need to do - printf() or
> whatever, basic binary file i/o, etc. There could be a third column for C or
> C++ to help us C++ programmers make the transition.
http://www.prowiki.org/wiki4d/wiki.cgi?ComingFrom
I have provided links that are close to the information you are looking for, or to guide you on finding the needed information.
More information about the Digitalmars-d-learn
mailing list