Ives van Hoorne

Ives van Hoorne

@ives.sh

Friends call me Flip, building CodeSandbox! πŸͺπŸ³οΈβ€πŸŒˆ

4.5K followers680 following97 posts

With Biscuit we have a durable execution system where we run the agent harness in the browser, and hand it over to a server when the browser tab closes. Now someone talked to Biscuit in Slack, and since I had the project open, my browser tab ran the agent harness and answered πŸ˜‚

A nice side effect is that all our logic runs on spot instances now, because it is built with the assumption that it can crash at any time (since browsers literally "crash" at any time when the user closes their tab).

Just shipped brand kits to Biscuit! Now we generate a design.md + brand kit for your app at the start, and make them visually editable. Next up is more creativity in choosing colors + storing multiple brand variants.

Almost everything in Biscuit runs in the browser. Code gets compiled using Oxc (wasm), the LSP runs in a web worker, and the agent harness too. This allows for really quick direct manipulation. You can click on any element and edit it without server roundtrips.

Oxc has been fantastic here. We built custom lints based on common mistakes we saw agents make. For example, we have a rule that watches for Tailwind classes and gives a warning to the agent if it did not implement light/dark mode properly.

In Biscuit you can click on any text and edit it, no matter where it comes from: the database, some variable or just static code. This way you can update any content without leaving the preview. Here's a small thread on how we make this possible:

View full thread

This makes a better UX for the user, but it also significantly makes it easier for agents to debug code. Our agents see exactly where all variables come from, and things like whether an if condition was true or false. That's a huge help with debugging.

I'm planning to share more features and compiler magic over the next few weeks. Also I'd be happy to answer any questions!

In Biscuit you can click on any text and edit it, no matter where it comes from: the database, some variable or just static code. This way you can update any content without leaving the preview. Here's a small thread on how we make this possible:

View full thread

For non-React cases, we solve it again with the compiler! We detect cases like this, and wrap with __unwrap. __unwrap turns a traced string into a plain string. This is a last resort, because we lose the origin data. We do it for e.g. comparisons, or when we call libraries.

So far I’ve only used strings as examples, but the traced data goes beyond strings. We trace conditionals (which condition produced a boolean), class names (what renders in dark mode), numbers and we also support more sources: data, network requests, etc.

In Biscuit you can click on any text and edit it, no matter where it comes from: the database, some variable or just static code. This way you can update any content without leaving the preview. Here's a small thread on how we make this possible:

View full thread

The challenge is that React can’t render traced strings out of the box. And comparisons like `str1 === str2` break if either side is traced. So we do two things: - We use a custom version of React (jsxDev) that supports traced strings - We automatically unwrap in our compiler

In React, we use a custom `jsxDev` that converts traced strings to real strings before rendering. For each component, we record which traced string it rendered as a child, so clicks can map back to the traced string.

In Biscuit you can click on any text and edit it, no matter where it comes from: the database, some variable or just static code. This way you can update any content without leaving the preview. Here's a small thread on how we make this possible:

So we want to make it possible to click any UI, and update the text. But text could come from multiple places, like from the database, source code or even from outside of the app (e.g. network request/library). To solve this, we added "traced strings".

When compiling code, we replace all strings with traced strings. These traced strings say where they come from. `Tracer.__trace` wraps a string with its origin info, so we can track where it came from even after passing through many components.

I'm excited to finally share what we've been working on! For the last 8 months, we've been building Biscuit: an all-in-one platform for building a business. Product, payments, emails, hosting and operations built in. Today we're opening the waitlist πŸŽ‰

Some personal news! Blixt, Floris and I have started a new startup. We’ve been quietly building something new for indie founders, and it’s starting to feel really good. We'll share more in the coming weeks. But if you’d like early access, send me a message!

Few things beat the feeling of deploying code and watching the graphs drop. If that's not enough reason to use OpenTelemetry, I don't know what is!

Ives van Hoorne reposted

πŸŽ‰ Introducing my upcoming third course, Whimsical Animations! This course will teach you how to build top-tier animations and interactions using a variety of techniques. ✨ You can join the waitlist on the course’s brand-new site, which is the most ridiculous thing I’ve built in quite some time:

whimsy.joshwcomeau.comWhimsical AnimationsLearn how to create charming interactions and delightful touches using the magic of CSS, JavaScript, SVG, and Canvas. I’m sharing all my tricks in this one!

Created a new template for CodeSandbox that runs a headless chromium browser. It exposes a WebSocket port which you can use to control it. This is especially useful with CodeSandbox SDK, as it allows you to create snapshottable & clonable browser environments on the fly πŸ˜„

It's now possible to access preview URLs for private sandboxes with CodeSandbox SDK! We also expose a new CLI (`csb sandbox preview-tokens`) to manage preview tokens for a sandbox.

Just published a new feature I'm excited about for the CodeSandbox SDK: Sessions API πŸŽ‰ This API allows you to create multiple users in a single sandbox, allowing for collaborative editing and sharing sandboxes publicly. + we use the same API at CodeSandbox πŸ˜„

This has been one of the top feature requests since we released the SDK and it unlocks some cool use cases: - Collaboration: allow multiple users to connect to the same sandbox/branch and collaboratively edit files - Anonymous previews: create r/o sessions to share files/shells with others

Our first weekly release for CodeSandbox SDK is live! This week we've focused a ton on performance. VM clones are now 2x faster (1.3s) and snapshot resumes are now within a second (0.6s)! Expect some further improvements the next few weeks. Happy holidays & new years! πŸŽ†

We're starting a new chapter with CodeSandbox! Next to the news of moving and marrying, I promise this is the last big news from me this year πŸ˜‚. This is huge for us. We'll have more resources to build and grow CodeSandbox, and I'm extremely excited about CodeSandbox SDK.

CodeSandbox@codesandbox.io

Today we have some very big news πŸŽ‰ CodeSandbox has joined Together AI and we have joined forces to launch a new product, CodeSandbox SDK! CodeSandbox will continue to run as normal and we’re making private sandboxes free. Check the details below πŸ‘‡

CodeSandbox SDK allows you to programmatically spin up VMs on our infrastructure. You'll get all the things we've built for CodeSandbox, including memory snapshot/restore and VM cloning. I'll share more examples, but you can already play with it here: github.com/codesandbox/....

I want to thank everyone who has been part of the journey of CodeSandbox so far for their support and advice. It's a wild rollercoaster, but I'm enjoying it thoroughly. When writing the first line of code for CodeSandbox, I never could've imagined it growing to this.

Ives van Hoorne reposted

Rust is actually a joy to use for web services once you stop worrying, avoid struct lifetimes, and learn to love Rc/Arc/clone

Ives van Hoorne reposted

πŸŽ‰ After six incredible years at Framer, it’s time for my next step. Today, we’re spinning Framer Motion out as its own independent open-source project, to better serve the whole community. Introducing Motion. For React, and now, for everyone.

Friday is the best day to ship πŸ˜„

Bluesky@bsky.app

πŸ“’Β App Version 1.93 is rolling out now (1/5) This release includes the thread composer, improved tooling for adding content warnings to your own posts, and other improvements and fixes. Open this thread for more details. 🧡