6 ms·
> Built with Rust. No Electron. No VimScript. No JavaScript. Great. So, what's the extension language? Rust is utterly inadequate to be a scripting language (i
by fouric 5y ago
> Built with Rust. No Electron. No VimScript. No JavaScript.
Great. So, what's the extension language? Rust is utterly inadequate to be a scripting language (if you have to recompile the text editor to reconfigure it, that's a non-starter).
VimScript sucks, but it's better than literally nothing. Emacs Lisp is weird, but powerful. Python is great and everyone knows it. Lua is small, simple, blindingly fast, and literally designed to be embedded in compiled projects.
Why is there no mention of extensions or extensibility?
- Buttons840 5y agoWhile we're on the topic, if the perfect editor existed, what extension language do you think it would use?
- tristan957 5y agoPresent a C-API so that you could write extensions in any language assuming someone wrote bindings.
- Buttons840 5y agoWhat happens when I start such an editor? It starts the basic editor and then it spins up 15 other language environments / interpreters to run the extensions?
- tomcatfish 5y agoIf that's what all your usecase's developers think is best, sure.
- samus 5y agoYeah, why not? If implemented correctly, this should ensure that the user interface is always snappy because all the slow parts (language servers, build systems, search, embedded applications) would be in backends. Modern multi-core systems are especially well-suited to such an architecture. The biggest issue would be fragmentation of the extension ecosystem. The ecosystem would be split along implementation languages, which is an altogether disadvantegeous dimension.
- fouric 5y agoI think that the perfect editor would use the perfect extension language...which, sadly, does not exist. As a Lisp+Emacs user, I'm biased towards elisp, but it's definitely not perfect, having multi-decade-old baggage that holds it back. Lua has a beautiful design that is geared toward embedding, but lacking metaprogramming capabilities and things like optional typing. Python's design is ugly in many ways that the other two aren't, but it's more featureful than either of them and doesn't have elisp's warts. JavaScript has a more elegant design than Python, but a bad rep and a community that is borderline averse to performance. There is no perfect extension language, and I'm convinced that, for fundamental reasons, there can never be. But, I'll take an imperfect language (again, I'm biased, but I'm very bullish on a Lispy and Lua-y stuff) over none at all.
- rhabarba 5y agoCommon Lisp is awesome for that. (But why would you need to extend the perfect editor?)
- flukus 5y agoI really like the way kakoune (https://github.com/mawww/kakoune https://github.com/mawww/kakoune) handles it, the editor doesn't have any scripting as such, it has an "API" in the form of pipes and environment variables that can be used by shell scripts or tools written in any language. Unix is the IDE. I just could never get my head around the key bindings with kak.
- meetups323 5y agoThe core may be written in Rust, but there's nothing stopping them from writing an extension host in any language they want.
- archseer 5y agoThe landing page is just something I threw together in an hour so it a bit joke-y and doesn't convey everything -- I'd like to implement some form of scripting (either via wasm, gamelisp or lua) down the road, definitely. I was waiting a bit to see if Grain or Assemblyscript would mature a bit more, but I'm also at the stage where I'm still adding core features so there wasn't any time to focus on scripting yet. I posted this on r/rust to get some feedback, definitely wasn't prepared to expose it to HN yet.
- exDM69 5y agoIs scripting really necessary in a text editor? I have been using vanilla Vim with no plugins for years now, and I do have a config file but no plugins or anything. I was driven away from Kakoune by the "clever" way it uses shell for scripting, and some basic functionality needs scripts. Pretty cool but not for me. Given a built-in language server and syntax coming from tree-sitter, that already covers almost everything I need from my $EDITOR. The only other thing I need is the ability to open compiler error log and jump to locations.
- tux1968 5y agoI'm sure you're not saying that your specific needs are representative of everyone who might be interested in using this editor. It's much easier to put customization tools in the hands of developers than to anticipate every legitimate need they may have in an editor.
- exDM69 5y agoThe thing is that editor scripting interfaces (vimscript in particular) kinda suck. I'd much rather have the essentials as built-in features in the editor. For example, surround.vim is kinda nice feature but it doesn't play nice with undo and repeat. Most text editor scripting add-ons fall into two categories: 1) core editing features (like surround.vim) or 2) bringing IDE-like features to the editor. Things that fall under category 1 generally work better when they're implemented in the editor core. Things that fall under category 2 could mostly be implemented outside the editor, e.g. using tmux key bindings to open a new window to run the compiler in and then send the output back to the editor. I don't really want the editor to have a terminal emulator and windowing system to launch the editor in. There are plenty of proper IDEs out there, there are plenty of scriptable editors out there which have (mostly half-baked) scripted IDE-like features out there, as well as bare bones editors with no scripting. I'm not gonna argue one is better than the other, but there's no reason every editor should have a scripting interface in it. I have used programming tools in every category and they all have their merits. I had a fully pimped up Vim setup with lots of plugins but I eventually abandoned them as they were more trouble than they were worth and now I have a very bare bones setup with minimal customization. So yeah, I don't think scripting is an essential feature in a text editor, and I'd much rather see the effort spent core editor features polished than a scripting interface. As for "my specific needs", I need a good text editor first. I've used about a half dozen different programming languages in the past year, and no editor out there would handle all the "integrated" features to all of them gracefully without a lot of customization.
- cies 5y ago> So, what's the extension language? Rust is utterly inadequate to be a scripting language Here's a list of dyn langs that fit well with Rust: https://arewegameyet.rs/ecosystem/scripting/ https://arewegameyet.rs/ecosystem/scripting/
- tzury 5y agoany > WASM?