5 ms·
Why? The properties of lisp make it suitable for both a config file, and an extension language. It can be easily embedded into existing languages and is extreme
by CooCooCaCha 3y ago
Why? The properties of lisp make it suitable for both a config file, and an extension language. It can be easily embedded into existing languages and is extremely flexible.
- zozbot234 3y agoTuring-completeness in a config file is an anti-pattern. Write an external program to generate the config file instead.
- NeutralForest 3y agoWhy? 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.
- Zambyte 3y agoPutting arbitrary bounds on how people use their computers is an anti-pattern.
- dietr1ch 3y agoRight, but his concern about security is not just to restrict how you use your computer, but to try to keep it safe in a manageable way. However, the current state of guarantees around it is not at the point where Turing-completeness is the biggest issue. You can have a simple config, but the rest of the system is still unverifyiable and running unknown blobs. I think the reasonable way out of it is through restricted capabilities. We won't get a fully verifyiable system we can inspect anytime soon. Probably not before the dark days of mandatory and somewhat provable ad impressions.
- deleted 3y ago[deleted]
- treyd 3y agoBut then how do you write custom key handlers?
- dietr1ch 3y agoThis is why I always only put finite memory in my computers.