lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Sun, Jan 19, at 07:15 Eretnek Hippi Messiás wrote:

> Αγαθοκλής, what do u mean by self-healing systems?

When (in the winter of 2012) started to write my first interactive application, that
was intended to serve as a common environment for indepented commands (something like
a shell), every function at the begining was running through an interpreted function,
which was simply a try/catch block. The second thing was that those functions were
actually stored in the disk, so i could modify the function and re-evaluate while
the application was running.

It was fun to see the system evolved in real time and to change behavior with the
new input. With time such functions, that proved to be correct, were moved to the
core.

In the next application, the main difference was that every function was stored in
a dictionary, but the procedure was the same. The interpreted function, was able
to produce a detailed message that pointed to the line of the falling function.
The second thing was to supply the application with an evaluation console, and
re-register the fixed function to the dictionary and re-evaluate.

At the very least this produced an environment that was evolved/fixed in real time,
and the development was pretty fast. You can say that it was following the waterfall
model as a test model, and you could dare to say that was a self taught system that
learned from its mistakes (and with a little bit help of its friends (its users), so
you can say that is not actually the self! (unless you and the program considered as
the same:  but you can dare to say this; as the program knows your habbits (everyone
if you think, has a routinary workflow), is tighted with you with time, if has the
necessary tools).

But, if you go a bit more far, and to able to handle failures outside of its code
conditions (various inputs), then you might need to feed it with some choices, like:

I do have a malloc wrapper, that calls a handler on out of memory condition (i know
that is the fchrome browser that eats my precious memory in this old computer), that
exits gracefully the programm (by cleaning up resources) and with a detailed message.
For now it doesn't return control to the block that tried to allocate memory, but i'm
gonna try (if time is generous) and see what happens after reclaimaing the memory back
while killing first this process. I guess if you give in that handler, a priority table,
it can do the killing stuff by itself (as i do not care much for the .chrome browser).

I guess what matters here, is first the diagnosis, and second the tool to be able to
repair itself without bringing down the system, and:

> ... the code that can handle a failure must already exists somewhere in that case

Yes, it was that simple thing was thinking about and not so for a system that can
predict or to produce new code to handle infinite input. Note, that i do not think
that is too hard for a certain algorithm to try cases untill find its limits, or to
a realistic end, and produce a new self algorithm that handle all those cases. Of
course such combined algorithms under an environment, that might have a sense of
this environment, we might call it as an intelligent environment. Nothing wrong with
that i suppose, but can we totally trust such a system and human critical jobs relly
on its predictability? I think, no. Probably because of the evolution. It's like
a new bright input is born when you reach the known finite. Unless of course there
is an end! And probably there is. And if not, who cares! The Known is already much
and the most of all quite Unkown to most of us. There is so much strangeness in this
world. See for instance this month Lua mailing list messages. There was one thread
for "dead batteries", one for "Is Keppler project dead" and then we learned that our
friend Dirk left his body. Then you said that Dirk is not far as we might think, and
then the same day, there a couple of posts from an author with a nick named "Dark".
So based on that, probably Dirk is still on the Dark side, but is not so far away
as we might think. And still i believe that we aren't far away from the moment, that
we'll learn with proves, that our current conscience is never lost but we carry it.

Note that all this complexity or strangeness or absolute madness (called at your
wish) should probably obey (and quite logically (as it has to be controllable and
reproducible)) in simplicity. So what our duty is to discover this simple thing
that governs the creation and use the mechanism.

And speaking for simplicity. Lua is simple. And when you are talking about Python,
is that you turn things up!  Python is the one that should dream about Lua and not
the other way around. If Python and Lua, as they are now (the core language i mean),
started right now their career, who would you think that it would dominate the world?
We all know that. So i guess there is a hope that if you got it right and fight for
it, Lua can become mainstream. Note, that i believe that Lua already is mainstream.
When people talking about embedded languages, the first one ALWAYS in the list, as
a reference, is Lua. You have the machine. Be clever!

Have a good time.