News for hackers. Stuff that matters.
Re:Ylang: Universal language for eBPF, Stap+, GDB, and more by thorwawayrus53 on Monday January 31, 2022 @04:31AM (#30146168)
I don't understand the hype behind lua. I tried scripting vlc plugin and its very painful. No so easy to understand.
Re:Ylang: Universal language for eBPF, Stap+, GDB, and more by rscho on Monday January 31, 2022 @06:06AM (#30146746)
I think the hype is mostly excellent C integration. Night and day compared to Python.
Re:Ylang: Universal language for eBPF, Stap+, GDB, and more by kragen on Monday January 31, 2022 @05:05AM (#30146401)
What are you comparing it to?
Re:Ylang: Universal language for eBPF, Stap+, GDB, and more by thorwawayrus53 on Monday January 31, 2022 @05:50AM (#30146664)
Python, JavaScript.
Re:Ylang: Universal language for eBPF, Stap+, GDB, and more by kragen on Monday January 31, 2022 @06:12AM (#30146783)
Lua's a little more opaque than Python or JS, a little more flexible, a little more bug-prone, and a lot simpler. But those aren't the reasons VLC and Wireshark and WoW use Lua instead of Python or JS; they use it because it's enormously less costly to embed. Imagine you decide to switch from Lua to Python for your game. Now you have:

- 3600 kilobytes of bloat instead of 110;

- a huge and bug-prone ABI to deal with to make sure Python doesn't inject memory leaks;

- Python assholes publicly shaming you for using an unfashionable version of Python.