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: Standardized access to a REPL Date: Sat, 19 Nov 2022 15:03:05 +0000 Message-ID: <87zgcnkmvq.fsf@posteo.net> References: <0249C656-21C8-49F2-B979-A1894BF80637@gmail.com> <874juvhoyi.fsf@posteo.net> <72C5E060-76D5-45C7-80E8-C794468DAAB8@gmail.com> <87o7t35sjm.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="12072"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Yuan Fu , Jostein =?utf-8?Q?Kj=C3=B8nigsen?= , emacs-devel , Theodor Thornhill , Eli Zaretskii , jostein@kjonigsen.net To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Nov 19 16:04:04 2022 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 1owPNz-0002wd-VN for ged-emacs-devel@m.gmane-mx.org; Sat, 19 Nov 2022 16:04:04 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1owPNC-0003Gs-HD; Sat, 19 Nov 2022 10:03:14 -0500 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 1owPNB-0003GH-6F for emacs-devel@gnu.org; Sat, 19 Nov 2022 10:03:13 -0500 Original-Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1owPN8-0005zI-2e for emacs-devel@gnu.org; Sat, 19 Nov 2022 10:03:12 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id EC916240101 for ; Sat, 19 Nov 2022 16:03:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1668870187; bh=KBkG0fL27jN57kTz1hKoSLXqFrJCYLs/sTu+rtr3V+8=; h=From:To:Cc:Subject:Date:From; b=Ui6qdhAhpILdVzXH0jCMA36JLJj8EnQDAHMDV5pFbfNhJhbbIZ62Ti4Quxuvxsigo qUVH0LdsyQDFbNWL2PwODbnNtNb5fCtt2H4OULfi1NxBmNpYjTHWL/q07St94NBrxR USuAFmUs4nIG6jOq/+ExxowAKEZTTipoy0m0gRTqT80ZZgBQgcUZSpocJIcdU9YNT3 Ni8CI1imcrQzpUIOY/2bO1MsYDSC49zVcG59Le8yGus57SjOiuNgM6YPtqiJJvlAKU UlDVn/2sRlGEdDN+xYD3BysXagko/DWH2Sq/KXZnA4oxJyCqgn4eYTXVANCNhYd55D 2qqU3wtgWWBhA== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NDxjP0Dyxz9rxF; Sat, 19 Nov 2022 16:03:04 +0100 (CET) In-Reply-To: (Stefan Monnier's message of "Sat, 19 Nov 2022 09:07:58 -0500") Received-SPF: pass client-ip=185.67.36.66; envelope-from=philipk@posteo.net; helo=mout02.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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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:300181 Archived-At: Stefan Monnier writes: >>>> `compiled-prog-mode' that has generic commands for building program, >>>> `interpreted-prog-mode' that has generic commands for REPL > [...] >> (define-prog-mode foo >> :type 'compiled > > > Let me point out that the idea that some languages are compiled and > others are interpreted is bogus. This is a property of a language's > *implementation* and not of the language per se. > And of course, here we don't even really care about this facet of the > implementation: you're using those terms as a proxy for whether we use > a REPL or a batch-compiler. > > > Many languages have both REPLs and batch compilers (like, say ELisp), so > a major mode needs to be able to offer access to both functionalities at > the same time. Good point, that also indicates that that using `derive-major-mode' is not the right approach, because (AFAIK) major modes span a tree, not a DAG. Perhaps it would be better to extend prog-mode and bind keys in the default map that call methods with the current major mode. These can then either implement the methods or indicate that the feature (evaluating in a REPL when using C) is not supported. > Regarding the original suggestion to provide a uniform access to a REPL, > I started on this a long time ago, but never got it "finished" :-( > I attached what I still have of that effort. Sounds interesting, I'll take a look at it.