Live data from Hacker News

Lua beats MicroPython for embedded devs

embedded.com

1–10 of 87 posts

Re: Lua beats MicroPython for embedded devs

#2
Lua is just a much simpler language at heart.

Python does have the 'there should be one, preferably only one, way to do it' mantra, but to me it utterly fails at that, and is in fact a bit of a 'kitchen sink' or 'armchair' language.

That is it's strength in some ways, it's easy and approachable, and has more libraries than perhaps any other language, so you can usually get something working fairly quickly.

But it's not so suited to sparse environments. You can't easily turn a plump armchair with automatic footrests and telescoping side-tables into a plywood Eames.

Re: Lua beats MicroPython for embedded devs

#3
post #2

Lua is just a much simpler language at heart. Python does have the 'there should be one, preferably only one, way to do it' mantra, but to me it utterly fails at that, and is in fact a bit of a 'kitchen sink' or 'armchair' language. That is it's strength in some ways, it's easy and approachable, and has more libraries than perhaps any other language, so you can usually get something working fairly quickly. But it's n…

Python is easy. Lua is simple.

The problem of "easy" is that it implies hidden complexity for its magic. The problem of "simple" is that it requires more work from its users.

Re: Lua beats MicroPython for embedded devs

#4
What’s the dev experience actually like for serious Lua? I’ve only used it for some basic neovim configuration. The dynamicism and lack of type hinting in Python that was the norm when I started having to review professional code, after transitioning from pure mathematics, was a major cognitive blocker for me. With a math paper I could typically skim the first few pages to map the author’s particular symbology (if non-standard) and know exactly what was being expressed. I could never do that with untyped code.

Re: Lua beats MicroPython for embedded devs

#5
When I decided to create a game engine where the game could be entirely scripted in a scripting language, I was choosing between JavaScript (QuickJS), Python (Boost.Python), and Lua (Sol2).

The ease of embedding Lua, even with a C++ wrapper, is incredible. With little effort, I now have something I consider “ready”.

Not to mention, it’s a very lightweight VM.

https://github.com/willtobyte/carimbo

Re: Lua beats MicroPython for embedded devs

#8

is anyone "serious" using micropython or lua for embedded work?

The embedded world is really vast. If it's something safety critical, regulations won't allow it. But the regulations say nothing about all the test rigs you'll be building. IoT is another domain where people do whatever they find convenient.

Re: Lua beats MicroPython for embedded devs

#9
post #7

> [bolded] Lua isn’t just a high-level language. It’s an embedded dev strategy. I find it difficult to take any writing seriously when it uses phrases like this.

This is just an ad in a trade rag masquerading as an article or something. It's an ad for that Xedge Lua framework.
Post reply on HN