Live data from Hacker News

MicroPython, a few years on

kickstarter.com

31–32 of 32 posts

Re: MicroPython, a few years on

#31
post #29

Earlier quoted context omitted.

Look up the Barracuda Application Server. It's commercial but has Lua for dynamic stuff. Runs on reliable microkernels, too. One worth cloning with FOSS.

Lua is on the market for much longer time, and of course it's used in many products. It's my personal belief though that in many places Lua is used, it's used for the lack of alternative. And one of my motives for working on MicroPython is to provide such better alternative. It's the same liberal license, but has that "batteries included" stroke (mind that for Micro Python, there're "coin-sized" batteries included ;-…

Nice explanation. To be clear, I was just citing a use of Lua in embedded rather than promoting it. I don't use it. Since you brought it up... :P

...the advantage was predictability, simplicity, performance, extensability, and tiny memory footprint. The simplicity, predictability, and performance are where Python was a no-go for embedded. So, those are the areas you need to focus on in your implementation to get parity or beat it.

Plus, these traits of Lua are a pre-requisite to high-assurance systems that take things to next level. I've considered a medium or high assurance Python a number of times. Language and implementation were too complex for me to even start. So, I welcome a simpler take on language that others might take to another level.

Re: MicroPython, a few years on

#32
post #30
post #26

Earlier quoted context omitted.

Because some people disagree that Lua is nice language. Lean-ness is questionable, e.g. BrainFuck is much more "lean", so what? MicroPython can be built to the same binary sizes as a typical Lua build, and yet offer more language features. Lua's embedability has stronghold in games, that's where it usually embedded. Embedded hardware systems are a little different beasts. For them, it's helpful to differentiate e.g.…

Lua 5.3 released recently and has integers and bitwise operators. Array access is also O(1) as long as you use integer keys and don't have any "holes" in the array.

That's what I mean - recently. With more than 20-year Lua history, finally recently adding bitwise operations to the core language is move welcomed by Lua community. No talking about the fact that Lua authors still can't find right pattern for modules, so in 5.3 they smashed how it was in 5.2 and few previous versions (and that's not the 1st time IIRC), and welcomed community to redo their homework on that part. That only emphasizing the fact that Lua is intended for adhoc embedding, like, you put it in your game, wrap your game's objects. Anything else - well, depends. Changes in 5.3 is a reason why a lot of community is on 5.2. (Well, to be fair, there's Python2/Python3 split too, MicroPython is Py3.)

> Array access is also O(1) as long as you use integer keys and don't have any "holes" in the array.

Right, if you don't have "holes", if you start array indexing from arbitrary number (it would be cool to start indexing from e.g. Pi btw, too bad Lua isn't orthodox enough to do that ;-) ), then it's O(1). Otherwise, it's phase of moon dependent (pun intended).

Post reply on HN