Mail Archives: geda-user/2015/02/08/13:22:37
On Feb 8, 2015, at 10:55 AM, Christian Riggenbach <criggenbach AT magahugu DOT ch> wrote:
> On Sunday 08 February 2015 10.09:06 you wrote:
>> 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.
>
> The workflow would look like this:
>
> 1. start the lua core and load custom modules like eg. filesystem or hex-
> parser, some global defaults and the custom functions for geda (like
> netlisting, data objects for lines, pins etc)
> 2. load and parse all config+macro files: system, user then local (like todays
> gafrc and friends)
> 3. load and parse the schematic
>
> Now you have all the data inclusive the middle layer in the lua core,
A step backward from the files unless you’re writing in Lua. Any application can read a file, but FFI’s are messy.
> so you
> don't have an internal representation per application anymore (or just for
> specialised tasks like graphical representation or sorting algorithms). The
> core is ready to exchange the data back with gschem/gnetlist/etc.
Except that every application needs an internal representation that’s different from Lua’s if it’s not in Lua.
>
> 4. seriealise it back to the schematic file to save the data.
>
> gnetlist would then just be a simple wrapper around lua to do point 1-3, load
> a custom script (or an interactive prompt) and point 4.
But gnetlist already does 1-3. That’s not the hard part, so you haven’t helped. All you’ve done is break a lot of existing code.
> In all whole suite,
> you would have the exact same API to access the data, either with C code or
> directly in lua.
Python? AWK? Perl? Scheme? Matlab? C and Lua are not the universe. But any of these can read a line-oriented file, especially one that’s essentially pre-parsed.
John Doty Noqsi Aerospace, Ltd.
http://www.noqsi.com/
jpd AT noqsi DOT com
- Raw text -