Mail Archives: geda-user/2021/07/13/13:13:47
On Tue, 13 Jul 2021, Peter Stuge (peter AT stuge DOT se) [via
geda-user AT delorie DOT com] wrote:
> Roland, please correct me if this is inaccurate.
>
> I understand xorn to mean the C++, C and Python code that works with
> instances of the expanded data model which covers all geda-gaf can do.
The stress is important: the data model covers that which all of geda-gaf
can work with (in contrast to: all that geda-gaf can work with).
Consider you are writing a script that generates a symbol for a given
subschematic. This script would have to create box, text, and pin
objects, add them to a symbol file, and then either write the symbol file
to disk or pass it on to gschem or gnetlist. If the data structure for a
pin object contained fields specific to UI or netlisting concepts, the
code would have to have knowledge of both gschem and gnetlist in order to
populate these fields correctly. But since the data model only contains
fields that any part of gEDA/gaf knows how to work with--like positions
and text values--any part can work with these objects without having to
bother with others' concepts.
> The C++ code is libxornstorage, which implements objects, attributes,
> object revisions, selections along with common operations.
Yes. It ensures these are always in a sane state, so bugs in one part of
gEDA/gaf won't cause unrelated problems in another part. Note that while
libxornstorage is implemented in C++, it has a plain C API.
> The C code bridges libxornstorage and Guile(!) to CPython.
Exactly.
> The Python code is the gnetlist, gaf and xorn commands and all the
> gnetlist backends, one of which (gnet_guile) uses the C bridge to Guile
> to run an existing backend written in Scheme.
Yes, but the "gaf" command is not part of that list.
> I understand that Roland has put significant effort into ensuring
> that this last feature is reliably backwards compatible. I overlooked
> the feature previously in this thread - sorry about that. :\
I did so. Not just existing Guile backends work with gnetlist, also a
significant portion of custom Guile code is supported. (I'm curious if
anyone actually uses that feature, though.)
Roland
- Raw text -