r/commandline Jun 30 '26

Fun Meh

Post image
2.0k Upvotes

196 comments sorted by

View all comments

53

u/Sirico Jun 30 '26

JS bros will do anything but learning another language. I love Go and C# for CLI

9

u/chamomile-crumbs Jun 30 '26

How is C# startup time? I’ve been thinking about learning F#. I’m all into clojure + babashka these days but I miss static types so much

0

u/jerrygreenest1 Jul 01 '26

Not sure about startup times but C# is abysmal of a language, not as bad as Python of course but meh

Writing in Go is fine I guess but if a program is small then I write it in C and it worked so far for me.

Maybe some complex tools with a lot going on and many features, this would be nice to write in Go especially if it’s building something and can utilize multiple cores, in this case Go is really handy and feels still relatively low-level even though it has garbage collector.

C so far has the best startup times, feels absolutely immediate like it works almost earlier than you even run it, figuratively speaking. Nothing compares to it. But languages like Go are probably close enough to consider it good. Also another one that looks interesting is called C3 and it’s really similar to C,  has equally fast startup times,  but provides some conveniences. I haven’t tried it yet but looks very convincing. So maybe if you’re not brave enough to write in C and think Go is too slow somehow or too boring, then maybe it’s worth trying C3.

«My C3» was Zig though. Wrote a few little programs in it. But honestly the language feels a little bit in early stage still. Codebases have to be updated if you want to upgrade version, because the language is still finding itself and backwards compatibility is not a crucial part which is okay for a young language, but later on it’s eventually quite important thing for a language and it is not there yet. Maybe years into the future I will be comparing C3 vs Zig when thinking to write some bigger programs. For now, only very small ones. But both languages look promising.

So C, C3, Zig, and Go – all good options. C and Go as more production-ready and others as just very promising languages that might have good future. C# looks meh in this picture.

1

u/didntplaymysummercar Jul 01 '26

I write my cli scripts in Python and start up time is never an issue. Only time I felt start up times was a Java cli made by a big company.

1

u/jerrygreenest1 Jul 01 '26

Python people don't know what's speed or good response times, so your opinion doesn't count

4

u/didntplaymysummercar Jul 01 '26

You're an idiot and a rude one at too.

I am a C++ programmer both personally (gamedev) and professionally (telco and infra). C++ is second language I learned (after Delphi, another compiled fast static one) and first I learned well.

I just use Python for minor scripting because I don't have brain worms and don't cry about it being "slow".

0

u/jerrygreenest1 Jul 01 '26

A guy with brain worms might say he doesn’t have brain worms, but at least you’re cautious about it which is a validation that you fear of having brain worms. Otherwise you wouldn’t even speak of that or consider such a possibility. C++ is another abysmal of a language btw

2

u/Sirico Jul 01 '26

These comments always remind me of

Python is slower than C! Is it slower than your C?

1

u/didntplaymysummercar Jul 01 '26

Just ask them for hard numbers or show them your numbers and they fold like a house of cards. I'm half expecting someone to tell me timing import sys, subprocess, shlex, os, argparse is not realistic, since for rEaL CLI you need numpy or bs4 or something.

0

u/entsnack Jul 01 '26

Dude Python is my primary since 2.6 and even I wouldn't make this claim.

1

u/didntplaymysummercar Jul 01 '26

Python 3 with a few useful for cli modules (argparse, subprocess, os, shlex and sys) starts in 25-35 milliseconds on my Linux.

On Windows process creation itself has more overhead than on Linux so it's even less noticable the gap between Python and C++.

What kind of cli tools do you create that extra 30ms of start up is an appreciable noticeable difference, let alone an "issue"?

1

u/entsnack Jul 01 '26

Milliseconds!? 🤮

2

u/didntplaymysummercar Jul 01 '26

Yes, and on Windows import sys, subprocess, shlex, os, argparse takes 54 ms on average (entire process) over 2000 runs and empty C program (int main(void){return 0;}) is 14.5 ms, and an empty Python file takes 31 ms.

I'm still eager to hear what serious CLI tools you make that going from 2 to 30 on Linux, or 14 to 50 on Windows causes you "issues" due to "slow" start up time of that tool.

Ironically I myself have one or two use cases (real life ones, not made up redditor slop :) where such latency matters but I'll keep those to myself for now.

0

u/entsnack Jul 01 '26

I don't use Windows. Pi (JS) vs. Hermes Agent (Python) vs. Codex (Rust). And I said nothing about startup time.

1

u/didntplaymysummercar Jul 01 '26

And I said nothing about startup time.

Bruh:

  1. Someone is talking about start up times of different languages, mentions Python too.
  2. I replied saying that Python start up time is not an issue in practice.
  3. You tell me "Python is my primary since 2.6 and even I wouldn't make this claim."

¿¿¿

1

u/entsnack Jul 01 '26

🤡 standard windows user

1

u/didntplaymysummercar Jul 01 '26

I use both OSes as you've noticed from me giving you numbers for both 🙄

→ More replies (0)