5 ms·
why not use python as the configuration language then ?
by toolslive 6y ago
why not use python as the configuration language then ?
- deleted 6y ago[deleted]
- CamTin 6y agoOr Scheme :) One of the motivating cases is working around the Nix language's shortcomings: > The Nix package manager: Nix is a declarative package manager using its own language for specifying packages. Nickel is inspired in part by the Nix language, while trying to overcome some of its limitations. It could be used instead of the Nix language. Guix sidesteps this all by just using a proper language with macros for its configuration.
- snicker7 6y agoOr GNU Shepherd. With Lisp-based configuration, you get all the power of imperative programming with all the transparency of declarative programming.
- epage 6y ago- Python isn't sandboxed - What version of Python? They seem to have abandoned semver and are breaking changes across releases. Granted, a Lua-like language would work well for some of these situations. Lua does have the "what version" problem.
- jzoch 6y agoThey didn't abandon semver - semver didnt exist (formally) when python started making breaking changes across releases :)
- toolslive 6y agoI was more talking about things like this: HOME_DIR = '/home/ubuntu' WORK_DIR = HOME_DIR + '/workspace' STARTUP_TIME = time.time() TIMEOUT = 10 * 60 PLUGINS = { 'remoteLogging' : { 'server' : '::1', 'port': 60000 } It's a bad thing if you're doing big side effects at configuration time (creating directories and such) Btw, there used to be a sandbox built in into stock python (Bastion), but they abandoned it (IRC because of security issues)
- joshuamorton 6y agoThis is essentially what starlark does, although a slightly limited subset of python that's less prone to complicated things (no classes, so no multiple inheritance and no need to do what cue does).