r/lua • • Apr 01 '26

Discussion Should i Switch to Lua?

So I made This Post About programming and learning C, to be exact

So i Started Reading "The C Programming Language" Book, i finished ch1 and it seems nice, but even though i did specify in the Post that i hate python and it's CRINGE, most comments are "learn python bro." and then i started Learning python, i did start making some stuff already like a full on Functional GUI Wallpaper App, with keybinds To swap Wallpapers instantly, and everything works fine even though i don't like Python that much

However, I do like Lua, and I'm also familiar with it as you read the post, and I wanna know if Lua can do this stuff, "can" is kinda the wrong word since you can do anything with any programming language, but I mean as in is it optimal/Easy to do it, with tutorials to help, i do know that it can't reach python's level but i just want to make sure

19 Upvotes

23 comments sorted by

View all comments

Show parent comment

2

u/Athropod101 Apr 01 '26

So, you basically use Lua to glue together a driver’s API (written in C)?

If so, definitely makes sense, since Lua’s whole shine is being a higher-level interface with C.

1

u/ineedanamegenerator Apr 01 '26

The wrapper is C code too to be clear. The wrapper "exposes" Lua functions (or in our case typicallly a read-only(*) global table with functions) to the Lua environment.

(*) We applied some of the eLua patches to reduce RAM footprint. Adding API to Lua costs no extra RAM. We also implemented a custom system so you can run Lua binary code straight from Flash, keeping RAM usage overhead small.

2

u/Athropod101 Apr 02 '26

Very cool!

I’m a robotics student, so my life will pretty much be C, C++, and Rust. Will gladly add Lua to the list if it helps the experience with C.