all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Mattias Engdegård" <mattiase@acm.org>
To: Thomas Fitzsimmons <fitzsim@fitzsim.org>
Cc: emacs-devel@gnu.org
Subject: Re: master 9f464cc: Stop using calc for ntlm time computation
Date: Mon, 26 Oct 2020 22:57:48 +0100	[thread overview]
Message-ID: <B48B3F96-255E-4ED2-9620-CBBF667173FC@acm.org> (raw)
In-Reply-To: <m37drcheh3.fsf@fitzsim.org>

26 okt. 2020 kl. 22.19 skrev Thomas Fitzsimmons <fitzsim@fitzsim.org>:

> ntlm.el goes into GNU ELPA so I'd like to keep it working on older
> versions of Emacs.  I usually try to keep it working at least back to
> Emacs 24.1, the first version to support packages via package.el.

Sorry, I had no idea!

> The new code definitely makes sense for Emacs versions that have bignum
> support.  However I'd like to know before I bump the ntlm.el version
> (and thus make these updates available to GNU ELPA users), are there
> configurations anyone knows of where the new code will fail, but the
> "calc" version would work?

Yes, the new code certainly won't work with Emacs versions older than 27.1 that use 31-bit fixnums, which should be most 32-bit platforms.

> I seem to remember I wrote the strange calc version to avoid integer
> overflow, but I don't remember the characteristics of the system on
> which I developed it; maybe it had a 32-bit word size.  Admittedly
> though, I recently tried the new calculation code on Emacs 24.1, running
> on an x86-64 system, and it works.

Yes, it will work on 64-bit systems; they have 63-bit fixnums which should be enough.

> Still, if these types of calculations are known to overflow on 32-bit
> Emacs builds then my inclination would be to conditionalize them.

The change was partly made in order to remove the dependency on Calc so rather than bringing it back, I'd prefer dealing with the problem locally in ntlm.el -- either with some domain-specific cleverness or just by implementing a few basic arithmetic primitives (poor man's bignum).

However, I don't have access to any 32-bit Emacs, so I would need help for testing it.




  reply	other threads:[~2020-10-26 21:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200816091703.7193.11125@vcs0.savannah.gnu.org>
     [not found] ` <20200816091705.318C0209AC@vcs0.savannah.gnu.org>
2020-10-26 21:19   ` master 9f464cc: Stop using calc for ntlm time computation Thomas Fitzsimmons
2020-10-26 21:57     ` Mattias Engdegård [this message]
2020-10-27 11:33       ` Mattias Engdegård
2020-10-27 13:06         ` Stefan Monnier
2020-10-27 13:45           ` Stefan Monnier
2020-10-27 14:01             ` Mattias Engdegård
2020-10-27 14:06               ` Mattias Engdegård
2020-10-27 15:23                 ` Stefan Monnier
2020-10-27 16:18                   ` Mattias Engdegård
2020-10-27 16:28                     ` Thomas Fitzsimmons
2020-10-27 13:53           ` Mattias Engdegård
2020-10-27 15:34             ` Thomas Fitzsimmons

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=B48B3F96-255E-4ED2-9620-CBBF667173FC@acm.org \
    --to=mattiase@acm.org \
    --cc=emacs-devel@gnu.org \
    --cc=fitzsim@fitzsim.org \
    /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.