emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 9f464cc: Stop using calc for ntlm time computation


From: Mattias Engdegård
Subject: Re: master 9f464cc: Stop using calc for ntlm time computation
Date: Mon, 26 Oct 2020 22:57:48 +0100

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 via email to

[Prev in Thread] Current Thread [Next in Thread]