Andreas Bernauer | 2 Aug 08:37 2007
Picon
Picon

Re: Not all bindings are defined in cfg_ioncore.lua

Etan Reisner schrieb am Di, 31. Jul 2007 um 13:58 (-0400):
> > Copy /usr/local/etc/ion3/cfg_tiling to your ~/.ion3 and modify it.
> 
> No, do not copy random system files into ~/.ion3 only copy cfg_ion.lua,
> cfg_statusbar.lua, and cfg_dock.lua. Leave the rest in the system
> locations and override the bindings in cfg_ion.lua or in any other file
> you want as long as you dopath("") it from cfg_ion.lua.

Could you give me any special reasons for your suggestion, just out of
curiosity?

Andreas.

Etan Reisner | 2 Aug 17:42 2007
Picon

Re: Not all bindings are defined in cfg_ioncore.lua

On Thu, Aug 02, 2007 at 08:37:21AM +0200, Andreas Bernauer wrote:
> Etan Reisner schrieb am Di, 31. Jul 2007 um 13:58 (-0400):
> > > Copy /usr/local/etc/ion3/cfg_tiling to your ~/.ion3 and modify it.
> >
> > No, do not copy random system files into ~/.ion3 only copy cfg_ion.lua,
> > cfg_statusbar.lua, and cfg_dock.lua. Leave the rest in the system
> > locations and override the bindings in cfg_ion.lua or in any other file
> > you want as long as you dopath("") it from cfg_ion.lua.
>
> Could you give me any special reasons for your suggestion, just out of
> curiosity?
>
> Andreas.

Short version: Easier to maintain across upstream changes.

Long version If you copy the entire cfg_tiling.lua into .ion3 and then a
function name changes your carefully copied and modified version will be
broken. And you will have no idea why. Essentially you become forced to
watch the changelog very carefully and diff your version against the
system version after each new release. If, on the other hand, all you do
is create secondary config file (e.g. cfg_my.lua or my_tiling.lua) then
when versions change you only need to worry about changes to the bindings
you have actually customized (and perhaps any newly added system bindings
that take precedence over yours, but that is much easier to notice and
fix). Unless you intend to change the majority of the existing bindings it
is, as far as I have ever been concerned, a net loss to copy the system
files in.

	-Etan
(Continue reading)

Etan Reisner | 2 Aug 22:28 2007
Picon

Re: Not all bindings are defined in cfg_ioncore.lua

On Thu, Aug 02, 2007 at 04:33:25PM -0400, Ted Zlatanov wrote:
<snip>
> I'd just like to point out that this is exactly why the Ion
> configuration should not be in Lua and subject to change any time an
> update comes down IMO.
>
> Something like this:
>
> META.."S" = split_here_horizontal
> META.."V" = split_here_vertical
>
> Is all 99% of end users need.  Wouldn't this be easier for everyone?
> Maybe it could be a module...

You could certainly write a simplified binding script to translated from
'known' keywords to the right functions, but that just moves where the
translation has to happen and if upstream changes the known name you
have the same difficulty. You would of course argue that the known names
shouldn't change but they are just an API, and APIs are only frozen when
it is reasonable to do so, the ion API or the known names API would both
change when needed.

> Ted

	-Etan

Ted Zlatanov | 2 Aug 22:33 2007
X-Face

Re: Not all bindings are defined in cfg_ioncore.lua

On Thu, 2 Aug 2007 11:42:35 -0400 Etan Reisner
<deryni@...> wrote: 

ER> On Thu, Aug 02, 2007 at 08:37:21AM +0200, Andreas Bernauer wrote:
>> Etan Reisner schrieb am Di, 31. Jul 2007 um 13:58 (-0400):
>> > > Copy /usr/local/etc/ion3/cfg_tiling to your ~/.ion3 and modify it.
>> >
>> > No, do not copy random system files into ~/.ion3 only copy cfg_ion.lua,
>> > cfg_statusbar.lua, and cfg_dock.lua. Leave the rest in the system
>> > locations and override the bindings in cfg_ion.lua or in any other file
>> > you want as long as you dopath("") it from cfg_ion.lua.
>> 
>> Could you give me any special reasons for your suggestion, just out of
>> curiosity?
>> 
>> Andreas.

ER> Short version: Easier to maintain across upstream changes.

ER> Long version If you copy the entire cfg_tiling.lua into .ion3 and then a
ER> function name changes your carefully copied and modified version will be
ER> broken. And you will have no idea why. Essentially you become forced to
ER> watch the changelog very carefully and diff your version against the
ER> system version after each new release. If, on the other hand, all you do
ER> is create secondary config file (e.g. cfg_my.lua or my_tiling.lua) then
ER> when versions change you only need to worry about changes to the bindings
ER> you have actually customized (and perhaps any newly added system bindings
ER> that take precedence over yours, but that is much easier to notice and
ER> fix). Unless you intend to change the majority of the existing bindings it
ER> is, as far as I have ever been concerned, a net loss to copy the system
(Continue reading)

Ted Zlatanov | 2 Aug 22:57 2007
X-Face

Re: Not all bindings are defined in cfg_ioncore.lua

On Thu, 2 Aug 2007 16:28:59 -0400 Etan Reisner
<deryni@...> wrote: 

ER> On Thu, Aug 02, 2007 at 04:33:25PM -0400, Ted Zlatanov wrote:
ER> <snip>
>> I'd just like to point out that this is exactly why the Ion
>> configuration should not be in Lua and subject to change any time an
>> update comes down IMO.
>> 
>> Something like this:
>> 
>> META.."S" = split_here_horizontal
>> META.."V" = split_here_vertical
>> 
>> Is all 99% of end users need.  Wouldn't this be easier for everyone?
>> Maybe it could be a module...

ER> You could certainly write a simplified binding script to translated from
ER> 'known' keywords to the right functions, but that just moves where the
ER> translation has to happen and if upstream changes the known name you
ER> have the same difficulty. You would of course argue that the known names
ER> shouldn't change but they are just an API, and APIs are only frozen when
ER> it is reasonable to do so, the ion API or the known names API would both
ER> change when needed.

Do you really think that a user would rather edit Lua when a new release
comes down than the format I showed?  I've worked with many users and
editing code is very low on their TODO list.

The *basic* Ion operations haven't changed much since Ion3 was
(Continue reading)

Etan Reisner | 2 Aug 22:57 2007
Picon

Re: Not all bindings are defined in cfg_ioncore.lua

On Thu, Aug 02, 2007 at 04:57:30PM -0400, Ted Zlatanov wrote:
<snip>
> Do you really think that a user would rather edit Lua when a new release
> comes down than the format I showed?  I've worked with many users and
> editing code is very low on their TODO list.

I never said that at all actually. But that's ok. Also, the fact that the
bindings are in lua is unrelated to the difficulty in editing them for
normal people, lua is designed to be used for configuration services and
as such can be made to look rather config-file-like. The ion config system
doesn't do that much, but that's ok.

> The *basic* Ion operations haven't changed much since Ion3 was
> released.  I've had to rewrite my Lua config several times, though,
> because of small changes to the objects.

Actually the basic operations have changed quite a bit since ion3 started,
in a couple places. And like I said you just move the failure point, and
like I also said a translation script is not at all hard to handle.

> Anyhow, it's a moot point if Tuomo disagrees, and he has in the past :)

Actually this doesn't need to touch Tuomo at all it can be entirely with a
runtime script which reads your simplified binding file and makes the
right lua calls.

> Ted

	-Etan

(Continue reading)

csant | 2 Aug 23:10 2007

Re: Not all bindings are defined in cfg_ioncore.lua

On Thu, 02 Aug 2007 22:57:30 +0200, Ted Zlatanov <tzz@...> wrote:

> The *basic* Ion operations haven't changed much since Ion3 was
> released.  I've had to rewrite my Lua config several times, though,
> because of small changes to the objects.

If this is a problem, then maybe development versions of software aren't  
for you, then?
/c

Ted Zlatanov | 2 Aug 23:28 2007
X-Face

Re: Not all bindings are defined in cfg_ioncore.lua

On Thu, 2 Aug 2007 16:57:08 -0400 Etan Reisner
<deryni@...> wrote: 

ER> Also, the fact that the bindings are in lua is unrelated to the
ER> difficulty in editing them for normal people, lua is designed to be
ER> used for configuration services and as such can be made to look
ER> rather config-file-like. 

IMO Lua is not a good configuration language no matter what.  Neither
are Perl, shell, etc.  When the author punts the software configurations
to code, either the users learn to code that language, or they walk
away.  If you have a better Lua syntax, that's great, but remember it
has to be better than a regular configuration file too, because that's
what end users expect.

ER> Actually this doesn't need to touch Tuomo at all it can be entirely with a
ER> runtime script which reads your simplified binding file and makes the
ER> right lua calls.

To be widely useful, this syntax should be part of the Ion3 release and
supported.  Unofficial is OK by me but end users will not find it by
default, and they are the ones that need this functionality the most.
So I'd rather write something Tuomo will include in Ion3.  If you
disagree, feel free to write and support the script, I am perfectly OK
with that.

Ted

Ted Zlatanov | 2 Aug 23:34 2007
X-Face

Re: Not all bindings are defined in cfg_ioncore.lua

On Thu, 02 Aug 2007 23:10:16 +0200 csant <csant@...> wrote: 

c> On Thu, 02 Aug 2007 22:57:30 +0200, Ted Zlatanov <tzz@...> wrote:
>> The *basic* Ion operations haven't changed much since Ion3 was
>> released.  I've had to rewrite my Lua config several times, though,
>> because of small changes to the objects.

c> If this is a problem, then maybe development versions of software
c> aren't for you, then?

Thanks, I can handle code just fine.  I think you've missed my point: I
wasn't complaining, I was saying that the basic functionality hasn't
changed that much and can be abstracted to a simple configuration.

Ted

Etan Reisner | 3 Aug 03:50 2007
Picon

Re: Not all bindings are defined in cfg_ioncore.lua

On Thu, Aug 02, 2007 at 05:28:05PM -0400, Ted Zlatanov wrote:
> On Thu, 2 Aug 2007 16:57:08 -0400 Etan Reisner
<deryni@...> wrote:
>
> ER> Also, the fact that the bindings are in lua is unrelated to the
> ER> difficulty in editing them for normal people, lua is designed to be
> ER> used for configuration services and as such can be made to look
> ER> rather config-file-like.
>
> IMO Lua is not a good configuration language no matter what.  Neither
> are Perl, shell, etc.  When the author punts the software configurations
> to code, either the users learn to code that language, or they walk
> away.  If you have a better Lua syntax, that's great, but remember it
> has to be better than a regular configuration file too, because that's
> what end users expect.

What is a 'regular configuration file'? INI syntax? resolv.conf syntax?
xorg.conf syntax? xml? What 'standard' configuration files do users deal
with at this point? (Or really ever?)

And I should point out that lua can handle 'standard':

    variable = value
    variable = value

syntax just fine. So you wouldn't even need to know it was lua in the simple case.

> ER> Actually this doesn't need to touch Tuomo at all it can be entirely with a
> ER> runtime script which reads your simplified binding file and makes the
> ER> right lua calls.
(Continue reading)


Gmane