From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Matt Wette Newsgroups: gmane.lisp.guile.devel Subject: generating SXML trees in guile Date: Sat, 9 Jan 2021 15:50:56 -0800 Message-ID: <60bd162e-c64e-2a4a-4691-49dedd953e22@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30861"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Sun Jan 10 00:51:42 2021 Return-path: Envelope-to: guile-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kyO1G-0007km-BM for guile-devel@m.gmane-mx.org; Sun, 10 Jan 2021 00:51:42 +0100 Original-Received: from localhost ([::1]:56078 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kyO1F-0003Is-EX for guile-devel@m.gmane-mx.org; Sat, 09 Jan 2021 18:51:41 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43214) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kyO0d-0003If-Nv for guile-devel@gnu.org; Sat, 09 Jan 2021 18:51:03 -0500 Original-Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]:33060) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kyO0c-00011r-4b for guile-devel@gnu.org; Sat, 09 Jan 2021 18:51:03 -0500 Original-Received: by mail-pl1-x629.google.com with SMTP id b8so7614611plx.0 for ; Sat, 09 Jan 2021 15:51:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding:content-language; bh=Godp6Wh2ZxjcYz1gkWM0s40U6yltQ04kHAS1yt33FZ8=; b=kq00gurdzd66xUQppli8AGEbXVP+dr9Y01zmPxKllZgQBkzBpF1BwbToXEbwRirF06 q4G/rxAXUgRyYS/5dUuHGeLMX6f2vmV7RKt4c9MFCXi1K6VLNTgYrWcCU8WuIrBLT0Oi 25ylQhkxTr/DqHHVdK9LkszunXExkF+T2RNJDZ5hM9JxRFdOKvysgc4cr78TENksNS8W VKoHXbvBCjc+ntVt6QOeNHWQCuxy8qC8Brejhfw9U9f5Ur6FYdyz9+kr/SE8imE0bPSY e0aTQEIQMyouSkrk6zZBYlnIsGxR257rW9E4Tl/s5u75/M5/3pD+d4zN4xxuRsWrnCvu 58Hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding:content-language; bh=Godp6Wh2ZxjcYz1gkWM0s40U6yltQ04kHAS1yt33FZ8=; b=cfA6CoPja+cTkmWpznD70mJM9Kjh3yvKrQbdw68V4uVgbYhrgyTeZ0fnw9b0BLFsnI fD2MsmAGjqmDsABdljsG4r4BYzUya3foVAlptoDqEdr9gariMM0fsQMY3bpHkcjFLT6Q kkFx5BEmcVan6zRnK/Wnknv2a7m7lzd+eukKbi2LPS22WT0KE/ImdL2yKKhhNyOmEuf+ qNe/kGVIeARw+eh+Bz/hXTBk7lar/gHS6wxM4kC7MmJzowtyZAtTOD+FKXsdqtjV9Tl/ ndJ5/O90cLadAim6TG3yVQss8YW4FhG/i5LN90QHeNxIUGUf+ecpfZkYQcgv1/IhiG0p C05A== X-Gm-Message-State: AOAM531G9wXWer9AErKzoPYrklvotkW4h0gaiL5Jn6phzjNnbvnB8qHI ksyCGheF9Gfh+TA/22+PVKZK2/l9xUE= X-Google-Smtp-Source: ABdhPJwSYPPJH7NMzBJGOdYjICoG203w/tnki7VKHquoZ3jxkmsuJDB1dFBsm0jyJKZar+j/pkTLEA== X-Received: by 2002:a17:90a:1182:: with SMTP id e2mr10497434pja.152.1610236258578; Sat, 09 Jan 2021 15:50:58 -0800 (PST) Original-Received: from [192.168.2.183] (64-52-176-132.championbroadband.com. [64.52.176.132]) by smtp.gmail.com with ESMTPSA id x10sm13033768pff.214.2021.01.09.15.50.57 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 09 Jan 2021 15:50:58 -0800 (PST) Content-Language: en-US Received-SPF: pass client-ip=2607:f8b0:4864:20::629; envelope-from=matt.wette@gmail.com; helo=mail-pl1-x629.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.io gmane.lisp.guile.devel:20633 Archived-At: 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