Remix.run Logo
KingMob 5 days ago

It's faster than poring thru bad manpages for commands you don't remember.

johnisgood 5 days ago | parent | next [-]

I must be very old school then. I am 30 years old, but I still read man pages often, whether I am writing C code, or just use an utility. It is a choice, however. I do not care if people use LLMs for this.

KingMob 5 days ago | parent [-]

I'm much older than that, and manpages have been a poor format for long time. I read manpages all the time, but I never like it.

They lack ToC, fast search, fuzzy searches, stem searches... really anything we've known to do with searches for the last 30 years. We're largely restricted to linear grepping and scanning.

GNU tried to make `info` happen, but it never caught on.

johnisgood 5 days ago | parent | next [-]

Manual pages do have "fast search" (with regexp supported), so I am not quite sure what you mean.

KingMob 5 days ago | parent [-]

Well, regexes, even with optimizations, are inherently linear searches, unlike a precomputed index (e.g., tries).

---

But the real problem with regexes is they force you mentally evaluate and skip over irrelevant hits, because it's not the right tool for excluding them.

Since regexes don't understand doc structure, you can't prioritize for a section heading with a word over other instances of the word.

Likewise for fuzzy search for longer phrases or cases where you're not sure of the precise order of multiple words.

They also lack stemming, so you either spend time constructing flexible regexes to handle related variants, or you run multiple searches with similar words.

Etc etc etc.

This is why text search engines are much more sophisticated than plain regexes.

---

Here's an example I ran into regularly when I was building a copy of bash's bind command:

How many irrelevant hits do you have to skip over to look up the the CLI options for bash's bind builtin? There's hits for the letters "bind" all over the manpage. And unfortunately the builtin options are near the end. I finally hit upon using "G" in less to jump to the end of the manpage, and then doing a reverse search for the hyper-specific phrase "BUILTINS", which takes me close to the right spot, but I only realized that after doing it a few times.

msgodel 5 days ago | parent | prev [-]

I think info probably would have been more popular if the local reader used HTML rather than info directly. Just the reader UI seems to turn people off to it.

Also man has "apropos" for search. It works pretty well IME.

KingMob 5 days ago | parent [-]

Agreed on `info`. Such a missed opportunity.

`apropos` is for listing possibly relevant manpages, but I'm thinking about searching within a manpage. Particularly a long one like bash's.

msgodel 5 days ago | parent [-]

typing / in the pager doesn't work for you?

KingMob 5 days ago | parent [-]

Not always. See my sibling comment for details, and an example of when a smarter search strategy would be better.

egorfine 5 days ago | parent | prev | next [-]

Sure it's way easier to type "show me the list of files in current directory" and wait for LLM to do it's magic than it is to type "ls".

KingMob 5 days ago | parent [-]

Quick! What's the CLI command to use ffmpeg to cut out the first 20s of a video, drop non-English subtitles, and convert to the AV1 codec while keeping the VBR under 1 MBs?!

While you laboriously hunt for all the correct options, I've gone to lunch.

I doubt anyone's using AI for "ls" unless they're just starting to learn the terminal.

soraminazuki 5 days ago | parent | next [-]

Then you get this:

    ffmpeg -i input.mp4 -ss 20 -map 0 -c:v libaom-av1 -b:v 1M -c:a libopus -map -0:s -y output.mp4
It overwrites files without confirmation, needlessly re-encodes audio, drops all subtitles, and sets the average bitrate instead of the maximum. So with your example, someone else is doing damage control while you're enjoying your lunch.

I'm kind of surprised it got this many things wrong to be honest.

KingMob 5 days ago | parent [-]

Kudos for taking this seriously.

I have no idea what prompt you fed it, but at least personally, I rarely get such poor results for ffmpeg.

But assuming I got this back, instead of running it blind, I wold check the options it suggested, find the flaws, fix them and then run it. Quite possibly still faster than it would take to construct by hand from scratch.

In that sense, LLMs are better search engines than existing search engines in terms of guiding you to the right neighborhood, if not the correct house.

---

When people criticize YOLO vibe coding, I think they're forgetting all the ways LLMs can still be very useful with a human in the loop.

egorfine 5 days ago | parent | prev [-]

I need LLM for that, sure.

But again, my question stands: why would I need an AI in my terminal?

KingMob 5 days ago | parent [-]

If you think AI is useful for that, then why not stick it everywhere, including the terminal?

My only objection to AI in the terminal is it's one more subscription to track. But otherwise, I have no issue with AI chats in everything.

I mean, Warp is still a terminal at the end of the day. Nothing's forcing me to use AI, it's just handy for the occasional command. I use it sporadically enough that I never even leave the free tier.

I think OP made the mistake of trying to use the Warp model for coding; I wouldn't let anything less than a frontier model touch code.

egorfine 5 days ago | parent | prev [-]

Search and LLMs for that are truly great indeed.

But that's not exactly what i was asking about lol