News for hackers. Stuff that matters.

mfalcao

Re:Go ahead, self-host Postgres on Saturday December 20, 2025 @11:22AM (#46337258)
The most common way to achieve HÁ is using Patroni. The easiest way to set it up is using Autobase (https://autobase.tech).

CloudNativePG (https://cloudnative-pg.io) is a great option if you’re using Kubernetes.

There’s also pg_auto_failover which is a Postgres extension and a bit less complex than the alternatives, but it has its drawbacks.

Re:Server-Sent Events (SSE) Are Underrated on Thursday December 26, 2024 @04:09AM (#42514047)
Yes, I’ve done it using StreamingHttpResponse. You’ll want to use an asynchronous worker type though.
Re:Show HN: End-to-End Encrypted Dead Man's Switch on Wednesday October 02, 2024 @07:14PM (#41725795)
Can you explain how the encryption works, who holds the keys, etc in detail? Your website seems to be very light on details.
Not sure if it will help in this particular situation, but this driver has worked great for me when using Sunshine on a VM without a dummy plug: https://github.com/itsmikethetech/Virtual-Display-Driver
Re:Why car insurance in America is too cheap on Saturday February 03, 2024 @01:42AM (#39238086)
That’s insanely low! In Portugal the minimum required by law is 6.45 million for victims and 1.30 for property damage, per accident. A policy like this can cost as little as 250€ / year.

I assume these low limits in US insurance also affect material damages so that if you crash into an expensive car you just get a bunch of debt you need to pay off?

Re:Amsterdam Switches to 30 Km/h on 80% of its Roads on Thursday December 07, 2023 @10:28PM (#38565095)
50 is literally faster than Tour de France pros maintain on flat ground. A regular person on a normal bike will have a hard time even doing 30.
Re:German court declares Do Not Track to be legally binding on Tuesday October 31, 2023 @08:50AM (#38084009)
Ah yes I forgot about Ireland! It’s the only one though
Re:German court declares Do Not Track to be legally binding on Tuesday October 31, 2023 @07:50AM (#38083343)
I disagree that it’s common practice or standard. The W3C never even standardized it, mainly because of low adoption: https://github.com/w3c/dnt/commit/5d85d6c3d116b5eb29fddc6935...
Re:German court declares Do Not Track to be legally binding on Tuesday October 31, 2023 @07:30AM (#38083167)
I’d have to read this specific decision but my opinion is that while the GDPR says the user can refuse consent “by automated means” it doesn’t specify what those means are, thus making it quite hard to follow, enforce and therefore likely that other courts will decide differently on similar cases. E.g. would my own “X-Tracking-Is-Stupid: don’t track me” header be valid as refusing consent? What if I add it as a query parameter in the URL? And so on - DNT is not special in the eyes of the law.
Re:German court declares Do Not Track to be legally binding on Tuesday October 31, 2023 @06:53AM (#38082837)
Germany is not a common law country and neither are any other EU countries. Higher court decisions (which I don’t think is the case here) can set jurisprudence but it’s not the same thing as in a common law system.

Also national court decisions do not apply to other member states.

Go help others instead of worshipping imaginary, cruel, deities. I’m sure Richard Stallman would appreciate that a lot more.
I made a couple thousand when I was 14 making and selling cheats for online games. I blew most of it on games and computer parts, which were things that as a kid from a poor family I would have never been able to have otherwise.

I’m not proud of the mayhem that my cheats caused, but it was a defining moment in my life - I learned a lot and soon started doing small jobs for various companies, starting a career in software before I was even an adult.

Interesting. Does the state charge for the collection service? And what if you declare yourself a member of the church but do not want to contribute - can you opt out or do you just have to lie?
Re:France plans to close tax loophole benefiting Airbnb on Friday June 09, 2023 @11:30AM (#36259329)
Doesn't it benefit AirBnb indirectly though? Lower taxes -> AirBnb is more attractive for owners -> more properties on the platform -> more profit for AirBnb
If that is actually him and he doesn't want to be associated with that persona then making this video [0] was a weird choice... But in any case it seems natural that people are curious about this, after all it's a popular project and listing virtual avatars as members is strange.

At this point he should probably just own it if it is indeed him.

[0]: https://www.youtube.com/watch?v=effHrj0qmwk

Re:Why SQLite is so great for the edge on Tuesday June 06, 2023 @11:02PM (#36222354)
Here's a quick benchmark with pgbench:

  $ pgbench -h localhost -p 5432 -b select-only -T 60 -c 10 -j 2 bench
  Password: 
  pgbench (15.3 (Ubuntu 15.3-1.pgdg22.04+1))
  starting vacuum...end.
  transaction type: <builtin: select only>
  scaling factor: 1
  query mode: simple
  number of clients: 10
  number of threads: 2
  maximum number of tries: 1
  duration: 60 s
  number of transactions actually processed: 10370147
  number of failed transactions: 0 (0.000%)
  latency average = 0.058 ms
  initial connection time = 54.881 ms
  tps = 172993.008029 (without initial connection time)

  $ pgbench -h /var/run/postgresql -p 5432 -b select-only -T 60 -c 10 -j 2 bench
  pgbench (15.3 (Ubuntu 15.3-1.pgdg22.04+1))
  starting vacuum...end.
  transaction type: <builtin: select only>
  scaling factor: 1
  query mode: simple
  number of clients: 10
  number of threads: 2
  maximum number of tries: 1
  duration: 60 s
  number of transactions actually processed: 16890415
  number of failed transactions: 0 (0.000%)
  latency average = 0.036 ms
  initial connection time = 7.186 ms
  tps = 281540.260418 (without initial connection time)
YMMV depending on your workload, but Unix sockets should always be significantly faster.
Re:Why SQLite is so great for the edge on Tuesday June 06, 2023 @02:06PM (#36216768)
In my experience they are 30 to 40% faster
Re:Apple Vision Pro Is Apple's New VR Headset on Monday June 05, 2023 @03:04PM (#36201582)
Starts at $3499... I don't think this will be successful.
Re:Electric cars prove we need to rethink brake lights on Thursday May 25, 2023 @12:02PM (#36072468)
Just watched this while eating. It's half an hour long, so here's a summary:

- He owns a 2022 Hyundai ioniq 5, USA version

- The brake lights generally work fine, however when in one-pedal mode (i.e. accelerator does regenerative braking for the first X% of travel) they only activate when the vehicle is about to stop so long as the driver has the accelerator ever slightly depressed

- This is a problem because the regenerative braking is quite strong - he goes from 60 mph/96 kph to 0 in 13 seconds and the stop lights never illuminate

- He thinks this should not be allowed and Hyundai should recall the cars to fix this

- However, in the US this is perfectly legal - regenerative braking is not considered as part of the "service brake", so illuminating the stop lights is not required

- The EU on the other hand just fixed this gap in the law in March, by requiring that stop lights be illuminated whenever the deceleration exceeds 1.3 m/s^2

Re:Migrating from Supabase on Friday May 19, 2023 @10:39PM (#36008920)
Indeed - one of the great changes in v15. (for any folks on previous versions, you need to change the view owner to a non-superuser role without the bypassrls attribute).

Thanks for all your work on PostgREST, Steve! Do you think we'll see relational inserts in the near future, or is that still a bit down the road?

Re:Migrating from Supabase on Friday May 19, 2023 @07:57PM (#36008130)
RLS is great, but it's not that hard to shoot yourself in the foot or miss stuff. E.g.:

  ALTER TABLE bookmarks ENABLE ROW LEVEL SECURITY;
  CREATE POLICY bookmarks_owner ON bookmarks USING (owner_id = auth.uid());
  CREATE VIEW recent_bookmarks AS SELECT * FROM bookmarks ORDER BY created_at DESC LIMIT 5;
The above may look fine at first glance, but recent_bookmarks actually bypasses RLS.