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?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#41531: 27.0.91; Better handle asynchronous eldoc backends Date: Sat, 04 Jul 2020 12:48:53 +0100 Message-ID: <87tuynsdp6.fsf@gmail.com> References: <875zckuet9.fsf@gmail.com> <87sgecssch.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="28720"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 41531@debbugs.gnu.org, Stefan Monnier , andreyk.mad@gmail.com To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jul 04 13:51:54 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1jrgi2-0007MD-5k for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 04 Jul 2020 13:51:54 +0200 Original-Received: from localhost ([::1]:51568 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jrgi0-0003O0-Rc for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 04 Jul 2020 07:51:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55598) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrggE-0002qZ-LD for bug-gnu-emacs@gnu.org; Sat, 04 Jul 2020 07:50:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46614) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jrggE-0008F2-Ci for bug-gnu-emacs@gnu.org; Sat, 04 Jul 2020 07:50:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jrggE-0000f4-A9 for bug-gnu-emacs@gnu.org; Sat, 04 Jul 2020 07:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Jul 2020 11:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41531 X-GNU-PR-Package: emacs Original-Received: via spool by 41531-submit@debbugs.gnu.org id=B41531.15938633452476 (code B ref 41531); Sat, 04 Jul 2020 11:50:02 +0000 Original-Received: (at 41531) by debbugs.gnu.org; 4 Jul 2020 11:49:05 +0000 Original-Received: from localhost ([127.0.0.1]:58160 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrgfJ-0000dr-A6 for submit@debbugs.gnu.org; Sat, 04 Jul 2020 07:49:05 -0400 Original-Received: from mail-wm1-f45.google.com ([209.85.128.45]:40190) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrgfH-0000dM-AY for 41531@debbugs.gnu.org; Sat, 04 Jul 2020 07:49:04 -0400 Original-Received: by mail-wm1-f45.google.com with SMTP id f139so36675333wmf.5 for <41531@debbugs.gnu.org>; Sat, 04 Jul 2020 04:49:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=HY+Ka0K/9oo7jlQ0lX0xDowSmPxgNq9vAHBAOUDhzas=; b=fYdty+nmE1OSSjAsxDwpIpGDAoDnTLzmB4uUTaM3c4D1WLWSonqKFUt55Nl5q7/EpE G7dfkw/In4dONm5DQsaLnh/0iBJMIiKat9574EBm6JvMdGFo5MC3ZGN0bYekLKVeHy1G cbBtUIWHI5gbsrLK4dOTpaUCxjEZNlG0QhqQiGK661Qvmf9SrsdoGV6RuxlqLFmM87No T4tw4RSsMBZ9+KATCdnKlWdoYqouflLMNUMCFn1ikv9Dq9oG50TyvEeqPqxhswnon1v3 QeqIWEk5pbUgW+rb8K4PFAFyjAw+2grSqxHIglwVofOldb9djZ8AqaDPUQ1hdyLvPfpZ 8xag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=HY+Ka0K/9oo7jlQ0lX0xDowSmPxgNq9vAHBAOUDhzas=; b=i7ngNDd23elQ8/qQEWNVisYYh4M1g8zgd7oWCSsn7DteoY++bD4bXfrFgH4x3F+cqz te8pqmInJzSd/0f7jCBLxcsW1sX8MgzR9QxkK/5NoNoU4a9/xXXKMe7WvcSYEsjN53wm fKScIRi/olVWK/l3kDmOmtW+x0dfTOo7qx2smhK/Y4c6vMqzIFjqis7vZojcDgHxoJps 1kfzr9bG5xdo7SjqVWnHXWxbR8xHKv7vF4r5rb9Pkkv1aXn/SJV6tac/FXUvvUXxN44i Tf811XSjlqmdp/rxJEJHLBgqhFpqLZH+E04bfZiRAO4uqOZHZv3tbAEwDOiYmZpIe5pP 5BjA== X-Gm-Message-State: AOAM533nVQghQrxirObRN8BuUXYqzrL9SA+Oa8YVQrQtcTojHlJMQwxd pQJ0Go+83Q7DNX16Y2qBIso= X-Google-Smtp-Source: ABdhPJybLYR3yvLkV12Qg5Va0/ph15fdfmOmfxTd1eJKHjSJLj3r9AfshzOQ54e1Jjt9eOa0LxJgAA== X-Received: by 2002:a1c:1fd1:: with SMTP id f200mr39651955wmf.162.1593863337254; Sat, 04 Jul 2020 04:48:57 -0700 (PDT) Original-Received: from krug ([2001:818:d820:9500:824a:171:15a:2213]) by smtp.gmail.com with ESMTPSA id z16sm16709966wrr.35.2020.07.04.04.48.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2020 04:48:54 -0700 (PDT) In-Reply-To: (Dmitry Gutov's message of "Sat, 4 Jul 2020 13:04:35 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:182690 Archived-At: Dmitry Gutov writes: > On 30.06.2020 14:31, Jo=C3=A3o T=C3=A1vora wrote: >> Dmitry has expressed his intent to make the new eldoc.el work with a new >> futures/promises library. He prototyped one of those libraries. I have >> nothing against that in the future. However, >> 1. I don't have the resources to make the eldoc.el prototype work >> with >> Dmitry's or other libraries; >> 2. We should revisit the purpose and the details of that and other >> libraries in a separate discussion. For now it's high time we >> advance the Eldoc libray;. > > Unsurprisingly, I object to this approach. We should have better async > support in multiple Emacs facilities, and that means standardizing on=20 > some particular async primitives and functions that can manipulate > them. There is no need to release support for ad-hoc async values (you > didn't like mine, so it's only fair play that I object to yours) when > we can transition to full futures right away. I haven't seen a consistent plan "for transitioning to futures". All I've seen is (complicated, IMO) ideas on how to avoid the callback-calling style by hiding the callback in an object. I've seen little argument or discussion of what futures are supposed to do or fix or improve. And I've seen no feedback from the author of what seems to be the most promising futures library, aio.el which uses the generator.el library, to provide, presumably, more elegant "language-level" futures (i.e. futures that aren't only hiding the callback in some other object). Despite that, I've stated here repeatedly, tiringly: In principle, I don't object to futures at all. I just think it has to be a thought-through change. Propose your library to emacs-devel and let's iterate it there. > I'll get into a little more detail in the more full review, tonight or > tomorrow, but for now my impression is that, in the absence of such=20 > standard library and async manipulation functions, you decided to > implement them specially in Eldoc. Of course, and that's what engineering is about. For the most trivial of changes X there is _always_ a refactoring R that will make implementing X and a possible Y and Z much simpler, more elegant, more "meta". Knowing where to stop is what this game is about. In this case, there is only a vision what Y and Z might be, and a foggier vision of how bad/good design decisions in R might affect them. So I fixed the real, actual problem in Eldoc using the async paradigm that is widely used in Emacs and most widely understood by programmers of all (most?) trades: callbacks. And, again, for the nth time, there is nothing in my code that prevents your -- or someone else's -- "futures" library to be the nec plus ultra of async in Emacs. But, in the meantime, I won't let you make these Eldoc changes hostage to your predilection for futures. It's quite a legitimate inclination, of course, it musn't be needlessly put it in the way of other's work. Jo=C3=A3o