Results 1 to 10 of 19

Thread: Lua Scripting Support Being Added To NetBSD Kernel

Hybrid View

  1. #1
    Join Date
    Jan 2007
    Posts
    15,133

    Default Lua Scripting Support Being Added To NetBSD Kernel

    Phoronix: Lua Scripting Support Being Added To NetBSD Kernel

    Support for the Lua scripting language is being added to the NetBSD kernel so that it's possible to interact with the BSD kernel's various subsystems using this popular scripting language. With a Lua interpreter being added to the kernel, it's even possible to extend the kernel's subsystems in this scripting language...

    http://www.phoronix.com/vr.php?view=MTMwMTU

  2. #2
    Join Date
    May 2012
    Posts
    868

    Default

    The NetBSD devs noted that they plan to write their nouveau graphics driver in Lua since you don't have to deal with memory leaks any longer, which makes it superior to the Linux implementation. Also parts of ZFS and the audio stack will be ported to Lua for its advanced flexibility and productivity compared to C.

  3. #3
    Join Date
    Dec 2008
    Location
    Creve Coeur, Missouri
    Posts
    402

    Default

    This is actually pretty cool. I just hope they use a fast interpreter or JIT compiler. I have microbenchmarked LuaJIT and was utterly impressed by the speed of the code. It was more often than not faster than GCC or Clang compiled C++.

  4. #4
    Join Date
    Dec 2011
    Posts
    2,107

    Default

    Quote Originally Posted by LinuxID10T View Post
    This is actually pretty cool. I just hope they use a fast interpreter or JIT compiler. I have microbenchmarked LuaJIT and was utterly impressed by the speed of the code. It was more often than not faster than GCC or Clang compiled C++.
    How can Lua (LuaJIT) be so fast?

    Anyone ever wrote a kernel in Lua?

    There is an operating systems such as JNode and JX which are written in Java.
    Singularity, Cosmos and SharpOS which are written in C#.

  5. #5
    Join Date
    Dec 2008
    Location
    Creve Coeur, Missouri
    Posts
    402

    Default

    Quote Originally Posted by uid313 View Post
    How can Lua (LuaJIT) be so fast?

    Anyone ever wrote a kernel in Lua?

    There is an operating systems such as JNode and JX which are written in Java.
    Singularity, Cosmos and SharpOS which are written in C#.
    I personally had no clue why it was so fast, which made myself all the more interested in it. I am guessing that it is just very, very highly optimized for speed. You also have to remember just how small of a language Lua is. Since it is so small, my guess is that it is far easier to optimize each operation. Using the official interpreter often took five minutes to do what LuaJIT did for me in ~16 seconds. For that same benchmark, GCC took about 22 seconds and Clang 26 seconds. If you want the code for my microbenchmarks, ask and I can post it on Pastebin.

    I'm not sure if anyone has written a kernel in Lua, but for a while I was considering doing so myself. I don't think it would be very difficult at all. In fact, it would probably be significantly easier than Java or C#.
    Last edited by LinuxID10T; 02-14-2013 at 11:10 AM.

  6. #6
    Join Date
    Jul 2009
    Posts
    351

    Default

    maybe they can add a web browser and an email client while they are at it

  7. #7
    Join Date
    Nov 2012
    Posts
    620

    Default

    Quote Originally Posted by mark45 View Post
    The NetBSD devs noted that they plan to write their nouveau graphics driver in Lua since you don't have to deal with memory leaks any longer, which makes it superior to the Linux implementation. Also parts of ZFS and the audio stack will be ported to Lua for its advanced flexibility and productivity compared to C.
    You're just kidding, right?

  8. #8
    Join Date
    Jul 2009
    Posts
    351

    Default

    Quote Originally Posted by Pawlerson View Post
    You're just kidding, right?
    They are trying to recreate that "Sun-3" experience because that was the last time anybody used it.

  9. #9
    Join Date
    Jul 2009
    Posts
    351

    Default

    The world of software development is littered with dead projects that died, not because of their technical inferiority, but simply because they could not be maintained. This is why microsoft and Oracle and RedHat deprecate old versions of their systems, it's because the maintenance headache exceeds the revenue. They don't want to fix your bugs because it's not worth it.

    When you have no revenue and a massive maintenance headache, you end up putting the poor beast out of their misery because it's just too painful to go on, the pile of bugs gets too deep.

    BSD relies on gifts and people feeling sorry for them, they have no actual revenue stream, no vendor commitment. They will get no vendor commitment, because the vendor doesn't need to commit, the vendor can just grab a snapshot and leave the project flapping.

  10. #10
    Join Date
    Nov 2011
    Posts
    287

    Default

    I wonder how much of the internals get exposed vs sysfs on linux.
    On one hand this sounds interesting, on the other I wonder about security...drivers in Lua sound interesting, especially from the standpoint of having one driver that works everywhere.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •