X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=ZKJSsegljHF5BiswkjGjqEeq6i8lriKCkK26u80XVgk=; b=GjdM9rddMq7pE6rcZ1EuF0zRsmaJPHtGvskWlh/tf/cbK08iD5Y+m3agkYiyaK0Qy5 rDwPhmdoLawvWkRx7my+jgQegF5gjGh85oVN+IakHnCCAg45LhFXJcg5nwCOhVINc0QI Q8sQCuh6WOu6yPFVrPumeiSmnjG/gljQiTyIp7Od+0WeXZiS96N9Zrg1aEgzo8QxaZRG 2hC8kw/3gpGRZJOJjzykEWfYD9UHeZw8xZlVI5Fc5hvd2INRoHOOUS8vY2VipmZPCM6R WftOexXc8JjmWjuz0ETHK2rZIpINp1Q9MsYOxwazbH8SquJZdTwB+Isi5WMhhKaY/G10 +rYA== MIME-Version: 1.0 X-Received: by 10.28.48.131 with SMTP id w125mr12187990wmw.18.1452123225518; Wed, 06 Jan 2016 15:33:45 -0800 (PST) In-Reply-To: <20160106091006.5F67B809D7A1@turkos.aspodata.se> References: <1512221837 DOT AA25291 AT ivan DOT Harhan DOT ORG> <20151222232230 DOT 12633 DOT qmail AT stuge DOT se> <0F6F1D0F-4F07-48EA-90FE-836EAD4E2354 AT noqsi DOT com> <0FCF3774-F93C-4BFF-BB61-636F75DCCACB AT noqsi DOT com> <20160105182120 DOT 3237F809D79B AT turkos DOT aspodata DOT se> <20160106091006 DOT 5F67B809D7A1 AT turkos DOT aspodata DOT se> Date: Wed, 6 Jan 2016 14:33:45 -0900 Message-ID: Subject: Re: [geda-user] A fileformat library From: "Britton Kerin (britton DOT kerin AT gmail DOT com) [via geda-user AT delorie DOT com]" To: geda-user AT delorie DOT com Content-Type: multipart/alternative; boundary=001a114242a406fc130528b2c9d8 Reply-To: geda-user AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: geda-user AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk --001a114242a406fc130528b2c9d8 Content-Type: text/plain; charset=UTF-8 On Wed, Jan 6, 2016 at 12:10 AM, wrote: > Britton Kerin: > > On Tue, Jan 5, 2016 at 9:21 AM, wrote: > > > Britton Kerin: > > > > On Sun, Jan 3, 2016 at 6:25 PM, John Doty wrote: > > > ... > > > > > Although these are good measures, once you adopt them you may start > > > asking > > > > > yourself why you aren't just using a binary format. The argument > for > > > text > > > > > is that you can glance at a chunk of it and easily tell what's > going > > > on. > > > > > A stronger argument for text is that you can process it with > > > text-oriented > > > > > tools. > > > > But ultimately the reason for wanting to use those text-oriented > tools is > > > > the same: you can see what you're working on with your own eyes. In > > > every > > > > other respect binary is better. > > > > > > I counter that. > > > . you have to check a binary file for valid values just as you do for a > > > text file > > You have not commented this point. Any reader, human or program, have > to verify its input. Just because you have a binary file you can't just > do > > struct some_struct_type data; > read(fd, data, sizeof(struct some_struct_type)) > > and pretend that data will contain valid values. True. The process of writing such validation code is more fun with text because you can see it. It seems like the same reason again to me. > > > . if your binary file is in some way invalid, you will have a greater > > > problem correcting it than a text file > > > . discussing why a file is invalid is easier with a text file > > > . a binary file might be smaller, but that does not matter much > > > . text files are better provided for by version systems (e.g. git) > > > . it is easier to write tools that write text than binary, because > > > debugging the output is easier > > Regarding vcs of text data files for GUI program, it's a stretch to claim > > that the fact that they're text makes them much more compatible. The > diffs > > are only useful for the most trivial of cases. > > You used the word "better", now are you judging things around > "compatible". What do you want ? > If you want "compatible", then compatible to what ? > > I write a sym/fp-generators and I prefer text output; I can check the > output both "textually" and "visually". > > The diffs out the output of thoose generators are valueable when > debugging. > > You might think of gschem and pcb as gui programs, but there is > ifrastructure around them which is not gui. Don't think about their files > in the same way as a png or jpg, where the fileformats are well > entrenched and infrastructure is available. > > > For it to be really useful > > you need a (non-text) diff viewer of some sort. > > A graphical-diff is provided by > > http://www.imagemagick.org/Usage/compare/ > > You can generate png's from sch/pcb files and use that program for > graphical-diffs. > Not a bad way I'll have to try it. > It would be very useful for regression tests, other projects have been > successful at that. > > > All the rest of the above still boil down to examples of things that are > > easier because you can see the data, and therefore manipulate and > validate > > it more easily. > > No, validate input and size, is not about "easier to see". > > But... > Why do you want to remove the text format for me ? > I don't, I want to make pcb even more text-ish, so to speak. It might be worth it if we want to extend the format anyway. Don't worry Jon I don't want to do .sch files :) > What are your complaint of having a textual file format ? > My problems with our current formats are: * They're bound to the innards of pcb and lisp. Not a good arrangement for a suite that claims to favor the toolbox approach. * They occupy a weird middle ground on readability: not binary, but a bunch of nameless numeric fields. It's not a huge issue but it's annoying. Catalogs and the like were being discussed and I was just saying I don't entirely like that way because then you still can't interpret a single piece of data in isolation. If you're going text go whole-hog and get the maximum readability benefits possible is what I say. By dropping the text you loose something, what is the gain of a binary > format that outweights that ? > Not much, sorry for the confusion. Last time it got discussed the possibility of an equivalent (optional) sqlite format got discussed and that seems like a potentially good idea to me since people who like sql would be starting out substantially ahead of just pile of objects (which is still substantially ahead of a pile of text which they get now from script languages). > > > Also, there is no reason to change a file format unless you change the > > > functionality it provides, I have to "side heavily" with John on this. > > > If you want to change the file format, you first have to provide some > > > goodies that will make people to accept it. And no such "goodie" > > > thing has appeared. > > A little while back a PhD Stefan Salewski put together a very good start > on > > a very nice router. IIRC he said 300-400 hours of effort, probably about > > $100k worth with overhead in the american market. It's not C (for good > > reasons) and currently can't talk to pcb at all. I would like to somehow > > arrange things such than efforts like this could maybe get used. > > In what way does his work relate to a decision about text contra binary > file format. > It doesn't, it relates to the current text format versus ones that script languages (Stefan's work is in Ruby for example) could easily read. > > > You might write a library that reads and writes the files and if people > > > find it useful, they will start using it, else, it will be just your > own > > > project. > > True. It might be useless but should at least be non-destructive. > > I thought you are for a fileformat library. I'm I wrong ? > But now you say that such a library is useless. Did I get that right ? > No, it started out as a discussion about exactly why text formats are good and took a misleading turn. > I think a fileformat library would be useful, but I still > would like a textual format for sch/sym/pcb/fp files. > Agreed. Britton --001a114242a406fc130528b2c9d8 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Wed, Jan 6, 2016 at 12:10 AM, <karl AT aspodata DOT se> wrot= e:
Britton Kerin:
> On Tue, Jan 5, 2016 at 9:21 AM, <jpd AT noqsi DOT com> wrote:
> > ...
> > > > Although these are good measures, once you adopt them y= ou may start
> > asking
> > > > yourself why you aren't just using a binary format.= =C2=A0 The argument for
> > text
> > > > is that you can glance at a chunk of it and easily tell= what's going
> > on.
> > > > A stronger argument for text is that you can process it= with
> > text-oriented
> > > > tools.
> > > But ultimately the reason for wanting to use those text-orie= nted tools is
> > > the same: you can see what you're working on with your o= wn eyes.=C2=A0 In
> > every
> > > other respect binary is better.
> >
> > I counter that.
> > . you have to check a binary file for valid values just as you do= for a
> >=C2=A0 =C2=A0text file

You have not commented this point. Any reader, human or program, hav= e
to verify its input. Just because you have a binary file you can't just=
do

=C2=A0struct some_struct_type data;
=C2=A0read(fd, data, sizeof(struct some_struct_type))

and pretend that data will contain valid values.

True.=C2=A0 The process of writing such validation code is= more fun with text because you can see it.=C2=A0 It seems like the same re= ason again to me.

=C2=A0
> > . if your binary file is in some way invalid, you will have a gre= ater
> >=C2=A0 =C2=A0problem correcting it than a text file
> > . discussing why a file is invalid is easier with a text file
> > . a binary file might be smaller, but that does not matter much > > . text files are better provided for by version systems (e.g. git= )
> > . it is easier to write tools that write text than binary, becaus= e
> >=C2=A0 =C2=A0debugging the output is easier
> Regarding vcs of text data files for GUI program, it's a stretch t= o claim
> that the fact that they're text makes them much more compatible.= =C2=A0 The diffs
> are only useful for the most trivial of cases.

You used the word "better", now are you judging things aro= und
"compatible". What do you want ?
If you want "compatible", then compatible to what ?

I write a sym/fp-generators and I prefer text output; I can check the
output both "textually" and "visually".

The diffs out the output of thoose generators are valueable when
debugging.

You might think of gschem and pcb as gui programs, but there is
ifrastructure around them which is not gui. Don't think about their fil= es
in the same way as a png or jpg, where the fileformats are well
entrenched and infrastructure is available.

>=C2=A0 For it to be really useful
> you need a (non-text) diff viewer of=C2=A0 some sort.

A graphical-diff is provided by

=C2=A0http://www.imagemagick.org/Usage/compare/

You can generate png's from sch/pcb files and use that program for
graphical-diffs.

Not a bad w= ay I'll have to try it.
=C2=A0
It would be very useful for regression tests, other projects have been
successful at that.

> All the rest of the above still boil down to examples of things that a= re
> easier because you can see the data, and therefore manipulate and vali= date
> it more easily.

No, validate input and size, is not about "easier to see".

But...
Why do you want to remove the text format for me ?
I don't, I want to make pcb even more text-ish, = so to speak.=C2=A0 It might be worth it if we want to extend the format any= way.=C2=A0 Don't worry Jon I don't want to do .sch files :)
=C2=A0
What are your complaint of having a textual file format ?
<= div>
My problems with our current formats are:

=C2=A0 * They're bound to t= he innards of pcb and lisp.=C2=A0 Not a good arrangement for a suite that c= laims to favor the toolbox approach.

=C2=A0 * They occupy a weird middle ground on readability: not bin= ary, but a bunch of nameless numeric fields.=C2=A0 It's not a huge issu= e but it's annoying.
=C2=A0 =C2=A0 Catalogs and th= e like were being discussed and I was just saying I don't entirely like= that way because then you still can't interpret a single piece of data= in isolation.=C2=A0 If you're going text go whole-hog and get the maxi= mum readability benefits possible is what I say.

By dropping the text you loose something, what is the gain of a binary
format that outweights that ?

Not much, sorry for the confusion.=C2=A0 Last time it got discussed the p= ossibility of an equivalent (optional) sqlite format got discussed and that= seems like a potentially good idea to me since people who like sql would b= e starting out substantially ahead of just pile of objects (which is still = substantially ahead of a pile of text which they get now from script langua= ges).
=C2=A0
> > Also, there is no reason to change a file format unless you chang= e the
> > functionality it provides, I have to "side heavily" wit= h John on this.
> > If you want to change the file format, you first have to provide = some
> > goodies that will make people to accept it. And no such "goo= die"
> > thing has appeared.
> A little while back a PhD Stefan Salewski put togethe= r a very good start on
> a very nice router.=C2=A0 IIRC he said 300-400 hours of effort, probab= ly about
> $100k worth with overhead in the american market.=C2=A0 It's not C= (for good
> reasons) and currently can't talk to pcb at all.=C2=A0 I would lik= e to somehow
> arrange things such than efforts like this could maybe get used.

In what way does his work relate to a decision about text contra bin= ary
file format.

It doesn't,= it relates to the current text format versus ones that script languages (S= tefan's work is in Ruby for example) could easily read.
=C2= =A0
> > You might write a library that reads and writes the files and if = people
> > find it useful, they will start using it, else, it will be just y= our own
> > project.
> True.=C2=A0 It might be useless but should at least be non-destructive= .

I thought you are for a fileformat library. I'm I wrong ?
But now you say that such a library is useless. Did I get that right ?
<= /blockquote>

No, it started out as a discussi= on about exactly why text formats are good and took a misleading turn.
=C2=A0
I think a fileformat library would be useful, but I still
would like a textual format for sch/sym/pcb/fp files.
=
Agreed.
=C2=A0
Bri= tton

--001a114242a406fc130528b2c9d8--