Subject: Re: proplib changes
To: John Nemeth <jnemeth@victoria.tc.ca>
From: Johnny Billquist <bqt@softjar.se>
List: tech-kern
Date: 06/26/2007 12:02:42
This is a multi-part message in MIME format.
--------------040804090209080109010105
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

So, what when my system is really borked, and I can't get proplib to 
work? I guess I'm pretty toast then? (Getting systems into a 
semi-catastrophic state have happened to me a few times.)

And what about error handling? If proplib do all the parsing without the 
rest of the application involved, are there any good hooks, or ways to 
get good error information if the file proplib reads in isn't kosher?

And not getting comments in the external file is a *big* step backwards 
in my book.

I thought we just said that one "feature" was that you could play with 
parts of a configuration without messing with the rest of it. I guess 
this means that comments aren't considered part of the configuration, 
and in the end this feels like "people should never see or touch these 
files".

To me it's like a big step backwards.

	Johnny

John Nemeth skrev:
> On Nov 15,  7:41pm, "Trevor Talbot" wrote:
> } On 6/26/07, Thor Lancelot Simon <tls@rek.tjls.com> wrote:
> } > On Mon, Jun 25, 2007 at 11:12:58PM -0700, Trevor Talbot wrote:
> } > > On 6/25/07, Thor Lancelot Simon <tls@rek.tjls.com> wrote:
> } 
> } > > >What harm is done if we have 8,000 different syntaxes, if the tools do
> } > > >seamless conversion between them all?
> } 
> } > > Er, I thought the point of having a human-editable format was to avoid
> } > > requiring the use of tools.
> } 
> } > What you're missing is that "the tools" in this case means "any
> } > proplib-using application".  It doesn't matter if you write a boot
> } > properties list in XML or SCN, it looks the same to proplib internally;
> } > and, similarly, it can output that list of boot properties in XML or
> } > SCN, as you like.
> } 
> } But the issue is what happens when there's an existing configuration
> } file I want to edit.  If it's in one of the 7,999 formats I'm not
> } comfortable with, I have to use another tool just to get it into a
> } form where I can edit it.  (And there's still the issue of
> } transporting comments in this case.)
> 
>      If the file isn't in the format that you want then all you need to
> is set an environment variable and cause the application to write the
> file (otherwise an application that simply reads and writes the file
> can get it into the proper format and once converted, it can be left in
> that format).  As for comments, I don't know if plists allow for them.
> 
> } It doesn't matter that the particular application can read any format,
> } or that proplib provides the ability to write any format (it's
> } unlikely all the proplib users will expose that), if I still have to
> } jump through hoops just to make simple configuration changes.
> 
>      There is nothing for the "user" to do.  An application simply
> calls prop_dictionary_internalize_from_file(<path to file>);.  proplib
> will open the file, read the beginning of it to determine the format,
> parse the rest of the file into a dictionary, and finally return a
> prop_dictionary_t to the application.  If the application wants to
> write a file all it has to is call
> prop_dictionary_externalize_to_file(<dictionary>, <path to file>);.
> proplib will look for an environment variable specifying the preferred
> format, select the default format if the environment variable doesn't
> exist, and create the file in the specified format.  One of the main
> features of proplib is that the application doesn't need to concern
> itself with parsing or creating the external format.  This is handled
> completely by the library.
> 
> }-- End of excerpt from "Trevor Talbot"

-- 
Johnny Billquist                  || "I'm on a bus
                                   ||  on a psychedelic trip
email: bqt@softjar.se             ||  Reading murder books
pdp is alive!                     ||  tryin' to stay hip" - B. Idol

--------------040804090209080109010105
Content-Type: text/x-vcard; charset=utf-8;
 name="bqt.vcf"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="bqt.vcf"

begin:vcard
fn:Johnny Billquist
n:Billquist;Johnny
email;internet:bqt@softjar.se
tel;cell:+46 70-8641486
x-mozilla-html:FALSE
version:2.1
end:vcard


--------------040804090209080109010105--