From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel Subject: Re: rfi: immutable strings Date: Thu, 27 Jan 2011 17:31:53 +0100 Message-ID: References: <245692.94996.qm@web37905.mail.mud.yahoo.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1296145637 23344 80.91.229.12 (27 Jan 2011 16:27:17 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 27 Jan 2011 16:27:17 +0000 (UTC) Cc: guile-devel To: Mike Gran Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Jan 27 17:27:13 2011 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PiUgh-0001Iq-7E for guile-devel@m.gmane.org; Thu, 27 Jan 2011 17:27:12 +0100 Original-Received: from localhost ([127.0.0.1]:52307 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PiUgf-0007da-AQ for guile-devel@m.gmane.org; Thu, 27 Jan 2011 11:27:09 -0500 Original-Received: from [140.186.70.92] (port=40721 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PiUgZ-0007bt-5m for guile-devel@gnu.org; Thu, 27 Jan 2011 11:27:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PiUgV-00009o-TS for guile-devel@gnu.org; Thu, 27 Jan 2011 11:27:01 -0500 Original-Received: from a-pb-sasl-sd.pobox.com ([64.74.157.62]:36422 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PiUgV-00009a-R6 for guile-devel@gnu.org; Thu, 27 Jan 2011 11:26:59 -0500 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id D86B93DF9; Thu, 27 Jan 2011 11:27:49 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=g/8EUciDej/WUWR7elpxIwWeDYM=; b=KJH1zG LHKEgc2lP3ewZ8X0H80eBJbXEaKiLnxhspk5bVXxkhuC6B3WUQCtGTiLqG0o3wMf Oky/4H5X/OmvjK8iiEgP5ykxWlKt75iAqh/uHLi4aPseVebwjWF2AEeE7pOmYA5p RUvsD5sZVKNl5fgxRWzFPALnt102C1FYv7Wa0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=l6tBGSbV+qjLppqniD2z0q+zTcQ+xzrq 6dfEiCK+Q4z4d0w7RXV9oFGtKAaGj8zVWmJP6ERMMaUrSOgLgogFtmF/zabA4Vg4 IxyrqFbi0w0EAPyNkWLkMvQAEMrFwIl4LKuuVyiVW1MdN0gIKUV0UdKuBK6LJ9nK GMUHYOpUUo8= Original-Received: from a-pb-sasl-sd.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id C5E6F3DF8; Thu, 27 Jan 2011 11:27:48 -0500 (EST) Original-Received: from unquote.localdomain (unknown [90.164.198.39]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id 215B43DF4; Thu, 27 Jan 2011 11:27:46 -0500 (EST) In-Reply-To: <245692.94996.qm@web37905.mail.mud.yahoo.com> (Mike Gran's message of "Fri, 7 Jan 2011 10:52:35 -0800 (PST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-Pobox-Relay-ID: 61261E58-2A32-11E0-BFE2-BC4EF3E828EC-02397024!a-pb-sasl-sd.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:11364 Archived-At: On Fri 07 Jan 2011 19:52, Mike Gran writes: >> Guile needs immutable strings. > > How is this different from read-only strings? Seems to be the same. We should have read-only string API though; currently there is only substring API. One should be able to allocate a read-only string directly, like via scm_from_static_latin1_{stringn,symboln}. Also, strings loaded from objcode should be read-only, and share storage with the objcode itself; perhaps? >> Also, the result of (symbol->string 'foo) should be immutable; >> currently symbol->string conses up a new shared substring every time. Though the result is immutable, it does cons up a shared substring, which involves all kinds of mutex and allocation shenanigans. Andy -- http://wingolog.org/