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.user Subject: Re: guile-sjson's first public release (v0.2)! Date: Tue, 25 Apr 2017 23:03:27 -0500 Message-ID: <87r30fu86o.fsf@dustycloud.org> References: <877f29nmri.fsf@dustycloud.org> <87h91dqe7y.fsf@elektro.pacujo.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1493179437 6899 195.159.176.226 (26 Apr 2017 04:03:57 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 26 Apr 2017 04:03:57 +0000 (UTC) User-Agent: mu4e 0.9.18; emacs 25.2.1 Cc: guile-user@gnu.org To: Marko Rauhamaa Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Wed Apr 26 06:03:52 2017 Return-path: Envelope-to: guile-user@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 1d3EBD-0001gr-9x for guile-user@m.gmane.org; Wed, 26 Apr 2017 06:03:51 +0200 Original-Received: from localhost ([::1]:52535 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d3EBI-0001jv-VD for guile-user@m.gmane.org; Wed, 26 Apr 2017 00:03:56 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50864) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d3EAu-0001jq-QL for guile-user@gnu.org; Wed, 26 Apr 2017 00:03:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d3EAt-0005Dq-O9 for guile-user@gnu.org; Wed, 26 Apr 2017 00:03:32 -0400 Original-Received: from dustycloud.org ([2600:3c02::f03c:91ff:feae:cb51]:58338) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d3EAt-0005Dg-Ie for guile-user@gnu.org; Wed, 26 Apr 2017 00:03:31 -0400 Original-Received: from oolong (localhost [127.0.0.1]) by dustycloud.org (Postfix) with ESMTPS id 0CAA5265EE; Wed, 26 Apr 2017 00:03:27 -0400 (EDT) In-reply-to: <87h91dqe7y.fsf@elektro.pacujo.net> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2600:3c02::f03c:91ff:feae:cb51 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.lisp.guile.user:13634 Archived-At: Marko Rauhamaa writes: > Christopher Allan Webber : > >> In sum though, it has a nice s-expression based syntax: >> >> scheme@(guile-user)> (define a-horse >> '(@ ("name" "buttercup") >> ("age" 6) >> ("animal" "horse") >> ("noise" "neigh!") >> ("food" ("carrot" "oats")))) > > Hm, how about: > > (define a-horse > '((name . "buttercup") > (age . 6) > (animal . "horse") > (noise . "neigh!") > (food . #("carrot" "oats")))) > > > Marko Hm... that's not bad, using vectors for arrays. It also fixes the reason I switched it away from simple cons cell style alists... I was finding pretty-print of such things unreadable: scheme@(guile-user)> ,pretty-print '(@ (name . "buttercup") (age . 6) (animal . "horse") (food . ("carrot" "oats")) (mood-noises . (@ ("frustrated" . "haurrrfff") ("happy" . "neiiiigh") ("angry" . "*SNORT*")))) $7 = (@ (name . "buttercup") (age . 6) (animal . "horse") (food "carrot" "oats") (mood-noises @ ("frustrated" . "haurrrfff") ("happy" . "neiiiigh") ("angry" . "*SNORT*"))) However doing this with vectors as the arrays solves it: scheme@(guile-user)> ,pretty-print '((name . "buttercup") (age . 6) (animal . "horse") (food . #("carrot" "oats")) (mood-noises . (("frustrated" . "haurrrfff") ("happy" . "neiiiigh") ("angry" . "*SNORT*")))) $5 = ((name . "buttercup") (age . 6) (animal . "horse") (food . #("carrot" "oats")) (mood-noises ("frustrated" . "haurrrfff") ("happy" . "neiiiigh") ("angry" . "*SNORT*"))) I'd be open to the change... if we're going to do the change, we should do it now, when I'm pretty much the only user. I wonder what David Thompson thinks?