[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [mildly OT] Some info about Python
- From: Αγαθοκλής <aga.chatzimanikas@...>
- Date: Sun, 19 Jan 2020 12:20:45 +0200
On Sat, Jan 18, at 08:36 Sean Conner wrote:
>
> > ... The evaluation and eventual development of my own solution
> > slowed down development (with Ruby or Python there is no real choice, just
> > read the docs and write code) but I have a solution that does exactly what
> > I want. It does it as fast as possible. It uses the least memory possible
> > and being small (54 lines including comments) it is not going to be
> > difficult to hunt down any bugs. The very reasons I selected Lua for that
> > project, these are Lua's strengths
> ... My approach was to have well targetted libraries that work well together
> (and prevent unneccessary overlap), and I have:
> org.conman.fsys - file system related calls
> org.conman.process - process creation
...
> Now that I think about it, I think this lack of modules designed to work
> well together is possibly missing from Lua.
This system which is based on directory hierarchy, combined with a kind of a lazy
evaluation - the interpreter knows about modules/functions, and evaluates code at
the first need - is perfectly aligned with the nature of Lua. The idea is to think
in terms of provided "functionality" which is expected to exist. As always is the
design that matters and provides the solution. In this case the Lua Team doesn't
have to do almost nothing; perhaps just only the introduction of such a mechanism,
though quite possible not even that. Imagine a directory hierarchy, divided first
by Lua versions lying in your disposal, that you can then load a function by using
the mechanism and use it as it is, or just pick up a function in your code as a
basis to extend or reduce it to suit the specific needs. You can even put it in
a table and do all this crazy stuff, like real time coding and evaluation¹ for
self healing systems/purposes or whatever.
You have to forget though Python|* and comparisons with them. This is Lua. So
use with no mercy it's uncomparable strengths, which are out of competition.
¹ http://lua-users.org/lists/lua-l/2020-01/msg00132.html
Best,
Αγαθοκλής