From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Noah Lavine Newsgroups: gmane.lisp.guile.bugs Subject: bug#11198: problems reading data with a "read-hash-extend" registered reader Date: Tue, 24 Apr 2012 07:38:17 -0400 Message-ID: References: <87zkaka9xl.fsf@gnu.org> <87d37e83n7.fsf@netris.org> <87hawb3ms1.fsf@netris.org> <87mx63prwe.fsf@gnu.org> <87lillwnvl.fsf@pobox.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1335267575 4578 80.91.229.3 (24 Apr 2012 11:39:35 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 24 Apr 2012 11:39:35 +0000 (UTC) Cc: Mark H Weaver , Ludovic =?UTF-8?Q?Court=C3=A8s?= , 11198@debbugs.gnu.org, Klaus Stehle To: Andy Wingo Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Tue Apr 24 13:39:33 2012 Return-path: Envelope-to: guile-bugs@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 1SMe5k-0002VG-Nw for guile-bugs@m.gmane.org; Tue, 24 Apr 2012 13:39:32 +0200 Original-Received: from localhost ([::1]:33441 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SMe5j-0006x2-JG for guile-bugs@m.gmane.org; Tue, 24 Apr 2012 07:39:31 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54131) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SMe5b-0006sD-Et for bug-guile@gnu.org; Tue, 24 Apr 2012 07:39:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SMe5T-0004lG-Oo for bug-guile@gnu.org; Tue, 24 Apr 2012 07:39:23 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49142) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SMe5T-0004lA-Ih for bug-guile@gnu.org; Tue, 24 Apr 2012 07:39:15 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SMe6D-00033M-Iv for bug-guile@gnu.org; Tue, 24 Apr 2012 07:40:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noah Lavine Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-guile@gnu.org Resent-Date: Tue, 24 Apr 2012 11:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11198 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 11198-submit@debbugs.gnu.org id=B11198.133526755511675 (code B ref 11198); Tue, 24 Apr 2012 11:40:01 +0000 Original-Received: (at 11198) by debbugs.gnu.org; 24 Apr 2012 11:39:15 +0000 Original-Received: from localhost ([127.0.0.1]:50176 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SMe5Q-00032D-Km for submit@debbugs.gnu.org; Tue, 24 Apr 2012 07:39:14 -0400 Original-Received: from mail-iy0-f172.google.com ([209.85.210.172]:52422) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SMe5N-000320-St for 11198@debbugs.gnu.org; Tue, 24 Apr 2012 07:39:10 -0400 Original-Received: by iazz13 with SMTP id z13so885434iaz.3 for <11198@debbugs.gnu.org>; Tue, 24 Apr 2012 04:38:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=cBPhpvkTAaXO8+xL+Xgzcis0p6iOpcW58FEkFJfFVFA=; b=cWgQr/42krkALWDoqYmO5c0fB0/HZqs6AF4CfjH2NX+H+RmKJrsYud8EAqP/++0QaN DgGqfTT8tLaNUTxRZI3Y+3E04CfhrbJi9SQlpUqnLUa37D8otgFKPA15hznBxmtp2nDB XZa6jAI88FAQJ1Mq4N6LYpGZ+ZFRy1+lOYUjvAuKTJ8bLnYBlIfRVVrP/qOmhf5Sk41i JsAKXJDwRq26coW77PbDASm1jMa/MDkYvdKG8z3Vpso24dBkjr7xPi7AxIM54Sr80J/i ISsqnYOYxC0PFuaSzlVWamsAK3Pi//OtMQ0fDq6qxyAqX7fiAn3HC3onHFBycufkvKwj rMOA== Original-Received: by 10.50.202.69 with SMTP id kg5mr9628841igc.7.1335267497385; Tue, 24 Apr 2012 04:38:17 -0700 (PDT) Original-Received: by 10.42.29.200 with HTTP; Tue, 24 Apr 2012 04:38:17 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: N3T13GcxYdIbBnbGaPbrOfhPW8s X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:6327 Archived-At: And just a quick note - this problem is more general than record types. If someone added a type through C and wanted it to have a read syntax, the same issue would apply. I can imagine times when this would be very useful - for instance, you have a C extension to Guile, and you want to be able to send data between your different Guile instances in a way that is easy to manually inspect. You need a reader and a serializer for your C things. Noah On Tue, Apr 24, 2012 at 7:24 AM, Noah Lavine wrote: > Hello, > >>> I think the reader should only return valid Scheme objects that have a >>> read syntax (info "(r5rs) Lexical Structure"), and records are not among >>> them. >> >> I agree, FWIW. > > This seems like circular logic to me - extending the reader should > mean that new types can have read syntax. The problem here, I think, > is that the compiler also needs to know how to serialize those types. > > Why don't we provide an interface to define a serializer as well as a > reader, and have compile-assembly use these serializers? As long as > each type has both a serializer and a reader, it should work fine. > That also feels symmetrical, which I take as a good sign. :-) > > Noah