From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Tree-sitter api Date: Fri, 17 Dec 2021 09:15:26 +0200 Message-ID: <831r2bg0s1.fsf@gnu.org> References: <83r1f7hydn.fsf@gnu.org> <83lf3zdh4z.fsf@gnu.org> <8965C4A0-79D3-4D77-A6BA-D07A6C93F7FE@gmail.com> <83ilz3cs4k.fsf@gnu.org> <04D19C1A-CD64-4156-B932-1C9FEEE4EC7B@gmail.com> <83zgsebc0r.fsf@gnu.org> <1F752923-F357-4A18-B6E2-0120F1B9BD37@gmail.com> <83fsu5bzem.fsf@gnu.org> <83zgsdad5j.fsf@gnu.org> <83sfy391ni.fsf@gnu.org> <03386E3C-A975-4ECD-BF89-6AC62F751725@gmail.com> <83ilyz8xdl.fsf@gnu.org> <86czp6ukpj.fsf@stephe-leake.org> <1AEED8A5-BF5E-45E5-AE22-9B405A710F9B@gmail.com> <83czp313tf.fsf@gnu.org> <7447C582-70CB-4599-BC76-AD5687D64250@gmail.com> <784947A6-6164-4158-993B-01E881690ADF@gmail.com> <83zgrxji7q.fsf@gnu.org> <8E8D28F9-258E-490B-BF48-7EF8D6CA0817@gmail.com> <838rzgk6ll.fsf@gnu.org> <83k0g8mznc.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12780"; mail-complaints-to="usenet@ciao.gmane.io" Cc: ubolonton@gmail.com, theo@thornhill.no, cpitclaudel@gmail.com, emacs-devel@gnu.org, monnier@iro.umontreal.ca, stephen_leake@stephe-leake.org, john@yates-sheets.org To: Yuan Fu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Dec 17 08:22:04 2021 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 1my7Z4-0002yc-Ps for ged-emacs-devel@m.gmane-mx.org; Fri, 17 Dec 2021 08:22:03 +0100 Original-Received: from localhost ([::1]:44928 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1my7Z2-0001oL-S8 for ged-emacs-devel@m.gmane-mx.org; Fri, 17 Dec 2021 02:22:00 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:41768) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1my7T8-0000EW-SZ for emacs-devel@gnu.org; Fri, 17 Dec 2021 02:15:55 -0500 Original-Received: from [2001:470:142:3::e] (port=37246 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1my7Sz-0007fC-ES; Fri, 17 Dec 2021 02:15:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=0A5jXJPGGuUB5zZ4+8ph8Bo3nejfP6hDEOKzjepN9zY=; b=S/tmYxzJKMeGcEaXMmCc dtLusYF1T2IgK4eKs1zHftU/vuBSAwqFr6aG/qChqq1H5YH4NRrSKigdVM4uJ+3Krm57vUq0Gk8wj 9i1BrBP6xkWwnlfXvJk7H4UiPx3nxoKUFjNcCoSP0jH+Xmosh7Zd2Ok810xZEak+woWeLcoSpvLIt REt/VL2JAwqYINXOkoJMqjYM84liNTbqE0qOfyQDsl2ljdu8Vbfx8XtYfWMgMbdy05yIfn0CTqc5g GXA9Pj5Sxs5UrApuHoZf5SwfMVQinPuXSQD8MdmW9HKQgET/luHTykXtVdtnmKVsexjKB6d2Z20tP TeUPF1AWLPTBPA==; Original-Received: from [87.69.77.57] (port=4885 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1my7Sw-0008U0-5G; Fri, 17 Dec 2021 02:15:45 -0500 In-Reply-To: (message from Yuan Fu on Thu, 16 Dec 2021 16:14:52 -0800) 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:282186 Archived-At: > From: Yuan Fu > Date: Thu, 16 Dec 2021 16:14:52 -0800 > Cc: Stefan Monnier , > Tuấn-Anh Nguyễn , > Theodor Thornhill , > Clément Pit-Claudel , > Emacs developers , > Stephen Leake , > john@yates-sheets.org > > Someone commented on my request saying > > > Had this issue as well, but thought was too niche to open an issue. The standard way to change the allocator at runtime is with the LD_PRELOAD envvar (see mimalloc or any allocator doc). > > IIUC it is more of a user-feature right? Like you will use LD_PRELOAD=xxx program but not change the environment programmatically in the program? Could Emacs do this should tree-sitter doesn’t want to change? I don't think we want to use LD_PRELOAD for this, for several good reasons. It's non-portable, for starters. > The author suggested to implement runtime change of malloc on top of current macros, but I think he missed the point (we don’t want to maintain our own version of tree-sitter). Yes. I hope we get a better response from the developers of Tree-sitter.