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:28:57 +0100 Message-ID: <87sf5p9vkm.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="4356"; 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:32:14 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 1qyG0i-000102-Ut for ged-emacs-devel@m.gmane-mx.org; Wed, 01 Nov 2023 19:32:12 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qyFzl-0002Vc-65; Wed, 01 Nov 2023 14:31:13 -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 1qyFzk-0002VN-BE for emacs-devel@gnu.org; Wed, 01 Nov 2023 14:31:12 -0400 Original-Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qyFzi-0006qJ-64 for emacs-devel@gnu.org; Wed, 01 Nov 2023 14:31:11 -0400 Original-Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-53e07db272cso121683a12.3 for ; Wed, 01 Nov 2023 11:31:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698863467; x=1699468267; 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=WH7BCGdXL4goBq8d9bSboqZ5y8yqFMLQuShxWzpAzPnojdSRpyiuI1h6LRYDWAPYO1 wXW83ej9WgIsAj5NEdPSiX7zpg5NWOVdENMbyiLG5c0ZZ/44pFpzOONLsoFaSCLi2c6G JnRZN65OHlo8pI4dcKAmAEMyzuVN31e7J4Oas8Wcp6St/Dozrk9umqS4PzW6O0e8MpiA etfavvJ/TMDoqpp0NcDJJjdsOQvFCtwCTNbZASdwiSOGXhj6RS1g3Uoy8bqw0qR9uiri 1h0USNUN7zWKl+nxFEUuKLUkdsY+FAj3e4gPbRH7/fBWcKgO6BWt/2hGhaCURqgUi9lO ZrUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698863467; x=1699468267; 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=blytXAkAWJChx+putX39HlnuZENyBISjN6xANIbixXS05NlETeSsSb13l8tSfKo0R9 E6YMdIqmtSPoywXiEf+sgQOFLO1dZpDD1Wk+zV32X8xfunrqDyFVFf6gWB0YoKfxG6rs h+ZKmDQQyDrnNgaiJVR1uafeMXDmseZ+4MYesxfddQdwa4hxN4l16FT4Oz86S3KyP07h XPk282xHRBVOxQrqBakv6frnGAju2rTQks8mh5d112CbaQfnAnAJXXY1lvwkHaSnxhmM RO1YGvDsT90hEhP3sczdZyfSjlbRANHwUHw4mVDpDEPi1pkWw75Qofd08cMbCEmha0zg sw4g== X-Gm-Message-State: AOJu0Yy/h0ogy9gyMx9ClMqXJkwSweDu6Hh7s+WU4sYwtYWV1BWVnz1q PeZHFC/fRDAgWYFl5tX4Db7oUBTBgHc= X-Google-Smtp-Source: AGHT+IGoi5xIrZzVwEJTcreJGk4WDx0E4AOBWghW1/4y0/smW5uWCVJA/oSl6SiGHy4Lx4WDQnYWXg== X-Received: by 2002:aa7:c454:0:b0:53d:b751:ece1 with SMTP id n20-20020aa7c454000000b0053db751ece1mr13373056edr.41.1698863466885; Wed, 01 Nov 2023 11:31:06 -0700 (PDT) Original-Received: from ars3 ([2a02:8109:8ace:5100::1448]) by smtp.gmail.com with ESMTPSA id m22-20020a509316000000b0053df23511b0sm1373866eda.29.2023.11.01.11.29.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 11:29:33 -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::52e; envelope-from=arstoffel@gmail.com; helo=mail-ed1-x52e.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:312084 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?