|
Think of it as an online Countdown Numbers game without Rachel Riley.
"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!
|
|
|
|
|
nerdlegame 533 4/6
πͺπ©πͺβ¬πͺβ¬πͺβ¬
πͺπ©β¬π©πͺπ©π©β¬
β¬π©β¬π©π©π©π©β¬
π©π©π©π©π©π©π©π©
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
Don't you just love those nasty, snarly problems that become a time sink, sometimes for months, sometimes being shelved for a year before picking it back up later and trying again?
Don't you just adore when you can see them coming and know what you're in for and what you're about to take on?
Isn't it wonderful when the problem is big enough and complicated enough that it's no small feat to even get help with it?
To give you an example of such a problem I'll give you a high level description of my current source of vexation.
I'm working on optimizing my dirty rectangle routine for UIX to minimize the number of times I have to redraw controls when refreshing the screen. It's not simple because I have a fixed window I can use as a transfer buffer to move updated rectangles for the display to the actual screen (hardware). If the window is 32kB that means an area of 128x128 pixels at 16-bit color. Or less. (Any rect of any shape with an area equal to or less), but that means I'd have to draw a 256x128 control twice if it ended up dirty.
Nothing I can do about that in particular instance but there are situations - particularly when I need to refresh the entire display where my algorithm is too naΓ―ve. It creates that transfer window the entire width of the display (say 480px) (in the case of a whole screen refresh) making it very short in height. That means most controls will have to be redrawn more than once, but if I subdivide my dirty rectangle(s) differently so it fills around the controls and then draws the controls it will be more efficient.
It's easier said than done.
To make it even more fun, I need the problem to be broken out basically like a coroutine - such that it does one transfer per call to the update() method. It requires a state machine. Fortunately that's already in place, even if it will need to be modified.
Check out my IoT graphics library here:
https://honeythecodewitch/gfx
modified 7-Jul-23 2:00am.
|
|
|
|
|
I do love an interrupt driven state machine for fast, tiny code.
"Mistakes are prevented by Experience. Experience is gained by making mistakes."
|
|
|
|
|
Oh gawd, fortunately this isn't in an interrupt. The complexity of screen updates alone would sort of preclude it, as I'd hate to load all the supporting code permanently into RAM. It's an entire UI/UX framework, and while relatively small, targeting IoT, it's a heck of a lot more than you'd want to stuff in an interrupt routine.
That means I have wiggle room.
The reason I need the state machine is for example, if I'm doing cooperative threading by interleaving graphics and sound tasks, both of which need to update as often as possible. This way I can do partial screen updates and partial sound buffer updates for example, without anything getting hung up and buffers emptying or frames dropping - that sort of thing.
Check out my IoT graphics library here:
https://honeythecodewitch/gfx
|
|
|
|
|
Matthew Dennis wrote: an interrupt driven state machine for fast, tiny code. Doesn't "fast, tiny" imply limited use ?
Β«The mind is not a vessel to be filled but a fire to be kindledΒ» Plutarch
|
|
|
|
|
Yes and no,
The code to drive the state machine is fairly generic, but the tables of states and transitions are specific to the application.
In my case, I was using it to use a MC6301 or MC6805 with < 128B of RAM, including stack, and < 2K ROM to bit bang a 1200 Baud serial port and drive 2 slip printers, motors and pin, and 4 fonts.
A state machine is extremely fast and robust and very easy to understand and debug.
It was tight and I even ended up using an unused interrupt vector or two for code space.
"Mistakes are prevented by Experience. Experience is gained by making mistakes."
|
|
|
|
|
honey the codewitch wrote: Don't you just love those nasty, snarly problems that become a time sink, sometimes for months, sometimes being shelved for a year before picking it back up later and trying again?
Nope.
For the systems I work on...
There are problems which require a simple fix but which takes a long time to find the source of the problem. Those are not too bad.
But other problems can often resolve to the following
1. The architecture is the problem. Perhaps nothing wrong with it when it was created but the business has expanded any now there is no way to fix it without a complete refactor.
2. The 'feature' was added adhoc using often nothing more than a verbal idea. And tested very little. Now it has grown with 'fixes' being added over time. Still very little testing. So now customers are having repeated 'bugs' with it even though there is no understanding of what it should be doing in the first place.
3. Actual known bug has been ignored for years and now customers are actually using it as a feature. Perhaps even in violation of their contract.
4. The very nature of the language/OS prevents a fix from being put into place.
|
|
|
|
|
In this case I'm not sure any of those would apply. It's a complicated algorithm on top of a well known common practice of using dirty rectangles. The complexity is due to limited memory.
This problem could easily be solved by AI using recognition to find clusters of controls that still fit within the given window, and things like that.
But it's just not simple otherwise.
Check out my IoT graphics library here:
https://honeythecodewitch/gfx
|
|
|
|
|
honey the codewitch wrote: Don't you just adore when you can see them coming and know what you're in for and what you're about to take on?
Nope, I particularly dread them. But there hasn't been such a problem that I can recall facing. I do fairly simple web development things. 
|
|
|
|
|
Eloquent !
Β«The mind is not a vessel to be filled but a fire to be kindledΒ» Plutarch
|
|
|
|
|
Attempt the French partner (10)
Definition: Partner
Attempt: Stab
The French: le
partner: mate
Stablemate
Bit naughty using partner twice
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
|
|
|
|
|
pkfox wrote: Bit naughty Not really, but the clue should have included &lit - Wiktionary[^].
|
|
|
|
|
Attempt the French partner (10)
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
|
|
|
|
|
I think you will be up tomorrow - I got nothing!
"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!
|
|
|
|
|
|
interesting given Russia has been at it awhile. Testing drill bits?
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
Bloomberg wrote: The drilling is expected to take 457 days. That's very specific. A bit of opportunity for under-/over-achievement!
Bloomberg wrote: ... a depth of 12,262 meters ... after 20 years of drilling. ... and also looks a tad optimistic based on this previous hole!
Now when they can drill through from one side to the other: that's when we really need to worry.
|
|
|
|
|
The poor planet will cry enough at some point
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
|
|
|
|
|
And its tears will burn everything on their way
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
"Such work can identify mineral and energy resources and help assess the risks of environmental disasters, such as earthquakes and volcano eruptions."
or hit a magma pocket and cause a volcano... I seem to recall a cheesy sci-fi film about this...
Charlie Gilley
βThey who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.β BF, 1759
Has never been more appropriate.
|
|
|
|
|
They're due in St. Louis in 2 weeks?
Give me coffee to change the things I can and wine for those I can not!
PartsBin an Electronics Part Organizer - An updated version available! JaxCoder.com
Latest Article: Simon Says, A Child's Game
|
|
|
|
|
Hope it doesn't come through my basement when I'm working from home (In St. Louis). I'll keep you posted if it does.
Hogan
|
|
|
|
|
Good luck.
As a side note you'll never have to worry about basement flooding!
Give me coffee to change the things I can and wine for those I can not!
PartsBin an Electronics Part Organizer - An updated version available! JaxCoder.com
Latest Article: Simon Says, A Child's Game
|
|
|
|
|
Mike Hankey wrote: never have to worry about basement flooding!
Lava, OTOH...
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|