Post B9hmnYoLTu1Q9ADtGi by cks@mastodon.social
 (DIR) More posts by cks@mastodon.social
 (DIR) Post #B9hmTfeSL4U5ZR75Ae by wolf480pl@mstdn.io
       0 likes, 0 repeats
       
       @cks terminal - tty, a bidirectional text device supporting tty_ioctl, used by a user to interact with a program; sometimes also a program or physical contraption through which a user interfaces with a ttycommand line - an argv, an array of null-terminated bytestrings passed to a program on startup, through which a user or another program can pass arguments1/
       
 (DIR) Post #B9hmaFAnBRBNTaN9Zw by wolf480pl@mstdn.io
       0 likes, 0 repeats
       
       @cks shell - a program (usually controlled through a tty) whose primary purpose is to allow a user to spawn other programs and pass arguments to them (usually through command line), and combine those programs together (eg. through pipes)
       
 (DIR) Post #B9hmhJrq81ru3vsiUC by wolf480pl@mstdn.io
       0 likes, 0 repeats
       
       @cks A Python REPL can be a shell after you from subprocess import *, but it'd be a very inconveneint shell, as typing out all the arguments to subprocess.run can be quite tedious
       
 (DIR) Post #B9hmnYoLTu1Q9ADtGi by cks@mastodon.social
       0 likes, 0 repeats
       
       @wolf480pl My view is that gdb has a command line, among other programs, and they're not exclusive to shells. Vi ex mode is more or less a command line, etc etc.To me a command line is roughly "to do things you type words and they only take effect when you hit CR".
       
 (DIR) Post #B9idt1FEUKLtLoHsC8 by lanodan@queer.hacktivis.me
       0 likes, 0 repeats
       
       @cks For me:- Terminal in Unix is used to name two parts, the tty/pty service, and the final interface to the user doing text rendering + user-input- I take command line as an UI paradigm, that I dissociate with TUI ("fullscreen" software, almost "apps"). And typically CLI allows the Unix thing of everything being a data stream via simple usage of stdio.- Shell, as a glue language centered on interfacing with the rest of the OS (executables, files, …), with also a user-interface (such as job-control) to manage what it launched; As opposed to scripting languages which strongly tend to have their own isolated ecosystems (Python, Perl, …) or be part of one (in-browser JS).
       
 (DIR) Post #B9jZqfjpGyFZPaBN6e by suetanvil@freeradical.zone
       0 likes, 0 repeats
       
       @wolf480pl @cks I'd argue that it isn't a shell even then because a shell's default response to a command it doesn't implement is to treat it as an external program.It would be trivial to *write* a shell in Python tho that's mostly just a REPL but also does a tokenize+run on commands.(Of course, Python isn't a great language for this because the syntax limits you to what you can do one one line. Ruby or Perl or $LISP would be better choices.)