Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

absolutely insane. seems like its installing pip packages and running localhost in the browser? I don't 100% grasp what is happening underneath the hood. But usually you would launch the local server, browse over to http://localhost to view it in your browser. This is running the web server inside Web Assembly inside your browser? Is it then possible to expose that local web server inside web assembly to the internet? Crazy stuff! looks like its possible to speed up the initial load time by using web workers, very much eager to see that in action.

    Loading...
    distutils already loaded from default channel
    Loading micropip, pyparsing, packaging
    Loaded micropip, pyparsing, packaging
    Loading ssl, openssl
    Loaded ssl, openssl
    distutils already loaded from default channel
    pyparsing already loaded from default channel
    Loading setuptools
    Loaded setuptools


That's pretty much what it's doing!

It runs everything in a web worker at the moment, not sure if there are optimizations I could make by running more of them in parallel?

It doesn't exactly run a localhost server. It uses a mechanism from Datasette's internals that lets you simulate an HTTP request through the Datasette application and get back the result. Then it sends that result back as a message from the worker to the parent page.

It's using this API here for that: https://docs.datasette.io/en/stable/internals.html#datasette...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: