HNHacker News
TopNewBestAskShowJobs

asguy

699 karma · joined August 5, 2019

submissionscomments
asguy··on Startups Are Scooping Up Big Tech’s Cast-Off Workers
I’n more worried about America’s obesity levels and opioid epidemic.
asguy··on How Postgres Triggers Can Simplify Your Back End Development
The first link also calls out how to deal with said bloat. It’s part of administering a Postgres DB yourself (which may or may not be something a team should be doing).

> I wouldn't want an average development team to pursue that approach without good reason, especially when the alternatives are so easy to do right.

Agreed. Good reasons I’ve had in the past are:

- wanting transactional guarantees across your DB data and queue (which you don’t get if your queue is external)

- not wanting to add more stack complexity (this has been an issue when you have to support on-prem deployments that you aren’t allowed to interact with).

I’m sure there are others.

asguy··on How Postgres Triggers Can Simplify Your Back End Development
I think you're projecting an implementation of a queue in Postgres, which isn't how most people implement these things. [0] We're not doing table level locks, or creating contention with multiple queue producers or consumers, and they're not "one typo away from disaster in prod".

To do this right, you're using row level locking e.g. SELECT FOR UPDATE/SKIP LOCKED [1], and hopefully you're already using idle_in_transaction_session_timeout to deal with total consumer failures. A properly designed queue in Postgres runs more-or-less in parallel, and supports (really fantastic features like) atomic row locks across all resources needed to serve the queue request.

If you need extremely long consumer timeouts, it's also totally fine to use RLLs in addition to state on the job itself.

[0] - https://www.crunchydata.com/blog/message-queuing-using-nativ... [1] - https://www.2ndquadrant.com/en/blog/what-is-select-skip-lock...

asguy··on How Postgres Triggers Can Simplify Your Back End Development
Maybe, but at “mid” production scale I’ve used Postgres plenty as the substrate for queues and managing requests for FSMs and their state changes, and didn’t run into these problems.

Like everything, it depends on the application.

asguy··on How Postgres Triggers Can Simplify Your Back End Development
Most people on modern engineering teams haven't built systems services themselves. I've seen this cause a lot of insecurity on making choices, because they don't have the experience in how to actually assess what will work or won't. It's far easier to fall back on the industry hive mind, e.g. "nobody ever got fired for buying $X".
asguy··on Schools bought millions of Chromebooks and 3 years later they’re breaking down
If you let her break it, and go without it, she’ll probably get it real quick.
asguy··on Lowering Earth’s temperature with a dust shield
... where have I seen this before ...

https://en.wikipedia.org/wiki/Highlander_II%3A_The_Quickenin...

asguy··on OpenBSD: Malloc leak detection available in -current
Linux makes intentional exceptions in the application of the GPLv2 to accomplish this e.g. vDSOs. There’s a reason Linux refused to move to GPLv3.

Now apply these exceptions to user space, and you’ve basically reinvented the LGPL.

asguy··on Dbdev – A database package manager for PostgreSQL trusted language extensions
I had fun with a similar concept: just access the database from the browser using nginx/TLS/lua: https://github.com/alexanderguy/pgress

If you're good with your authenticated users directly talking to the DB (which there are plenty of uses for), it's a great way to get your data into the browser.

asguy··on EPA approves California rules phasing out diesel trucks
> In the 60s you couldn’t see the mountains from Mountain View.

Do you think sub-zero windshield wiper fluid banning did that, or catalytic converters and efficient engine management? Hint: it was the latter.

asguy··on EPA approves California rules phasing out diesel trucks
> Yeah, because those things are toxic and poisoning you, your children, and our environment. ... This is the exact same thing that happened with whale oil, leaded gas, leaded glass, sulfur diesel, ddt, on and on.

You don't know what you're talking about, but you feel like you do. Methanol, ethanol, and isopropyl alcohol are all legitimate ingredients for the examples I gave. You're making equivalence between burning leaded gas, and a desire to spray my windows with volatile alcohol.

Are you planning on banning isopropyl alcohol for medical use? Removing my ability to by vodka? Stopping my ability to use my camp stove?

One day it's stopping toxic waste getting poured into the watershed, the next it's a desire to stop research on safe nuclear power, and ban gas stoves for interior cooking use.

Blind environmentalism is its own worst enemy.

asguy··on EPA approves California rules phasing out diesel trucks
You're missing the point: I don't live in the Sierras. I live on the coast, and I drive to the mountains.

What do I do with the windshield wiper fluid that is in my car, before I go to a freezing area? Do I waste it all by overusing it on the drive up? Do I set calendars to make sure I cycle my windshield wiper fluid, so that I'm low enough by the time I get to the mountains, I can buy sub freezing fluid, that my remaining fluid won't freeze?

What I end up doing is making my own blend on the coast because (thankfully) I know how, but it's a ridiculous limitation of California environmentalism.

asguy··on EPA approves California rules phasing out diesel trucks
The problem is, like any good government agency, they don’t stop when they’ve succeeded fixing their original problem. What started with catalytic converters and OBD-2 is now preventing me from buying sub-freezing temperature windshield wiper fluid, and my BBQ lighter fluid is so watered down I have to use 2x to get it to do anything useful.
asguy··on Ask HN: Postgres experts, how did you start your career?
I've read a bunch of the official documentation, and then read a lot of the source code to Postgres itself. I'd say source is the #1 place I go if I have questions that are specific, and then if I want philosophy I look for previous presentations by the Postgres team, or from the hackers mailing list.
asguy··on Ask HN: Postgres experts, how did you start your career?
Yah, I have had many projects where I could have used something else, but Postgres ended up being the perfect bag of tools to do what I needed. I've been very happy with it.
asguy··on Ask HN: Postgres experts, how did you start your career?
I'd say I'm a Postgres Journeyman.

I'm a software engineer primarily. Postgres is another tool I like to use to solve data problems. I've used it as the backbone of applications in production at terabyte scale. I've architected and been responsible for the deployment of it, both on-prem and in "the cloud" (including the operations of PITR and replicated failover). I've written extensions for it, and hacked on the codebase for internal use.

asguy··on Ask HN: Postgres experts, how did you start your career?
I’d be careful of anyone who says they’re a “postgres expert”; I respond the way I respond to self-proclaimed C++ experts: “oh yeah? tell me more”

Most are novices that have no idea how far the rabbit hole goes. I’ve been using postgres for about 25 years and every time I go to implement something with it I learn something new. I’m intermediate at best, and I’ve done things like rewrite the postgres wire protocols from scratch for internal use cases. This is especially true when I lean on the DB to take on new interesting roles (e.g. adding new operators for custom indexing of custom types, extending existing types in novel ways, adding new access methods, fun with foreign data wrappers, complex PITR and logical replication strats).

asguy··on LME finds bags of stones instead of nickel in metal warehouse
https://archive.is/LIBPA
asguy··on PCIe for Hackers: The Diffpair Prelude
Rick Hartley cracks me up. He's like a PCB design cross between R. Lee Ermey and Tony Robbins.
asguy··on 90k Miles on My Tesla Model 3 – Maintenance Costs Higher Than Expected
Yah.. you compound this with English/German hybrid electrical system design from 20 years ago, and it rapidly becomes something too expensive to pay a mechanic to fix.
asguy··on 90k Miles on My Tesla Model 3 – Maintenance Costs Higher Than Expected
> An internal combustion engine (ICE) replacement cost is ~$7000. It is much more complex than an electric motor. In addition, ICE cars have very complex transmissions (replacement cost ~$5000). You also have exhaust and emission control systems, which EVs do not have, radiator/cooling systems, etc., etc., etc.

My last ICE car I bought new had a 10 year/100k mile powertrain and emissions warranty; I haven't had to replace the engine or transmission yet (which would be much more expensive than the article's quoted price). My recently purchased English-made "beater" SUV is 22 years old, and has 155k miles on it. I had to swap the radiator, drag link, and brake booster reservoir: my out of pocket was $1500. Obviously my points are anecdata, but leading with their examples feels like a massive EV cope. Outside of non-911 performance cars (I'm looking at you recent BMWs, Mercedes, Volvo cars and Porsche SUVs) ICEs have become insanely reliable: the engine isn't the weak link. Whether you're buying an ICE or EV, you still have to pay for: suspension, brakes, tires, windshield wipers, and "life support" parts.

EVs owner should lead with the fact they get to push emissions output to the electric grid (which hopefully will become better because we can focus on centralized improvements) and they should continue looking improve the reality that battery production has a huge environmental and human cost (but could be made to get better).

asguy··on Null References: The Billion Dollar Mistake (2009) [video]
> 1) Connery's character's attempt to out-chad Cage's character failed because the latter replied: "Carla was the prom queen."

Your calibration is off: he wasn’t trying to put-Chad him.. he was telling him to “git gud”

asguy··on Null References: The Billion Dollar Mistake (2009) [video]
That excuse sounds like the guy in highschool who would have treated the girl so much better, but she was into assholes.

If you are old enough to remember those days, then you remember COBOL, Algol, Fortran, Pascal, BASIC, Ada, Oberon, Lisp/Scheme, Forth, O’Caml etc. They’re all great languages, some still have their uses. There’s a reason all of the major operating systems have cores written in C/C++. It’s entirely because they’re pragmatic and “work”, and not some conspiracy.

Edit: although now that I write it, what if C/C++ was planted on earth by an alien intelligence in order to slow down the development of the human race.

asguy··on Null References: The Billion Dollar Mistake (2009) [video]
This is what C/C++ haters, anti x86/amd64 snobs, and Rust elitists always forget: what works, works. Sure, it could be a local maximum, hopefully there will be better, but who knows?

To quote Sean Connery in The Rock:

Losers always whine about their best. Winners go home and fuck the prom queen!

https://m.youtube.com/watch?v=gXDSxgDUv-c

asguy··on Salmonella-in-eggs controversy
That's true. Even then, every once in a while you end up with a blood covered one.
asguy··on The $20 an hour Cessna 172 experiment (2020)
The engines are fine with ethanol. The problem with ethanol is the issues related to it eating at materials in the fuel system (e.g. fuel lines) that aren't alcohol tolerant.
asguy··on Rust vs. C++ Formatting
> If you don't care about the limits of the tech you won't be able exceed what you think is possible.

Did you propose/implement/release something better than printf?

> I'm time and time again amused how anti intellectual and outright hostile to technological progress the programming profession is. programmers, out of all of them.

Perfect is the enemy of good. Some people talk about getting work done, some people get the actual work done and move on.

asguy··on Rust vs. C++ Formatting
It always had printf: https://cplusplus.com/reference/cstdio/printf/

Edit: It's almost like the whole world got a lot of work done with the tools they already had.

asguy··on The Decline of the City Grid
Or in the English countryside, where signs refer to towns and not to roads.
asguy··on Is Europe just not good at innovating?
Focus on your own failures, before you take responsibility for theirs.
← PreviousPage 2 of 11Next →