www.delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2016/01/06/18:34:01

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>
<CAJXU7q_qxdvJaejF-VcY=u7VHZ-zrfrc+Z7-qSwfFyPdy-umxw AT mail DOT gmail DOT com>
<B02363CD-469D-493A-AC15-1D5DC7836982 AT noqsi DOT com>
<20151222232230 DOT 12633 DOT qmail AT stuge DOT se>
<0F6F1D0F-4F07-48EA-90FE-836EAD4E2354 AT noqsi DOT com>
<CAM2RGhTficnys3a4xs=UBFvk8aPwpzYWUADFLP_pUQ+R1iKs0g AT mail DOT gmail DOT com>
<0FCF3774-F93C-4BFF-BB61-636F75DCCACB AT noqsi DOT com>
<CAC4O8c_UAiFE-vGfoE2tXppHLhaa0dSYz9o_rkdCBo7_SRRtxw AT mail DOT gmail DOT com>
<FFBE7623-E240-4798-96B0-2BECF56C8E29 AT noqsi DOT com>
<CAC4O8c980g1gj15=5njstC_BT-WYDgKQx9BRycdFKA8OvgtiOg AT mail DOT gmail DOT com>
<B54C0E1F-1986-4C79-9F70-7F1919B8B26D AT noqsi DOT com>
<CAC4O8c9bxJP1eMG4yz3YwKkQJRmsDGmLQ0aMd5pJRyu0WpdCtQ AT mail DOT gmail DOT com>
<C1CFCCEE-C64A-4E49-AA64-446C061656D6 AT noqsi DOT com>
<CAC4O8c-zt8B=joDd+ws77D2jt6aZf3MWfR_dAvpzGcNuBrTURQ AT mail DOT gmail DOT com>
<alpine DOT DEB DOT 2 DOT 11 DOT 1601030040320 DOT 2176 AT newt>
<D9825C8C-B6FD-4C7F-A8D5-B8AF06253B72 AT noqsi DOT com>
<CAC4O8c_R5xWLmzj_cz0g0mPWNs6mR4efjXKGBoup8YO6nwnPTA AT mail DOT gmail DOT com>
<CAC4O8c8zk8=Py1yX6fVqF+35SYe39Li=y4jZ8bCeZ1Ev8WccAg AT mail DOT gmail DOT com>
<20160105182120 DOT 3237F809D79B AT turkos DOT aspodata DOT se>
<CAC4O8c8cVr1H3skmbGo4Rhf5ZTZj8bDxJw8a9C4qfHeGyXZ4XA AT mail DOT gmail DOT com>
<20160106091006 DOT 5F67B809D7A1 AT turkos DOT aspodata DOT se>
Date: Wed, 6 Jan 2016 14:33:45 -0900
Message-ID: <CAC4O8c-TPYg1fZYyRwocVOiego_JEAyeUfFKWxtaVe3df6uASQ@mail.gmail.com>
Subject: Re: [geda-user] A fileformat library
From: "Britton Kerin (britton DOT kerin AT gmail DOT com) [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com>
To: geda-user AT delorie DOT com
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

--001a114242a406fc130528b2c9d8
Content-Type: text/plain; charset=UTF-8

On Wed, Jan 6, 2016 at 12:10 AM, <karl AT aspodata DOT se> wrote:

> Britton Kerin:
> > On Tue, Jan 5, 2016 at 9:21 AM, <karl AT aspodata DOT se> wrote:
> > > Britton Kerin:
> > > > On Sun, Jan 3, 2016 at 6:25 PM, John Doty <jpd AT noqsi DOT com> 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

<div dir=3D"ltr"><br><div class=3D"gmail_extra"><br><div class=3D"gmail_quo=
te">On Wed, Jan 6, 2016 at 12:10 AM,  <span dir=3D"ltr">&lt;<a href=3D"mail=
to:karl AT aspodata DOT se" target=3D"_blank">karl AT aspodata DOT se</a>&gt;</span> wrot=
e:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-l=
eft:1px #ccc solid;padding-left:1ex">Britton Kerin:<br>
&gt; On Tue, Jan 5, 2016 at 9:21 AM, &lt;<a href=3D"mailto:karl AT aspodata DOT se=
">karl AT aspodata DOT se</a>&gt; wrote:<br>
&gt; &gt; Britton Kerin:<br>
&gt; &gt; &gt; On Sun, Jan 3, 2016 at 6:25 PM, John Doty &lt;<a href=3D"mai=
lto:jpd AT noqsi DOT com">jpd AT noqsi DOT com</a>&gt; wrote:<br>
&gt; &gt; ...<br>
&gt; &gt; &gt; &gt; Although these are good measures, once you adopt them y=
ou may start<br>
&gt; &gt; asking<br>
&gt; &gt; &gt; &gt; yourself why you aren&#39;t just using a binary format.=
=C2=A0 The argument for<br>
&gt; &gt; text<br>
&gt; &gt; &gt; &gt; is that you can glance at a chunk of it and easily tell=
 what&#39;s going<br>
&gt; &gt; on.<br>
&gt; &gt; &gt; &gt; A stronger argument for text is that you can process it=
 with<br>
&gt; &gt; text-oriented<br>
&gt; &gt; &gt; &gt; tools.<br>
&gt; &gt; &gt; But ultimately the reason for wanting to use those text-orie=
nted tools is<br>
&gt; &gt; &gt; the same: you can see what you&#39;re working on with your o=
wn eyes.=C2=A0 In<br>
&gt; &gt; every<br>
<span class=3D"">&gt; &gt; &gt; other respect binary is better.<br>
&gt; &gt;<br>
&gt; &gt; I counter that.<br>
&gt; &gt; . you have to check a binary file for valid values just as you do=
 for a<br>
&gt; &gt;=C2=A0 =C2=A0text file<br>
<br>
</span>You have not commented this point. Any reader, human or program, hav=
e<br>
to verify its input. Just because you have a binary file you can&#39;t just=
<br>
do<br>
<br>
=C2=A0struct some_struct_type data;<br>
=C2=A0read(fd, data, sizeof(struct some_struct_type))<br>
<br>
and pretend that data will contain valid values.</blockquote><div><br></div=
><div style=3D"">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.</div><div><br></div><div>=C2=A0</div><blockquote class=3D=
"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding=
-left:1ex"><span class=3D"">
&gt; &gt; . if your binary file is in some way invalid, you will have a gre=
ater<br>
&gt; &gt;=C2=A0 =C2=A0problem correcting it than a text file<br>
&gt; &gt; . discussing why a file is invalid is easier with a text file<br>
&gt; &gt; . a binary file might be smaller, but that does not matter much<b=
r>
&gt; &gt; . text files are better provided for by version systems (e.g. git=
)<br>
&gt; &gt; . it is easier to write tools that write text than binary, becaus=
e<br>
&gt; &gt;=C2=A0 =C2=A0debugging the output is easier<br>
&gt; Regarding vcs of text data files for GUI program, it&#39;s a stretch t=
o claim<br>
&gt; that the fact that they&#39;re text makes them much more compatible.=
=C2=A0 The diffs<br>
&gt; are only useful for the most trivial of cases.<br>
<br>
</span>You used the word &quot;better&quot;, now are you judging things aro=
und<br>
&quot;compatible&quot;. What do you want ?<br>
If you want &quot;compatible&quot;, then compatible to what ?<br>
<br>
I write a sym/fp-generators and I prefer text output; I can check the<br>
output both &quot;textually&quot; and &quot;visually&quot;.<br>
<br>
The diffs out the output of thoose generators are valueable when<br>
debugging.<br>
<br>
You might think of gschem and pcb as gui programs, but there is<br>
ifrastructure around them which is not gui. Don&#39;t think about their fil=
es<br>
in the same way as a png or jpg, where the fileformats are well<br>
entrenched and infrastructure is available.<br>
<span class=3D""><br>
&gt;=C2=A0 For it to be really useful<br>
&gt; you need a (non-text) diff viewer of=C2=A0 some sort.<br>
<br>
</span>A graphical-diff is provided by<br>
<br>
=C2=A0<a href=3D"http://www.imagemagick.org/Usage/compare/" rel=3D"noreferr=
er" target=3D"_blank">http://www.imagemagick.org/Usage/compare/</a><br>
<br>
You can generate png&#39;s from sch/pcb files and use that program for<br>
graphical-diffs.<br></blockquote><div><br></div><div style=3D"">Not a bad w=
ay I&#39;ll have to try it.</div><div>=C2=A0</div><blockquote class=3D"gmai=
l_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left=
:1ex">
It would be very useful for regression tests, other projects have been<br>
successful at that.<br>
<br>
&gt; All the rest of the above still boil down to examples of things that a=
re<br>
&gt; easier because you can see the data, and therefore manipulate and vali=
date<br>
&gt; it more easily.<br>
<br>
No, validate input and size, is not about &quot;easier to see&quot;.<br>
<br>
But...<br>
Why do you want to remove the text format for me ?<br></blockquote><div><br=
></div><div style=3D"">I don&#39;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&#39;t worry Jon I don&#39;t want to do .sch files :)</div><d=
iv>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex=
;border-left:1px #ccc solid;padding-left:1ex">
What are your complaint of having a textual file format ?<br></blockquote><=
div><br></div><div style=3D"">My problems with our current formats are:</di=
v><div style=3D""><br></div><div style=3D"">=C2=A0 * They&#39;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.</div><div style=3D""><br></div><div st=
yle=3D"">=C2=A0 * They occupy a weird middle ground on readability: not bin=
ary, but a bunch of nameless numeric fields.=C2=A0 It&#39;s not a huge issu=
e but it&#39;s annoying.</div><div style=3D"">=C2=A0 =C2=A0 Catalogs and th=
e like were being discussed and I was just saying I don&#39;t entirely like=
 that way because then you still can&#39;t interpret a single piece of data=
 in isolation.=C2=A0 If you&#39;re going text go whole-hog and get the maxi=
mum readability benefits possible is what I say.</div><div><br></div><block=
quote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc=
 solid;padding-left:1ex">
By dropping the text you loose something, what is the gain of a binary<br>
format that outweights that ?<br></blockquote><div><br></div><div style=3D"=
">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).</div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"marg=
in:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
&gt; &gt; Also, there is no reason to change a file format unless you chang=
e the<br>
&gt; &gt; functionality it provides, I have to &quot;side heavily&quot; wit=
h John on this.<br>
&gt; &gt; If you want to change the file format, you first have to provide =
some<br>
&gt; &gt; goodies that will make people to accept it. And no such &quot;goo=
die&quot;<br>
&gt; &gt; thing has appeared.<br>
<span class=3D"">&gt; A little while back a PhD Stefan Salewski put togethe=
r a very good start on<br>
&gt; a very nice router.=C2=A0 IIRC he said 300-400 hours of effort, probab=
ly about<br>
&gt; $100k worth with overhead in the american market.=C2=A0 It&#39;s not C=
 (for good<br>
&gt; reasons) and currently can&#39;t talk to pcb at all.=C2=A0 I would lik=
e to somehow<br>
&gt; arrange things such than efforts like this could maybe get used.<br>
<br>
</span>In what way does his work relate to a decision about text contra bin=
ary<br>
file format.<br></blockquote><div><br></div><div style=3D"">It doesn&#39;t,=
 it relates to the current text format versus ones that script languages (S=
tefan&#39;s work is in Ruby for example) could easily read.</div><div>=C2=
=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;borde=
r-left:1px #ccc solid;padding-left:1ex">
&gt; &gt; You might write a library that reads and writes the files and if =
people<br>
&gt; &gt; find it useful, they will start using it, else, it will be just y=
our own<br>
&gt; &gt; project.<br>
&gt; True.=C2=A0 It might be useless but should at least be non-destructive=
.<br>
<br>
I thought you are for a fileformat library. I&#39;m I wrong ?<br>
But now you say that such a library is useless. Did I get that right ?<br><=
/blockquote><div><br></div><div style=3D"">No, it started out as a discussi=
on about exactly why text formats are good and took a misleading turn.</div=
><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .=
8ex;border-left:1px #ccc solid;padding-left:1ex">
I think a fileformat library would be useful, but I still<br>
would like a textual format for sch/sym/pcb/fp files.<br></blockquote><div>=
<br></div><div style=3D"">Agreed.</div><div>=C2=A0</div><div style=3D"">Bri=
tton</div><div><br></div></div></div></div>

--001a114242a406fc130528b2c9d8--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019