From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Julian Graham Newsgroups: gmane.lisp.guile.devel Subject: Re: r6rs incompatibilities Date: Sun, 23 May 2010 11:35:29 -0400 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=0016e64696e895404f048744ac1c X-Trace: dough.gmane.org 1274628944 22169 80.91.229.12 (23 May 2010 15:35:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 23 May 2010 15:35:44 +0000 (UTC) Cc: guile-devel To: Andy Wingo Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun May 23 17:35:43 2010 connect(): No such file or directory 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 1OGDDJ-0005qf-Dw for guile-devel@m.gmane.org; Sun, 23 May 2010 17:35:41 +0200 Original-Received: from localhost ([127.0.0.1]:50364 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OGDDI-0004Vg-Ow for guile-devel@m.gmane.org; Sun, 23 May 2010 11:35:40 -0400 Original-Received: from [140.186.70.92] (port=56040 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OGDDA-0004Tt-J8 for guile-devel@gnu.org; Sun, 23 May 2010 11:35:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OGDD8-0007z8-Rk for guile-devel@gnu.org; Sun, 23 May 2010 11:35:32 -0400 Original-Received: from mail-ww0-f41.google.com ([74.125.82.41]:62097) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OGDD8-0007z0-Jv for guile-devel@gnu.org; Sun, 23 May 2010 11:35:30 -0400 Original-Received: by wwi14 with SMTP id 14so1974515wwi.0 for ; Sun, 23 May 2010 08:35:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=SxuPF042j6r+V1db4kNwnN3NtR2YKsrAlnQ1YBu5qN4=; b=kJ6+7YhhIWcz0SpqckBuydxEBq8M4J8BPos63bN71wyFFMZ/mAv0wnXAe/GvDjfiHG h9vneftahodA5yRPU1iCcaRkIhmCl+dOahAcLGVp0vJZTRnv54K19Xwxu3786uMvJEHm RAPgvtqtGN/6DM3m2sl+IeVgGOILPXAQzYZQA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=UI2KR9nTKz/hPIirMXccelpq10Y14KD9VCd5aGo8gAPF+QFvSuhMTnhMm84BLA5jXC LbMNDBPaLTmHK5WP8t4L0R/hrV2fgyPaU2JBovpP3v9CHND7mlTSqWbqqxv/1qZb8DVc 2HnDFpC4Wvo5BerJdBsVzKNRD6VfFgm7SVUy0= Original-Received: by 10.216.181.140 with SMTP id l12mr2593602wem.69.1274628929830; Sun, 23 May 2010 08:35:29 -0700 (PDT) Original-Received: by 10.216.0.19 with HTTP; Sun, 23 May 2010 08:35:29 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:10352 Archived-At: --0016e64696e895404f048744ac1c Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello again! > =A0* I'm sure there are other points -- please test and reply :) Indeed! One thing I noticed while look at Andreas' `wak' project is that the use of `#!r6rs' seems to be pretty common, which conflicts with Guile's support for SCSH-style block comments. Find attached a (somewhat inelegant) patch that adds support for the `#!r6rs' lexeme in the default reader. (What do people think about this? Is there a better way to do it?) Regards, Julian --0016e64696e895404f048744ac1c Content-Type: text/x-diff; charset=US-ASCII; name="0001-Support-for-the-r6rs-lexeme.patch" Content-Disposition: attachment; filename="0001-Support-for-the-r6rs-lexeme.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_g9k11u440 RnJvbSBmMWFmNDAxNDJiNDcyMzJlNzI2Y2JlOWY3YmRjMzVkNWZiZjQ1NjAyIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBKdWxpYW4gR3JhaGFtIDxqdWxpYW4uZ3JhaGFtQGF5YS55YWxl LmVkdT4KRGF0ZTogU3VuLCAyMyBNYXkgMjAxMCAxMToyNDo1OSAtMDQwMApTdWJqZWN0OiBbUEFU Q0hdIFN1cHBvcnQgZm9yIHRoZSAjIXI2cnMgbGV4ZW1lLgoKKiBsaWJndWlsZS9yZWFkLmMgKHNj bV9yZWFkX3NoZWJhbmcpOiBOZXcgZnVuY3Rpb247CiAgKHNjbV9yZWFkX3NoYXJwKTogQ2FsbCBz Y21fcmVhZF9zaGViYW5nIG9uICchJywgd2hpY2ggZGVsZWdhdGVzIHRvCiAgc2NtX3JlYWRfc2Nz aF9ibG9ja19jb21tZW50IGFzIG5lY2Vzc2FyeS4KLS0tCiBsaWJndWlsZS9yZWFkLmMgfCAgIDM5 ICsrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKystLQogMSBmaWxlcyBjaGFuZ2Vk LCAzNyBpbnNlcnRpb25zKCspLCAyIGRlbGV0aW9ucygtKQoKZGlmZiAtLWdpdCBhL2xpYmd1aWxl L3JlYWQuYyBiL2xpYmd1aWxlL3JlYWQuYwppbmRleCBjNTRmYmI2Li5kMTY5MTY3IDEwMDY0NAot LS0gYS9saWJndWlsZS9yZWFkLmMKKysrIGIvbGliZ3Vp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KIAorc3RhdGljIGlu bGluZSBTQ00KK3NjbV9yZWFkX3NoZWJhbmcgKHNjbV90X3djaGFyIGNociwgU0NNIHBvcnQpCit7 CisgIGludCBjID0gMDsKKyAgaWYgKChjID0gc2NtX2dldF9ieXRlX29yX2VvZiAocG9ydCkpICE9 ICdyJykKKyAgICB7CisgICAgICBzY21fdW5nZXRjIChjLCBwb3J0KTsKKyAgICAgIHJldHVybiBz Y21fcmVhZF9zY3NoX2Jsb2NrX2NvbW1lbnQgKGNociwgcG9ydCk7CisgICAgfQorICBpZiAoKGMg PSBzY21fZ2V0X2J5dGVfb3JfZW9mIChwb3J0KSkgIT0gJzYnKQorICAgIHsKKyAgICAgIHNjbV91 bmdldGMgKGMsIHBvcnQpOworICAgICAgc2NtX3VuZ2V0YyAoJ3InLCBwb3J0KTsKKyAgICAgIHJl dHVybiBzY21fcmVhZF9zY3NoX2Jsb2NrX2NvbW1lbnQgKGNociwgcG9ydCk7CisgICAgfQorICBp ZiAoKGMgPSBzY21fZ2V0X2J5dGVfb3JfZW9mIChwb3J0KSkgIT0gJ3InKQorICAgIHsKKyAgICAg IHNjbV91bmdldGMgKGMsIHBvcnQpOworICAgICAgc2NtX3VuZ2V0YyAoJzYnLCBwb3J0KTsKKyAg ICAgIHNjbV91bmdldGMgKCdyJywgcG9ydCk7CisgICAgICByZXR1cm4gc2NtX3JlYWRfc2NzaF9i bG9ja19jb21tZW50IChjaHIsIHBvcnQpOworICAgIH0KKyAgaWYgKChjID0gc2NtX2dldF9ieXRl X29yX2VvZiAocG9ydCkpICE9ICdzJykKKyAgICB7CisgICAgICBzY21fdW5nZXRjIChjLCBwb3J0 KTsKKyAgICAgIHNjbV91bmdldGMgKCdyJywgcG9ydCk7CisgICAgICBzY21fdW5nZXRjICgnNics IHBvcnQpOworICAgICAgc2NtX3VuZ2V0YyAoJ3InLCBwb3J0KTsKKyAgICAgIHJldHVybiBzY21f cmVhZF9zY3NoX2Jsb2NrX2NvbW1lbnQgKGNociwgcG9ydCk7CisgICAgfQorICAKKyAgcmV0dXJu IFNDTV9VTlNQRUNJRklFRDsKK30KKwogc3RhdGljIFNDTQogc2NtX3JlYWRfcjZyc19ibG9ja19j b21tZW50IChzY21fdF93Y2hhciBjaHIsIFNDTSBwb3J0KQogewpAQCAtMTMyMyw3ICsxMzU4LDcg QEAgc2NtX3JlYWRfc2hhcnAgKHNjbV90X3djaGFyIGNociwgU0NNIHBvcnQpCiAgICAgY2FzZSAn eyc6CiAgICAgICByZXR1cm4gKHNjbV9yZWFkX2V4dGVuZGVkX3N5bWJvbCAoY2hyLCBwb3J0KSk7 CiAgICAgY2FzZSAnISc6Ci0gICAgICByZXR1cm4gKHNjbV9yZWFkX3Njc2hfYmxvY2tfY29tbWVu dCAoY2hyLCBwb3J0KSk7CisgICAgICByZXR1cm4gKHNjbV9yZWFkX3NoZWJhbmcgKGNociwgcG9y dCkpOwogICAgIGNhc2UgJzsnOgogICAgICAgcmV0dXJuIChzY21fcmVhZF9jb21tZW50ZWRfZXhw cmVzc2lvbiAoY2hyLCBwb3J0KSk7CiAgICAgY2FzZSAnYCc6Ci0tIAoxLjcuMC40Cgo= --0016e64696e895404f048744ac1c--