Top
Best
New

Posted by lubujackson 2 days ago

The Missing Layer(yagmin.com)
55 points | 53 commentspage 2
schmuhblaster 1 day ago|
I've been recently experimenting with using a Prolog-based DSL [0] as the missing layer: Start with a markdown document, "compile" it into the DSL, so that you obtain an "executable spec". Execution still involves LLMs, so it's not entirely deterministic, but it's probably more reliable than hoping your markdown instructions get interpreted in the right way.

[0] https://github.com/deepclause/deepclause-sdk

anupamchugh 2 days ago||
Documentation debt happens when docs and code are decoupled. One fix is to make specs stateful artifacts with change detection. In Shadowbook (disclosure: I built it), specs are files with hashes; when a spec changes, linked issues get flagged and can’t be closed until someone acknowledges the drift. That creates a feedback loop between docs and implementation without “vibe documenting.” It doesn’t solve everything, but it makes contradictions visible and forces a review gate when context shifts.
gf000 1 day ago||
I have been thinking of something similar for quite some time. Though my idea was more like making comments "first class citizens", and in certain formats they can link to each other/external documents, tracking inconsistent changes.

This might also extend to runtime checks (e.g. some business invariant in the form of an assert that has such a "dependency-tracked" comment)

anupamchugh 1 day ago||
I have that in my project... comments to track work as specs.
4b11b4 1 day ago||
Shadowbook is a fork of beads?
conartist6 1 day ago||
THE CODE IS THAT LAYER.

If your code does a shit job of capturing the requirements, no amount of markdown will improve your predicament until the code itself is concise enough to be a spec.

Of course you're free to ignore this advice. Lots of the world's code is spaghetti code. You're free to go that direction and reap the reward. Just don't expect to reach any further than mediocrity before your house of cards comes tumbling down, because it turns out "you don't need strong foundations to build tall things anymore" is just abjectly untrue

4b11b4 1 day ago|
This is fundamentally flawed. Code cannot always capture the requirements, nor the reasoning or scenario which led to these requirements.
conartist6 1 day ago||
Nevertheless, it captures what the system does. That makes it the true spec even if it's hard to read or figure out the intent behind. Writing an intent document is basically having a fap if the system doesn't do what you intend.
4b11b4 1 day ago||
Well sure but the discussion isn't "is the code is correct".
conartist6 1 day ago||
Right it's whether your aspirations need to be grounded in reality.

Do you actually need to build strong foundations, or can you just throw away all your work every time and start over from scratch?

What confounds me is why I am on Hacker News having to defend the idea of software architecture being a kind of capital. That's not supposed to make some sort of countercultural revolutionary. Where did everyone go!!

conartist6 1 day ago||
Just to remind you what Paul Graham said when he defined what the "Hacker" in Hacker News means:

> What and how should not be kept too separate. You're asking for trouble if you try to decide what to do without understanding how to do it. But hacking can certainly be more than just deciding how to implement some spec. At its best, it's creating the spec-- though it turns out the best way to do that is to implement it.

https://www.paulgraham.com/hp.html

ryanackley 2 days ago||
Creating massive amounts of semi-structured data is the missing layer? I can see an argument for that if you're a non-programmer who wants to create something. Although, at some point, it's a form of programming.

As a developer, I would rather just write the code and let AI write the semi-structured data that explains it. Creating reams of flow charts and stories just so an AI can build something properly sounds like hell to me.

sublinear 2 days ago|
> Creating reams of flow charts and stories just so an AI can build something properly sounds like hell to me.

Well yeah, that's why businesses have all those other employees. :)

I'm still trying to understand what this whole thread and blog post are about. Is HN finally seeing the light that AI doesn't replace people? Sure if you're determined enough you can run a business all by yourself, but this was always true. I guess AI can make information more accessible, but so does a search engine, and before that so did books.

bwestergard 1 day ago||
I'd be interested in hearing how the OP's project compares to UML.

https://en.wikipedia.org/wiki/Unified_Modeling_Language

vivzkestrel 1 day ago||
- one of the reasons why i am working on a semi deterministic production grade typescript application generator.

- The lowest layers are the most deterministic and the highest layers are the most vibe coded

- tooling and configuration is at the lowest layers and features are at the highest layer

CuriouslyC 1 day ago|
Good call. This is a hobby of mine as well. What's your approach?
groestl 2 days ago||
Maybe I'm missing something, or we do it differently here, but I think "spec" is defined to narrowly in that article. Start writing the first part of that document in that meeting, and everything ties together neatly.
mrbluecoat 2 days ago||
Upvoted for that animated gif alone. Best visual I've seen of AI coding results.
nurettin 2 days ago|
It looks like a trackmania shortcut.
zackmorris 1 day ago|
We can borrow some math from Nyquist and Shannon to understand how much information can be transmitted over a noisy channel and potentially overcome the magic ruler uncertainty from the article:

https://en.wikipedia.org/wiki/Nyquist_rate

https://en.wikipedia.org/wiki/Noisy-channel_coding_theorem

Loosely this means that if we're above the Shannon Limit of -1.6 dB (below a 50% error rate), then data can be retransmitted some number of times to reconstruct it by:

  number of retransmissions = log(desired confidence)/log(odds of failure)
Where confidence for n sigma, using the cumulative distribution function phi is:

  confidence = 1 - phi(sigma)
So for example, if we want to achieve the gold standard 5 sigma confidence level of physics for a discovery (an uncertainty of 2.87x10^-7), and we have a channel that's n% noisy, here is a small table showing the number of resends needed:

  Error rate Number of resends
  0.1%       3
  1%         4
  10%        7
  25%        11
  49%        ~650
In practice, the bit error rate for most communication channels today is below 0.1% (dialup is 10^-6 to 10^-4, ethernet is around 10^-12 to 10^-10). Meaning that to send 512 or 1500 byte packets for dialup and ethernet respectively results in a cumulative resend rate of around 4% (dialup) and 0.1% (ethernet).

Just so we have it, the maximum transmission unit (MTU), which is the 512 or 1500 bytes above, can be calculated by:

MTU in bits = (desired packet loss rate)/(bit error rate)

So (4%)/(10^-5) = 4000 bits = 500 bytes for dialup and (0.0000001)/(10^-11) = 10000 bits = 1250 bytes for ethernet. 512 and 1500 are close enough in practice, although ethernet has jumbo frames now since its error rate has remained low despite bandwidth increases.

So even if AI makes a mistake 10-25% of the time, we only have to re-run it about 10 times (or run 10 individually trained models once) to reach a 5 sigma confidence level.

In other words, it's the lower error rate achieved by LLMs in the last year or two that has provided enough confidence to scale their problem solving ability to any number of steps. That's why it feels like they can solve any problem, whereas before that they would often answer with nonsense or give up. It's a little like how the high signal to noise ratio of transistors made computers possible.

Since GPU computing power vs price still doubles every 2 years, we only have to wait about 7 years for AI to basically get the answer right every time, given the context available to it.

For these reasons, I disagree with the premise of the article that AI may never provide enough certainty to provide engineering safety, but I appreciate and have experienced the sentiment. This is why I estimate that the Singularity may arrive within 7 years, but certainly within 14 to 21 years at that rate of confidence level increase.

lubujackson 1 day ago|
I appreciate the detailed response and I certainly haven't studied this, but part of the reason I made the measurement/construction comparison is because information is not equally important, but the errors are more or less equally distributed. And the biggest issue is the lack of ability to know if something is an error in the first place, failure is only defined by the difference between our intent and the result. Code is how we communicate our intent most precisely.
zackmorris 22 hours ago||
You're absolutely right. Apologies if I came off as critical, which wasn't my intent.

I was trying to make a connection with random sampling as a way to maybe reduce the inherent uncertainty in how well AI solves problems, but there's still a chance that 10 AIs could come up with the wrong answer and we'd have no way of knowing. Like how wisdom of the crowd can still lead to design by committee mistakes. Plus I'm guessing that AIs already work through several layers of voting internally to reach consensus. So maybe my comment was more of a breadcrumb than an answer.

Some other related topics might be error correcting codes (like ECC ram), Reed-Solomon error correction, the Condorcet paradox (voting may not be able to reach consensus) and even the halting problem (zero error might not be reachable in limited time).

However, I do feel that AI has reached an MVP status that it never had before. Your post reminded me of something I wrote about in 2011, where I said that we might not need a magic bullet to fix programming, just a sufficiently advanced one:

https://web.archive.org/web/20151023135956/http://zackarymor...

I took my blog(s) down years ago because I was embarrassed by what I wrote (it was during the Occupy Wall Street days but the rich guys won). It always felt so.. sophomoric, no matter how hard I tried to convey my thoughts. But it's interesting how so little has changed in the time since, yet some important things have.

Like, I hadn't used Docker in 2011 (it didn't come out until 2013) so all I could imagine was Erlang orchestrating a bunch of AIs. I thought that maybe a virtual ant colony could be used for hill climbing, similarly to how genetic algorithms evolve better solutions, which today might be better represented by temperature in LLMs. We never got true multicore computing (which still devastates me), but we did get Apple's M line of ARM processors and video cards that reached ludicrous speed.

What I'm trying to say is, I know that it seems like AI is all over the place right now, and it's hard to know if it's correct or hallucinating. Even when starting with the same random seed, it seems like getting two AIs to reach the same conclusion is still an open problem, just like with reproducible builds.

So I just want to say that I view LLMs as a small piece of a much larger puzzle. We can imagine a minimal LLM with less than 1 billion parameters (more likely 1 million) that controls a neuron in a virtual brain. Then it's not so hard to imagine millions or billions of those working together to solve any problem, just like we do. I see AIs like ChatGPT more like logic gates than processors. And they're already good enough to be considered fully reliable, if not better at humans than most tasks already, so it's easy to imagine a society of them with metacognition that couldn't get the wrong answer if it tried. Kind of like when someone's wrong on the internet and everyone lets them know it!