Suggestion: Replace Perl with Lua in the OpenBSD Base System

classic Classic list List threaded Threaded
94 messages Options
12345
Reply | Threaded
Open this post in threaded view
|

Suggestion: Replace Perl with Lua in the OpenBSD Base System

ansimita
Hi,

I'd like to bring up the following suggestion:

Would it be desirable for the OpenBSD project to replace Perl with Lua
in the base system? A smaller base afforded to by Lua will reduce the
attack surface and complexity of the OpenBSD project as a whole.

  The source contains around 24000 lines of C. Under 64-bit Linux, the
  Lua interpreter built with all standard Lua libraries takes 247K and
  the Lua library takes 421K. - https://www.lua.org/about.html

  Lua is free open-source software, distributed under a very liberal
  license (the well-known MIT license).
  - https://www.lua.org/about.html

I recognize that this will involve a massive multi-year undertaking and
I'd like to be part of the effort if it were to arise.

Cheers,
ansimita
Reply | Threaded
Open this post in threaded view
|

Re: Suggestion: Replace Perl with Lua in the OpenBSD Base System

Martin Schröder
Am Di., 31. Dez. 2019 um 01:08 Uhr schrieb <[hidden email]>:
> Would it be desirable for the OpenBSD project to replace Perl with Lua
> in the base system? A smaller base afforded to by Lua will reduce the

IMNSHO no.

You are welcome to fork your OpenLuaBSD project, though.

Looking forward to your first release.

Best
    Martin

Reply | Threaded
Open this post in threaded view
|

Re: Suggestion: Replace Perl with Lua in the OpenBSD Base System

Theo de Raadt-2
In reply to this post by ansimita
<[hidden email]> wrote:

> A smaller base afforded to by Lua will reduce the
> attack surface and complexity of the OpenBSD project as a whole.

1) I think that is a baseless and irrelevant claim.

2) No.


Reply | Threaded
Open this post in threaded view
|

Re: Suggestion: Replace Perl with Lua in the OpenBSD Base System

ansimita
Hi Theo,

Noted.

Thanks for the consideration,
ansimita

Dec 31, 2019, 00:15 by [hidden email]:

> <[hidden email]> wrote:
>
>> A smaller base afforded to by Lua will reduce the
>> attack surface and complexity of the OpenBSD project as a whole.
>>
>
> 1) I think that is a baseless and irrelevant claim.
>
> 2) No.
>

Reply | Threaded
Open this post in threaded view
|

Re: Suggestion: Replace Perl with Lua in the OpenBSD Base System

Edgar Pettijohn III-2
In reply to this post by ansimita

On 2019-12-30 18:07, [hidden email] wrote:

> Hi,
>
> I'd like to bring up the following suggestion:
>
> Would it be desirable for the OpenBSD project to replace Perl with Lua
> in the base system? A smaller base afforded to by Lua will reduce the
> attack surface and complexity of the OpenBSD project as a whole.
>
>    The source contains around 24000 lines of C. Under 64-bit Linux, the
>    Lua interpreter built with all standard Lua libraries takes 247K and
>    the Lua library takes 421K. - https://www.lua.org/about.html
>
>    Lua is free open-source software, distributed under a very liberal
>    license (the well-known MIT license).
>    - https://www.lua.org/about.html
>
> I recognize that this will involve a massive multi-year undertaking and
> I'd like to be part of the effort if it were to arise.
>
> Cheers,
> ansimita


I like lua as a whole, however it isn't extremely useful for system
administration tasks.

Which I believe is likely the reason for Perl's inclusion.


Edgar

Reply | Threaded
Open this post in threaded view
|

Re: Suggestion: Replace Perl with Lua in the OpenBSD Base System

Xiyue Deng
In reply to this post by ansimita
<[hidden email]> writes:

> Hi,
>
> I'd like to bring up the following suggestion:
>
> Would it be desirable for the OpenBSD project to replace Perl with Lua
> in the base system? A smaller base afforded to by Lua will reduce the
> attack surface and complexity of the OpenBSD project as a whole.
>
>   The source contains around 24000 lines of C. Under 64-bit Linux, the
>   Lua interpreter built with all standard Lua libraries takes 247K and
>   the Lua library takes 421K. - https://www.lua.org/about.html
>
>   Lua is free open-source software, distributed under a very liberal
>   license (the well-known MIT license).
>   - https://www.lua.org/about.html
>
> I recognize that this will involve a massive multi-year undertaking and
> I'd like to be part of the effort if it were to arise.
>
> Cheers,
> ansimita
I'm not an OpenBSD developer.  But as we are on this subject, IMHO if
Perl is to be replaced it's better to be Python to take its place, which
also has a very liberal license (BSD-style PSFL) and more importantly
has a massive user base.

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Suggestion: Replace Perl with Lua in the OpenBSD Base System

Roderick
In reply to this post by Theo de Raadt-2

On Mon, 30 Dec 2019, Theo de Raadt wrote:

> <[hidden email]> wrote:
>
> > A smaller base afforded to by Lua will reduce the
> > attack surface and complexity of the OpenBSD project as a whole.
>
> 1) I think that is a baseless and irrelevant claim.
>
> 2) No.

It is not about the claim, he is trying to sell lua, because lua should be
everywhere, also in the bootloader (they bloated FreeBSDs bootloader by
substituting forth with lua), also in tex, you are forced to install
luatex with the bloat of "texlive".

Lua means moon, from latin luna. Lua phanatics should be called lunatics.

But there is also some python phanaticism. It is a scripting language
more, the only new (horrible) thing seems to be that indentation has
a meaning, it contains the whole tcl/tk as "tkinter"  that alone
should be enough for reasonable scripting.

Rodrigo.

Reply | Threaded
Open this post in threaded view
|

Re: Suggestion: Replace Perl with Lua in the OpenBSD Base System

Marc Espie-2
In reply to this post by ansimita
Removing perl from base would be very painful.

I don't fancy rewriting all the perl tools in something else (specifically,
most of the ports and package infrastructure)

lua would definitely NOT be appropriate for that. The only half valid
candidate would be python.

Contrary to what some people might think, the tools in question won't be
easier to understand and manage if written in another language.

Reply | Threaded
Open this post in threaded view
|

Re: Suggestion: Replace Perl with Lua in the OpenBSD Base System

Theo de Raadt-2
Marc Espie <[hidden email]> wrote:

> Removing perl from base would be very painful.
>
> I don't fancy rewriting all the perl tools in something else (specifically,
> most of the ports and package infrastructure)
>
> lua would definitely NOT be appropriate for that. The only half valid
> candidate would be python.
>
> Contrary to what some people might think, the tools in question won't be
> easier to understand and manage if written in another language.
>

Contrary to what you think, the original proposal didn't come out of
a process called thinking.

Reply | Threaded
Open this post in threaded view
|

Re: Suggestion: Replace Perl with Lua in the OpenBSD Base System

Stuart Longland
In reply to this post by Marc Espie-2
On 31/12/19 3:54 pm, Marc Espie wrote:
> Contrary to what some people might think, the tools in question won't be
> easier to understand and manage if written in another language.

I'm of the opinion that "if it ain't broken, don't fix it".  What is
"broken" about Perl that we're trying to fix with a replacement (whether
it be Lua, Python, NodeJS, Ruby, PHP, TCL, alb, BASIC … or something else)?
--
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.

Reply | Threaded
Open this post in threaded view
|

Re: Suggestion: Replace Perl with Lua in the OpenBSD Base System

danieljboyd
In reply to this post by Theo de Raadt-2
As one of the few remaining people out there who considers perl to be their favorite language—starting to wonder if it’s just me and Larry Wall at this point—I’d like to say that perl should stay in base on its merits, all the perl-based system tools notwithstanding.

I decided learn perl because of OpenBSD back in the day. I was a primarily a java programmer (to be clear: not out of any affinity for Java) and had decided to use OpenBSD as my workstation OS. I quickly discovered that the Java development tools I used (netbeans, eclipse, etc.) weren’t all that robust in OpenBSD (old builds, crashy). So, I figured, OpenBSD users must not be java programmers and I set out figuring out what language they did use... by looking to see which languages were in base.

Fast forward like 15 years and I’m now a perl/vim guy (a far cry from java/NetBeans!) and I couldn’t be happier. While I tolerated java, I actually really like perl. And the more I learn of it, the better i like it. I think a lot of people just haven’t really taken the time to learn perl’s subtleties and true perlish coding conventions. It’s really wonderful once you know it well.

Ok— rant over. Carry on.

Sent from my iPhone

> On Dec 31, 2019, at 12:11 AM, Theo de Raadt <[hidden email]> wrote:
>
> Marc Espie <[hidden email]> wrote:
>
>> Removing perl from base would be very painful.
>>
>> I don't fancy rewriting all the perl tools in something else (specifically,
>> most of the ports and package infrastructure)
>>
>> lua would definitely NOT be appropriate for that. The only half valid
>> candidate would be python.
>>
>> Contrary to what some people might think, the tools in question won't be
>> easier to understand and manage if written in another language.
>>
>
> Contrary to what you think, the original proposal didn't come out of
> a process called thinking.
>

Reply | Threaded
Open this post in threaded view
|

perl popularity inside openbsd community? (Re: Suggestion: Replace Perl ...)

Marc Chantreux
On Tue, Dec 31, 2019 at 06:57:02AM -0600, Daniel Boyd wrote:
> As one of the few remaining people out there who considers perl to be
> their favorite language—starting to wonder if it’s just me and Larry
> Wall at this point—I’d like to say that perl should stay in base on
> its merits, all the perl-based system tools notwithstanding.

one of the few remaining people ? is it so ? i really wonder ...

Perl bashing is around the IT crowd for 20 decades and yet, when i
compare with other dynamic langages:

* perl is the only one who gives me the conciseness and spirit of unix
  tools combined to the power of a dynamic langage (the only close one
  is ruby, the next level is raku, the others look like jokes to me).
  so as openbsd people seems to be confortable with this unix culture,
  i'm inclined to think that perl is popular here.
* CPAN is the best ecosystem to share code (metacpan is just awesome
  compared to the other package sites, tooling is very good as well)
* the popularity of perl around me don't reflect the "perl is dead" moto
  we heard since so many years (yes: there is a decline but it's in
  flavor of compiled langages. the only one who switched to python
  made this choice for money reason)

both perl and openbsd popularities are underestimated just because
they still prefer mailing lists over stackoverflow (or other web
services who try to buzz with some charts) and don't care that much
about marketing. but still: i will be curious to know the perl
popularity in the openbsd community.

regards.
marc

Reply | Threaded
Open this post in threaded view
|

Re: Suggestion: Replace Perl with Lua in the OpenBSD Base System

Christopher Turkel
In reply to this post by danieljboyd
Perl is my favorite language, too. Perl can be gnarly but I love it. I have
zero experience with Lua so I can’t judge it but I’d like Perl to stay in
Base.

On Tuesday, December 31, 2019, Daniel Boyd <[hidden email]> wrote:

> As one of the few remaining people out there who considers perl to be
> their favorite language—starting to wonder if it’s just me and Larry Wall
> at this point—I’d like to say that perl should stay in base on its merits,
> all the perl-based system tools notwithstanding.
>
> I decided learn perl because of OpenBSD back in the day. I was a primarily
> a java programmer (to be clear: not out of any affinity for Java) and had
> decided to use OpenBSD as my workstation OS. I quickly discovered that the
> Java development tools I used (netbeans, eclipse, etc.) weren’t all that
> robust in OpenBSD (old builds, crashy). So, I figured, OpenBSD users must
> not be java programmers and I set out figuring out what language they did
> use... by looking to see which languages were in base.
>
> Fast forward like 15 years and I’m now a perl/vim guy (a far cry from
> java/NetBeans!) and I couldn’t be happier. While I tolerated java, I
> actually really like perl. And the more I learn of it, the better i like
> it. I think a lot of people just haven’t really taken the time to learn
> perl’s subtleties and true perlish coding conventions. It’s really
> wonderful once you know it well.
>
> Ok— rant over. Carry on.
>
> Sent from my iPhone
>
> > On Dec 31, 2019, at 12:11 AM, Theo de Raadt <[hidden email]> wrote:
> >
> > Marc Espie <[hidden email]> wrote:
> >
> >> Removing perl from base would be very painful.
> >>
> >> I don't fancy rewriting all the perl tools in something else
> (specifically,
> >> most of the ports and package infrastructure)
> >>
> >> lua would definitely NOT be appropriate for that. The only half valid
> >> candidate would be python.
> >>
> >> Contrary to what some people might think, the tools in question won't be
> >> easier to understand and manage if written in another language.
> >>
> >
> > Contrary to what you think, the original proposal didn't come out of
> > a process called thinking.
> >
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Suggestion: Replace Perl with Lua in the OpenBSD Base System

Marc Espie-2
In reply to this post by danieljboyd
On Tue, Dec 31, 2019 at 06:57:02AM -0600, Daniel Boyd wrote:
> As one of the few remaining people out there who considers perl to be their favorite language—starting to wonder if it’s just me and Larry Wall at this point—I’d like to say that perl should stay in base on its merits, all the perl-based system tools notwithstanding.

You're definitely not alone, though I also enjoy other languages where perl
falters (long startup time and complexity of linking with libraries mean
I do C and C++ a lot as well)

Reply | Threaded
Open this post in threaded view
|

Re: Suggestion: Replace Perl with Lua in the OpenBSD Base System

Roderick
In reply to this post by Marc Espie-2

On Tue, 31 Dec 2019, Marc Espie wrote:

> lua would definitely NOT be appropriate for that. The only half valid
> candidate would be python.

I am curious to know why tcl, my fovourite scripting lanuage, would
not be a candidate.

I suspect, tcl is being underestimated, and the decission for one
or other scripting language is mostly guided by personal prefferences
and fashion (today python).

Rodrigo

Reply | Threaded
Open this post in threaded view
|

Re: Suggestion: Replace Perl with Lua in the OpenBSD Base System

Marc Espie-2
In reply to this post by Stuart Longland
On Tue, Dec 31, 2019 at 10:45:34PM +1000, Stuart Longland wrote:
> On 31/12/19 3:54 pm, Marc Espie wrote:
> > Contrary to what some people might think, the tools in question won't be
> > easier to understand and manage if written in another language.
>
> I'm of the opinion that "if it ain't broken, don't fix it".  What is
> "broken" about Perl that we're trying to fix with a replacement (whether
> it be Lua, Python, NodeJS, Ruby, PHP, TCL, alb, BASIC … or something else)?

It used to be there was no choice at all.

Back then, perl was already in the base system and running on everything
*including vax*. Python (for instance) not so much. The standard build
definitely requires shared libraries.

We did retire vax, and we no longer have any platform without dynamic
libraries.

As for the license, python's license appears fairly similar to Perl's
artistic license.  I would worry a bit about the strong terms in

6. This License Agreement will automatically terminate upon a material breach of
   its terms and conditions.

for which no equivalent is visible in Perl's license.


You got to remember though that OpenBSD initially had a lot of stuff that
was not BSD licensed (the full toolchain!), but used for building (we got rid
of the fp emulation code fairly early on). Though that has changed on some
platforms (hurray for clang pre-apache license), I suspect there might be
some reticence to importing more stuff that's not strictly under a BSD/MIT
license.

Reply | Threaded
Open this post in threaded view
|

Re: Suggestion: Replace Perl with Lua in the OpenBSD Base System

Theo de Raadt-2
In reply to this post by Roderick
Roderick <[hidden email]> wrote:

>
>
> On Tue, 31 Dec 2019, Marc Espie wrote:
>
> > lua would definitely NOT be appropriate for that. The only half valid
> > candidate would be python.
>
> I am curious to know why tcl, my fovourite scripting lanuage, would
> not be a candidate.
>
> I suspect, tcl is being underestimated, and the decission for one
> or other scripting language is mostly guided by personal prefferences
> and fashion (today python).

Wow, it's a lot like you can't read.

There are no candidates.

Reply | Threaded
Open this post in threaded view
|

Re: Suggestion: Replace Perl with Lua in the OpenBSD Base System

Raul Miller
In reply to this post by Roderick
On Tue, Dec 31, 2019 at 11:46 AM Roderick <[hidden email]> wrote:
> I am curious to know why tcl, my fovourite scripting lanuage, would
> not be a candidate.

If OpenLuaBSD would be a welcome fork, I don't see why OpenTCLBSD
would be any worse.

Doesn't mean anyone wants to write it.

--
Raul

Reply | Threaded
Open this post in threaded view
|

Re: Suggestion: Replace Perl with Lua in the OpenBSD Base System

Theo de Raadt-2
Raul Miller <[hidden email]> wrote:

> On Tue, Dec 31, 2019 at 11:46 AM Roderick <[hidden email]> wrote:
> > I am curious to know why tcl, my fovourite scripting lanuage, would
> > not be a candidate.
>
> If OpenLuaBSD would be a welcome fork, I don't see why OpenTCLBSD
> would be any worse.
>
> Doesn't mean anyone wants to write it.

You are doing it in the wrong order.

First, you need to pay the domainname cabal for a domainname
Then you setup a wiki and relevant mailing lists

That way, it doesn't need to get discussed here.


Reply | Threaded
Open this post in threaded view
|

Re: Suggestion: Replace Perl with Lua in the OpenBSD Base System

danieljboyd
In reply to this post by Marc Espie-2
Certainly, there are situations where perl isn't the best choice. And in
those unfortunate situations, other languages may be considered, however
begrudgingly. :)

I'm curious to know if there are any languages other than C and perl in
use in OpenBSD base.

On Tue, Dec 31, 2019 at 05:39:03PM +0100, Marc Espie wrote:
> On Tue, Dec 31, 2019 at 06:57:02AM -0600, Daniel Boyd wrote:
> > As one of the few remaining people out there who considers perl to be their favorite language—starting to wonder if it’s just me and Larry Wall at this point—I’d like to say that perl should stay in base on its merits, all the perl-based system tools notwithstanding.
>
> You're definitely not alone, though I also enjoy other languages where perl
> falters (long startup time and complexity of linking with libraries mean
> I do C and C++ a lot as well)
>

12345