all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Augusto Stoffel <arstoffel@gmail.com>
To: Philip Kaludercic <philipk@posteo.net>
Cc: emacs-devel@gnu.org
Subject: Re: ELPA submission: drepl (REPL protocol)
Date: Wed, 01 Nov 2023 19:36:20 +0100	[thread overview]
Message-ID: <87msvx9v8b.fsf@gmail.com> (raw)
In-Reply-To: <874ji7w44p.fsf@posteo.net> (Philip Kaludercic's message of "Tue,  31 Oct 2023 09:08:38 +0000")

On Tue, 31 Oct 2023 at 09:08, Philip Kaludercic wrote:

> The idea seems interesting, I'll have to try it out at some point
> (though I don't really use Python or Lua much, so I hope you plan to add
> more languages in the future).

Sure, let me know if you have any ideas.  A good candidate, as I
mention in the readme, would be a language that has a good embeddable
REPL library that you hack into (as opposed to a program where the
REP-loop is more or less hardcoded).

> Code-wise, I just have a few minor comments:

> -(defface drepl-prompt-invalid '((t :inherit (error default)))
> +(defface drepl-prompt-invalid '((t :inherit (error default))) ;why both?
>    "Face for continuation prompts when input is invalid.")

This is really needed to avoid comint-highlight-input from interfering
in continuation prompts.

> +;; Are classes needed here or could you use `cl-defstruct' with
> +;; `:include'?
>  (defclass drepl-base ()
>    ((buffer :initarg :buffer :reader drepl--buffer)
>     (status :initform nil :accessor drepl--status)

I would use a more lightweight alternative to EIEIO if available, but
cl-defstructs don't form a hierarchy for method dispatch purposes.  (Not
that I'm using this feature _right now_, but morally it's the right
thing.)

>  (cl-defgeneric drepl--command (repl)
>    "The command to start the REPL interpreter as a list of strings."
>    (ignore repl)
> -  (error "This needs an implementation"))
> +  (error "This needs an implementation")) ;Mention what "this" is

_This_ is the method.  This is one of the two things that cannot have a
default implementation and should be implemented by every subclass :-).
Is the message confusing?



  parent reply	other threads:[~2023-11-01 18:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-30  7:18 ELPA submission: drepl (REPL protocol) Augusto Stoffel
2023-10-30 22:33 ` Stefan Kangas
2023-10-31  8:11   ` Augusto Stoffel
2023-11-01 20:18     ` Stefan Kangas
2023-10-31  9:08 ` Philip Kaludercic
2023-11-01 18:28   ` Augusto Stoffel
2023-11-01 18:38     ` Philip Kaludercic
2023-11-01 18:56       ` Augusto Stoffel
2023-11-02 14:26       ` João Távora
2023-11-02 16:08         ` Augusto Stoffel
2023-11-02 16:16           ` João Távora
2023-11-01 18:36   ` Augusto Stoffel [this message]
2023-11-07  8:20   ` Philip Kaludercic
2023-11-07 16:52     ` Augusto Stoffel

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

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

  git send-email \
    --in-reply-to=87msvx9v8b.fsf@gmail.com \
    --to=arstoffel@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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.