top | item 44088633

(no title)

syene | 9 months ago

> the shell is easier to script than writing Lisp

My points were, first, Dired is easier than the shell for 99% of file management, as it’s a graphical file manager with many advanced functions. It’s literally a graphical ‘ls -l’ that that you can freely move around, browse and act on; the same way vi was a graphical ed. And, second,

> it will never be as flexible for file operations as just using the shell

for the remaining 1% where the shell would be easier than a Dired built-in, I’d rather do them from Dired, because, being a graphical program, I have a dynamic directory listing that I can peruse as I please. And the shell is the shell, whether you open a command-line in your terminal emulator or run shell commands from Dired.

Maybe the shell’s primitives are too abstract and I prefer them abstracted behind Dired. Emacs Lisp has primitive functions, too, it’s just the higher-level functions are useful most of the time.

> Knuth created a sophisticated program to count words, which McIlroy replicated in a one-line shell script using a few UNIX tools.

Yes, now let’s see McIlroy publish the C source of the Unix built-ins he used to be fair to Knuth in that comparison, who provided the whole source of his implementation.

Composibility was an afterthought when making C, and that’s what Unix inherits; redirecting text with pipes between different programs will never be as simple and elegant as an interface that was made for composibility and extension, from the programming language up—Lisp Machines. I have scarcely found shell one-liners to be elegant in the sense they make sense at first glance—granted I’m a user, not a programmer. Lisp functions—functional programming—on the other hand, when used together, have an intuitive flow, especially in how they modify input, that’s easy to wrap my head around.

But the word runs on Unix shell, much, much more so than a functional-programming-language REPLs—“worse is better” like you said earlier.

> I don't think any tech geek or programmer would prefer writing a program for such relatively simple tasks.

Writing little Emacs Lisp functions—combining more abstract built-in Emacs Lisp functions—feels a lot like chaining shell command together, but better.

discuss

order

No comments yet.