www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - DMD 1.033 and 2.017 releases

reply Walter Bright <newshound1 digitalmars.com> writes:
For Tango.

http://www.digitalmars.com/d/1.0/changelog.html
http://ftp.digitalmars.com/dmd.1.033.zip

http://www.digitalmars.com/d/2.0/changelog.html
http://ftp.digitalmars.com/dmd.2.017.zip
Jul 11 2008
next sibling parent Bill Baxter <dnewsgroup billbaxter.com> writes:
Walter Bright wrote:
 For Tango.
 
 http://www.digitalmars.com/d/1.0/changelog.html
 http://ftp.digitalmars.com/dmd.1.033.zip
 
 http://www.digitalmars.com/d/2.0/changelog.html
 http://ftp.digitalmars.com/dmd.2.017.zip

Yay! This is great. --bb
Jul 11 2008
prev sibling next sibling parent Lionello Lunesu <lio lunesu.remove.com> writes:
Walter Bright wrote:
 For Tango.
 
 http://www.digitalmars.com/d/1.0/changelog.html
 http://ftp.digitalmars.com/dmd.1.033.zip
 
 http://www.digitalmars.com/d/2.0/changelog.html
 http://ftp.digitalmars.com/dmd.2.017.zip

YES! Release early, release often! These bug-fix releases are the best, IMO. Thanks! L.
Jul 11 2008
prev sibling next sibling parent reply "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"Walter Bright" <newshound1 digitalmars.com> wrote in message 
news:g591bf$j5j$2 digitalmars.com...
 For Tango.

 http://www.digitalmars.com/d/1.0/changelog.html
 http://ftp.digitalmars.com/dmd.1.033.zip

 http://www.digitalmars.com/d/2.0/changelog.html
 http://ftp.digitalmars.com/dmd.2.017.zip

Regression fixes _for the win_. Let's see more of this ;)
Jul 11 2008
next sibling parent reply Bill Baxter <dnewsgroup billbaxter.com> writes:
Jarrett Billingsley wrote:
 "Walter Bright" <newshound1 digitalmars.com> wrote in message 
 news:g591bf$j5j$2 digitalmars.com...
 For Tango.

 http://www.digitalmars.com/d/1.0/changelog.html
 http://ftp.digitalmars.com/dmd.1.033.zip

 http://www.digitalmars.com/d/2.0/changelog.html
 http://ftp.digitalmars.com/dmd.2.017.zip

Regression fixes _for the win_. Let's see more of this ;)

Maybe sooner than you were thinking: Is there any incantation I can use to make the code below work now? I saw that typeof(Type.member) is no longer considered valid, but it seems neither are any of the replacements I can think of. -------------- struct Thing(Scalar) { Scalar x,y,z; } alias typeof(Thing!(float).x) SC; /* This version used to work */ /+ bug.d(30): Error: this is not in a struct or class scope bug.d(30): Error: 'this' is only allowed in non-static member functions, not main bug.d(30): Error: this for x needs to be type Thing not type int +/ alias typeof(Thing!(float).init.x) SC2; /+ bug.d(32): Error: undefined identifier struct Thing.init bug.d(32): Error: no property 'x' for type 'void' +/ alias typeof((Thing!(float).init).x) SC2; /+ bug.d(37): Error: Thing!(float).init is used as a type bug.d(37): Error: no property 'x' for type 'void' +/ void main() { } --bb
Jul 11 2008
parent Bill Baxter <dnewsgroup billbaxter.com> writes:
Bill Baxter wrote:
 Jarrett Billingsley wrote:
 "Walter Bright" <newshound1 digitalmars.com> wrote in message 
 news:g591bf$j5j$2 digitalmars.com...
 For Tango.

 http://www.digitalmars.com/d/1.0/changelog.html
 http://ftp.digitalmars.com/dmd.1.033.zip

 http://www.digitalmars.com/d/2.0/changelog.html
 http://ftp.digitalmars.com/dmd.2.017.zip

Regression fixes _for the win_. Let's see more of this ;)

Maybe sooner than you were thinking: Is there any incantation I can use to make the code below work now? I saw that typeof(Type.member) is no longer considered valid, but it seems neither are any of the replacements I can think of. -------------- struct Thing(Scalar) { Scalar x,y,z; } alias typeof(Thing!(float).x) SC; /* This version used to work */ /+ bug.d(30): Error: this is not in a struct or class scope bug.d(30): Error: 'this' is only allowed in non-static member functions, not main bug.d(30): Error: this for x needs to be type Thing not type int +/ alias typeof(Thing!(float).init.x) SC2; /+ bug.d(32): Error: undefined identifier struct Thing.init bug.d(32): Error: no property 'x' for type 'void' +/ alias typeof((Thing!(float).init).x) SC2; /+ bug.d(37): Error: Thing!(float).init is used as a type bug.d(37): Error: no property 'x' for type 'void' +/ void main() { } --bb

Looks like this works: alias typeof((Thing!(float)).init.x) SC2; But I think this is a bug. The parentheses shouldn't be necessary there I don't think. I've also run into another case here where in a template struct static if(typeof(*this).static_bool) { .. } fails, but with extra parens it works: static if((typeof(*this)).static_bool) { .. } Also works if you define an extra alias private alias typeof(*this) TypeofThis static if(TypeofThis.static_bool) { .. } --bb
Jul 11 2008
prev sibling parent "Koroskin Denis" <2korden+dmd gmail.com> writes:
On Sat, 12 Jul 2008 09:09:41 +0400, Bill Baxter  
<dnewsgroup billbaxter.com> wrote:

 Bill Baxter wrote:
 Jarrett Billingsley wrote:
 "Walter Bright" <newshound1 digitalmars.com> wrote in message  
 news:g591bf$j5j$2 digitalmars.com...
 For Tango.

 http://www.digitalmars.com/d/1.0/changelog.html
 http://ftp.digitalmars.com/dmd.1.033.zip

 http://www.digitalmars.com/d/2.0/changelog.html
 http://ftp.digitalmars.com/dmd.2.017.zip

Regression fixes _for the win_. Let's see more of this ;)

Is there any incantation I can use to make the code below work now? I saw that typeof(Type.member) is no longer considered valid, but it seems neither are any of the replacements I can think of. -------------- struct Thing(Scalar) { Scalar x,y,z; } alias typeof(Thing!(float).x) SC; /* This version used to work */ /+ bug.d(30): Error: this is not in a struct or class scope bug.d(30): Error: 'this' is only allowed in non-static member functions, not main bug.d(30): Error: this for x needs to be type Thing not type int +/ alias typeof(Thing!(float).init.x) SC2; /+ bug.d(32): Error: undefined identifier struct Thing.init bug.d(32): Error: no property 'x' for type 'void' +/ alias typeof((Thing!(float).init).x) SC2; /+ bug.d(37): Error: Thing!(float).init is used as a type bug.d(37): Error: no property 'x' for type 'void' +/ void main() { } --bb

Looks like this works: alias typeof((Thing!(float)).init.x) SC2; But I think this is a bug. The parentheses shouldn't be necessary there I don't think. I've also run into another case here where in a template struct static if(typeof(*this).static_bool) { .. } fails, but with extra parens it works: static if((typeof(*this)).static_bool) { .. } Also works if you define an extra alias private alias typeof(*this) TypeofThis static if(TypeofThis.static_bool) { .. } --bb

It's worth putting into bugzilla, I think.
Jul 12 2008
prev sibling next sibling parent user <e mail.com> writes:
v2.017  with '-w' switch:


warning - /dmd/bin/../bin/../src/phobos/std/file.d(1064): Error: implicit
conversion of expression (fta / 1000L) of type long to int can cause loss of
data
warning - /dmd/bin/../bin/../src/phobos/std/file.d(1065): Error: implicit
conversion of expression (cast(long)(cast(double)fta / 1000 * 1e+06) %
1000000L) of type long to int can cause loss of data
warning - /dmd/bin/../bin/../src/phobos/std/file.d(1067): Error: implicit
conversion of expression (ftm / 1000L) of type long to int can cause loss of
data
warning - /dmd/bin/../bin/../src/phobos/std/file.d(1068): Error: implicit
conversion of expression (cast(long)(cast(double)ftm / 1000 * 1e+06) %
1000000L) of type long to int can cause loss of data
Jul 11 2008
prev sibling next sibling parent Lars Ivar Igesund <larsivar igesund.net> writes:
Walter Bright wrote:

 For Tango.

Thanks :D -- Lars Ivar Igesund blog at http://larsivi.net DSource, #d.tango & #D: larsivi Dancing the Tango
Jul 12 2008
prev sibling next sibling parent reply Don <nospam nospam.com.au> writes:
Walter Bright wrote:
 For Tango.
 
 http://www.digitalmars.com/d/1.0/changelog.html
 http://ftp.digitalmars.com/dmd.1.033.zip
 
 http://www.digitalmars.com/d/2.0/changelog.html
 http://ftp.digitalmars.com/dmd.2.017.zip

DMD1.032 smashes the record for number of bugs fixed in one release. It's particularly good to see some of those really old bugs get closed. These kind of releases do a lot for D's image, I think.
Jul 12 2008
parent "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"Don" <nospam nospam.com.au> wrote in message 
news:g59vak$2mmu$1 digitalmars.com...
 Walter Bright wrote:
 For Tango.

 http://www.digitalmars.com/d/1.0/changelog.html
 http://ftp.digitalmars.com/dmd.1.033.zip

 http://www.digitalmars.com/d/2.0/changelog.html
 http://ftp.digitalmars.com/dmd.2.017.zip

DMD1.032 smashes the record for number of bugs fixed in one release. It's particularly good to see some of those really old bugs get closed. These kind of releases do a lot for D's image, I think.

http://www.digitalmars.com/d/1.0/changelog2.html#new0175 I think that one has more ;)
Jul 12 2008
prev sibling next sibling parent "Steven Schveighoffer" <schveiguy yahoo.com> writes:
Thanks for the quick turnaround!

-Steve

"Walter Bright" wrote
 For Tango.
 
 http://www.digitalmars.com/d/1.0/changelog.html
 http://ftp.digitalmars.com/dmd.1.033.zip
 
 http://www.digitalmars.com/d/2.0/changelog.html
 http://ftp.digitalmars.com/dmd.2.017.zip

Jul 12 2008
prev sibling next sibling parent Tomas Lindquist Olsen <tomas famolsen.dk> writes:
Walter Bright wrote:
 For Tango.
 
 http://www.digitalmars.com/d/1.0/changelog.html
 http://ftp.digitalmars.com/dmd.1.033.zip
 
 http://www.digitalmars.com/d/2.0/changelog.html
 http://ftp.digitalmars.com/dmd.2.017.zip

Nice move :)
Jul 12 2008
prev sibling next sibling parent Moritz Warning <moritzwarning web.de> writes:
On Fri, 11 Jul 2008 18:28:17 -0700, Walter Bright wrote:

 For Tango.
 
 http://www.digitalmars.com/d/1.0/changelog.html
 http://ftp.digitalmars.com/dmd.1.033.zip
 
 http://www.digitalmars.com/d/2.0/changelog.html
 http://ftp.digitalmars.com/dmd.2.017.zip

Thanks :)
Jul 12 2008
prev sibling parent reply David L. Davis <SpottedTiger yahoo.com> writes:
Walter Bright Wrote:

 For Tango.
 
 http://www.digitalmars.com/d/1.0/changelog.html
 http://ftp.digitalmars.com/dmd.1.033.zip
 

Walter, I've discovered a piece of my D 1.xxx source that's now broken since the dmd v1.033/v1.032 release...below is the test code to show the error(s). // Test source typeofx.d to recreate the error module typeofx; private import sc = std.compiler; private import std.stdio; private import std.stdarg; // Setup TypeoF const types const uint TF_UINT; const ulong TF_ULONG; template isIntConvertableP(T1, T2) { private bool isIntConvertableP(in T1 v) { if (typeid(T1) !is typeid(int)) return false; typeof(T2) v2; writefln("T1.typid=%s, T1.v=", typeid(T1), v, " T1.tsize=%d, ", T1.sizeof, "T2.typid=%s, T2.tsize=%d", typeid(T2), T2.sizeof); if (v >= v2.min && v <= v2.max) return true; else return false; } } bool isIntConvertable(...) { if (_arguments.length < 2) return false; TypeInfo ti1 = _arguments[0]; TypeInfo ti2 = _arguments[1]; int i = (va_arg!(int)(_argptr)); if (ti2 is typeid(ulong)) return isIntConvertableP!(int, ulong)(i); if (ti2 is typeid(uint)) return isIntConvertableP!(int, uint)(i); return false; } int main() { // works for dmd v1.031, // doesn't work under v1.033/v1.032 assert(isIntConvertableP!(int, ulong)(123) == true); // works for dmd v1.031, //doesn't work under v1.033/v1.032 assert(isIntConvertable(123, TF_ULONG) == true); writefln(); writefln("Compiled and tested with: \"%s v%d.%03d\"", sc.name, sc.version_major, sc.version_minor); return 0; } /+ compile and run with dmd v1.031 C:\dmd>dmd typeofx.d C:\dmd>typeofx T1.typid=int, T1.v=123 T1.tsize=4, T2.typid=ulong, T2.tsize=8 T1.typid=int, T1.v=123 T1.tsize=4, T2.typid=ulong, T2.tsize=8 Compiled and tested with: "Digital Mars D v1.031" C:\dmd> +/ /+ dmd v1.033/1.032 gotten with the 1st assert C:\dmd>dmd typeofx.d typeofx.d(18): Error: argument ulong to typeof is not an expression typeofx.d(42): template instance typeofx.isIntConvertableP!(int,ulong) error instantiating C:\dmd> +/ /+ dmd v1.033/1.032 gotten with the 2nd assert...1st assert commented in C:\dmd>dmd typeofx.d typeofx.d(18): Error: argument ulong to typeof is not an expression typeofx.d(42): template instance typeofx.isIntConvertableP!(int,ulong) error instantiating C:\dmd> +/ Thanks, David L. Davis
Jul 17 2008
next sibling parent reply "Koroskin Denis" <2korden gmail.com> writes:
On Thu, 17 Jul 2008 17:59:35 +0400, David L. Davis  
<SpottedTiger yahoo.com> wrote:

 Walter Bright Wrote:

 For Tango.

 http://www.digitalmars.com/d/1.0/changelog.html
 http://ftp.digitalmars.com/dmd.1.033.zip

Walter, I've discovered a piece of my D 1.xxx source that's now broken since the dmd v1.033/v1.032 release...below is the test code to show the error(s). // Test source typeofx.d to recreate the error module typeofx; private import sc = std.compiler; private import std.stdio; private import std.stdarg; // Setup TypeoF const types const uint TF_UINT; const ulong TF_ULONG; template isIntConvertableP(T1, T2) { private bool isIntConvertableP(in T1 v) { if (typeid(T1) !is typeid(int)) return false; typeof(T2) v2; writefln("T1.typid=%s, T1.v=", typeid(T1), v, " T1.tsize=%d, ", T1.sizeof, "T2.typid=%s, T2.tsize=%d", typeid(T2), T2.sizeof); if (v >= v2.min && v <= v2.max) return true; else return false; } } bool isIntConvertable(...) { if (_arguments.length < 2) return false; TypeInfo ti1 = _arguments[0]; TypeInfo ti2 = _arguments[1]; int i = (va_arg!(int)(_argptr)); if (ti2 is typeid(ulong)) return isIntConvertableP!(int, ulong)(i); if (ti2 is typeid(uint)) return isIntConvertableP!(int, uint)(i); return false; } int main() { // works for dmd v1.031, // doesn't work under v1.033/v1.032 assert(isIntConvertableP!(int, ulong)(123) == true); // works for dmd v1.031, //doesn't work under v1.033/v1.032 assert(isIntConvertable(123, TF_ULONG) == true); writefln(); writefln("Compiled and tested with: \"%s v%d.%03d\"", sc.name, sc.version_major, sc.version_minor); return 0; } /+ compile and run with dmd v1.031 C:\dmd>dmd typeofx.d C:\dmd>typeofx T1.typid=int, T1.v=123 T1.tsize=4, T2.typid=ulong, T2.tsize=8 T1.typid=int, T1.v=123 T1.tsize=4, T2.typid=ulong, T2.tsize=8 Compiled and tested with: "Digital Mars D v1.031" C:\dmd> +/ /+ dmd v1.033/1.032 gotten with the 1st assert C:\dmd>dmd typeofx.d typeofx.d(18): Error: argument ulong to typeof is not an expression typeofx.d(42): template instance typeofx.isIntConvertableP!(int,ulong) error instantiating C:\dmd> +/ /+ dmd v1.033/1.032 gotten with the 2nd assert...1st assert commented in C:\dmd>dmd typeofx.d typeofx.d(18): Error: argument ulong to typeof is not an expression typeofx.d(42): template instance typeofx.isIntConvertableP!(int,ulong) error instantiating C:\dmd> +/ Thanks, David L. Davis

typeof(T2) doesn't work anymore. Try replacing with T2. BTW, error message is pretty clear and shows correct line number. typeof(T2) v2; // Error: argument ulong to typeof is not an expression Next time post to digitalmars.D or digitalmars.D.learn, please!
Jul 17 2008
parent David L. Davis <SpottedTiger yahoo.com> writes:
Koroskin Denis Wrote:
 typeof(T2) doesn't work anymore. Try replacing with T2.
 BTW, error message is pretty clear and shows correct line number.
 
 typeof(T2) v2; // Error: argument ulong to typeof is not an expression
 
 Next time post to digitalmars.D or digitalmars.D.learn, please!

Thxs for the reply...btw I'm not new here...I know all about noob questions must go to learn. This is an issue with the existing D v1.xxx compiler changing things, which is what I'm pointing out to Walter. Plus, maybe the message makes perfect sense to you...but it doesn't to me. Could you please reframe from hammering down on people in the future...to me you're the new kid on the block. :) David L. Davis
Jul 17 2008
prev sibling parent "Koroskin Denis" <2korden gmail.com> writes:
On Thu, 17 Jul 2008 20:20:48 +0400, David L. Davis  
<SpottedTiger yahoo.com> wrote:

 Koroskin Denis Wrote:
 typeof(T2) doesn't work anymore. Try replacing with T2.
 BTW, error message is pretty clear and shows correct line number.

 typeof(T2) v2; // Error: argument ulong to typeof is not an expression

 Next time post to digitalmars.D or digitalmars.D.learn, please!

Thxs for the reply...btw I'm not new here...I know all about noob questions must go to learn. This is an issue with the existing D v1.xxx compiler changing things, which is what I'm pointing out to Walter. Plus, maybe the message makes perfect sense to you...but it doesn't to me. Could you please reframe from hammering down on people in the future...to me you're the new kid on the block. :) David L. Davis

Sorry for that, no offense was intended.
Jul 17 2008