delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2016/01/02/23:27:45

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=nr8lymO3z3r+Z+00micJfsazh5ulcd8INyA70gotU3Q=;
b=xkyUnVzHY5nDXpyIb4nkrypIaBTAoXYllzras5JIGKxQaTqXPxHKQBgPMeBPZOzUmC
QU8X/U8mGnDzcG8yhCpfvn3UnBGD4PpcKgiEbHgK7qSLRIX4SLW5rmdhL6CiDCXzGIln
HPabQz1J7AlMiLuXlPfyUPJ7tzrjMr6LOyn1TlT1DWl4k4pHT2ON8eqwzEYMURZZ07U3
TVDxcmbVQ+D8Z1yDrcdtPioNbdDAxq6ScgtAAgzOEWlKNMj7SNCsXulfSjs08Fj9jIBb
OLrF9XmlhYUY+FKC0ox1f+0sN3HCU44kkFBQxDU6j7138WBCK/lKm5+QJ/xQmpiYATsj
y9HA==
MIME-Version: 1.0
X-Received: by 10.28.3.133 with SMTP id 127mr97260192wmd.101.1451795232438;
Sat, 02 Jan 2016 20:27:12 -0800 (PST)
In-Reply-To: <AE426D72-46DE-4941-9D58-95015A10C6EA@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>
<F498BB93-D43D-4E98-AC8B-5711ADC3DF41 AT noqsi DOT com>
<CAC4O8c-5S-PgE=RFXrAG2xRzmV4x3odVip0eUwih-iEzXs-UOg AT mail DOT gmail DOT com>
<AE426D72-46DE-4941-9D58-95015A10C6EA AT noqsi DOT com>
Date: Sat, 2 Jan 2016 19:27:11 -0900
Message-ID: <CAC4O8c93CJm5LRehr28zzUTa6eqG9QQgBUMCz=zNpiwZPGOk4Q@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

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

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

>
> On Jan 2, 2016, at 7:47 PM, Britton Kerin (britton DOT kerin AT gmail DOT com) [via
> geda-user AT delorie DOT com] <geda-user AT delorie DOT com> wrote:
>
>
>
> On Sat, Jan 2, 2016 at 4:38 PM, John Doty <jpd AT noqsi DOT com> wrote:
>
>>
>> On Jan 2, 2016, at 6:07 PM, Britton Kerin (britton DOT kerin AT gmail DOT com) [via
>> geda-user AT delorie DOT com] <geda-user AT delorie DOT com> wrote:
>>
>> Personally I find formats like this:
>>
>>   device=3DRESISTOR
>>   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.
>>
>>
>> Personally, I rarely edit these things manually except for the text
>> fields, which are not difficult to find. The fact that they=E2=80=99re e=
asy to
>> parse is handy for automation.
>>
>>   The pcb format is quite a bit more elaborate and the savings from not
>> rolling your own parser are more significant.
>>
>> 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 libged=
a
>> gets by far the best return on investment, since it's so widely known an=
d
>> with a little care wrappers can then be provided almost automatically fo=
r a
>> wide variety of languages (via SWIG or some other similar mechanism -- o=
r
>> maybe Xorn facilitates this, I'm a little unclear).
>>
>>
>> I don=E2=80=99t find deconstructing C data structures particularly easie=
r than
>> parsing the format above. Just another layer I have to penetrate to get =
to
>> the data. I do significant processing with simple things like sed, which
>> don=E2=80=99t handle binary data.
>>
>> Wrappers CAN be provided, but will they? FFI programming is not the
>> easiest thing. I hear  complaints about the need for developers to maint=
ain
>> code. It seems to me that one way to address these concerns is to avoid =
and
>> eliminate unnecessary code.
>>
>
> Good question.  It's a great result if you get it but a lot more work tha=
n
> using a serialization library, which is why the latter approach seems to =
me
> like a useful step in the right direction.
>
> Serialization library? Why do you want a extra, unnecessary, opaque
> interface? What, exactly, are you trying to accomplish?
>

Two things:

    1.  A human- and partial-parser-script-readable format

    2.  Full parsers for as many languages as possible without writing them
by hand

Now take a look at the design goals for YAML:

    http://www.yaml.org/spec/1.2/spec.html#id2708649

It's a good fit.  If it was only a matter of the technical merits I would
say as close to perfect as it gets with software.
Unfortunately there's the usual good-versus-most-popular trade-off in
deciding between YAML and JSON.  I still favor YAML in this case, largely
because I can't look at people like you and honestly claim that JSON is in
all respects fun to read/edit/sed over etc., and because my personal
experience with JSON is that although the parsers are truly ubiquitous they
have some annoying characteristics  (at least the Perl one does).

Britton

--001a114527821dbd4a0528666bbf
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 Sat, Jan 2, 2016 at 6:07 PM, John Doty <span dir=3D"ltr">&lt;<a href=
=3D"mailto:jpd AT noqsi DOT com" target=3D"_blank">jpd AT noqsi DOT com</a>&gt;</span> wr=
ote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex=
;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style=
:solid;padding-left:1ex"><div style=3D"word-wrap:break-word"><br><div><div>=
On Jan 2, 2016, at 7:47 PM, Britton Kerin (<a href=3D"mailto:britton.kerin@=
gmail.com" target=3D"_blank">britton DOT kerin AT gmail DOT com</a>) [via <a href=3D"m=
ailto:geda-user AT delorie DOT com" target=3D"_blank">geda-user AT delorie DOT com</a>] &=
lt;<a href=3D"mailto:geda-user AT delorie DOT com" target=3D"_blank">geda-user AT del=
orie.com</a>&gt; wrote:</div><br><blockquote type=3D"cite"><div dir=3D"ltr"=
><br><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">On Sat, Jan =
2, 2016 at 4:38 PM, John Doty <span dir=3D"ltr">&lt;<a href=3D"mailto:jpd AT n=
oqsi.com" target=3D"_blank">jpd AT noqsi DOT com</a>&gt;</span> wrote:<br><blockqu=
ote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left-wid=
th:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-l=
eft:1ex"><div style=3D"word-wrap:break-word"><br><div><span><div>On Jan 2, =
2016, at 6:07 PM, Britton Kerin (<a href=3D"mailto:britton DOT kerin AT gmail DOT com"=
 target=3D"_blank">britton DOT kerin AT gmail DOT com</a>) [via <a href=3D"mailto:geda=
-user AT delorie DOT com" target=3D"_blank">geda-user AT delorie DOT com</a>] &lt;<a href=
=3D"mailto:geda-user AT delorie DOT com" target=3D"_blank">geda-user AT delorie DOT com</=
a>&gt; wrote:</div><br><blockquote type=3D"cite"><div style=3D"font-family:=
Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:=
normal;letter-spacing:normal;line-height:normal;text-align:start;text-inden=
t:0px;text-transform:none;white-space:normal;word-spacing:0px">Personally I=
 find formats like this:<br><br>=C2=A0 device=3DRESISTOR<br>=C2=A0 T 44400 =
49300 5 10 1 1 90 0 1<br><br>substantially less readable than ones with fie=
ld names, but they are indeed easy to parse.</div></blockquote><div><br></d=
iv></span>Personally, I rarely edit these things manually except for the te=
xt fields, which are not difficult to find. The fact that they=E2=80=99re e=
asy to parse is handy for automation.</div><div><br><blockquote type=3D"cit=
e"><span><div style=3D"font-family:Helvetica;font-size:12px;font-style:norm=
al;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height=
:normal;text-align:start;text-indent:0px;text-transform:none;white-space:no=
rmal;word-spacing:0px">=C2=A0 The pcb format is quite a bit more elaborate =
and the savings from not rolling your own parser are more significant.<br><=
/div><div style=3D"font-family:Helvetica;font-size:12px;font-style:normal;f=
ont-variant:normal;font-weight:normal;letter-spacing:normal;line-height:nor=
mal;text-align:start;text-indent:0px;text-transform:none;white-space:normal=
;word-spacing:0px"><br></div></span><span><div style=3D"font-family:Helveti=
ca;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;=
letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;t=
ext-transform:none;white-space:normal;word-spacing:0px">I think you&#39;re =
criteria for what should go in libgeda are spot-on btw.=C2=A0 Nor do I have=
 any problem 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 return on investment, since it&#39;s so widely known and with a l=
ittle care wrappers can then be provided almost automatically for a wide va=
riety of languages (via SWIG or some other similar mechanism -- or maybe Xo=
rn facilitates this, I&#39;m a little unclear).</div></span></blockquote><b=
r></div><div>I don=E2=80=99t find deconstructing C data structures particul=
arly easier than parsing the format above. Just another layer I have to pen=
etrate to get to the data. I do significant processing with simple things l=
ike sed, which don=E2=80=99t handle binary data.</div><div><br></div><div>W=
rappers CAN be provided, but will they? FFI programming is not the easiest =
thing. I hear =C2=A0complaints about the need for developers to maintain co=
de. It seems to me that one way to address these concerns is to avoid and e=
liminate unnecessary code.</div></div></blockquote><div><br></div><div>Good=
 question.=C2=A0 It&#39;s a great result if you get it but a lot more work =
than using a serialization library, which is why the latter approach seems =
to me like a useful step in the right direction.</div></div></div></div></b=
lockquote>Serialization library? Why do you want a extra, unnecessary, opaq=
ue interface? What, exactly, are you trying to accomplish?</div></div></blo=
ckquote><div><br></div><div style=3D"">Two things:=C2=A0</div><div style=3D=
""><div><br></div><div>=C2=A0 =C2=A0 1.=C2=A0 A human- and partial-parser-s=
cript-readable format</div><div><br></div></div><div style=3D"">=C2=A0 =C2=
=A0 2.=C2=A0 Full parsers for as many languages as possible without writing=
 them by hand</div><div style=3D""><br></div><div style=3D"">Now take a loo=
k at the design goals for YAML:</div><div style=3D""><br></div><div>=C2=A0 =
=C2=A0 <a href=3D"http://www.yaml.org/spec/1.2/spec.html#id2708649">http://=
www.yaml.org/spec/1.2/spec.html#id2708649</a></div><div><br></div><div styl=
e=3D"">It&#39;s a good fit.=C2=A0 If it was only a matter of the technical =
merits I would say as close to perfect as it gets with software.</div><div =
style=3D"">Unfortunately there&#39;s the usual good-versus-most-popular tra=
de-off in deciding between YAML and JSON.=C2=A0 I still favor YAML in this =
case, largely because I can&#39;t look at people like you and honestly clai=
m that JSON is in all respects fun to read/edit/sed over etc., and because =
my personal experience with JSON is that although the parsers are truly ubi=
quitous they have some annoying characteristics =C2=A0(at least the Perl on=
e does).</div><div style=3D""><br></div><div style=3D"">Britton</div><div s=
tyle=3D""><br></div></div></div></div>

--001a114527821dbd4a0528666bbf--

- Raw text -


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