D.gnu - The following code bypasses immutabililty with GDC but not DMD
- Nicholas Smith (24/24) Apr 11 2013 I don't know how to file bug reports but I'm sure this shouldn't
- Manu (7/30) Apr 11 2013 This is an interesting problem with the ref-is-not-part-of-the-type desi...
- Iain Buclaw (4/7) Apr 11 2013 That's a bug in the frontend, which has since been fixed and
- Nicholas Smith (6/14) Apr 12 2013 It's from the Ubuntu Software Centre, apparently version 4.6.3.
- John Colvin (2/18) Apr 12 2013 IIRC, in GDC time, you're in the distant past.
- Iain Buclaw (5/28) Apr 12 2013 In D time, you're a Neanderthal.
- Nicholas Smith (5/6) Apr 12 2013 I suppose someone should update that package in the Software
- Iain Buclaw (5/11) Apr 12 2013 Package is in process. Expected landing is in the next ubuntu release.
- Joseph Rushton Wakeling (16/19) Apr 15 2013 It's not too bad to build GDC on Ubuntu once you get the hang of it -- h...
- Iain Buclaw (6/7) Apr 11 2013 Real gdc bugs get filed here: http://bugzilla.gdcproject.org
I don't know how to file bug reports but I'm sure this shouldn't happen :) DMD gives an error. import std.stdio; void main() { immutable Cat cat = cast(immutable) new Cat(5); happyBirthday(cat.age); writefln("My 5 year old cat is %s years old!", cat.age); } void happyBirthday(ref int i) { i++; } class Cat { public int age; this(int a) { this.age = age; } } Output: My 5 year old cat is 6 years old!
Apr 11 2013
This is an interesting problem with the ref-is-not-part-of-the-type design. You can't really have a const(ref) in D, and a ref const(int) is kinda backwards logic. I've never understood why ref isn't part of the type... can someone explain why this is a good thing? It seems to cause all sorts of troublesome problems... auto ref in templates for one. On 12 April 2013 10:50, Nicholas Smith <nmsmith65 gmail.com> wrote:I don't know how to file bug reports but I'm sure this shouldn't happen :) DMD gives an error. import std.stdio; void main() { immutable Cat cat = cast(immutable) new Cat(5); happyBirthday(cat.age); writefln("My 5 year old cat is %s years old!", cat.age); } void happyBirthday(ref int i) { i++; } class Cat { public int age; this(int a) { this.age = age; } } Output: My 5 year old cat is 6 years old!
Apr 11 2013
On Friday, 12 April 2013 at 00:50:03 UTC, Nicholas Smith wrote:I don't know how to file bug reports but I'm sure this shouldn't happen :) DMD gives an error.That's a bug in the frontend, which has since been fixed and merged into gdc. Just how old is your compiler? :)
Apr 11 2013
On Friday, 12 April 2013 at 06:39:04 UTC, Iain Buclaw wrote:On Friday, 12 April 2013 at 00:50:03 UTC, Nicholas Smith wrote:It's from the Ubuntu Software Centre, apparently version 4.6.3. Not sure how old that is (latest is around 4.8 right?), but I don't have the latest build. I haven't bothered to keep that up to date :) If it's fixed in the current version then hooray.I don't know how to file bug reports but I'm sure this shouldn't happen :) DMD gives an error.That's a bug in the frontend, which has since been fixed and merged into gdc. Just how old is your compiler? :)
Apr 12 2013
On Friday, 12 April 2013 at 07:53:13 UTC, Nicholas Smith wrote:On Friday, 12 April 2013 at 06:39:04 UTC, Iain Buclaw wrote:IIRC, in GDC time, you're in the distant past.On Friday, 12 April 2013 at 00:50:03 UTC, Nicholas Smith wrote:It's from the Ubuntu Software Centre, apparently version 4.6.3. Not sure how old that is (latest is around 4.8 right?), but I don't have the latest build. I haven't bothered to keep that up to date :) If it's fixed in the current version then hooray.I don't know how to file bug reports but I'm sure this shouldn't happen :) DMD gives an error.That's a bug in the frontend, which has since been fixed and merged into gdc. Just how old is your compiler? :)
Apr 12 2013
On 12 April 2013 10:56, John Colvin <john.loughran.colvin gmail.com> wrote:On Friday, 12 April 2013 at 07:53:13 UTC, Nicholas Smith wrote:In D time, you're a Neanderthal. -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0';On Friday, 12 April 2013 at 06:39:04 UTC, Iain Buclaw wrote:IIRC, in GDC time, you're in the distant past.On Friday, 12 April 2013 at 00:50:03 UTC, Nicholas Smith wrote:It's from the Ubuntu Software Centre, apparently version 4.6.3. Not sure how old that is (latest is around 4.8 right?), but I don't have the latest build. I haven't bothered to keep that up to date :) If it's fixed in the current version then hooray.I don't know how to file bug reports but I'm sure this shouldn't happen :) DMD gives an error.That's a bug in the frontend, which has since been fixed and merged into gdc. Just how old is your compiler? :)
Apr 12 2013
On Friday, 12 April 2013 at 10:03:50 UTC, Iain Buclaw wrote:In D time, you're a Neanderthal.I suppose someone should update that package in the Software Centre then :P Eh, doesn't matter. Looks like I'll have to get my hands dirty if I want to use GDC.
Apr 12 2013
On 12 April 2013 12:35, Nicholas Smith <nmsmith65 gmail.com> wrote:On Friday, 12 April 2013 at 10:03:50 UTC, Iain Buclaw wrote:Package is in process. Expected landing is in the next ubuntu release. -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0';In D time, you're a Neanderthal.I suppose someone should update that package in the Software Centre then :P Eh, doesn't matter. Looks like I'll have to get my hands dirty if I want to use GDC.
Apr 12 2013
On 04/12/2013 01:35 PM, Nicholas Smith wrote:I suppose someone should update that package in the Software Centre then :P Eh, doesn't matter. Looks like I'll have to get my hands dirty if I want to use GDC.It's not too bad to build GDC on Ubuntu once you get the hang of it -- here's my technique using the gcc-snapshot package to get GCC sources: http://forum.dlang.org/thread/mailman.1605.1352199912.5162.d.gnu puremagic.com Note that that post has one small typo in it -- the line that is given as ./setup-gcc.sh ../gcc-snapshot-20121008 should be, ./setup-gcc.sh ../gcc-snapshot-20121008/src Also, note that the gcc-snapshot package has updated since then -- the current with Ubuntu 13.04 is gcc-snapshot-20130330. Finally, the ./configure options listed there are far too extensive. These days, I use simply: ../gcc-snapshot-YYYYmmdd/src/configure --enable-languages=d --disable-multilib --enable-checking=release --prefix=/opt/gdc These days I'm building off the gdc-4.8 branch rather than GDC master, but that may be over-cautious.
Apr 15 2013
On 12 April 2013 01:50, Nicholas Smith <nmsmith65 gmail.com> wrote:I don't know how to file bug reports but I'm sure this shouldn't happen :)Real gdc bugs get filed here: http://bugzilla.gdcproject.org Regards -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0';
Apr 11 2013