August 11, 2005
In article <ddg86l$rjd$1@digitaldaemon.com>, =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= says...
>
>Oh, so Ares picked "Posix" ? That's too bad, since GDC has "Unix".

I just checked, and I use both "Posix" and "linux" in the headers.  I would change "Posix" to "Unix" if that's the accepted identifier.  And it looks like some of the version blocks may need to be restructured anyway, as there are a bunch of places in "linux" blocks that should probably be Posix/Unix.  Next on my list was to revisit the threading code, so I'll need to be messing with the Posix/Unix headers soon anyway.

>And yes there are a couple of places when version(linux) and version(darwin) et. al. are still needed, like where there are actual differences between the platforms. But for the user code, most of the time it's enough to differ between Windows and Unix.
>
>It would be nice if those two could be kept to a minimum as well, but then again D isn't Java and doesn't invent a "virtual" target.

If we target library names (for data strucutres like pthread_t) then there should be few if any version blocks which need to target a specific OS--really just the stuff in sys.whatever, to use the suggested layout.


Sean


August 12, 2005
Sean Kelly wrote:

> I just checked, and I use both "Posix" and "linux" in the headers.  I would
> change "Posix" to "Unix" if that's the accepted identifier. 

I don't think there ever was any universally accepted identifier (consensus), but version(Unix) is pre-defined in the GDC compiler.

I think Mango uses version(Posix) as well and that Build defines it.
version(linux) is also available, but only on the Linux platforms.


http://www.digitalmars.com/d/version.html still ignores the issue.
(see http://www.prowiki.org/wiki4d/wiki.cgi?DocComments/Version)

--anders
August 12, 2005
In article <ddhtk8$ne$1@digitaldaemon.com>, =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= says...
>
>Sean Kelly wrote:
>
>> I just checked, and I use both "Posix" and "linux" in the headers.  I would change "Posix" to "Unix" if that's the accepted identifier.
>
>I don't think there ever was any universally accepted identifier (consensus), but version(Unix) is pre-defined in the GDC compiler.
>
>I think Mango uses version(Posix) as well and that Build defines it.
>version(linux) is also available, but only on the Linux platforms.

I've given it some thought, and I'm going to keep 'Posix' as it's the name of the API rather than a class of operating systems.  Switching to 'Unix' would imply to me that the files should be in sys.unix rather than std.c.unix, and I think this stuff belongs in std.c.  I'll add 'Posix' as a version identifier in the makefiles.  Also, I'm cleaning up the headers (and moving some stuff from std.c.signal to std.c.posix.signal in the process).


Sean


August 13, 2005
Sean Kelly wrote:
> 
> I've given it some thought, and I'm going to keep 'Posix' as it's the name of
> the API rather than a class of operating systems.  Switching to 'Unix' would
> imply to me that the files should be in sys.unix rather than std.c.unix, and I
> think this stuff belongs in std.c.  I'll add 'Posix' as a version identifier in
> the makefiles.  Also, I'm cleaning up the headers (and moving some stuff from
> std.c.signal to std.c.posix.signal in the process).

Posix is the name of older APIs, of which there are a number of versions. I did at first name that section myself after posix, but after looking into it more at http://www.unix.org/ I felt unix was more appropriate as the Single Unix Specification v3 is the latest standard.

Quote from http://www.unix.org/what_is_unix.html:

"Today, the definition of UNIX ® takes the form of the worldwide Single UNIX Specification integrating X/Open Company's XPG4, IEEE's POSIX Standards and ISO C. Through continual evolution, the Single UNIX Specification is the defacto and dejure standard definition for the UNIX system application programming interfaces."

I also found that the documentation for older IEEE POSIX standard was very expensive to purchase. So if D was to correctly implement POSIX interfaces someone would need that documentation. Whereas the Single Unix Specification is freely available from http://www.unix.org/ .
August 13, 2005
Alan West wrote:
> Actually Darwin was first on my list... OK, I'll write that awesome h2d tool then so we can create the bindings with ease.

Since that statement, I've nearly completed D language output support in The Ragel State Machine Compiler (http://www.elude.ca/ragel/), the maintainer of that project has agreed to include it as a standard part of the project.

I hope to use this to aid in creating that awesome h2d tool.

It could also help produce a tool for generating D specific source documentation in XML maybe even XMI for output via XSLT in any format.
August 13, 2005
Anders F Björklund wrote:

> I'm all for improvements, just hope that D will be released ever. :-P
> 
> So my thoughts were based on what is currently available or at
> least with minor tweaks, didn't mean to hold back any speculative
> discussion on what could happen in the future or by re-writing...
> 
> As usual around here, any major changes will be up to Walter anyway.

Yeah I had heard of D and read over the specification quite a few years ago when it was Windows only. Walter's Linux port didn't really grab me because there are still many other systems and architectures out there.

Then recently I discovered David Friedman's D front end for GCC, which did grab me.

I'm now in a position to devote about 20 solid hours a week on helping to standardize the D library for many platforms. Though first, I want to automate as much of that task as possible with tools written in D.
August 13, 2005
Alan West wrote:
> Sean Kelly wrote:
> 
>>
>> I've given it some thought, and I'm going to keep 'Posix' as it's the name of
>> the API rather than a class of operating systems.  Switching to 'Unix' would
>> imply to me that the files should be in sys.unix rather than std.c.unix, and I
>> think this stuff belongs in std.c.  I'll add 'Posix' as a version identifier in
>> the makefiles.  Also, I'm cleaning up the headers (and moving some stuff from
>> std.c.signal to std.c.posix.signal in the process).
> 
> 
> Posix is the name of older APIs, of which there are a number of versions. I did at first name that section myself after posix, but after looking into it more at http://www.unix.org/ I felt unix was more appropriate as the Single Unix Specification v3 is the latest standard.
> 
> Quote from http://www.unix.org/what_is_unix.html:
> 
> "Today, the definition of UNIX ® takes the form of the worldwide Single UNIX Specification integrating X/Open Company's XPG4, IEEE's POSIX Standards and ISO C. Through continual evolution, the Single UNIX Specification is the defacto and dejure standard definition for the UNIX system application programming interfaces."
> 
> I also found that the documentation for older IEEE POSIX standard was very expensive to purchase. So if D was to correctly implement POSIX interfaces someone would need that documentation. Whereas the Single Unix Specification is freely available from http://www.unix.org/ .


I have to admit: your evidence is convincing.  I was originally convinced that "Posix" was the way to go.  But perhaps "Unix" is the safer bet afterall.

-JJR
1 2
Next ›   Last »