nyxt icon indicating copy to clipboard operation
nyxt copied to clipboard

Move history tree to a separate repository

Open Ambrevar opened this issue 4 years ago • 19 comments

Or shall we move it to cl-containers? If the latter, then we'd need to adapt the library to reuse the generic functions of cl-containers. It's a bit more work, but this saves the community of an extra lib.

Ambrevar avatar Apr 10 '20 07:04 Ambrevar

I'm not sure history tree is a good candidate for a library. Can you think of some other projects and how they might use it?

jmercouris avatar Apr 10 '20 11:04 jmercouris

The future Common Lisp file manager, Lem, etc.

Ambrevar avatar Apr 10 '20 12:04 Ambrevar

OK, great :-)

jmercouris avatar Apr 10 '20 13:04 jmercouris

So cl-containers or separate repo?

Ambrevar avatar Apr 10 '20 13:04 Ambrevar

cl-containers is my vote

jmercouris avatar Apr 10 '20 14:04 jmercouris

Now that the history-tree has turned into a much larger, more specialized and yet more general library, it won't fit into cl-containers.

I'll move this to a separate repo at https://github.com/atlas-engineer soon.

Shell we stick to history-tree or shall we use the "global" prefix somewhere in the name? @aartaka ?

Ambrevar avatar Jun 11 '22 08:06 Ambrevar

nhist-trees?

aadcg avatar Jun 11 '22 08:06 aadcg

I'd say no to global one, as globality (in the sense of supra-tab scope) is only the property on Nyxt history enabled by this library.

history- doesn't necessarily make sense either. It's too general to be locked to history, maybe.

So we're left with the mere properties of the structure: owned, deduplicating/space-efficient, pure-lisp, arbitrary children number. Owned-ness is the most distinctive property, I'd say. owned-tree?

But then, we have a nice convention of n-prefixed names, as @aadcg highlights. And we also have a nice htree nickname already. How about dyslexically merging those into an ntree? Seems general enough, while being reasonably recognizeable.

aartaka avatar Jun 11 '22 10:06 aartaka

ntrees then?

Ambrevar avatar Jun 11 '22 11:06 Ambrevar

Why plural?

aartaka avatar Jun 11 '22 12:06 aartaka

Because nhooks and nfiles are plural...

Ambrevar avatar Jun 11 '22 13:06 Ambrevar

But then it's because both files and hooks usually go in packs, isn't it? This is not true about ntree, as it's mostly intended to be used as a single instance of a tree per several owners.

aartaka avatar Jun 11 '22 13:06 aartaka

And the convention is (alex:symbolicate 'n word), not necessarily (alex:symbolicate 'n word 's) :)

aartaka avatar Jun 11 '22 13:06 aartaka

Well that's still up for us to decide :)

I like to mention "history" because while the data structure does not explicitly mention it, it does carry the notion of forward / backward and children in the context of histories.

Ambrevar avatar Jun 11 '22 15:06 Ambrevar

A neologism: nhistree — sounds much like n-history, while being spelled as a tree :D

aartaka avatar Jun 11 '22 17:06 aartaka

ntrees is my vote. For whatever it is worth. Artyom does make some really good arguments though...!

jmercouris avatar Jun 11 '22 18:06 jmercouris

I'd like to argue why this is about "histories" and not just "trees". The raison d'être of the library (and its main difference with trees) is that we add a "forward child" slot (which has a huge impact on the design).

The notion of "forward child" is exactly about this: history navigation.

Someone working on a file manager looking for such a library is likely to lookup "history" (e.g. with quicksearch). "Tree" is too generic a term to be helpful here.


Other points:

  • The "n"-prefix rule makes sense for library which would otherwise have a too common name: nfiles, nhooks, nclasses, nkeymaps... It helps disambiguate. However, if the name is unique enough already, do we really need this rule? Maybe it's fine to have a legible, meaningful name on its own.
  • The current name history-tree is a good one in my opinion. Renaming it is more work (we need to rename quite a bunch of symbols in the code base), so why bother? :)

Ambrevar avatar Jun 12 '22 06:06 Ambrevar

That's a sound reasoning, yes!

aartaka avatar Jun 12 '22 10:06 aartaka

In any case, as long as it is released under the atlas-engineer organization, I am OK!

jmercouris avatar Jun 17 '22 00:06 jmercouris