3 ms·
Why most of those tools are written in js/ts? JS is not something that was developed with CLI in mind and on top of that that language does not lend itself to
by krzyk 7mo ago
Why most of those tools are written in js/ts?
JS is not something that was developed with CLI in mind and on top of that that language does not lend itself to be good for LLM generation as it has pretty weak validation compared to e.g. Rust, or event C, even python.
Not to mention memory usage or performance.
- gjs278 7mo ago[dead]
- manmal 7mo agoFor a TUI agent, runtime performance is not the bottleneck, not by far. Hackability is the USP. Pi has extensions hotreloading which comes almost for free with jiti. The fact that the source is the shipped artifact (unlike Go/Rust) also helps the agent seeing its own code and the ability to write and load its own extensions based on that. A fact that OpenClaw’s success is in part based on IMO. I can’t find the tweet from Mario (the author), but he prefers the Typescript/npm ecosystem for non-performance critical systems because it hits a sweet spot for him. I admire his work and he’s a real polyglot, so I tend to think he has done his homework. You’ll find pi memory usage quite low btw.
- krzyk 7mo agoOK, make sense, but there are also claw clones that are in Rust (and self modifying). Also python ones would also allow self modifying. I'm always puzzled (and worried) when JS is used outside of browsers. I'm biased as I find JS/TS rather ugly language compared to anything other basically (PHP is close second). Python is clean, C has performance, Rust is clean and has performance, Java has the biggest library and can run anywhere.
- manmal 7mo agoI see we have very different taste in languages. I can’t stomach Python, or Ruby for that matter. Personally, TS has a genius type system.
- ngrilly 7mo agohttps://x.com/badlogicgames/status/2027828366716330319 https://x.com/badlogicgames/status/2027828366716330319
- the_mitsuhiko 7mo agoIn pi’s case there is a plugin system. It’s much easier to make a self extending agent work with Python or JavaScript than most other languages. JavaScript has the benefit that it has a great typing system on top with TypeScript.
- solarkraft 7mo agoTS is just a boring default. It’s simply one of the most productive languages. It actually has a very strong type system, while still being a dynamic language that doesn’t have to be compiled, leading to very fast iteration. It’s also THE language you use when writing UIs. Execution is actually pretty fast through the runtimes we have available nowadays. The only other interpreted language is Python and that thoroughly feels like a toy in comparison (typing situation still very much in progress, very weak ORM situation, not even a usable package manger until recently!).
- _ache_ 7mo agoI was going to say that pnpm isn't that old but wikipedia says 2017!
- solarkraft 7mo agopnpm is amazing for speed and everybody should use it! but even with npm before it, at least it was correct. I had very few (none?) mysterious issues with it that could only be solved by nuking the entire environment. That is more than I can say about the python package managers before uv.
- theshrike79 7mo agouv + PEP723 is amazing for CLI tools You download one .py, run it and uv automatically downloads and installs any requirements to a virtual environment and runs it
- maleldil 7mo agoHas the developer tooling been fixed? Doesn't it use an ephemeral environment? How do editors/LSPs know where to get dependency information?
- plipt 7mo agoIf Python has a "very weak ORM situation", what is it about the TS ORM scene that makes it stronger by comparison? Is there one library in particular that stands out?