From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59079) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gPTco-00057k-Ri for guix-patches@gnu.org; Wed, 21 Nov 2018 09:37:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gPTck-0003xb-Ss for guix-patches@gnu.org; Wed, 21 Nov 2018 09:37:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:33745) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gPTck-0003xX-Q9 for guix-patches@gnu.org; Wed, 21 Nov 2018 09:37:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gPTck-0003Ha-AT for guix-patches@gnu.org; Wed, 21 Nov 2018 09:37:02 -0500 Subject: [bug#33215] [PATCH 05/11] guix: Add clojure-utils. Resent-Message-ID: From: Alex Vong References: <87muquhcw3.fsf@gmail.com> <871s86hck1.fsf@gmail.com> <87tvkbv2gg.fsf@gnu.org> Date: Wed, 21 Nov 2018 22:35:54 +0800 In-Reply-To: <87tvkbv2gg.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Tue, 20 Nov 2018 22:55:27 +0100") Message-ID: <875zwq8pmd.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" 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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 33215@debbugs.gnu.org, alexvong1995@gmail.com --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello, ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Hello! > > I=E2=80=99m late to the party but I think there are things worth discussi= ng > here. Danny, for non-trivial bits, in particular in the (guix =E2=80=A6)= name > space, I think we should ping people to get more detailed review before > merging. > > Alex Vong skribis: > >> From 857cce37325f01c26f79a6e15e33d7988ea4a0a2 Mon Sep 17 00:00:00 2001 >> From: Alex Vong >> Date: Sun, 14 Oct 2018 03:09:48 +0800 >> Subject: [PATCH 05/11] guix: Add clojure-utils. >> >> * guix/build/clojure-utils.scm: New file. >> * gnu/packages/lisp.scm (clojure)[arguments]: Use it. >> * Makefile.am (MODULES): Add it. > > [...] > >> +(define-module (guix build clojure-utils) >> + #:use-module (guix build utils) >> + #:use-module (ice-9 ftw) >> + #:use-module (ice-9 regex) >> + #:use-module (srfi srfi-1) >> + #:use-module (srfi srfi-26) >> + #:export (%clojure-regex >> + define-with-docs >> + install-doc)) >> + >> +(define-syntax-rule (define-with-docs name docs val) >> + "Create top-level variable named NAME with doc string DOCS and value = VAL." >> + (begin (define name val) >> + (set-object-property! name 'documentation docs))) > > This is not necessarily a bad idea, but in general I=E2=80=99m very much = in > favor of consistency: since we don=E2=80=99t use this anywhere else, I=E2= =80=99d rather > not have it here either. We could discuss it separately, but IMO it > shouldn=E2=80=99t be buried in a Clojure patch. > > Thus I=E2=80=99d be in favor of using the same style in this file as in t= he rest > of Guix. > > WDYT? > No problem, I am happy to replace the doc string by a comment instead. IMO, providing doc string for variables in addition to procedures is more consistent [in a different way :)] since a procedure is just a special kind of variable. For example, 'defvar' in Emacs allows one to specify a doc string. Besides, I thought it is okay to use custom syntactic form within a module (as long as it doesn't break other's code). However, I can see that the way I use it can be confusing since everyone are used to defining variable via 'define'. Is this what you have in mind when you wrote that you are in favor of consistency? > Thanks, > Ludo=E2=80=99. Cheers, Alex --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQQwb8uPLAHCXSnTBVZh71Au9gJS8gUCW/VtSgAKCRBh71Au9gJS 8m/DAP0TKEdc9eUU5hENNYQOyzaZGPMTxYSseOQMBBO5mJCIvgEAyfAIisOiiuuP HWKx9vy2NseHoQNmihkxzomu8Rh1EAY= =4r3Q -----END PGP SIGNATURE----- --=-=-=--