You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: md/wubular-1.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
*Ever wished a Ruby app could run entirely in your browser, without ever calling back to a server? That’s the spark behind story of [**Wubular**](https://rubyelders.github.io/wubular) — [**Rubular**](https://rubular.com/) remake, powered by Ruby compiled to [WebAssembly](https://webassembly.org/) running nativelly in browser.*
1
+
*Ever wished a Ruby app could run entirely in your browser, without ever calling back to a server? That’s what sparked [**Wubular**](https://rubyelders.github.io/wubular) — a [**Rubular**](https://rubular.com/) remake, powered by Ruby compiled to [WebAssembly](https://webassembly.org/) running natively in the browser.*
2
2
3
3
If you’ve been around Ruby, you probably know [**Rubular**](https://rubular.com/) — the de-facto standard tool created by <imgsrc="https://avatars.githubusercontent.com/u/22803?v=4"class="avatar"> [Michael Lovitt (@lovitt)](https://github.com/lovitt) back in 2007 for quickly composing and testing [Ruby regular expressions](https://www.ruby-lang.org/en/). I’ve relied on it countless times, but the app itself now feels a bit outdated — for example, the footer shows it’s still running on an old Ruby. On top of that, Rubular isn’t open source (at least I haven’t been able to find any code published), so the only way I thought I might help was by reaching out to the original author and offering some community support.
4
4
@@ -20,7 +20,7 @@ But then it hit me: why not just run it directly in the browser? Since Ruby 3.2,
20
20
21
21
## Rubular’s classic architecture
22
22
23
-
Rubular was a brilliant little invention: a regex box, a test string box, and instant feedback. Behind the curtain, though, it’s a traditional **server–client setup**.
23
+
Rubular was a brilliant little invention: just a regex box, a test string box, and instant feedback. Behind the curtain, though, it’s a traditional **server–client setup**.
24
24
25
25
The frontend is plain HTML + JavaScript. Each time you type, the JS serializes the form and fires off a **POST** request to the backend:
26
26
@@ -73,13 +73,13 @@ It’s still the same Ruby you know — now just living inside a browser tab.
73
73
74
74
[**Wubular**](https://rubyelders.github.io/wubular) is a Rubular clone that runs 100% in your browser.
75
75
76
-
From the user’s perspective, it feels the same: paste a regexp, pick options, type a test string, and see results instantly. But under the hood, everything changed:
76
+
For users, it feels the same: paste a regexp, pick options, type a test string, and see results instantly. But under the hood, everything changed:
77
77
78
78
* The Ruby interpreter is compiled to WebAssembly.
79
79
* App logic is plain `.rb` files, loaded with `<script type="text/ruby" src="app.rb">`.
80
80
* The DOM is manipulated directly from Ruby classes that behave like components — mount, unmount, react to events.
81
81
82
-
There aren’t polished frameworks yet for Ruby-in-the-browser, but Ruby doesn’t need to reinvent the wheel. Using the built-in `js` library (`require "js"`), Ruby can talk to native browser APIs like `document.querySelector` or `addEventListener`.
82
+
There aren’t polished Ruby-in-the-browser frameworks yet, but Ruby doesn’t need to reinvent the wheel. Using the built-in `js` library (`require "js"`), Ruby can talk to native browser APIs like `document.querySelector` or `addEventListener`.
83
83
84
84
It really is this simple, just try it:
85
85
@@ -90,7 +90,7 @@ It really is this simple, just try it:
That’s literally how the first Wubular prototype came to life.
102
+
That’s exactly how the first Wubular prototype came to life.
103
103
104
104
---
105
105
106
106
## Ruby, WASM, and the Future of Browser Apps
107
107
108
108
Wubular is already [live](https://rubyelders.github.io/wubular) and usable — paste a regex, type your string, and see results instantly. But it’s also an experiment in what Ruby + WASM makes possible.
109
109
110
-
And here’s the kicker: Wubular isn’t just a quick prototype — it’s also fully tested app developed using[TDD](https://en.wikipedia.org/wiki/Test-driven_development). Like any serious Ruby project, it ships with an automated test suite. The difference? It runs also directly in your browser, using the same tools you’d use locally. In Wubular’s case, that’s good old [**Minitest**](https://github.com/minitest/minitest/). Open the [DevTools console](https://en.wikipedia.org/wiki/Web_development_tools) in your browser, append `?run_tests` to the URL, and watch the results fly by. Full integration test runs complete in milliseconds. Imagine a world where client-side apps boot only after passing their own test suite on client.
110
+
And here’s the kicker: Wubular isn’t just a quick prototype — it’s also a fully tested app, developed with[TDD](https://en.wikipedia.org/wiki/Test-driven_development). Like any serious Ruby project, it ships with an automated test suite. The difference? It also runs directly in your browser, using the same tools you’d use locally. In Wubular’s case, that’s good old [**Minitest**](https://github.com/minitest/minitest/). Open the [DevTools console](https://en.wikipedia.org/wiki/Web_development_tools) in your browser, append `?run_tests` to the URL, and watch the results fly by. Full integration test runs complete in milliseconds. Imagine if client-side apps booted only after passing their own test suite locally.
111
111
112
112
**PRO TIP: You can combine various Ruby versions with `run_tests` parameter like `?ruby=3.2&run_tests`.**
113
113
@@ -123,8 +123,8 @@ And here’s the kicker: Wubular isn’t just a quick prototype — it’s also
123
123
</figcaption>
124
124
</figure>
125
125
126
-
This is first post of Wubular serie. In the next one, I’ll dig into the internals: how Wubular mounts Ruby components in the DOM, how test-driven development feels when everything runs in the browser, and why the speed feels almost unreal.
126
+
This is the first post in the Wubular series. In the next one, I’ll dig into the internals: how Wubular mounts Ruby components in the DOM, how test-driven development feels when everything runs in the browser, and why the speed feels almost unreal.
127
127
128
-
In the meantime, go explore: the source is [all right there](https://rubyelders.github.io/wubular) in DevTools → Network, or [up on GitHub](https://github.com/RubyElders/wubular). Have fun, try to run the tests, and imagine what else Ruby in the browser might unlock.
128
+
In the meantime, go explore: the source is [right there](https://rubyelders.github.io/wubular) in DevTools → Network, or [up on GitHub](https://github.com/RubyElders/wubular). Have fun, try to run the tests, and imagine what else Ruby in the browser might unlock.
129
129
130
130
**Stay connected!**[Mastodon](https://ruby.social/@rubyelders), [Bluesky](https://rubyelders.bsky.social) or [Twitter/X](https://x.com/RubyElders).
Copy file name to clipboardExpand all lines: writings/2025-08-wubular-1.html
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -77,7 +77,7 @@ <h1>Introducing Wubular: Rubular Reimagined in Ruby+WASM</h1>
77
77
</p>
78
78
</header>
79
79
80
-
<p><em>Ever wished a Ruby app could run entirely in your browser, without ever calling back to a server? That’s the spark behind story of <ahref="https://rubyelders.github.io/wubular" target="_blank" rel="nofollow noopener"><strong>Wubular</strong></a> — <ahref="https://rubular.com/" target="_blank" rel="nofollow noopener"><strong>Rubular</strong></a> remake, powered by Ruby compiled to <ahref="https://webassembly.org/" target="_blank" rel="nofollow noopener">WebAssembly</a> running nativelly in browser.</em></p>
80
+
<p><em>Ever wished a Ruby app could run entirely in your browser, without ever calling back to a server? That’s what sparked <ahref="https://rubyelders.github.io/wubular" target="_blank" rel="nofollow noopener"><strong>Wubular</strong></a> — a <ahref="https://rubular.com/" target="_blank" rel="nofollow noopener"><strong>Rubular</strong></a> remake, powered by Ruby compiled to <ahref="https://webassembly.org/" target="_blank" rel="nofollow noopener">WebAssembly</a> running natively in the browser.</em></p>
81
81
82
82
<p>If you’ve been around Ruby, you probably know <ahref="https://rubular.com/" target="_blank" rel="nofollow noopener"><strong>Rubular</strong></a> — the de-facto standard tool created by <imgsrc="https://avatars.githubusercontent.com/u/22803?v=4" class="avatar"><ahref="https://github.com/lovitt" target="_blank" rel="nofollow noopener">Michael Lovitt (@lovitt)</a> back in 2007 for quickly composing and testing <ahref="https://www.ruby-lang.org/en/" target="_blank" rel="nofollow noopener">Ruby regular expressions</a>. I’ve relied on it countless times, but the app itself now feels a bit outdated — for example, the footer shows it’s still running on an old Ruby. On top of that, Rubular isn’t open source (at least I haven’t been able to find any code published), so the only way I thought I might help was by reaching out to the original author and offering some community support.</p>
83
83
@@ -96,7 +96,7 @@ <h1>Introducing Wubular: Rubular Reimagined in Ruby+WASM</h1>
<p>Rubular was a brilliant little invention: a regex box, a test string box, and instant feedback. Behind the curtain, though, it’s a traditional <strong>server–client setup</strong>.</p>
99
+
<p>Rubular was a brilliant little invention: just a regex box, a test string box, and instant feedback. Behind the curtain, though, it’s a traditional <strong>server–client setup</strong>.</p>
100
100
101
101
<p>The frontend is plain HTML + JavaScript. Each time you type, the JS serializes the form and fires off a <strong>POST</strong> request to the backend:</p>
<p><ahref="https://rubyelders.github.io/wubular" target="_blank" rel="nofollow noopener"><strong>Wubular</strong></a> is a Rubular clone that runs 100% in your browser.</p>
161
161
162
-
<p>From the user’s perspective, it feels the same: paste a regexp, pick options, type a test string, and see results instantly. But under the hood, everything changed:</p>
162
+
<p>For users, it feels the same: paste a regexp, pick options, type a test string, and see results instantly. But under the hood, everything changed:</p>
163
163
164
164
<ul>
165
165
<li>The Ruby interpreter is compiled to WebAssembly.</li>
166
166
<li>App logic is plain <code>.rb</code> files, loaded with <code><script type="text/ruby" src="app.rb"></code>.</li>
167
167
<li>The DOM is manipulated directly from Ruby classes that behave like components — mount, unmount, react to events.</li>
168
168
</ul>
169
169
170
-
<p>There aren’t polished frameworks yet for Ruby-in-the-browser, but Ruby doesn’t need to reinvent the wheel. Using the built-in <code>js</code> library (<code>require "js"</code>), Ruby can talk to native browser APIs like <code>document.querySelector</code> or <code>addEventListener</code>.</p>
170
+
<p>There aren’t polished Ruby-in-the-browser frameworks yet, but Ruby doesn’t need to reinvent the wheel. Using the built-in <code>js</code> library (<code>require "js"</code>), Ruby can talk to native browser APIs like <code>document.querySelector</code> or <code>addEventListener</code>.</p>
<p>That’s literally how the first Wubular prototype came to life.</p>
180
+
<p>That’s exactly how the first Wubular prototype came to life.</p>
181
181
182
182
<hr>
183
183
184
184
<h2id="ruby-wasm-and-the-future-of-browser-apps">Ruby, WASM, and the Future of Browser Apps</h2>
185
185
186
186
<p>Wubular is already <ahref="https://rubyelders.github.io/wubular" target="_blank" rel="nofollow noopener">live</a> and usable — paste a regex, type your string, and see results instantly. But it’s also an experiment in what Ruby + WASM makes possible.</p>
187
187
188
-
<p>And here’s the kicker: Wubular isn’t just a quick prototype — it’s also fully tested app developed using<ahref="https://en.wikipedia.org/wiki/Test-driven_development" target="_blank" rel="nofollow noopener">TDD</a>. Like any serious Ruby project, it ships with an automated test suite. The difference? It runs also directly in your browser, using the same tools you’d use locally. In Wubular’s case, that’s good old <ahref="https://github.com/minitest/minitest/" target="_blank" rel="nofollow noopener"><strong>Minitest</strong></a>. Open the <ahref="https://en.wikipedia.org/wiki/Web_development_tools" target="_blank" rel="nofollow noopener">DevTools console</a> in your browser, append <code>?run_tests</code> to the URL, and watch the results fly by. Full integration test runs complete in milliseconds. Imagine a world where client-side apps boot only after passing their own test suite on client.</p>
188
+
<p>And here’s the kicker: Wubular isn’t just a quick prototype — it’s also a fully tested app, developed with<ahref="https://en.wikipedia.org/wiki/Test-driven_development" target="_blank" rel="nofollow noopener">TDD</a>. Like any serious Ruby project, it ships with an automated test suite. The difference? It also runs directly in your browser, using the same tools you’d use locally. In Wubular’s case, that’s good old <ahref="https://github.com/minitest/minitest/" target="_blank" rel="nofollow noopener"><strong>Minitest</strong></a>. Open the <ahref="https://en.wikipedia.org/wiki/Web_development_tools" target="_blank" rel="nofollow noopener">DevTools console</a> in your browser, append <code>?run_tests</code> to the URL, and watch the results fly by. Full integration test runs complete in milliseconds. Imagine if client-side apps booted only after passing their own test suite locally.</p>
189
189
190
190
<p><strong>PRO TIP: You can combine various Ruby versions with <code>run_tests</code> parameter like <code>?ruby=3.2&run_tests</code>.</strong></p>
191
191
@@ -198,9 +198,9 @@ <h2 id="ruby-wasm-and-the-future-of-browser-apps">Ruby, WASM, and the Future of
198
198
</figcaption>
199
199
</figure>
200
200
201
-
<p>This is first post of Wubular serie. In the next one, I’ll dig into the internals: how Wubular mounts Ruby components in the DOM, how test-driven development feels when everything runs in the browser, and why the speed feels almost unreal.</p>
201
+
<p>This is the first post in the Wubular series. In the next one, I’ll dig into the internals: how Wubular mounts Ruby components in the DOM, how test-driven development feels when everything runs in the browser, and why the speed feels almost unreal.</p>
202
202
203
-
<p>In the meantime, go explore: the source is <ahref="https://rubyelders.github.io/wubular" target="_blank" rel="nofollow noopener">all right there</a> in DevTools → Network, or <ahref="https://github.com/RubyElders/wubular" target="_blank" rel="nofollow noopener">up on GitHub</a>. Have fun, try to run the tests, and imagine what else Ruby in the browser might unlock.</p>
203
+
<p>In the meantime, go explore: the source is <ahref="https://rubyelders.github.io/wubular" target="_blank" rel="nofollow noopener">right there</a> in DevTools → Network, or <ahref="https://github.com/RubyElders/wubular" target="_blank" rel="nofollow noopener">up on GitHub</a>. Have fun, try to run the tests, and imagine what else Ruby in the browser might unlock.</p>
0 commit comments