George Stagg

@gws.phd

Software Engineer @ Posit working on Open Source & AI. Maths. Physics. I like making things.

This article has some really great advice, especially in the agentic era where code can be rewritten quickly if needed. dannorth.net/blog/best-si... The author articulates things I feel intuitively about building software, particularly the idea of “as simple as possible, but no simpler”.

Best Simple System for Now

You can have your cake and eat it, as long as you bake it carefully. ‘We can do this the quick way and pay later, or the thorough way and pay now.’ This seems to be a fundamental dichotomy in software...

dannorth.net

Thanks to some joint work with @jeroenooms.bsky.social the latest dev build of webR now supports the {curl} package, along with many other packages that rely on it! 🎉 If you're able to use a WebSocket SOCKS proxy (outside of the browser), you can now use {curl} to make HTTP requests in webR.

🚀Quarto Live developer @gws.phd shows how to make interactive, explorable, & reproducible docs. #Python & R in the browser—no setup, no servers! ✅ Live coding exercises & auto-checking ✅ Works on mobile! 📺 Watch now → buff.ly/41BnAsT #Quarto #DataScience #WebAssembly

Quarto Live: WebAssembly powered data science learning | pyOpenSci

🚀 How Quarto Live Brings Code to Life in the Browser! 🌍✨Quarto Live takes interactive coding & publishing to the next level with WebAssembly-powered execut...

buff.ly

I have now also ported the color vision deficiency simulation app to Shiny live. Advantage is this runs entirely in your browser, even though you "upload" the image it never leaves your computer.

Recently I've been working on getting #polars running in #pyodide. This was a fun one, even requiring patches to LLVM's #wasm writer! Everything has now been upstreamed and earlier this week Pyodide v0.27.0 released, including a Wasm build of Polars usable in Pyodide, Shinylive and Quarto Live 🎉

A screenshot of a Pyodide REPL executing Polars code:

import polars as pl
import requests
r = requests.get("https://raw.githubusercontent.com/pola-rs/polars/refs/heads/main/examples/datasets/foods2.csv")
pl.read_csv(r.content).group_by("category").mean()A screenshot of a Quarto Live code cell executing Polars code:

import polars as pl
import requests
r = requests.get("https://raw.githubusercontent.com/pola-rs/polars/refs/heads/main/examples/datasets/foods2.csv")
pl.read_csv(r.content).group_by("category").mean()A screenshot of a Shinylive app using Polars code:

from shiny import App, render, ui
import polars as pl
from pathlib import Path

app_ui = ui.page_fluid(
    ui.input_select("cyl", "Select Cylinders", choices=["4", "6", "8"]),
    ui.output_data_frame("filtered_data")
)

def server(input, output, session):
    df = pl.read_csv(Path(__file__).parent / "mtcars.csv")
    
    @output
    @render.data_frame
    def filtered_data():
        return (df
                .filter(pl.col("cyl") == int(input.cyl()))
                .select(["mpg", "cyl", "hp"]))

app = App(app_ui, server)

I've written a series of blog posts about what I've been up to over the last few months! 📝 In the posts I talk about webR, R Shinylive, and a new Quarto extension for interactive code exercises. Take a look if you're interested in the latest for R for WebAssembly. www.tidyverse.org/blog/2024/10...

WebAssembly roundup part 1: webR 0.4.2 - Tidyverse

First in a series of blog posts about what's new in R for WebAssembly. The latest release of webR 0.4.2 is now available, with updates to the viewer mechanism, support for displaying htmlwidgets, an I...

tidyverse.org