5 ms·
I always perceived Lua of being completely weird, and asked myself why people would ever want to use it. Especially nowadays, where embedded Python is everywher
by Uhrheber 8y ago
I always perceived Lua of being completely weird, and asked myself why people would ever want to use it.
Especially nowadays, where embedded Python is everywhere.
- anilakar 8y agoOn modern embedded hardware, Python is a better alternative in practically every case. If size and computing power are an issue, either investing in better hardware or spending time writing C yields better results.
- AHTERIX5000 8y agoC solves different problems, there are cases where scripting languages can be extremely helpful yet running under heavy RAM constraints. Lua and JS can be adapted to quite low-mem situations (we were using on 128 k) and there are no comparable & production tested Python implementation that can do the same.
- saagarjha 8y ago> On modern embedded hardware, Python is a better alternative in practically every case. How so? Do you have an example where Python outperforms Lua or uses significantly fewer resources?
- enriquto 8y ago> I always perceived Lua of being completely weird, and asked myself why people would ever want to use it. It depends on your habits. I for one prefer Lua to Python and find it much more pleasurable to code on. There are some things in Python that I like (like the blocks defined by indentation), but overall the language seeems too complex for no reason when coming from lua.
- Uhrheber 8y agoThe thing is, my free time isn't infinite, and python is already everywhere on the PC (I only use Linux), so I really appreciate the fact, that I have to learn only one language for both PC and embedded. Micropython runs very well on modern microcontrollers, and you can use many of the libraries from PyPi. Also, there's a bunch of hardware drivers, which saves a lot of time. In the end, it's all about conserving knowledge. What's the best method of doing complicated things once, and then provide them to others in an easy and convenient way. I think, that currently the reusability of python code is very high, and enables a lot of people to write custom programs, that otherwise wouldn't have been able to do it. The friction of Python is just low. It's easy to learn, runs nearly everywhere, and you don't have to use advanced features, if you don't want to.
- enriquto 8y agoPython the language is great. What sets me off somewhat is the "ecosystem" and culture around it. Pip, virtual environments, the fanaticism about some PEPs; oh God I hate these things.
- posix_me_less 8y agoYeah, python is quite approachable, but it seems to me that this is now also its weak point: it now attracts the ever growing crowd of programming newbies, generating and solidifying weird/bad practices based on misunderstanding/lack of experience/zealotry (like the string/unicode mess, awkward handling of unix primitives, preoccupation with questions of "the correct style" or identity politics recently).
- ur-whale 8y agoNot to praise LUA which has way too many shortcomings to be useful IMO, but I had to both of these things (embedding Python and embedding LUA). Python is FAT.
- Symmetry 8y agoIf you're sensitive to performance then Lua's speed might be a major advantage over Python.