logoalt Hacker News

matheusmoreiratoday at 10:39 AM5 repliesview on HN

No, thanks. I don't want a mere "user" interface, I want a programmer's interface. I don't like the command line because I'm a "unix nerd", I like it because it lets me rapidly cook up little programs and execute them.

Here's an example I just pulled out of my shell history:

  c=3afba1a; reset; laptop "virtdev ssh liblinux -- git -C liblinux format-patch -1 ${c} --stdout" | tee /dev/tty | termux-clipboard-set
This huge oneliner clears the screen, logs into my laptop via ssh, then logs into my development virtual machine, then generates a patch from the specified commit, and this data gets piped into my Termux terminal and my phone's clipboard. Then I paste it into the ChatGPT app for code review.

I didn't need to think to write this, I just wrote it right there in the terminal using the shell's line editor, just because I needed it, and it completely solved my problem. It's as easy as pressing up on keyboard now, and I can easily turn it into a script if needed. Nobody had to bend over backwards to add monstruous features to the apps to accomodate me. I knew what my computer needed to do, and I made it do it.

In my opinion we need more of this, not less. More unix and less iphones.


Replies

unchar1today at 11:26 AM

From the article

> CLIs have purposes for which they’re irreplaceable. Building a CLI is almost always a good idea. Building a TUI almost never is.

You're also arguing for CLIs which are absolutely great. But TUIs provide none of the composability of CLIs nor the malleability of GUIs

show 3 replies
embedding-shapetoday at 10:43 AM

I agree, authors whole "The time has come to re-evaluate terminal and command line interfaces." is weird, if anything we should be moving MORE towards terminal and command line usage.

Another example from recent history, I just wanted a easy way to mount all connected drives, so whipped up:

    lsblk -l | grep -i part | cut -d " " -f 1 | xargs -I{} sudo mount -m /dev/{} /mnt/{} # automount_all
How would you even approach this with a GUI? You'd need something like Automator or whatever is called on macOS, then manually pipe GUI elements together (or some other way?), and finally there is no automated way of actually testing that it works, so once it breaks because the inevitable OS upgrade, you'll need to manually fix it. Then whatever solution you came up with or used, is almost never reusable for other things.

Meanwhile, a shell alias/function just sits there, easy to see what it does, can control anything in your computer, GUI or not (one way or another), lets you build up your own "database" of tools that all compose together (again one way or another) and finally is easy to put under automated testing.

show 1 reply
singpolyma3today at 12:18 PM

TUIs are not CLI programs though. They're GUIs which render in a terminal

show 1 reply
regularfrytoday at 12:12 PM

One version of this is "every application is actually a repl with ideas". I do wish the lisp community cared more about GUIs because it feels like there's a huge gap where exactly this sort of extensibility could be merged with precisely the richer sort of visual interaction the article wants.

LudwigNagasenatoday at 12:12 PM

That example doesn't use any TUI.

show 1 reply