From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH Resend] services: dict.scm: Support more dicod configuration Date: Wed, 08 Mar 2017 18:10:04 +0100 Message-ID: <87tw73lmoj.fsf@gnu.org> References: <20170307114702.7126-1-huang.ying.caritas@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56757) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1clf6L-0005TI-1L for guix-devel@gnu.org; Wed, 08 Mar 2017 12:10:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1clf6H-0001Gl-0F for guix-devel@gnu.org; Wed, 08 Mar 2017 12:10:13 -0500 In-Reply-To: <20170307114702.7126-1-huang.ying.caritas@gmail.com> (Huang Ying's message of "Tue, 7 Mar 2017 19:47:02 +0800") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Huang Ying Cc: guix-devel@gnu.org Hello! Sorry for the long delay. Huang Ying skribis: > * gnu/services/dict.scm (): Rename databases > to items to reflect more general configuration. > (): Add new record type to describe handler (module). > (): Add more fields. > (dicod-configuration-file): Support convert more configuration items > to config file. Looks like a nice addition! > (dico dicod-configuration-dico (default dico)) > (interfaces dicod-configuration-interfaces ;list of strings > (default '("localhost"))) > - (databases dicod-configuration-databases > - ;; list of > + (items dicod-configuration-items > + ;; list of or > (default (list %dicod-database:gcide)))) =E2=80=9CItems=E2=80=9D sounds very generic. Would it make sense to instea= d keep separate =E2=80=98databases=E2=80=99 and =E2=80=98handlers=E2=80=99 fields? > +(define-record-type* > + dicod-handler make-dicod-handler > + dicod-handler? > + (name dicod-handler-name) > + (module dicod-handler-module (default #f)) > + (options dicod-handler-options (default '()))) In fact I would suggest =E2=80=9Cmodule=E2=80=9D instead of =E2=80=9Chandle= r=E2=80=9D, to stick to the name that Dico uses already, IIUC. WDYT? One last thing: could you update guix.texi to mention this? Adding an example of how to use it would be ideal. Thank you! Ludo=E2=80=99. PS: In the future you can send to guix-patches@gnu.org, which goes to where it=E2=80=99s hopefully less l= ikely to fall through the cracks. ;-)