Simon James
banner
simonjuk.bsky.social
Simon James
@simonjuk.bsky.social
Ruby on Rails developer based in London. Creator of the RBlade templating language.
Here's another one for you, a regex that will match almost any ruby string: github.com/mwnciau/rbla...
October 1, 2025 at 6:38 AM
Yeah, you're right. I think it would've been much clearer to extract out to a constant, but the /o modifier allows in-place optimisation so that's what I did because it was easier!
August 3, 2025 at 11:32 AM
The use case for /o is when you're interpolating (constant) regex objects inside other objects. It lets you split out sub-expressions, increasing readability, without a significant performance hit.

github.com/mwnciau/rbla...
rblade/lib/rblade/compiler/tokenizes_statements.rb at a6148dbac190a1259791e6a225b3f523df0e0a0a · mwnciau/rblade
A simple, yet powerful templating engine for Ruby on Rails, inspired by Laravel Blade. - mwnciau/rblade
github.com
August 3, 2025 at 10:27 AM
The RubyMine plugin might still be a bit rough and ready. Let me know if you have any issues with it.
July 26, 2025 at 10:07 AM
Really interested in your vision for Herb, particular level 6. You seem to have gone through a similar journey to me, taking inspiration from Heex, whereas I took inspiration from Laravel when I made RBlade: github.com/mwnciau/rblade

There's for sure lots of room for improving templates in Rails.
GitHub - mwnciau/rblade: A simple, yet powerful templating engine for Ruby on Rails, inspired by Laravel Blade.
A simple, yet powerful templating engine for Ruby on Rails, inspired by Laravel Blade. - mwnciau/rblade
github.com
July 19, 2025 at 8:03 PM
LSPs seem an order of magnitude easier to implement than adding a templating language natively! I was warned away from trying it. I had a crack: github.com/mwnciau/herb... / plugins.jetbrains.com/plugin/27954...

Happy to hand over/take these down if you'd prefer to keep control over IDE plugins.
GitHub - mwnciau/herb-lsp-intellij: This Intellij plugin is a simple wrapper around https://github.com/marcoroth/herb
This Intellij plugin is a simple wrapper around https://github.com/marcoroth/herb - mwnciau/herb-lsp-intellij
github.com
July 19, 2025 at 8:01 PM
Here's a simplified example of what I mean in PHP. Defining the shape of hashes can add a lot of safety when working with JSON, for example.

phpstan.org/r/d1c6ccf3-e...
Playground
phpstan.org
June 20, 2025 at 9:43 PM
I recently read "Division by Zero" by Ted Chiang, a short story about an inconsistent mathematical system. You might might like it.
June 19, 2025 at 7:02 PM
I'd not come across either, but I can see the similarities. The idea came from Laravel's data_get and data_set methods, which I've used in the past.
May 11, 2025 at 3:07 PM
I find the string freeze/unfreeze modifiers a little surprising. +"0" and -"0" give very different results in some other languages!
November 11, 2024 at 6:40 PM