From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Vivien Kraus via General Guile related discussions Newsgroups: gmane.lisp.guile.user Subject: Re: Demanding Interoperability to Strengthen the Free (Libre) Web: Introducing DISFLUID Date: Mon, 02 Aug 2021 10:20:24 +0200 Message-ID: <3e12fda58ea809ed16bb6706efcbd81614809480.camel@planete-kraus.eu> References: <5cbc279ee59779dcaca73de7745a9d0dbd5abfce.camel@planete-kraus.eu> Reply-To: Vivien Kraus Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8086"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Evolution 3.34.2 Cc: guile-user To: Aleix Conchillo =?ISO-8859-1?Q?Flaqu=E9?= Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Mon Aug 02 10:20:51 2021 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mATBq-0001ww-Sd for guile-user@m.gmane-mx.org; Mon, 02 Aug 2021 10:20:50 +0200 Original-Received: from localhost ([::1]:37100 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mATBo-00028B-T2 for guile-user@m.gmane-mx.org; Mon, 02 Aug 2021 04:20:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44046) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mATBe-00027n-Hl for guile-user@gnu.org; Mon, 02 Aug 2021 04:20:38 -0400 Original-Received: from planete-kraus.eu ([2a00:5881:4008:2810::309]:49242) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1mATBa-00071a-OQ for guile-user@gnu.org; Mon, 02 Aug 2021 04:20:38 -0400 Original-Received: from planete-kraus.eu (localhost.lan [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id 2f2e6a29; Mon, 2 Aug 2021 08:20:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=planete-kraus.eu; h= message-id:subject:from:to:cc:date:in-reply-to:references :content-type:mime-version:content-transfer-encoding; s=*; bh=qp j8TC9zZ10/ZCwO8geFbSbv8v8=; b=ZqiJpigZlPE3npEKQ3cCZOO9xAj4WcXbsH C5wPGGnIDfo0VuvXl0GAgvYxvFN/h8BrsLNHGBHVC5ch/yU6n9gR94uxkLiDT5Is 1+wqZmaTppgdGwmTTqIALo/ZkG1/JIE20MwqxHmjdhZoy+kFebxLNeDv/aU3U3Tp o83ijiOpg= Original-Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id 7ea99973 (TLSv1.3:AEAD-CHACHA20-POLY1305-SHA256:256:NO); Mon, 2 Aug 2021 08:20:26 +0000 (UTC) In-Reply-To: Received-SPF: pass client-ip=2a00:5881:4008:2810::309; envelope-from=vivien@planete-kraus.eu; helo=planete-kraus.eu X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.io gmane.lisp.guile.user:17660 Archived-At: Hello Aleix ! Le dimanche 01 août 2021 à 23:27 -0700, Aleix Conchillo Flaqué a écrit : > Unfortunately guile-json doesn't follow srfi-180 api (it was created > much sooner), but regarding alists' keys it can support both symbols > and strings. So you can do (scm->json '((foo . "bar"))) or (scm->json > '(("foo" . "bar"))) and both would work the same. Exactly! The problem is in the other way around, json->scm. By default, I get stringly-keyed objects, so I add another pass to convert them to symbolicly-keyed objects. > By the way, a long time ago I also worked on guile-jwt ( > https://github.com/aconchillo/guile-jwt) which is SUPER basic > compared to what you've done. I was planning to add JWK support at > some point. I'm wondering if we could take your code and merge it > into guile-jwt so other projects can use it. What do you think? Right > now I don't have much time but if you say it's fine I could work on > it whenever I'm free. That would be awesome, but working with C bindings is a pain with guile. If you inherit all the JWS and JWK code, I still need to keep them around for things like hashing the URIs for the cache and resource server and generating random numbers. The clever thing to do would be to switch to guile-gcrypt first (so that I don’t have any more C) and then move the code to guile-jwt (we can still change the API if you prefer another one, I don’t have a 1.0 release yet). Since that code will most likely be run on web servers, have you considered releasing it under the AGPL? Best regards, Vivien