Subject: [bug#75063] [PATCH 1/2] gnu: dict: Add symbols to help users configure FreeDict with dicod.

From: Runciter <[email-masked]>
Date: Sun, 29 Dec 2024 18:35:19 +0000

Hello Ludo,

I tested your config in a VM and it's not as bad as I thought. There's a
little problem though, which is one of those I anticipated: the
`load-module` statement of dicod.conf is uselessly repeated for each
non-complex dictorg database configured by the Guix service.

I have copied the dicod.conf that your configuration creates at the
bottom of this message. You can see the duplicates statements, 4 in your
case because you configured 4 non-complex dictorg dictionaries.

I'm going to go for symbols which create non-complex databases, like
your config. It's probably not going to be very easy to see if the
duplicate module loading in dicod causes a performance hit when one uses
a large number of dictorg databases, or all of them... Therefore, in the
info manual, I'm also going to change the configuration example into one
where only a handful of databases are registered into the service, as
opposed to all of them in my initial patch.

I'll send a revised patch later this week.

If that is deemed to be required, in order to fix the duplicate module
loading of dicod, one could always change the Scheme in the
`dicod-configuration-file` procedure.

Runciter

== BELOW THE dicod.conf CREATED WITH 4 NON-COMPLEX DICTORG DATABASES: ==
listen (localhost);

load-module gcide;
database {
   name "gcide";
   handler "gcide dbdir=/gnu/store/wsxc3jg8m2fi7qhlr2rrv4ik9vqhv6bp-gcide-0.53/share/gcide idxdir=/gnu/store/jflf8h70g61fsc4xgclasghjsmwqsa5c-dicod-gcide-index";
}

load-module dictorg;
database {
   name "freedict";
   handler "dictorg database=/gnu/store/nld9vc9f9jgk3x4hawjlnnzw8vzvavz2-freedict-dictionaries-0.0.0-0.914b5f7/share/dictd/fra-eng";
}

load-module dictorg;
database {
   name "freedict";
   handler "dictorg database=/gnu/store/nld9vc9f9jgk3x4hawjlnnzw8vzvavz2-freedict-dictionaries-0.0.0-0.914b5f7/share/dictd/eng-fra";
}

load-module dictorg;
database {
   name "freedict";
   handler "dictorg database=/gnu/store/nld9vc9f9jgk3x4hawjlnnzw8vzvavz2-freedict-dictionaries-0.0.0-0.914b5f7/share/dictd/eng-spa";
}

load-module dictorg;
database {
   name "freedict";
   handler "dictorg database=/gnu/store/nld9vc9f9jgk3x4hawjlnnzw8vzvavz2-freedict-dictionaries-0.0.0-0.914b5f7/share/dictd/spa-eng";
}