On Sun, Jan 12, 2003, Evgeny Stambulchik wrote about "Re[2]: Binary configuration 
files as panacea to whatever ails Linux (was: Re: the problem with LINUX)":
> >  Of course, you need a bidirectional mapping (i.e. not only from the
> >  disk representation to the in-memory representation, but also vice-
> >  versa); Otherwise, the changes can't be translated to rules of
> >  configuration files.
> 
> Right, and the lack of these features (actually, the lack of decent API
> providing them) distracted many even pure-X apps from solely using it; instead,
> they load/store their configs from customly-formatted .rc files.

This is not the only problem with X resources...
X resources provide a very specific model of configuration, with a very
limited syntax.

Looking at my ~/.ctwmrc (yes, ctwm is my window manager), ~/.emacs (900
lines of lisp :)), ~/.zshrc, etc., I can't imagine how any of those could
be done using the X resources model.

I mean, surely it could be done, like this:
  Zsh.zshrc.line1: ....
  Zsh.zshrc.line2: ....
  ...
But this is obviously not what you suggest.


> I need the well-defined API and its C implementation. Whatever

The Xt implementation of X resources was quite well-defined and powerful.
There was a program called xresedit (or something like that... hmm, could it
be that XFree86 dropped this??) to edit running applications' configuration
on-the-fly (e.g., you could change the button colors on a running
application ;))

Tcl/Tk has a much better (in my opinion) configuration paradigm. First,
since Tcl is an interpreted language, configuration files could be written
in that language and be very powerful (e.g., imagine your clock's color
changing depending on the day of the week, and your background change
according to the phase of the moon).
If you wanted the config file to have a fixed structure so that a program
could modify (not just read) it, you could have done it (just like XEmacs
now does with the user options saved as Lisp).

Then, Tcl/Tk had a "send" command (try 'man n send') in which you could
execute Tcl expressions on another running applications. This could be used,
for example, for configuring a running applications. I once had a program
like that which let you change colors of widgets (and similar stuff) on
running Tcl/Tk programs.

Too bad Tcl/Tk didn't catch on, it was a very nice tool :(

-- 
Nadav Har'El                        |      Sunday, Jan 12 2003, 10 Shevat 5763
[EMAIL PROTECTED]             |-----------------------------------------
Phone: +972-53-245868, ICQ 13349191 |Unlike Microsoft, a restaurant will not
http://nadav.harel.org.il           |ask me to pay for food with a bug in it!

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to