From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Danny McClanahan Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] add compiled regexp primitive lisp object Date: Sun, 08 Dec 2024 15:24:44 +0000 Message-ID: References: <2LOLmIp1X8w4CGbqq3qDrzmKVA0KzYNL1N9lBtWdB-MtEv9oCuYgJMYprG170wMPjYxeQImAmWOPatGTTl4KxZMlptNo9A9hnHt84vdN9EA=@hypnicjerk.ai> <87ttfxtszi.fsf@protonmail.com> <86r0b1o5sr.fsf@gnu.org> <868qx8o83w.fsf@gnu.org> <875xscec62.fsf@gmail.com> <87o764sb6y.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34527"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Pip Cet To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Dec 08 17:34:48 2024 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 1tKKF3-0008lb-Py for ged-emacs-devel@m.gmane-mx.org; Sun, 08 Dec 2024 17:34:45 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tKKEH-0003ij-Eh; Sun, 08 Dec 2024 11:33:57 -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 1tKJ9U-0000tT-Cr for emacs-devel@gnu.org; Sun, 08 Dec 2024 10:24:57 -0500 Original-Received: from mail-4018.proton.ch ([185.70.40.18]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tKJ9R-00028F-Vc for emacs-devel@gnu.org; Sun, 08 Dec 2024 10:24:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hypnicjerk.ai; s=protonmail3; t=1733671491; x=1733930691; bh=yv4Mb0A1VqcUukcDrSsqUd1ZeCGaIBAeJHArNLCPqUA=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=ngBzBAHe350xypdxdmQPe49PhcrZgHAGp2cLobAFMYOcQDnZE5TQD6cajQwWTqAkd kgbjpORZLgfRVGMrTZvxHLs7hHkpMnA5luWSK3L3qD4N9DLoFhml5WUWYYao7Ag4zB ZAfhY1jTd74VFQCue/rSnETpTal658jx0xtwoyMmO/l09LZwP2H4Nir9L8gtw8Z027 j94RxsEfZ7qK6J9SO/hx0SWBH69I3r08KJ/9w0KqY1ZOHKelvYAyNE4JyKwyYNjHEj OXq+Id9WeQTEyVs9IwFIEjpr88hZfSnavaZDR9UkIAGYHgQ9DROO30aaLrHeC+E9+T DMWRbGsdk9eaA== In-Reply-To: Feedback-ID: 27837847:user:proton X-Pm-Message-ID: 985a997c226e3fe3ae15c6decc21014c2ed86573 Received-SPF: pass client-ip=185.70.40.18; envelope-from=dmcc2@hypnicjerk.ai; helo=mail-4018.proton.ch 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sun, 08 Dec 2024 11:33:53 -0500 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:326197 Archived-At: Hello! The talk video and slides are up at https://emacsconf.org/2024/talks= /regex/. - The slides have much more content than the video itself. - I have a 50 minute talk video which I will be editing and subtitling an= d posting in a bit. - I received feedback that the filtering I applied over my camera stream is= incredibly distracting so please feel free to cover up that part. Sorry! := ( One thing I note in a footnote is that the precompiled regexp doesn't work = for fontification yet, and I think it's because there's buffer-local state = not available when the regexp is compiled. NullNix on EmacsConf IRC had a *= fantastic* suggestion I hadn't considered at all: make the compile cache bu= ffer-local (or mode-local)! Especially since I advocate for the approach Pip Cet suggests (doing a new = regexp engine in lisp itself) instead of trying to extend the C engine with= new features, I think making the cache more specific is probably much more= likely to succeed for things like fontification than circumventing the cac= he approach entirely. This seems like a much more appropriate way to extend= the C engine for immediate goals, while we can do a lisp engine for the st= uff we can't do with regex-emacs! I will try posting a patch with that approach in the next few days (likely = without any of the changes from this patch). I think if fontification still= doesn't work with this (perhaps if the syntax table or case table is modif= ied), that would still be interesting and I'll delve into that more deeply. Thanks, Danny On Tuesday, November 26th, 2024 at 13:05, Danny McClanahan wrote: > > > Thanks so much for this thorough and thoughtful response! I am compiling = a 20-minute recorded talk for the upcoming EmacsConf regarding these discus= sions and investigations. I am also now waiting for a response from graduat= e school, during which I hope to then have more time to pin down several of= the threads raised by this discussion. > > This has all been immensely helpful and I really appreciate how responsiv= e emacs-devel has been in elaborating much of the packed-together assumptio= ns I was making.