unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How many packages do you use?
@ 2024-02-22  4:50 Emanuel Berg
  2024-02-23  1:12 ` Arsen Arsenović
  0 siblings, 1 reply; 4+ messages in thread
From: Emanuel Berg @ 2024-02-22  4:50 UTC (permalink / raw)
  To: help-gnu-emacs

How many packages do you use?

If one defines "using a package" as `require'-ing it in
employed Elisp configuration and extension source, then one
can use this command to find out

  $ grep -h -o '(require .*)' **/*.el | sort -u | wc -l

I use 159!

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.

Maybe this shows that built-in and/or enforced modularity is
over-rated?

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: How many packages do you use?
  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
  0 siblings, 1 reply; 4+ messages in thread
From: Arsen Arsenović @ 2024-02-23  1:12 UTC (permalink / raw)
  To: Emanuel Berg; +Cc: help-gnu-emacs

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


Emanuel Berg <incal@dataswamp.org> writes:

> How many packages do you use?
>
> If one defines "using a package" as `require'-ing it in
> employed Elisp configuration and extension source, then one
> can use this command to find out
>
>   $ 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.

> 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.

> 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.

Have a lovely night!
--
Arsen Arsenović

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

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

* Re: How many packages do you use?
  2024-02-23  1:12 ` Arsen Arsenović
@ 2024-02-23  3:11   ` Emanuel Berg
  2024-02-25 13:57     ` Arsen Arsenović
  0 siblings, 1 reply; 4+ messages in thread
From: Emanuel Berg @ 2024-02-23  3:11 UTC (permalink / raw)
  To: help-gnu-emacs

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?

>> 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.

>> 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.

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: How many packages do you use?
  2024-02-23  3:11   ` Emanuel Berg
@ 2024-02-25 13:57     ` Arsen Arsenović
  0 siblings, 0 replies; 4+ messages in thread
From: Arsen Arsenović @ 2024-02-25 13:57 UTC (permalink / raw)
  To: help-gnu-emacs

[-- 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 --]

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

end of thread, other threads:[~2024-02-25 13:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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).