Joel Reicher <joel.reicher@gmail.com> writes:

> Stefan Kangas <stefankangas@gmail.com> writes:
>
>> Christopher Dimech <dimech@gmx.com> writes:
>>
>>> Incorporating a mathematical library into Emacs, based on Calc, is not just
>>> feasible but highly beneficial.
>>
>> I think we all agree that a general purpose mathematical library would be
>> interesting.  The point is that the specifics of how it is implemented
>> matters.
>
> "Interesting" is different to "useful", and I think this is why the
> implementation is unclear, because the requirements of a library can only be
> made clear by a multiplicity of consumers.

Exactly the reason I suggested FFI in the very first place. "Mathematics" are a
broad term. Someone will want a linear algebra library, someone will want
symbolic manipulations, statistics, analysis, theorem provers and so on. There
are lots of mathematical libraries that could be useful to Emacs users in
different areas, since Emacs is used in some many different places by different
people.

> What packages, other than Calc, would make use of such a library? (That's not
> rhetorical; I don't pretend to have an overview of all such packages.)
>
>> If you think basing it on Calc is the best way forward, then I invite you to
>> get started.
>
> It needs to be based on potential consumers. If Calc is the only consumer, then
> a library does not make sense yet. But that's not to say an FFI wouldn't improve
> Calc's implementation. If that's the issue, then it's a discussion that differs
> from one about library.

As an alternative, it would be interesing to have everything in Lisp, no doubt
about that one. Imagine if Macsyma was available for Elisp. Maxima is the GPL
alternative, but it is all very uncommon CommonLisp, unfortunately.

Perhaps Calc could be brought to those levels, but I believe the amount of the
work and doubling on the implementation of something that already exists in form
of loadable C libraries, would not be trivial.

Från: Joel Reicher <joel.reicher@gmail.com>
Skickat: den 17 augusti 2024 16:30
Till: Stefan Kangas <stefankangas@gmail.com>
Kopia: Christopher Dimech <dimech@gmx.com>; Eli Zaretskii <eliz@gnu.org>; acorallo@gnu.org <acorallo@gnu.org>; suhailsingh247@gmail.com <suhailsingh247@gmail.com>; gerd.moellmann@gmail.com <gerd.moellmann@gmail.com>; nicolas@n16f.net <nicolas@n16f.net>; arthur.miller@live.com <arthur.miller@live.com>; emacs-devel@gnu.org <emacs-devel@gnu.org>
Ämne: Re: Emacs ffi
 
Stefan Kangas <stefankangas@gmail.com> writes:

> Christopher Dimech <dimech@gmx.com> writes:
>
>> Incorporating a mathematical library into Emacs, based on Calc,
>> is not just feasible but highly beneficial.
>
> I think we all agree that a general purpose mathematical library
> would be interesting.  The point is that the specifics of how it
> is implemented matters.

"Interesting" is different to "useful", and I think this is why
the implementation is unclear, because the requirements of a
library can only be made clear by a multiplicity of consumers.

What packages, other than Calc, would make use of such a library?
(That's not rhetorical; I don't pretend to have an overview of all
such packages.)

> If you think basing it on Calc is the best way forward, then I
> invite you to get started.

It needs to be based on potential consumers. If Calc is the only
consumer, then a library does not make sense yet.

But that's not to say an FFI wouldn't improve Calc's
implementation. If that's the issue, then it's a discussion that
differs from one about library.

Regards,

        - Joel