Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

And for what reason to choose lua over using languages more matured on system programming like Rust..?


Not sure if you're being serious or if this is one of those silly, "why not Rust" responses that are becoming a trope...

Read the article, and you'll see the most glaring reason: Rust doesn't have an interpreter. Also, Rust isn't very portable, so that'd exclude a number of platforms on which NetBSD runs. Add that Rust is not lightweight in the least, and you can see why not Rust.

Also, Lua is much, much more relevant for uses like this, and suggesting that Rust is more mature is just... well, wrong. Lua has been around for ages and has matured quite well.


> Not sure if you're being serious or if this is one of those silly, "why not Rust" responses that are becoming a trope...

I am being serious, and no I never used Rust in my life, but I do know many OSes trust it and are gradually adopting it

> Read the article, and you'll see the most glaring reason: Rust doesn't have an interpreter.

Are you sure we are pointing to the same article? Where does it say anything about that at all?

for the entire small article, the author just plays around with a kernel module that implements lua interpreter somehow with no context presented at all by the author of why there is a kernel module for lua in the netbsd, and that is my doubt.

why is it there rather than being used normally on user-space? what is netbsd goal with integrating lua on the kernel? And so far nobody has answered me properly.

> Also, Lua is much, much more relevant for uses like this, and suggesting that Rust is more mature is just... well, wrong. Lua has been around for ages and has matured quite well.

Mention me a _serious_ operating system using lua on their kernel side and I'll acknowledge that last sentence.

Be sure we are talking on the same page, we are talking on the context of being used for programming operating systems, is lua mature for that domain?


> Mention me a _serious_ operating system using lua on their kernel side and I'll acknowledge that last sentence.

NetBSD, of course.

> Be sure we are talking on the same page, we are talking on the context of being used for programming operating systems, is lua mature for that domain?

As https://www.lua.org/about.html notes,

> Lua is embeddable

Lua is specifically designed to be embedded into other things in order to make them easily extensible.


Lua is pretty popular for scripting in video games

Why wouldnt it be mature for OSes


> And for what reason to choose lua over using languages more matured on system programming like Rust..?

...you wanna talk about mature? Rust hit 1.0 in 2015 (https://blog.rust-lang.org/2015/05/15/Rust-1.0.html). Lua hit 1.0 in either 1993 or 94 (https://www.lua.org/history.html is a little fuzzy). As for reasons why Lua is suitable, and Rust is not even remotely suitable for anything core to NetBSD, the obvious one is platform support; NetBSD supports basically every platform to ever be capable of running a unix-like - https://netbsd.org/ports/ has a list. Rust supports... some of these, yes, but only a tiny fraction. Thus, Rust is wholly unsuitable (at this time) for any core component of NetBSD.


I expect it's because it's an interpreted, scripting style language. Doesn't require a compile step, is meant to be ad-hoc evaluated, etc.

Also the Lua runtime is very small and its implementation readable, simple, and easily embedded.

I think of Lua as kind of filling the niche that BASIC did in the 80s.


Then why not BASIC ?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: