Lua in the bootloader

Pedro Arthur bygrandao at gmail.com
Thu Sep 25 01:19:08 UTC 2014


Hi,
I've done some updates about the issues (1,2, 4, 6, 8) reviewed. I would
like you to
 review these changes, following is my wiki page updated and the files
changed.
wiki <https://wiki.freebsd.org/SummerOfCode2014/LuaLoader#New_milestones>
head/sys/boot/lua/core.lua
<https://socsvn.freebsd.org/socsvn/soc2014/pedrosouza/lua_loader/head/sys/boot/lua/core.lua>
head/sys/boot/lua/menu.lua
<https://socsvn.freebsd.org/socsvn/soc2014/pedrosouza/lua_loader/head/sys/boot/lua/menu.lua>
head/sys/boot/lua/screen.lua
<https://socsvn.freebsd.org/socsvn/soc2014/pedrosouza/lua_loader/head/sys/boot/lua/screen.lua>

Thanks,
Pedro.

2014-08-25 20:13 GMT-03:00 Pedro Giffuni <pfg at freebsd.org>:

>
> On 08/25/14 01:27, Jordan Hubbard wrote:
>
>> ...
>>
>>> The limitation of the dictionary and the size of the stack isn't the
>>> main reason why I would prefer lua over forth.  Why do we need to subject
>>> ourselves to a stack based language in 2014?  The very limited number of
>>> people hacking on the Forth boot loader on FreeBSD might have a different
>>> opinion, but the language is so arcane that I fail to see why we shouldn't
>>> replace it.
>>>
>> Again, no disagreement, though I do wonder how many Lua programmers
>> FreeBSD has that will be able to hit the ground running as a result of this
>> evolution.  Anyone?  Raise your hands!   I can’t raise mine - I’ve never
>> used Lua. :)
>>
>> - Jordan
>>
>
> One one hand we have Forth which seems to be under-appreciated. I would
> think that it is still better than nothing, but then nothing is what other
> people use and they are not complaining (perhaps because they don't know
> what they are missing? I don't know).
>
> On the other hand there is Lua: If we do a quick look in the net for Lua
> related code we can find many examples. It seems like there is a new
> generation of game developers that are very fond of Lua, to the point that
> it is more popular than Python in gaming. Other than Angry Birds, I am also
> seeing Lua embedded in Apache httpd, Trafficserver, VLC, there is even a
> Forth implemented in Lua! To put it someway: Lua absolutely looks better
> than forth in your resume.
>
> FWIW, although somewhat oldish, this looks like an interesting thing to
> play with
> http://lua-cui.sourceforge.net/
>
> And there's also this:
> https://code.google.com/p/llvm-lua/
>
> No equivalents for Forth, AFAICT.
>
> This said, while Lua seems to be powerful and exciting, it is not the
> mighty thing we want everywhere. Apparently Grub2 at some point embedded
> Lua and later reverted it. NetBSD introduced Lua in their kernel but
> apparently has found no use for it. DragonFly's installer had an old Lua
> backend that they removed (they also removed bootforth very early).
>
> Options are good, I welcome the Lua option and I will love to see how far
> it goes but let's not get too excited about the imminent death of Forth
> just yet. Ultimately, being Devin the driving force behind the bootloader
> enhancements, I think he is in the best position to choose.
>
> Pedro.
>


More information about the freebsd-hackers mailing list