Most active commenters
  • iainmerrick(5)

←back to thread

Gemini CLI

(blog.google)
1336 points sync | 17 comments | | HN request time: 2.326s | source | bottom
Show context
ZeroCool2u ◴[] No.44377226[source]
Ugh, I really wish this had been written in Go or Rust. Just something that produces a single binary executable and doesn't require you to install a runtime like Node.
replies(12): >>44377273 #>>44377286 #>>44377337 #>>44377341 #>>44377366 #>>44377649 #>>44377914 #>>44378962 #>>44380417 #>>44382222 #>>44384234 #>>44384426 #
1. iainmerrick ◴[] No.44377273[source]
Looks like you could make a standalone executable with Bun and/or Deno:

https://bun.sh/docs/bundler/executables

https://docs.deno.com/runtime/reference/cli/compile/

Note, I haven't checked that this actually works, although if it's straightforward Node code without any weird extensions it should work in Bun at least. I'd be curious to see how the exe size compares to Go and Rust!

replies(4): >>44377313 #>>44377346 #>>44377642 #>>44377877 #
2. ZeroCool2u ◴[] No.44377313[source]
Yeah, this just seems like a pain in the ass that could've been easily avoided.
replies(2): >>44377374 #>>44377485 #
3. JimDabell ◴[] No.44377346[source]
I was going to say the same thing, but they couldn’t resist turning the project into a mess of build scripts that hop around all over the place manually executing node.
replies(1): >>44378866 #
4. iainmerrick ◴[] No.44377374[source]
From my perspective, I'm totally happy to use pnpm to install and manage this. Even if it were a native tool, NPM might be a decent distribution mechanism (see e.g. esbuild).

Obviously everybody's requirements differ, but Node seems like a pretty reasonable platform for this.

replies(1): >>44381231 #
5. jstummbillig ◴[] No.44377485[source]
It feels like you are creating a considerable fraction of the pain by taking offense with simply using npm.
replies(1): >>44377667 #
6. buildfocus ◴[] No.44377642[source]
You can also do this natively with Node, since v18: https://nodejs.org/api/single-executable-applications.html#s...
7. evilduck ◴[] No.44377667{3}[source]
As a longtime user of NPM but overall fan of JS and TS and even its runtimes, NPM is a dumpster fire and forcing end users to use it is brittle, lazy, and hostile. A small set of dependencies will easily result in thousands (if not tens of thousands) of transitive dependency files being installed.

If you have to run end point protection that will blast your CPU with load and it makes moving or even deleting that folder needlessly slow. It also makes the hosting burden of NPM (nusers) who must all install dependencies instead of (nCI instances), which isn't very nice to our hosts. Dealing with that once during your build phase and then packaging that mess up is the nicer way to go about distributing things depending on NPM to end users.

replies(1): >>44382382 #
8. tln ◴[] No.44377877[source]
A Bun "hello world" is 58Mb

Claude also requires npm, FWIW.

replies(3): >>44378808 #>>44379106 #>>44380433 #
9. iainmerrick ◴[] No.44378808[source]
What's a typical Go static binary size these days? Googling around, I'm seeing wildly different answers -- I think a lot of them are outdated.
replies(1): >>44378906 #
10. iainmerrick ◴[] No.44378866[source]
Oh, man!

I guess it needs to start various processes for the MCP servers and whatnot? Just spawning another Node is the easy way to do that, but a bit annoying, yeah.

11. MobiusHorizons ◴[] No.44378906{3}[source]
It depends a lot on what the executable does. I don’t know the hello world size, but anecdotally I remember seeing several go binaries in the single digit megabyte range. I know the code size is somewhat larger than one might expect because go keeps some type info around for reflection whether you use it or not.
replies(1): >>44379166 #
12. sitkack ◴[] No.44379106[source]
That is point not a line. An extra 2MB of source is probably a 60MB executable, as you are measuring the runtime size. Two "hello worlds" are 116MB? Who measures executables in Megabits?
13. iainmerrick ◴[] No.44379166{4}[source]
Ah, good point. I was just wondering about the fixed overhead of the runtime system -- mainly the garbage collector, I assume.
replies(1): >>44382346 #
14. quotemstr ◴[] No.44380433[source]
> A Bun "hello world" is 58Mb

I've forgotten how to count that low.

15. danielbln ◴[] No.44381231{3}[source]
Also throwing Volta (written in Rust, because of course it is) into the ring. It's the uv of the Node world.
16. frollogaston ◴[] No.44382346{5}[source]
The Golang runtime is big enough by itself that it makes a real difference from some WASM applications, and people are using Rust instead purely because of that.
17. frollogaston ◴[] No.44382382{4}[source]
I ran the npm install command in their readme, it took a few seconds, then it worked. Subsequent runs don't have to redownload stuff. It's 127MB, which is big for an executable but not a real problem. Where is the painful part?