www.delorie.com/archives/browse.cgi | search |
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=rBRze9VEd7EbUg4S1D51M/C3y6w7Q+K8TUnxnAQA9j0=; | |
b=Hej88Snd21ZmdxY1mMJfw3rdqHwFKMpTVH4k9ckec7swxPTt17QOJaLIAyoCPG/MSA | |
SHds0Yx1ObX+N6S7m707Fnzjdxcvob+SWOpcd19ByMmtUaDQ/x7/dsV6esZPpaEZBW6t | |
j9yn/Z0wLEnxKna+O08Ev33S+sqImWQKYEXAT2/4+aq19T+yhrdHqdrLn9wac/y3lszN | |
g4DTmvXUPqdqfp5GNiy3hFXphZNNNOM5e+l9Qk9ctSQqh/yo+IKsrur2S/V+7G6/W03a | |
A+yO9ECMcVN9FrcuGuSAyMOKQ8/Fr3K+0eNPjMdPjGIpN3e+QGyHY+0GtyNRL7AOkmsN | |
mB+g== | |
MIME-Version: | 1.0 |
X-Received: | by 10.194.104.200 with SMTP id gg8mr19710089wjb.144.1442160975032; |
Sun, 13 Sep 2015 09:16:15 -0700 (PDT) | |
In-Reply-To: | <20150913004237.6f386c69@jive.levalinux.org> |
References: | <CAC4O8c_XFEAgyrokrwwavB0C+OjWXCB5xptkVwMx2i_t960qFg AT mail DOT gmail DOT com> |
<201509120239 DOT t8C2dAiO026962 AT envy DOT delorie DOT com> | |
<CAC4O8c_hq9WSaRtv1dUZLyFW-UaPBs-95JGB94EevdiLp8gQtg AT mail DOT gmail DOT com> | |
<201509122223 DOT t8CMNhaZ024482 AT envy DOT delorie DOT com> | |
<20150913004237 DOT 6f386c69 AT jive DOT levalinux DOT org> | |
Date: | Sun, 13 Sep 2015 08:16:14 -0800 |
Message-ID: | <CAC4O8c9ry51bjhjsozikYeWxTX9gGhDo-AnjSC99W8AQj5M0Vw@mail.gmail.com> |
Subject: | Re: [geda-user] shortest way towards parsing .pcb files outside pcb |
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 |
On Sat, Sep 12, 2015 at 2:42 PM, Lev (leventelist AT gmail DOT com) [via geda-user AT delorie DOT com] <geda-user AT delorie DOT com> wrote: > On Sat, 12 Sep 2015 18:23:43 -0400 > DJ Delorie <dj AT delorie DOT com> wrote: > >> Another option here is to switch to a file format that's already >> supported by lots of other languages, like XML or YAML. Then the >> remaining work breaks down into: >> >> * Deciding on a schema for the data >> >> * converting pcb to read/write that schema >> >> Scripts wouldn't *need* to use pcb's parser, they could use any old >> parser library, since the scripts already know what the parts of the >> schema they're interested in look like. Read file, fiddle with the >> parts you know, write file leaving everything else intact. > > Yes! Exactly my dream! Yes this would be better. I think YAML is a really good choice. Its more human-readable and more expressive than JSON and there's an interface for every language. I would start with a 1-1 mapping to the existing format, to avoid changing multiple things at once and make backward compatibility easy to maintain. With this approach, deciding on a schema would really just mean picking names for any unnamed fields that we decide should have names. To the people who want a binary database format: I can see the attractions. Having the fastest possible parser could be a significant advantage in some situations. However, I think it's safe to say it will be a show-stopper for existing power users not well-versed in SQL. This is something I would be happy to start working on if there's any sort of consensus.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |