From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53621) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ero4N-0008Ci-Ra for guix-patches@gnu.org; Fri, 02 Mar 2018 12:02:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ero4J-0003b9-2h for guix-patches@gnu.org; Fri, 02 Mar 2018 12:02:07 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:33596) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ero4I-0003ai-UX for guix-patches@gnu.org; Fri, 02 Mar 2018 12:02:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ero4I-0005h7-EQ for guix-patches@gnu.org; Fri, 02 Mar 2018 12:02:02 -0500 Subject: [bug#30657] Add support for file-like objects to the Prosody configuration Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <877eqwhhuy.fsf@lassieur.org> Date: Fri, 02 Mar 2018 18:00:58 +0100 In-Reply-To: <877eqwhhuy.fsf@lassieur.org> ("=?UTF-8?Q?Cl=C3=A9ment?= Lassieur"'s message of "Wed, 28 Feb 2018 23:25:25 +0100") Message-ID: <87o9k6csz9.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: =?UTF-8?Q?Cl=C3=A9ment?= Lassieur Cc: 30657@debbugs.gnu.org Hello, Cl=C3=A9ment Lassieur skribis: > These patches add support for file-like objects to the Prosody service > configuration. The idea is to replace this mechanism (which is used > very often): > > (plain-file > (with-output-to-string > ... > (format #t ...) > ...)) > > with this one: > > (mixed-text-file > (flatten > (with-tokens-to-list > ... > (push-tokens ...) > ...)) > > The point is that tokens don't have to be strings. That=E2=80=99s a great improvement. I=E2=80=99m wondering if we could somehow avoid building the token list in = this imperative manner. We could arrange to procedure a string-value gexp, i.e.: #~(string-append #$a #$b #$c) What if each =E2=80=98serialize-*=E2=80=99 procedure produce a string-value= d gexp that can be directly spliced in this big #~(string-append =E2=80=A6)? That would require changing =E2=80=98serialize-*=E2=80=99 to return a value= (currently their return value is ignored.) WDYT? Doable? Pointless? Thanks, Ludo=E2=80=99.