Sign in

Patrick Smith

@royalicing.com
604 followers 1K following 226 posts

webassembly in elixir: useorb.dev · components everywhere: components.guide · blog: royalicing.com · he/him

PostsRepliesMedia
Patrick Smith @royalicing.com · 27/09/2026
I mocked up if the Finder _was_ the Siri app and I think it could work pretty great! The name is a natural fit.
A mockup of the features from Golden Gate’s new Siri app integrated into the Finder
000
Patrick Smith @royalicing.com · 21/07/2026
QIP lets you write cross-platform components in Zig or C, which are imperative languages. But I love opening a file and seeing how declarative it feels. Here we see clearly what the memory capacity is and what the input/output types are.
A self-contained Zig file to convert a JPEG to a BMP. The input JPEG can be a maximum of 8MB, and the output BMP can be a maximum of 32MB.
000
Patrick Smith @royalicing.com · 10/07/2026
I’m concerned our software industry is drifting towards illiteracy.
I worry our software industry is drifting towards illiteracy.

We don’t want to read changelogs. Dependabot just opens a PR we mindlessly merge.

We don’t want to review PRs. Codex can digest them, highlight concerns, and write the alterations.

We don’t want to code up prototypes. Claude Code can explore five ideas before breakfast.

We don’t want to learn what new capabilities our platforms have. We want to watch a video of someone reading and download a set of Markdown skills.
100
Patrick Smith @royalicing.com · 08/07/2026
Here are the numbers running in Chrome to convert a SQLite table to CSV:
Phase	QIP component	Official sqlite3.wasm
Download (uncompressed)	19 KB	849 KB + JS glue
Compile + instantiate	0.3 ms	46.6 ms
Open database (68 KB)	0.0 ms	0.6 ms
Read table → CSV (891 rows)	1.3 ms	8.8 ms
Total	3.5 ms	146 ms
✓ Both readers produced the identical 891-row CSV (31,420 bytes).
110
Patrick Smith @royalicing.com · 08/07/2026
I’m exploring reading SQLite databases via custom WebAssembly vs using the official sqlite3.wasm
100
Patrick Smith @royalicing.com · 27/02/2026
Anyone interested in a vertical web browser? The idea instead of tabs is you get a text view and a vertical stack of web views. The web views render as compact mobile versions. The text view lets you edit URLs in bulk and can be saved to a .txt file. It’s native Swift.
My native Swift web browser
100
Patrick Smith @royalicing.com · 25/02/2026
Qwen3.5 is more socially anxious than me. It tell itself “Wait, I need to make sure I don’t overthink” after doing a lot of thinking in response to “Hello!”
Qwen3.5 thinking to itself the best response to “Hello!”
000
Patrick Smith @royalicing.com · 10/02/2026
PRICE LIST

WE CODE WITH AI                               $50,000
WE CODE WITH AI, YOU WATCH                    $80,000
WE CODE WITH AI, YOU HELP                    $100,000
WE CODE WITHOUT AI                           $150,000
YOU CODE WITHOUT AI                          $200,000
YOU CODE WITH AI, WE HELP                    $350,000
YOU CODE WITH AI, WE WATCH                   $500,000
YOU CODE EVERYTHING WITH AI                  $1,000,000
021
Patrick Smith @royalicing.com · 10/02/2026
I really like how Safari adds its tagline to the top of every page…
The error message shown after inactivity in Safari: “This webpage was reloaded because a problem occurred.”
010
Patrick Smith @royalicing.com · 30/01/2026
Nothing shows how tech’s power dynamics haven’t drastically changed yet like Claude putting Google first on their login page.
Claude’s login page with “Continue with Google” button first
010
Patrick Smith @royalicing.com · 24/06/2025
Oh no I created a nano CSS library
Demo of the CSS Grid utility classes
010
Patrick Smith @royalicing.com · 23/05/2025
When your AI agent fails the first time
Say what again. Say what again. I dare ya, I double dare ya!
030
Patrick Smith @royalicing.com · 23/05/2025
https://xkcd.com/303/ for AI coding
060
Patrick Smith @royalicing.com · 07/05/2025
How on earth does Google survive if their main revenue streams are dropped like the fuel tank & rocket boosters on the Space Shuttle? techcrunch.com/2025/05/06/u...
A scientifically accurate diagram of how Google relates to its ad business
000
Patrick Smith @royalicing.com · 29/04/2025
How to change Tailwind 4’s dark: variant to work with the system dark mode and data-theme="light" / data-theme="dark" attributes. play.tailwindcss.com/hYJSmS8Zlu?f...
A Tailwind 4 recipe for overriding the dark custom variant that works with both the prefers-color-scheme media query and with data-theme attributes.
040
Patrick Smith @royalicing.com · 27/04/2025
It’s very inspired by the idea of JSX, which allows composing of powerful puzzle pieces. Rejigging the code example above and it might start to look more familiar:
Rendering HTML with a layout (set to Español), and 3 children: a theme stylesheet, a JavaScript snippet, and a primary nav.
010
Patrick Smith @royalicing.com · 27/04/2025
I finally implemented the feature I dreamed of when starting Orb. Composing different WebAssembly modules into a single HTML page. Each component can return both <head> content and <body> content. These interleave with body content from the layout. #myelixirstatus
We have 4 WebAssembly modules: HTMLExample, CSSExample, JSExample, NavExample. The HTML one acts as the layout providing the base html. The CSS renders the inline stylesheet. The JS renders the inline ES module. The NavExample renders the <nav>. These interleave with body content from the layout.
1171
Patrick Smith @royalicing.com · 27/04/2025
I just finished the book Origins, highly recommend. It shows how geology, the earth, the seas, the winds, and minerals in the ground all caused major circumstances in history, from coal & oil through to the Mongols.
Origins book by Lewis Dartnell
000
Patrick Smith @royalicing.com · 26/04/2025
The send_css/2 function is then very simple, delegating the work to the GoldenOrb.CSS protocol and the venerable Plug library.
Step 1: call GoldenOrb. Step 2: call Plug. Step 3: profit.
110
Patrick Smith @royalicing.com · 26/04/2025
Under the hood GoldenOrb.CSS is an Elixir protocol, whose default implementation uses the Wasmex library to execute our WebAssembly.
The GoldenOrb.CSS protocol does the heavy lifting, using Orb to compile to a WebAssembly module definition and then executes using the Wasmex library, calling the exported text_css function and assigning any global variables it detected in the struct.
110
Patrick Smith @royalicing.com · 26/04/2025
Orb lets you write WebAssembly using an Elixir DSL. Here we render dynamic CSS depending on a theme variable in a struct. GoldenOrb.Plug.send_css/2 executes the WebAssembly & automatically passes in the theme then assigns the resulting CSS to a Plug HTTP Conn. #myelixirstatus
An Elixir module that uses Orb to define an Elixir struct with the theme, a WebAssembly global for the theme, exports functions to read the possible theme values, and a function that dynamically returns different CSS depending on the theme.Here we use GoldenOrb.Plug to execute the WebAssembly from our Orb module and sets the resulting CSS on a Plug.Conn, which means our WebAssembly has been executed and transformed into a HTTP response.
1203
Patrick Smith @royalicing.com · 31/03/2025
Sad to see Apple has fallen for the Evil Twin trope.
Icons on my Mac for Image Playground and Swift Playground
110
Patrick Smith @royalicing.com · 27/03/2025
I just wrote “Infinite Bicycles for the Mind” on the levels of surprise in vibe coding. icing.space/2025/infinit...
I think it’s helpful to know which of the two modes you are in.

Are you in a familiar mode wanting to accelerate to a known destination?

Or are you in an exploratory mode, in uncharted seas not knowing whether to expect a reef or safe waters over the horizon?

In your familiar mode the entropy is low. You type a few keys and get lots of predictable signal out. What you see is anticipated, and if there is any code I didn’t bargain for I can fix it or generate anew. The vibe is low surprise, and you can keep rolling the dice until you get what you expect.

In your exploratory mode the entropy starts high. The goal is to inform your mind or deliver the output elsewhere. It’s bespoke Wikipedia on command, with a similar risk of inaccuracies. The output is possibly wrong and you won’t know how to directly fix it, though over time you can learn what tends to break. The vibe is high surprise.

From: https://icing.space/2025/infinite-bicycles-for-the-mind
031
Patrick Smith @royalicing.com · 27/03/2025
I added ISO8601 parsing and formatting to my WebAssembly + Elixir library SilverOrb: Code: github.com/RoyalIcing/S... #MyElixirStatus
A function written in Orb, a WebAssembly DSL for Elixir, that formats a date as the YYYY-MM-DD format.
000
Patrick Smith @royalicing.com · 15/11/2024
I made a SwiftUI Playground app to send the same prompt to both ChatGPT and Claude, it’s useful for seeing where they both agree or where one has deeper knowledge than the other.
A SwiftUI Playground app that asked both ChatGPT and Claude the same question, Claude on the left, ChatGPT on the right.
030
Patrick Smith @royalicing.com · 04/11/2024
I wrote a new intro on the Orb site. Hopefully it explains the motivation for why I, as a front-end-developer, would create a WebAssembly compiler.
For years I’ve been a JavaScript developer. JavaScript runs everywhere: the browser where it was born, on the server, on your phone, on your laptop. But adopting JavaScript means adopting an increasingly complex and bloated suite of tools.

WebAssembly offers a restart, again born in the browser and again running on the server, your phone and laptop. It takes things down to the studs, at a level even lower than JavaScript, which allows even better performance. But take an existing toolset and its WebAssembly output is often hundreds of kilobytes or more, and targets a single platform instead of running everywhere.

Orb takes the lesson of components that React taught: give developers the raw ingredients and make them easily composable. Make UI components. Make state machine components. Make decoder/encoder components for common formats. And then make those run everywhere.

Orb piggybacks on the existing Elixir ecosystem: it has a module system, it has a package manager, it has a test runner, it has a language server, and it has an awesome community.

In fact, Orb lets you run any Elixir code when compiling your WebAssembly. It’s just like how React lets you write any JavaScript when rendering out primitive HTML. Orb is like JSX but for WebAssembly.

Orb is the full power of Elixir at compile time and the portability of WebAssembly at runtime.

Orb is alpha in active development. My aim is to refine the current feature set and complete a .wasm compiler (current it compiles to WebAssembly’s .wat text format) in order to get to beta.

From https://useorb.dev
100
Patrick Smith @royalicing.com · 08/12/2023
I’m so happy Playwright exists! Here’s checking a page redirects to its canonical URL (so it doesn’t get indexed as two distinct pages by Google). So clean and simple, yet checks all 3 main browser engines.
First we disable JavaScript so we only have server rendered HTML. The test visits with the query parameter page set to 1. It then wait for a redirect to without the query parameter. It’s written very much like if you gave a script of steps to check to a real user.
000
Patrick Smith @royalicing.com · 02/12/2023
An example of how Apple dropped the ball with its software platforms. Ulysses is an amazing Markdown writing tool. It uses iCloud. Periodically it has to redownload everything. And I just have to cross my fingers and wait…
An example of Ulysses downloading all my content. Again. This has happened many times.
110
Patrick Smith @royalicing.com · 17/08/2023
Working on slides for ElixirConf US
Aims of Orb:
Friendly
Feel like Elixir or Ruby
Access to low-level WebAssembly
Composable modules
Dynamic compilation
150