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-11 ## Attendees - Stefan - Reilly - Darren - WindSoilder - Michael - Jakub ## Agenda - Short update how the release was going - Directory as a module / project structure - popular request: drop completions files to a directory - Subexpressions (and other cases) not preserving pipeline metadata - we need to preserve the metadata when pipeline transforms into a value - metadata is not used often (only for LS_COLORS and something with html) - context: https://github.com/nushell/nushell/pull/7689 # Discussed Topics ### Release nu-release script needed some tweaks due to dependency ordering Let's try out Jakub's script next time and maybe move it to CI Smooth sailing with the release notes Lots of button-pressing First release ever that JT didn't do. Surprisingly few complaints about breaking changes! ## PR https://github.com/nushell/nushell/pull/7621 Some escape logic needs to be checked Failing to parse a record causes failing parse as closure Possibly related subexpression/parenthesis parsing weirdness ``` # This is fine touch a) let x = (open a)) ``` ## Directory as a Module Currently you need to specify each file you want to import (very much C style) (even Rust supports some flexibility in the modules?) Would be great to make the config modular by having just folders for completions/themes etc. Q: Darren will this bring us closer to requiring/supporting namespaces? Do we need special namespacing syntax? Q: WindSoilder Would we have to introduce visibility modifiers? Every file (and its child symbols would be public). (Jakub: could this be addressed by being picky with the directory structure in your project) ``` viking/ +- spam.nu +- eggs.nu ``` ``` # viking/spam.nu export def foo [] { 'foo' } ``` ``` # viking/eggs.nu export def bar [] { 'bar' } ``` ``` > cd viking > use spam.nu > spam foo ``` ``` > use viking > viking spam foo foo > viking eggs bar bar ``` ``` > use viking/* # with slash > use viking * # without slash > spam foo foo > eggs bar bar ``` ``` > use viking/spam.nu foo # with slash > use viking spam.nu foo # without slash > use viking spam foo # without slash or explicit filename (conflicts with current system) > foo foo ``` ``` # should this even be allowed? > use viking/* [foo bar] # with slash > use viking * [foo bar] # without slash > foo foo > bar bar ``` ## `main` in a module Could we export the core command `main` of a module as a command with the name of the module use-case `help` command: subcommands you can not define main command and subcommands in the same module (as modules are structured like subcommands) ``` # spam.nu def foo [] { 'foo' } export def main [] { foo } ``` ``` > use spam.nu > spam foo > nu spam.nu foo ``` ### Related: `main.nu` ``` viking/ +- main.nu ``` ``` # main.nu export def main [] { 'foo' } ``` ``` > use viking > viking foo ``` `main` would be a special name (as it already is) similar to `__init__.py`/`init.lua`/`index.html` Would be a good starting point to expand your config from a single module to bigger Remark Darren: loading order would become relevant (especially for the config) - Suggestion Jakub: define a order in a static startup script? ## `ENV_CONVERSIONS` They don't work in the `config.nu` file They will become active after `config.nu` is sourced This leads to complexity when you want to work with PATH variables in the config (most likely place to do that!) Darren: do we want to have a more descriptive structure to the root config files that consists of a file that invokes a bunch of scripts in a particular order (would get rid of the existing split of `env.nu`, `config.nu`) Ex: `config.nu` ``` source envvariables.nu source themes.nu source completions.nu ``` Jakub: would this make this readonly? Would we need to passes to get around the explicit parse/eval split Concluding remarks from Michael: it would be cool if we could come up with a solution to address the `ENV_CONVERSION` extra complexity (JT also had some ideas floating around for config separation) ## PR [metadata for ls colors](https://github.com/nushell/nushell/pull/7689) Dealing with the metadata throughout execution is a larger problem Currently we have **Pipeline**metadata, this breaks down as soon as we have to convert to a value (e.g. the result of a subexpression or binding to a variable with `let`) PR suggestion was to introduce a Value variant with the metadata to wrap the inner value But this would be a dangerous refactor to do as most commands `match`/`if let` on exact type specific `Value::...` variants and the wrapper would go through the fall through -> consequence/observation: **We should be doing less matching on `Value` in "application/command" code. Instead make the operations dealing with an opaque `Value` through methods/traits** Also some understandable resistance on our part on introducing another field on `Value` (see the despanning desires) Discussed alternative to introducing a new variant: using a custom value - Pro: uses a trait object (already opaque through that) - Con: still could fail in many `match`es Discussion touched on trying to solve the span difficulties and duplication as well Mentioned: - `Rc<>` the metadata - Sharing an object on the heap or the nushell stack that carries both span and optional metada. Refer to it either through a pointer or a hand rolled index. (Maybe have the metadata itself living in a hashmap) - Again first step would be to have less matches we need to refactor on every experiment.

    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