From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Roland Orre Newsgroups: gmane.lisp.guile.user Subject: Re: null terminated strings Date: Fri, 16 Jan 2004 12:02:09 +0100 Organization: Royal Institute of Technology Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Message-ID: <1074250929.6734.63.camel@localhost> References: <87oet4ntsm.fsf_-_@ID-28718.user.uni-berlin.de> <1074245327.6733.9.camel@localhost> <87u12wjiy7.fsf@ID-28718.user.uni-berlin.de> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1074255800 13763 80.91.224.253 (16 Jan 2004 12:23:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 16 Jan 2004 12:23:20 +0000 (UTC) Cc: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Fri Jan 16 13:23:16 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AhT0O-0005BB-00 for ; Fri, 16 Jan 2004 13:23:16 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AhSrl-0005hQ-9K for guile-user@m.gmane.org; Fri, 16 Jan 2004 07:14:21 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AhScr-0004My-UU for guile-user@gnu.org; Fri, 16 Jan 2004 06:58:57 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AhSWu-0003bv-61 for guile-user@gnu.org; Fri, 16 Jan 2004 06:53:19 -0500 Original-Received: from [130.237.222.202] (helo=smtp.nada.kth.se) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AhRod-0005K8-8t for guile-user@gnu.org; Fri, 16 Jan 2004 06:07:03 -0500 Original-Received: from bari.bacon.su.se (bari.bacon.su.se [130.237.152.231]) (authenticated bits=0) by smtp.nada.kth.se (8.12.10/8.12.1) with ESMTP id i0GB6d88021601 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Fri, 16 Jan 2004 12:06:40 +0100 (MET) Original-To: Andreas Voegele In-Reply-To: <87u12wjiy7.fsf@ID-28718.user.uni-berlin.de> X-Mailer: Ximian Evolution 1.4.5 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.2 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.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.user:2609 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:2609 On Fri, 2004-01-16 at 11:17, Andreas Voegele wrote: > Roland Orre writes: > > > On Fri, 2004-01-16 at 10:10, Andreas Voegele wrote: > > > >> "Remove calls to SCM_STRING_COERCE_0TERMINATION_X. Since the > >> substring type is gone, all strings are 0-terminated anyway." > > > > Such a statement is very worrying. What happened to the promises > > that all substrings will be shared strings? > > I'm new to Guile. I don't know why shared strings were removed from > Guile, but things were probably simplified greatly by this decision. > I think that it is very useful to zero terminate all strings since > embedding and extending Guile becomes easier. During all years I've used scm and later guile (I think 14 years now) I have very very rarely had any need for null terminated strings. There is a function in guile to convert a null terminated string to a guile string, this I've used a few times. In C programming I often don't rely on null terminated strings either as there are many C library functions that works with length, which I consider more elegant. The absence of shared substrings on the other hand means a lot of special code to be able to do something similar without having to copy and create strings all the time. For instance in a conversion routine for fixed data base tables I made some years ago I had first used substrings. The program took 15 hours to run on a specific table. When I changed to use shared substrings it took about 1 hour on the same table. I think it is quite bad to have the requirement that guile should rely on null terminated strings as it is often quite easy to come around this from my point of view. In guile 1.6.4 it is also expressed so that all substrings are intended to become internally shared, which I don't see have happened yet. > It seems that you'll have to stick to Thien-Thi Nguyen's Guile > version, available at http://www.glug.org/, if you need shared > strings. OK, I haven't haven't followed his development very carefully, but maybe I should take a closer look. I don't know if he has catched up with the functionality with goops and such, which I need for matrix calculations. Best regards Roland Orre _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user