Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

One of the other responses mentioned Nushell, which is a direct substitute for PowerShell in a meaningful sense: an interactive shell, structured pipelines, formatting as the final step of a pipeline, etc...

Anything else tends to be either a random bag of unrelated tools sticky-taped together, OR a heavyweight programming language.

The equivalent of JavaScript or Python is C#, CS-Script, or F# Interactive. Those are also full-featured programming languages.

I can process files in just a couple of lines of C#, but I still reach for PowerShell when doing this kind of thing unless I really need higher throughputs or complex processing.



I feel like ZX has these features already. Rather than choosing to believe there is a meaningful unbridgeable hard fast line, I think it's beneficial to consider case-by-case what features & capabilities are important & what enables smooth, light operation.

Node still isnt `perl -pie` level easy & hybrid, but again I think it's altogether pretty slick & simple with zx today.

The interactive repl doesnt look like a shell but it has quite advanced editing, comes out ahead in many ways (value previews). There's no ability to generate new autocompletion capabilities in the built in repl, but one could potentially yse an IDE and LSP with a repl. The potential for non-monolithic shells is interesting, that a shell might be separated into editor, engine, & plugins.

There is pretty ok pipeline handling via streams, which finally have decent & well embraced standards. https://github.com/google/zx/blob/main/docs/pipelines.md

Formatting as final step Im not as familiar with but it sounds like one could easily map or swizzle their stream output pretty easily. Particularly with better ndjson I think the potential here is high.

Overall I think there are distinctions, characterizations between shell and other languages, but it's less inherent to me; we simply havent spent much effort identifying what it is that makes operating the command line easy, flexible, and have even less work trying to port those ideas & riff off them. Even an early simple thin standard library like zx achieving so much success at becoming putty or glue, alike a shell, so quickly, indicates to me that it's worth doubting our long held certainty that these things are absolutely apart & different.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: