2 ms·
Nice to see an alternative to dealing with bash, though was wondering why a shell based on a proper language like python wasn't considered
by eviks 4y ago
Nice to see an alternative to dealing with bash, though was wondering why a shell based on a proper language like python wasn't considered
- biggestlou 4y agoI know that Python builders do exist out there. Personally, I've found Nushell much more concise than Python et al and quite adequate for the task at hand. But who knows, maybe I should do a whole series :)
- 0x69420 4y agoi do not want my shell to depend on whatever idea of package management python has this week, nor do i necessarily want to warm up the jit of a ~proper~ general-purpose scripting language in the process of execing a one-line script
- pxc 4y agoBecause the main business of most Nix builders is shelling out to external programs, and for that there isn't anything that's a better fit than a shell language. At the same time, the whole mission of these next-gen shell languages (Nushell, Elvish, Oil, Crush, Murex, NGS) is to provide a language that is at once a shell language suitable for daily interactive usage and a capable, general purpose programming language in its own right. Truthfully, I don't think a better fit exists for this use case than one of these shell languages.
- eviks 4y agoBut Python is also a shell language suitable for daily interactive usage, e.g., within a python-based shell called xonsh, so the naming alone doesn't explain much re. which of the next-gen shell languages are better suitable
- pxc 4y agoImo if you spend a little while using a shell like Xonsh or Ammonite, it becomes clear why the internal DSL approach is not as suitable for this as a new language that is designed with interactive shell usage in mind from the start. (Lisp-y languages might be a bit of an exception since command invocations are very close to the same thing syntactically anyway. But idrk since I've never tried using an internal DSL in a Lisp as a Unix shell.) But sure, some people do use and love Xonsh, and you could make the case for using a Xonsh builder in this way as well.
- pasc1878 4y agoFor an better shell language that also allows extension in python see xonsh