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 Content-Type: text/plain; charset=windows-1252 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 In-Reply-To: Date: Sun, 8 Feb 2015 11:09:42 -0700 Message-Id: <638942CE-E278-40ED-8C36-6A89C33FD158@noqsi.com> References: <3709636 DOT NVszrDDjOR AT jasum> <20150208135925 DOT 6f6ddab6 AT Parasomnia DOT thuis DOT lan> <1897145 DOT BbSdS1MRWc AT jasum> <66DD3BF9-092C-4EFF-B12D-6214141C152D AT icloud DOT com> <52E0C8E3-2FD3-4D79-A01D-962E7EFA6D4F AT noqsi DOT com> To: geda-user AT delorie DOT com X-Mailer: Apple Mail (2.1878.6) Content-Transfer-Encoding: 8bit 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 Precedence: bulk On Feb 8, 2015, at 10:44 AM, Chris Smith wrote: > >> On 8 Feb 2015, at 17:09, John Doty wrote: >> >>> On Feb 8, 2015, at 9:41 AM, Chris Smith 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