Hacker News new | ask | show | jobs
by dllthomas 2158 days ago
Everything should be exposed to the shell, IMO, which isn't quite the same thing.
1 comments

Indeed, for example via OS IPC mechanisms like COM/XPC/DBUS/Binder, shared libraries.
While that's not what I had in mind, in principle yes.

That said, in my experience, trying to use a real programming language's REPL for shell-like things is (at best) almost as bad as trying to write a meaningfully sized program in a shell's language.

I've many times tried to pin down exactly why. I think it's mostly a matter of focus and the various affordances provided by the ecosystem that have in fact been developed over the past however-many years.

I wouldn't be terribly surprised if you've found a niche and setup where it works out great for you - the important things are compositionality and putting what you need close at hand.

You can do that relatively easy in the context of Apple and Microsoft platforms.
Sorry, I said a few things. Which "that" are you referring to?
Using Windows as example, have a REPL (e.g. Powershell, C#/F# interactive) that interacts with the OS via COM/UWP, DLLs, OLE Automation.

So you can from the confort of your REPL get the text selected in e.g. Excel, and use it as input for a function that was actually imported from a DLL for data conversions, for example.

Very contrived example, just to show my point.

Ya but who wants to use COM/XPC/DBUS/Binder?
With sufficient affordances - tab completion and whatnot - it might be fine?