Diggy Newsletter #4
Howdy! Hope you are staying safe and sane during these times.
It took me longer to write this update, and here’s why. For the last weeks, I’ve been working like a beaver on async functionality for a WASM kernel, and I’ll be frank with you. It’s hard. I feel that I’ve almost reached the point when I’m hitting a nasty wall and need to take a little step back. While it feels great to drive an experimental project on cutting-edge technologies and run Python reactively in the browser without relying on server-side code; in reality, it’s a rabbit’s hole.
Anyway, I recently released a few enhancements to the Diggy:
- I largely changed a dashboard screen. Now you can create drafts that will be visible for your eyes only, and only once it’s ready you can publish them as a public notebook if you want. You can group notebooks to collections, which is useful for writing a series of articles or a book. For example, here’s my public profile page with a few collections: https://diggyhq.com/@kirill
- Stdout is printed right below each cell, no need to scroll to the terminal at the top anymore. https://diggyhq.com/@kirill/notebooks/cowsay
- Added an example which shows how to load a pip library. As long as wheel is available, Diggy should load it to a WASM kernel just fine (of course, assuming there are no exotic C dependencies): https://diggyhq.com/@kirill/notebooks/how-to-import-a-library
Also, I’d like to give a shout out to Nicky van Foreest who is working on Queueing Theory and Simulation course and recommended Diggy as one of the tools that could help students run Python to work on exercises. Check it out, I think it’s cool: https://github.com/ndvanforeest/queueing_book
What’s next? I’m exploring Firecracker micro VMs to initialize Python kernels. I really like it so far, and I’m getting promising results. Firecracker VMs have a tiny footprint and can be initialized in less than a second. It is comparable to what it takes right now to initialize a WASM kernel in the browser.
What is a Firecracker? Simply put, it’s a lightweight VM, which is how AWS runs Lambda, function-as-a-service platform. Firecracker is optimized for a) speed and b) security. Firecracker VM implements the minimal number of concepts required to run a Linux instance.
While this may sound boring, er, yet another platform that runs containers under the hood, I see this as a much bigger and exciting opportunity to help people learn Python in a browser, and keep it as close as possible to something they can run locally. I expect that other languages could be supported much easier in Firecracker than in WASM. One can run a native binary in a micro VM instead of churning through cross-compilation to a web assembly, which also opens a few doors to other experiments.
Cheers. Stay safe and healthy and all that!