all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Adam Porter <adam@alphapapa.net>
To: eliz@gnu.org
Cc: emacs-devel@gnu.org, tomas@tuxteam.de
Subject: Re: ELPA submission: plz-see
Date: Sat, 4 Nov 2023 09:38:06 -0500	[thread overview]
Message-ID: <bb4d4bd3-0e8a-4569-9d4f-0efba6737ef0@alphapapa.net> (raw)
In-Reply-To: <83o7g94o6r.fsf@gnu.org>

Hello Eli,
>> Date: Sat, 4 Nov 2023 08:30:47 -0500
>> Cc: emacs-devel@gnu.org, tomas@tuxteam.de
>> From: Adam Porter <adam@alphapapa.net>
>> 
>> > The claim is that fetching a URL with our built-in primitives is
>> > too slow.
>> 
>> Forgive me, but that is not the claim.  There are numerous problems 
>> experienced with using url.el "in anger," as well as with other HTTP 
>> client libraries for Emacs.  Stefan K. was kind enough to link one of my 
>> posts about this issue a few years ago, when plz.el was earlier in its 
>> development (the issues mentioned having been solved now)[0].  Briefly, 
>> the problems include unreliability (e.g. callbacks being called multiple 
>> times or not at all, timeouts that don't happen), very awkward API (e.g. 
>> having to let-bind often-undocumented variables to do basic HTTP 
>> operations)
> 
> These all sound like bugs, and I'd be surprised if bugs were cited as
> a reason to go to a completely different implementation, and one that
> is based on an external program on top of that.  Bugs should be fixed;
> they should not cause us to throw away our code just because it has
> bugs.  Especially since those bugs cannot be so bad, as our
> implementation of network communications does work: I'm sending this
> mail using it, for example.

Ideally, of course, I would agree with you.  In practice, experience has 
shown that fixing these bugs is not so simple.  As even Lars said years 
ago[0]:

     "And the more I looked at this, the more apparently it became 
[clear] that Emacs' network stuff should just be totally reimplemented, 
because it's so full of...  oddnesses geared toward processes.  And 
processes and network connections are very different things.

     "So it's a Big Project.  :-/"

The file process.c is known for being hard to debug, especially with 
regard to these kinds of problems.  I feel fortunate that I was able to, 
with the help of a few other people, work around them in plz.el to 
resolve issues with reliability.

>> and, perhaps also, inferior performance compared to a 
>> curl-based implementation (curl being implemented in a separate process, 
>> in C).
> 
> So is performance an issue or isn't it?

As others have noted here and on the bug tracker, Emacs's built-in 
network processes seem to have hangs with regard to DNS, TLS, etc, and 
having the external curl process handle those issues avoids those 
problems.  Some of this discussion happened three years ago, where even 
Richard suggested that using an external process like curl to solve it 
seemed reasonable.[1]

>> I confess to feeling a bit annoyed at having to re-justify the inclusion 
>> of plz.el in GNU ELPA (or, at least, I feel like I'm having to do so). 
> 
> This is a misunderstanding.  I never said anything about inclusion of
> the package in ELPA or the need to justify it.  I responded to the
> suggestion to integrate curl with the Emacs core:

>>> > > As has been said on emacs-devel several times over the years, the next 
>>> > > significant step in this field would most likely be for Emacs to 
>>> > > integrate libcurl directly.  Maybe someday that will happen...
> 
> Please don't misrepresent what I said and why, because the above
> sounds like you are saying I questioned your reasons for developing
> the package or asked you to explain why it was needed.  I did not.

Forgive me, then, for misunderstanding you.  It's never my intention to 
misrepresent.

>> Having said all that, of course it would be best if Emacs's built-in 
>> library were the best one.  But as the author of url.el himself has 
>> admitted, it has some fundamental issues which are not easy to solve, 
>> and his own branch related to improving it hasn't been touched in 6 
>> years[3].  And so far, no one has stepped up to integrate libcurl or 
>> similar.
> 
> If url.el has fundamental problems, they can be fixed by thorough
> modifications or even with a completely new line of APIs which don't
> have those problems.  That is not the issue that bothers me here; the
> issue that bothers me is the idea that instead of improving our own
> implementation, we should use an external program.  It should be clear
> to anyone who understands how this stuff is integrated into the core
> that basing this on external programs has serious issues of its own,
> because Emacs is not a garden-variety program, it needs to support
> many low-level hooks into the communications level which are hard or
> even impossible with external programs and libraries.  I very much
> doubt that going this way will ever be able to support everything we
> support now with network "processes" and applications based on them.

Of course, I don't disagree with you.  The fallback to an external 
program is a pragmatic decision, one which plz.el is in a long line of 
similar packages to make.

> It is indeed unfortunate that we don't have anyone working on these
> issues.  I still hope that someone will step forward soon enough.
> 
>> But the name is of very little importance, and surely no more
>> difficult to remember than an API, of which there are innumerable
>> ones in Emacs.
> 
> My original request to find a better name was for plz-see, not for
> plz.  So once again, please don't misrepresent what I said and why.

Indeed, I misunderstood.  Thanks for patiently clarifying what you meant.

--Adam

0: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=22921#19
1: https://lists.gnu.org/r/emacs-devel/2020-12/msg01456.html



  reply	other threads:[~2023-11-04 14:38 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-30  7:17 ELPA submission: plz-see Augusto Stoffel
2023-10-30 11:56 ` Eli Zaretskii
2023-10-31  8:09   ` Augusto Stoffel
2023-10-31  8:43   ` Philip Kaludercic
2023-10-31 20:17     ` Augusto Stoffel
2023-11-01  9:14       ` Philip Kaludercic
2023-11-01 18:36         ` Augusto Stoffel
2023-11-01 20:21           ` brickviking
2023-11-03  2:31             ` Richard Stallman
2023-11-03  6:32               ` brickviking
2023-11-03  7:50                 ` Philip Kaludercic
2023-11-03  8:06                   ` Eli Zaretskii
2023-11-03 14:46                     ` Adam Porter
2023-11-04  1:10                       ` Stefan Kangas
2023-11-04  2:10                     ` Richard Stallman
2023-11-04  5:08                       ` Adam Porter
2023-11-04  6:49                         ` Eli Zaretskii
2023-11-04  8:51                           ` tomas
2023-11-04  9:07                             ` Eli Zaretskii
2023-11-04  9:34                               ` tomas
2023-11-04 13:30                               ` Adam Porter
2023-11-04 13:56                                 ` Eli Zaretskii
2023-11-04 14:38                                   ` Adam Porter [this message]
     [not found]                               ` <877cmx4wgd.fsf@dick>
2023-11-04 13:37                                 ` tomas
     [not found]                                   ` <8734xlmwsm.fsf@dick>
2023-11-04 14:24                                     ` tomas
2023-11-04 10:38                             ` Stefan Kangas
2023-11-04 12:28                               ` Visuwesh
2023-11-04 13:17                                 ` tomas
2023-11-04 13:13                               ` tomas
2023-11-04  6:47                       ` Eli Zaretskii
2023-10-30 22:33 ` Stefan Kangas
2023-10-31  8:09   ` Augusto Stoffel
2023-11-01  0:37     ` Stefan Kangas
2023-11-01  7:29       ` Augusto Stoffel
2023-11-01 20:23         ` Stefan Kangas
2023-10-31  9:33 ` Mauro Aranda
2023-10-31 20:19   ` Augusto Stoffel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bb4d4bd3-0e8a-4569-9d4f-0efba6737ef0@alphapapa.net \
    --to=adam@alphapapa.net \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=tomas@tuxteam.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.