Syntax - Tasty Web Development Treats

842: There's Python in my JavaScript! with Andrea Giammarchi

· Summarized

Share this episode
Anyone with this link can open it.
Share Link
Start at 0:00

Key takeaways

  • LinkDOM is a lightweight, server-side DOM implementation created by Andrea to address issues with existing libraries.
  • PyScript allows developers to write Python code in the browser, making Python's capabilities accessible to a broader audience.
  • WebAssembly provides a secure and portable runtime for executing code across different environments, enhancing multi-language support in web applications.
  • There is a growing movement towards integrating reactivity directly into the browser, improving UI responsiveness and simplifying state management.
  • The JavaScript ecosystem can benefit from standardized APIs and additional language features like native signals for better performance and usability.

Summary

Introduction to Andrea Giammarchi

The podcast kicks off with hosts Scott and Wes introducing Andrea Giammarchi, also known as WebReflection, a prominent figure in the web development sphere. The conversation highlights Andrea's extensive background in coding and his contribution to various pivotal projects, such as LinkDOM, a DOM implementation for server-side, popular among web scrapers.

The Journey to LinkDOM

Andrea recounts his journey from a backend developer in PHP to creating polyfills for web standards. LinkDOM was born out of his need for a lightweight DOM implementation to solve issues he faced with existing libraries. He discusses the unexpected popularity of LinkDOM and the responsibility that comes with maintaining a widely-used library.

Exploring PyScript and Running Python in the Browser

The duo delves into Andrea's current project, PyScript, which aims to run Python in the browser. Andrea explains the rationale behind wanting to run Python on the web, emphasizing Python's accessibility as a programming language especially for those in data science and AI fields. He articulates how PyScript can allow everyone—from kids to professionals—to harness Python's capabilities without needing to dive deep into JavaScript's ecosystem.

The Role of WebAssembly

Andrea elaborates on his use of WebAssembly (WASM) to facilitate the running of various programming languages in the browser, including Python. He describes WebAssembly as a portable and secure intermediate language, akin to ActionScript, but for modern web applications, allowing developers to execute code across different environments seamlessly.

The Future of Reactivity in the Browser

The conversation shifts towards ongoing discussions about building reactivity directly into the browser. Andrea shares insights about proposals like signals for fine-grained reactivity, which could simplify the UI development process by allowing components to react to state changes without unnecessary re-renders.

Improving the JavaScript Ecosystem

Andrea advocates for a more streamlined JavaScript ecosystem, discussing the importance of having standardized APIs across the browser and server. He mentions his wish for language features, such as a templating language like JSX, to become integrated into JavaScript, discussing potential improvements to TypeScript and the relevance of comments as types.

Sick Picks and Shameless Plugs

In the light-hearted final section, Andrea shares his passion for microcontrollers, specifically the ESP32, and reflects on the importance of simplicity in his projects. He encourages listeners to follow his progress on GitHub and on Twitter, where he shares insights about modern web technologies.

Sponsors

  • Sentry.io · Sentry.io makes it super easy to solve all your errors, telling you where they are and letting you fix them effortlessly. Sign up at Sentry.io-4-Syntax to get two months for free.

Show notes

Scott and Wes talk with Andrea Giammarchi (aka WebReflection) about his projects, including LinkDOM and PyScript, and the exciting future of running Python in the browser via WebAssembly.
Show Notes 00:00 Welcome to Syntax!
01:04 Andrea’s background and early work LinkDOM

07:25 Brought to you by Sentry.io

09:56 Pyscript

14:31 Why run Python in the browser?
20:17 Using WebAssembly to run different languages in JS
23:33 The advantages of WebAssembly
25:55 What excites Andrea about WASM Proposal: ESX as core JS feature

31:10 What is WASI?
32:21 Andrea’s experience with IOT and microcontrollers
35:35 How can the JS ecosystem be improved?
38:07 Should we have reactivity in the browser? Signals

41:06 Andrea’s thoughts on server-side APIs
43:43 Andrea’s thoughts on TypeScript

49:13 Sick Picks & Shameless Plugs
Sick Picks Andrea: ESP32

Shameless Plugs Andrea: Andrea’s X / Twitter

Hit us up on Socials! Syntax: X Instagram Tiktok LinkedIn Threads
Wes: X Instagram Tiktok LinkedIn Threads
Scott: X Instagram Tiktok LinkedIn Threads
Randy: X Instagram YouTube Threads

Follow this show on AudioBrevity and new episodes get summarized for you. Create a free account

Couldn't load the audio. A blocker may be stopping the show's tracking links. Open the file