www.delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2016/01/02/20:08:06

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=HWMlSKgewZqgkgTE688giB9sCQQ8Z4JeTsCemtaLp50=;
b=cH+WmEESt9K7LRpC7VlTlMFSrVBjIEJsFwOtVUKyjTbIklPAleLbQqZQ7MDspsGbLF
rU2ALberishUEsyx7kXiUHwCJRMWtu1GjpDIS8240ADerYasgCcrrUfwl1a2r2bvaDPu
+jcCN/q3AMKQsMikBp1AC5m0ZOZ028qEzRZtb7rU4pvFoznsR+2gSTaVDqYH1Lv/omNK
aUnx9MyITKl+W40U4hFSoiJH8fUjh5h+Z0ZmdwGP50vY62Z42tZ/Rz0HLtbOgGjl4aDy
tT//IYyS+RahLKJpi8Crch/mucu4/ZtpNn2C/RYV7T/7RGREJ5X6uCnky7jNKYKkFGsN
RPBQ==
MIME-Version: 1.0
X-Received: by 10.28.48.131 with SMTP id w125mr73281671wmw.18.1451783259809;
Sat, 02 Jan 2016 17:07:39 -0800 (PST)
In-Reply-To: <D9825C8C-B6FD-4C7F-A8D5-B8AF06253B72@noqsi.com>
References: <1512221837 DOT AA25291 AT ivan DOT Harhan DOT ORG>
<CAJXU7q_mXmipJ1fLvLpuLvnYjktV2SHoA+bG=L5+E-EfdygeOA AT mail DOT gmail DOT com>
<s6n37uumanm DOT fsf AT blaulicht DOT dmz DOT brux>
<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>
Date: Sat, 2 Jan 2016 16:07:38 -0900
Message-ID: <CAC4O8c_R5xWLmzj_cz0g0mPWNs6mR4efjXKGBoup8YO6nwnPTA@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

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

On Sat, Jan 2, 2016 at 3:26 PM, John Doty <jpd AT noqsi DOT com> wrote:

>
> On Jan 2, 2016, at 5:04 PM, Roland Lutz <rlutz AT hedmen DOT org> wrote:
>
> > On Thu, 24 Dec 2015, Peter Clifton (petercjclifton AT googlemail DOT com) [via
> > geda-user AT delorie DOT com] wrote:
> >> Getting the data model right is almost completely independent of the
> rest - even if some may work more elegantly than others.
> >>
> >> Getting the data model right is also the hard bit - unfortunately.
> >
> > I absolutely agree.  I've been working hard to get the in-memory data
> representation for Xorn right, and the main thing which keeps me from
> defining PCB object types right now is that I haven't found a convincing
> data model for these yet.
> >
> > On Sun, 27 Dec 2015, Britton Kerin (britton DOT kerin AT gmail DOT com) [via
> geda-user AT delorie DOT com] wrote:
> >> Simple though it is, the effort of parsing it is not zero and is mostly
> a waste.  Modern language have built-in serialization, and with YAML you
> get a cross-language version of that plus a well-defined human-readable
> file format.  What's not to like?
> >
> > The part of parsing a .sym/.sch file which can potentially become easier
> with YAML is as simple as a sscanf(3).
>
> Except that what we have is already easy to parse with sscanf() and other
> things. We have a lot of infrastructure based on what we have: symbol
> generators, refdes renumberers, ...
>

As I've mentioned previously I'm talking pcb, which is a more painful
format to parse (such that so far as I'm aware the parser in pcb is the
only one).  Personally I find formats like this:

  device=RESISTOR
  T 44400 49300 5 10 1 1 90 0 1

substantially less readable than ones with field names, but they are indeed
easy to parse.  The pcb format is quite a bit more elaborate and the
savings from not rolling your own parser are more significant.


> >  After extracting the value strings from the file, you still have parse
> and validate them no matter whether they have been stored in a .sym/.sch or
> YAML file.
>

True.  One of the nutty things about XML as people tried to use it was the
notion that it can somehow validate the data.  Trying to do that just
causes schizophrenia about where validation should happen and I wouldn't
attempt it.  That needs an API like libgeda.  However, a lot of potential
application may just want to get the file parsed, and trust themselves to
make some valid modifications.  This can fairly easily be provided.  If
Xorn later supersedes direct use of YAML with a full validating load/save
for the language in question, wonderful.

I think you're criteria for what should go in libgeda are spot-on btw.  Nor
do I have any problem with a C interface calling python or gschem or for
that matter C++.  I do think providing a clean C interface to libgeda gets
by far the best return on investment, since it's so widely known and with a
little care wrappers can then be provided almost automatically for a wide
variety of languages (via SWIG or some other similar mechanism -- or maybe
Xorn facilitates this, I'm a little unclear).

Britton

--001a114242a47df1db052863a13d
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<br><div class=3D"gmail_quote">On Sat, Jan 2, 2016 at 3:26 PM, John Doty <s=
pan dir=3D"ltr">&lt;<a href=3D"mailto:jpd AT noqsi DOT com" target=3D"_blank">jpd@=
noqsi.com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=
=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span cl=
ass=3D""><br>
On Jan 2, 2016, at 5:04 PM, Roland Lutz &lt;<a href=3D"mailto:rlutz AT hedmen.=
org">rlutz AT hedmen DOT org</a>&gt; wrote:<br>
<br>
&gt; On Thu, 24 Dec 2015, Peter Clifton (<a href=3D"mailto:petercjclifton AT g=
ooglemail.com">petercjclifton AT googlemail DOT com</a>) [via<br>
&gt; <a href=3D"mailto:geda-user AT delorie DOT com">geda-user AT delorie DOT com</a>] wr=
ote:<br>
&gt;&gt; Getting the data model right is almost completely independent of t=
he rest - even if some may work more elegantly than others.<br>
&gt;&gt;<br>
&gt;&gt; Getting the data model right is also the hard bit - unfortunately.=
<br>
&gt;<br>
&gt; I absolutely agree.=C2=A0 I&#39;ve been working hard to get the in-mem=
ory data representation for Xorn right, and the main thing which keeps me f=
rom defining PCB object types right now is that I haven&#39;t found a convi=
ncing data model for these yet.<br>
&gt;<br>
&gt; On Sun, 27 Dec 2015, Britton Kerin (<a href=3D"mailto:britton DOT kerin AT gm=
ail.com">britton DOT kerin AT gmail DOT com</a>) [via <a href=3D"mailto:geda-user AT delo=
rie.com">geda-user AT delorie DOT com</a>] wrote:<br>
&gt;&gt; Simple though it is, the effort of parsing it is not zero and is m=
ostly a waste.=C2=A0 Modern language have built-in serialization, and with =
YAML you get a cross-language version of that plus a well-defined human-rea=
dable file format.=C2=A0 What&#39;s not to like?<br>
&gt;<br>
&gt; The part of parsing a .sym/.sch file which can potentially become easi=
er with YAML is as simple as a sscanf(3).<br>
<br>
</span>Except that what we have is already easy to parse with sscanf() and =
other things. We have a lot of infrastructure based on what we have: symbol=
 generators, refdes renumberers, ...<br></blockquote><div><br>As I&#39;ve m=
entioned previously I&#39;m talking pcb, which is a more painful format to =
parse (such that so far as I&#39;m aware the parser in pcb is the only one)=
.=C2=A0 Personally I find formats like this:<br><br>=C2=A0 device=3DRESISTO=
R<br>=C2=A0 T 44400 49300 5 10 1 1 90 0 1<br><br>substantially less readabl=
e than ones with field names, but they are indeed easy to parse.=C2=A0 The =
pcb format is quite a bit more elaborate and the savings from not rolling y=
our own parser are more significant.<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;=C2=A0 After extracting the value strings from the file, you still have=
 parse and validate them no matter whether they have been stored in a .sym/=
.sch or YAML file.<br></span></blockquote><div><br>True.=C2=A0 One of the n=
utty things about XML as people tried to use it was the notion that it can =
somehow validate the data.=C2=A0 Trying to do that just causes schizophreni=
a about where validation should happen and I wouldn&#39;t attempt it.=C2=A0=
 That needs an API like libgeda.=C2=A0 However, a lot of potential applicat=
ion may just want to get the file parsed, and trust themselves to make some=
 valid modifications.=C2=A0 This can fairly easily be provided.=C2=A0 If Xo=
rn later supersedes direct use of YAML with a full validating load/save for=
 the language in question, wonderful.<br><br>I think you&#39;re criteria fo=
r what should go in libgeda are spot-on btw.=C2=A0 Nor do I have any proble=
m with a C interface calling python or gschem or for that matter C++.=C2=A0=
 I do think providing a clean C interface to libgeda gets by far the best r=
eturn on investment, since it&#39;s so widely known and with a little care =
wrappers can then be provided almost automatically for a wide variety of la=
nguages (via SWIG or some other similar mechanism -- or maybe Xorn facilita=
tes this, I&#39;m a little unclear).<br>=C2=A0<br>Britton<br></div></div>

--001a114242a47df1db052863a13d--

- Raw text -


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