www.delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2015/02/08/13:11:00

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
X-TCPREMOTEIP: 207.224.51.38
X-Authenticated-UID: jpd AT noqsi DOT com
Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\))
Subject: Re: [geda-user] Using Lua to safely read configuration and layout files (program attached)
From: John Doty <jpd AT noqsi DOT com>
In-Reply-To: <C26D592D-04B1-4AB0-9F32-6D5A537EBAF4@icloud.com>
Date: Sun, 8 Feb 2015 11:09:42 -0700
Message-Id: <638942CE-E278-40ED-8C36-6A89C33FD158@noqsi.com>
References: <CAOFvGD7pJTo8A=MXVbuuXO=++0vGukUyqVfckVtnCi99ziqWJQ AT mail DOT gmail DOT com> <3709636 DOT NVszrDDjOR AT jasum> <20150208135925 DOT 6f6ddab6 AT Parasomnia DOT thuis DOT lan> <1897145 DOT BbSdS1MRWc AT jasum> <EE929E31-B2C7-48BF-BA49-B2E728DB99C3 AT noqsi DOT com> <66DD3BF9-092C-4EFF-B12D-6214141C152D AT icloud DOT com> <52E0C8E3-2FD3-4D79-A01D-962E7EFA6D4F AT noqsi DOT com> <C26D592D-04B1-4AB0-9F32-6D5A537EBAF4 AT icloud DOT com>
To: geda-user AT delorie DOT com
X-Mailer: Apple Mail (2.1878.6)
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id t18I9lRp022645
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 Feb 8, 2015, at 10:44 AM, Chris Smith <space DOT dandy AT icloud DOT com> wrote:

> 
>> On 8 Feb 2015, at 17:09, John Doty <jpd AT noqsi DOT com> wrote:
>> 
>>> On Feb 8, 2015, at 9:41 AM, Chris Smith <space DOT dandy AT icloud DOT com> wrote:
>>> Yes! And that's the main point to using Lua for the data format. The data file _is_ the internal representation.
>> 
>> In Lua’s representation. Not as a Scheme data structure. You have exactly the same problem the C implementation has: you must expose the data through a Scheme API. You’re not really solving any problems, just torquing the design to fit your Lua prejudice.
> 
> I had thought getting rid of Scheme was one of the design goals, and in my view that is solving a problem. :)

We’re not going to throw away all those gnetlist back ends (I wrote another one yesterday). That would be disaster. But a pynetlist would be nice as an alternative. Lua’s only a good choice for a virtual EDA workshop inside WOW ;-)

> 
> Joking aside, the issue is that the gschem format isn't native to any language,

Yes!

> and anything that uses it must parse it for it to be of any use.

But it’s trivial. The hard part isn’t parsing. Its the next step: transforming the data into what you need. Seriously, the .sch format is so simple that it you might as well consider it already parsed until you start talking about the specific needs of a specific application in a specific language.

> Any application parser (as shown by the netlister) is usually incomplete,

No, gnetlist’s parser is complete. It just doesn’t expose everything it parses through the Scheme API.

> because it's considered a waste of effort to parse features that you don't think people will want and it's difficult to predict how people will use it. By using a well defined format like Lua, /everything/ is parsed and made available because it /has/ to be.

No, now you make everybody deal with an FFI to Lua data structures. It’s not an improvement. You have to solve all of the same problems, and now you have an additional unnecessary software dependency.

John Doty              Noqsi Aerospace, Ltd.
http://www.noqsi.com/
jpd AT noqsi DOT com



- Raw text -


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