Nu-core
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Help
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # Nushell core team meeting 2023-01-18 ## Attendees - Darren - Reilly - JT - Michael - Andres - Stefan - Keith - Jakub ## Agenda * Further discussion on a new nushell config system. Darren's attempt to spawn ideas fell short here https://hackmd.io/NfBoTWUeQhOTXoeKra437A ## PRs * add dedicated const in pipeline, const builtin var errors https://github.com/nushell/nushell/pull/7784 * convert SyntaxShape::Table into the corresponding Type https://github.com/nushell/nushell/pull/7781 * Remove deprecated --numbered flag from five commands https://github.com/nushell/nushell/pull/7777 * Fixes shell crashing because alias name is shorter than alias command and there are pipes present. (Fixes Issue 7754) https://github.com/nushell/nushell/pull/7756 * str length, str substring, str index-of and split chars now use graphemes instead of UTF-8 bytes https://github.com/nushell/nushell/pull/7752 - It seems like we've reached a tipping point where we mostly agree that a `--grapheme(-g)` flag should be used but the further discussion suggested by Leon is to make the default bytes vs grapheme configurable. How do you feel about that part? * Reilly: would vote against configuration. we have too much of it already, adds another combination of config to test * Reilly's LazyRecord PR https://github.com/nushell/nushell/pull/7619 * Reilly: I'm OK if we decide that we don't want another Value variant. IMO this was a successful experiment and a nice performance improvement, but it's OK if we decide that this isn't the right long-term approach. * The rest of the older PRs probably need another look at and ping the OP to see if we need to close them or if they still plan on working on them. ## External PRs * Hopefully Windows Terminal flickering will soon be a thing of the past. In case you haven't seen it. https://github.com/microsoft/terminal/pull/14677 * The vscode nushell extension PR is going to be epic! https://github.com/nushell/vscode-nushell-lang/pull/73 # Discussed Topics ## Config system discussion Darren's comparison of different possible paths https://hackmd.io/NfBoTWUeQhOTXoeKra437A Kubouchs suggestions https://hackmd.io/@nucore/BJpziLNsj Current problem two separate config files: `env.nu` and `config.nu` -> could we bridge the difference or make it more easy to understand Current configs grow really large and get messy (error messages are hard) -> Pro splitting into more atomic parts Also handling of fall-back default config if user deletes config or if config is broken Have an easy understandable logic to understand how configuration is loaded with good default experience without needing a PhD to configure nushell Declarative config (toml, nuon etc.) Scripted config (much greater flexibility but some challenges and order matters much more plus cost of evaluation) We want to be able to break the config into easily digestable chunks (e.g. `keybindings.nu`, `hooks.nu`, `themes/my-theme-dark.nu`) Easy orderable parts and hard to order parts (`NU_LIB_DIRS`, `ENV_CONVERSIONS`) As mentioned last meeting: Path/PATH conversions for a bunch of variables (currently special sauce) Jakub: could this just be a command that gets invoked based on a closure *Curveball:* How strict do we want to keep the parse eval split JT: can we start breaking up `config.nu` into smaller scripts `keyboard.nu`, `theme.nu` etc. Important point by Michael: How do we ship the default or example config and make sure user can upgrade seemlesslyo Requirement: Set up a good default! Currently if we try to source a non existing file we error Suggestion by Jakub to have a module level mechanism to have export symbols you could query Smallest `custom.nu` (user defined) as possible for folks starting out ## Unicode and encodings https://github.com/nushell/nushell/pull/7752 Breaking change that would change the semantics of indices into strings Currently we closely map rusts `&str`/`String`: - Everything is encoded as UTF-8 - Indexing through byte (slices) for `O(1)` constant time operations - Iterator operates over `codepoints`/`scalars` from the Unicode encoding definition - diacritics + base character can be two codepoints or more - Emojis can be a wild composition of multiple codepoints - `split chars` command in nushell - Operation is cheap as UTF-8 encoding says how many bytes a codepoint uses. Graphemes are the unit relevant to typesetting or language understanding. - https://manishearth.github.io/blog/2017/01/14/stop-ascribing-meaning-to-unicode-code-points/ (Great primer on that by Manishearth from Rust/Unicode fame) - We should support our users to split by them or search for them properly - https://unicode-rs.github.io/unicode-segmentation/unicode_segmentation/index.html Risk of breaking changes high as different semantics might be expected for different situations! (e.g. `\r\n` is it one "character" or two?) **Decision:** lets first start supporting graphemes at all and revisit breaking changes at a later date Note: We are making strong assumptions by using UTF-8 strings in some places (e.g. file/path names can have different restrictions and be just bytes) We currently paper over those difficulties by heavily using [`from_utf8_lossy`](https://doc.rust-lang.org/std/string/struct.String.html#method.from_utf8_lossy) that replaces bytes that are not valid UTF-8 with a replacement (so bit twiddling string ops are safe) This allows glosses over invalid byte level indexing in nushell with those pesky question mark characters ## LazyRecord and friends Reilly implemented `LazyRecord` Goal: accelerate stuff like the materialized `sys` or `$nu` record Has to clone the engine state at a particular time **Laziness is cool!** Idea: lazy table for stuff like `ps` or `ls` with lazy loaded column Impl details: new variant on `Value` matching for the record manipulating commands necessary (methodification of Value should be a goal!) Sentiment: let's land and look for problems and opportunities `$nu` gets much faster and thus nushell is starting up quicker!!! Q: are we missing a match that currently hits the default fall through (PITA to track down) Relationship to the metadata PR discussed in the last meeting We consider the lazy record to be the experiment to prove out laziness and more semantic extension of `Value` We need to do some refactoring before we can easily continue to work on metadata or removal of spans for Value.

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully