69 karma · joined June 15, 2016
Shell is a command-line interpreter with additional functionality like scripting. Why it should have fully functional REPL? Lisp/ST/etc are programming languages, they are uncomfortable for copying files, moving directories, calling curl or using tar.
> An approximation of it would be to have a shell that is a Jupyter netbook with access to the whole set of OS APIs, shared libraries and applications, with the ability to jump into the debugger at any given step of the pipeline, and redo the current step.
You can use python for this purpose. I don't understand why Unix shell should have all this functionality.
> I bet you saw GUI apps on UNIX workstations, though.
Yes, of course, I have GUI apps on my MacBook, but they don't use piping for inter-process communication because bi-directional pipes are not quite useful like an ordinary RPC.
Unix shells are quite good for their purpose. It's not a full-featured programming language. Can you explain what is "poor man's REPL"?
> Pipe based interactions work properly only across CLI based applications
Yes. If you want to find something in logs or looking at any other text data pipes is a good solution. In any other case(like binary data) it will be better to choose GRPC(or any other RPC). I never have seen GUI apps on servers, sorry.
> PowerShell or other Xerox inspired shells don't need kernel support to achieve their workflows.
Good for them :)
Actually, this comparison is not correct. Windows and Unix have a different philosophy of kernel<->user level interaction. While Windows tries to add all functionality to the kernel, Unix does this on user level. Remember the KISS principle. So If you comfortable with Windows OS level API it's good for you, but for Unix world, it's not necessary to do something because we already have a different inter-process communication approach.
dlcall
> Or interact with running applications using the OS APIs like Powershell allows with WMI, COM, OLE Automation and .NET?
Depends what you need. You can use nc -U /var/run/socket or pipes with expect. If you have root permissions you can use gdb scripting/ebpf to communicate with user-space/kernel-space data of your application.
> Yes, there is DBUS, but isn't really integrated across the whole stack.
DBUS is a bus for desktops/mobile. I never saw that someone use it for server applications. The main idea(after KISS) of the Linux shell is that if you can't write something in awk it will be better to use python. Actually, in the Linux world, GRPC/REST is more common than OS-level API.
I was studying assembly in the second year. What is the problem? It was really easy because in my early years I was writing 64k demos.
> or learning the basics of transistors, capacitors, signals etc.
It's the simplest part of all computer architecture. I think I can explain what is D flip-flop/transistors in one hour.
> Why does C++ have the "right amount" of abstraction, when it sweeps under the rug a vast body of physics and EE?
C++ has OOP, has a smart and raw pointers, STL(not the best, but better than C). Right now I'm working on a project where I need process more than 50Gb in 10 minutes. Python script uses 110Gb of RAM because there are no pointers. I don't know why the previous developer chose Python for this tool.
Sorry, I can't agree with you.
> I may not know what the +2 actually means with the -mtime argument. How would I change it to look for the age of two hours instead of days?
If you forget or doesn't know what is mtime, you can open man find. For less granularity than days use mmin.
ip addr show eth0 | awk '/inet/ { print $2 }'
Will be better ;) 'inet[::space::] ' not working with ipv6 addresses.But it's not bash, it's coreutils
find ./ -mtime +2 | xargs rm