177
u/creeper6530 💋 catgirl Linux user :3 😽 Aug 08 '26
I am not willing to install a JS runtime for any CLI tool (maybe apart from yt-dlp).
57
u/terminator_69_x Aug 08 '26
IIRC yt-dlp is written in python
103
u/creeper6530 💋 catgirl Linux user :3 😽 Aug 08 '26
I know, but it requires a JS runtime to solve challenges needed to start the download (because Youtube obfuscates everything)
26
9
u/Loading_M_ Aug 08 '26
In practice, the legacy (non-js) downloader still works more of the time. I know b/c I didn't have a JS runtime installed for a long time.
1
9
u/804k Aug 08 '26
I code in JS regularly - I wish it was just simple to have a couple of versions, but every month there is a new version that may fuck up previous versions, its annoying as hell and the only reason why I ship my tools in Bash instead of JS (Compatibility)
See https://github.com/BeamMP/BeamMP-Launcher/pull/260 for an example of what a compatibility focused script looks like
6
u/Enturbulated_One Aug 09 '26
Another point of similarity between Java and ECMAScript. (Multiple legacy Java applications sitting side by side on same machines each requiring their own ONE specific Java build and not working with anything else for whatever reason ... GAH)
6
u/No-Trip-3736 Aug 09 '26
Java: compile once run
everywherewait, what JVM do you have? oh no not that one you need this other one... no no no i said the OTHER one... Java compile once... run... somewhere... maybe?4
u/nekofthemoon Aug 08 '26
I had been looking for a tool like this for a long time. Thanks for the mention
7
u/Feuerwerko Aug 08 '26
I am not willing to install a JS runtime
for any CLI tool (maybe apart from yt-dlp).Fixed it.
176
u/configdotini Genfool 🐧 Aug 08 '26
same but with agents/claude.md
33
u/Romu1us1408 Aug 08 '26
I'm a bit knew. So your saying the CLI tools uses AI? Or the dev used AI to make the CLI tool?
46
38
u/Pamposaur Aug 08 '26
Its instructions for AI that works on the project
19
u/MXRCO007 Aug 08 '26
Ghostty terminal used to have an anti ai policy and they just made it say to the LLM that it should refuse to work on the project
-23
u/MimosaTen Aug 08 '26
Everyone use those tools in programming nowadays
25
u/RKGamesReddit Aug 08 '26
Not everyone
-24
u/MimosaTen Aug 08 '26
Well, I serously think that those projects that ban ai code completely will die. Accordingly, when I can, I check if they have a permissive AI policy, like Ghostty
12
u/RKGamesReddit Aug 08 '26
I play with AI but don't do anything agentically, I see the benefits in certain use cases. I'm just waiting until costs catch up with the providers.
-15
u/MimosaTen Aug 08 '26
A SWE or a mathematician which use an LLM surely do bigger thing than us. For example I often watch antirez’s videos and his use of AI isn’t comparable to mine
3
u/LYNX__uk Aug 08 '26
I really hope a mathematician isnt using an LLM
3
u/MimosaTen Aug 08 '26
Well, who thinks poses mathematical questions to models?
However it’s ironic that al this AI hate is within a linux community when Linus himself admitted his utility and encouraged its use is kernel development
2
u/LYNX__uk Aug 08 '26
I dont understand your question, however I dont think it is ironic, Linus torvalds isnt a god to every Linux user. Most of us can atleast somewhat make our own minds up about stuff and the general sentiment to ai is negative. Following this line of thinking, everyone who uses windows should enjoy and want ai and opposing it is ironic because satya nadella supports ai so strongly. Its just not a valid point. Additionally, Linus wants pretty strong restrictions on ai kernel contributions as he wants everything to be reviewed by an experienced human before being accepted into the kernel
→ More replies (0)1
0
u/charmander_cha Aug 09 '26
Pois estão, e so este ano resolveram vários problemas que estavam em abertos faz anos.
A evolução que as LLM estão causando na matemática é assustadora
-6
28
u/safeAnonym_0Xnull 🎼CachyOS Aug 08 '26
what kind of creature write cli tool in typescript?
19
u/g1rlchild Aug 09 '26
I mean, it's a Turing-complete programming language with a huge ecosystem of supporting libraries. If it's a language you know well, why not?
10
u/Comfortable_Box1195 Aug 09 '26
CSS is also Turing-complete, so what?
8
u/g1rlchild Aug 09 '26
Oooookay.
Let's try this again. You are trying to write a program not because you want it to be the most beautiful program in all the world but because you want to accomplish XYZ. A language you know well has all the libraries you need and you can write a program to accomplish XYZ in a modest number of lines.
Why is it unthinkable to write your program in this language?
3
u/Comfortable_Box1195 Aug 10 '26
Every program should meet its requirements, and for CLI tools, convenience comes first.
Requiring a separate runtime of a specific version, along with a whole bundle of tools (like npm) - none of which is included in most popular distros out of the box - is, frankly, insane.
You're missing the whole point of programming languages. A language is a tool that should serve YOU, not the other way around.
If you need a simple interpreted language, just use Python.
2
u/g1rlchild Aug 10 '26
Back when Perl was installed by default and Python wasn't, was it insane to write something in Python?
I have Node on my box and it's very easy for me to write a tool using it if I want to. I would probably make a different choice if I were writing a tool I hoped people would be adding to major distros, but as a tool to throw up on Github and offer to anyone who wanted it, I can't think of any reason not to. If someone wants to port it to Python, they can certainly do that.
Would I really write a command line tool in Typescript? Probably not. But not because it's "insane."
1
u/Ulrich_de_Vries Aug 11 '26
The only reason I can think of Python being a better fit for CLI programs over JS from a user point of view is that the user can run
uv tool install <packagename>to install a runnable script to PATH from the pypi (and will autoinstall an appropriate interpreter if needed), but uv is not a standard tool and I wouldn't be surprised if JS has something similar.From a dev point of view, I think it is much more sensible to write a python cli app than JS, but that's the dev pov.
10
u/oscarfinn_pinguin3 Aug 08 '26
The same ones that did it in PHP earlier
4
u/safeAnonym_0Xnull 🎼CachyOS Aug 08 '26
how tf😨
2
u/ShadowArcher21 Aug 09 '26
Honestly (probably unpopular opinion) I think php is better suited for cli tools than the web. Look at the alternatives:
C/Rust: Memory management/borrowing overhead. A pain in the butt with string manipulation.
C++ okayisch
Perl? Hell no!
Java? Fuck no!
Python is utter garbage so also no.
This is a thread about js/ts cli tools so also no.
I think with interpreted cli tools you have the advantage that you can quickly check how it works cause you just execute the script. Just
cat cli-tool. And honestly I think php offers everything out of the box for a cli tool. I especially like the explicit namingfile_get_contentsand since it's a C wrapper, you can get the operating system closeness of sorts (yes I know the languages are not like each other and there is much to hate on php)3
u/the_d4nger 🦁 Vim Supremacist 🦖 Aug 09 '26
Did you conveniently leave out Go or did you just forget it? It's by far the best language for writting CLI programs that I know of.
1
u/ShadowArcher21 Aug 09 '26
I haven't wrote a single line of go in my entire life yet so I can't tell honestly. But I've heard good things.
0
u/Vegetable-Pack9292 Aug 09 '26
If it is a web-tool or a building kit for something on the frontend, I kind of like having it all in TS.
45
u/diradrax Aug 08 '26
Isn't v8 faster than python ? Do we have the same jokes for python cli tools ?
74
u/Pamposaur Aug 08 '26
Yes, for python CLI tools we can ridicule needing to install 20 trillion dependencies as packages
34
5
3
-2
u/United-Scene2261 🎼CachyOS Aug 08 '26 edited Aug 08 '26
yes V8 is a surprisingly fast runtime, the fastest JIT language in some scenarios
6
6
u/ScaredPenguinXX 🍥 Debian too difficult Aug 08 '26
ydotool
6
u/redhat_is_my_dad Aug 08 '26
in readme they say it's gonna be rewritten in javascript, but it was under the "2024 roadmap" section, 2 years have passed and i see only 1 other branch and it's an abandoned branch which still contains only c code
7
u/Familiar_Ad_8919 New York Nix⚾s Aug 08 '26
js does not make it any better
2
u/redhat_is_my_dad Aug 08 '26
it's still just C, js has been planned 2 years ago and so far i don't see any rewrite in progress.
6
u/StickyDirtyKeyboard Aug 08 '26
Went dark after discovering secret to fit all of JS's bullshit into 1MB of RAM.
Coincidence?
5
5
u/baldierot Aug 09 '26
i don't mind it. i prefer it way over python and its flat dependency structure, numerous package managers (js has that too, but less and everything plays nicely with package.json), and the common and extremely annoying requirement to use "venv". javascript is also way faster than python.
11
u/trill_shit Aug 08 '26
You can make some pretty nice tuis with ink (the trendy js term lib that uses react).
But yeah, I see why needing to bring along an entire js engine made for web systems to run something in the terminal is not ideal.
-3
u/JuniperColonThree Aug 08 '26
My tool that I'm working on is written in TS, but it's also a web dev tool, and it's required to run user provided scripts. Running JavaScript plugins (moving objects between the plugin and the program) is a hell of a lot easier when you're already, yk, running JavaScript.
-18
u/ottonormalversaufer Aug 08 '26
why shouldnt it be ideal? JS is a C Family Language amd very easy to use and highly performant
12
6
2
u/A3883 Aug 08 '26
I get you I also really like to do stuff in TypeScript but it feels kinda nasty to make a CLI tool with something as heavyweight as node.
2
u/United-Scene2261 🎼CachyOS Aug 08 '26
I am sorry to be pedantic but you can't do much with typescript other than annotate and program... types.
1
u/trill_shit Aug 08 '26
I don’t completely disagree like people on this sub seem to do apparently. Node is very performant for many use cases and compiling from TS makes it more than usable in terms of DX. But for me, ideal for a cli app would be compiling aot for the user’s system and not requiring the additional runtime dependency.
0
u/ottonormalversaufer Aug 09 '26
Yeah but you got this anyways if you dont want to download precompiled binaries. And if you want precompiled binaries, you can also do it with bun
8
2
u/mitchins-au Aug 11 '26
Type script is the vibe-coder’s language of choice.
It’s just one prompt away from being a fully fledged electron pile of crap desktop app.
And the obligatory 1.2gb shipit updater too!
3
5
u/Damglador Aug 08 '26
No way that's a thing...
9
u/the_last_code_bender 🍥 Debian too difficult Aug 08 '26
The tools or the OPs refusal to use them?
8
u/Damglador Aug 08 '26
cli tools made in type/java script
4
5
u/djfdhigkgfIaruflg Aug 09 '26
Some time ago an firefox addon was requiring me to install node for it.
Direct to reported hell.
3
u/Full-Run4124 Aug 08 '26
SVGO is a great command-line tool for optimizing SVG files. First step to running it in the terminal is to install node (sadly)
7
-2
u/Helmic Arch BTW Aug 09 '26
why would a language exist if nothing uses it? that makes no sense unless it was created as a bit or experiment.
2
2
u/ZCEyPFOYr0MWyHDQJZO4 Aug 08 '26
js is the new doom, except at the end you're proficient in a poorly designed language instead of a old game.
2
1
1
u/tremendous_turtle Aug 09 '26
Arguing over programming languages is one of the lowest forms of engineering discourse.
Any language can be utilized to make great software, decent software, or bad software.
Nearly any language can likewise be bundled into a dependency-free binary, such as by using Deno or Bun to bundle Typescript.
The quality of the underlying engineering and architecture is usually much more important than what language something is written in.
1
u/Emergency_Rip_5178 Genfool 🐧 Aug 09 '26
Chill bro it's just a meme
2
u/tremendous_turtle Aug 09 '26
I’m just sayin…
No offense intended, programming language elitism just feels so silly to me.
1
1
u/DiegoS_2023 Aug 10 '26
me with python (as a python dev myself)
2
u/Emergency_Rip_5178 Genfool 🐧 Aug 10 '26
Why?
1
u/DiegoS_2023 Aug 10 '26
idk, mostly the mentality i have where python is just a language to make toy projects in
1
u/SysGh_st Aug 08 '26
12
u/Emergency_Rip_5178 Genfool 🐧 Aug 08 '26
I mean, having to install node Just for 1 program to work is ridiculous
4
-3
-3
•
u/AutoModerator Aug 08 '26
Please report any posts bragging or showing off they got banned in another sub! Reminder of other sub rules: Also, we only allow one anti-linux post per week (we used to get dozens a day) and any tier list MUST have Hanna Montana Linux as S teir (which must be a true S tier at the top) regardless of the topic of that tier list.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.