From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Newsgroups: gmane.lisp.guile.user Subject: Re: Surprising behavior of eq? Date: Sun, 20 Sep 2020 18:18:21 +0200 Message-ID: <20200920161821.GA15676@tuxteam.de> References: <8e1d9874-4659-cca5-03da-c2c0df102c56@posteo.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="GvXjxJ+pjyke8COw" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4191"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/1.5.21 (2010-09-15) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Sun Sep 20 18:18:58 2020 Return-path: Envelope-to: guile-user@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 1kK23F-0000yr-Ga for guile-user@m.gmane-mx.org; Sun, 20 Sep 2020 18:18:57 +0200 Original-Received: from localhost ([::1]:44470 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kK23E-0005x2-9v for guile-user@m.gmane-mx.org; Sun, 20 Sep 2020 12:18:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34844) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kK22l-0005vn-Ad for guile-user@gnu.org; Sun, 20 Sep 2020 12:18:27 -0400 Original-Received: from mail.tuxteam.de ([5.199.139.25]:59860) by eggs.gnu.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.90_1) (envelope-from ) id 1kK22h-0007dV-PP for guile-user@gnu.org; Sun, 20 Sep 2020 12:18:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=From:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:To:Date; bh=H8BZBwOqdFZYdu+T9qgcuTM8k8LlV3fejlQWdwMk664=; b=lIEnGlOQwp6Aa0doPO8+jDVB6NvOsIVoHEH+u7P7oEa2O8EctVgvNxGs7QYXtGC+RRMxTF+2LDFcl0P0HB/Z9LR3mZYOn8JlyOQEtD+BiD07XurBK8euLhsDkmM+lIa9t/bKpC5YpVc989DnuKy3ilbAcy/vk8SFaPkSlvSFCEAl1pCEQxyLJzMrfnQN34VwfbihcV9wUzKgeq2h/vpGnmWz6UsAfkmq2jmTV1G/NQ96J+BjT2M6MQhTQkzqA0OaoUcRB0NgCuuR5sdVtJU35Rpxn4Tzd6aTQIQMmK+SjVh7vTz/c8g0XuFKCuJZuGYpDnK7K4razr5cZzieaaT4jQ==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.80) (envelope-from ) id 1kK22f-0004KP-27 for guile-user@gnu.org; Sun, 20 Sep 2020 18:18:21 +0200 Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=5.199.139.25; envelope-from=tomas@tuxteam.de; helo=mail.tuxteam.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/20 12:18:21 X-ACL-Warn: Detected OS = Linux 3.1-3.10 [fuzzy] 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.io gmane.lisp.guile.user:16938 Archived-At: --GvXjxJ+pjyke8COw Content-Type: text/plain; charset=utf-8 Content-Disposition: inline On Sun, Sep 20, 2020 at 05:37:45PM +0200, Zelphir Kaltstahl wrote: > Hello John, hello Stefan! [...] > Of course SO is not a standard. Either it is simply wrong, or I > misunderstood "primitive values" in that phrase. I thought: "Ah strings > are a primitive value, so eqv? should work in all cases when comparing > strings." However, this has been debunked. Strings are mutable in Guile, so probably not what's called "primitive values": scheme@(guile-user)> (define str (string-copy "the quick brown fox")) scheme@(guile-user)> (string-set! str 6 #\a) scheme@(guile-user)> str $3 = "the quack brown fox" But string literals bark at you if you try to mutate them (that's why I slyly created that one with `string-copy'): scheme@(guile-user)> (define str "the quick brown fox") scheme@(guile-user)> (string-set! str 6 #\a) ice-9/boot-9.scm:1669:16: In procedure raise-exception: string is read-only: "the quick brown fox" Cheers - t --GvXjxJ+pjyke8COw Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAl9ngMwACgkQBcgs9XrR2kZICQCeJhYkXe9WJhI9wirTqSPAREMT TAkAnjO4vqeGIsV/TInvBB2MnczEe61Y =MBjP -----END PGP SIGNATURE----- --GvXjxJ+pjyke8COw--