unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Philip Kaludercic <philipk@posteo.net>
To: Augusto Stoffel <arstoffel@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: ELPA submission: drepl (REPL protocol)
Date: Tue, 31 Oct 2023 09:08:38 +0000	[thread overview]
Message-ID: <874ji7w44p.fsf@posteo.net> (raw)
In-Reply-To: <87wmv4bmtx.fsf@gmail.com> (Augusto Stoffel's message of "Mon, 30 Oct 2023 08:18:02 +0100")

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

Augusto Stoffel <arstoffel@gmail.com> writes:

> Hi again,
>
> I would like to submit the following package to ELPA:
>
>   https://github.com/astoff/drepl
>
> It provides alternative shells for the Python and Lua languages.  More
> importantly, however, it defines a framework and a protocol to create
> new REPLs which hopefully helps doing some things which are tricky in
> Comint (especially completion and multi-line editing).
>
> This is kind of an experiment at this point, but I would like to make it
> public and see what people think.

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

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


[-- Attachment #2: Type: text/plain, Size: 1738 bytes --]

diff --git a/drepl.el b/drepl.el
index 1c6bd71..1a11b47 100644
--- a/drepl.el
+++ b/drepl.el
@@ -4,6 +4,8 @@
 
 ;; Author: Augusto Stoffel <arstoffel@gmail.com>
 ;; Keywords: languages, processes
+;; Version: 1.0.0
+;; Package-Requires: ((emacs "29.1"))
 
 ;; This program is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
@@ -49,7 +51,7 @@
 (defface drepl-prompt-incomplete '((t :inherit (comint-highlight-prompt default)))
   "Face for continuation prompts when input is incomplete but valid.")
 
-(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.")
 
 (defcustom drepl-directory #'drepl--project-directory
@@ -68,6 +70,8 @@ buffers, this is the dREPL buffer or nil.")
 
 ;;; Basic definitions
 
+;; 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)
@@ -96,6 +100,8 @@ The message is formed by calling `format' with FMTSTRING and ARGS."
 
 ;;; Communication protocol
 
+;; 1. Mention /what/ is not available.
+;; 2. why not fall back to json.el?
 (defalias 'drepl--json-decode
   (if (json-available-p)
       (lambda (s)
@@ -413,7 +419,7 @@ if needed."
 (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
 
 (cl-defgeneric drepl--init (repl)
   "Initialization code for REPL.

[-- Attachment #3: Type: text/plain, Size: 23 bytes --]


-- 
Philip Kaludercic

  parent reply	other threads:[~2023-10-31  9:08 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 [this message]
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
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

  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=874ji7w44p.fsf@posteo.net \
    --to=philipk@posteo.net \
    --cc=arstoffel@gmail.com \
    --cc=emacs-devel@gnu.org \
    /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).