question: Python or Lua for rejuvenation of old PCs?

John Benson jsbenson at bensonsystems.com
Thu Jan 1 15:01:15 EST 2004


Hi, I've been experimenting with Lua on my Tandem Himalaya K100 system (a
decade-old 4-CPU fault-tolerant server from Tandem/Compaq/HP) because it
looked like it was simpler to port than Python. Since I've only got 128 MB
per CPU and the system is already loaded with SQL and transaction processing
monitor software, it's small footprint was also very attractive. Anyway
that's how I got interested in Lua.

There has already been some discussion of Lua in this forum. At this stage
in my understanding, I'd characterize it as highly idiosyncratic, but very
dynamic in the same way Python is: it has reference rather than variable
copy semantics and functions are first-class objects. It can do OOP, but
data and method packaging are shoehorned into a somewhat complicated Swiss
Army Knife table construct. It's indexes are also unity-based and there are
no slices as in Python. However, it's sufficiently different that it
shouldn't be too hard keeping the two languages separate, unlike, say
Spanish and Portuguese.

That said, I had a project in the back of my head of putting Python on my
old PCs ranging from 4MB up to 128 MB RAM as a last-ditch attempt to avoid
facing reality and getting rid of them. However, I'm now beginning to wonder
if I would be better served by putting Lua on the low-end PCs instead. I'm
thinking of using them as nodes in a distributed, fault-tolerant home
monitoring and control system that would be easy to port later to embedded
microcontrollers.

I suppose that my question is best phrased as this: What is a comfortable
minimum RAM size that a PC needs to have to comfortably run modern Python
for non-memory-intensive applications (i.e. no big database crunching or
other thrashy stuff). I'm thinking about just polling sensors and actuating
control devices over RS-232/RS-485/LAN and doing some chitchat between the
nodes over the LAN. Based on the response, I'll draw the line between my Lua
machines and my Python machines.

Thanks in advance for any information you may have.






More information about the Python-list mailing list