Joel Dice
    • Create new note
    • Create a note from template
      • 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
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me 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
    • Save as template
    • 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 Create Help
Create Create new note Create a note from template
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
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me 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
    # Python Component Tooling Meeting 2023-03-10 ## Agenda - Introductions and interests - What should we work on? - Proposal: Python equivalent to [componentize-js](https://github.com/bytecodealliance/componentize-js), including: - Runtime (e.g. CPython + wasi-sdk + component adapter) - Binding generator (similar to [js-component-bindgen](https://github.com/bytecodealliance/jco/tree/main/crates/js-component-bindgen)) - Shim tool (e.g. reuse, modify, or parallel [spidermonkey-embedding-splicer](https://github.com/bytecodealliance/componentize-js/tree/main/crates/spidermonkey-embedding-splicer)) - Anything else? - Divy up the work ## Notes Joel: Fermyon, wants to help make BA Python->Component tools Bret: VS Code, Python core developer for 20 years, steering council, in charge of WA in python Calvin: want a native dev env in browser for CM Kevin: SingleStore; python guy there; UDFs, UDAs, want python, lua, ruby, etc. after C and Rust. Working on third party C python extensions, e.g. numpy, pandas. Struggling with circular imports. Compiling and linking works. Jamey: WA team at Fastly. Busy focusing on JS, Go, and Rust right now, but curious about Python work. Do we want both dynamic and static bindings? CM wants you to declare interface statically, but you can build a dynamic interface on top of that if you want. Writing UDFs in Jupyter? Could use canonical ABI type serialization if you want, but that's no better or worse than others, since the host won't be aware of it. Static vs. dynamic linking extension modules? No official story in Python-WASI land yet for dynamic linking. Everyone's currently using "built-in", statically linked module. Dream is the CM allows equivalent to dynamic library linking. Would like to make each dep a separate component which can be linked with app. Each release of Python changes interface; would need component for each "wheel". Will shared-nothing CM mesh with extension modules. Python already moving toward shared-nothing model, but it's opt-in for now. Theoretically, it's doable. Not everyone has opted in yet, though. Maybe need a proxy C API for CPython? Can we model it as a world? Currently very simple dlopen-based, call-a-function model. Data science world is very old-school and messy (cf Fortran). Pandas has like 40 C extensions, Numpy has a bunch. What about static name collisions? Fortran name restrictions are small, so collisions more likely. Have to edit source to change names. Less of a problem for dynamic linking. Calling between components has a cost (allocation, copying). Might not want extensions separate from interpreter. Whole point of C/Fortran extensions is performance, after all. Can we ship wasm-ld as part of the componentize tool and let them choose which pre-compiled extensions they want to pull in? Any options for AOT'ing Python to Wasm? Can do "freezing", AKA embedding bytecode. Bret giving talk about minimum viable Python. Fastly is experimenting with Wizer-based interpreter loop unwrapping to make a compiler out of it. MicroPython is restricted. Standard library: 200+MB module sizes suck. Wizerizing can help, but is dangerous because you might not touch everything you need at init time. Can freeze just bytecode, not source, which might cut size in half? Are there ways to feature flag std lib? Not really -- that's not how it's designed, and there are a lot of interdependencies. There's a module-finder tool to generate an import DAG. Import search paths are dynamic, so static analysis is tough. "It's an exec call". Django apps do a lot of dynamic imports e.g. by strings. !PEP11 describes tiers. Want to make WASI Tier 2 (it's tier 3 now). Want to differentiate vs. emscripten, which has different goals. Would like WASI download on python.org for 3.12 or 3.13. Toolchain compatibility needs to be considered, but new minor releases can move to new toolchains. Might want to stick with given wasi-sdk version for given Python minor release. Usecases Python community are interested in: browser execution, expecially education (new python users wanting to play with it without installing anything). E.g. Pyodide and Jupyter lite. Does Wasm allow more platform-agnostic distribution? Need a WASI runtime installed, though. Could solve single binary cli app story? Is there a standard location for files for WASI apps? Doesn't matter much since we can virtualize, i.e. WASI doesn't care, so just pick one? But tools like IDEs might care, so follow what they want? Dot folder? Maybe we'll create a BA SIG for this at some point. Chat: 10:01 BC Brett Cannon Brett Cannon says:I can also give an update on where WebAssembly in CPython stands 10:11 avatar Calvin Prewitt Calvin Prewitt says:Anyone experiment with https://micropython.org/ ? 10:12 BC Brett Cannon Brett Cannon says:Not personally, but I know the person in charge of making that work with PyOdide (Emscripten) 10:12 avatar Calvin Prewitt Calvin Prewitt says:I have some communication with Peter Wang / Anaconda that is working on PyScript and experimenting with both runtimes: https://pyscript.net/tech-preview/micropython/index.html 10:15 BC Brett Cannon Brett Cannon says:Yep, specifically Nicholas Tollervey, who works for Anaconda, is driving the micropython work 10:16 ## Action items Brett will join BA Zulip Joel will schedule another meeting in two weeks and do more component tool research Kevin will keep battling numpy

    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