February 11, 2009
BCS wrote:
> Reply to Walter,
> 
>> Leandro Lucarella wrote:
>>
>>> You should probably distribute meld with DMD then ;)
>>>
>> sudo apt-get install meld
>>
>> isn't that hard <g>.
>>
> 
> doesn't work unless you have apt-get working, doesn't work unless you have a net connection, doesn't work if you don't have root... OTOH a tarball doesn't work on any other platform, but then again nether does DMD.
> 
> 

You can't download dmd.zip without a net connection, either!
February 11, 2009
Jason House wrote:
> Walter Bright Wrote:
> 
>> Jason House wrote:
>>> Would you be willing to introduce an alternative to /+ +/ which
>>> would be treated differently by the D1 and D2 compilers? Here are
>>> some examples with no attempt at creativity: beginD1 endD1 D1 D1
>>> (works like string delimiters) /D2 D2/
>> That is an interesting idea. I never thought of that.
> 
> 
> Would you be willing to add it as a new feature to both D1 and D2?
> 
> I wonder how viable having one code base would be at that point?
> Would druntime be a good way to test that? Druntime would be a good
> guinea pig. I'd really hope a smooth transition for druntime would be
> enough to inspire more projects to support D1and D2 with a single
> code base.

I don't see druntime supporting D1, it's pretty in bed with D2 features.
February 12, 2009
Hello Walter,

> BCS wrote:
> 
>> Reply to Walter,
>> 
>>> Leandro Lucarella wrote:
>>> 
>>>> You should probably distribute meld with DMD then ;)
>>>> 
>>> sudo apt-get install meld
>>> 
>>> isn't that hard <g>.
>>> 
>> doesn't work unless you have apt-get working, doesn't work unless you
>> have a net connection, doesn't work if you don't have root... OTOH a
>> tarball doesn't work on any other platform, but then again nether
>> does DMD.
>> 
> You can't download dmd.zip without a net connection, either!
> 

last I checked you cant use apt-get over sneeker net.


February 12, 2009
Jarrett Billingsley wrote:
> On Wed, Feb 11, 2009 at 4:11 PM, Bill Baxter <wbaxter@gmail.com> wrote:
>> I thought he meant this:
>>
>> // once at the top
>> version(SomeFeatureDisabled) {
>> } else { version = SomeFeature; }
>>
>> // in rest of code ...
>> version (SomeFeature)
>> {
>>    codeForFeature();
>> }
> 
> I don't know whether or not Walter _was_ actually insinuating that but
> it's a pretty good idea ;)  the only disadvantage of course being that
> I have to copy the //once at the top part into every file that wants
> to use the SomeFeature version, though that probably
> wouldn't/shouldn't be a big issue in practice.

I had the same thought at first when reading the 'version declarations' proposal elsewhere in this thread, and was going to put forth having to write 'version Tango = extern;' at the top of modules as an example of what could be bad about it... but then it occurred to me how often I've ever had to use version(Tango) in the first place.  (Not very often at all.)

It would be the sort of thing you use just here and there, and is actually self-documenting in the process, as it makes it clear that /this/ module is going to fork on certain versions.  Despite reservations, its all growing on me.

-- Chris Nicholson-Sauls
February 12, 2009
BCS wrote:
> Hello Walter,
> 
>> BCS wrote:
>>
>>> Reply to Walter,
>>>
>>>> Leandro Lucarella wrote:
>>>>
>>>>> You should probably distribute meld with DMD then ;)
>>>>>
>>>> sudo apt-get install meld
>>>>
>>>> isn't that hard <g>.
>>>>
>>> doesn't work unless you have apt-get working, doesn't work unless you
>>> have a net connection, doesn't work if you don't have root... OTOH a
>>> tarball doesn't work on any other platform, but then again nether
>>> does DMD.
>>>
>> You can't download dmd.zip without a net connection, either!
>>
> 
> last I checked you cant use apt-get over sneeker net.
> 
> 

I believe 'apt-get install' actually will work so long as the sources/.deb are in the right location.  That said, I haven't ever tried it.  ;)  If nothing else, you should be able to use dpkg.

Lucky Gentoo users can use emerge directly.

-- Chris Nicholson-Sauls
February 12, 2009

BCS wrote:
> Hello Walter,
> 
>> BCS wrote:
>>
>>> Reply to Walter,
>>>
>>>> Leandro Lucarella wrote:
>>>>
>>>>> You should probably distribute meld with DMD then ;)
>>>>>
>>>> sudo apt-get install meld
>>>>
>>>> isn't that hard <g>.
>>>>
>>> doesn't work unless you have apt-get working, doesn't work unless you have a net connection, doesn't work if you don't have root... OTOH a tarball doesn't work on any other platform, but then again nether does DMD.
>>>
>> You can't download dmd.zip without a net connection, either!
>>
> 
> last I checked you cant use apt-get over sneeker net.

`wget $URL_OF_PACKAGE` to download it, and (I believe; it's been a while since I did this...) `dpkg -i $PACKAGE_FILE` to install it.

That, or you can apt-get on one machine, look at what it downloads and installs, and copy the cached .debs to another machine.  :)

  -- Daniel
February 12, 2009
== Quote from Walter Bright (newshound1@digitalmars.com)'s article
> Jason House wrote:
> > Walter Bright Wrote:
> >
> >> Jason House wrote:
> >>> Would you be willing to introduce an alternative to /+ +/ which would be treated differently by the D1 and D2 compilers? Here are some examples with no attempt at creativity: beginD1 endD1 D1 D1 (works like string delimiters) /D2 D2/
> >> That is an interesting idea. I never thought of that.
> >
> >
> > Would you be willing to add it as a new feature to both D1 and D2?
> >
> > I wonder how viable having one code base would be at that point? Would druntime be a good way to test that? Druntime would be a good guinea pig. I'd really hope a smooth transition for druntime would be enough to inspire more projects to support D1and D2 with a single code base.
> I don't see druntime supporting D1, it's pretty in bed with D2 features.

There's a druntime branch that is compatible with D1.  I created it mostly in case the Tango folks wanted to build off it, but that never happened and I've gotten a bit lazy about keeping it up to date.

As you say however, as time goes on, the D1 branch will become increasingly difficult to keep in sync with the D2 version, since most new features will not be supported by the D1 compiler.  I'm going to try and keep the branch operational for anyone who cares, but don't plan to add any new features to it since most of the new stuff requires D2 anyway.


Sean
February 12, 2009
Walter Bright wrote:

>> OSX is the new name for Apple's OSes: Mac OS X and iPhone OS.
>>
>> And of course DMD can use anything, but GDC uses darwin/Unix.
> 
> Apple can't seem to make up their mind. uname does return "Darwin". gcc predefines "__MACH__" and "__APPLE__", but neither darwin nor osx. The documentation all says osx.

Will you set version(darwin) though, or would that be "version(osx)" ?

The existing D code for Mac OS X all uses version(darwin) from before.

--anders
February 12, 2009
Anders F Björklund wrote:
> Walter Bright wrote:
> 
>>> OSX is the new name for Apple's OSes: Mac OS X and iPhone OS.
>>>
>>> And of course DMD can use anything, but GDC uses darwin/Unix.
>>
>> Apple can't seem to make up their mind. uname does return "Darwin". gcc predefines "__MACH__" and "__APPLE__", but neither darwin nor osx. The documentation all says osx.
> 
> Will you set version(darwin) though, or would that be "version(osx)" ?
> 
> The existing D code for Mac OS X all uses version(darwin) from before.

version(OSX)

I just don't think darwin is a good idea, as Apple doesn't even use it. See http://developer.apple.com/unix/index.html, where "darwin" is clearly second string. It looks like Apple is pushing aside "darwin" in favor of "OSX".

Fortunately, (darwin) => (OSX) is a trivial global search/replace.
February 12, 2009
Walter Bright wrote:

> Fortunately, (darwin) => (OSX) is a trivial global search/replace.

That breaks GDC and LDC compatibility, unfortunately...

So it'll be something like the Unix vs. Posix sitation.
(where GDC pre-defines Unix and LDC pre-defines Posix)

Maybe version(DigitalMars) version(OSX) version=darwin;

--anders