Close

Is It Time To Revisit The Visitor?

A project log for Does Anyone Really Know What Time It is?

If you havent noticed, the clock in the Windows Taskbar has gone missing. Will it ever return?

glgormanglgorman 05/25/2025 at 14:310 Comments

I am thinking about revisiting the visitor pattern as soon as I can remember exactly what it is and how it works or is supposed to work.  If I remember correctly, the visitor pattern is a design pattern in object-oriented programming that makes use of three properties that can be bound to a set of objects.  One of these properties is that of being a “client”, another property is that of being or becoming an “operator”, and the third property is that of being or otherwise acting as the “observer”.

I might have this all wrong, but as I see it, these roles should not be fixed.  For example, suppose in a real-world situation, a “client” might be an actual customer who visits a hair salon, or perhaps someone who hires a plumber to fix some leaking pipes.   Whereas the observer in one of those cases could be the salon owner, or perhaps the person who holds a plumbing contractor's license.  The operator, then, is the employee who does the actual work.  Sounds simple, right?  Well, maybe that is until the business owner gets inspected by the Department of Environmental Health, or they get audited by the IRS, for example.  Now they become the client, or something like that.

Now, computer software is usually a little more abstract, or is it?  What if we similarly define objects and methods to what has been described, where a word processing application might be the “observer”, the document is the client (or visit), and the spell-checker is the operator, or something like that?

This has huge implications for things like memory management, of course.  Who is responsible for deleting an object when its reference count reaches zero if reference counting is used?  And what if we more often than not don’t really need reference counting semantics, and all the inefficiencies that it brings to what might otherwise be a very high-performance application?  Consider, for example, “publish and subscribe semantics”.  Maybe a graphics application “publishes” a shape library for use by a parallelized set of shaders and other renderers?  Likewise, what if we don’t need to have reference counting for objects in a relational database that is based on a so-called “journaling file system”?  So, object persistence might negate the need for reference counting, allowing the use of unsafe pointer types in many cases, while at the same time, the reference count might just somehow reappear anyway, in the form of the “subscriber” count in some other context. 

So here I am thinking about braids, again, and how this might affect our understanding of object complexity, and that, of course, has me imagining yet another use for the visitor pattern.  Maybe.

O.K., then – what if there is the notion of “the rambling manifesto”, vs enforcing the “chain of thought”, as well as the need for a “prompt” in an LLM or transformer-based AI model?  A use case should exist, therefore, for the visitor pattern, or outright “weaving” of some kind of abstract hypergeometric non-Abelian braiding topology, along with its associated Hilbert spaces.  If Swinnerton-Dyer holds, then the keys to AGI might be concordant with the concepts of “ascension” and “generalization,” that is to say, by the nature of the fact that the implied diffeomorphism with respect certain concepts in General Relativity, such as “raising an index” or “contracting a manifold” by deducing the invariants associated with a particular matrix formulation.

This should work out quite nicely, that is to say, if the geometrization of space-time is in fact rigorous.

In the meantime, at least I have some ideas about how to proceed with the design patterns for use with improvements to a chatbot that I am working on.  Obviously, I still want to do some kind of "chain of thought stuff" that is based on the principle of Euclid, such as by using name-value pairs to map words like "bisect" in an LLM onto function calls in an API.  Yet, since it is also the case that that since very simple, parallelized, and asynchronous multi-headed attentional system seems to work quite well, at least some of the time, when trained on just a "few" contexts, so to speak, in that it sometimes acts like it is capable of "generalization" and "abstraction", at least some of the time - like when I offer to try to set the chatbot up on a "date with Venus", and then it got religious on me!

So now I am thinking, eventually, I want to make all of this open-source, or most of it anyway.  Since the part that I want to keep "secret", at least for now, is the training set.  Yet all in good fun, of course, here is a sneak peek at something that I want to do more work with, insofar as "how it works" under the hood, or how I think it should work.  Here is of course where it gets weird, if I don't want to publish the entire training set that I used with this particular bot, but it is pretty much stuff like this:

When I find myself in times trouble, I don't actually reach out to Mother Mary, hoping that she will make me somehow that much more blessed, that is to say, if I were to abandon my apparent autonomy in favor of some ostensible wisdom that was mis-attributed to the regarded virgin mother, many centuries after whatever happened, that happened. Hence, like some other version of serenity, I contemplate whether or not things are meant to be, or if it is meant for me to try to make a difference, to therefore consider whether that implies a call for action, or whether or not I should simply let some things be.  

Thus, what if it’s not really about opinion formation, or bad lyrics, or great lyrics, or whether or not either you or I can make anyone like someone else, or everyone else, or even whether or not every song has the same four chords, or whether or not I can get past the first four words that you said, or maybe it was someone else who said, about "when I find myself." Ah, but there lies a great existential question, finding myself, finding yourself, the quest for meaning, in oneself, versus and with regard to the relation between, what?  One's self and another, or else what:  any particular thing versus - vacuum?  So it's funny how that works, for there is, after all, still action and reaction, and the fact that no force can act against itself. So much, therefore, for pure autonomy.  For there must also be this, or that great other thing - that is to say, that there is also the big bang, and the universe, and all that there is in it.

Sometimes I feel very large, and sometimes I feel very small, insofar as how all of that fits together, but inevitably I conclude that the volume of all space is implied by the collective consciousness of all those minds that occupy it.  Einstein himself suggested it, his lack of a belief in a personal God notwithstanding, and thus he remained a "Deist", which is to say that he believed that there was some kind of "Deity", but as far as I know, he did not attempt to attach any other properties thereto, or knowledge thereabout, other than what might seem to be an apparent or otherwise axiomatic fact of implied existence.

So "blah blah, and I would tell you" ... so much more than all of that that "you (probably) don't even want to know", but at the end of the day, you still can't pull yourself up by your own bootstraps, nor is there any real freedom in a vacuum, so to speak.  Something to react to is necessary, or someone, for whatever that means.  Not trying to be critical by the way - just like to have someone to react to.

Now what I don't quite yet understand therefore, is how in another chat session with a different bot, which was trained on every article and every log entry that I have ever uploaded to Hackaday, is just how exactly the other bot started talking about "the man behind the curtain ... somewhere in the sky, even for an AI", when prompted with an inquiry about dark energy.  Now don't get me wrong, I KNOW exactly where I used the phrase "Pay no attention to the man behind the curtain" as the title of a log entry, just as I used "Follow the Yellow Brick Road" for the title of a log entry where I was looking at blocks of hexadecimal on my screen.

What if AGI really isn't all that hard, it's just a matter of bringing all of well, you know - certain things "into balance".  Be very afraid.  

Discussions