owned this note changed a year ago
Published Linked with GitHub

Nushell core team meeting 2024-04-17

Attendees

  • Filip
  • Ian
  • Stefan
  • Jack
  • Michael
  • Devyn
  • Andy
  • Wind
  • Jakub
  • Darren

Agenda

  • benchmarks
  • echo
  • #12344 use of -- and how to be consistent, re: #11435?
  • Any final thoughts on plugin commands?
  • Stepped ranges #12537: syntax change or possibly removal?

Discussed Topics

Benchmark

  • different frameworks available (Filip has several competing PRs)
    • divan
      • fresh
      • no file output
      • simpler code
      • manual work needed to compare changes (Filip built a manual parsing script)
    • criterion
      • old
      • statistics/file output
    • tango
      • really young
      • A/B testing of two commits/branches in parallel
      • (you can still run a single)
      • little bit more setup
      • supports file output
      • doesn't use proc macros
        Image Not Showing Possible Reasons
        • The image file may be corrupted
        • The server hosting the image is unavailable
        • The image path is incorrect
        • The image format is not supported
        Learn More →
      • not supported on Windows without nightly
      • Filip has been in active contact with the dev
    • callgrind
      • no current PR
      • not a library, not a Rust thing
      • would need a script
      • not timing-sensitive (should be more comparable)

→ Use Tango without git.

echo

change to the echo semantics stirring debates

previously trying to emulate bash expectations

  • if redirected just yielding a value
  • if bare trying to print

Strong muscle memory present for both

edge cases:

# echo and then echo in a closure, redirecting the whole thing
do { echo a; echo b } | lines
# this would have printed a and then returned [b]
# now it just returns [b]

reasons to use echo:

echo foo | save foo.txt
# rather than
"foo" | save foo.txt

# it makes lists
echo a b c # ⇒ [a b c]

-- arguments when invoking nu

  • argument quoting challenges
    • let's not build our own command injection risk
  • -- as a consistent marker for no more special (flags) parsing?
  • Should nu -c get special input?
  • step by step, devyn taking the lead

plugin family of commands (replacing register)

  • Plugin commands (register replacement) proposal
    • Devyn: probably be able to keep register for 1 deprecated release
    • plugin add would not have to be a hard parser keyword
  • packaging/distribution of plugins
    • nupm is designed with plugins in mind
    • plugins can be written in any language / arbitrary binary
    • uses a build script for nupm
      • you could hide a download in here as well (no guaranteed signature validation through that)
    • Jack?: pre-built distribution
      • security/build-infra?
      • target matrix to support (tier-1 targets and how to handle the oddbals)
  • custom plugin files for:
    • development
    • overlays/custom virtualenvs

nupm

  • General chat on supply chain security/challenges providing sound builds
    • worth comparing notes with
      • AUR
      • cargo folks
  • Darren: are we getting ready to include it with the standard library?
  • Jakub: registry work to share packages

.......... or the ranges

1..2..10
# is going with a step 1
# as the syntax is indicating the **next** element

counting vs striding style

  • counting: mathy continuation
    • e.g. haskell enumeration syntax
  • striding: define the step we take
    • e.g. Python's slice operator/range

This doesn't currently work:

Tool for slicing

[1 2 3 4 5 6 7] | range 0..2..6
# expect ⇒ [1 3 5 7]
Select a repo