Rust Contribution
      • 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 New
    • Engagement control
    • Make a copy
    • 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 Note Insights Versions and GitHub Sync Sharing URL Help
Menu
Options
Engagement control Make a copy 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
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Rust Macro WG Sync meeting Oct. 6th 2023 - Date: Oct. 6th 2023 - Meeting: https://jitsi.member.fsf.org/wg-macros - Participants: - @vincenzopalazzo - @danielhenrymantilla - Lukas - Arthur ## Topics <details open><summary>vincenzopalazzo</summary> - Q: What is the wg idea on how to organize the job - A: Moved the questionin another time after we run some experiments - Q: Discussion on wg-repository: https://github.com/rust-lang/wg-macros - A: We would like to try keep everything on the wg page, including meeting agenda ecc. But we keep also an hackmd for informat notes like this one. - Q: [Reading club idea](https://rust-lang.zulipchat.com/#narrow/stream/404510-wg-macros/topic/Macro.20Reading.20Club): https://hackmd.io/6kSbmyggT6eAy5uvdB6srA?both - A: All the people in the meeting think that this is a good idea and also help to see macros from other points of view. - A: Some example are: [wg-macro vision](https://rust-lang.zulipchat.com/#narrow/stream/404510-wg-macros/topic/wg-macro.20vision), https://rust-lang.github.io/wg-async/vision.html - A: Perhaps we shouldn't begin directly with other languages. Instead, we could first delve into the history of our macros: Why were they designed this way? Is this the finalized version, or were certain elements omitted? What was the initial objective behind macros 2.0? - Q: [issue triage](https://rust-lang.zulipchat.com/#narrow/stream/404510-wg-macros/topic/triage.20macro.20issues): https://rust-lang.github.io/wg-async/triage.html - A: We would like to discuss the issues that are already open and also to use this moment to see what sub-area of the macros we will take into consideration based on people's interest. So we start bigger and we restrict the area when we see that there is no interest in an area - Q: We should add the wg-macros to triagebot.toml - Q: Reason that we will be notify for every change to the macro subsystem - A: What does it mean macro subsystem? the macros are really spread across the compiler, so this may be difficult to track it down. However, this can help us to understand what people in the wg are interested in what area, and what area we want left for the future. So, the final answer is to start by being notified in most of the macros subsystem with the bot and then pruning the area when there is no feedback from the wg (assuming that there is work done by other people outside of the wg). </details> <details open><summary>cohenarthur</summary> the error for this example is lacking: ```rust pub mod foo { pub mod bar { pub mod baz { #[macro_export] macro_rules! m { () => {} } } } } foo::bar::baz::m! {} ``` [Playground link](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=c67ff569f6603908cc6311ca9d186532) this makes sense, because macros 1.0 path resolution rules is very different from regular item name resolution, but it could benefit from a better explanation and note, such as a hint to use `m! {}` instead (since the macro was exported) I started some work on this on my machine but hit a wall here: https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/manually.20creating.20a.20path.20starting.20with.20.60crate.3A.3A.60 looking to pick up the work eventually but as long as I can't figure out how to create this root path I can't advance #### Conclusion summary This is a proble that looks like a Pandora's box, there are previous problem that are similar and also impact this aread like https://internals.rust-lang.org/t/pub-on-macro-rules/19358 However, due that Artur do not find any help on the general rust chat on zulip, we can resurrect the chat on the wg-macro stream and also Vincent can help with this because I was already on macro resolution code in the past. In conclusion, we discuss if it is workted spend time of improve usability on the currentl macro rule instead of moving directly to macros 2.0. As the idea of spend time on a subsystem that eventually will be replaced in the future sounds a not a good place where spend times, we think also that improve the current macro_rule in any way can help us to undestand what we want in the macros 2.0 (also reading club can help here). </details> <details open><summary>Daniel</summary> On my end it's mostly pondering about these kind of 80-20 (Pareto principle) macro features which could already go a long way. - generics may be too big of a topic for a first call, so we may want to punt on talking about it for now; - the `:empty`, or more generally, `:verbatim[tokens here]` matcher, however, seems more tractable ```rs macro_rules! example {( $($unsafe:verbatim[unsafe])? fn … ) => ( $($unsafe)? fn )} ``` Also, disclaimer that I don't know how much I may be contributing to actual compiler implementations myself, since I'm not necessarily well acquainted with compiler code; I talk and contribute mostly off _user_ experience with macro usage. #### Conclusion summary Where do we start? Perhaps beginning with a topic like the first point might not be ideal for the wg, especially since we're just getting started. However, reflecting on the challenges of the current macros system, as mentioned in point 2, would be beneficial. At the same time, we should prioritize usability and diagnostic improvements. </details> <details open><summary>Lukas</summary> I've been busy with trying to ~~shove~~ implement Hygiene into rust-analyzer, so far rather unsuccessful, so nothing to raise from my side. #### Conclusion summary We discuss a little bit macros resolution in rust analyzer and Hygiene, just generic chatting. </details> --- ### Appending Some generic chat that do not fix in the topic section are the following topics: - Chatting about the experimental feature that are in the compiler from 2014/2015. We would like to research them and at the end of the wg year made a report to the t-compiler if they are intersted. - What does gccrs with macros 2.0? gccrs should implement it because are implemented in rust 1.48 ## New zulip stream chats - allowing derives on non-ADTs https://rust-lang.zulipchat.com/#narrow/stream/404510-wg-macros/topic/allowing.20derives.20on.20non-ADTs - Repetition operator mismatch between transcriber and matcher: https://rust-lang.zulipchat.com/#narrow/stream/404510-wg-macros/topic/Repetition.20operator.20mismatch.20between.20transcriber.20and.20matcher - Spitballing: `:empty` matcher: https://rust-lang.zulipchat.com/#narrow/stream/404510-wg-macros/topic/Spitballing.3A.20.60.3Aempty.60.20matcher

    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