Live data from Hacker News

Nushell.sh ls | where size > 10mb | sort-by modified

nushell.sh

111–120 of 215 posts

Re: Nushell.sh ls | where size > 10mb | sort-by modified

#112
post #108

So, '>' isn't for redirection anymore. How does one do that? open foo.txt | append "world"| save --raw foo.txt Oh.

Hm. Why not re-use "tee"? https://www.man7.org/linux/man-pages/man1/tee.1.html

`save` seems to be a general serialization command, which lets you save Nu objects in formats like JSON, YAML, and others. The `--raw` option seems like a convenience for enabling that tee-like usage without relying on external programs, but the driving use case is serializing structured data rather than unstructured text or byte streams.

Re: Nushell.sh ls | where size > 10mb | sort-by modified

#114

What's the story with not having a deb / flatpak / appimage or snap distribution? Just lack of resources to help package?

Don't think we've had any requests for those, but we'd welcome contributions if someone wants to make it happen.

For now, Homebrew works if you want a cross-distro way to install Nu on x64 Linux.

Re: Nushell.sh ls | where size > 10mb | sort-by modified

#115
post #109

I like the trend of commands adding json output. Then you don't need to get a new shell just incrementally add other commands than can process json.

> other commands than can process json

Happily, this includes import/conversion functions for new shells, so this plays nice with efforts like Nushell as well.

Re: Nushell.sh ls | where size > 10mb | sort-by modified

#116
post #109

I like the trend of commands adding json output. Then you don't need to get a new shell just incrementally add other commands than can process json.

Plus having less cryptic version of jq is a big win considering how often we all work with JSON files these days. It should be a 'primitive' in shells like strings.

Re: Nushell.sh ls | where size > 10mb | sort-by modified

#117
post #107

Earlier quoted context omitted.

Fair point. But how often do you make those kinds of changes in any of your scripts and not have to change anything? For me, exactly 0 times

Quite frequently? "Oh this operation turned out to take a while, I'll use pv instead of cat", or "oh what I grepped for wasn't in the current log, it's probably in the previous log that's gzipped, I'll replace 'cat current.log' with 'zcat previous.log'".

Sounds like you describe a interactive shell session, not stuff that happens in that script that was written for a specific purpose.

Re: Nushell.sh ls | where size > 10mb | sort-by modified

#118

I tried to use it as my main shell for a couple days, found it fun and potentially useful, played with its unique features... and eventually uninstalled it and went back to zsh. For 99.99% of what I use a shell for, Nushell doesn't do anything that I can't do with a regular shell. Maybe just because I'm used to shells/sed/awk/etc. For the few cases where Nushell could be useful, I can usually do the same thing with V…

What if someone starts from a clean slate. Which shell is better? That is the question. Old habits hold us back from progress in usability. Eventually if one system is better it should completely replace the old system. But only if it's better. What one power user deems as "useful" according to his own usage patterns shouldn't be a metric for measurement. I haven't played with nushell yet, but it actually seems more…

Fish is that shell for me. I tried nushell and zsh. zsh required a bunch of setup and nushell was too young. Whereas fish has really great defaults and enough of support to just go and have fun.

Re: Nushell.sh ls | where size > 10mb | sort-by modified

#119
This is fun, but reading the commands[1] reminds me of learning a new language. There are just too of them, and they are all pipelined in a functional manner so I need to understand the I/O of them. In that case, why would one bother remembering all of those, when Xonsh or IPython does similar job to their data, only with a few more lines of (more familiar) code?

[1]: https://www.nushell.sh/commands/

Re: Nushell.sh ls | where size > 10mb | sort-by modified

#120
My problem with alternative shells (anything not bash) is that I have to learn bash anyway, and if I want to use a scripting language that requires me to first install a runtime, drop into it, doesn't work on colleagues machines, etc. then there are many non-shell alternatives that are better. I'll learn nushell or whatever once a mainstream or somehow desirable distro ships with it as their default shell.
Post reply on HN