News for hackers. Stuff that matters.
Re:Zed Editor automatically downloads binaries and NPM packa... by daghamm on Monday July 08, 2024 @02:51AM (#40903142)
This is what I hate about vscode, and they at least ask for consent. Some of the stuff vscode needs for golang are (to me) developed by Random Joe on github. It's just a matter of time before it is abused for supply chain attacks.
Re:Zed Editor automatically downloads binaries and NPM packa... by pjmlp on Monday July 08, 2024 @03:18AM (#40903278)
Go suppport on VSCode was originally done by an intern at Microsoft, and then later there was an agreement with Google, for Google Go team to take over it.
Re:Zed Editor automatically downloads binaries and NPM packa... by ayewo on Monday July 08, 2024 @03:52AM (#40903423)
No wonder. Of all the languages I code in in VSCode, Golang is the most frustrating to use as I can’t jump to definitions with Cmd + Click the way I can in JS, PHP or Java.

It there a decent alternative for Golang on the Visual Studio Code marketplace?

Re:Zed Editor automatically downloads binaries and NPM packa... by oefrha on Monday July 08, 2024 @04:16AM (#40903540)
> Golang... I can’t jump to definitions with Cmd + Click

What are you talking about? Did you refuse to install gopls or something?

Re:Zed Editor automatically downloads binaries and NPM packa... by alias_neo on Monday July 08, 2024 @04:21AM (#40903567)
I think they must have, it's not quite on the level of Goland, but VSCode with all the necessary extensions works well for Go, and doesn't eat 32GB of my RAM to do it.
Re:Zed Editor automatically downloads binaries and NPM packa... by oefrha on Monday July 08, 2024 @04:27AM (#40903612)
That would be quite funny. In a thread about additional components being installed without prompts, a user jumps out to complain about missing functionality in another editor because they refused to install an additional component when prompted.
Re:Zed Editor automatically downloads binaries and NPM packa... by alias_neo on Monday July 08, 2024 @04:58AM (#40903773)
Quite. VSCode asks with a little pop-up in the bottom right (for me, on Gnome) when you open a project that might benefit from a particular component, and you can accept or decline it.

It tells you what/why it's needed, it's up to you to accept or decline, but you should accept that things won't work well if you don't.

I'm no Microsoft fan (quite the opposite), but VSCode handles this about as well as anything could.

Re:Zed Editor automatically downloads binaries and NPM packa... by bippihippi1 on Monday July 08, 2024 @05:29AM (#40903936)
except for giving network access to extensions having no way to audit if not open source.
Re:Zed Editor automatically downloads binaries and NPM packa... by rfoo on Monday July 08, 2024 @08:26AM (#40904801)
oh come on, if an extension comes with no source code it means it comes with a native binary (because otherwise it's JavaScript and there, are, no, good, JavaScript, obfuscation, in, this, world, period), and does it really matter if it has network access ??? it may as well just inject cryptominer to your ~/.bashrc.
Re:Zed Editor automatically downloads binaries and NPM packa... by avarun on Monday July 08, 2024 @04:30AM (#40903627)
Yeah I wonder why developers feel the need to auto install components…
Re:Zed Editor automatically downloads binaries and NPM packa... by brabel on Monday July 08, 2024 @06:24AM (#40904154)
Exactly. By the way, use F12 instead of clicking :).

Even on emacs, using gopls, `Meta+.` (go to definition) works.

I use some VS Code (when I need to do web stuff besides Go), some emacs, and both use gopls so support is pretty much equivalent in terms of functionality.

Re:Zed Editor automatically downloads binaries and NPM packa... by vergessenmir on Monday July 08, 2024 @04:18AM (#40903555)
Jetbrains has a decent golang IDE. I don't use it because I use Vim. Vim's not for everyone.
Re:Zed Editor automatically downloads binaries and NPM packa... by mu53 on Monday July 08, 2024 @06:14AM (#40904110)
Their ideavim plugin is pretty good. I didn't know at first, but it support an .ideavimrc file that allows you to set your own commands. Pretty much anything that you can do in a jetbrains product is connected to a command id that you can connect to a vim shortcut.

Include the most popular vim plugins as well. Easy motion and Nerdtree. Doesn't support language specific plugins, but core jetbrains products covers that

Re:Zed Editor automatically downloads binaries and NPM packa... by kmarc on Monday July 08, 2024 @04:53AM (#40903743)
I do the same (not for golang tho). However, vim plug-ins also "have network access", in fact they can just "system()" and call anything. No sandboxing at all. At least the source code of these plug-ins are not obfuscated/compressed.

However, this makes me wonder how much of a surface attack this is.

Re:Zed Editor automatically downloads binaries and NPM packa... by rfoo on Monday July 08, 2024 @08:21AM (#40904761)
Do you pin your plugins down to commit hash?
Re:Zed Editor automatically downloads binaries and NPM packa... by kmarc on Monday July 08, 2024 @11:45AM (#40906402)
I did in the past.

Now I just run `:PlugUpdate` and hope that whatever comes from GitHub, is seen by the manyeyeballs. I certainly don't check all the diffs.

Re:Zed Editor automatically downloads binaries and NPM packa... by veeti on Monday July 08, 2024 @05:11AM (#40903847)
Did you try IdeaVim?
Re:Zed Editor automatically downloads binaries and NPM packa... by karolist on Monday July 08, 2024 @04:22AM (#40903575)
I can confirm it is frustrating experience overall, I've moved on to GoLand and later to IntelliJ with Go plugin for Go development and never looked back. Sadly IDEA products fall apart for me in projects where multiple technologies are used, i.e. tailwind, Ruby, anything with JS, so I can't ditch VSCode yet...
Re:Zed Editor automatically downloads binaries and NPM packa... by xvinci on Monday July 08, 2024 @05:49AM (#40904024)
Can you elaborate on that, at least for js? We are a large (1k) fullstack development company and do all of our js / typescript SPAs and others on Intellij and I am not aware of it being an unpleasant experience.
Re:Zed Editor automatically downloads binaries and NPM packa... by karolist on Monday July 08, 2024 @06:04AM (#40904072)
I do not have much experience with this as I've switched just a month ago, but for my codebases the editor tends to turn all project files red a few times a day and I have to use the "Restart IDE" and "Invalidate caches" quite often, this never happens with just Go codebase. It's a shame these actions have to even exist in IDE, it's like they know there's a bug in caching mechanism but can't find it, and no, I'm not using any fancy networked filesystems, just native macOS directories.

On another point I spent 2 hours setting up a Ruby interpretter because no matter what I did Intellij would not recognise my RVM ruby, I think compiling without yjit and setting up a specific gemset for the project plus a few Restart IDE and Invalidate caches later did it, but not sure.

For tailwind specifically the extension is lacking compared to VSCode, I do not have color squares for my color classes and the classes are not recognized in more difficult filetypes (i.e. erb templates). Many other extensions seem much less loved than on VSCode, i.e. continue.dev, you can read their reviews and quickly get a sense that it's much more niche ecosystem.

I love the editor experience overall and especially for Go projects, but can't switch fully yet.

Re:Zed Editor automatically downloads binaries and NPM packa... by nijave on Monday July 08, 2024 @07:11AM (#40904344)
If you're using IDEA with plugins for each technology you should be able to add submodules which get their own interpreter.

You may need to add interpreters first then there's a modules page in project settings you can select path and tool

Re:Zed Editor automatically downloads binaries and NPM packa... by shzhdbi09gv8ioi on Monday July 08, 2024 @04:31AM (#40903634)
> Of all the languages I code in in VSCode, Golang is the most frustrating to use as I can’t jump to definitions with Cmd + Click the way I can in JS, PHP or Java.

Odd, what extensions are you using? I use only go.dev extension and intellisense has been working great for golang dev for years.

Re:Zed Editor automatically downloads binaries and NPM packa... by juliangmp on Monday July 08, 2024 @03:20AM (#40903287)
Not sure if it was always like that, the C/C++ extension used to download the language server and some tools during startup as well. They now bundle it with the extension, which is a lot better especially in an offline environment.
Re:Zed Editor automatically downloads binaries and NPM packa... by jazzyjackson on Monday July 08, 2024 @04:21AM (#40903571)
yea I was recently dismayed to find vscode extensions have full network access and there's no way to prevent it. It's been an open issue since 2018 and not on the roadmap.

https://github.com/microsoft/vscode/issues/52116

Re:Zed Editor automatically downloads binaries and NPM packa... by michaelt on Monday July 08, 2024 @06:39AM (#40904213)
Is that something people really expect of their IDEs these days?

In my mind, an IDE needs to be able to read all the files I can read myself, it needs to be able run arbitary tools like compilers and linkers then run the resulting compiled code, it needs a debugger that can attach to running processes and mess with them, it needs to be able to pull from the language's package repository when you ask it to, it needs to talk to your git server when needed, it needs access to your SSH keys to do that. About the only thing the IDE doesn't need is to run as root - and if you're working with Docker it basically needs that too.

The idea of an IDE with pluggable language support safely running plugins from untrusted sources? I can't imagine how such a thing could even be possible?

Re:Zed Editor automatically downloads binaries and NPM packa... by myaccountonhn on Monday July 08, 2024 @07:48AM (#40904516)
Well a permission model is one way, like OSes have. Another is something like elm with controlled effects, so you can just search the source code and see if something is off.
Re:Zed Editor automatically downloads binaries and NPM packa... by II2II on Monday July 08, 2024 @08:30AM (#40904824)
A different (Visual Studio Code) example that uses network access and runs executables from untrusted sources: embedded development. You have everything from tools like PlatformIO, that manages the toolchain for microcontrollers from multiple vendors; to ESP-IDF, that manages the toolchain for microcontrollers based upon multiple architectures; to Raspberry Pi Pico, which uses the IDE as a simplified installer for their toolchain.

With some compilers leaning on user side, rather than system side, toolchain management (e.g. Rust), I would imagine that plugins managing that would be desirable as well.

Keep in mind, computers are about automation. We should be able to reap the benefits of that automation to the greatest degree possible. Alas, we can't due to bad actors.

Re:Zed Editor automatically downloads binaries and NPM packa... by jazzyjackson on Monday July 08, 2024 @07:41PM (#40910986)
Having network access from within the IDE so I can use tools that reach out to package managers and remote git servers - yes, of course that is expected behavior.

If I want to install an extension that gives me syntax highlighting and code intelligence for an obscure template language, why should I expect that extension to have unfettered network access to exfiltrate my ptivate files?

Like the dead guy said, when working with private customer data it's just not on the table to take the risk, I am stuck running vanilla vs code.

Re:Zed Editor automatically downloads binaries and NPM packa... by api on Monday July 08, 2024 @06:40AM (#40904216)
The idea of everything on a system having open net access is going to have to go, not just for this reason but also privacy. It’s kind of amazing it’s still the default everywhere.

Also supply chain attacks are a freight train barreling down the tracks. The gate is down and the crossing bells are dinging but our car is stuck on the tracks.

Ever since the xz thing almost worked every black hat group on the entire planet is trying their hand at this. The days of software dev as a high trust environment are going to be over fast.

Re:Zed Editor automatically downloads binaries and NPM packa... by Conimene on Tuesday July 09, 2024 @04:23AM (#40913706)
> The days of software dev as a high trust environment are going to be over fast.

That's good

Quite tired of being the only one in my org with outbound firewall rules

Re:Zed Editor automatically downloads binaries and NPM packa... by rbut on Monday July 08, 2024 @08:58AM (#40905031)
At our org we run code-server in docker with no network access except pre-allowed DNS, and a white listed squid proxy, due to this.

It works really well for us and prevents potentially bad extensions, python libraries, etc exfilling our code, data, etc.

Re:Zed Editor automatically downloads binaries and NPM packa... by arp242 on Monday July 08, 2024 @04:29AM (#40903622)
> Some of the stuff vscode needs for golang are (to me) developed by Random Joe on github.

Pretty much all of it seems to be on golang.org, github.com/google, or are by people working on gopls. The suggestions that there are tons of dependencies from random people is just not true.

Re:Zed Editor automatically downloads binaries and NPM packa... by elAhmo on Monday July 08, 2024 @04:39AM (#40903670)
Comment states some of the tools, not tons of dependencies. Your comment that "pretty much all" is not a contradiction of what the parent comment said.
Re:Zed Editor automatically downloads binaries and NPM packa... by tjpnz on Monday July 08, 2024 @05:23AM (#40903905)
Pretty much all of it isn't remotely the same as all of it.
Re:Zed Editor automatically downloads binaries and NPM packa... by andrepd on Monday July 08, 2024 @07:00AM (#40904287)
I just want a dumb text editor that doesn't bundle shitton of crap I don't want (like LLMs), doesn't phone home, isn't bloated and slow. I feel that still the only good editor that does this apart from vim+emacs is sublime text.
Re:Zed Editor automatically downloads binaries and NPM packa... by jasmes on Monday July 08, 2024 @08:28AM (#40904816)
I've been using Sublime more and more lately when I'm not in a JetBrains IDE. I can't feel a difference between it's speed and Zed's on my machines. If I could get Supermaven in it I'd SWITCH completely.
Re:Zed Editor automatically downloads binaries and NPM packa... by moe_sc on Monday July 08, 2024 @10:31AM (#40905784)
Kate comes to mind.
Re:Zed Editor automatically downloads binaries and NPM packa... by moe_sc on Monday July 08, 2024 @10:31AM (#40905785)
Kate comes to mind.