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: shared-substrings missing in 1.7 Date: Fri, 16 Jan 2004 14:49:54 +0100 Organization: Royal Institute of Technology Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Message-ID: <1074260993.6740.117.camel@localhost> References: <1074242951.6739.5.camel@localhost> <871xq0dpjg.fsf@marc0.dyndns.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1074272010 20130 80.91.224.253 (16 Jan 2004 16:53:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 16 Jan 2004 16:53:30 +0000 (UTC) Cc: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Fri Jan 16 17:53:17 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 1AhXDg-0007fH-00 for ; Fri, 16 Jan 2004 17:53:17 +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 1AhXBh-0005IY-Aq for guile-user@m.gmane.org; Fri, 16 Jan 2004 11:51:13 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AhWow-0000aZ-9F for guile-user@gnu.org; Fri, 16 Jan 2004 11:27:42 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AhVU1-000662-KP for guile-user@gnu.org; Fri, 16 Jan 2004 10:02:32 -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 1AhUQf-0000PX-Ju for guile-user@gnu.org; Fri, 16 Jan 2004 08:54:29 -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 i0GDsO88025964 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Fri, 16 Jan 2004 14:54:25 +0100 (MET) Original-To: Marco Parrone In-Reply-To: <871xq0dpjg.fsf@marc0.dyndns.org> 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:2614 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:2614 On Fri, 2004-01-16 at 13:52, Marco Parrone wrote: > Roland Orre on Fri, 16 Jan 2004 09:49:11 +0100 writes: > > > In about half of my code I can easily replace make-shared-substring > > with normal substring, as I there have used them for efficiecny > > reasons only, but in the rest of the code the functionality of shared > > substrings is essential so I need to reimplement them. > > Why don't you copy the make-shared-substring code into a new Guile > module? So you can use it whithout needing to patch Guile (and so > whithout needing to syncronize your modifications with the main tree). > > Then all what you have to change will be adding and :use-module to the > needed modules, right? It is not that easy because the tag type substring scm_tc7_substring doesn't exist at the moment. Further on will the garbage collector not be aware about substrings, therefore I need to protect them, as well as the original string so I can deallocate them in the right order. I just tested this idea and got segmentation fault when I deallocated just the original string. I'll probably have to implement a deallocate_all_shared substrings as well. Anyway, this is a simple solution to keep me going, my old code will still work, but somewhat more messy, so it is not a long term solution. I'm slightly worried what will happen with substrings in the future. Neither do I understand the reason why removing explicitly shared substrings and then later add implicit shared substrings as was the intention. With implicit internal substrings, I see no reason to not have explicit substrings as well. Even though make-shared-substring would become unnecessary in the future if all substrings are shared, I consider it wrong to remove a facility before the replacement implementation is done. Best regards Roland Orre _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user