5 ms·
Why? Emacs has Emacs Lisp and Neovim has Lua, it's great to be able to configure, write plugins and helper functions, in the same language.
by NeutralForest 3y ago
Why? Emacs has Emacs Lisp and Neovim has Lua, it's great to be able to configure, write plugins and helper functions, in the same language.
- dboreham 3y agoIf you're target audience are not progmmers versed in your wacky config language, it's a tremendous foot gun. Also a huge security hole.
- goku12 3y agoIt's possible to write declarative configuration in scheme. You can see that in Guix. Eventually someone will write a macro to create something purely declarative, like use-package in emacs. > it's a tremendous foot gun I've never seen this footgun in action with elisp in Emacs, lua in neovim or vimscript in vim. Is this anything more than hypothetical? > Also a huge security hole. If you put an editor in a position where its Turing-complete configuration is a security hole, you'll be in a lot more trouble than you imagine. Editors by definition are meant to modify stuff in a filesystem. With those privileges, it wont matter what the config language is. The plugins, even in webassembly, will cause serious issues.
- mtlmtlmtlmtl 3y agoIt's a text editor specifically made for writing code.
- nikolay 3y agoSo, if I use an editor config off the Internet, I need to inspect it for malware, because it's code, not configuration? Yes, there are languages for configuration - Jsonnet, Starlark, Dhall, which are execution safe - unlike Lisp and Lua!
- mtlmtlmtlmtl 3y agoDo you inspect all the code you run on your computer? You probably got all of it off the internet, except for the firmware blobs you couldn't even inspect if you wanted to. And hell, even an "execution safe" configuration can contain malware if there's a parser bug. At some point you have to choose who to trust and not to trust to write code that runs on your system, and all you can really do is try to verify that they did in fact write it, and run untrusted code in isolation from sensitive data.
- nikolay 3y agoI install software from credible sources. I do reuse configs from dotfiles off the Internet - just like most people do. There are way more configs out there than there are software projects.
- pixel8account 3y agoYou already face the same threat then. Many, if not most, nontrivial programs have at least one way to escalate to arbitrary code execution from config. For example sway has exec, basically any useful editor has "on save actions", etc. No need for a Turing complete language when you can just shell out.
- xigoi 3y agoWhy would you use an entire config off the internet?
- dietr1ch 3y agoWhenever I update my spacemacs config+packages I'm kind of doing that, there's no way you can honestly convince yourself that you thoroughly reviewed everything, but I guess the same applies to when you update your boring text editor's binary and forget to opt-out to some new feature you may not want as your old config might not mean the same thing now. I think the real problem is around being able to trust your entire system. It'd help much more to have a better capability system so my rouge text editor can't upload my photos or credit card info from my browser profile to the internet, but today things kind of work because of tons of well intended and behaved people collaborating.
- bobbyskelton41 3y agoFWIW, the plugin system is supposed to have sandboxing as well.
- Zambyte 3y agoScheme has sandboxing in the form of environments. You can evaluate[0] / load[1] untrusted code by applying an environment specifier[2] with all of the symbols you trust the code to use. For example, if you don't want the code to be able to use IO, simply don't add (scheme read) and (scheme write) to the environment that you eval / load the code with. [0] https://index.scheme.org/filterset/r7rs_small/%28scheme%2520eval%29/eval https://index.scheme.org/filterset/r7rs_small/%28scheme%2520... [1] https://index.scheme.org/filterset/r7rs_small/%28scheme%2520load%29/load https://index.scheme.org/filterset/r7rs_small/%28scheme%2520... [2] https://index.scheme.org/filterset/r7rs_small/%28scheme%2520eval%29/environment https://index.scheme.org/filterset/r7rs_small/%28scheme%2520...