Simon Willison Profile picture
Feb 2 7 tweets 3 min read
Whoa. webvm.io runs a full Debian VM entirely in your browser via WebAssembly... and it ships with working Perl, Python, Ruby and Node.js!
It has gcc too! This works:

gcc -o helloworld examples/c/helloworld.c

And it looks like there's a virtual filesystem that stores state in your browser
Combine this with:

- JupyterLite jupyterlite.readthedocs.io/en/latest/_sta…
- SQLime sqlime.org

And it looks like one of the killer apps of WebAssembly is providing 100% safe and reliable teaching environments for people who are just getting started learning complex technologies
Watching webvm.io load is interesting - it only needs loads 5.65MB to get to the interactive bash prompt, but any time you run other commands it fetches more data as it reads from the remote read-only filesystem

It loads another 5.37MB to get a Python 2 prompt
Looks like the tech underpinning this isn't open source (yet?) leaningtech.com/cheerpx/
Here's an open source project that may be able to achieve a similar thing
If you're interested in more examples of interesting applications of WebAssembly my blog now has 16 items under the WebAssembly tag, going back to 2018 simonwillison.net/tags/webassemb…

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Simon Willison

Simon Willison Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @simonw

Jan 12
Want to know the secret to blogging more often?

Lower your standards!

A post which you don't think is ready yet is a LOT better than a giant folder full of drafts that no-one ever gets to see

(Your readers won't ever know how good the thing you wanted to write would have been)
I like to apply this classic Reid Hoffman startup/product advice to my writing, because the alternative is basically never publishing anything at all
One of the biggest productivity improvements I ever made to my blogging was when I gave up on my desire to finish everything with a sparkling conclusion that ties together the whole post

Now I embrace abruptly ending when I've run out of things to say instead
Read 5 tweets
Jan 11
I've been solving so many documentation problems with @nedbat's cog tool recently - it's fantastic for keeping documentation automatically up-to-date, in Markdown or rST)

Here's a new page of sqlite-utils docs showing --help for every CLI command! sqlite-utils.datasette.io/en/latest/cli-… Partial screenshot of that ...
And here's how it works - I have a cog code block embedded in the .rst file which iterates through the commands and calls --help on each one, then writes the output to the page:
github.com/simonw/sqlite-… .. contents:: :local:  .. [...
Final trick: my GitHub Actions test.yml file calls "cog --check docs/*.rst" to confirm that the cog scripts have been run

If the test fails, I can run "cog -r docs/*.rst" to execute them, then commit the result. github.com/simonw/sqlite-…
Read 7 tweets
Jan 11
What’s new in sqlite-utils - annotated release notes for my SQLite Python utility library and CLI tool, v3.20 and v3.21 simonwillison.net/2022/Jan/11/sq…
A bunch of powerful new features in these releases.

The new --convert option to "sqlite-utils insert" lets you run a Python conversion function against data you are importing from JSON or CSV - and --lines lets you import raw lines of code (e.g. from log files) too
Combining the new --text option with --convert lets you load in a full unstructured/semi-structured file in one go and use a Python fragment to parse it into a list of dictionaries which then get inserted into a table
Read 8 tweets
Jan 11
If you're interested in FARA I have a Datasette instance that uses data from the latest released CSV files running here fara.datasettes.com
I'm also running a Git scraper against FARA - here's the latest commit from four hours ago github.com/simonw/fara-hi…
Read 4 tweets
Jan 10
This made me think about my sqlite-utils Python package: pypi.org/project/sqlite…

It works as both a CLI tool and a Python library, and has a small number of dependencies

I want "pip install sqlite-utils" to do the "right thing" - but what's the right thing?
If you are using it as a CLI tool I want it to to be guaranteed to work - if you install it you should get known tested versions of those dependencies
But... if you are using it as a library I want to let you make your own decision about those dependencies - if you want to use a more recent release of one of them you should be able to do that

If I explicitly pin to tested versions will that break your ability to upgrade them?
Read 7 tweets
Jan 9
TIL numeric tweet IDs these days exceed the maximum safe integer value for JavaScript, which is:

9007199254740991

A recent tweet of mine had ID:

1480304129792643072

Anyone know when that tipping point was reached?
I spend most of my time in Python and SQLite which don't have this limitation so I'm only just catching on
This is actually covered in the Twitter API docs: developer.twitter.com/en/docs/twitte…

"Numbers as large as 64-bits can cause issues with programming languages that represent integers with fewer than 64-bits. An example of this is JavaScript, where integers are limited to 53-bits in size." Numbers as large as 64-bits...
Read 5 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

:(