From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Augusto Stoffel Newsgroups: gmane.emacs.devel Subject: Re: ELPA submission: drepl (REPL protocol) Date: Wed, 01 Nov 2023 19:36:20 +0100 Message-ID: <87msvx9v8b.fsf@gmail.com> References: <87wmv4bmtx.fsf@gmail.com> <874ji7w44p.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33615"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org To: Philip Kaludercic Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Nov 01 19:37:04 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 1qyG5Q-0008XL-EB for ged-emacs-devel@m.gmane-mx.org; Wed, 01 Nov 2023 19:37:04 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qyG4s-0003yH-4r; Wed, 01 Nov 2023 14:36:30 -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 1qyG4p-0003wH-PN for emacs-devel@gnu.org; Wed, 01 Nov 2023 14:36:27 -0400 Original-Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qyG4o-0007pI-8k for emacs-devel@gnu.org; Wed, 01 Nov 2023 14:36:27 -0400 Original-Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-53e70b0a218so134546a12.2 for ; Wed, 01 Nov 2023 11:36:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698863783; x=1699468583; darn=gnu.org; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=uLzYbw6J9SP7Yh6/Ph1D7CCrWeHqVdYxk3+yWpgYEAA=; b=k+gmy3GB5EPX7Uw83SmMQDDD1H0ErzEV1nXFwYH9kjjtFBYQdd/2sfRhutnrceIGy0 MA3SXsA5BPmU57UZYGytkCp++8EMLaG5HZKVKX66iV9unh9rTsFw+tIo3UNIg99Mx2GO QbImwKD1o2ub9QWneO7u31njkO5ozSh5xU3CHg2Lmf4Ls4S2kJpxneDc7FE/H0HNTl1V KR1wiIQXA77xz+2RPmEnTvmgK2X2TcGhaj4S9Ye8iFaQrnkYjxMuNNfqFh0aP5RyCan4 QElXlYP257N9ANPZk6X8wyap9YEoNJZWxwMGz9RPCm+KxWfbKVDVdpZWFgK1QRJ5HvXw EiFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698863783; x=1699468583; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=uLzYbw6J9SP7Yh6/Ph1D7CCrWeHqVdYxk3+yWpgYEAA=; b=LC2H1cKrFiwf3/l8s2oDoDSszAvMLw8gZHBytySyBq5WSVqBFEPRO+wsk76CMEKatZ 5webmOznfGBj1R2stiVlXNq5+7DfkmwwN1CX8ePu8f04BEQk/dmJ6lmdW0NWz/oEppAO lf08Nj83vDFSQ0rUnMkyNw+tpZPxir+dpamNI1AWGFYzyryur7GGln4Fa2fs7us3QZJ5 fmyP5ZzVLjCk/+UBusENU57Pa7Slr3LL8dOlG1dCPJbnuz50sz+UkJmDMVLSsFAj4uLu iwGudGF+Zh/Fr0VYDqgG+MexzI+kg9jQFZpbiK/8ANcBypjQ5rqKrlwrJPLVa608Tft2 M/Mg== X-Gm-Message-State: AOJu0Ywp7J3JVUim9ahqgtRkm5v6tr+XhmA8Qup8bMKXzHOvQ7fVXTgE h4F1JdQge3bok/szH/BgLazLO87rQpU= X-Google-Smtp-Source: AGHT+IGk8tjHsBI/T2MABdhzs4Pgr1LbP+7u+/aRT2ZDkM5ukqTdSJECfRh9gRSd6fM8SebhXSORJw== X-Received: by 2002:a05:6402:2038:b0:53e:b8e2:1d58 with SMTP id ay24-20020a056402203800b0053eb8e21d58mr13257485edb.13.1698863782744; Wed, 01 Nov 2023 11:36:22 -0700 (PDT) Original-Received: from ars3 ([2a02:8109:8ace:5100::1448]) by smtp.gmail.com with ESMTPSA id ay19-20020a056402203300b00543820cd70asm1334737edb.93.2023.11.01.11.36.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 11:36:21 -0700 (PDT) In-Reply-To: <874ji7w44p.fsf@posteo.net> (Philip Kaludercic's message of "Tue, 31 Oct 2023 09:08:38 +0000") Received-SPF: pass client-ip=2a00:1450:4864:20::534; envelope-from=arstoffel@gmail.com; helo=mail-ed1-x534.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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:312085 Archived-At: 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?