From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jostein_Kj=c3=b8nigsen?= Newsgroups: gmane.emacs.devel Subject: Re: Why tree-sitter instead of Semantic? (was Re: CC Mode with font-lock-maximum-decoration 2) Date: Sat, 13 Aug 2022 16:40:12 +0200 Message-ID: References: <83o7wuva9o.fsf@gnu.org> <83mtceupbx.fsf@gnu.org> <83lerxvfnu.fsf@gnu.org> <838rnxvdcq.fsf@gnu.org> <83r11ptksn.fsf@gnu.org> <83a68dti6w.fsf@gnu.org> Reply-To: jostein@kjonigsen.net Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------kOs3qYPRt7sMdcPgSHhBtDNf" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28049"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Cc: Alan Mackenzie , emacs-devel To: Lynn Winebarger , Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Aug 13 16:41:51 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 1oMsKj-000718-LQ for ged-emacs-devel@m.gmane-mx.org; Sat, 13 Aug 2022 16:41:51 +0200 Original-Received: from localhost ([::1]:34348 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oMsKi-0007EB-D2 for ged-emacs-devel@m.gmane-mx.org; Sat, 13 Aug 2022 10:41:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45710) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMsJK-0006Se-8C for emacs-devel@gnu.org; Sat, 13 Aug 2022 10:40:22 -0400 Original-Received: from out2-smtp.messagingengine.com ([66.111.4.26]:50669) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMsJH-0007Pa-SQ; Sat, 13 Aug 2022 10:40:21 -0400 Original-Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id C50155C00B9; Sat, 13 Aug 2022 10:40:15 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Sat, 13 Aug 2022 10:40:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= secure.kjonigsen.net; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:reply-to:sender:subject:subject:to:to; s=fm3; t= 1660401615; x=1660488015; bh=3VMfcWtnZVzC//IYphyLG7dd/v2B9PN7z5R N47I8f6A=; b=yhGEvjt/NXUS0fvLyr+qKCgon2EQPYVJ1HjtLSH/8wbvBqWQUXM nE0nZ57bpScP9oLdU36uhFgeN+vYqszavQ2zb/RREVmH3VibA+6dlixHqnWypI2g Ddj+YjuDZuit2R3qcltjFjXJX/hY0VdsLePKsgXKTmw3p+zmgsItM+yq0L8PYAb0 ibutc0K4ut9lhEjhlba6dLNPGiEJOrcanZy4B6Czd+4at2jPZ00wdCEN97COuZ+I Sa7vb9rogqWINPVBndzD3I85mmv5f8wmOImP4UErYvUEry+IEEMmVp7eVGHGnOQr Wcj9keM11p6KvRHQSfvlPhWIoq9MI0AaVdg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1660401615; x=1660488015; bh=3VMfcWtnZVzC/ /IYphyLG7dd/v2B9PN7z5RN47I8f6A=; b=lq0FtJeSFA0GIaDBxkmShikcbXA3l vy1U8iNVyiJgm+KpZc3qxUw3PsYrF9OLynqFTiB/dCaaoEOLjEUmXUk8XUvypTVM Vmwb6TJfTCrgrq4NmdY5wAzdGocZXwiqmTnaIQIJR4U6Ju/+gyYn6684slnu2AqX XJbnMceITAtrt6i1KPiL6UzOcZxwr+jqKhr0HvDkrbtjoo4riKrXTQDkwE8DomHM Ohqm9SAu1PGTX8HPsXa+PmpASTh22IMkwq6aAeMbV7aUsGWxiYk3Uz1yfcCSwVwk t6R5HaWcYXbDmu8suHxc4b0gpZZ5/xVWKbc3lImAVAKWHF3m3c565qwVA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdegkedgkeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurheptgfkffggfghruffvvehfhfgjsegrtderredtfeejnecuhfhrohhmpeflohhs thgvihhnpgfmjhppnhhighhsvghnuceojhhoshhtvghinhesshgvtghurhgvrdhkjhhonh highhsvghnrdhnvghtqeenucggtffrrghtthgvrhhnpeehffetffejgfetgfelhfegtdej heeikeejffejgfehjeehfeefgfdvveetteevheenucffohhmrghinhepkhhjnhhighhsvg hnrdhnohenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhm pehjohhsthgvihhnsehsvggtuhhrvgdrkhhjohhnihhgshgvnhdrnhgvth X-ME-Proxy: Feedback-ID: ib2f84088:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 13 Aug 2022 10:40:14 -0400 (EDT) Content-Language: nb-NO In-Reply-To: Received-SPF: pass client-ip=66.111.4.26; envelope-from=jostein@secure.kjonigsen.net; helo=out2-smtp.messagingengine.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-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" Xref: news.gmane.io gmane.emacs.devel:293417 Archived-At: This is a multi-part message in MIME format. --------------kOs3qYPRt7sMdcPgSHhBtDNf Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit It seems (as usual) the core question asked in the thread gets burried in lots of other discussion, which while I'm sure is worthwhile, doesn't quite answer the original question. Specifically I'm referring to the email-topic and the question asked in the email: On 10.08.2022 02:22, Lynn Winebarger wrote: > I'm curious, though, as to why Semantic/CEDET seems to have been > superceded by external solutions like tree-sitter or LSP-based > (non-emacs) servers. Maybe I'm not an average Emacs'er. I'll even be willing to admit that one of the main problems here is my lack of knowledge in this matter. But I've yet to date seen any case where Semantic or CEDET has provided me with value as a Emacs end-user and programmer. Maybe it works. Maybe it's useful. Maybe it does magical things. But as far as I know, it's a mode you can enable, and then .... nothing happens. Compare that to LSP... I install a package (lsp-client), add the relevant hook to prog-mode, and /instantly /every major-mode I interact with gets intelligent, contextually correct, auto-complete. I can do safe renames across projects, and lots of actual useful, observable magic happens. And I get the exact same language support as every other editor out there, and I'm not limited to who is willing to contribute to the Emacs-ecosystem. This is why LSP has such great adoption "everywhere",  and became the universal standard almost overnight. If CEDET can do this too... Then why not provide some documentatio or guides on how to set it up to be equally useful? If it can't, then one needs to clarify what CEDETs role is, in a world where everyone else has decided on LSP being the way forward, and provide documentation/guides which helps people exploit what CEDET has to offer. Otherwise what I suspect is already a niche mode will become, if possible, even more niche. Back to tree-sitter...I'm not saying that the same thing as LSP is guaranteed to happen to tree-sitter, not by far. But it has some of the same great things giving it momentum: It's fast (instant?), editor-external, meaning it gets contributions from lots of developers outside the Emacs ecosystem, and as a result already has parser for pretty much all languages out there. If I'm making a new major-mode these days, for the same reason, I'm going to be basing it on tree-sitter in one form or the other. -- Kind regards *Jostein Kjønigsen* jostein@kjonigsen.net 🍵 jostein@gmail.com https://jostein.kjønigsen.no --------------kOs3qYPRt7sMdcPgSHhBtDNf Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
It seems (as usual) the core question asked in the thread gets burried in lots of other discussion, which while I'm sure is worthwhile, doesn't quite answer the original question.

Specifically I'm referring to the email-topic and the question asked in the email:

On 10.08.2022 02:22, Lynn Winebarger wrote:
I'm curious, though, as to why Semantic/CEDET seems to have been superceded by external solutions like tree-sitter or LSP-based (non-emacs) servers.

Maybe I'm not an average Emacs'er. I'll even be willing to admit that one of the main problems here is my lack of knowledge in this matter.

But I've yet to date seen any case where Semantic or CEDET has provided me with value as a Emacs end-user and programmer. Maybe it works. Maybe it's useful. Maybe it does magical things. But as far as I know, it's a mode you can enable, and then .... nothing happens.

Compare that to LSP... I install a package (lsp-client), add the relevant hook to prog-mode, and instantly every major-mode I interact with gets intelligent, contextually correct, auto-complete. I can do safe renames across projects, and lots of actual useful, observable magic happens. And I get the exact same language support as every other editor out there, and I'm not limited to who is willing to contribute to the Emacs-ecosystem.

This is why LSP has such great adoption "everywhere",  and became the universal standard almost overnight.

If CEDET can do this too... Then why not provide some documentatio or guides on how to set it up to be equally useful? If it can't, then one needs to clarify what CEDETs role is, in a world where everyone else has decided on LSP being the way forward, and provide documentation/guides which helps people exploit what CEDET has to offer. Otherwise what I suspect is already a niche mode will become, if possible, even more niche.

Back to tree-sitter...I'm not saying that the same thing as LSP is guaranteed to happen to tree-sitter, not by far. But it has some of the same great things giving it momentum: It's fast (instant?), editor-external, meaning it gets contributions from lots of developers outside the Emacs ecosystem, and as a result already has parser for pretty much all languages out there.

If I'm making a new major-mode these days, for the same reason, I'm going to be basing it on tree-sitter in one form or the other.

--------------kOs3qYPRt7sMdcPgSHhBtDNf--