unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Huang\, Ying" <huang_ying_caritas@163.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH Resend] services: dict.scm: Support more dicod configuration
Date: Thu, 09 Mar 2017 19:51:56 +0800	[thread overview]
Message-ID: <8760jimzvn.fsf@163.com> (raw)
In-Reply-To: <87tw73lmoj.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Wed, 08 Mar 2017 18:10:04 +0100")

ludo@gnu.org (Ludovic Courtès) writes:

> Hello!
>
> Sorry for the long delay.
>
> Huang Ying <huang.ying.caritas@gmail.com> skribis:
>
>> * gnu/services/dict.scm (<dicod-configuration>): Rename databases
>>   to items to reflect more general configuration.
>>   (<dicod-handler>): Add new record type to describe handler (module).
>>   (<dicod-database>): 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 <dicod-database>
>> +  (items       dicod-configuration-items
>> +               ;; list of <dictod-handler> or <dicod-database>
>>                 (default (list %dicod-database:gcide))))
>
> “Items” sounds very generic.  Would it make sense to instead keep
> separate ‘databases’ and ‘handlers’ fields?

OK.

>> +(define-record-type* <dicod-handler>
>> +  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 “module” instead of “handler”, to stick to the
> name that Dico uses already, IIUC.  WDYT?

From dico documentation

http://puszcza.gnu.org.ua/software/dico/manual/html_node/dictorg.html

There may be multiple instances for one module.  And the "instance" is
called as "handler" in "database" configuration.  So I changed the name.
If we call "instance" as "module", we will need another name for the
"module" in "instance" configuration.

> One last thing: could you update guix.texi to mention this?  Adding an
> example of how to use it would be ideal.

Sure.  I just want to collect some comments before change the
documentation.

> Thank you!
>
> Ludo’.
>
> PS: In the future you can send to guix-patches@gnu.org, which goes to
>     <https://bugs.gnu.org/guix-patches> where it’s hopefully less likely
>     to fall through the cracks.  ;-)

Sure.  Thanks for pointing this out!

Best Regards,
Huang, Ying

  reply	other threads:[~2017-03-09 11:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-07 11:47 [PATCH Resend] services: dict.scm: Support more dicod configuration Huang Ying
2017-03-08 11:12 ` Huang, Ying
2017-03-08 17:10 ` Ludovic Courtès
2017-03-09 11:51   ` Huang, Ying [this message]
2017-03-09 12:45     ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8760jimzvn.fsf@163.com \
    --to=huang_ying_caritas@163.com \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).