top | item 34726386

(no title)

mkingston | 3 years ago

Thank you! I've been using Nushell for a couple of weeks and at this point I don't see myself going back. Modern configuration. Great interactive usage (structured data, mostly!). I thought I'd like it, but more so than expected so far. The one shortcoming I've encountered so far is that some built-in functions seem to buffer all their input before producing any output, meaning I can't e.g. tail + filter logs. A fairly simple example:

    journalctl -xefu systemd-networkd-wait-online.service | lines | filter {|in| $in =~ 'start'}
only produces output when I interrupt (ctrl+c). Is this expected?

discuss

order

ripley12|3 years ago

Ahh, streaming. This is an area I've been working on; there are still lots of places where we collect data when we should stream it instead. In general, if you think "that should be able to stream" but it doesn't, that's probably a bug and worth filing an issue.

I can reproduce your issue, I suspect that `filter` is collecting its input when it shouldn't. It's not totally clear why from looking at the code.

If you can file an issue that would be appreciated, if not I'll try to do so later today. We have a tag for streaming issues: https://github.com/nushell/nushell/issues?q=is%3Aissue+is%3A...

mkingston|3 years ago

Thanks for the reply. Upon further inspection, it looks like it's `lines`. It might also be `filter` but I haven't quickly come up with a way to determine whether that's the case. I opened an issue:

https://github.com/nushell/nushell/issues/8016

I couldn't apply labels myself, I don't think.