unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Sergey Kostyaev <sskostyaev@gmail.com>
To: Philip Kaludercic <philipk@posteo.net>
Cc: emacs-devel@gnu.org
Subject: Re: Add elisa to GNU ELPA
Date: Tue, 16 Jul 2024 20:57:41 +0700	[thread overview]
Message-ID: <F91715E7-DD0F-4CDC-9F83-2C7223C091D4@gmail.com> (raw)
In-Reply-To: <8734o9sdig.fsf@posteo.net>

[-- Attachment #1: Type: text/plain, Size: 3008 bytes --]

Thank you for review.

> 16 июля 2024 г., в 19:54, Philip Kaludercic <philipk@posteo.net> написал(а):
> 
> Despite
> reading through the entire source code, I have no idea what you are
> trying to do with this package.  It would be nice to have some more
> context in the Commentary section and elaborate a number of user-facing
> docstrings, unless this is intended to be expert software, for people
> familiar with whatever the field is.

I need to improve it. With README.org <http://readme.org/> it should be cleaner, but It should be understandable without it.

Why should we remove elisa customization group? I think there are many customization options to move it to group.

> @@ -48,68 +47,61 @@
> 					    (make-llm-ollama
> 					     :embedding-model "nomic-embed-text"))
>   "Embeddings provider to generate embeddings."
> -  :group 'elisa
> -  :type '(sexp :validate 'cl-struct-p))
> +  :type '(sexp :validate 'cl-struct-p)) ;a more specific predicate here?

It should be `llm` provider. Unfortunately there are no more specific predicate for that.

> (defcustom elisa-db-directory (file-truename
> 			       (file-name-concat
> 				user-emacs-directory "elisa"))
>   "Directory for elisa database."
> -  :group 'elisa
> -  :type 'directory)
> +  :type 'directory)                     ;is it necessary that it exists?

If you mean option - then yes. If you mean directory, I can create it in `elisa' package.

> +     (regexp-opt (mapcar #'car reps)) ;is the last one really \0 or \\0?

Really. Probably impossible case, but it’s defensive programming.

> +;; a number of these functions seem like something that should be added to the core of Emacs or at least a common ELPA package...
> (defun elisa-dot-product (v1 v2)
>   "Calculate the dot produce of vectors V1 and V2."

Good idea. How can we implement it?

> -       (format "%s -f html --to plain"
> -	       (executable-find elisa-pandoc-executable))
> +       (format "%s --from html --to plain" elisa-pandoc-executable)
>        buffer-name t)
>       buffer-name)))

We should keep executable-find call here. It was feature request from users. It can be useful with per-directory PATH, like with direnv.

> 
> (defun elisa-fts-query (prompt)
>   "Return fts match query for PROMPT."
> -  (thread-last
> +  (thread-last                          ;i belive you can do all of this with a single regular expression...
>     prompt
>     (string-trim)
>     (downcase)

Maybe. But I prefer to keep it readable.
> @@ -1071,7 +1044,7 @@ WHERE d.rowid in %s;"
> 		   (when-let ((kind (cl-first row))
> 			      (path (cl-second row))
> 			      (text (cl-third row)))
> -		     (pcase kind
> +		     (pcase kind        ;is this a `pcase-exhaustive'?
> 		       ("web"
> 			(ellama-context-add-webpage-quote-noninteractive path path text))
> 		       ("file"

I think it should be extendable, but for now it is not.

Best regards,
Sergey Kostyaev


[-- Attachment #2: Type: text/html, Size: 7120 bytes --]

  reply	other threads:[~2024-07-16 13:57 UTC|newest]

Thread overview: 91+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-12 16:47 Add elisa to GNU ELPA Sergey Kostyaev
2024-07-16 12:54 ` Philip Kaludercic
2024-07-16 13:57   ` Sergey Kostyaev [this message]
2024-07-16 16:04     ` Philip Kaludercic
2024-07-16 16:35       ` Sergey Kostyaev
2024-07-17 13:21         ` Andrew Hyatt
2024-07-16 16:41       ` Sergey Kostyaev
2024-07-16 17:02         ` Philip Kaludercic
2024-07-16 17:47           ` Adding a generic mathematical library Philip Kaludercic
2024-07-16 22:06             ` Emanuel Berg
2024-07-17  2:54               ` Christopher Dimech
2024-07-17  5:58                 ` Emanuel Berg
2024-07-19 16:16               ` Richard Stallman
2024-07-19 17:38                 ` Christopher Dimech
2024-07-21  5:20                   ` Emanuel Berg
2024-07-20 12:45                 ` Max Nikulin
2024-07-20 13:53                   ` Christopher Dimech
2024-07-21  5:19                 ` Emanuel Berg
2024-07-21  6:15                   ` Emanuel Berg
2024-07-21  7:40                     ` Emanuel Berg
2024-07-21  8:45                       ` Emanuel Berg
2024-07-21  8:29                     ` Emanuel Berg
2024-07-21  7:27                   ` Christopher Dimech
2024-07-21  8:03                     ` Emanuel Berg
2024-07-21  9:14                       ` Christopher Dimech
2024-07-21  9:48                         ` Emanuel Berg
2024-07-21 11:20                           ` Emanuel Berg
2024-07-21 11:53                             ` Christopher Dimech
2024-07-21 12:10                               ` Emanuel Berg
2024-07-21 12:27                                 ` Emanuel Berg
2024-07-21 12:46                                   ` Emanuel Berg
2024-07-21 13:03                                   ` Christopher Dimech
2024-07-21 13:17                                     ` Emanuel Berg
2024-07-21 14:33                                       ` Eli Zaretskii
2024-07-21 14:41                                         ` Christopher Dimech
2024-07-21 14:49                                           ` Eli Zaretskii
2024-07-21 14:58                                             ` Christopher Dimech
2024-07-21 15:02                                               ` Eli Zaretskii
2024-07-21 15:18                                                 ` Christopher Dimech
2024-07-21 13:18                                     ` Christopher Dimech
2024-07-21 13:26                                       ` Emanuel Berg
2024-07-21 14:35                                         ` Christopher Dimech
2024-07-21 19:28                                           ` Emanuel Berg
2024-07-21 19:33                                           ` Emanuel Berg
2024-07-21 19:51                                           ` Emanuel Berg
2024-07-21 20:01                                           ` Emanuel Berg
2024-07-21 20:17                                           ` Emanuel Berg
2024-07-21 12:41                                 ` Christopher Dimech
2024-07-21 13:13                                   ` Emanuel Berg
2024-07-21 13:41                                   ` Emanuel Berg
2024-07-21 12:20                               ` Emanuel Berg
2024-07-21 12:04                             ` Emanuel Berg
2024-07-21 14:30                 ` hypotenuse (was: Re: Adding a generic mathematical library) Emanuel Berg
2024-07-21 14:44                   ` Eli Zaretskii
2024-07-21 15:00                     ` Eli Zaretskii
2024-07-21 15:12                       ` Christopher Dimech
2024-07-21 15:42                         ` Eli Zaretskii
2024-07-21 16:13                           ` Christopher Dimech
2024-07-21 15:54                         ` hypotenuse Max Nikulin
2024-07-21 16:12                           ` hypotenuse Eli Zaretskii
2024-07-21 16:17                             ` hypotenuse Christopher Dimech
2024-07-21 19:01                     ` hypotenuse (was: Re: Adding a generic mathematical library) Emanuel Berg
2024-07-21 19:13                     ` Emanuel Berg
2024-07-21 17:38                   ` tomas
2024-07-17  7:09             ` Adding a generic mathematical library Michael Heerdegen via Emacs development discussions.
2024-07-17  7:54               ` Philip Kaludercic
2024-07-17  7:56               ` Michael Heerdegen via Emacs development discussions.
2024-07-18  6:07                 ` Emanuel Berg
2024-07-18  6:45                   ` Christopher Dimech
2024-07-18  7:12                     ` Emanuel Berg
2024-07-18  7:49                       ` Christopher Dimech
2024-07-21  4:56                         ` Emanuel Berg
2024-07-18  7:29                   ` Eli Zaretskii
2024-07-18  7:57                     ` Emanuel Berg
2024-07-18  9:03                       ` Eli Zaretskii
2024-07-21  4:52                         ` Emanuel Berg
2024-07-18  8:15                     ` Emanuel Berg
2024-07-18  9:04                       ` Eli Zaretskii
2024-07-18  9:13                       ` Christopher Dimech
2024-07-21  4:59                         ` Emanuel Berg
2024-07-19 13:22                       ` Emanuel Berg
2024-07-19 16:12                         ` Christopher Dimech
2024-07-19 16:15                           ` Stefan Kangas
2024-07-19 16:29                             ` Christopher Dimech
2024-07-19 16:16               ` Richard Stallman
2024-07-19 18:00                 ` Christopher Dimech
2024-07-17 21:26   ` Add elisa to GNU ELPA Sergey Kostyaev
2024-07-17 22:12     ` Philip Kaludercic
2024-07-18  3:45       ` Sergey Kostyaev
2024-07-18 11:06       ` Sergey Kostyaev
     [not found] <D57DBB96-82DE-4697-A358-032B04190724@gmail.com>
2024-03-09  9:03 ` Add elisa to gnu elpa Philip Kaludercic

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://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=F91715E7-DD0F-4CDC-9F83-2C7223C091D4@gmail.com \
    --to=sskostyaev@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=philipk@posteo.net \
    /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/emacs.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).