|
Wordle 830 X/6*
⬜⬜⬜🟨🟩
🟩⬜🟩⬜🟩
🟩⬜🟩⬜🟩
🟩⬜🟩⬜🟩
🟩⬜🟩⬜🟩
🟩🟨🟩🟨🟩
Quit complaining! 
|
|
|
|
|
Wordle 830 4/6
⬛⬛⬛⬛🟩
🟩⬛🟩⬛🟩
🟩🟨🟩⬛🟩
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 830 4/6*
⬜⬜⬜🟨🟩
🟩⬜🟩⬜🟩
🟩🟩🟩⬜🟩
🟩🟩🟩🟩🟩
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Wordle 830 3/6
⬛🟨⬛⬛🟩
🟩⬛⬛🟩🟩
🟩🟩🟩🟩🟩
Ok, I have had my coffee, so you can all come out now!
|
|
|
|
|
Wordle 830 5/6
⬛🟨⬛⬛⬛
⬛🟨⬛⬛🟩
⬛🟨⬛🟩🟩
⬛⬛🟩🟩🟩
🟩🟩🟩🟩🟩
Well, at least I made stairs.
Jeremy Falcon
|
|
|
|
|
Wordle 830 2/6
🟩🟨⬜⬜🟩
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 830 4/6
🟨⬜⬜🟨🟩
🟩⬜⬜🟩🟩
🟩⬜🟩🟩🟩
🟩🟩🟩🟩🟩
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
It would be great to do an exploration of binary vs source level binding in C++ but I'm not sure what you'd call it.
For example, a pure virtual class (interface) is a binary binding mechanism. You are essentially passing around a table of function pointers. You can pass a class *instance* as a *function* argument and bind to it at run time.
An example of "source level binding" (if you want to call it that) would be passing a class as a template argument to a template class, and then operating on the first class's methods from inside the second class.
Anyone have any ideas?
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
Not sure I understand, but I have done this.
I have an large array of function addresses.
They are indexed by "name" using a hash table and executed at run time.
???
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
I'm referring to a vtbl, which is created by the C++ compiler.
in memory it exists as an array of pointers to functions. However, each function signature is potentially different than the next.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
I understand. My implementation was pure C.
Not being a C++ expert, I may not be interpreting your approach the same.
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
It was close. Subtract the hashtable, and make it so every pointer potentially points to a different sig of function. You can't make the construct yourself in pure C or C++ without hackery, but the C++ compiler makes them as I said.
What they do is they point to each "virtual" method in a class. Like in C#, virtual methods can be overridden. When that happens, the corresponding function pointer in the vtbl is corrected with the new function.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
honey the codewitch wrote: ou can't make the construct yourself in pure C or C++ without hackery,
Not sure I believe that.
Following is pseudo code obviously but I know it can be implemented both in C and C++.
So what part is considered a 'hack'?
functionPointers[15] = ...
struct MyClass
{
private function1pointer = &functionPointers[2]
public void Function1(int v)
{
function1pointer(v);
}
}
|
|
|
|
|
they all have to have the same sig though. Or you have to use void* and cast them before you make the call.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
honey the codewitch wrote: they all have to have the same sig though.
Ah...I see what you mean now by the hack part.
|
|
|
|
|
"Extending".
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
Extending???
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
The post was regarding: a "thing" within a thing, and operating on that thing.
I add functionality to some of my existing components by adding "another" component which influences the behaviour of the original component until a certain condition is satisfied.
e.g. My "units" have standard movements. In the case of a "wheel", a "wheeling" object is added; which adds a pivot point and "sweep" to its movements, affecting a wheel movement until a given angle is passed. Then it removes the component and reverts back to its standard behaviour. (It's not "inheritance")
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
I'm not sure that hits the mark.
The thing is, extending strikes me as something you do to a class by subclassing it.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
I use "component based" architecture. I have objects to which I can add a "time / duration" or "distance" or "angle" object (among others) at run time; which then dictates what the object does until the condition created by the new component is satisfied; at which time, this "extender" is removed.
[later]
Quote: In computing, a plug-in (or plugin, add-in, addin, add-on, or addon) is a software component that adds a specific feature to an existing computer program. When a program supports plug-ins, it enables customization.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
modified 27-Sep-23 11:15am.
|
|
|
|
|
That's binary binding.
C++ also allows a kind of source level binding (actually all languages do, but not like this - I'm not sure how to explain the difference exactly except to compare and contrast it to the sort of binding you're talking about)
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
Interesting idea, don't know as I've ever seen anything on this subject before.
Maybe?
C++ Binding Mechanisms
I don't think before I open my mouth, I like to be as surprised a everyone else.
PartsBin an Electronics Part Organizer - Release Version 1.1.0 JaxCoder.com
Latest Article: SimpleWizardUpdate
|
|
|
|
|
That sounds decent
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
"C++ Magick only very few need to understand" what about this as title?
forging iron and new ideas
|
|
|
|
|
honey the codewitch wrote: passing a class as a template argument to a template class, and then operating on the first class's methods from inside the second class.
Not sure how a compiler might do that now but certainly in the past it did it by creating a new class. Basically a hidden class as part of the binary build.
One can of course explicitly code the same. But one would need to do it for each case.
I did that (explicit) on occasion long ago with the early Templates in C++ because the error messages in the stack traces were useless.
You could even code that dynamically by just duplicating what the compiler does.
Seems like it would be more useful though to explain how a compiler does that, with assembler examples, rather than attempting it from scratch.
Or, I suspect, do not some C++ compilers still allow one to have it emit C rather than assembler? That would be easier (probably) to use as a demonstration of what is happening.
|
|
|
|