From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "Thompson, David" Newsgroups: gmane.lisp.guile.user Subject: Re: guile-json 2.0.0 released Date: Thu, 13 Dec 2018 09:30:36 -0500 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1544711378 9461 195.159.176.226 (13 Dec 2018 14:29:38 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 13 Dec 2018 14:29:38 +0000 (UTC) Cc: Guile User To: =?UTF-8?Q?Aleix_Conchillo_Flaqu=C3=A9?= Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Thu Dec 13 15:29:34 2018 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 1gXRzX-0002EN-7F for guile-user@m.gmane.org; Thu, 13 Dec 2018 15:29:31 +0100 Original-Received: from localhost ([::1]:52927 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gXS1d-0005dy-Bd for guile-user@m.gmane.org; Thu, 13 Dec 2018 09:31:41 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55489) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gXS0s-0005bq-Ih for guile-user@gnu.org; Thu, 13 Dec 2018 09:30:55 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gXS0q-0002Qi-JG for guile-user@gnu.org; Thu, 13 Dec 2018 09:30:54 -0500 Original-Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:45818) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gXS0p-0002N8-EA for guile-user@gnu.org; Thu, 13 Dec 2018 09:30:52 -0500 Original-Received: by mail-wr1-x42e.google.com with SMTP id t6so2053363wrr.12 for ; Thu, 13 Dec 2018 06:30:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=worcester-edu.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=qAI9QDcWOY4sxCQAU7iYjt+4jT7tGR0MlsxZxWPgffQ=; b=Z7NwbNclslfFXg6Z3YgmQKrZ7Wen2az1PiZtgC4Ty9tRtAuGR2e4GXozp2pyj4VYQi ypm2g13vLTHtWs7MFTzaeeAWRXgz1Uh+27+clbrohqGbBiHNsIYCj/BK6ElhLKQN+mgI RlYEggugA+/VwpRifF9WrWk4Tz/0J1daqcG6K70EQuPs6YoGeqD5IlghzMf0AadU5mrr Y/oTSniB9/CRBmpolBSHcu0IL3OlNLgfHV9+SzM3/c8XZGPr2rT8Xa3+an2KdJxPl/x1 u4J+Tk4yb64UaMcbLd4/YKbodC5/f+spdYCjElHnkL4YvmYDcqjI1c6WBPKvjLVv6lpF dQWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=qAI9QDcWOY4sxCQAU7iYjt+4jT7tGR0MlsxZxWPgffQ=; b=leB9tjJ4dFWhu5ixP2QoEEpWku8WpKsVPVM/9goNIuBLi7iXas+x7UvcG3NBFi2fbd 7bV5T0NjgMpsFy4eSiP5s6BxBOMhePfuhtpiw2H8IlSdTrVe4n2NrDcroLUv3WkMze7m xZzyOGhcvBlSuv30Qg6R5Tz7wB/ov6Zry6d0GxoOo15eh/87BmBP/WLCVGlKRZZo/d5N vk83/y+/Ccz4k0m5ZNArNhp6qPComQy7BPgVSTOOGz0XErwiSvirWSyH/7IOHo96ZwU8 bCmihzutLXGbP8M+j9kloqKK3M1LYt08oWYzaL2Qg2aUnuA3iPzgRIqRpiXOVO+wKtJ/ MVKw== X-Gm-Message-State: AA+aEWa3sXbLesb7f64FjBQa7wbtyR38mae0p73qYwImRzS9oISlQ5jc 4ExredIjfsa8eN2A/Kt7YmVkWRuwTh2UHGgBCOKpS85y X-Google-Smtp-Source: AFSGD/WlHNzDSKJcJe38L06zPjMonjh1oVgbSkQkX/5cAb6X2U8YkM8cDhDnRF8gbZNSODH5BDRpLjo4UHX8CasDinE= X-Received: by 2002:adf:c711:: with SMTP id k17mr20370246wrg.197.1544711447857; Thu, 13 Dec 2018 06:30:47 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42e 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:15066 Archived-At: On Thu, Dec 13, 2018 at 12:56 AM Aleix Conchillo Flaqu=C3=A9 wrote: > > Hi, > > I'm pleased to announce a new guile-json release 2.0.0. This is a > breaking change release. It is not possible anymore to specify a JSON > object using alists. Instead alist->hash-table needs to be explicitly > used (examples can be found on the github page). This makes the > bidirectional mapping between Guile hash-tables and JSON objects > consistent. > > https://github.com/aconchillo/guile-json I'm a little disappointed to see this change. There are a few major issues with using hash tables for this purpose: * They have no read syntax * They use a procedural, mutable API * They are slower than alists when the number of keys is small, which is 99% of the time when dealing with serializing objects For these reasons I do not use hash tables in my JSON parser/serializer that I submitted to Guile years ago (but was never merged) and use in many of my own projects. Why not do something like Racket does and use vectors for JSON arrays and alists for JSON objects? It's not the ideal API IMO, but this way only core data types with read syntax are used and is an improvement over using hash tables. - Dave