unofficial mirror of 
 help / color / mirror / Atom feed
* 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)

But the result, in Guile 3.0.4, is

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)))

In my sandbox, I'm using copy-tree which seems to be changing
the #t to #f, so at least that works.


^ 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 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror 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/ \
	public-inbox-index guile-devel

Example config snippet for mirrors.
Newsgroups are available over NNTP:

AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git