unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Huang Ying <huang.ying.caritas@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH Resend] services: dict.scm: Support more dicod configuration
Date: Wed, 08 Mar 2017 18:10:04 +0100	[thread overview]
Message-ID: <87tw73lmoj.fsf@gnu.org> (raw)
In-Reply-To: <20170307114702.7126-1-huang.ying.caritas@gmail.com> (Huang Ying's message of "Tue, 7 Mar 2017 19:47:02 +0800")

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?

> +(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?

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’.

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.  ;-)

  parent reply	other threads:[~2017-03-08 17:10 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 [this message]
2017-03-09 11:51   ` Huang, Ying
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=87tw73lmoj.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=huang.ying.caritas@gmail.com \
    /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).