Ruby, TypeScript, CSS engineer at Prevail — I work on Phlex, Flecks and Morphlex as well as Literal and Quickdraw. Email: joel
@drapper
.me Signal: joeldrapper.01
It’s common for a Heroku bill to be over $1,000 USD / month even for relatively small apps. Do you know what you could get for that price if you just used one server with SQLite?
You could have a terabyte of RAM, 40 terabytes of NVME SSD storage and 128 core AMD EPIC CPU.
To be clear, this is a self-deprecating joke based on the conversation about Hotwire and server-side-rendered apps over the last few days. Tesla is obviously not calling out to a Rails server, and the lag would obviously be fine at high speeds.
This guy "forgot" to share that to create this clip he artificially throttled his browser to 3G. If you do the same on, say, Google Calendar, a full SPA, the result is as bad or worse. Yes, web apps require a web connection to work. News at 11!
Rails, SQLite, Phlex, Tailwind, Literal, Falcon, Async, Vite, Bun, Typescript.
This stack is fucking based and I’m moving so fast.
Also RubyLSP in Zed is fire.
@nikillinit
I don’t have a wallet. They could just be European where point of sale hardware is about 10 years ahead. I’ve also never owned a chequebook and the first time I ever signed for a card payment was in the US.
Here’s a proper demo of a new Ruby Gem we’ve been cooking up. It’s called Flecks. It’s a couple of Phlex components that make it possible to stream asynchronous slots out of order in a single HTTP request with no JavaScript — not even Turbo. Check it out!
Why can some companies put out feature after killer feature in record time with a tiny team, while others with hundreds(thousands?) of devs struggle to keep the ship from sinking?
It’s because those companies invested heavily in the design and maintainability of their software.
@ffaebi
Ticket sales, hotel bookings, restaurant bills are all taxed by the Russian government, which directly funds war crimes in Ukraine. I have nothing against the friendly Rubyists running the conference but we shouldn’t send them any external funds or encourage others to.
With Tree-sitter, semantic selection, built-in support for running tests, Ruby LSP, Tailwind LSP, Stimulus LSP, Vim mode, Copilot and AI refactoring, Zed (
@zeddotdev
) has quickly become the **best** text editor for Ruby.
@strzibnyj
I get it but not in this case. How many Rubyists have died? How many Rubyists are on the front lines fighting for their existence every day? This isn’t an issue we can stay out of. We’re already in it. To ignore the war is to support the war.
RubyRussia 2024 has been removed from the RubyConferences listing. 🎉
Thank you for standing with Ukraine🇺🇦. We *cannot* continue ‘business as usual’ in Moscow while our friends are being murdered.
To those in the comments defending genocide with ‘whataboutism’, fuck you. 🖕
This streaming thing I’m working on now supports async tasks, flushing the output of each slot as soon as it’s ready. Imagine one of these is an async database query while the other is a JSON API call. Notice how B is rendered first even though it’s after A. No JS required.
I’m not using the term “technical debt” anymore. Debt can be useful, giving you leverage for an investment. There is nothing useful about bad code. Ever.
Bad code, bad architecture is poison, contaminating and polluting everything. Most companies are already past hope. It kills.
I’m not a spam bot; I’m a human who cares about Ruby and Rails and all my friends here. I dedicate a huge portion of my life’s resources to Ruby and Rails.
If I criticised a technical decision you made in OSS, it’s because I care, not because I think I’m better than you.
Now I’ve actually used ViewComponent at work, I’m pretty confident Phlex is a 10x productivity boost if you use it right.
I need to focus on documentation because almost no one knows how to do this. I’m putting together a video course that will be free for everyone.
Can we please start accepting that Typescript is a perfectly reasonable language for your next web application, the same way we accept Python and PHP? I’m getting tired of this, and I’m a developer who loves Ruby and thinks Rails is great.
I’m sponsoring five people who I think are doing some of the most impactful open source work in Ruby right now. At least in the areas that interest me the most: 🧵
I’ll have more to say on this soon — I need to run some more tests — but I want to reassure you, Ruby is not slow. Rails is not slow.
A 48-core Hetzner can handle a lot more than 80 RPS. You can add at least two zeros to that number. And then you can probably double it.
I find it hard to believe Ruby devs actually enjoy writing a jumble of HTML, ERB, Ruby and inline Tailwind directives in a huge unstructured string literal template file, PHP-style.
It’s probably why so many Rails teams are handing the view layer over to React.
👋 I’m looking for a new remote position — either contract or permanent — doing full-stack
#Ruby
/
#Rails
/
#TypeScript
/
#CSS
engineering.
Ideally, either library/infrastructure work, or a Multi-Page-Application with a company that cares about quality and performance.
My new favourite game is to see how much TypeScript I can write without any testing (manual or automated) and still have the feature work perfectly first time.
Unthinkable in Ruby, but totally doable in TypeScript.
I know type safety doesn’t replace tests but it sure helps!
It takes about ~3ms to render a medium sized web page at ~1gbps. The rest of the time is spent waiting for database queries, API calls and other IO.
But what if we could instantly stream all the static bits, and then slot in the slow parts later?
I think this is the solution.
PSA Ruby hash rockets `=>` are not “old style Ruby hashes”.
There *is* a new alternative syntax for when your keys are symbols, but there is nothing “old” or “deprecated” about creating hashes with non-symbol keys. It’s not a code smell, not bad taste.
@josephkerkhof
My take: it’s because servers are powerful enough that it now makes sense to run a web app on a single server.
The vertical setup: one server with your app and database side-by-side can take you so far now. It makes everything much simpler and faster.
Being laid off by
@ShopifyEng
meant I could build Phlex, and now I’ve been laid off again, I’m taking it to the next level with LiteMorph and selective fragment rendering. It would be nice if this could keep happening every couple of years. 🙏
I’m quite excited to be *someone who thinks like a Rubyist* now exploring the JS world. Between Svelte 5, SQLite, Bun, Drizzle and TypeScript, I think there’s so much potential for a full-stack framework that’s at least as good as Rails but with some specific advantages.
I know Postgres is a really great database, but if I was starting a new Rails app today, I would either pick SQLite with Litestream or MySQL on PlanetScale, depending on my expectations for scale.
I was *literally* PIP’d for doing 3-months work in ~3 days, with a different approach to the one my manager — who thought himself very smart but was actually completely clueless — came up with.
Managers with no engineering experience shouldn’t dictate engineering architecture.
@jmddotfm
@edandersen
This is not always the case. You can be PIP’d while performing well above what’s expected of you, because your manager has a superiority complex.
On the right, my browser is subscribed to server-sent-events via Yippee. It receives a notification for each change, then it fetches the new content hitting Yippee’s router. Yippee reloads the code using Zeitwerk, then Phlex renders the view and Morphlex morphs it into the
Ruby/YJIT is so fast that Phlex can render ~1.4 gigabits of HTML per second on a single laptop core. That means you could in theory saturate a 10G uplink from an 8-core server. 🤯
It’s so funny when tech bros think their million line 8-megabyte JavaScript app that crashes if you have a password manager installed will be more stable on poor internet connections and low-end hardware than a few bytes of HTML and CSS.
Is it just me or are Kanban systems absolutely useless for planning feature work?
Linear, Trello, Shortcut, GitHub Projects — they’re all *fine* for discrete “bugs”.
But *features* are inherently hierarchical, and they should be expressed hierarchically in our systems.
I just got a prototype working for a phlex-rails feature that will let you alt-click an element in the browser to immediately open your editor to the line where that element is defined.
This is so useful I’m going to work on a 1.11 release for phlex to get this out before 2.0.
@dhh
I don’t know why you just unblocked me after all these years, but I appreciate it. I don’t want any beef with you. Appreciate what you’ve done for the Ruby community and I apologise for my behaviour. I should have spoken to you directly when taking issue with something you
We just released Phlex 1.10.0! 🚀
🔎 Selective Rendering
🎒 Component Kits
🗃️ CSV Views
🚀 Up to 7× Faster
🚿 New Streaming Tools
🪶 No Runtime Dependencies
We’ll release a new version of Phlex
#Rails
with Phlex 1.10 compatibility soon. 🔜
Yippee boot time in development is currently ~33ms. Keeping tabs on this is a very high priority.
API design is only half the story. Everything needs to be fast. Booting, routing, reloading, views, jobs, database, assets, deployment. No waste.
Phlex is MIT licensed with no hidden conditions and no trademark lawsuits if you make money selling associated products such as premium UI kits. Just saying.
@ffaebi
Additionally, anyone who travels to Russia for this conference puts themselves at great risk if they have posted support for Ukraine online or donated to charities that in any way help Ukrainians.
You’ve probably heard “perfect is the enemy of good”, but I think *compromise* is the enemy of motivation. And motivation is the key to productivity.
Humans want to do meaningful work we can be proud of. We don’t want to build garbage. Striving for the highest bar of quality is,
I’m launching a new product that lets you create an AI persona to take interviews on your behalf. The app will install a virtual webcam and microphone that lets your persona interact with your interviewer on Zoom. It can even solve the bullshit coding challenges.
Excited to introduce the world’s first AI interviewer, gpt-vetting.
With gpt-vetting, you can interview 100x more candidates in less time & candidates get a more enjoyable, gamified, and less biased interview experience.
You define the skills you want the interview to focus on,
“Phlex is HAML ...and let’s not forget that HAML was a sexist attempt by male back-end developers to “professionalize” front-end development.”
WTF did I just read? This is wild. 🙉🙈
Thinking of doing a video showing how Phlex::Rails::Streaming and Flecks actually works, looking at the library code and also looking at how we handle errors when streaming HTML because you need to send a 200 before you know if there are any errors.
Hot take: permanently blocking genuine people for having once disagreed with you is anti-community and generally a really shitty thing to do.
Every day I’m strongly reminded that I’m not welcome in the
#Rails
community because someone in Rails core blocked me from participating.
@zeddotdev
It’s funny to think about how traditional software managers would have criticised Zed’s strategy:
“Why not use JS and electron?”
“Let’s fork VS Code, then we can ship something tomorrow.”
“Rust isn’t proven.”
“We don’t need a new UI abstraction.”
“You’re reinventing the wheel.”
What do you prefer?
Functional Programming:
let sum = List.fold_left ( + ) 0
or imperative programming:
fun sum(list: List<Int>): Int {
var res = 0
for (element in list) {
res += element
}
return res
}
The first thing I do in a new Rails codebase once I’ve got it set up and running is spend a few hours reading code. I make notes as I go. These are my headings today:
Setup Experience
Database Structure
Gems
Models
Services
Jobs
Views & Components
Tests
Frontend
Code Style
Three things I learned about Ruby this week. The third one I still don’t quite understand.
1. `sort!` does not maintain the original order of an array when items are equal to each other — it sometimes shuffles them around!
2. `super` called with no arguments does not forward
Maybe I’m being unfair to Postgres, but it feels like it hasn’t won its place in the Rails community by merit, but rather because it was given a massive leg-up by Heroku early on.
Inspired by SQLite, I’m aiming for 100% line and branch coverage for Phlex before the 2.0 stable. My goal is to never tag another GitHub issue as `bug` after this release.
Sunk costs and human empathy make PR reviews a poor mechanism for catching bad design and architecture.
PR reviews are only great for catching typos or missing tests—and maybe the odd suggestion for improving a variable name.
How comfortable are you asking for a rewrite?
It’s basically a bunch of people excited about building high quality traditional web applications with minimal infrastructure and complexity using Ruby. Come join us.
@joeldrapper
wrote an excellent summary of what the Naming Things Discord is about. Come join us () if this resonates with you:
Some things we’re interested in:
* Server-side rendering
* Object-oriented design
* SQLite
* Performance
* Scaling a single
Yep, even if you can prove that every single point on the PIP is a lie.
My PIP at Shopify, for example, claimed I said things in meetings that I didn’t say. Those meetings were recorded. The recordings proved I didn’t. No one cared. No one even checked or looked at my appeal.
Friendly reminder to add `# frozen_string_literal: true` to the top of all your Ruby files. It can lead to significant performance improvements and will be the default soon. If you need to mutate as string literal, just put a `+` before it, e.g. `+""` for an empty mutable string.