delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2016/07/23/22:38:10

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=date:from:to:subject:message-id:mail-followup-to:mime-version
:content-disposition:user-agent;
bh=/nDgd2lR//ss/1PJepaarIXkzZbNl9JwrlIWQBs0APM=;
b=pvGYXc8ooL+p2qm9D0OGNJCUBGhhJYhkPrap4bAT9zweN/6qcEb9IOYjCJIX2lg6Vl
rhLLC3cfsdphWvp9DkZdY8TNKuAW9jiuoGW957bQiYgAVzfF4HhiK8kVBfGf40bFC3g+
JIdwezoPeWAzDqJr9w5wxFI9OKnOcg3u1LGJkZfNmDntOPlwGgrRkPdlHDSK9vwiLU8S
Nmfs8kZ7DKgcZA7uzk6UUo7tCl6Ks/rPdKR3Ps5e3AzNmSqHJJBCEbwSC3Qb+n/QPSho
8wfAEpT1JjV92xujVVSASN/qz6kCVwrYsYtqNajSFlDB0Wqcn5Cu+dM1HbnGCb9ScPxi
/Ybg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20130820;
h=x-gm-message-state:date:from:to:subject:message-id:mail-followup-to
:mime-version:content-disposition:user-agent;
bh=/nDgd2lR//ss/1PJepaarIXkzZbNl9JwrlIWQBs0APM=;
b=Zl2rQK+FZf7906CducFPolAmCK277BV7xFoj+e84DwqHsvwRszt33AtjdPLthCG3xo
BfDs1B4t4xn09f2wny5XARBlZ9CVF9Zkci5MPCtsiZJT5c1Y4I3W2RtXuK/dQn/bL76g
YWmQt9HBc6e0YgmV/45hRTEzLg3ms2urUzvBKZpeW0WXGNGSNLfhVkpR6xZ1rqEbJMUP
qMpX5ZJfbbyNb1yyHSMIxo4mfuaDHhhXB4AE7oGvSDXqGVMeh0jHyo7QtK2xAjyNYdDv
BFX+7rkWZEFO4xSJMPmdu2sHl1WjXrKgP+jQ09iIUsx2+ULpKBrp7L/2Ep1xnavGVqoc
fctw==
X-Gm-Message-State: AEkoouuVON6p61rSdlM8oseaZdokI485m81Rdx3Dh7UbLlY8kNGJ5HBmORwJfDlM7wyL+A==
X-Received: by 10.25.169.213 with SMTP id s204mr5586732lfe.57.1469327779259;
Sat, 23 Jul 2016 19:36:19 -0700 (PDT)
Date: Sun, 24 Jul 2016 05:36:16 +0300
From: "Vladimir Zhbanov (vzhbanov AT gmail DOT com) [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com>
To: geda-user AT delorie DOT com
Subject: [geda-user] gEDA and xml/sxml
Message-ID: <20160724023616.GJ17595@localhost.localdomain>
Mail-Followup-To: geda-user AT delorie DOT com
MIME-Version: 1.0
User-Agent: Mutt/1.5.23 (2014-03-12)
Reply-To: geda-user AT delorie DOT com

Some time ago I was reading about sxml and decided to try to build
it some day. Sxml is scheme representation of XML which is more
simple. Say, you could represent schematic as:
  (schematic
    name
    (@ params)
    (page1)
    (page2)
    ...
    )
And every page as:

  (page
    page-name
    (@ params)
    (symbols (symbol1) (symbol2) ...)
    objects)

where objects are just primitives and symbols we usually have in
our schematics.

Roland's effort caused me to try to work on it and I decided, if I
do something useful during my week at work, I'll continue to work
on it. It occured to be not so difficult as I expected. About
three hours was needed to write the page->sxml conversion
procedure based on what we now have in libgeda, and about three
days (including reading on XML, fighting against bugs in libpango,
which seem to be uncurable, searching for workarounds, and
fighting against bugs in guile itself, which seem to be fixed in
later versions ;-)). I should admit, the bug with bytevectors in
guile 2.0.11 has not allowed me to do the last step: to transform
a bytevector written as sxml back to a picture. I've just commited
the last piece of code where I attempted to win pictures, but it
doesn't work with my sample picture, yielding an error with some
strange message about wrong byte conversion. (I know the way to
work-around it, but it is not important now.) Anyway, any help is
appreciated. Now, you may see, that almost all schematic
primitives (excluding pictures) are easily converted to and from
sxml. For that, I used the simplest scheme procedure in the tree
folding species `pre-post-order'. There exist much more powerful
and slightly more complex alternatives like foldt and foldts and
their variations we could use, too. Anyway, I have to learn more
scheme and XML to do things better.

The rough code is yet at [1]. If you look at it, you'll see the
gui-something-procedure at the end which I used to check things
working in Emacs Geiser, that is, in another thread, and it
occured, some low-level C libraries are not thread-safe. So,
basically, I used gdk-threeds-enter, then the function I need, and
then gdk-threeds-leave to work-around the issue.

So the result I have is both yes and no, but more yes than no :-)

I've not read Roland's code and documentation yet, but am hoping
we could join our efforts to make things better in gEDA.

What do you think, dear users and developers?

[1] https://github.com/vzh/geda-gaf/tree/sxml

-- 
  Vladimir

- Raw text -


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