Excerpt - How To De-Bloatify Using Current Programming Languages
2025-05-05
In a previous article, I discussed how bloatware happens.
I’m writing about how we can we de-bloatify code using what we’ve already got. This is an excerpt from that new article.
...
I will begin by inventing a simple, but useless, example. The source code for this example is the following diagram
The first thing to notice is that this diagram is incorrect, in that it has two input gates (white rhombuses) that have the same name (the empty string).
We fix this problem by giving one of the gates a name
Now, the diagram looks correct. The fact that all three inner parts have ports with similar names is OK, since each Part has its own namespace and the Container’s mapper translates output port names to input port names as appropriate.
This diagram represents one Container that contains three inner Parts, each being a unique instance of the “Echo” template.
The Container has one input queue and one output queue (not shown, but the queues are there). Each inner Part owns one input queue and one output queue (this could be further optimized, but, I’ll keep it simple for this explanation).
The Container owns ten wires in all. I will add extra textual annotations to the diagram so that I may discuss the connections in words. These annotations are not necessary. Position information - (x,y) - is enough for the compiler.
We can represent the wires as
From in1 down to X.a
From in1 down to Y.b
From in2 down to Y.b
From X.c up to I
From X.d up to k
From X.c across to Z.g
From Y.e across to Z.g
From Y.f up to j
From Z.h up to j
From Z.i up to k
For discussion, let’s say that we send two messages, in the following order (order matters, nothing actually happens simultaneously in the real world):
{“”, “Hello”}
{“in2”, “World”}
The sequence of mevent passing and routing is detailed in the following diagrams
The net result is that one input mevent is consumed and 3 output mevents are generated.
The second input mevent has not yet been consumed.
The next thing to happen is that the Container for this diagram slurps the 3 outputs and moves them appropriately.
At some later point in time, the Dispatcher will invoke this Container Part again, and another 3 output mevents will be generated.
See Also
Email: ptcomputingsimplicity@gmail.com
References: https://guitarvydas.github.io/2024/01/06/References.html
Blog: guitarvydas.github.io
Videos: https://www.youtube.com/@programmingsimplicity2980
Discord: https://discord.gg/65YZUh6Jpq
Leanpub: [WIP] https://leanpub.com/u/paul-tarvydas
Gumroad: tarvydas.gumroad.com
Twitter: @paul_tarvydas
Substack: paultarvydas.substack.com















