Top
Best
New

Posted by samrolken 3 days ago

Show HN: Why write code if the LLM can just do the thing? (web app experiment)(github.com)
I spent a few hours last weekend testing whether AI can replace code by executing directly. Built a contact manager where every HTTP request goes to an LLM with three tools: database (SQLite), webResponse (HTML/JSON/JS), and updateMemory (feedback). No routes, no controllers, no business logic. The AI designs schemas on first request, generates UIs from paths alone, and evolves based on natural language feedback. It works—forms submit, data persists, APIs return JSON—but it's catastrophically slow (30-60s per request), absurdly expensive ($0.05/request), and has zero UI consistency between requests. The capability exists; performance is the problem. When inference gets 10x faster, maybe the question shifts from "how do we generate better code?" to "why generate code at all?"
433 points | 317 commentspage 5
whatpeoplewant 3 days ago|
Cool demo—running everything through a single LLM per request surfaces the real bottlenecks. A practical tweak is an agentic/multi‑agent pattern: have a planner synthesize a stable schema+UI spec (IR) once and cache it, then use small executor agents to call tools deterministically with constrained decoding; run validation/rendering in parallel, stream partial UI, and use a local model for cheap routing. That distributed, parallel agentic AI setup slashes tokens and latency while stabilizing UI across requests. You still avoid hand‑written code, but the system converges on reusable plans instead of re‑deriving them each time.
maderalabs 3 days ago||
This is awesome, and proves that code, really, is a hack. People don’t want code. It sucks, it’s hard to maintain, it has bugs, it has to be updated all the time. Gross.

What people want isn’t code - they want computers to do stuff for them. It just happens that right now, code is the best way you can do it.

The paradigm WILL change. It’s really just a matter of when. I think the point you make that these are problems of DEGREE, not problems of KIND is very important. It’s plausible, now it’s just optimization, and we know how that goes and have plenty of history to prove we consistently underestimate the degree to which computation can get faster and cheaper.

Really cool experiment!

losteric 3 days ago||
Code is a hack in the same way that gears and wheels and levers are hacks. People don’t want mechanical components, they just want machines to do stuff for them.
reeredfdfdf 2 days ago||
Most of web applications are CRUD apps - they store information in a database, and allow modifying & retrieving it later. People generally expect these systems to be deterministic, so that the data you submit will be later available in same format.

I certainly wouldn't want a patient healthcare system that might return slightly different results, or store the data in different format each time you make a request. Code is and will continue to be the best way to build deterministic computer information systems, regardless of whether it's generated by humans or AI.

apgwoz 3 days ago||
I think that the "tools" movement is probably the most interesting aspect of what's happening in the AI space. Why? Because we don't generally reuse the "jigs" we make as programmers, and the tool movement is forcing us to codify processes into reusable tools. My only hope is that we converge on a set of tools and processes that increase our productivity but don't require a burning a forrest to do so. Post AI still has agents, but it's automatically running small transformations based on pattern recognition of compiler output in a test, transform, compile, test ... loop.... or something.
cookiengineer 2 days ago||
This demo is pretty great, I love it!

And it reminded me a little about NeuralOS, which appeared here a couple months ago [1]. NeuralOS is different though as they decided to just skip the UI part, too, and let the UI generate based on intent.

Maybe together with your approach we can finally reproduce all the funny holodeck bugs from Star Trek!

[1] https://github.com/yuntian-group/neural-os

ilaksh 2 days ago||
Will be interesting to see how fast inference ASICs, diffusion LLMs, architectural changes like IBM granite small (when is that coming to OpenRouter?) and slight compromises for pre-generation can speed this up.

Also I wonder if eventually you could go further and skip the LLM entirely and just train a game world frame generator on productivity software.

justinclift 3 days ago||
Might as well just put your LLM directly on port 443 and tell it "You're a HTTPS server and application server (etc)" and let it do the whole lot. ;)
thibran 3 days ago||
Wouldn't be the trick to let AI code the app on first requests and then let it run the code instead of have it always generate everything? This should combine the best of both worlds.
deanputney 3 days ago|
Right– write the application by using it. Pave the paths that work the way you want.
firefoxd 3 days ago||
Neat! Let's take this at face value for a second. The generated code, and html can be written to disk. This way as the application progresses it is built. Plus you only ever build the parts that are needed.

Somehow it will also help you decide what is needed as an mvp. Instead of building everything you think you will need, you get only what you need. But if I use someone elses application running this repo, the first thing I'll do is go to /admin/users/all

thorax 2 days ago||
I like the OP's idea and think it actually has some fun you applications. Especially with a little more narrowing of scope.

Similar fun concept as the cataclysm library for Python: https://github.com/Mattie/cataclysm

nnnnico 3 days ago|
I tried this too! Where every button on the page triggered a get or post request, but the consistency between views was non existent lol, every refresh showed a different UI Definitely fixable with memory for the views and stuff though but keeping it pure like this is a very cool experiment. Since yours is using a actual storage maybe You could try also persisting page code or making the server stateful and running eval() on generated code. Love this
More comments...