From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chaos Eternal Newsgroups: gmane.lisp.guile.user Subject: Re: pretty-print for 1+ Date: Wed, 18 Sep 2013 11:27:35 +0800 Message-ID: References: <87li313de7.fsf@gnu.org> <87fvt3hil4.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1379474875 19643 80.91.229.3 (18 Sep 2013 03:27:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 18 Sep 2013 03:27:55 +0000 (UTC) To: guile-user Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Wed Sep 18 05:27:56 2013 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VM8Qm-0008WO-Oy for guile-user@m.gmane.org; Wed, 18 Sep 2013 05:27:56 +0200 Original-Received: from localhost ([::1]:44220 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VM8Ql-0006jm-N3 for guile-user@m.gmane.org; Tue, 17 Sep 2013 23:27:55 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39421) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VM8QY-0006jc-3a for guile-user@gnu.org; Tue, 17 Sep 2013 23:27:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VM8QT-0003EB-1W for guile-user@gnu.org; Tue, 17 Sep 2013 23:27:42 -0400 Original-Received: from mail-ie0-f171.google.com ([209.85.223.171]:35481) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VM8QS-0003Dv-Si for guile-user@gnu.org; Tue, 17 Sep 2013 23:27:36 -0400 Original-Received: by mail-ie0-f171.google.com with SMTP id at1so12069960iec.30 for ; Tue, 17 Sep 2013 20:27:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=6AkCoA1xXSZfWGBS+c4eUh62T8Z7AaqH2D9Qj+5nAFo=; b=XOF0s0c/BTVm1cHaCr6/+OLLLGvQlfMpZ0oQCpNT8vAxZsgFRBxaV89neSkomZPVPv 1SXZWb9FHei2Y2CXIT/Ss9qgoJvnmUAQHDoL3l28yg+ND+DJ6GQmVmDXyoMTvsRE3l5H NKNZ4SuiaVgHP4aAoXjBL+5af0dJw2ixWFIE5TH+165YGkAQZ55mnOzmmJ3LXlUBDUYr Hjjx7D4/doCmcI9s3ZG/bolUD8syEXGaMw5AhzX/rwVR+bScF3ht7p/tqljlNZuOaSc+ PXyTqlezfT4UXxNopt3zIYdJ8vM1sZxWL6n8c84n/DabGH2NK9G6+FWUX3CPd5xfvKjP 5ZWA== X-Gm-Message-State: ALoCoQmXJaM3NM9BwFY4GXAFYWISjQc2NCqD5QFw03aHu8n8z+joCSOT73BhSaLFBoKYVhb6Y8GM X-Received: by 10.50.122.102 with SMTP id lr6mr2486142igb.0.1379474855998; Tue, 17 Sep 2013 20:27:35 -0700 (PDT) Original-Received: by 10.64.24.133 with HTTP; Tue, 17 Sep 2013 20:27:35 -0700 (PDT) In-Reply-To: <87fvt3hil4.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.223.171 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 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 Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:10817 Archived-At: yet there is another interesting thing: (symbol? 'a) =3D> #t (symbol? '+a) =3D> #t (symbol? '-a) =3D> #t (symbol? 'b) =3D> #t (symbol? '+b) =3D> #t (symbol? '-b) =3D> #t BUT: (symbol? 'i) =3D> #t (symbol? '+i) =3D> #f (symbol? '-i) =3D> #f In guile-scsh, user would like the guile recognize -i as symbols rather than complex numbers, is there any way? On Tue, Sep 17, 2013 at 6:02 PM, Ludovic Court=C3=A8s wrote: > Brian Killian skribis: > >> On Thu, Sep 12, 2013 at 6:04 PM, Ludovic Court=C3=A8s wro= te: >> >>> Brian Killian skribis: >>> >>> > Using guile 2.0.9 and the ice-9 pretty-print module, when I apply: >>> > >>> > (pretty-print '(1+ 1)) >>> > >>> > I get: >>> > >>> > (#{1+}# 1) >>> > >>> > I was expecting: >>> > >>> > (1+ 1) >>> > >>> > Is this an issue with pretty-print or should I adjust my expectation? >>> >>> I think it=E2=80=99s an issue with =E2=80=98write=E2=80=99. Specifical= ly, >>> =E2=80=98INITIAL_IDENTIFIER_MASK=E2=80=99 in print.c doesn=E2=80=99t qu= ite match the syntax >>> recognized by =E2=80=98read=E2=80=99. >>> >>> Ludo=E2=80=99. >>> >>> >>> >> Thank you for the information. I'm using (+ arg 1) instead of (1+ arg) a= s a >> workaround. > > Well note that (#{1+}# 1) is valid and equivalent to (1+ 1). > >> I'm using pretty-print to format code snippets as I work through SICP, >> which is becoming tedious. Do you know of a script or tool that formats >> Scheme files using the pretty-print rules? I've switched from gedit to >> Emacs as an editor, but Emacs only seems to indent things properly, rath= er >> than stripping extraneous newlines and trying to fit expressions on one >> line if possible like pretty-print does. > > Good question, I don=E2=80=99t know of any such tool. > > Ludo=E2=80=99. > >