unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* How to distribute dynamic modules by themselves?
@ 2022-03-20 23:51 Yuan Fu
  2022-03-21  1:31 ` Zhu Zihao
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Yuan Fu @ 2022-03-20 23:51 UTC (permalink / raw)
  To: Emacs developers

I wrote a dynamic module that exposes a simple interface for Xapian, the indexing and searching engine. It could be very useful for indexing thousands of files and search in them. I use this module for my note-searching package.

Normally people distribute their elisp package with supporting dynamic modules together, but in my case I want to distribute the dynamic module by itself, because indexing and searching is much more general than note-searching.

Is there any way to put a dynamic module on ELPA so that other packages could use it conveniently?

Yuan


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: How to distribute dynamic modules by themselves?
  2022-03-20 23:51 How to distribute dynamic modules by themselves? Yuan Fu
@ 2022-03-21  1:31 ` Zhu Zihao
  2022-03-22  5:07 ` Richard Stallman
  2022-03-23 11:20 ` Lars Ingebrigtsen
  2 siblings, 0 replies; 16+ messages in thread
From: Zhu Zihao @ 2022-03-21  1:31 UTC (permalink / raw)
  To: Yuan Fu; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 837 bytes --]


IMO, You'd better to distribute the source code and let users compile it
by theirselves.

Yuan Fu <casouri@gmail.com> writes:

> I wrote a dynamic module that exposes a simple interface for Xapian, the
> indexing and searching engine. It could be very useful for indexing thousands of
> files and search in them. I use this module for my note-searching package.
>
> Normally people distribute their elisp package with supporting dynamic modules
> together, but in my case I want to distribute the dynamic module by itself,
> because indexing and searching is much more general than note-searching.
>
> Is there any way to put a dynamic module on ELPA so that other packages could use it conveniently?
>
> Yuan


-- 
Retrieve my PGP public key:

  gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 255 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: How to distribute dynamic modules by themselves?
  2022-03-20 23:51 How to distribute dynamic modules by themselves? Yuan Fu
  2022-03-21  1:31 ` Zhu Zihao
@ 2022-03-22  5:07 ` Richard Stallman
  2022-03-22  8:44   ` Zhu Zihao
  2022-03-23 11:20 ` Lars Ingebrigtsen
  2 siblings, 1 reply; 16+ messages in thread
From: Richard Stallman @ 2022-03-22  5:07 UTC (permalink / raw)
  To: Yuan Fu; +Cc: emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > I wrote a dynamic module that exposes a simple interface for
  > Xapian, the indexing and searching engine. It could be very useful
  > for indexing thousands of files and search in them. I use this
  > module for my note-searching package.

This could be a useful thing, but before we decide to install it, we
need to check some crucial nontechnical issues.

* The moral issues.
Does Xapian include any nonfree software?
Does it depend on the presence of any nonfree software?

Does Xapian use some web service?

* The legal issues.
Assuming Xapian does everything with free software,
is all that software under GPL-compatible licenses?
If not, we need to look at how the non-GPL-compatible
software connects with the GPL-covered body of
Emacs and its add-ons.  Depending on that, it might be ok.

See https://gnu.org/licenses/license-list.html to check
whether a license is free, and whether it is GPL-compatible.

-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: How to distribute dynamic modules by themselves?
  2022-03-22  5:07 ` Richard Stallman
@ 2022-03-22  8:44   ` Zhu Zihao
  2022-03-23  3:55     ` Richard Stallman
  0 siblings, 1 reply; 16+ messages in thread
From: Zhu Zihao @ 2022-03-22  8:44 UTC (permalink / raw)
  To: rms; +Cc: Yuan Fu, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1544 bytes --]


Yes, Xapian is definitely licensed under GPLv2 or later.

And many distributions following FSDG distribute Xapian. IMO, it's OK to
write a module to empower Emacs with Xapian.

Richard Stallman <rms@gnu.org> writes:

> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
>   > I wrote a dynamic module that exposes a simple interface for
>   > Xapian, the indexing and searching engine. It could be very useful
>   > for indexing thousands of files and search in them. I use this
>   > module for my note-searching package.
>
> This could be a useful thing, but before we decide to install it, we
> need to check some crucial nontechnical issues.
>
> * The moral issues.
> Does Xapian include any nonfree software?
> Does it depend on the presence of any nonfree software?
>
> Does Xapian use some web service?
>
> * The legal issues.
> Assuming Xapian does everything with free software,
> is all that software under GPL-compatible licenses?
> If not, we need to look at how the non-GPL-compatible
> software connects with the GPL-covered body of
> Emacs and its add-ons.  Depending on that, it might be ok.
>
> See https://gnu.org/licenses/license-list.html to check
> whether a license is free, and whether it is GPL-compatible.


-- 
Retrieve my PGP public key:

  gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 255 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: How to distribute dynamic modules by themselves?
  2022-03-22  8:44   ` Zhu Zihao
@ 2022-03-23  3:55     ` Richard Stallman
  2022-03-23 19:44       ` Yuan Fu
  0 siblings, 1 reply; 16+ messages in thread
From: Richard Stallman @ 2022-03-23  3:55 UTC (permalink / raw)
  To: Zhu Zihao; +Cc: casouri, emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > Yes, Xapian is definitely licensed under GPLv2 or later.

That eliminates most of the possible problems.  Only one
question remains?

Does Xapian use a web service, or does it do its job locally?

-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: How to distribute dynamic modules by themselves?
  2022-03-20 23:51 How to distribute dynamic modules by themselves? Yuan Fu
  2022-03-21  1:31 ` Zhu Zihao
  2022-03-22  5:07 ` Richard Stallman
@ 2022-03-23 11:20 ` Lars Ingebrigtsen
  2022-03-23 19:48   ` Yuan Fu
                     ` (2 more replies)
  2 siblings, 3 replies; 16+ messages in thread
From: Lars Ingebrigtsen @ 2022-03-23 11:20 UTC (permalink / raw)
  To: Yuan Fu; +Cc: Stefan Monnier, Emacs developers

Yuan Fu <casouri@gmail.com> writes:

> Is there any way to put a dynamic module on ELPA so that other
> packages could use it conveniently?

I'm not quite sure what the state of dynamic modules on ELPA is.
Stefan?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: How to distribute dynamic modules by themselves?
  2022-03-23  3:55     ` Richard Stallman
@ 2022-03-23 19:44       ` Yuan Fu
  2022-03-25  3:29         ` Richard Stallman
  0 siblings, 1 reply; 16+ messages in thread
From: Yuan Fu @ 2022-03-23 19:44 UTC (permalink / raw)
  To: Richard Stallman; +Cc: Zhu Zihao, emacs-devel



> On Mar 22, 2022, at 8:55 PM, Richard Stallman <rms@gnu.org> wrote:
> 
> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
> 
>> Yes, Xapian is definitely licensed under GPLv2 or later.
> 
> That eliminates most of the possible problems.  Only one
> question remains?
> 
> Does Xapian use a web service, or does it do its job locally?

It’s a linked library, and has no web service.

Yuan


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: How to distribute dynamic modules by themselves?
  2022-03-23 11:20 ` Lars Ingebrigtsen
@ 2022-03-23 19:48   ` Yuan Fu
  2022-03-25  3:29     ` Richard Stallman
  2022-03-23 22:16   ` Stefan Monnier
  2022-03-24  3:19   ` Richard Stallman
  2 siblings, 1 reply; 16+ messages in thread
From: Yuan Fu @ 2022-03-23 19:48 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: Stefan Monnier, Emacs developers



> On Mar 23, 2022, at 4:20 AM, Lars Ingebrigtsen <larsi@gnus.org> wrote:
> 
> Yuan Fu <casouri@gmail.com> writes:
> 
>> Is there any way to put a dynamic module on ELPA so that other
>> packages could use it conveniently?
> 
> I'm not quite sure what the state of dynamic modules on ELPA is.
> Stefan?

Just a thought, can I put pre-built modules on ELPA so others can download the module and require it by writing some boilerplate code? Just like what I would distribute the module through GitHub release.

Yuan


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: How to distribute dynamic modules by themselves?
  2022-03-23 11:20 ` Lars Ingebrigtsen
  2022-03-23 19:48   ` Yuan Fu
@ 2022-03-23 22:16   ` Stefan Monnier
  2022-03-23 22:30     ` Ergus
  2022-03-24  3:19   ` Richard Stallman
  2 siblings, 1 reply; 16+ messages in thread
From: Stefan Monnier @ 2022-03-23 22:16 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: Yuan Fu, Emacs developers

Lars Ingebrigtsen [2022-03-23 12:20:17] wrote:
> Yuan Fu <casouri@gmail.com> writes:
>> Is there any way to put a dynamic module on ELPA so that other
>> packages could use it conveniently?
> I'm not quite sure what the state of dynamic modules on ELPA is.
> Stefan?

Currently, there's only one such module,m i.e. `pq`.
It's not well integrated yet.
The way it's supposed to work (after Someone™ codes it up) is that
during `package-install` a chunk of ELisp in the attempts to compile
the module.

Then the same chunk of ELisp should (re)compile the module as/when
needed when the ELisp package is loaded.  Ideally, this is done from
a function, so it's not done when the package is barely loaded but when
that function is actually called (which is a more convincing evidence
that the module is needed).

Regarding distributing pre-compiled modules, there's currently no
infrastructure for that.  We could consider it, but it can only be
a partial solution (we can't easily make sure we cover all possible
architecures, ...), so the focus for now is in getting the
automated/lazy-compilation working.


        Stefan




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: How to distribute dynamic modules by themselves?
  2022-03-23 22:16   ` Stefan Monnier
@ 2022-03-23 22:30     ` Ergus
  0 siblings, 0 replies; 16+ messages in thread
From: Ergus @ 2022-03-23 22:30 UTC (permalink / raw)
  To: emacs-devel, Stefan Monnier, Lars Ingebrigtsen; +Cc: Yuan Fu, Emacs developers

[-- Attachment #1: Type: text/plain, Size: 1474 bytes --]

In melpa there are some others. The most interesting one IMO is the vterm one. That does the compilation on demand. 




On March 23, 2022 11:16:43 PM GMT+01:00, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>Lars Ingebrigtsen [2022-03-23 12:20:17] wrote:
>> Yuan Fu <casouri@gmail.com> writes:
>>> Is there any way to put a dynamic module on ELPA so that other
>>> packages could use it conveniently?
>> I'm not quite sure what the state of dynamic modules on ELPA is.
>> Stefan?
>
>Currently, there's only one such module,m i.e. `pq`.
>It's not well integrated yet.
>The way it's supposed to work (after Someone™ codes it up) is that
>during `package-install` a chunk of ELisp in the attempts to compile
>the module.
>
>Then the same chunk of ELisp should (re)compile the module as/when
>needed when the ELisp package is loaded.  Ideally, this is done from
>a function, so it's not done when the package is barely loaded but when
>that function is actually called (which is a more convincing evidence
>that the module is needed).
>
>Regarding distributing pre-compiled modules, there's currently no
>infrastructure for that.  We could consider it, but it can only be
>a partial solution (we can't easily make sure we cover all possible
>architecures, ...), so the focus for now is in getting the
>automated/lazy-compilation working.
>
>
>        Stefan
>
>

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

[-- Attachment #2: Type: text/html, Size: 2101 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: How to distribute dynamic modules by themselves?
  2022-03-23 11:20 ` Lars Ingebrigtsen
  2022-03-23 19:48   ` Yuan Fu
  2022-03-23 22:16   ` Stefan Monnier
@ 2022-03-24  3:19   ` Richard Stallman
  2 siblings, 0 replies; 16+ messages in thread
From: Richard Stallman @ 2022-03-24  3:19 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: casouri, monnier, emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > I'm not quite sure what the state of dynamic modules on ELPA is.
  > Stefan?

One issue is, what do you need to do to make it possble to run that
dynamic module.  There may be security issues, too.  Do we know
an expert to consult about that?
-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: How to distribute dynamic modules by themselves?
  2022-03-23 19:44       ` Yuan Fu
@ 2022-03-25  3:29         ` Richard Stallman
  0 siblings, 0 replies; 16+ messages in thread
From: Richard Stallman @ 2022-03-25  3:29 UTC (permalink / raw)
  To: Yuan Fu; +Cc: all_but_last, emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > > Does Xapian use a web service, or does it do its job locally?

  > It’s a linked library, and has no web service.

That's good news.  I think there is no problem with using it.


-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: How to distribute dynamic modules by themselves?
  2022-03-23 19:48   ` Yuan Fu
@ 2022-03-25  3:29     ` Richard Stallman
  2022-03-25  5:53       ` Yuan Fu
  0 siblings, 1 reply; 16+ messages in thread
From: Richard Stallman @ 2022-03-25  3:29 UTC (permalink / raw)
  To: Yuan Fu; +Cc: larsi, monnier, emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > Just a thought, can I put pre-built modules on ELPA

Do you mean, the dynamic module itself?  Which machines would you
build it for?  Which systems?  I worry that you'd be undertaking
a task that could expand without bounds.

                                                        so others can
  > download the module and require it by writing some boilerplate
  > code? Just like what I would distribute the module through GitHub
  > release.

Github is a bad choice, for moral reasons -- see
https://www.gnu.org/software/repo-criteria-evaluation.html for
explanation of why.  How about choosing a better repo?

-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: How to distribute dynamic modules by themselves?
  2022-03-25  3:29     ` Richard Stallman
@ 2022-03-25  5:53       ` Yuan Fu
  2022-03-27  5:27         ` Richard Stallman
  2022-03-27  5:27         ` Richard Stallman
  0 siblings, 2 replies; 16+ messages in thread
From: Yuan Fu @ 2022-03-25  5:53 UTC (permalink / raw)
  To: Richard Stallman; +Cc: Lars Ingebrigtsen, Stefan Monnier, emacs-devel



> On Mar 24, 2022, at 8:29 PM, Richard Stallman <rms@gnu.org> wrote:
> 
> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
> 
>> Just a thought, can I put pre-built modules on ELPA
> 
> Do you mean, the dynamic module itself?  Which machines would you
> build it for?  Which systems?  I worry that you'd be undertaking
> a task that could expand without bounds.

Only machines that I have access for, in the spirit of “provided as is”. I’m certainly not capable of providing binary modules for all systems Emacs runs on.

> 
>                                                        so others can
>> download the module and require it by writing some boilerplate
>> code? Just like what I would distribute the module through GitHub
>> release.
> 
> Github is a bad choice, for moral reasons -- see
> https://www.gnu.org/software/repo-criteria-evaluation.html for
> explanation of why.  How about choosing a better repo?

I’m aware of GitHub’s issues, but…

Yuan


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: How to distribute dynamic modules by themselves?
  2022-03-25  5:53       ` Yuan Fu
@ 2022-03-27  5:27         ` Richard Stallman
  2022-03-27  5:27         ` Richard Stallman
  1 sibling, 0 replies; 16+ messages in thread
From: Richard Stallman @ 2022-03-27  5:27 UTC (permalink / raw)
  To: Yuan Fu; +Cc: larsi, monnier, emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > Only machines that I have access for, in the spirit of “provided
  > as is”. I’m certainly not capable of providing binary modules for
  > all systems Emacs runs on.

This is a moral issue, not just a practical issue.  The purpose of GNU
is _not_ simply to "make life more convenient for some users" and
never mind which ones.  It is to advance the cause of freedom for 
users of computing.  We must keep this in mind, to ensure we
don't score a careless own-goal.

Thus, if we decide to distribute prebuilt binaries of some module, we
should make sure to support the main free GNU/Linux distros first.
After that, we could support the main nonfree GNU/Linux distros.

After that, we could support nonGNU systems, if people volunteer
support for them.

Overall, I think this is a lot more trouble than it is worth.

-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: How to distribute dynamic modules by themselves?
  2022-03-25  5:53       ` Yuan Fu
  2022-03-27  5:27         ` Richard Stallman
@ 2022-03-27  5:27         ` Richard Stallman
  1 sibling, 0 replies; 16+ messages in thread
From: Richard Stallman @ 2022-03-27  5:27 UTC (permalink / raw)
  To: Yuan Fu; +Cc: larsi, monnier, emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > > Github is a bad choice, for moral reasons -- see
  > > https://www.gnu.org/software/repo-criteria-evaluation.html for
  > > explanation of why.  How about choosing a better repo?

  > I’m aware of GitHub’s issues, but…

But what?  If you spell out what you're concerned about we
may find a workaround.

You can reply off the list.

-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2022-03-27  5:27 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-20 23:51 How to distribute dynamic modules by themselves? Yuan Fu
2022-03-21  1:31 ` Zhu Zihao
2022-03-22  5:07 ` Richard Stallman
2022-03-22  8:44   ` Zhu Zihao
2022-03-23  3:55     ` Richard Stallman
2022-03-23 19:44       ` Yuan Fu
2022-03-25  3:29         ` Richard Stallman
2022-03-23 11:20 ` Lars Ingebrigtsen
2022-03-23 19:48   ` Yuan Fu
2022-03-25  3:29     ` Richard Stallman
2022-03-25  5:53       ` Yuan Fu
2022-03-27  5:27         ` Richard Stallman
2022-03-27  5:27         ` Richard Stallman
2022-03-23 22:16   ` Stefan Monnier
2022-03-23 22:30     ` Ergus
2022-03-24  3:19   ` Richard Stallman

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).