Recent submissions

Comment · 1 month ago
Comment · 4 months ago
What? Never heard of this
Comment · 10 months ago
I think the htmx counterpart from Rails folks would be Turbo not Stimulus
Comment · 11 months ago
Such a weird take. Of course "self hosting" means "self hosting".

Sure it could be easier/safer to manage, everything can be better.

Over the last couple of years hosting it I had a single issue with an upgrade but that was because I simply ignore the upgrade instructions and YOLOed the docker compose update.

Again, is it perfect? No. Would I expect a non tech savy user to manage their own instance? Again no.

Comment · 1 year ago
Comment · 1 year ago
Felt a similar way when playing Expedition 33 earlier this year. Such a great game.
Comment · 1 year ago
Comment · 1 year ago
So... train tracks?
Comment · 2 years ago
Comment · 2 years ago
Not mandatory, you could remove that
Comment · 2 years ago
Not that I think this is pratical or even looks good, but its also doable with rails

  require 'bundler/inline'

  gemfile(true) do
    source 'https://rubygems.org'

    gem 'rails', '~> 7.1'
    gem "sqlite3", "~> 1.4"
  end

  require 'rails'
  require 'active_record/railtie'
  database = 'app_development.sqlite3'

  ENV['DATABASE_URL'] = "sqlite3:#{database}"
  ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: database)
  ActiveRecord::Schema.define do
    create_table :my_table, force: true do |t|
      t.integer :my_table_id
    end
  end

  class App < Rails::Application
    routes.append do
      root to: 'home#index'
    end
  end

  class HomeController < ActionController::Base
    def index
      render inline: 'HOME'
    end
  end

  App.initialize!

  run App
For very small apps on ruby land sinatra and roda are the right choices. On python the choice would be flask instead of the single file django.
Comment · 2 years ago
He seems a bit biased maybe? Its fair that a rails controller does not exactly screams what its doing (implicit view rendering, routing etc).

But then, for someone not deep into react, a magic string like "use server" also does not clarify anything.

Also, he argues that just because you can it does not mean you should scatter sql queries around your views. But again, just because you can do a bunch of implicit stuff on a Rails controller it does not mean you should.

Comment · 2 years ago
I belive you are thinking about Niobium and not Graphene
Comment · 3 years ago
> Could be, but TFA doesn't specify it

If I understood correctly it does. They are handling promo codes outside of stripe.

I feel like you are missing the point of the article

> This is an extremely trivial bit of JavaScript, but it is made difficult because it is trying to use a JavaScript

Yes, it is trivial javascript, and it was trivially solved by a couple of javascript lines

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton