* generating SXML trees in guile
@ 2021-01-09 23:50 Matt Wette
0 siblings, 0 replies; only message in thread
From: Matt Wette @ 2021-01-09 23:50 UTC (permalink / raw)
To: guile-devel
This is a FYI, not saying this is a bug.
I'm digging into the sxml xpath procedures and came across a potential
issue with using sxml in Guile.
I believe I remember that Oleg's SXML code relies on the fact that no
nodes a sxml tree are eq?. For example, in the SXML tree
(define sx1 '(*TOP* (a "1") (a "1)))
node-parent in (sxml xpath) depends on the fact that
(eq? (list-ref sx1 1) (list-ref sx1 2)
=>
#f
But the result, in Guile 3.0.4, is
#t
I'm guessing this is cse optimization at work. I tried this also:
(let* ((sx2 '())
(sx2 (cons '(a "1") sx2))
(sx2 (cons '(a "1") sx2))
(sx2 (cons '*TOP* sx2)))
(eq? (list-ref sx2 1) (list-ref sx2 2)))
=>
#t
In my sandbox, I'm using copy-tree which seems to be changing
the #t to #f, so at least that works.
Matt
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-01-09 23:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-09 23:50 generating SXML trees in guile Matt Wette
unofficial mirror of guile-devel@gnu.org
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://yhetil.org/guile-devel/0 guile-devel/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 guile-devel guile-devel/ https://yhetil.org/guile-devel \
guile-devel@gnu.org
public-inbox-index guile-devel
Example config snippet for mirrors.
Newsgroups are available over NNTP:
nntp://news.yhetil.org/yhetil.lisp.guile.devel
nntp://news.gmane.io/gmane.lisp.guile.devel
AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git