December 08, 2004
In article <cp7t0c$gt1$1@digitaldaemon.com>, PizaZ says...
>
>YEAH!  Only 891 more updates til 1.0 !!!!

That joke would've been a lot funnier back in August ;) http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D/9351

jcc7
December 08, 2004
Thomas Kuehne wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> NotDashEscaped: You need GnuPG to verify this message
> 
> 
> see Subject
> 
> Thomas
> 
> diff -ur org/dmd/samples/d/chello.d neu/dmd/samples/d/chello.d
> --- org/dmd/samples/d/chello.d	2004-11-23 17:25:54.000000000 +0100
> +++ neu/dmd/samples/d/chello.d	2004-12-08 19:48:02.000000000 +0100
> @@ -13,6 +13,11 @@
>   */
>  // From an example from "Inside OLE" Copyright Microsoft
>  +version(Windows){}else{
> +	pragma(msg, "This sample is only supported on Windows");
> +	static assert(0);
> +}
> +

Great idea!

-- 
Justin (a/k/a jcc7)
http://jcc_7.tripod.com/d/
December 09, 2004
On Wed, 8 Dec 2004 20:03:21 +0100, Thomas Kuehne <thomas-dloop@kuehne.thisisspam.cn> wrote:

>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> NotDashEscaped: You need GnuPG to verify this message
>
>
> see Subject
>
> Thomas
>
> diff -ur org/dmd/samples/d/chello.d neu/dmd/samples/d/chello.d
> --- org/dmd/samples/d/chello.d	2004-11-23 17:25:54.000000000 +0100
> +++ neu/dmd/samples/d/chello.d	2004-12-08 19:48:02.000000000 +0100
> @@ -13,6 +13,11 @@
>   */
>  // From an example from "Inside OLE" Copyright Microsoft
> +version(Windows){}else{
> +	pragma(msg, "This sample is only supported on Windows");
> +	static assert(0);
> +}
<snip>

!version(Windows) or version(!Windows)
would be nice. (#ifndef may have been ugly, but it was usefull)

-- 
"Unhappy Microsoft customers have a funny way of becoming Linux,
Salesforce.com and Oracle customers." - www.microsoft-watch.com:
"The Year in Review: Microsoft Opens Up"
--
"I plan on at least one critical patch every month, and I haven't been disappointed."
- Adam Hansen, manager of security at Sonnenschein Nath & Rosenthal LLP
(Quote from http://www.eweek.com/article2/0,1759,1736104,00.asp)
--
"It's been a challenge to "reteach or retrain" Web users to pay for content, said Pizey"
-Wired website: "The Incredible Shrinking Comic"
December 09, 2004
Simon Buchan wrote:

>> +version(Windows){}else{
>> +    pragma(msg, "This sample is only supported on Windows");
>> +    static assert(0);
>> +}
> 
> <snip>
> 
> !version(Windows) or version(!Windows)
> would be nice. (#ifndef may have been ugly, but it was usefull)

It sure would, but it doesn't work in the current version.

It was discussed on the digitalmars.D forum, also with Walter:
http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D/11946

Hopefully it can be added with the other "Posix" fix... ?
Not version conditionals in general, just the ! reversing.

--anders
December 09, 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Anders F Björklund schrieb am Thu, 09 Dec 2004 15:41:59 +0100:
> Simon Buchan wrote:
>
>>> +version(Windows){}else{
>>> +    pragma(msg, "This sample is only supported on Windows");
>>> +    static assert(0);
>>> +}
>> 
>> <snip>
>> 
>> !version(Windows) or version(!Windows)
>> would be nice. (#ifndef may have been ugly, but it was usefull)
>
> It sure would, but it doesn't work in the current version.
>
> It was discussed on the digitalmars.D forum, also with Walter: http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D/11946
>
> Hopefully it can be added with the other "Posix" fix... ? Not version conditionals in general, just the ! reversing.

I don't think that it can be included in the "Posix" fix.

If you e.g. declare that "version(__SomeVersion)" will only be included if "SomeVersion" isn't defined that you could tinker with debcond.c:

    int VersionCondition::include()
    int DebugCondition::include()

Thomas

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.9.13 (GNU/Linux)

iD8DBQFBuGmN3w+/yD4P9tIRAm3sAKDGBYyhHd4zJrofirnRrsbCK5OyPACfZ5gY
U25vkj5be3hYEi1rUnoEcO0=
=SvxN
-----END PGP SIGNATURE-----
December 09, 2004
Thomas Kuehne wrote:

>>Hopefully it can be added with the other "Posix" fix... ?
>>Not version conditionals in general, just the ! reversing.
> 
> I don't think that it can be included in the "Posix" fix.

Actually, I meant "along with the other fix" :-)

As in: hope that Walter adds both of these to D.

> If you e.g. declare that "version(__SomeVersion)" will only be included
> if "SomeVersion" isn't defined that you could tinker with debcond.c:
> 
>     int VersionCondition::include()
>     int DebugCondition::include()

Yes, it requires a another code patch most likely...

The idea is that starting a version with a "!"
reverses the value of the check, like (!Windows)

--anders
December 09, 2004
Anders F Björklund schrieb am Donnerstag, 9. Dezember 2004 16:23:
> The idea is that starting a version with a "!"
> reverses the value of the check, like (!Windows)

here we go ;)

Supports
    version(! Windows)
    version(!123)
    debug(! Windows)
    debug(!123)

Thomas

December 10, 2004
Thomas Kuehne wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Anders F Björklund schrieb am Donnerstag, 9. Dezember 2004 16:23:
>> The idea is that starting a version with a "!"
>> reverses the value of the check, like (!Windows)
> 
> here we go ;)
> 
> Supports
>     version(! Windows)
>     version(!123)
>     debug(! Windows)
>     debug(!123)
> 
> Thomas
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.9.13 (GNU/Linux)
> 
> iD8DBQFBuIge3w+/yD4P9tIRAiVnAKCnxeaOim+7nEhUBGpwGBrstAsqrgCgutC5
> WnLv/wyQ78duVd0tI+F4+8o=
> =BHwe
> -----END PGP SIGNATURE-----


These certainly are all great ideas. Thomas has done quite a few diff's that could be useful.  I'm just wondering how they can be tested.  On gdc, I suppose this is possible because it can be readily rebuilt.

On dmd, it would be great if Walter would include the object files for the backend so that changes to the compiler can be linked up and tested. Perhaps that's not possible?  It was worth a try.  :-)

Later,

John
December 10, 2004
Thomas Kuehne wrote:

> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Nilo Paim schrieb am Wed, 08 Dec 2004 15:48:51 -0200:
>> Hi all,
>>
>> That my first try using D. I've downloaded dmd.zip for Linux from the DigitalMars site, but I couldn't execute it on linux.
>>
>> Looking at the files, I've found .exe's and .bat's. It looks like Windows stuff.
>>
>> How I need to use D on Linux? What am I missing.
> 
> 1) the manual aproach
>     chmod +x dmd/bin/dmd
>     addapt the content of dmd.conf to your directory name
>     cp dmd/bin/dmd.conf /etc
> 
> 2) the script
>    http://dmd.kuehne.cn
>    ( it does a little bit more )
> 
> Thomas
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.9.13 (GNU/Linux)
> 
> iD8DBQFBtz/83w+/yD4P9tIRArNsAJsEtcXqZrVB8KUKYIFR1UFU90Y1FgCgkN2o
> 8GmVyuQ2/emUo1McUggCNus=
> =bgfb
> -----END PGP SIGNATURE-----

I prefer to install dmd to /opt/dmd, and then make symbolic links to the executables.

ln -s /opt/dmd/bin/dmd /usr/local/bin/dmd

the above can be done for each executable in dmd/bin.  For libphobos.a, I do

ln -s /opt/dmd/lib/libphobos.a /usr/lib/libphobos.a

(technically, it's probably more correct to install libphobos.a
in /usr/local/lib).

In both examples, everytime you update dmd, the links point to the most recent files installed.

The same can be done with /etc/dmd.conf:

ln -s /opt/dmd/bin/dmd.conf /etc/dmd.conf

Here you have to realize that everytime you update dmd, you'll probably overwirte your /opt/dmd/bin/dmd.conf file.  So you have to be careful not to do so.

-John
December 10, 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

John Reimer schrieb am Thu, 09 Dec 2004 16:21:05 -0800:
> Thomas Kuehne wrote:
>> Anders F Björklund schrieb am Donnerstag, 9. Dezember 2004 16:23:
>>> The idea is that starting a version with a "!"
>>> reverses the value of the check, like (!Windows)
>> 
>> here we go ;)
>> 
>> Supports
>>     version(! Windows)
>>     version(!123)
>>     debug(! Windows)
>>     debug(!123)
>> 

> These certainly are all great ideas. Thomas has done quite a few diff's that could be useful.  I'm just wondering how they can be tested.  On gdc, I suppose this is possible because it can be readily rebuilt.
>
> On dmd, it would be great if Walter would include the object files for the backend so that changes to the compiler can be linked up and tested. Perhaps that's not possible?  It was worth a try.  :-)

GDC is also available for Windows (-> cygwin-1.5.12-1).
Guessing from the Russel's bug report(D.gnu 2004-12-0) they include an ancient
gdc-1f/1g(?) version.

You should be able to update, compile and test GDC on Windows too.

Thomas


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.9.13 (GNU/Linux)

iD8DBQFBuS8C3w+/yD4P9tIRAt4aAKCx2mZxj0Sxc919aPeaDu3AvTUY8QCfWDlV
Ry8pToMKhxkmQyr9pZyXk6Y=
=CUd6
-----END PGP SIGNATURE-----