nushell/crates
Nano 7b89fab327
Keep order for par-each (#10249)
# Description
This PR adds new flag `--keep-order/-k` for the `par_each` filter. This
flag keeps sequence of output same as the order of input.

Output without the flag:
```nu
> 1..6 | par-each {|n| $n * 2 }
╭────╮
│  4 │
│ 10 │
│  2 │
│  8 │
│ 12 │
│  6 │
╰────╯
```

Output with the `--keep-order` flag:
```nu
> 1..6 | par-each --keep-order {|n| $n * 2 }
╭────╮
│  2 │
│  4 │
│  6 │
│  8 │
│ 10 │
│ 12 │
╰────╯
```

I think the presence of this flag is justified, since:
- Much easier to use than `.. | enumerate | par-each {|p| update item
..} | sort-by index | get item`
- Faster, as it uses internally parallel sorting in the same thread pool

A note about naming: it may conflict with `--keep-empty/-k` flag of the
`each` filter if the same feature will be used in `par-each`, so maybe
it needs some other name.
2023-09-11 06:42:09 -05:00
..
nu_plugin_custom_values Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
nu_plugin_example Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
nu_plugin_formats Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
nu_plugin_gstat Bump git2 from 0.17.2 to 0.18.0 (#10207) 2023-09-04 21:10:25 +00:00
nu_plugin_inc Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
nu_plugin_python remove vectorize_over_list from python plugin (#9905) 2023-08-03 16:46:48 +02:00
nu_plugin_query Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
nu-cli Make cursor_shape optional (#10289) 2023-09-09 13:42:36 -05:00
nu-cmd-base Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
nu-cmd-dataframe Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
nu-cmd-extra move math constants to standard library (#9678) 2023-09-05 19:32:31 +02:00
nu-cmd-lang Bump itertools from 0.10.5 to 0.11.0 (#9524) 2023-09-08 23:12:45 +00:00
nu-color-config rename the types with spaces in them to use - (#9929) 2023-09-06 13:22:12 -05:00
nu-command Keep order for par-each (#10249) 2023-09-11 06:42:09 -05:00
nu-engine rename the types with spaces in them to use - (#9929) 2023-09-06 13:22:12 -05:00
nu-explore Start removing colour config from explore (#10270) 2023-09-08 07:34:47 -07:00
nu-glob bump nushell to dev version 0.84.1 (#10101) 2023-08-23 15:23:27 -05:00
nu-json bump nushell to dev version 0.84.1 (#10101) 2023-08-23 15:23:27 -05:00
nu-parser Bump bytesize from 1.2.0 to 1.3.0 (#10306) 2023-09-11 09:55:21 +00:00
nu-path Support Termux (#10013) 2023-08-28 09:53:25 +03:00
nu-plugin Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
nu-pretty-hex Remove Cargo.lock in subcrates (#10280) 2023-09-09 00:45:43 +02:00
nu-protocol Make cursor_shape optional (#10289) 2023-09-09 13:42:36 -05:00
nu-std change LOG_FORMAT to NU_LOG_FORMAT in nu-std library (#10254) 2023-09-06 10:17:14 -07:00
nu-system Remove Cargo.lock in subcrates (#10280) 2023-09-09 00:45:43 +02:00
nu-table Update crates-ci/typos and fix new typos (#10313) 2023-09-11 12:37:06 +02:00
nu-term-grid bump nushell to dev version 0.84.1 (#10101) 2023-08-23 15:23:27 -05:00
nu-test-support Fix unit tests on Android (#10224) 2023-09-05 20:17:34 +12:00
nu-utils Make cursor_shape optional (#10289) 2023-09-09 13:42:36 -05:00
README.md Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00

Nushell core libraries and plugins

These sub-crates form both the foundation for Nu and a set of plugins which extend Nu with additional functionality.

Foundational libraries are split into two kinds of crates:

  • Core crates - those crates that work together to build the Nushell language engine
  • Support crates - a set of crates that support the engine with additional features like JSON support, ANSI support, and more.

Plugins are likewise also split into two types:

  • Core plugins - plugins that provide part of the default experience of Nu, including access to the system properties, processes, and web-connectivity features.
  • Extra plugins - these plugins run a wide range of different capabilities like working with different file types, charting, viewing binary data, and more.