From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Christopher Allan Webber Newsgroups: gmane.lisp.guile.devel Subject: Re: Including sjson (formerly (ice-9 json)) and fash.scm in guile proper? Date: Sat, 13 May 2017 20:30:55 -0500 Message-ID: <871srs9qcw.fsf@dustycloud.org> References: <87pofj0wia.fsf@dustycloud.org> <87lgq1hoou.fsf@netris.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1494725470 27652 195.159.176.226 (14 May 2017 01:31:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 14 May 2017 01:31:10 +0000 (UTC) User-Agent: mu4e 0.9.18; emacs 25.2.1 Cc: Guile Devel To: Mark H Weaver Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun May 14 03:31:06 2017 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9iNF-00071Q-KM for guile-devel@m.gmane.org; Sun, 14 May 2017 03:31:05 +0200 Original-Received: from localhost ([::1]:59390 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d9iNH-0003N2-VY for guile-devel@m.gmane.org; Sat, 13 May 2017 21:31:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55269) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d9iNA-0003Ml-KV for guile-devel@gnu.org; Sat, 13 May 2017 21:31:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d9iN7-0004Yn-CI for guile-devel@gnu.org; Sat, 13 May 2017 21:31:00 -0400 Original-Received: from dustycloud.org ([50.116.34.160]:39152) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d9iN6-0004Y9-WB for guile-devel@gnu.org; Sat, 13 May 2017 21:30:57 -0400 Original-Received: from oolong (localhost [127.0.0.1]) by dustycloud.org (Postfix) with ESMTPS id B829D265D4; Sat, 13 May 2017 21:30:55 -0400 (EDT) In-reply-to: <87lgq1hoou.fsf@netris.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 50.116.34.160 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.org gmane.lisp.guile.devel:19146 Archived-At: Mark H Weaver writes: > Hi Chris, > > Christopher Allan Webber writes: >> So a while ago, David Thompson submitted (ice-9 json) to Guile proper. >> A few changes were requested, so it hadn't made it in. In the meanwhile >> I began using it for a number of projects. I also added some >> modifications and extensions: #nil became 'null for the representation >> of null values, > > Most of the modifications you've made are good, but I'm very > uncomfortable with the use of #nil in this API. #nil is a terrible hack > which may not even be adequate for its intended use case. Its existence > in any data structure is likely to cause misbehavior in other Scheme > code that is exposed to it, because it violates a longstanding fact in > Scheme that there is only one value that is treated as "false". It > would also make it difficult or impossible to port this library, and > thus anything that depends on this library, to other Scheme systems. We > should not promote its use by incorporating it into new APIs. > > What do you think? Oh! No you got it backwards, the library *was* using #nil initially, and I modified it to use 'null now instead. :) So I think you'd be probably pretty happy! > Otherwise, I'm generally in favor of incorporating this library into > Guile, after we make sure that it is robust against malicious inputs. Okay, cool! The other thing is to add more specific error messages, as discussed. What examples of malicious inputs should we test against?