Subject: Re: Xapian cache/search proof of concept

From: Gabriel Santos <[email-masked]>
Date: Mon, 28 Apr 2025 08:42:56 -0300

Greetings,

I subscribed to the channel[1] and installed the package[2], but
couldn't get it working on my system. I then tried to install guile
(which I didn't do because I already had it in my profile from some
other package), but that was to no avail:

>$ guix package -i guix-xsearch guile
>The following packages will be installed:
>   guile        3.0.9
>   guix-xsearch 1.1
>$ guix xsearch
>guix: xsearch: command not found
>hint: Did you mean `search'?
>
>Try `guix --help' for more information.

I then tried the "make env" shell from the channel and that worked:

>$ make env
>guix shell -m env/manifest.scm -- || exit 0	#ignore the shell’s return value
>$ guix xsearch guix-search
>name: guix-xsearch
>[...]

Additionally, trying to install it as package by adding the channel to the load
path also doesn't work:

>$ guix package -i guix-xsearch guile -L src/channel
>The following packages will be installed:
>   guix-xsearch 1.1
>$ guix xsearch
>guix: xsearch: command not found
>hint: Did you mean `search'?
>
>Try `guix --help' for more information.

Because of this, I couldn't do the test with television[3-4] that I wanted.

I tried 10 different searches, and this seems to have "issues"—more like
warnings, as there's no crashes—with longer results:

>$ make env
>guix shell -m env/manifest.scm -- || exit 0	#ignore the shell’s return value
>$$ guix xsearch kde
>name: kde-games
>[...]

I then scroll to the third result, which in my case is kde-cli-tools, by
pressing "PageDown" + "Up Arrow" to keep the "name" line at the top:

>name: kde-cli-tools
>[...]

And press "q", to quit (I think that search uses the default pager,
which in my case is still less):

>Backtrace:
>           9 (primitive-load "/home/gabriel/.config/guix/current/bin…")
>In guix/ui.scm:
>   2352:7  8 (run-guix . _)
>  2315:10  7 (run-guix-command _ . _)
>  1807:16  6 (call-with-paginated-output-port _ #:less-options _)
>  1850:11  5 (_ #<output: #{write pipe}# 20>)
>   1655:2  4 (package->recutils _ #<output: #{write pipe}# 20> _ # _ …)
>In ice-9/format.scm:
>  1548:18  3 (format #<output: #{write pipe}# 20> "~a~%" "descriptio…")
>   216:11  2 (format:format-work "~a~%" ("description: `trayer' is …"))
>     65:8  1 (format:out-obj-padded _ _ _ _)
>In unknown file:
>           0 (display "description: `trayer' is small program desig…" …)
>
>ERROR: In procedure display:
>In procedure fport_write: Broken pipe

This is only a issue if you stop at the middle of a search result. It
doesn't happen when you press "END" for examplle to get to the very last
one.

With those issues aside, it seems realy good, the search seems to be almost
instant.

[1] <https://codeberg.org/gs-101/.files/commit/d8405ce168b67323e0de03e51c111ec75b127c5d>
[2] <https://codeberg.org/gs-101/.files/commit/9d8a9d81a5aa5b5304997e714537df771d7725df>
[3] <https://github.com/alexpasmantier/television>
[4] <https://github.com/alexpasmantier/television/wiki/Cable-channels#%EF%B8%8F-guix>

Regards,

-- 
Gabriel Santos