From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.devel Subject: Re: ELPA submission: drepl (REPL protocol) Date: Tue, 31 Oct 2023 09:08:38 +0000 Message-ID: <874ji7w44p.fsf@posteo.net> References: <87wmv4bmtx.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7986"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Augusto Stoffel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Oct 31 10:10:37 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qxklf-0001mL-3A for ged-emacs-devel@m.gmane-mx.org; Tue, 31 Oct 2023 10:10:35 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qxkkg-0000BJ-4k; Tue, 31 Oct 2023 05:09:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qxkkd-0008HJ-6Y for emacs-devel@gnu.org; Tue, 31 Oct 2023 05:09:31 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qxkkZ-0008Kl-4v for emacs-devel@gnu.org; Tue, 31 Oct 2023 05:09:30 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 0F133240028 for ; Tue, 31 Oct 2023 10:09:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1698743364; bh=EO3FxJqbbnzNQpF6Nsne00ZIDBBs0ey1hhDKfAMZzUA=; h=From:To:Cc:Subject:Date:Message-ID:Autocrypt:MIME-Version:From; b=HcDN+Sln+mT49eFTJb18/NICAbWUxIXPx7Itpd53GoPrOP21en4oYCftfJJC7KkQw rcYB6Oq/boPwY1h1u0a9no4Bx8EAuhVDvaCzAiO7pJc4nggC13mTSxy+dXuRdd0rfG d1csCX3Ui0Ym3KfsT+8HwPiQeoKyTdAJOWMqan5FIm9VnLh1ch1yu/6efuFJd+cmjt 11t3Q2L7zX3nS5DUDgDM0BntIzdlXb4V0EkOGhtRRxVGI6SXQXRRVITAbSWSfy9x5/ eg/wBS6xRBMrxac3Z1HNNtxylQ0gptP0uSPZ8cjRBEjpivP1zjNLZi04tTbUFff7eS rgSGTlEHJWm1A== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4SKPTb531Zz6tsf; Tue, 31 Oct 2023 10:09:23 +0100 (CET) In-Reply-To: <87wmv4bmtx.fsf@gmail.com> (Augusto Stoffel's message of "Mon, 30 Oct 2023 08:18:02 +0100") X-Hashcash: 1:20:231031:arstoffel@gmail.com::p8a1lCo84S2E0Cn7:0kmp X-Hashcash: 1:20:231031:emacs-devel@gnu.org::vZjZBTe0EKFPD4HJ:7opo Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM Received-SPF: pass client-ip=185.67.36.65; envelope-from=philipk@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:312015 Archived-At: --=-=-= Content-Type: text/plain Augusto Stoffel 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: --=-=-= Content-Type: text/plain Content-Disposition: inline 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 ;; 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. --=-=-= Content-Type: text/plain -- Philip Kaludercic --=-=-=--