News for hackers. Stuff that matters.
Re:Why does OpenBSD still include Perl in its base installat... by danieldk on Saturday May 30, 2020 @09:09AM (#23360909)
I have never programmed Lua, but it also seems to fit the bill fairly well.

- Acceptable license? MIT

- you need something that builds everywhere. It probably does? At least it compiles with Turbo C 1.0.

- Modicum of security: probably.

Lua is also small compared to Perl, is easily embeddable, and seems to have a sane syntax compared to Perl.

I do understand why they use Perl though, probably more OpenBSD developers/users are familiar with it.

Re:Why does OpenBSD still include Perl in its base installat... by heinrichhartman on Saturday May 30, 2020 @09:33AM (#23361053)
Standard library is another factor. Lua does not come with any batteries. Even sockets are an external dependencies. So you would need to ship (and maintain) a lot of libs.
Re:Why does OpenBSD still include Perl in its base installat... by tyingq on Saturday May 30, 2020 @09:23AM (#23360983)
I suspect they would need the lua-posix extension, which appears to be maintained by a fairly small number of people. Lua doesn't have some basic stuff they would want, like stat(), chmod(), sleep().

Edit: Sort of makes me wonder why a VERY C-like, small, dynamically typed, scripting language never emerged. Squirrel is kind of close, but not quite what I mean.

Re:Why does OpenBSD still include Perl in its base installat... by thesuperbigfrog on Saturday May 30, 2020 @09:48AM (#23361171)
>> Sort of makes me wonder why a VERY C-like, small, dynamically typed, scripting language never emerged.

Csh (https://en.wikipedia.org/wiki/C_shell) was the de facto standard shell on many Unix systems and still is widely used.

However, it has some issues:

http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/

https://www.grymoire.com/Unix/CshTop10.txt

Re:Why does OpenBSD still include Perl in its base installat... by trasz on Saturday May 30, 2020 @11:01AM (#23361653)
That might me the direction FreeBSD follows. It started with integrating Lua into the bootloader, replacing Forth. There’s now also the userspace flua(1) interpreter, used in a few places in the build system, IIRC.
Re:Why does OpenBSD still include Perl in its base installat... by kevans91 on Saturday May 30, 2020 @11:14AM (#23361727)
Generally- so far, flua only drives the generation of the various files we derive from syscalls.master.

There's been some WIP to also use it for some pkgbase stuff, as well as an ldconfig lua script for use in post-install scripts now that pkg supports post-install.lua.

I've had my eye on a couple of other components that could use a rewrite with flua. A new flua-based replacement for kernel config(8) could be quite excellent, for instance.