February 12, 2013
On Tue, 12 Feb 2013 02:47:17 -0500
Nick Sabalausky <bus_dmdbeta@semitwist.com> wrote:

> On Sun, 10 Feb 2013 16:32:43 -0800
> Walter Bright <walter@digitalmars.com> wrote:
> 
> > 
> > On 2/10/2013 4:18 PM, Andrei Alexandrescu wrote:
> > > On 2/10/13 2:37 PM, Walter Bright wrote:
> > >> These things make me nervous - they are complex and when they go wrong it can be baffling. Is it really a problem to have the user simply edit the file to match his system?
> > >
> > > Not sure how complex the script is, but generally asking users to edit makefiles to match does not scale well at all. IMHO there's a sort of goodness hierarchy when it comes to scripting:
> > >
> > > 1. one command that does everything, e.g. "./world" or "make world"
> > >
> > > 10. one command with arguments, and the exact arguments depend on the system, e.g. "make DMD_HOME=/usr/bin/dmd MODEL=64"
> > >
> > > 100. asking the user to edit configuration files by hand in order to get things done
> > >
> > > 1000. manual with a recipe with steps for getting things done
> > >
> > > 10000. folklore on how to get things done
> > >
> > > There's a big drop in automation from one level to the next, and in particular there's a surprising drop from the command to the command with specific parameters.
> > 
> > 
> > The general difficulty is one I've had with MS tools from the 1980's: they change in unpredictable ways from release to release, and a *lot* of time gets wasted trying to deal with multiple versions and the endless calls for help about it not working with some random new version. We see this in a smaller way with the evolution of Apple's OSX tools - it's constant breakage. Linux tends to be pretty stable from year to year.
> > 
> > Instead of being terribly clever about it, having a simple edittable file is at least easier to support.
> 
> Having a simple editable file is great to have as a backup in case things do go wrong or someone wants to do something manually, but that shouldn't preclude making sure things normally "just work" when they can reasonably be made to do so.
> 
> People expect anything automatable to be automated. Manual configuration is sooo "90's linux".

I'll put it another way. We have two options:

A. Make Win64 work out-of-the-box for the vast majority of people. A rare handful might occasionally need manual editing.

B. (The current state) Make Win64 NOT work out-of-the-box for large numbers of people. Force many, many more people to do manual editing.

I can't imagine why B would ever be deliberately chosen as a better, preferable idea.

I can understand it not getting into this release, but objecting to the
whole idea of "let's NOT make so many people edit conf files to make
Win64 work" is just plain silly.
_______________________________________________
dmd-beta mailing list
dmd-beta@puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-beta

February 12, 2013
On 10.02.2013 23:46, Walter Bright wrote:
>
> On 2/10/2013 12:51 PM, Rainer Schuetze wrote:
>>
>> My suggestion is trying to make it work out of the box for most
>> installations while removing version specific code from the compiler
>> itself.
>>
>
> I can agree with that. I'm not so sure that should go into this release.
> I also suspect we are reinventing JSON files badly with dmd.conf. Maybe
> dmd.conf should be redone as a json file.

I think it's ok not to modify the configuration file format in this release (as long as it is addressed in the next). It would be good to change the installer to use a separate library folder lib64 and to use the [Environment64] section in the default sc.ini.

Format of the ini file is an unrelated issue. I guess Windows users are more familiar with ini files than with JSON, which adds syntactical noise for features that are currently unused. Being standardized it's also more problematic to modify the format with functionality like the proposed "?=" to set a value only if it isn't set in the environment yet (though other syntax might be invented like prepending a "%@no_overwrite%" to the value).

_______________________________________________
dmd-beta mailing list
dmd-beta@puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-beta

February 12, 2013
On 2/12/2013 12:27 AM, Rainer Schuetze wrote:
>
> Format of the ini file is an unrelated issue. I guess Windows users are more familiar with ini files than with JSON, which adds syntactical noise for features that are currently unused. Being standardized it's also more problematic to modify the format with functionality like the proposed "?=" to set a value only if it isn't set in the environment yet (though other syntax might be invented like prepending a "%@no_overwrite%" to the value).

I don't think it is problematic, it's just a different way of thinking. The current .ini files override environment variables. You proposed a method of providing a 'default' setting. In json,

{
    "Environment": { "override" : { "name" : "value",
                                                          "baz" : "foo" },
                                  "default" : { "foo" : "bar" }
                                }
}

or something similar. For backwards compatibility, the old .ini format can still be recognized. The nice thing about json is we can add features without changing the file format.
_______________________________________________
dmd-beta mailing list
dmd-beta@puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-beta

February 12, 2013
On 2/11/2013 11:58 PM, Nick Sabalausky wrote:
>
> I'll put it another way. We have two options:
>
> A. Make Win64 work out-of-the-box for the vast majority of people.
> A rare handful might occasionally need manual editing.
>
> B. (The current state) Make Win64 NOT work out-of-the-box for large
> numbers of people. Force many, many more people to do manual editing.
>
> I can't imagine why B would ever be deliberately chosen as a better,
> preferable idea.
>
> I can understand it not getting into this release, but objecting to the
> whole idea of "let's NOT make so many people edit conf files to make
> Win64 work" is just plain silly.
> _______________________________________________
>

You make a good argument. I propose we leave it as is for this release, and redesign this for the next one.
_______________________________________________
dmd-beta mailing list
dmd-beta@puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-beta

February 13, 2013
New beta posted.

On 2/8/2013 12:30 AM, Walter Bright wrote:
> http://ftp.digitalmars.com/dmd2beta.zip

_______________________________________________
dmd-beta mailing list
dmd-beta@puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-beta

February 13, 2013
Walter Bright, el 12 de February a las 12:45 me escribiste:
> 
> On 2/12/2013 12:27 AM, Rainer Schuetze wrote:
> >
> >Format of the ini file is an unrelated issue. I guess Windows users are more familiar with ini files than with JSON, which adds syntactical noise for features that are currently unused. Being standardized it's also more problematic to modify the format with functionality like the proposed "?=" to set a value only if it isn't set in the environment yet (though other syntax might be invented like prepending a "%@no_overwrite%" to the value).
> 
> I don't think it is problematic, it's just a different way of thinking. The current .ini files override environment variables. You proposed a method of providing a 'default' setting. In json,
> 
> {
>     "Environment": { "override" : { "name" : "value",
>                                                           "baz" : "foo" },
>                                   "default" : { "foo" : "bar" }
>                                 }
> }
> 
> or something similar. For backwards compatibility, the old .ini format can still be recognized. The nice thing about json is we can add features without changing the file format.

Please, don't use json for configuration files, is a format intended for machines, not humans (OK, is better than XML but still horrible for humans).

If you need a standard and flexible file format that is almost as good for humans and machines, maybe you want to consider YAML.

Environment:
  override:
    name: value
    baz: foo
  default:
    foo: bar

But I still think a configuration file shouldn't be as complex as YAML.

-- 
Leandro Lucarella (AKA luca)                     http://llucax.com.ar/
----------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------
Debemos creer en los sueños del niño. Cuando el niño sueña con tetas, se
toca.
	-- Ricardo Vaporeso. Toulouse, 1915.
_______________________________________________
dmd-beta mailing list
dmd-beta@puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-beta
February 13, 2013
On 2/13/2013 3:06 AM, Leandro Lucarella wrote:
> Please, don't use json for configuration files, is a format intended for
> machines, not humans (OK, is better than XML but still horrible for
> humans).

Json is simply a subset of javascript, which was intended for humans.

>
> If you need a standard and flexible file format that is almost as good
> for humans and machines, maybe you want to consider YAML.
>
> Environment:
>    override:
>      name: value
>      baz: foo
>    default:
>      foo: bar
>
> But I still think a configuration file shouldn't be as complex as YAML.

Configuration files grow ever more complex, and it'd be nice to have a format that doesn't need constant redesign.

_______________________________________________
dmd-beta mailing list
dmd-beta@puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-beta

February 13, 2013
On Wednesday, February 13, 2013 12:06:10 Leandro Lucarella wrote:
> Please, don't use json for configuration files, is a format intended for machines, not humans (OK, is better than XML but still horrible for humans).
> 
> If you need a standard and flexible file format that is almost as good for humans and machines, maybe you want to consider YAML.
> 
> Environment:
> override:
> name: value
> baz: foo
> default:
> foo: bar
> 
> But I still think a configuration file shouldn't be as complex as YAML.

Technically, YAML is a superset of JSON. Regardless, I personally hate YAML, because it's whitespace/indentation-sensitive, which is pure evil IMHO. I'd take a normal JSON file (or even XML) any day over a YAML file.

- Jonathan M Davis
_______________________________________________
dmd-beta mailing list
dmd-beta@puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-beta

February 13, 2013
On 13 feb 2013, at 20:37, Walter Bright <walter@digitalmars.com> wrote:

> 
> On 2/13/2013 3:06 AM, Leandro Lucarella wrote:
>> Please, don't use json for configuration files, is a format intended for machines, not humans (OK, is better than XML but still horrible for humans).
> 
> Json is simply a subset of javascript, which was intended for humans.
> 
>> 
>> If you need a standard and flexible file format that is almost as good for humans and machines, maybe you want to consider YAML.
>> 
>> Environment:
>>   override:
>>     name: value
>>     baz: foo
>>   default:
>>     foo: bar
>> 
>> But I still think a configuration file shouldn't be as complex as YAML.
> 
> Configuration files grow ever more complex, and it'd be nice to have a format that doesn't need constant redesign.


YAML is quite a flexible format. It support references, for example.

Environment: &Environment
  foo: 1
  bar: 2

Environment64:
  <<: *Environment
  bar: 3

Here "Environment64" will contain everything in "Environment" and then override any values that is listed under "Environment64".

It's also possible to implement new types in YAML.

-- 
/Jacob Carlborg

_______________________________________________
dmd-beta mailing list
dmd-beta@puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-beta

February 13, 2013
On 13 feb 2013, at 21:14, Jonathan M Davis <jmdavisProg@gmx.com> wrote:

> Technically, YAML is a superset of JSON. Regardless, I personally hate YAML, because it's whitespace/indentation-sensitive, which is pure evil IMHO. I'd take a normal JSON file (or even XML) any day over a YAML file.


I love YAML, surprise surprise :)

-- 
/Jacob Carlborg

_______________________________________________
dmd-beta mailing list
dmd-beta@puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-beta