Python in Browser

Snakes around Jupiter

When I first heard about python interpreter in browser via PyScript in 2022, I was like: that’s coooool… but why???

It feels like the opposite of Node.js: Node.js brings javascript to server, and PyScript brings python into browser. While the async nature of javascript makes it solid for backend development, I couldn’t see a good reason for bringing python into frontend on client side. Data and machine learning are use cases where python really shines to my experience, and they seem to have very minimal overlaps with frontend or browser.

However, it turned out that I totally missed the potential of this work. Talented developers have put efforts into this direction for years, and made JupyterLite, a full static Jupyter distribution that runs in browser. This great work has inspired me and made me see what could be achieved.

Read More

Castles on the Sand

TV screen

Recently I came across a very interesting book by Michael Pollan, How to Change Your Mind, and a documentary based on the content of the book. It offers the author’s study and investigation on some psychoactive chemicals as a professional writer and journalist. The book and the documentary, especially the documentary, holds an agressive propaganda, which might be agreed or disagreed by the audience. Except for its political purpose, this work focuses on some controversial knowledge at first hand, which is quite valuable in the context of psychology and cognitive science in my opinion.

Read More