www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - LDC 0.9.2 release candidate

reply Christian Kamm <kamm-incasoftware removethis.de> writes:
I made a new package based on LDC trunk (DMDFE 1.056, LLVM 2.6) and Tango 
0.99.9. It's only for x86-64 for now and available at:

http://www.incasoftware.de/~kamm/ldc/ldc-0.9.2-x86_64-rc1.tbz2

Could everyone interested in this give it a spin and report back if you hit 
a critical issue? (either here, on the ldc bug tracker or to me directly)

Regards,
Christian
Feb 13 2010
next sibling parent Manuel =?ISO-2022-JP?B?SxskKEQrUxsoQm5pZw==?= <manuelk89 gmx.net> writes:
Thank you very much for this new RC. I had some compilation errors at
first with my project (about 90 modules + derelict + tango ~ 196
modules), but it turned out that these we're just false positives that
compiled before and we're actually errors in my code and an old
derelict realease. Updating derelict and fixing one line in my code
resolved the issues, so thumbs up :)
Feb 13 2010
prev sibling next sibling parent reply Ellery Newcomer <ellery-newcomer utulsa.edu> writes:
On 02/13/2010 04:28 AM, Christian Kamm wrote:
 I made a new package based on LDC trunk (DMDFE 1.056, LLVM 2.6) and Tango
 0.99.9. It's only for x86-64 for now and available at:

 http://www.incasoftware.de/~kamm/ldc/ldc-0.9.2-x86_64-rc1.tbz2

 Could everyone interested in this give it a spin and report back if you hit
 a critical issue? (either here, on the ldc bug tracker or to me directly)

 Regards,
 Christian
Is it just me, or does ldc handle gratuitous use of ~= much more poorly than dmd?
Feb 13 2010
next sibling parent Ellery Newcomer <ellery-newcomer utulsa.edu> writes:
On 02/13/2010 01:34 PM, Ellery Newcomer wrote:
 On 02/13/2010 04:28 AM, Christian Kamm wrote:
 I made a new package based on LDC trunk (DMDFE 1.056, LLVM 2.6) and Tango
 0.99.9. It's only for x86-64 for now and available at:

 http://www.incasoftware.de/~kamm/ldc/ldc-0.9.2-x86_64-rc1.tbz2

 Could everyone interested in this give it a spin and report back if
 you hit
 a critical issue? (either here, on the ldc bug tracker or to me directly)

 Regards,
 Christian
Is it just me, or does ldc handle gratuitous use of ~= much more poorly than dmd?
And I get an assertion failure on garbage code void main(){ int[] a; a[length++] = 1; }
Feb 13 2010
prev sibling next sibling parent reply bearophile <bearophileHUGS lycos.com> writes:
Ellery Newcomer:

 Is it just me, or does ldc handle gratuitous use of ~= much more poorly 
 than dmd?
Yep. But Tango/LDC devs have ignored me about this so far. You can also try to time the opIn_r on AAs :o] It's (probably) quite bad with LDC+Tango compared to DMD+Phobos. I don't know why. Bye, bearophile
Feb 13 2010
parent Ellery Newcomer <ellery-newcomer utulsa.edu> writes:
On 02/13/2010 01:43 PM, bearophile wrote:
 Ellery Newcomer:

 Is it just me, or does ldc handle gratuitous use of ~= much more poorly
 than dmd?
Yep. But Tango/LDC devs have ignored me about this so far.
It isn't a tango problem; the latest dmd/tango bundle works fine. And I tried replacing the int[]'s and int[][]'s with a quickie Appender implementation, and it still sucks. 5 seconds to convert a 15 kB file to a int[][].
Feb 13 2010
prev sibling parent reply Christian Kamm <kamm-incasoftware removethis.de> writes:
Ellery Newcomer wrote:
 Is it just me, or does ldc handle gratuitous use of ~= much more poorly
 than dmd?
Yes, LDC did ~= by doing length += 1 and then assigning the last element. ;) I changed it to use the appropriate runtime function. Please try again with: http://www.incasoftware.de/~kamm/ldc/ldc-0.9.2-x86_64-rc2.tbz2 Christian
Feb 14 2010
parent reply Ellery Newcomer <ellery-newcomer utulsa.edu> writes:
On 02/14/2010 03:16 AM, Christian Kamm wrote:
 Ellery Newcomer wrote:
 Is it just me, or does ldc handle gratuitous use of ~= much more poorly
 than dmd?
Yes, LDC did ~= by doing length += 1 and then assigning the last element. ;) I changed it to use the appropriate runtime function. Please try again with: http://www.incasoftware.de/~kamm/ldc/ldc-0.9.2-x86_64-rc2.tbz2 Christian
Hm. That didn't change anything. I'm beginning to think ~= is only part of the problem. Well, if you like, here's my little program and its data file: http://personal.utulsa.edu/~ellery-newcomer/test.d http://personal.utulsa.edu/~ellery-newcomer/euler67.txt And now that I look at it, even dmd generated executables are getting their pants wupped by an equivalent python script. Suggestions for a more efficient use of tango are welcome.
Feb 14 2010
parent reply bearophile <bearophileHUGS lycos.com> writes:
Ellery Newcomer:
 And now that I look at it, even dmd generated executables are getting 
 their pants wupped by an equivalent python script. Suggestions for a 
 more efficient use of tango are welcome.
DMD/D1/Phobos: import std.stream: BufferedFile; import std.string: split; import std.conv: toInt; import std.stdio: writefln; T max(T)(T x, T y) { return x >= y ? x : y; } void main() { int[][] triangle; foreach (string line; new BufferedFile("triangle.txt")) { auto parts = line.split(); auto line_nums = new int[parts.length]; foreach (i, num; parts) line_nums[i] = toInt(num); triangle ~= line_nums; } while (triangle.length > 1) { auto last_row = triangle[$ - 1]; for (int i; i < triangle.length - 1; i++) triangle[$ - 2][i] += max(last_row[i], last_row[i + 1]); triangle.length = triangle.length - 1; } writefln(triangle[0][0]); } Bye, bearophile
Feb 14 2010
parent bearophile <bearophileHUGS lycos.com> writes:
DMD/D1/Phobos + dlibs:

import std.conv: toInt;
import d.string: xsplit;
import d.xio: xfile;
import d.func: max, select, map, putr, xrange, pop;

void main() {
    string line;
    auto triangle = select(map(&toInt, line.xsplit()), line,
xfile("triangle.txt"));

    while (triangle.length > 1) {
        auto last_row = triangle[$ - 1];
        foreach (i; xrange(triangle.length - 1))
            triangle[$ - 2][i] += max(last_row[i], last_row[i + 1]);
        triangle.pop();
    }

    putr(triangle[0][0]);
}

Bye,
bearophile
Feb 14 2010
prev sibling parent bearophile <bearophileHUGS lycos.com> writes:
I have tried the latest "daily" build, and I think it produces larger binaries,
compared to the precedent "daily" build.

Bye,
bearophile
Feb 13 2010