From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] gnu: services: Add dicod-service. Date: Sun, 05 Jun 2016 14:48:16 +0200 Message-ID: <87inxnssxb.fsf@gnu.org> References: <1464969365-1593-1-git-send-email-iyzsong@gmail.com> <87bn3gtw18.fsf@gnu.org> <8737os6v40.fsf@member.fsf.org> 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]:46643) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b9XTd-0000O8-1P for guix-devel@gnu.org; Sun, 05 Jun 2016 08:48:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b9XTY-0006Ir-39 for guix-devel@gnu.org; Sun, 05 Jun 2016 08:48:24 -0400 In-Reply-To: <8737os6v40.fsf@member.fsf.org> (=?utf-8?B?IuWui+aWh+atpiIn?= =?utf-8?B?cw==?= message of "Sun, 05 Jun 2016 13:51:59 +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: =?utf-8?B?5a6L5paH5q2m?= Cc: guix-devel@gnu.org iyzsong@member.fsf.org (=E5=AE=8B=E6=96=87=E6=AD=A6) skribis: > ludo@gnu.org (Ludovic Court=C3=A8s) writes: > >> =E5=AE=8B=E6=96=87=E6=AD=A6 skribis: >> >>> * gnu/services/dict.scm: New file. >>> * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. >>> * doc/guix.texi (Various Services): Document it. >> >> Nice! I=E2=80=99ve been wanting it for some time. :-) >> >>> +@deffn {Scheme Procedure} dicod-service [#:config (dicod-configuration= )] >>> +Return a service that runs the dicod daemon, an implementation of >> >> @command{dicod} >> >>> +DICT server. >> ^ >> Add @pxref{Dicod,,, dico, GNU Dico Manual} >> >>> The optional CONFIG argument specifies the configuration >> >> @var{config} >> >>> +for dicod, which should be a object, by default >> >> @command{dicod}, @code{} >> >>> +it serving the GNU Collaborative International Dictonary of English. >> >> s/it serving/it serves/. >> >> It would be nice to document =E2=80=98dicod-configuration=E2=80=99 with = @deftp, as done >> in some other places. >> >> Also, maybe we should mention or cross-reference how to configure dico >> to connect to localhost, since the default is to connect elsewhere; >> WDYT? >> >>> + (($ name module options) >>> + `(" >>> +load-module " ,module "; >>> +database { >>> + name \"" ,name "\"; >>> + handler \"" ,module >>> + ;; append the options list using space as separator before each ele= ment. >>> + ,@(fold-right (cut cons* " " <> <>) '() options) "\"; >>> +}\n"))) >>> + databases)))) >> >> Maybe (string-join (fold-right cons '() options)) instead. >> >>> +(define* (dicod-service #:key (config (dicod-configuration))) >>> + "Return a service that runs the dicod daemon, an implementation of >>> +DICT server." >> >> Use the guix.texi doc as a docstring. > > All done, thanks for the review and guide! Awesome. :-) Ludo=E2=80=99.