Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-17 Thread Tomas Lindquist Olsen
On Fri, Apr 17, 2009 at 5:38 AM, Walter Bright
newshou...@digitalmars.com wrote:
 Frits van Bommel wrote:

 Walter Bright wrote:

 Anders Bergh wrote:

 You could probably make dmd run on some GNU/Darwin, but it's sort of
 dead. There's http://www.puredarwin.org/ but I'm not sure if it
 actually works yet. The iPhone is an ARM platform so dmd would
 certainly not work there...

 If dmd/phobos binaries for osx won't work on those machines, then it's
 appropriate to have a different version identifier.

 So you're saying version(linux) shouldn't be defined on PPC or ARM Linux
 systems? After all, dmd/phobos binaries for Linux won't run on them...


 (I agree with BCS; the test should be source code compatibility)

 I meant if they were running on an x86 yet the binaries are different.


Isn't there powerpc osx as well ?


Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-17 Thread Walter Bright

Tomas Lindquist Olsen wrote:

Isn't there powerpc osx as well ?


Such should get OSX predefined as well as whatever is appropriate to 
identify the powerpc (X86 is predefined for 32 bit x86, X86_64 for 64 
bit x86).


Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-17 Thread Tomas Lindquist Olsen
On Fri, Apr 17, 2009 at 8:10 PM, Walter Bright
newshou...@digitalmars.com wrote:
 Tomas Lindquist Olsen wrote:

 Isn't there powerpc osx as well ?

 Such should get OSX predefined as well as whatever is appropriate to
 identify the powerpc (X86 is predefined for 32 bit x86, X86_64 for 64 bit
 x86).


I'm aware of this. I was more wondering what system/logic you're using
to decide these things... ! (sry, but it's a small - yet important
detail it seems)


Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-16 Thread Tomas Lindquist Olsen
On Thu, Apr 16, 2009 at 1:08 AM, Jordan Miner
jminer2...@nospam.students.pcci.edu wrote:
 Walter Bright Wrote:

 Because gcc on linux predefines linux, not Linux.

 Please change the version identifier from linux to Linux.


I realise I probably did my part to spike this discussion.

However, given the complaints Walter got from adding the Posix
identifier, removing linux is obviously a really bad idea.

But I must say I think Linux should be added, and linux be there
for legacy reasons, like darwin I guess.

-Tomas


Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-16 Thread Jacob Carlborg

Walter Bright wrote:

Jacob Carlborg wrote:
They call it Mac OS, then they add a version like this: Mac OS 9. 
Then when the tenth versions came it happened to be built on a nix 
base/core (known as darwin) and they also added the X (probably to 
reflect the new nix base, X is also ten using roman numerals) making 
it: Mac OS X. They still call it mac os ten (though some people, 
including me, like to call it mac os x and pronounce the x as in 
the letter x). After the x they add a name to reflect the version 
i.e. Leopard for version 10.5. Sometimes they refer to the os 
version with the name and sometimes with the version number.


Apple calls it Mac OS X version 10.5.

There is little consistency in how Apple names their OSs, so there is no 
way to come up with a version identifier for it that is completely 
consistent.




About the darwin vs OSX. There are other operating systems than Mac 
OS X that could use darwin as the version identifier if someone made a 
D compiler available. iPhone OS (this is just Mac OS X on the iphone and 
ipod thouch but it's called iPhone OS) and GNU/Darwin for example.


Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-16 Thread Leandro Lucarella
Tomas Lindquist Olsen, el 16 de abril a las 10:46 me escribiste:
 On Thu, Apr 16, 2009 at 1:08 AM, Jordan Miner
 jminer2...@nospam.students.pcci.edu wrote:
  Walter Bright Wrote:
 
  Because gcc on linux predefines linux, not Linux.
 
  Please change the version identifier from linux to Linux.
 
 
 I realise I probably did my part to spike this discussion.
 
 However, given the complaints Walter got from adding the Posix
 identifier, removing linux is obviously a really bad idea.
 
 But I must say I think Linux should be added, and linux be there
 for legacy reasons, like darwin I guess.

This seems like a reasonable tradeoff, issuing a deprecation warning when
the legacy version identifiers are used can be a good idea too, so people
can update the code eventually and the redundant identifiers can be
removed in the future.

-- 
Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/

GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)



Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-16 Thread Walter Bright

Jacob Carlborg wrote:
About the darwin vs OSX. There are other operating systems than Mac 
OS X that could use darwin as the version identifier if someone made a 
D compiler available. iPhone OS (this is just Mac OS X on the iphone and 
ipod thouch but it's called iPhone OS) and GNU/Darwin for example.


I wasn't aware of that. Would the OSX compiler and Phobos run out of the 
box on them?


Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-16 Thread Anders Bergh
On Thu, Apr 16, 2009 at 19:32, Walter Bright newshou...@digitalmars.com wrote:
 Jacob Carlborg wrote:

 About the darwin vs OSX. There are other operating systems than Mac OS
 X that could use darwin as the version identifier if someone made a D
 compiler available. iPhone OS (this is just Mac OS X on the iphone and ipod
 thouch but it's called iPhone OS) and GNU/Darwin for example.

 I wasn't aware of that. Would the OSX compiler and Phobos run out of the box
 on them?


You could probably make dmd run on some GNU/Darwin, but it's sort of
dead. There's http://www.puredarwin.org/ but I'm not sure if it
actually works yet. The iPhone is an ARM platform so dmd would
certainly not work there...

-- 
Anders Bergh


Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-16 Thread Georg Wrede

Walter Bright wrote:

Jacob Carlborg wrote:
They call it Mac OS, then they add a version like this: Mac OS 9. 
Then when the tenth versions came it happened to be built on a nix 
base/core (known as darwin) and they also added the X (probably to 
reflect the new nix base, X is also ten using roman numerals) making 
it: Mac OS X. They still call it mac os ten (though some people, 
including me, like to call it mac os x and pronounce the x as in 
the letter x). After the x they add a name to reflect the version 
i.e. Leopard for version 10.5. Sometimes they refer to the os 
version with the name and sometimes with the version number.


Apple calls it Mac OS X version 10.5.

There is little consistency in how Apple names their OSs, so there is no 
way to come up with a version identifier for it that is completely 
consistent.


There's a good word for them. They're Good Marketers. Now, in an honest 
man's world that is equivalent with Good Liars. (The definition being, 
whenever a liar is good at achieving his goal, and at the same time 
avoiding accusations of lying, then he's a Good Liar. We had a 
discussion about this in Elementary School, on the school yard. Of 
course, the bigger boys won, but that didn't mean that the rest of us 
would forget it, ever.)


So, in anticipation of how the world goes, all we need is a table 
lookup. Apple this or that, translates to this or that Version.


Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-16 Thread Walter Bright

Anders Bergh wrote:

You could probably make dmd run on some GNU/Darwin, but it's sort of
dead. There's http://www.puredarwin.org/ but I'm not sure if it
actually works yet. The iPhone is an ARM platform so dmd would
certainly not work there...


If dmd/phobos binaries for osx won't work on those machines, then it's 
appropriate to have a different version identifier.


Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-16 Thread BCS

Hello Walter,


If dmd/phobos binaries for osx won't work on those machines, then it's
appropriate to have a different version identifier.



I'd assert the test should be if the systems are source code compatible.




Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-16 Thread Frits van Bommel

Walter Bright wrote:

Anders Bergh wrote:

You could probably make dmd run on some GNU/Darwin, but it's sort of
dead. There's http://www.puredarwin.org/ but I'm not sure if it
actually works yet. The iPhone is an ARM platform so dmd would
certainly not work there...


If dmd/phobos binaries for osx won't work on those machines, then it's 
appropriate to have a different version identifier.


So you're saying version(linux) shouldn't be defined on PPC or ARM Linux 
systems? After all, dmd/phobos binaries for Linux won't run on them...



(I agree with BCS; the test should be source code compatibility)


Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-16 Thread Walter Bright

Frits van Bommel wrote:

Walter Bright wrote:

Anders Bergh wrote:

You could probably make dmd run on some GNU/Darwin, but it's sort of
dead. There's http://www.puredarwin.org/ but I'm not sure if it
actually works yet. The iPhone is an ARM platform so dmd would
certainly not work there...


If dmd/phobos binaries for osx won't work on those machines, then it's 
appropriate to have a different version identifier.


So you're saying version(linux) shouldn't be defined on PPC or ARM Linux 
systems? After all, dmd/phobos binaries for Linux won't run on them...



(I agree with BCS; the test should be source code compatibility)


I meant if they were running on an x86 yet the binaries are different.


Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-16 Thread Anders Bergh
On Fri, Apr 17, 2009 at 02:18, Walter Bright newshou...@digitalmars.com wrote:
 Anders Bergh wrote:

 You could probably make dmd run on some GNU/Darwin, but it's sort of
 dead. There's http://www.puredarwin.org/ but I'm not sure if it
 actually works yet. The iPhone is an ARM platform so dmd would
 certainly not work there...

 If dmd/phobos binaries for osx won't work on those machines, then it's
 appropriate to have a different version identifier.


The current dmd binaries would run and work on PureDarwin as long as
they don't use Cocoa or Carbon etc (which I doubt they do).

-- 
Anders Bergh


Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-15 Thread Anders F Björklund

Walter Bright wrote:

Jacob Carlborg wrote:
It depends on what documentation you read. 
http://developer.apple.com/documentation/Darwin/index.html

In this documentation Darwin is all over the place.


Move up a directory, and it's OSX, OSX, OSX.


I can only seem to find Mac OS X, not OSX ?

But the site _is_ divided into two OS sections,
Mac OS X and iPhone OS, both of which are OSX.
(and also based on Darwin, e.g. what uname says)
For instance wxWidgets is also using it: wxOSX*.

* http://wiki.wxwidgets.org/Development:_wxMac
  with wxOSX_CARBON, wxOSX_COCOA, wxOSX_IPHONE

So I suppose one can use OSX instead of darwin.

--anders


Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-15 Thread Anders F Björklund

Denis Koroskin wrote:

I also wonder why it is OSX. Are versions prior to MacOS 10 (which is 
marketed as MacOS X) officially unsupported by D?


All versions before Mac OS X 10.4 are unsupported, even though
you can make Mac OS X 10.3 limp along with an older GDC version*.

Mac OS 9 is flat out, due to having the wrong processor (PPC)
and no recent GCC. Oh, and the fact that it is also quite dead.

--anders

* http://prdownloads.sourceforge.net/gdcmac/gdc-0.21-mac-10.3.dmg


Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-15 Thread Anders F Björklund

Jarrett Billingsley wrote:

Michel Fortin wrote:

To me it's clear that Darwin is the core on which Mac OS X and iPhone OS are
based on. Mac OS X looks like a marketing name to me; I wouldn't be
surprised if in a few years it gets renamed to Mac OS XI, or something else,
because Mac OS X 10.10 would sound bad, just as would Mac OS X 11. Perhaps
we'll see Mac OS 11, iOS or something; whatever the change, the X part
will have to move out at some point.


It's also possible that Mac OS X stays in, while Darwin changes...

This already happened once before, to Mac OS X Server and Rhapsody.


I believe Darwin is a more stable identifier for the architecture than Mac
OS X.


Out of all the arguments put forth so far, I think this is the
strongest.  OSX is just the name of Apple's 10th Mac OS.  Why would we
have version(OSX), but not version(WinXP), version(WinVista),
version(LinuxUbuntuGutsy) etc. etc. etc.?


It would be more like version(NT), if you want to compare with Windows ?

GNU/Linux operating system versioning is a long sad story all by itself.

--anders


Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-15 Thread Jacob Carlborg

Denis Koroskin wrote:

On Wed, 15 Apr 2009 01:48:00 +0400, Jacob Carlborg d...@me.com wrote:


Walter Bright wrote:

Lars Ivar Igesund wrote:

Walter Bright wrote:


Now works for FreeBSD 7.1!


Nice!

But is there a particularly good reason for disregarding version 
identifiers already established by gdc and ldc?


freebsd vs FreeBSD, darwin vs OSX
 FreeBSD is how it is normally written in the official FreeBSD 
literature, such as : http://www.freebsd.org/


If you follow what's normally written in the official literature and 
documentation shouldn't it be MacOSX then?




I also wonder why it is OSX. Are versions prior to MacOS 10 (which is 
marketed as MacOS X) officially unsupported by D?
It's also funny to see that Walter officially deprecates something that 
he didn't invent.


Not that I complain about something, it's just a bit strange...



To my knowledge versions prior to MacOS 10 is not marketed as MacOS X. 
They're marketed as MacOS 9 (8 or what ever).


Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-15 Thread Jacob Carlborg

Walter Bright wrote:

Jacob Carlborg wrote:
If you follow what's normally written in the official literature and 
documentation shouldn't it be MacOSX then?


Perhaps. One could argue it either way. I checked the predefined 
identifiers in gcc for guidance, and found just the unfortunately 
generic __APPLE__. I wish Apple would make up their mind what they 
wanted to call their OS.


They call it Mac OS, then they add a version like this: Mac OS 9. 
Then when the tenth versions came it happened to be built on a nix 
base/core (known as darwin) and they also added the X (probably to 
reflect the new nix base, X is also ten using roman numerals) making 
it: Mac OS X. They still call it mac os ten (though some people, 
including me, like to call it mac os x and pronounce the x as in the 
letter x). After the x they add a name to reflect the version i.e. 
Leopard for version 10.5. Sometimes they refer to the os version with 
the name and sometimes with the version number.


Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-15 Thread Michel Fortin

On 2009-04-14 20:19:29 -0400, Walter Bright newshou...@digitalmars.com said:


__APPLE__ or __MACH__ - OSX


Apple has made many operating systems besides OSX, so __APPLE__ is out. 
I can't even remember which OS Mach is.


It's defined(___APPLE__)  defined(__MACH__) that is used (not or). 
Read it as An Apple OS running the Mach kernel. Although to be 
presise, the kernel is XNU, which uses Mach at its core.

http://en.wikipedia.org/wiki/XNU

So... perhaps the version identifier should be AppleMach. :-)

No, seriously, OSX is fine by me.

--
Michel Fortin
michel.for...@michelf.com
http://michelf.com/



Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-15 Thread Leandro Lucarella
Tomas Lindquist Olsen, el 15 de abril a las 01:45 me escribiste:
 On Tue, Apr 14, 2009 at 11:51 PM, Walter Bright
 newshou...@digitalmars.com wrote:
  Tomas Lindquist Olsen wrote:
 
  On Tue, Apr 14, 2009 at 9:49 PM, Walter Bright
  newshou...@digitalmars.com wrote:
 
  Tomas Lindquist Olsen wrote:
 
  And if not, why is there no Linux ? This is the obvious reason for
  GDC/LDC pick the lowercase identifiers in the first place ...
 
  Because gcc on linux predefines linux, not Linux.
 
 
  It seems somewhat arbitrary, but fair enough..
 
  It's just one less thing to remember when switching between C and D.
 
 
 After reading more, I just can't help but feel this is wrong.
 
 linux is still the only version identifier following this logic.
 
 Comparing http://predef.sourceforge.net/preos.html and D:
 
 linux - linux

This is only true when no -std=xxx (where xxx is an standard version
withou GCC extensions) is specified.
__linux__ (or __linux) is always defined.

-- 
Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/

GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)



Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-15 Thread Leandro Lucarella
Tomas Lindquist Olsen, el 15 de abril a las 02:26 me escribiste:
  Even if you strip underscores, OSX and Win32/64 still don't match
  C/C++ identifiers. Why should linux be special?
 
  Because the gcc macro suits the need perfectly. The others don't.
 
 I simply don't agree here. To me, linux (as opposed to Linux) is a
 special case that I need to remember, the others follow a pattern.
 
 
  I realise this is a minor thing probably not worth the time it gets,
  but D seems to have a tendency to throw in inconsistencies in every
  crack there is to find ...
 
  If gcc had any consistency, I'd use that. But it doesn't. It makes sense to
  use gcc's precedent when gcc makes sense, and to diverge when gcc does not
  make sense.
 
 Maybe it makes sense to you. Not to me.

I agree. I think it should be all CamelCase or all lowercase. I prefer the
later because there are situations where CamelCase are not completely
intuitive. For example: Osx or OSX?

linux
freebsd
macosx
windows
win32
win64

Looks fine to me.

-- 
Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/

GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)



Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-15 Thread Walter Bright

Jacob Carlborg wrote:
They call it Mac OS, then they add a version like this: Mac OS 9. 
Then when the tenth versions came it happened to be built on a nix 
base/core (known as darwin) and they also added the X (probably to 
reflect the new nix base, X is also ten using roman numerals) making 
it: Mac OS X. They still call it mac os ten (though some people, 
including me, like to call it mac os x and pronounce the x as in the 
letter x). After the x they add a name to reflect the version i.e. 
Leopard for version 10.5. Sometimes they refer to the os version with 
the name and sometimes with the version number.


Apple calls it Mac OS X version 10.5.

There is little consistency in how Apple names their OSs, so there is no 
way to come up with a version identifier for it that is completely 
consistent.




Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-15 Thread Lars Ivar Igesund
Walter Bright wrote:

 Lars Ivar Igesund wrote:
 Walter Bright wrote:
 
 Now works for FreeBSD 7.1!
 
 Nice!
 
 But is there a particularly good reason for disregarding version
 identifiers already established by gdc and ldc?
 
 freebsd vs FreeBSD, darwin vs OSX
 
 FreeBSD is how it is normally written in the official FreeBSD
 literature, such as : http://www.freebsd.org/
 
 Also, gcc on FreeBSD predefines __FreeBSD__
 
 Clearly, FreeBSD is the term preferred by the FreeBSD community.
 
 The Mac OSX documentation does not refer to it as darwin, it normally
 refers to it as OSX. You have to work hard to find any references to
 darwin on the Apple web site. Nevertheless, darwin is predefined for
 legacy compatibility on the Mac dmd compiler.
 
 I was concerned that people would see darwin support and wonder what
 that is. OSX is an order of magnitude better known and associated with
 Apple. Macs are not called darwins. I suspect we'd get real tired of
 saying yes, darwin really means OSX.
 
 (As an aside, back in the 80's the ubiquitous and famous Wordstar
 program was produced by Micropro. Nobody could ever remember the company
 name. After many years of people assuming that Wordstar was made by
 Wordstar Inc. and fruitlessly trying to find Wordstar Inc., Micropro
 finally wised up and changed their name to Wordstar Inc.
 
 Also, note that most bands put out their first CD as a self-titled one.)

I don't mind your conventions if DMD had pioneered these platforms, but it 
did not.

FreeBSD breaks existing code, and so will OSX whenever darwin is removed. 
Now a developer already active on those platform is forced to somehow make 
sure both identifiers are in place until some unknown point in the future.

Since the version identifiers have been established in GDC a very long time 
ago, and they do follow an acceptable convention, I find it very unnecessary 
to change that.

As for the darwin vs OSX issue, what I heard is that darwin is technically 
the more correct one as it is with linux vs Ubuntu, Suse, etc.

-- 
Lars Ivar Igesund
blog at http://larsivi.net
DSource, #d.tango  #D: larsivi
Dancing the Tango



Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-15 Thread Anders F Björklund

Lars Ivar Igesund wrote:

FreeBSD breaks existing code, and so will OSX whenever darwin is removed. 
Now a developer already active on those platform is forced to somehow make 
sure both identifiers are in place until some unknown point in the future.


Since the version identifiers have been established in GDC a very long time 
ago, and they do follow an acceptable convention, I find it very unnecessary 
to change that.


One *could* argue the same thing about the introduced Posix identifier,
versus the already established Unix so I'm not sure it's entirelly fair
to bash DMD doing the same thing as Tango had already done before it...

http://www.prowiki.at/wiki4d/wiki.cgi?DocComments/Version (from 2005)

Back in the day it made sense to have the Windows and Unix versions,
and then the specific linux/darwin/freebsd/cygwin/solaris/skyos/etc OS.
If starting over, then I suppose Posix and OSX and FreeBSD work too.

--anders


Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-15 Thread Jordan Miner
Walter Bright Wrote:

 Because gcc on linux predefines linux, not Linux.

Please change the version identifier from linux to Linux.

D is a chance to fix stuff wrong or inconsistent in other languages. C 
compilers may use inconsistent naming like __APPLE__, __MACH__, __linux, 
_WIN32, _WIN64, __FreeBSD__, etc. Why not take the opportunity to fix the 
inconsistency in addition to all the other improvements D has?

The argument that it should be linux because of gcc does not apply to those who 
come from other languages. If someone is learning D after only knowing Java or 
C#, and they want to use versioning, linux is harder to remember for them. I 
don't care how gcc does it. I've never really used gcc. (Might even be harder 
to remember for people who used C a lot.) Is it more important to be consistent 
with gcc or with other D identifiers?

Plus, how many people want it to be linux instead of Linux? From what I've 
seen, it seems the majority would prefer it being Linux.



Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-14 Thread Lars Ivar Igesund
Walter Bright wrote:

 Now works for FreeBSD 7.1!

Nice!

But is there a particularly good reason for disregarding version identifiers 
already established by gdc and ldc?

freebsd vs FreeBSD, darwin vs OSX

-- 
Lars Ivar Igesund
blog at http://larsivi.net
DSource, #d.tango  #D: larsivi
Dancing the Tango



Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-14 Thread Tomas Lindquist Olsen
On Tue, Apr 14, 2009 at 7:29 PM, Lars Ivar Igesund larsi...@igesund.net wrote:
 Walter Bright wrote:

 Now works for FreeBSD 7.1!

 Nice!

 But is there a particularly good reason for disregarding version identifiers
 already established by gdc and ldc?

 freebsd vs FreeBSD, darwin vs OSX


And if not, why is there no Linux ? This is the obvious reason for
GDC/LDC pick the lowercase identifiers in the first place ...


Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-14 Thread Walter Bright

Tomas Lindquist Olsen wrote:

And if not, why is there no Linux ? This is the obvious reason for
GDC/LDC pick the lowercase identifiers in the first place ...


Because gcc on linux predefines linux, not Linux.


Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-14 Thread Tomas Lindquist Olsen
On Tue, Apr 14, 2009 at 9:49 PM, Walter Bright
newshou...@digitalmars.com wrote:
 Tomas Lindquist Olsen wrote:

 And if not, why is there no Linux ? This is the obvious reason for
 GDC/LDC pick the lowercase identifiers in the first place ...

 Because gcc on linux predefines linux, not Linux.


It seems somewhat arbitrary, but fair enough..


Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-14 Thread Jacob Carlborg

Walter Bright wrote:

Tomas Lindquist Olsen wrote:

And if not, why is there no Linux ? This is the obvious reason for
GDC/LDC pick the lowercase identifiers in the first place ...


Because gcc on linux predefines linux, not Linux.


I wouldn't consider this consistent, some version identifiers are named 
   after how it's written in the literature and some after what gcc 
predefines.


Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-14 Thread Jacob Carlborg

Walter Bright wrote:

Lars Ivar Igesund wrote:

Walter Bright wrote:


Now works for FreeBSD 7.1!


Nice!

But is there a particularly good reason for disregarding version 
identifiers already established by gdc and ldc?


freebsd vs FreeBSD, darwin vs OSX


FreeBSD is how it is normally written in the official FreeBSD 
literature, such as : http://www.freebsd.org/


If you follow what's normally written in the official literature and 
documentation shouldn't it be MacOSX then?



Also, gcc on FreeBSD predefines __FreeBSD__

Clearly, FreeBSD is the term preferred by the FreeBSD community.

The Mac OSX documentation does not refer to it as darwin, it normally 
refers to it as OSX. You have to work hard to find any references to 
darwin on the Apple web site. Nevertheless, darwin is predefined for 
legacy compatibility on the Mac dmd compiler.


It depends on what documentation you read. 
http://developer.apple.com/documentation/Darwin/index.html

In this documentation Darwin is all over the place.

I was concerned that people would see darwin support and wonder what 
that is. OSX is an order of magnitude better known and associated with 
Apple. Macs are not called darwins. I suspect we'd get real tired of 
saying yes, darwin really means OSX.


(As an aside, back in the 80's the ubiquitous and famous Wordstar 
program was produced by Micropro. Nobody could ever remember the company 
name. After many years of people assuming that Wordstar was made by 
Wordstar Inc. and fruitlessly trying to find Wordstar Inc., Micropro 
finally wised up and changed their name to Wordstar Inc.


Also, note that most bands put out their first CD as a self-titled one.)



And can't we just have all the version identifiers in lowercase.


Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-14 Thread Walter Bright

Tomas Lindquist Olsen wrote:

On Tue, Apr 14, 2009 at 9:49 PM, Walter Bright
newshou...@digitalmars.com wrote:

Tomas Lindquist Olsen wrote:

And if not, why is there no Linux ? This is the obvious reason for
GDC/LDC pick the lowercase identifiers in the first place ...

Because gcc on linux predefines linux, not Linux.



It seems somewhat arbitrary, but fair enough..


It's just one less thing to remember when switching between C and D.


Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-14 Thread Walter Bright

Jacob Carlborg wrote:
It depends on what documentation you read. 
http://developer.apple.com/documentation/Darwin/index.html

In this documentation Darwin is all over the place.


Move up a directory, and it's OSX, OSX, OSX.


Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-14 Thread Walter Bright

Jacob Carlborg wrote:
If you follow what's normally written in the official literature and 
documentation shouldn't it be MacOSX then?


Perhaps. One could argue it either way. I checked the predefined 
identifiers in gcc for guidance, and found just the unfortunately 
generic __APPLE__. I wish Apple would make up their mind what they 
wanted to call their OS.


Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-14 Thread Robert Fraser

Walter Bright wrote:

Also, note that most bands put out their first CD as a self-titled one.


In my collection (admittedly a small sample; 90 bands), only 6/13 
self-titled albums are first albums.


Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-14 Thread Walter Bright

Christopher Wright wrote:

Walter Bright wrote:

Tomas Lindquist Olsen wrote:

And if not, why is there no Linux ? This is the obvious reason for
GDC/LDC pick the lowercase identifiers in the first place ...


Because gcc on linux predefines linux, not Linux.


Why not define both variants?


Pointless clutter, and the inevitable time-wasting which one should I use?


Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-14 Thread Walter Bright

Robert Fraser wrote:

Walter Bright wrote:

Also, note that most bands put out their first CD as a self-titled one.


In my collection (admittedly a small sample; 90 bands), only 6/13 
self-titled albums are first albums.


I salute you, sir, for actually doing some research on this important 
topic! g


Of course, the greatest band evar, Led Zeppelin, self-titled their first 
3 albums. Chicago self-titled practically every one of their albums, and 
is second only to the Beach Boys as the most successful American rock 
band of all time, in terms of both albums and singles according to Amazon.


Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-14 Thread Tomas Lindquist Olsen
On Tue, Apr 14, 2009 at 11:51 PM, Walter Bright
newshou...@digitalmars.com wrote:
 Tomas Lindquist Olsen wrote:

 On Tue, Apr 14, 2009 at 9:49 PM, Walter Bright
 newshou...@digitalmars.com wrote:

 Tomas Lindquist Olsen wrote:

 And if not, why is there no Linux ? This is the obvious reason for
 GDC/LDC pick the lowercase identifiers in the first place ...

 Because gcc on linux predefines linux, not Linux.


 It seems somewhat arbitrary, but fair enough..

 It's just one less thing to remember when switching between C and D.


After reading more, I just can't help but feel this is wrong.

linux is still the only version identifier following this logic.

Comparing http://predef.sourceforge.net/preos.html and D:

linux - linux
_WIN32 - Win32
_WIN64 - Win64
__FreeBSD__ - FreeBSD
__APPLE__ or __MACH__ - OSX

Even if you strip underscores, OSX and Win32/64 still don't match
C/C++ identifiers. Why should linux be special?

I realise this is a minor thing probably not worth the time it gets,
but D seems to have a tendency to throw in inconsistencies in every
crack there is to find ...


Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-14 Thread Walter Bright

Tomas Lindquist Olsen wrote:

After reading more, I just can't help but feel this is wrong.

linux is still the only version identifier following this logic.

Comparing http://predef.sourceforge.net/preos.html and D:

linux - linux
_WIN32 - Win32
_WIN64 - Win64


Microsoft predefines _WIN32 for Windows 64, too!
D:
   Windows: All members of the Windows family
   Win32: specific to Windows 32
   Win64: specific to Windows 64
That seems sensible to me.


__FreeBSD__ - FreeBSD


The __ are ugly but necessary because of the C standard, but they are 
ugly and *unnecessary* for D.



__APPLE__ or __MACH__ - OSX


Apple has made many operating systems besides OSX, so __APPLE__ is out. 
I can't even remember which OS Mach is.



Even if you strip underscores, OSX and Win32/64 still don't match
C/C++ identifiers. Why should linux be special?


Because the gcc macro suits the need perfectly. The others don't.


I realise this is a minor thing probably not worth the time it gets,
but D seems to have a tendency to throw in inconsistencies in every
crack there is to find ...


If gcc had any consistency, I'd use that. But it doesn't. It makes sense 
to use gcc's precedent when gcc makes sense, and to diverge when gcc 
does not make sense.


Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-14 Thread Steven Schveighoffer
On Tue, 14 Apr 2009 15:49:02 -0400, Walter Bright  
newshou...@digitalmars.com wrote:



Tomas Lindquist Olsen wrote:

And if not, why is there no Linux ? This is the obvious reason for
GDC/LDC pick the lowercase identifiers in the first place ...


Because gcc on linux predefines linux, not Linux.


Just so you know this argument is flawed.  Although you are in your right  
to select the identifier, you have based it on invalid logic.


First, nobody can directly compile C code under D, especially with  
preprocessor logic.  So right there, you already must change the code.


Now, since you must change the code (and most places that are cross  
platform don't have simple #ifdef __linux, so global search/replace is no  
good), you have plenty of opportunity to change the identifier from  
__linux or linux to Linux.


Next, you are inconsistent with other platforms.  Windows Defines _WIN32,  
yet you use Win32, shouldn't you use WIN32 to be consistent with  
capitalization?  You are selectively applying reasoning to justify  
inconsistent naming techniques.


Just say Because I'm Walter and I said so and call it a day, or change  
it to the way it should be.  Take the identifier name from where you want,  
but make the capitalization consistent.  We have no legacy requirements  
here (read: D compiler does not have to compile C preprocessor code, I  
know there's lots of D code with version(linux) already, but now is the  
time to make a change, not later), and to make things not follow a  
consistent capitalization scheme makes it look like an error in the code.


version(FreeBSD) version=v1;
version(OSX) version=v2;
version(Win32) version=v3;
version(linux) version=v4; // huh?  oh, the author must have made a  
capitalization error.


If you need another reason, linux looks like 1inux in some fonts ;)

BTW, when I started writing D code for multi-platform, I instinctively  
used version(Linux), but found out that was wrong by trial and error.


-Steve


Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-14 Thread Michel Fortin

On 2009-04-14 17:56:51 -0400, Walter Bright newshou...@digitalmars.com said:


Jacob Carlborg wrote:
If you follow what's normally written in the official literature and 
documentation shouldn't it be MacOSX then?


Perhaps. One could argue it either way. I checked the predefined 
identifiers in gcc for guidance, and found just the unfortunately 
generic __APPLE__. I wish Apple would make up their mind what they 
wanted to call their OS.


To me it's clear that Darwin is the core on which Mac OS X and iPhone 
OS are based on. Mac OS X looks like a marketing name to me; I wouldn't 
be surprised if in a few years it gets renamed to Mac OS XI, or 
something else, because Mac OS X 10.10 would sound bad, just as would 
Mac OS X 11. Perhaps we'll see Mac OS 11, iOS or something; whatever 
the change, the X part will have to move out at some point.


I believe Darwin is a more stable identifier for the architecture than 
Mac OS X. But I also agree with Walter that it's probably not something 
a newbie to programming and/or the platform would expect. In the end, I 
think I'd choose Darwin because you want the identifier to represent 
the OS architecture, not all the higher-level features Apple has 
layered on top of it, and because most people interested in writing 
cross-patform code using Darwin/OSX-specific features will already know 
about Darwin.


--
Michel Fortin
michel.for...@michelf.com
http://michelf.com/



Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-14 Thread Moritz Warning
On Tue, 14 Apr 2009 12:49:02 -0700, Walter Bright wrote:

 Tomas Lindquist Olsen wrote:
 And if not, why is there no Linux ? This is the obvious reason for
 GDC/LDC pick the lowercase identifiers in the first place ...
 
 Because gcc on linux predefines linux, not Linux.

The way gcc does it looks like a historic legacy to me.
Ported code is ported - no reasonable programmer will just remove __
and go for it.
Let's focus on practical means and consistency.


Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-14 Thread Daniel Keep


Walter Bright wrote:
 cemiller wrote:
 How about just making version and debug identifiers case-insensitive?
 Aren't they already in their own special namespace; they're
 special-case (pun intended).
 
 Because then I have to explain why some identifiers are case sensitive
 and some or not for the next few decades. g

Currently, you'll have to explain why one identifier is lowercase while
the others are mixed case for the next few decades.

I thought one of the big strengths of D was dropping compatibility where
it made sense and improved things.  No one is going to be copy+pasting C
code into D complete with #ifdef's and expecting it to work.

Aside from that, which of the following is easier to explain to programmers?

Platform version identifiers are mixed case and named for the consumer
name of the platform.  API version identifiers follow the same rule.

Platform version identifiers may be any case and are sometimes named
after the identifier used in that platform's C compiler, possibly
changed to remove underscores, unless we didn't like that identifier in
which case we might be using another one.  This made up one could be the
name of the platform, the name of the OS, or something else.

  -- Daniel


Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-09 Thread zxp

Walter Bright 写道:

Now works for FreeBSD 7.1!

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

The D2 version for FreeBSD isn't ready yet. Lots of library work to be 
done.


That's great! Thanks, Sir!

Maybe it's because of the DMD is packed with zip. After unzipped, it 
must run


chmod +x dmd/freebsd/bin/dmd

to make dmd working.


Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-07 Thread Walter Bright

Tim Matthews wrote:

I use 64 bit freebsd too but thanks anyway.


I suspect most FreeBSD users are using 64 bits.


Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-07 Thread Anders Bergh
Now that there's four platforms supported it would be quite nice with
separate archives for each. .tar.gz for Linux, FreeBSD and OS X...
.zip for Windows.

2009/4/6 Walter Bright newshou...@digitalmars.com:
 Now works for FreeBSD 7.1!

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

 The D2 version for FreeBSD isn't ready yet. Lots of library work to be done.




-- 
Anders Bergh


Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-07 Thread Walter Bright

Tim Matthews wrote:

On Tue, 07 Apr 2009 01:53:35 -0700
Walter Bright newshou...@digitalmars.com wrote:
 

I suspect most FreeBSD users are using 64 bits.


There is a lot using 32bit if they need hardware accelerated nvidia
graphics but yes the majority is probably using 64 bit.

I tried compiling tango yesterday (with 'make runtime' from the ldc
directory) and it would fail even after I'd applied all the not yet
commited patches. It may build other ways but have not yet tried.

Is there any known issues or not yet tested features of either dmd or
phobos 1 on freebsd?


No, there are no known issues. It passes the dmd test suite 100% as well 
as all the library unit tests. If you can isolate any of these down to 
dmd/phobos and post them to bugzilla, I would appreciate it as it will 
not only improve the FreeBSD port but will improve the test suite to aid 
in the rest of dmd development.


Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-06 Thread grauzone

Yay!

But every time you give, we demand more. Where's dmd for 64 bit platforms?


Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-06 Thread dsimcha
== Quote from grauzone (n...@example.net)'s article
 Yay!
 But every time you give, we demand more. Where's dmd for 64 bit platforms?

I assume a 64-bit port would be significantly harder than the Mac or FreeBSD 
ports
because it would require writing a whole new codegen, or at least heavily
modifying the existing one.


Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-06 Thread Ellery Newcomer

Walter Bright wrote:

Now works for FreeBSD 7.1!

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

The D2 version for FreeBSD isn't ready yet. Lots of library work to be 
done.


awesome!


Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-06 Thread Tim Matthews
On Mon, 06 Apr 2009 12:07:38 +0200
grauzone n...@example.net wrote:

 Yay!
 
 But every time you give, we demand more. Where's dmd for 64 bit
 platforms?

I use 64 bit freebsd too but thanks anyway.