Testing the Lua kernel interpreter in NetBSD (2021)
unitedbsd.com
unitedbsd.com
The /dev/lua device, which allows interaction with the kernel interpreter: https://man.netbsd.org/lua.4
Presentation: https://www.netbsd.org/gallery/presentations/mbalmer/fosdem2...
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.
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.
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?
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.
Why wouldnt it be mature for OSes
...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.
See https://news.ycombinator.com/item?id=6562611 for a previous discussion.
Edit:See [2] for a presentation at FOSDEM 2012
[1] https://man.netbsd.org/lua.4 [2] https://www.netbsd.org/gallery/presentations/mbalmer/fosdem2...
https://github.com/smherwig/netbsd-sandbox
I really wish it was picked up more. NetBSD has a lot of innovative ideas and it is sad to see it go so forgotten and neglected.
I guess what NetBSD is after (preserving the heritage of the original / early Unixes from which it descends, keeping things simple and stable with minimal requirements while staying as platform agnostic as possible) is a bit of a niche, which also explains the small user base.
More users favor simplicity of usage rather than technical simplicity, run powerful aarch64/amd64 machines rather than exotic / constrained hardware, and are more after the "move fast" model than after long term technical stability and consistency. A large "frenetic" project like Linux simply suits those users better.
The author of the linked post, JuvenalUrbino, contributes a great deal imo.