24 pointsby pstomi11 hours ago6 comments
  • CyLithan hour ago
    This is really neat, and I think I can use it in some of my projects as a simple front end to physical simulation tools. One question I have: do you have true 3D bindings? I see there is ImPlot3D, but right now I need to render meshes in OpenGL (or WebGL as the case will be). Is there a way for me to define shaders and feed it triangle soup?
  • 2ndorderthought7 hours ago
    Is this downloading and installing Python packages into the browser via wasm?

    I like the idea a little bit. Mostly because I don't like javascript. So I say keep going for it, it could fill some niches.

    I'm sure you know this, but the page takes like 30s to load on mobile. It wasn't a comfortable ux. Once it did load it seemed pretty fast though so kudos. Kind of gave me macromedia flash vibes from 2002.

    • pstomi7 hours ago
      Thanks! I don't like javascript either, and I certainly dislike CSS :-)

      Yes, the initial download of pyodide is about 5 MB. After that it is another 5MB for the bundle wheel.

      But there is some hope: Based on test I just did, I see I did not setup headers so that the wheel and pyodide are cached in a browser (or in its fs): this could reduce reload times by a sizable factor.

      Once loaded you can run at 60 FPS (or even 120 FPS depending on the browser's vsync).

      As you can see in the playground: you can then switch from app to app instantly once pyodide is loaded and running. It almost feels like going from a page to another. You can see that when using the combobox to select example at the top right in the playground.

  • austin-cheney7 hours ago
    I agree with the other comments. Its super cool after it eventually loads.

    For real world use I don't think its practical if its only goal is basic browser UX in Python versus JavaScript, but I can see amazing value in this for larger applications written in Python that need to make use of a Python GUI.

    • pstomi6 hours ago
      Absolutely. This shines when you actually want to display complex / animated / streaming data in larger applications; or if you want to create educative or training material on several pages (i.e apps here).

      As an example, I once built an online stock/ticker app with it: smooth real-time updates in a nice plot. It would have been more complex with DOM based widgets (and probably less fun).

  • gloflo8 hours ago
    If no JavaScript then what enables interactivity?
    • pstomi8 hours ago
      Thanks for the question! I should have said almost no JavaScript:

      There is a minimal amount of JavaScript just to download and run pyodide and then it is only Python: see example at

      https://imgui-bundle.pages.dev/playground/?demo=p_35_minimal...

      • fredcallagan7 hours ago
        Very very impressive! So many use cases for this. Thanks again
    • hagbard_c8 hours ago
      Web assembly? This started out as a bowdlerised form of JavaScript (asm.js) but evolved to become is own thing.
      • sheept7 hours ago
        You still need JavaScript to instantiate WebAssembly and let it interact with the page, which is why your sibling comment admits there's still a bit of JS.
  • 0gs6 hours ago
    just curious -- do yall dislike JS as developers, or as users? i agree this is really cool though
    • pstomi6 hours ago
      This is a genuine question, and I will be honest: I do not really dislike JS. I even worked on large typescript projects and appreciated it.

      What I do not like is the strange mix of technologies you have to cope with in order to work with Python on the web: your project is often a mix of python / html / css / react / js / node.

      Many very nice frameworks try to abstract this and present you only the python side; but they rely on this stack internally. Once you want to reach complex use cases (such as a refresh at reasonable rate), you will have to "open the engine" and enter into this mix.

    • xboxnolifes4 hours ago
      I dislike JS as a developer.... but I also dislike python, so...
  • 8 hours ago
    undefined