In order to have direct function calls, you need to load the plugin's code in your own memory. Which means you expose your own memory to the plugin. Any malicious/buggy plugin could wreak havoc on your program - even managed code doesn't solve that problem in general.
IPC is the natural solution to that - run a process in its own address space and communicate with it via I/O. TCP is not most optimal, but it is uniquous. Same thing with JSON.
In LSP, most of the processing happens in the LSP server anyway - communication overhead between client and server is negligible in comparison to it.
Fault isolation is good, but are the fault isolation benefits worth everything else though?
Windows COM does have a way to run the server out-of-process with a performance cost, and this fact is transparent to the client (if it only uses COM interfaces and not global variables or something). I assume you can even switch between the modes at runtime (with restarting the plugin).
I think this is a very reasonable question to ask. Language servers are certainly a significant source of slowdowns and editor unresponsiveness, and any time you're doing IPC, that's another source of latency and fragility.
My current Zed editor instance has 5 different language servers running, implemented in at least 3 different languages, some of which require a full VM runtime.
Could Zed (written in Rust) host a full .NET runtime to run the Roslyn language server for C#? Could an Electron-based editor? It feels a bit daunting. Plugins could be native shared libraries, but what happens when multiple language plugins all try to initialize huge process-wide runtimes like .NET or the JVM? Even multiple instances of the Python runtime are going to potentially be stepping on each others' toes.
IPC and separate processes is probably the pragmatic solution for now, even though I would love to live in a world where in-process was more of an option.
WASM could be the solution, but would lock language server authors into the subset of programming languages that can be compiled to WASM, and WASM still looks a lot like IPC in practice. (Zed already uses WASM components for its plugins.)
I think you can totally start a .NET Runtime for a plugin. There are windows explorer plugins written in .NET - I know because Raymond Chen analyzed how they broke things :)
If you have freedom then you have the the freedom to make mistakes.
In Windows globals are tightly scoped to a DLL and cannot accidentally cross over, so multiple python interpreters are no problem if the python interpreter is statically linked in each python plugin.
It’s just much easier for an editor to manage a single interface for plugins over having to host a bunch of very large runtimes.
Also, I doubt that you would have a very great time running both .NET and JVM in the same process. For one, both of them install signal handlers, and both of them do funky things with threads.
Why not implement unix sockets too, since we want to avoid the ip/tcp stack? Now you have two platforms to support for no real gain. Also, LSP applications are shared between projects/users, how you centralize that if each system needs its own installed program and dependencies? Using networking is the path of least resistance and it's drawbacks are well understood between the ones that need to communicate, there's no point to implement IPC based communication.
"People who are using this shit of a drug should be aware that they are part of the problem with every line they do, whenever they fetch a bag of cocaine. You are part of the problem"
Not quite, as if it was, the War on Drugs would succeed. Instead, it failed spectacularly.
People using Meta products are not making an arbitrary choice that happens to be evil. They are using Meta because other people are using Meta (network effect) or because it helps them calm down after a long day (addiction).
You can say they are "technically part of the problem", as in, their usage supports Meta existence in some micro way, but that doesn't warrant the harsh phrasing you've presented in the original comment.
Punishing addicts doesn't solve the social problem of addiction, in the same way that punishing homeless people doesn't solve the social problem of homelessness.
Many parents would gasp at this sentence, but the same parents would likely complain to anyone who'd listen about how negatively their children are affecting their lives.
I've had an idea for an automated verification for a while, but too busy to implement it.
For every property of the system, implement a mock that simulates a system that works, and multiple variations with forseeable bugs (models are fairly good at predicting possible bugs). Then, write a unit tests that pass on the working simulation and fail on the buggy simulations.
This way model ensures reasonably well that the unit tests test what they're supposed to. Then, you use those tests as a verification to guide the model to implement the functionality.
This approach relies on the assumption that the model can design a reasonable architecture composed of independently-testable modules. In my experience, frontier models should be able to do that.
Generally I think the person implementing it has a poor native scrolling experience due to poor hardware and/or software and the hijacked behavior seems better to them.
Make sure to take reporting negativity bias into account. People will speak up when they don't like something, while stay quiet when everything is fine.
I, personally, enjoy Buf. It has solved many frustrations I've had with The Way it was previously done, manually installing protoc plugins, writing arcane flags into scripts nobody wants to touch, working around various quirks, like how protoc produces different output based on which directory you invoke it in, et cetera... I don't quite like the remote plugin model and rate limiting, but using local plugins is easy enough that it doesn't matter.
Buf has made my life easier, and I've actually been using `buf_ls` for a while now in NeoVim. I understand where the criticism of the title comes from, but I don't personally feel it in this particular case. In fact, I didn't even notice it.
I don't even mind the monetized properietary cloud thing, as long as Buf CLI and the related toolchain remains free software, serving the community. Hope you won't do the ol' switcharoo any time soon.
Totally, and we appreciate the sentiment. But the title was meant to be lighthearted, and instead it clearly struck a nerve. That's not our intent, and it was easy to change, so we just swallowed our pride. We rather the conversation be around Protobuf tooling, and not our poor comedy.
And the Buf CLI will always be free and OSS, don't worry!
IPC is the natural solution to that - run a process in its own address space and communicate with it via I/O. TCP is not most optimal, but it is uniquous. Same thing with JSON.
In LSP, most of the processing happens in the LSP server anyway - communication overhead between client and server is negligible in comparison to it.
reply