Recent submissions

Comment · 1 year ago
A majority of people in North West England has Irish ancestry. Are those people not British?
Comment · 1 year ago
After German reunification the states of East Germany and West Germany ceased to be. Was that two genocides?
Comment · 1 year ago
No state has the right to exist, that thought terminating cliche makes no sense legally or philosophically. States are recognised by other states, with no legal rights involved. Also claiming that a call for the end of a state is a call for genocide is ludicrous, if that was the case then every revolution in world history would be a genocide.
Comment · 1 year ago
> It's almost like if bureaucrats who are writing regulations are experienced in writing regulations in such a way they can't be circumvented.

Americans often seem to have the view that lawmakers are bumbling buffoons who just make up laws on the spot with no thought given to loop holes or consequences. That might be how they do it over there, but it's not really how it works here.

Comment · 1 year ago
You can also set up DNS records pointing to your home server's VPN IP, which, with Tailscale, I've found to be pretty static and then a reverse proxy on your home server. So I have my home network apps running on app1.my-domiain.com app2.my-domain.com, app3.my-domain.com etc, which only work when I'm connected to the VPN.

The downsides are that I need to be connected to the VPN at home to use the domain and I currently don't have SSL set up on the domains, so browsers complain when I connect to them. The second problem I could fix, but I'm not sure if there's a solution for the first.

Comment · 1 year ago
That's certainly not a criticism that could be levelled at Giantbomb, considering it was started when its founder, Jeff Gerstman, was fired from his job at GameSpot for giving a game a low review score while the developer of the game was doing a big marketing campaign on the site.
Comment · 1 year ago
Thanks, I'll let my team know.

Sorry I meant to say "I've been thinking about building a Once style project" I've just got a couple of not very well fleshed out ideas at the moment.

In terms of licencing it's interesting, I suppose you could have the app phone home periodically, but since it's source available, someone could just remove that call. I guess the main idea is just that it's software for businesses and legitimate businesses generally aren't going to break licence agreements.

Comment · 1 year ago
It's simply not true that "regular AR calls are painfully slow." In the context of a web request, the time spent instantiating Active Record objects is negligible. For example, on my laptop:

Customer.limit(1000).to_a

completes in about 10ms, whereas:

Customer.last(1000).pluck(:id, :name, :tenant_id, :owner_id, :created_at, :updated_at)

runs in around 7ms.

Active Record methods are defined at application boot time as part of the class, they're not rebuilt each time an instance is created. So in a typical web app, there's virtually no performance penalty for working with Active Record objects.

And when you do need raw data without object overhead, .pluck and similar methods are available. It’s just a matter of understanding your use case and choosing the right tool for the job.

Comment · 1 year ago
It's been widely understood in the Ruby community for some time now that metaprogramming—like in the example above—should generally be limited to framework or library code, and avoided in regular application code.

Dynamically generated methods can provide amazing DX when used appropriately. A classic example from Rails is belongs_to, which dynamically defines methods based on the arguments provided:

class Post < ApplicationRecord belongs_to :user end

This generates methods like:

post.user - retrieves the associated user

post.user=(user) - sets the associated user

post.user_changed? - returns true if the user foreign key has changed.

Comment · 1 year ago
This is an interesting project! I'm going to recommend it to my team at work, since we've been moving to try to self-host more of our services.

I've been about building a Once-style project myself, how do you deal with tracking the licences, do you have the ability to revoke them if someone breaks the licence?

Comment · 1 year ago
I recently read The Ministry for the Future by Kim Stanley Robinson, and one of the ideas in it that I thought was very good was replacing our cargo ships with wind-powered ships, basically giant sailing ships. In the book, they were incredibly slow, with shipments taking months to complete, but if supply lines were set up correctly, that wouldn't matter for a lot of cargo. Cargo ships are a massive CO2 contributor, and it was interesting that a solution could be to return to sailing ships.

I know there are probably huge engineering problems preventing this from happening, so feel free to tell me why it's impossible.

Comment · 1 year ago
As a long time Ruby developer the only thing about Ruby that I wish would die is people declaring 'Is Ruby dead?/Ruby is dead/Ruby isn't dead'!
Comment · 1 year ago
Ruby will probably never again be the most popular language in the world, and it doesn't need to be for the people who enjoy it to be excited about the recent improvements in performance, documentation, tooling, ecosystem, and community.
Comment · 1 year ago
Between Rails At Scale and byroot's blogs, it's currently a fantastic time to be interested in in-depth discussions around Ruby internals and performance! And with all the recent improvements in Ruby and Rails, it's a great time to be a Rubyist in general!
Comment · 1 year ago
ChatGPT won't tell you how to do anything illegal, for example, it won't tell you how to make drugs.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton