Hacker Newsnew | past | comments | ask | show | jobs | submit | amw-zero's commentslogin

What are you proving in Lean if you don't have the semantics of the thing that you're writing a proof about?

You need to pick an abstraction level. I don't prove in lean the impact of my programs on the price of eggs at the local market. I don't prove in lean how much energy my programs consume, or even how much RAM they consume. I do prove that say a particular pair of functions commute, or that another function is idempotent, or that under a denotational semantics a collection of functions can be composed without error.

I think that is a valid level to use formal verification but I would argue it is much more powerful to also have a formal model of code. For example, if I have:

  my_value = run_some_function(some_arg_1, some_arg_2)
  for some_value in my_value.some_list:
     run_some_action(some_value)
Yes it is very helpful to know some properties about `run_some_function` (maybe it is commutative? idempotent?), but it is much more valuable to have a model which can translate what ultimately is being passed to `run_some_action` at the end and how that derives from the return of `run_some_function`, grounding the LLM's reasoning in something deterministic it can't break from.

But then you won't know how to efficiently use AI, so you'll still end up spending more money when you start using it, nullifying any of the micro-optimization you were trying to do in the first place.

Aren't AI companies aiming at a level of AI that would basically be "do this app" and will take care of everything?

If not, what are they even doing that they keep burning through piles of cash?


> But then you won't know how to efficiently use AI, so you'll still end up spending more money when you start using it, nullifying any of the micro-optimization you were trying to do in the first place.

Not really. Models eat harnesses. Once the new model drops it invalidates lots of harness engineering people have done, and invalidates things they have learnt about how to efficiently use AI. The better models get the less need there is to need to know how to use them efficiently. They're also getting better at helping you use them efficiently.

It's weird. It's like no matter what you do, it's all just a waste of time.


only way to win is not to play

or maybe double-down extra hard


I wish "how to efficiently use AI" was a deep subject; it isn't. You point it at problems and they get solved. It's mega boring, and the main reason I'm looking to leave the industry.

Overengineering it can also harm performance. When a new model comes out with a different system prompt, custom instructions can become a hindrance.

I'm not seeing that in practice. It's another infinite space. We don't know what the best techniques are at all, and there are many many different ways to apply it.

What I can confidently tell you is writing a 2-sentence description of an application you want built does not work in any sense of the word. And, the difference between vibe coding and agentic engineering is vast.


Why do you have to personally invent how to effectively use AI? You can learn from other people's mistakes, wait for best practices to settle. Be Java.

> Be Java.

Ok if this is the advice then I'm gonna look for a second opinion first. :)

More seriously: making any crap with AI is trivial and doesn't need learning. Making something better and more valuable than all the competitors *that have the same tools as you* is more involved, and relies 100% on knowing how to extract unique value from the tools. A part of that comes from your product/industry expertise (acquired before AI, much like your competitors), but unless you're a genius or in a greenfield, what will matter will be the other part where you have trained hard to be a better driver than your competition who just waited and watched a few youtubes.


We are not in the singularity. We currently can only produce reliable code / formalizations that have reliable checkers. If there wasn't an oracle that could tell Claude "yes" or "no," it would not be able to prove anything like this.

Because Postgres hasn't adopted that yet, and I'm not aware of any actual plan to adopt it? Tom Lane just did an interview where he said he doesn't see any world where they move away from dead tuples and vacuuming.

For anyone interested, this is the interview with Tom Lane: https://www.snowflake.com/en/blog/engineering/30-years-of-po...

This article about MVCC is also quite interesting: https://boringsql.com/posts/mvcc-bad-bad/


The MVCC article is good but feels like it's trying too hard to be a "on one hand, on the other hand" kind of analysis. Postgres is the only database that uses its design because, as the article admits at the end, it has "operationally loud failure modes".

Compare Postgres and Oracle (block undo based) for what happens when the database is underprovisioned:

• Postgres: bottlenecks on CPU. The database falls behind on vacuuming and dies.

• Oracle: bottlenecks on free disk space. Individual long running statements, SNAPSHOT and READ ONLY transactions get cancelled with a "snapshot too old" error.

In Oracle the database continues running and the blast radius is limited to a single statement. Because it's the longest running statements that die first, that almost certainly means an asynchronous business report and not live user traffic - which is exactly what you'd hope for. Most businesses can tolerate a missing day in a report much better than customer-facing outages, and fixing it is just a single SQL statement if you have free disk space (adding more storage is easy due to the SAN).

That's much preferable! How many post mortems do we see on HN from some startup bemoaning a multi-hour outage caused by Postgres' MVCC choices? Quite a lot. Now think about how often do you recall reading a post mortem of an outage at some big bank, hospital, shipping port etc that traces back to Oracle's MVCC engine? I don't think I ever read one. The startup world likes to make fun of Big Enterprise, but they have a much better track record of database uptime because they stay away from vacuum-based MVCC.

Disclosure: I have a part time role in the Oracle DB group. Unapproved opinions may be found above, caveat emptor.


The Postgres approach to MVCC ("append-only storage" in the jargon of https://www.cs.cmu.edu/~pavlo/blog/2023/04/the-part-of-postg...) is mandatory if you actually return object addresses to the client and thus need pointer stability (I've implemented such a DB). However, Postgres doesn't actually have this requirement so it makes little sense in that context. The beauty of undo log-based MVCC is that all versions superseded by a committed transaction are freed at the same time and from the same contiguous region of memory or disk, which makes it both memory- and SSD-friendly ("grouping by death time" in the jargon of https://research.cs.wisc.edu/wind/Publications/nvmw18-he.pdf).

Yes. This is the thing that tripped me the most when learning postgres internals. It was obvious that append-only enabled stable addressing but then it just never materializes. I was incredibly perplexed. Surely I'm missing something right? Nope!

Postgres folks will need to correct me but I believe the append-only MVCC design originated from the original "time-travel" requirement (which IIRC was soon dropped). There are better approaches to time-travel anyway such as time-split B-trees (https://www.microsoft.com/en-us/research/wp-content/uploads/...).

You can do time travel with any MVCC design. Undo logging is well suited to it and Oracle ships several forms of time travelling SQL under the name Flashback.

The simplest form of Flashback just uses the undo logs. Normally undo is deleted once no live transaction uses it, but you can set a retention time to allow SELECT ... AS OF ... queries to go back at least that far.

However, keeping undo logs around forever isn't practical. If you want to go back a year then there's Flashback Time Travel which copies old data into tables in a form that the query engine can use to answer AS OF queries more efficiently.


The time-split B-tree is designed to make time-travel queries efficient in both time and space. That is not a trivial problem.

I don’t know if Flashback uses this technique, but the SQL Server architect who taught me time-split B-trees now works at Oracle :)


Hah, interesting. I need to investigate that data structure. I don't know if Flashback uses it either - if you enable the time travel feature then undo logs are processed into internal tables partitioned by SCN, but I suppose it's possible those tables are stored in a different way to regular heap-organized or index-organized tables.

The nodes in a time-split B-tree tile the 2-D time/primary-key space in an arbitrary way except they must cover it fully with no overlaps (think of each node as an arbitrary rectangle with primary key as one axis and time as the other). That gives you a lot of freedom in how you partition the space, allowing you to exploit local sparsity in either the time distribution or the primary key distribution.

Thanks, that's interesting!

Yes and that would make sense, and what I would expect, if it were available. I understand it is load-bearing but it is nonetheless surprising that it hasn't been revisited. It is surprising, at least to me, that time-travel never shipped given its feasibility.

Thanks, that MVCC article was a great read.

Yeah, I love those time-travellers' blogs. Wished only he'd tell us about next years' market movements instead of issues in Oracle's DB.

The boringsql article was very informative, if you can get past some flourishes typical of a coauthor we all know:

> That's the honest shape of the mitigation: HOT is opportunistic, arrives in steady state rather than on demand, and quietly costs you 30% of your table size in reserved space.


Claude, please remove all Claudisms from this article.

Users of software often do not blindly do, or not do, whatever the upstream open source project does.

OrioleDB is friendlier to SSDs and is de facto "the other" MVCC of Postgres. OrioleDB may be still be "beta" but that hasn't stopped operators/users.

MariaDB has some alternative MVCC, one of them is particularly outstanding.

SSD endurance at scale has on and off been a major concern for me, so I empathize with that. Others deserve to know of OrioleDB, and Postgres more broadly is probably better off for it too.

  https://www.uber.com/us/en/blog/postgres-to-mysql-migration/

All of the problems Uber had, could have been solved back then, had they actually asked for help on the mailing list. Several of the issues they had have also been fixed/changed in Postgres itself as a reaction to that discussion.

Please elaborate on details if you can.

What Uber posted there did prompt me to investigate the topic of Postgres old MVCC, OrioleDB, and MariaDB's alternative MVCC.

Ultimately, one change in a row results in the entire row being written again, from what I read. Is this not accurate?

MariaDB's MVCC doesn't write the entire row again, only the delta. One of the newer more advanced MVCC for MariaDB are even more efficient.

In my view, "runaway vacuum" has never not been a case of either poorly done IT operations or poorly thought out (or just not thought out) database usage patterns by the in-house application developers. While "throw hardware at the problem" isn't a great answer, I have never not seen NVDIMM for ZFS ZiL/SLOG not mitigate "runaway vacuum", as ugly as that is -- that was a long time ago though.

SSD endurance can get daunting in an advanced hosting environment. It's odd that I don't often see others have these metrics in their Prometheus+Grafana. The people who are telling me that OrioleDB alleviates their endurance concerns aren't at liberty to show me their Grafana.

I might be able to get some real SSD endurance metrics comparisons at meaningful scale over the next couple years but I don't know.

Beyond that, I think the only real way to find out is a snapshot of real-world application production Postgres databases and use logical replication to replay a year of database traffic to find out what the delta on SSD endurance impact is.

I don't claim to be a Postgres expert relative to the upper echelon that frequents this site, always happy to get more insight to Postgres, my attention has generally been on either North or South side of that part of a webscale stack.


It's also hard to even claim they migrated from “PostgreSQL” to “MySQL”; they surely run MySQL underneath in their new system, but it's a really weird hybrid where it's basically only the storage engine. Even secondary indexes, on of their main points of contention in the article, is managed as a separate system on top of the database.

Damn this is sad. I just wish mySQL development isn't stalled as it is.

If you had to pick a default, an arena allocator would definitely be it. Although even better would be a fixed-size arena that can never grow, like Tigerbeetle does.

I don't think the footguns you're talking about are real by the way.


Why is that baffling? You usually have to diagnose what's going on before summarizing it into a status update.

Or do you mean you want to see: "Something is wrong, we're looking into it."


Yes. An acknowledgement of the issue should be fine, even if they don’t know why it happened. If a random dev with one PR can see that no jobs are picked up, GitHub should see it as well and add an entry to their status “hey, actions aren’t getting picked up, we are looking into it”. I wasted 20 minutes looking into out actions config looking got an issue, thought maybe we messed something up, but in turned out it was GitHub.


Yes then you know the problem is not in your set up and so do not have to waste time looking into that possibility.


The status page should detect the thing they are looking into. Kinda like a Check Engine light or gauge reading notifies you to investigate a problem with your engine.


I totally agree. I have this nagging feeling that LLMs push things like this past the breaking point. Effects and contracts are _obviously_ useful to humans as well, we've just gotten by without them for a long time. But when you have intelligence on demand, context building is a huge bottleneck, and local reasoning becomes way more useful from an efficiency perspective.

I'd love to see some actual experiments with LLMs in this area. There are a fair number of languages with effect implementations at this point.


You can use them for dev environments.

You just have to finish development in 8 hours.


It would not, and you would know that if you actually evaluated the results.


I have gone through this process and evaluated the results. Maybe you're referring to their comment as written, but going through what OC described + handholding leads to very good results in my experience.


I agree with you agentdev! Here, you want accurate results, you need to have harness in place to control the quality of output.


"very good" 99 percent of time and hallucinating 1 percent makes the "very good" part untrustworthy.


The "Very good" I'm referring to is far better than only 99%. I can't offer solid stats off the top sadly, so you'll have to just take my word for it ;)

I'll take the opportunity to note that if you're running solid evals, you'll have data to back the efficacy of your system. If you are seeing a hallucination rate of 1%, then you certainly should be working on your harness/toolset/context/prompting etc.

Saying "1% hallucination rate..." is akin to saying "30,000mi lifespan for [modern japanese make engine]". Something is wrong.


It's not weird, since 99% of rentals are apartments, right?


Source? In my neighborhood on the outskirts of downtown (about a 10 minute drive out) at least 25% of the houses are rentals, maybe more like 33%. Lots of investment properties people scooped up when mortgages were 2%.


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

Search: