From mboxrd@z Thu Jan 1 00:00:00 1970 From: iyzsong@member.fsf.org (=?utf-8?B?5a6L5paH5q2m?=) Subject: Re: [PATCH] gnu: services: Add dicod-service. Date: Sun, 05 Jun 2016 13:51:59 +0800 Message-ID: <8737os6v40.fsf@member.fsf.org> References: <1464969365-1593-1-git-send-email-iyzsong@gmail.com> <87bn3gtw18.fsf@gnu.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]:45636) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b9Qyp-0006Aj-LP for guix-devel@gnu.org; Sun, 05 Jun 2016 01:52:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b9Qym-00057H-HU for guix-devel@gnu.org; Sun, 05 Jun 2016 01:52:11 -0400 In-Reply-To: <87bn3gtw18.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Sun, 05 Jun 2016 00:43:31 +0200") 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: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org 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 elem= ent. >> + ,@(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!