Came across an embedded app I wrote about six years
ago. It had its uses and then was obsolete. A big 'C'
program for an Arduino Mega... lots of sensors, interrupts,
data-polishing, what you'd expect. Even after such a
relatively short period I did indeed "marvel" at its
complexity and how it got through a bunch of issues -
and I *wrote* the damned thing in about a month !
How'd I *do* that ???
> I am not a computer scientist. Elegance isn't in my nature. I am a
> software and other sorts of engineer, and making it work, and keep on
> working at the lowets possible prices is burned into my soul
>
> "An engineer is someone who can do for five bob what any damned fool can
> do for a quid"
"What Works" is usually MUCH more important than "What
is theoretically correct". I do not plan/diagram
apps, I just GO for it. Gotta kinda hold the whole thing
in your head so you can see every interaction/dependency.
Always a buzz ! Gets all those old neurons working !
Yea, "computational theory" has its place - but in the
real world ...... shit, I don't even use most of those
"advanced" tricks in Python - too obscure and of little
advantage except to decrease transparency.
It's all 'C' under the hood. All the new "tricks"/"shortcuts/
"methods" are really the Same Old Shit, same (or more) number
of cpu cycles and bytes - just a lot less transparent. "Ease"
and "sophistication" are so often illusions and it's getting
worse and worse.
The "AI's" will soon take over, writing everything THEIR way,
according to THEIR logic. Won't be long after that mere humans
are incapable of understanding/verifying what they create.
It all becomes "magic".
>> Things like Pi's are special cases - not blazing fast,
>> not a lot of RAM, run off SD cards/eMMC that have to be
>> protected from re-write fatigue. If the need for space
>> isn't excessive, and simplicity is worthwhile (almost
>> always) then a RAMdisk is often your best solution.
>>
> Ha! compared with a Z80 with 48k of usable RAM or a 6809, they ARE
> blazingly fast. I cut my teeth writing C and assembler for those, stuff
> that was burned into ROM.
> There is so much on this zero ROM - 16GB! And I have ram coming out of
> my ears.
Well, "blazingly fast", except by modern desktop/server measures :-)
PI's are kind of in the gap between microcontrollers and
"real" modern CPU boards. The power-consumption kinda
pisses me off though ... you can basically turn a PIC
or Arduino OFF until some important event happens, thus
making them battery/solar-friendly. NOT so with PI's.
PIs can be good for a lot of applications - but their
limits MUST be considered. They are NOT high-end Xeons,
more like 10 year old laptops.
>> Because of the filesystem overhead, RAMdisks just MIGHT
>> not be fast enough ... then you have to go to "less simple"
>> approaches alas. To each app, its own.
>>
> My access requrements are measured in seconds, not micro seconds.
Makes it easy ! This is OFTEN the case.
>>> In the current project which involves driving 4 mains relays using a
>>> daemon that collects various bits of information in order to decide
>>> when to switch them on, it is used to store the relay state, so again
>>> ajax calls from the web server can determine not what *should be on,
>>> but what is *actually* on.
>>
>> Cool stuff
>>
>>> I am sure the semaphores messages and pipes might have done the job,
>>> but simply recreating a file ion a ramdisk every few seconds works
>>> fine.
>>
>> "Pipes" are a kind of cheat - really just "invisible" R/W files.
>> I used them kinda extensively on some forking servers I wrote a
>> couple of years ago in Python and 'C' to make data gathered by
>> new forks accessible to the mother process. They WORK just fine
>> and are commonly used and I *think* a tad faster than a RAMdisk,
>> but still ...
>>
> Oh there surely are faster, but who is in a hurry? a central heating
> controller changes states every few HOURS. and if the users browser view
> of that is a second behind, frankly who gives a damn?
Well, 'device controllers' run at their own pace but
things like comm servers need to run a lot faster and
be prepared for LOTS of clients at the same time. At
the time I was interested in all practical variants and
thus took some skeleton code I found and blew it out
into full real apps.
"Pre-Forked" really ARE "the best" - you set up maybe
ten or fifteen forks all running at the same time and
distribute work accordingly. If NEEDED you can dynamically
expand the number of forks. Think "Google".
Good for very high traffic (there
are graphs on this). The flip is that setting up and
then managing all those forks IS a pain in the ass.
It all depends on what you NEED. For MOST uses the
simplest, non-forking/non-threaded, server will,
well, serve.
> Like wise room temperatures and tank oil levels are not things that
> change much in an hour...
>
>
>> I'm fond of such 'servers' - even cobbled together a good
>> "pre-forked" one - supposedly the highest-capacity/speed -
>> for both TCP and UDP - but never had a good high-volume
>> reason to use them. The best was almost like a 'chat' app,
>> non-sync bi-directional where the queen server process could
>> initiate, even push, tasks and messages to the clients. Fun !
>>
>> Hmm ... now apparently some possible servants of Xi here
>> are calling me a "troll" because I repeated a few things
>> (said by HS/NSA/CIA) they didn't WANT to hear about
>> CCP sabotage-ware infiltrating almost everything in
>> our important infrastructure/military systems and
>> 'devices' (which are almost entirely Linux/Unix-based).
>> One day soon they ARE gonna get a big wake-up call ... but
>> meanwhile denial means they won't DO anything about it :-)
>>
> The problem is that no one knows what is really happening, and although
> the political narratives that are spun for consumption by hoi polloi,
> are obviously not the real truth, no one knows what is. Not even the
> spinners.
The spinners generally know NOTHING. They don't program.
They merely repeat what they heard. However WHAT they've
been hearing from the Highest Levels now IS very worrisome.
My experience HERE is now Very Bad - the Linux People
just do NOT WANT TO HEAR that the CCP has been sabotaging
distros/drivers/etc. I remember about five years back when
a Mint distro was heavily sabotaged ... they went after the
code on the official distribution download page. One of
the guys in the office HAD just installed it - I had to
tell him to HOSE it. He wasn't very happy.
BUT ... when's the last time YOU went through, say, the
code for SSH or even actually used those checksum files
that come with distros ? We all just ASSUME everything
is fine, that SOMEBODY is watching every bit of it.
Alas there are now SO many bits of it that said assumptions
might NOT be true. Hell, even a printer driver can be
tweaked by a malicious agent. It's so low-level that
likely NOBODY checks often. And, according to our big
letter agencies, there are MANY secret CCP tweaks in
such stuff.
> I myself know for example, that there couldn't have been any weapons of
> mass destruction *directly threatening British interests* in Iraq, and
> that our prime minister lied about that. I spent a couple of years
> designing missile parts and know in principle where the bleeding edge
> is, and it sure ain't in Iraq.
The "justification" for the Iraq War was 99% bullshit.
The REAL reasons were purely political - Hussein was
sliding over to the Russian side. Can't HAVE that !
Too much oil involved.
There is "politics" and "REALPOLITIK" ... a world
of difference.
> I know that Covid injections do not put goverment control chips in your
> brain, They don't need to. They have the mass mediafor that :-)
I've had - and will have - every Covid vax they produce.
No microchips. I forget WHO came up with that paranoid
theory ...
> I know the moon landings were real, because there wasn't the technology
> then to fake it.
I lived 20 miles from Kennedy back in the day. The
launches shook the sky. My Dad WORKED there. They
weren't faking anything. It was all stuff just
*barely* within the current tech. Surprised there
weren't more disasters.
For fun, look up "rope memory" ... that's what the
Apollo computers ran on (even though much better
stuff HAD been invented since the Original Contract).
> I know that 911 was a simple case of structural failure in a fire,
> because everything about it is consistent with my knowledge of
> structural engneering.
Yep. However the popular vision of falling buildings
comes from movies - where the tall structures fall
over dramatically instead of collapsing in-place.
Sorry, but the structures can't support "falling over".
MAYBE the Empire State.
I was watching on 911 ... was able to predict the
Big Crush well ahead of time. You could SEE what
was happening, what was about to happen.
> I dont know who apart from lee harvey oswald, might have shot JFK , or
> why. |Jury still out.
I think he *did* it ... but WHY, and who was PAYING,
we'll NEVER find out. There are now SO many takes
on it that we'd never recognize the REAL one from
all the bullshit. This seems intentional. All "high
officials" from 1963 are DEAD. Nobody blabbed.
> I know that 'renewable' energy is a greater disaster than any climate
> change, and I know that climate change is largely natural with very
> little man made components. Because I did the years of research. And the
> problem is within my pay garde as an engineer with a good STEM background
"Renewable" is almost all hype/bullshit at this
point. It'll make a lot of $$$ for a few who
will kick it back to their favorite pols.
Now in 20-25 years 'renewable' CAN be much more
real. Better PVs, better batteries, it CAN be
very useful. But for TODAY, a disaster .....
> I don't know who runs the world banks, but I an fairly sure its not
> Jews, or Lizards.
> I am however sure that they haven't a clue what they are doing.
They mostly just "fake it" ... IMHO. Not the best
thing but the whole world financial thing is SO
fluid and weird that there may be no better approach.
Pure Reaction.
However the ILLUSION of sense and logic is paramount.
Economies these days are all illusion. None of the
actual numbers seem to work out. They've become a
'religion' of sorts. Heretics are suppressed.
As for the "Lizard People" ... well :-) I'll put
my trust in the Space Aliens instead !
>> ANYway, /var/log CAN be moved to a RAMdisk if you want.
>> Not 100% sure WHY you'd want to, but it CAN. If a few
>> very early logs get 'lost' as you re-direct /var/log
>> then that MIGHT not be all so important. If you want
>> it all on RAMdisk then you don't CARE if it all
>> vanishes on reboot. I very rarely look in /var/log
>> anyhow so ....
>
> As I said, whoever you are, the less writing to an SD drive there is,
> the less chance there is of file system corruption when the power goes out.
Yep !!! Leave the SD/eMMC *out* of it all as much as possible !
> Its simply a natural habit to ensure than whatever an embedded system
> does is the minimum necessary to get the job done with the maximum
> reliability.
Yea, but do the "new guys" really GET that ??? I've run
into a LOT who don't seem to. They don't understand the
tech, just follow the glossy hype. The more "churning"
the more you should shift to SSDs, then magnetics, then
RAMdisks if possible.
> The SD card looks like it might be the weakest link. So I am trying to
> reduce stress on it.
In most PI/embedded any SD card *is* the weakest link, the
prime point for failure. Always buy the best (Samsung
"Endurance") but you STILL have to be smart.
I came across a PI-1b that I'd set up to do ONE simple
thing buried way in the background. It'd been doing its
thing for about 7 YEARS without fanfare. Samsung card
(pre-"Endurance"). Ancient version of Raspbian. Not a
security risk, not on the network. It simply Just Worked.
The main junk is done on a RAMdisk. I did put a newer
card in it, the latest Raspbian, and now it's still doing
its one thing. Should be good for a decade. I'll be
long-retired, maybe dead, by then. After that they
can spend $2500 for what I did for $79.95 ......
Oh well, maybe Too Much ... I'd prefer simpler replies,
but there were MANY issues raised here. I'm NOT gonna
stop posting to COLM even IF some fools think I'm
some kind of "troll". What I say generally NEEDS to
be said. If they Don't Want to hear it ... well .....
Linux/Unix are NOT invulnerable. This latest news
makes that all the more obvious. Plan/act accordingly.
The thing that makes your electricity stay on, that keeps
big chemical factory from exploding, mekes your bank
account work ... NOT as secure as you'd LIKE to think.
The CCP and friends have VAST resources to make that so
and Confrontation Time is counting down.