News for hackers. Stuff that matters.
Re:dhcpleased(8) and resolvd(8) enabled in base, replacing d... by xyzzy_plugh on Saturday July 17, 2021 @09:20PM (#27870094)
> In the process I pulled in a javascript dependency via policykit, which is giving me pause and I am re-evaluating if my approach is correct here.

To be fair, policykit is great. It solves a real problem (namely is this user allowed to peform this action, which traditional POSIX permissions do not solve in a portably) in a very sane way that is totally optional to opt in to.

Should polkit use a different, turing complete language than JavaScript? I don't know, probably, but it's not an awful choice. There is definitely more developer literacy for JS than, say, Lua or some other bespoke monstrosity they could've picked instead.

Re:dhcpleased(8) and resolvd(8) enabled in base, replacing d... by chmod775 on Saturday July 17, 2021 @10:54PM (#27870474)
> Lua or some other bespoke monstrosity

Lua is definitely the opposite of 'bespoke monstrosity'. It's pretty much the intersection of tiny interpreter, fast execution, and simple language.

Re:dhcpleased(8) and resolvd(8) enabled in base, replacing d... by xyzzy_plugh on Sunday July 18, 2021 @09:46PM (#27878416)
Apologies if I mistyped this, Lua is not remotely a monstrosity. It's great! But I don't think it would be appropriate here, and I think more developers can grok JS in this day and age.
Re:dhcpleased(8) and resolvd(8) enabled in base, replacing d... by someperson on Saturday July 17, 2021 @10:23PM (#27870365)
Doesn't POSIX and Linux Standard Base already mandate certain scripting languages to be preinstalled, such as Python?
Re:dhcpleased(8) and resolvd(8) enabled in base, replacing d... by thristian on Saturday July 17, 2021 @10:54PM (#27870477)
I've heard a rumour that POSIX mandates that Perl be installed, although I haven't been able to substantiate it.

POSIX-described Turing-complete interpreters include at leat the Bourne shell, awk, and sed, none of which you probably want to use for implementing a security policy.

Apparently LSB 5.0 mandates[1] both Perl (5.8) and Python (2.4), but that won't pacify anyone with an axe to grind about applications making Linux-specific assumptions.

[1]: https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Languages...

Re:dhcpleased(8) and resolvd(8) enabled in base, replacing d... by cesarb on Sunday July 18, 2021 @12:31AM (#27870768)
> Apparently LSB 5.0 mandates[1] both Perl (5.8) and Python (2.4)

Wow, that didn't age well. That document actually says Python "2.4.2 or greater" and Perl "5.8.8 or greater", which doesn't help if the installed interpreters are Python 3.10 and Perl 6.c (2018.06), since both are greater than the specified versions but incompatible with them. Even if it had specified the major release (that is, Python 2.x greater than 2.4.2 and Perl 5.x greater than 5.8.8), that wouldn't help once those major releases are no longer maintained.

Re:dhcpleased(8) and resolvd(8) enabled in base, replacing d... by dale_glass on Sunday July 18, 2021 @06:05AM (#27871820)
Perl 6 isn't really a thing anymore.

Python3 requires some code changes, but on the whole is the same language.

Perl 6 was intended to be an upgrade from 5, but over time developed into a completely new language that shared stylistic similarities to Perl 5. Perl 6 can't be compatible with Perl 5 to any large extent because XS isn't a thing anymore, so any modules that had binary parts to them can't be easily ported.

These days Perl 6 got renamed to "Raku", to signify that it's its own, independent language.

The Perl 5 line continues to exist and apparently plans for the next major version to be Perl 7.

Re:dhcpleased(8) and resolvd(8) enabled in base, replacing d... by gnubison on Monday July 19, 2021 @12:03AM (#27879129)
> I've heard a rumour that POSIX mandates that Perl be installed, although I haven't been able to substantiate it.

It’s not: https://shellhaters.org