unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Arsen Arsenović" <arsen@aarsen.me>
To: help-gnu-emacs@gnu.org
Subject: Re: How many packages do you use?
Date: Sun, 25 Feb 2024 14:57:56 +0100	[thread overview]
Message-ID: <861q90pq8n.fsf@aarsen.me> (raw)
In-Reply-To: <87ttlz27ta.fsf@dataswamp.org> (Emanuel Berg's message of "Fri, 23 Feb 2024 04:11:45 +0100")

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

Hi,

Emanuel Berg <incal@dataswamp.org> writes:

> Arsen Arsenović wrote:
>
>>>   $ grep -h -o '(require .*)' **/*.el | sort -u | wc -l
>>>
>>> I use 159!
>>
>>   ~$ qlist -I app-emacs/ | wc -l
>>   63
>>
>> ... and a few more through USE=emacs.
>
> ?
>
> What commands and directory are those?

'qlist' is a Gentoo tool for listing installed packages and their files.
Gentoo packages many Emacs packages as 'app-emacs/${name}' (Gentoo
packages are namespaced by category, in this instance 'app-emacs').
'USE=emacs' enables Emacs support in a few other packages, which enables
some more packages (e.g. dev-build/autoconf installs the autoconf mode).
I have 24 packages with USE=emacs, so that's about 80-some total
($(($(qlist -I app-emacs/ | wc -l) + $(quse -I emacs | wc -l))) = 87)

>>> Isn't it amazing that one almost never has any collisions
>>> doing it? Actually, I can't think of a single time that
>>> happened. But maybe it happened once or twice as I don't
>>> remember everything that happens.
>>
>> Depending on what you mean by collisions, I might or might
>> not have had some.
>
> If you bring in a bunch of stuff onto a global namespace, you
> get a collision if two things are called the same.

Ah, I see.  Thankfully, I don't think I've seen that either, which, now
that you mention it, is rather impressive!

>>> Maybe this shows that built-in and/or enforced modularity
>>> is over-rated?
>>
>> I'm not sure I can agree even if that were true - I don't
>> see how one implies the other.
>
> One way of doing it is to have everything refered to by a full
> path or other composition notation involving the module name,
> so some function 'sin' from the package 'math' would be called
> by 'math:sin' or using some similar syntax to that end. And if
> there are two packages called 'math' one would etc etc.
>
> But any such schemes seems to be unnecessary, at least here.

It'd help with some issues I think, for instance, it'd make it easier to
tell when a (require) is needed or such.  Emacs already has modularity,
but out of necessity rather than as a development tool, it seems to me.

The Haskell import system by default does unqualified imports (i.e. no
prefixes), but can make them qualified with an arbitrary prefix.  For
Python, the default is inverse but the rest holds.  I think both of
these are nice compromises and make for quite useful and usable
modularity.

Have a lovely day!
-- 
Arsen Arsenović

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

      reply	other threads:[~2024-02-25 13:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-22  4:50 How many packages do you use? Emanuel Berg
2024-02-23  1:12 ` Arsen Arsenović
2024-02-23  3:11   ` Emanuel Berg
2024-02-25 13:57     ` Arsen Arsenović [this message]

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=861q90pq8n.fsf@aarsen.me \
    --to=arsen@aarsen.me \
    --cc=help-gnu-emacs@gnu.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.
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).