Hacker Newsnew | past | comments | ask | show | jobs | submit | menthe's commentslogin

First of all, what are you optimizing for? Expiry latency shouldn't matter, only keeping pace with insert throughput. And while I appreciate that you sidestepped the immediate issue through the solutions presented in the article, dropping the foreign key and adding an anti-join doesn't feel like a long-term solution, since you trade referential integrity for orphan risk.

There's a point in PostgreSQL scalability where the need to vacuum (following updates/deletes) becomes a problem in itself, and that point is a lot closer than most anticipate. For instance, vacuum can’t be unable to reclaim versions unexpectedly (e.g stuck transaction holding the TID horizon), leaving you with millions of dead tuples & massive stale index linked-lists, which can lead to major service degradations.

An alternative could be to tombstone rows with a HOT UPDATE on a `deleted_at` column. If that update is HOT (heap-only), the new row version lives on the same page and no new index entries are created. The old version does become a dead tuple, but it's pruned in-page and ad-hoc by ordinary reads and writes, so VACUUM is never needed to reclaim them, and dead tuples never accumulate, least of all in the indexes. On PG16+ this even works with a BRIN index on `deleted_at`, given some fillfactor headroom.

That also addresses the 20-minute scan, which seems to have been caused by walking millions of dead index entries at the oldest end of created_at, each needing a heap visit to confirm it was dead. With HOT tombstoning, those dead entries never get created in the first place. A persisted keyset cursor (the last processed `created_at`) would avoid re-walking that region either way.

The manual VACUUM also couples your business logic to the storage layer, which is a bit of a slippery slope that’ll cause issues when you scale to the next order of magnitude.

I understand why long-running workflows and per-class retention complicate partitions. But if most workflows are short-lived, partitioning plus a tombstone sweep for the long-lived stragglers could avoid most DELETEs, and would also help index sanity, caching.. and let you profit from the many other benefits of partitions.


Seems everyone on Hacker News has already forgotten about Anthropic’s amazing new watermarking algorithm. You don’t need to look any further to understand why it writes so awfully - it literally swaps words programmatically all over the text from the result of a hash function…


This was an issue before watermarking was publically announced. I'm also not an expert, but aren't bits of a hash indistinguishible from uniform randomness?


Depends on the particular hash. Some hashes are designed to produce similar outputs when the input data is similar (for example, SSDeep). I'd imagine hashes designed to survive light copywriting would also not be entirely indistinguishable from random.


Unfortunately - the widespread propaganda seen around both nuclear power plants and datacenters is ultimately going to cost America everything - the American way of life our child’s will inherit is going to mean something very different than what it meant for us.

China controls 90-99% of the rare earths - which are necessary for everything from cars to defense, chips, energy and even construction steel;

China controls 70%+ of critical minerals (99% of galium/magnesium, 85% tungsten, etc, etc).

China owns the world’s manufacturing - with the associated skilled tradesmen (hard to produce anything fully locally - the experts are retired / passed already).

China has abundance of power and energy.

China has got both power, energy, and they’ve got the will.

China has got the best intelligence models today (as of this month) - which means scientific superiority, increased productivity, and military superiority.

What does America have, and what does that mean for our economy in the coming 20-40 years?

The reality is that we are in a new race to intelligence and re-industrialization, but we seem to be anti-everything at this point. Nobody wants to hear it, I know I am going to get downvoted to hell with this, but this is ultimately the new reality, and our eternal debating / 4-years cycles vs. life-long strategies in China, is going to cost America everything.


It's a religious belief that we're going to invent a machine god and our machine god will fight china's machine god.


One that just happens to be very convenient for the machine-god peddling billionaires.


I don't think OP mentioned a machine god?


Go ahead and go live next to one then and show us how it's nothing but propaganda.

Quite convenient how the same people trying to run roughshod over the others to get these bubble mania mausoleums built NEVER live near them but are HAPPY to make others who can't afford a second home live next to them.


>the American way of life our child’s will inherit is going to mean something very different than what it meant for us.

I'm fairly certain the American way of life is exactly what happened here, that citizens of a locality exercise the rights over their land to stop random tech bros from ruling over them with their AI and China mania. I recommend John Quincy Adams 4th of July 1821


Really? You think the American way of life today is comparable to 1821?

You think the standard of life you enjoy today is because of the triumph of local parochialism?

The United States has always been ruled by elites [1].

The revolution was in large part kicked off because the Proclamation of 1763 rendered the westward land investments of the wealthy worthless [2].

Why would reading 1821 July 4th propaganda be instructive? How about you open up a basic economics textbook and then work your way back to the standard of life you've come to expect and get back to us.

1. https://en.wikipedia.org/wiki/Virginia_dynasty 2. https://www.mountvernon.org/library/digitalhistory/digital-e...


>You think the standard of life you enjoy today is because of the triumph of local parochialism?

My standard of life involves democracy and self-determination. Americans are 'pathetic' about that because it turns out at the end of the day liberty is a bit more durable of an idea than buying yet another pile of junk.

If you think you can just throw fortune cookie economic slogans at people to convince them they want to live in Mark Zuckerbergs or Elon's Borg cube you're in for a few rough decades, on both sides of the political spectrum that is.


[flagged]


> Is he forcing people to login to Instagram or Facebook?

Are you referring to the Facebook pixel?


>He's so evil but the vast majority of Americans can't give up his products? Is he forcing people to login to Instagram or Facebook?

People are perfectly fine with him making products, what they aren't fine with is he (and his peers) starting to think they're kings and trying to overrule the citizens of a state he doesn't live in. If it comes down to a chatbot and the latter they'll chose the latter. The datacenter opposition, of which there are by the way hundreds at this point across the country generally attract 70/30 if not higher majorities.

I'm also not sure what I'm not supposed to support in those paragraphs because, as to your point about inflation, that is currently the consequence of America's ongoing military action in the world, as unpopular as the datacenters, and as the founders were fond to point out the reason for ever more higher levels of taxation, increased state size and lower prosperity. As true today as it was back then.


The modern American standard of life is based on global integration and state power.

If you want to go back to some Garden of Eden fiction regarding Plymouth Rock based on the propagandizing of America's first nepo president you will not find much competition in your pursuit of a life of poverty and subsistence farming. Go log off and enjoy the woods.

Or get serious and propose a plan for continued American economic dominance and standard of life in a world where data centers are demonized, when the economic engine of the future is compute.


>The modern American standard of life is based on global integration

The United States is virtually the least trade dependent country in the world[1] which is why you frequently see American governments wield trade policy as a weapon. Economically the US is practically self sufficient.

And insofar as the broad prosperity and provision of good jobs is concerned, those haven't improved in the computer age, they've been decimated, outsourced, and now threaten to be replaced by the very same data centers ordinary people are protesting. The explicit and stated goal by the people we have been talking about is not to increase the autonomy of the average person, it's to automate them away and put them on basic income.

[1]https://data.worldbank.org/indicator/NE.TRD.GNFS.ZS?most_rec...


> He's so evil but the vast majority of Americans can't give up his products?

Hello maynmar genocide. Hello selling weight loss products to teenagers algorithms determined as having low self esteem.

Yes, in winner takes all economy, one person can be prettt evil and have all tge economic power.


What complicity in such evil does a user of his products face, if any? Are most people evil then? If not, what excuse for them can you offer that does not rob them of their human agency? Or do you agree with another commenter that all users of his products are necessarily zombies?

Speaking of such creatures: If someone trolls you on his platform, is that his fault too? What conduct should he control on such a wide platform? What should he not? Is an oversight in said control, in either direction, tantamount to the guilt of conducting the act in question itself?

Is your version of the dead internet theory that Mark Zuckerberg authors all posts on Facebook? Do you have any answers? Or do you offer only scapegoats?


This sounds like a pure trolling? Why do you do it on behalf of Zuckenberg? Yes, HE is complicit in those.

Facebook knew what is going on.


Not joining your mob makes me a troll?

I guess you did answer one question - you have no answers, only scapegoats.

I don't do it for "Zuckenberg". I don't really care about him at all. I assume if he didn't exist, someone else would have invented the same thing. After all, he basically ripped off the idea to start with. I do it because imo worse than dealing with obvious capitalist self interest that one can at least model and bound is dealing with people like you who treat themselves as some constituent of a crowd of pitchfork bearers rather than a serious civic participant. Irrational, virtue signaling outrage that I doubt you really even believe in or actually care about. Because what else are you doing about it? On your notion of "complicit" you might as well direct the same invective at your local gas station. I'm sure you will be able to find a relevant laundry list of perceived crimes.

Why don't you go through all those questions in order and actually attempt an answer? Or if the answers are so obvious and I'm such a troll, why has no one built a social network of comparable scale that avoids all these problems? Does the existence of Zuckerberg somehow preclude such a thing from ever existing? Is this another one of his malevolent powers?

Good thing our founders had the foresight to know the greatest check of all is on the people, so as to never let a mob establish guilt or innocence.

By all means, propose sensible social media regulation. If you can even conceive of such a thing. You sound like someone who has no idea what it is like to find yourself before some tribunal, some body with the power to judge human conduct as being "complicit" in some crime. The entire history of the West might be most optimistically summarized as endeavoring to hold such tribunals to the highest standards of objectivity and veracity. Have a nice day buddy.


No one asks you to join a mob. I am complaining because your comments are not nearly a good faith and attempt to twist the topic into unrecognizable.

At least make them coherent.


>Is he forcing people to login to Instagram or Facebook?

Yes. The "no one is putting a gun to users' heads" argument is irrelevant when it comes a trillion-dollar company invested in behavioral modeling deliberately driving engagement.

"Social media apps are 'deliberately' addictive to users" (2018)

https://www.bbc.com/news/technology-44640959

"Addicted by Design: The Hidden Psychology Behind Social Media’s Hold on Us" (2025)

https://information-warfare.com/addicted-by-design-the-hidde...


What an interesting instinct for civics you have.

You get to strip hundreds of millions of people of individual agency on the basis of your stumbling through a handful of headlines, all adhering to the recent trend of reducing human conduct into some neat pathology.

What does this portend for your politics? How to manage this vast polity of addicts? What regime of involuntary commitment will you come up with to force virtue into those that have slipped into this addictive vice?

Maybe while you're at it you can repeal the repeal of the Eighteenth Amendment. After all, surely this is what John Quincy Adams was after as he expounded upon the nature of American freedom in such flowery terms. The power to moralize over your fellow man, too feeble to resist the likes of fermentation, Facebook or the fruit.


I don't understand how the abundance of AI datacenters translates into wellbeing of common folk. Right now AI is a net negative for the people.


False.

As of PG16, HOT updates are tolerated against summarizing indexes, such as BRIN.

https://www.postgresql.org/docs/16/storage-hot.html

Besides, you probably don't want "done" jobs in the same table as pending or retriable jobs - as you scale up, you likely want to archive them as it provides various operational advantages, at no cost.


Not false. Nobody would ever use BRIN for this. I'm talking about regular indexes, which do prevent HOT.

If you read my earlier comment properly, you'll notice a "done" column is to avoid deleting columns on the hot path and avoid dead tuples messing up the planner. I agree that a table should not contain done jobs, but then you risk running into the dead tuple problem. Both approaches are a compromise.


Nothing a well-trained model won't be able to instantly solve. It's literally just grunt work, not rocket science.

F DRMs though. Good news is those AAA games are rarely worth anyone's time anyways. Better spin up indies or classic games - a good SNES game is worth a hundred of those garbo AAA license rehashes.


I can't stress enough how much this is not true for any meaningful production threat detection software. Models regularly fail reversing even basic obfuscation tasks. Try it yourself. No, ChatGPT is not going to break Denuvo. Probably not even in OpenAI's wildest dreams.

Generating an image or sound is seemingly child's play compared to actual complex software tasks. There's not 1,000 different open source DRM codebases you can train against. It's not a diverse field.

Generating code to do script kiddie hooking? Sure. Reversing a complex multi-tiered obfuscation and trust platform? Yeah, right.


It’s hard to overstate how poor the technical quality of modern games is. Pretty much every DX12/Raytracing title is just a stuttering mess with absurd shader compilation and traversal stutter. Nevermind ridiculous ghosting artifacts and the like produced by Lumen. Modern games are optimized to look good on screenshots and not-realtime in-engine renders for trailers. Hardware and APIs have never been more powerful, and engine developers turn out the worst-running games since 30 fps hardlocked Xbox ports from the 2000s.


Source?


Not for normies.


Can we just flag this kind of misleading and propagandist content? It’s literally content+karma farming, and brainwashing hot garbage.

Total rage bait that doesn’t have its place on platforms catering for higher educated and science oriented people.

Nuclear plants evaporates water, water rains down a few kilometers away, gets collected in sewer, recycled/filtered and re-injected in the system.

You know what doesn’t get recycled? Coal & gas burning pollution & CO2. And you know what doesn't get re-injected? Lost lives to pollution and global warming.


Take this to daddy Elon - this has absolutely nothing to do with Rivian.


Rivian placed their charging port on the front left corner, while Teslas have ports on the rear left corner. So to charge a Rivian at a Tesla Supercharger, you have to park in the adjacent spot and plug in.[1]

More Supercharging stations are adding "trailer compatible" spots, so this should become less of an issue over time. I would also bet that EV manufacturers will standardize on a port location similar to how gas vehicles have. (Early gas vehicles often put the fill hole in places like the dash or under the seat.)

1. https://www.reddit.com/r/Rivian/comments/1f0wt4v/okay_is_the...


> I would also bet that EV manufacturers will standardize on a port location similar to how gas vehicles have

No need. Just make the cables longer and the problem is solved. Even Tesla has put longer cables on their V4 chargers.

Here's a long cable on some EnBW Alpitronic chargers: https://www.youtube.com/watch?v=LK2shbCwDYM


Longer cables have significant disadvantages. They cost more. They're less efficient, meaning they charge slower and/or require more cooling. They contain more metal, making them more appealing to thieves. They get tangled and damaged more easily. That's why Tesla made their cables so short and standardized on a charging port location.

I'm sure future charging stations will have some long cables for vehicles with odd port locations or trailers, but I don't know if every charger at a station will have a long cable. Considering the disadvantages of long cables, it makes a lot of sense for manufacturers to use one location for the charging port. That allows owners to use as many chargers as possible. And it would mean that anyone driving an EV wouldn't have to remember where the port is on their specific vehicle.


The cables are going from a cabinet many meters away from the dispenser to the dispenser. They could go another 3-4 feet and suddenly support a lot more vehicles.

Or Tesla could have placed the dispensers to the sides of even some of the spaces and alleviated the issue.

But Tesla envisioned only the few Tesla models to ever charge at Tesla chargers, so they designed them with tight tolerances.


> I don't know if every charger at a station will have a long cable.

Every charger will have longer cables. Longer cables have been deployed on chargers from many manufacturers for years. It's not novel.

Tesla is generally behind the curve with charger development. Kempower and Alpitronic make the best chargers.


Both of those companies have much higher costs per charger than Tesla. Kempower doesn't make their prices public, but the cheapest I could find was $50,000 for a 1 port 50kW charger. A dual port 200kW charger was almost $200,000. Alptronic's chargers are $50,000 for a 1 port 75kW charger and $90,000 for a 2 port charger with 300kW total output. Those numbers are just for the hardware. That doesn't include costs for installation, land, or grid connection. My best estimate of Tesla costs is around $41,000 per plug, and that includes all of those extra expenses.[1]

Sadly, the graveyard of failed companies is full of ones that made amazing products. Kempower's revenue has been going down over the past year, and they've burned through half of their cash reserves in the past few quarters. They've decreased headcount to reduce costs. I hope they pull out of this dive, as more competition is great for consumers. But it really is the case that fancier chargers are significantly more expensive. So much so that it's hard to make them profitable.

1. https://news.ycombinator.com/item?id=42344230


Rivian designed their vehicles long before Tesla offered them access to superchargers.


Globally, Tesla chargers have been available to most EVs for many years. America moving to a standard shouldn't have shocked anyone.


The chargers shouldn't have been made so short as to only ever accept 2-3 models of cars with identical charger placements. But they were designed to only work with a few Tesla models, so they weren't designed with flexibility in mind. Even Cybertrucks towing have a big issue with the vast majority of existing deployed chargers.

Lots of ICE vehicles have their gas inlets in a number of different spots. Some even have them behind the rear license plate! And yet people don't seem to have an issue getting gas in their cars.

IMO having the vast majority of chargers at the head like that was a bad decision. Putting them on the side of the spots makes a ton of sense and really opens up a lot of flexibility.


from my understanding this is addressed with the new v4 supercharger stations that are coming online now. its not just a rivian problem its the same with Ford EVs as well.


Meh, typical overblown “take” ihmo.

> All this stuff is just done automatically in Rust. If you have to write out the code by yourself, that's more work, and a huge chance for bugs. The compiler is doing some very complex tracking to figure out what to drop when and where. You'd have to do that all in your head correctly without its help.

What prevents anyone from dedicating a Zig memory allocator to the job (and all of its subtasks), and simply freeing the entire allocator at the end of the job? No baby-sitting needed.

Or if the mindset is really to be assisted, because “very complex” and too “much work”, may as well use a garbage collected language.

> It's knowing the compiler is on your side and taking care of all this that makes it magical.

Until you got used to it, and trusted it so much, and it suddenly misses something - either after a compiler update, or after some unsupported code introduced, and that shit takes down prod on a Friday. I’m not going to take the chance, thank you, I can call free() and valgrind.


> What prevents anyone from dedicating a Zig memory allocator to the job (and all of its subtasks), and simply freeing the entire allocator at the end of the job? No baby-sitting needed.

Given the whole ecosystem is built around the Allocator interface, it's entirely feasible for the consumer of a library to pass in a Garbage Collecting allocator, and let it do the job of deciding what gets dropped or not.

Downside is that this is all at runtime, and you don't get the compile-time memory management that Rust has.



I am sorry, are you non-sarcastically arguing that being able to pass through airport security, potentially accessing cockpits and planting bombs onboard airplanes, with a high-school level SQL injection on a federal website used by dozens of airlines & airlines employees, is actually, "fine"?

Besides, I am not sure what sort of "security through obscurity" you are talking about? Ian and Sam found it, and frankly - with a public page, page title + first h1 tag clearly stating that this relates to a Cockpit Access system, this has got to show up in a shit ton of security research search engines instantly.


Not 100% sure why it’s often idolized on HN.

We’ve maintained a financial exchange w/ margining for 8 years with it, and I guarantee you that everyone was more than relieved - customers and employees alike, once we were able to lift and shift the whole thing to Java.

The readability and scalability is abysmal as soon as you move on from a quant desk scenario (which everyone agrees, it is more than amazing at.. panda and dask frames all feel like kindergarten toys compared), the disaster recovery options are basically bound to having distributed storage - which are by the way “too slow” for any real KDB application given the whole KDB concept marries storage and compute in a single thread.. and use-cases of data historical data, such as mentioned in the article, become very quickly awful: one kdb process handles one request at once, so you end up having to deploy & maintain hundreds of RDB keeping the last hour in memory, HDBs with the actual historical data, pausing for hourly write downs of the data, mirroring trees replicating the data using IPC over TCP from the matching engine down to the RDBs/HDBs, recon jobs to verify that the data across all the hosts.. Not to mention that such a TCP-IPC distribution tree with single threaded applications means that any single replica stuck down the line (e.g. big query, or too slow to restart) will typically lead to a complete lockup - all the way to the matching engine - so then you need to start writing logic for circuit breakers to trip both the distribution & the querying (nothing out of the box). And then at some point you need to start implementing custom sharding mechanisms for both distribution & querying (nothing out of the box once again..!) across the hundreds of processes and dozens of servers (which has implications with the circuit breakers) because replicating the whole KDB dataset across dozens of servers (to scale the requests/sec you can factually serve in a reasonable timeframe) get absolutely batshit crazy expensive.

And this is the architecture as designed and recommended by the KX consultants that you end up having to hire to “scale” to service nothing but a few billions dollars in daily leveraged trades.

Everything we have is now in Java - all financial/mathematical logic ported over 1:1 with no changes in data schema (neither in house neither for customers), uses disruptors, convenient chronicle/aeron queues that we can replay anytime (recovery, certifying, troubleshooting, rollback, benchmarks, etc), and infinitely scalable and sharded s3/trino/scylladb for historical.. Performance is orders of magnitude up (despite the thousands of hours micro-optimizing the KDB stack + the millions in KX consultants - and without any Java optimizations really), incidents became essentially non-existent overnight, and the payroll + infra bills got also divided by a very meaningful factor :]


I think the adulation is mainly driven by the a few things:

1. it was fast by a huge margin for its time

2. the reason for its speed is the language behind it

3. it uses an esoteric language and still attains success

4. the core engine is implemented using surprisingly few lines of code

5. the core has been written and maintained by one person

All of these are things I've heard so I can't claim it's 100% true but I'm sure it's a combination of some of these.

I feel like APL and all its relatives had long ago gained legendary status. So the legend lives on - maybe longer than it should.

Don't get me wrong. It's still amazing!


Compared to similar dynamic scripting languages, Q is very vast. Compared to statically compiled languages, it can be surprisingly competitive, but is usually slower. The truly distinctive thing about Q is its efficiency as a user interface: at a REPL you can rattle off a short sequence of characters to transform and interrogate large datasets at interactive speeds and flexibly debug complex distributed systems live. In the right hands, it's a stunningly effective rapid-application-development tool (the above "quant desk scenario"); this was perhaps even more true in the k2 days when it was possible to build ugly but blisteringly fast and utilitarian data-bound GUIs for K programs in a few lines of code. There's certainly an abundance of romanticism and mythology surrounding it, but some of the claims are real and enduringly unmatched.


Python in a Notebook is “REPL like” and much more modern.

And though I agree low code is important, Streamlit or Dash are a much more fully featured and open way to do that.

I agree KDB has a good development workflow, but I think the same is available in an open source stack like ClickHouse + Python + Jupyter.


   And this is the architecture as designed and recommended by the KX consultants that you end up having to hire to “scale” 
I think this hits on one of the major shortcomings of how FD/Kx have managed the technology going back 15+ years, IMHO.

Historically it’s the consultants that brought in a lot of income, with each one building ad-hoc solutions for their clients and solving much more complicated enterprise-scale integration and resilience challenges. FD/Kx failed to identify the massive opportunity here, which was to truly invest in R&D and develop a set of common IP, based on robust architectures, libraries and solutions around the core kdb+ product that would be vastly more valuable and appealing to more customers. This could have led to a path where open sourcing kdb+ made sense, if they had a suite of valuable, complementary functionality that they could sell. But instead, they parked their consultants for countless billable hours at their biggest paying customer’s sites and helped them build custom infra around kdb+, reinventing wheels over and over again.

They were in a unique position for decades, with a front row seat to the pain points and challenges of top financial institutions, and somehow never produced a product that came close to the value and utility of kdb+, even though clearly it was only ever going to be a part of a larger software solution.

In fairness they produced the delta suite, but its focus and feature set seemed to be constantly in flux and underwhelming, trying to bury and hide kdb+ behind frustratingly pointless UI layers. The more recent attempts with Kx.ai I’m less familiar with, but seem to be a desperate marketing attempt to latch onto the next tech wave.

They have had some very talented technical staff over the years, including many of their consultants. I just think that if the leadership had embraced the core technology and understood the opportunity to build a valuable ecosystem, with a goal towards FOSS, things could look very different. All hindsight of course :)

Maybe it’s not too late to try that…


I'm very curious about this rewrite in Java, especially the orders of magnitude improvement. That sounds extremely impressive, and something that I wouldn't have considered possible. Can you share a bit more about how this performance improvement is achieved?


Well, I don't think the founders of that exchange complain about KDB that much. After all KDB allowed them to go to market quickly and make billions and than they changed the tech stack when demand justified it. So what? KDB was never meant to run a large exchange, but you just demonstrated that it can run a smaller one.

> ... and without any Java optimizations really ...

Come on, be honest! All of the core tech needs to be implemented in highly optimized GC-free Java. And you need to hire senior Java consultants who are highly specialized and do that for 10+ years and they also cost millions. I happen to know that BitMEX (located in Asia) has such consultants working from the EU. So, it's that easy to hire them!


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: