From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mike Gran Newsgroups: gmane.lisp.guile.devel Subject: Re: Sting abstraction 2 Date: Wed, 20 May 2009 15:49:27 -0700 (PDT) Message-ID: <112865.34993.qm@web37907.mail.mud.yahoo.com> References: <1242833049.32575.7271.camel@localhost.localdomain> <878wkreayf.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1242859790 18572 80.91.229.12 (20 May 2009 22:49:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 May 2009 22:49:50 +0000 (UTC) To: =?iso-8859-1?Q?Ludovic_Court=E8s?= , guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu May 21 00:49:42 2009 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.50) id 1M6ubT-0005su-Hs for guile-devel@m.gmane.org; Thu, 21 May 2009 00:49:39 +0200 Original-Received: from localhost ([127.0.0.1]:55979 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M6ubS-0002f2-Rz for guile-devel@m.gmane.org; Wed, 20 May 2009 18:49:38 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M6ubM-0002en-W8 for guile-devel@gnu.org; Wed, 20 May 2009 18:49:33 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M6ubI-0002eR-Gb for guile-devel@gnu.org; Wed, 20 May 2009 18:49:32 -0400 Original-Received: from [199.232.76.173] (port=48982 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M6ubI-0002eO-Bk for guile-devel@gnu.org; Wed, 20 May 2009 18:49:28 -0400 Original-Received: from web37907.mail.mud.yahoo.com ([209.191.91.169]:40211) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1M6ubH-0003NI-QA for guile-devel@gnu.org; Wed, 20 May 2009 18:49:28 -0400 Original-Received: (qmail 36498 invoked by uid 60001); 20 May 2009 22:49:27 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1242859767; bh=IL2P/30rh4aFNKGchzS4bjIspukWmeVYQkelUEpbcHI=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=z3eVgP9sjkV0wwyQ6d3YN1iW/NOhSDrPukqCAYCJ7d+wW11W+i3+7+NiI6RBuw2vftYDnCTx6jsbUA3Xe4PGRlALvfeksYTaCSQbYW1N3I92TMxuKHByKnNIho3O+utPIAc58N0AjggA2pycGqSqdw5jHEqXR2GXnx0292c7iAs= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=dFLtvHtKQurdFSt/kd+n4yX+yw4D3xzV7h6Wu6zcutR4E6esmQv0mOEe0am3tX95S3HxJ1UezgdQscFHZdW5aqHODTPW50iiq1yY0GLLPsMw4/fJ8q/O/JxHo0fI51pvY29u3wwcjNdUoXHjXFNCWAV4KygcIkHnQc147IxtPdQ=; X-YMail-OSG: 9seEI0oVM1ma2w11dALIftm.0r085_lgkGchq0hl_nUo5.MHYMMll33ua9LRYmrP9jNYE_dSa0UrCZmBsrvTX3Co6jnUQiSkA4X3zBWaGEYMt_nGUHcFmzHGQh7Qa4ijfd8nJg1XMiF9da_NYyKNpkVjJtqVmgWGS4BHFosD11GOiSHkEsW_UtxFXHqW7phX_Nv0nDr5NGDktb628OtOBoLQnZr5acOISIAJwY3BUcQPt_NBjzmpzL7LNmWxfS0Z4l5eKzcYJSoLlG0.6oGR3.QfK463BKwsDC68YXQgkSUyZRhvI9UCP58CcOS3SQYr5UE- Original-Received: from [64.52.12.130] by web37907.mail.mud.yahoo.com via HTTP; Wed, 20 May 2009 15:49:27 PDT X-Mailer: YahooMailRC/1277.43 YahooMailWebService/0.7.289.10 In-Reply-To: <878wkreayf.fsf@gnu.org> X-detected-operating-system: by monty-python.gnu.org: FreeBSD 6.x (1) 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:8498 Archived-At: > From: Ludovic Court=E8s =0A> =0A> Hello!=0A> =0A> Mike Gran= writes:=0A> =0A> > Anyway, I backtracked a bit.=A0 Today I pushed a new tr= ee=0A> > (string_abstraction2) which should be the same as master except wi= th all=0A> > unnecessary calls to scm_i_string_chars, scm_i_symbol_chars, a= nd=0A> > scm_i_string_writable_chars removed.=A0 I largely avoided other=0A= > > unnecessary modifications.=A0 It is still an 8-bit string build, but, n= ow=0A> > the string internals have been confined to strings.c and strports.= c,=0A> > with very few exceptions.=0A> =0A> How does it differ from the app= roach you took a while back (e.g.,=0A> http://thread.gmane.org/gmane.lisp.g= uile.devel/8436)?=0A> =0A=0AIt is exactly the same idea as before, but, mor= e militantly applied.=0A=0AIn my private build of my first attempt, I'm bas= ically done.=A0 All the pieces are there.=A0 But it is buggy as hell.=A0 In= the first pass, I tried to do too many things at once: ports, locales, R6R= S escapes.=A0 I started getting some errors that were tough to debug (doubl= e-frees, SIGSEGV).=A0 Since valgrind and mcheck are useless here, I got fru= strated.=A0 So, what I'm doing now, basically, is just adding the patches I= made before in a more logical order and testing along the way.=0A=0ASo, sa= me patches, different order, better testing.=A0 Just try to git 'er done.= =0A=0AThe locale conversion will still happen at scm_lfwrite and scm_getc.= =0A=0A(Did I ever mention this backtrace tree pic?=A0=A0http://www.lonelyca= ctus.com/uploaded_images/test[1]-765536.PNG=A0 It shows that for all the sc= ripts the test suite, all of the calls to low-level read and write pass thr= ough those two functions.)=0A=0AI have changed my=A0opinion on one issue. I= don't believe that Guile ports should have a specific encoding:=A0they sho= uld just use the locale.=A0 This is just pragmatism.=A0 Guile ports and the= default reader are annoying things to hack.=A0 I am loathe to touch them m= ore than is necessary.=A0=0A=0AThe R6RS ports have the nice transcoder idea= .=A0 It might be more fun to push port-specific encodings to that library.= =A0 =0A=0AThe one weird side-effect of doing the locale conversion at scm_g= etc and scm_lfwrite is that the ports'=A0buffers -- including string ports = -- =A0contain locale-encoded data. =0A=0ASince all the pieces=A0have alread= y been coded once already,=A0it should come together quickly.=0A=0A-Mike