jaraco / irc

Full-featured Python IRC library for Python.
MIT License
392 stars 86 forks source link

What the heck is the "Manifold" object? #48

Closed jaraco closed 8 years ago

jaraco commented 8 years ago

I've been going through the source-code for this library, and trying to write code that uses it.

From what I can tell, everything seems to be piped through the "Manifold" object, which seems to be global (?), and looks a lot like a reactor.

What the hell is a "Manifold"? It's not documented anywhere in the documentation, and where it's mentioned it's treated as calling it "the manifold" is self-explanitory.

The only results for googling lead to either the Manifold GIS system, or wikipedia pages for unrelated gometric terminology.

If it's functionally a reactor (and it certainly looks kind of like one), can you possibly use standard terminology, or at least add a blurb to the documentation ("the manifold is a reactor. We're using this non-standard term for {insert reason here}")?


jaraco commented 8 years ago

That's a good point. Until very recently, that class was called "IRC" and instances of it were called "irclibobj", neither name which was helpful at all in describing the behavior.

I brainstormed alone and came up with Manifold because of the way it collected streams of data from different connections and handled them in a single place (the way a car manifold takes streams of air from the cylinders and combines them into a single exhaust).

I agree that Reactor would be better. Would you be willing to put together a pull request to include the changelog entry for a backward-incompatible release? Alternately, a blurb in the documentation may suffice.

seems to be global (?)

I'm not sure I follow. How is it global? What would prevent you from creating multiple Manifolds? I wouldn't recommend creating multiple, but I don't see anything that precludes doing so.


Original comment by: Jason R. Coombs

jaraco commented 8 years ago

Sorry, I was a bit irritated when I wrote the intial bug-report.

I'll spend some time moving stuff about, and renaming the manifold object, and get something together in the next few days.

Re: The global thing: You are correct, it's not global. I was a bit confused by the fact that the manifold class definition is assigned as a class member, and then the class member class definition is instantiated (this is presumably to allow monkey-patching the manifold object).


Original comment by: Fake Name

jaraco commented 8 years ago

There's also a few other tweaks I'd like to make with regard to the documentation, In particular, the fact that runtime class introspection is used to look up method names should be (in my opinion) made much more clear. I use SublimeCodeIntel for coding assistance, and the dynamic nature of the lookup mechanism makes any sort of method lookup completely useless. This, combined with the fact that the information that you can subscribe to any IRC method in the events.py file by prefixing it with on_ is barely documented, makes using the library a bit confusing.


Original comment by: Fake Name

jaraco commented 8 years ago

See https://bitbucket.org/jaraco/irc/pull-request/30/renamed-all-instances-of-the-manifold/diff


Original comment by: Fake Name

jaraco commented 8 years ago

Closed by accepted pull-request: https://bitbucket.org/jaraco/irc/pull-request/30/renamed-all-instances-of-the-manifold/diff

Thanks for letting me complain about terminology!


Original comment by: Fake Name