Live data from Hacker News

Show HN: Why write code if the LLM can just do the thing? (web app experiment)

github.com

121–130 of 332 posts

Re: Show HN: Why write code if the LLM can just do the thing? (web app experiment)

#121

This is incredibly interesting. Now what if you ask it to optimize itself? Instead of just: prompt: `Handle this HTTP request: ${method} ${path}`, Append some simple generic instructions to the prompt that it should create a code path for the request if it doesn't already exist, and list all existing functions it's already created along with the total number of times each one has been called, or something like that.…

This brings a whole new meaning to "memoizing", if we just let the LLM be a function.

In fact, this thought has been percolating in the back of my mind but I don't know how to process it:

If LLMs were perfectly deterministic - e.g. for the same input we get the same output - and we actually started memoizing results for input sets by materializing them - what would that start to resemble?

I feel as though such a thing might start to resemble the source information the model was trained on. The fact that the model compresses all the possibilities into a limited space is exactly what makes it more valuable - instead of having to store every input, function body and outputs by memoizing that an LLM could generate, it just stores the model.

But this blows my mind somehow because if we DID store all the "working" pathways, what would that knowledgebase effectively represent and how would intellectual property work anymore in that case?

Thinking about functional programming, to me the potential to think of the LLM as the "anything" function, where a deterministic seed and input always produces the same output, with a knowledgebase of pregenererated outputs to use to speed up the retrieval of acceptable results for a given seed and set of inputs.... I can't put my finger on it.. is it a basically just a search engine then?

Let me try another way...

If I have a ask an LLM to generate a function for "what color is the fruit @fruit?", where fruit is the variable, and I memoize that @fruit = banana + seed 3 is "yellow", then the set of the prompt, input "@fruit", seed = 3, output = "yellow"... then this is now a fact that I could just memoize.

Would that be faster to retrieve the memoized result than calculating the result via the LLM?

And, what do we do with the thought that that set of information is "always true" with regards to intellectual property?

I honestly don't know yet.

Re: Show HN: Why write code if the LLM can just do the thing? (web app experiment)

#123

Everything in engineering is a tradeoff. Here you’re paying for decreased upfront effort with per-request cost and response time (which will go down in future for sure). Eventually the cost and response time will both be low enough that it’s not worth the upfront effort of coding the solution. Just another amazing outcome of technology being on a continual path of improvement. But “truly no-code” can never be determi…

I think your last comment hints at the possibility- runtime generated and persisted code... e.g. the first time you call a function that doesn't exist, it persists if it fulfills the requirement... and so the next time you just call the materialized function.

Of course the generated code might not work in all cases or scenarios, or may have to be generated multiple times, and yes it would be slower the first time.. but subsequent invocation would just be the code that was generated.

I'm trying to imagine what this looks like practically.. it's a system that writes itself as you use it? I feel like there is a thread to tug on there actually.

Re: Show HN: Why write code if the LLM can just do the thing? (web app experiment)

#124
post #50

Amazing. This is the Internet moment of AI. The Internet took something that used to be slow, cumbersome, expensive and made it fast, efficient, cheap. Now we are doing it again.

> Amazing. This is the Internet moment of AI. I am a big proponent of AI. To me, this experiment mostly shows how not to use AI.

Have you tried the thought experiment though?

I agree this way seems "wrong", but try putting on your engineering hat and ask what would you change to make it right?

I think that is a very interesting thread to tug on.

Re: Show HN: Why write code if the LLM can just do the thing? (web app experiment)

#125
post #57

Earlier quoted context omitted.

Because nobody actually wants a "web app". People want food, love, sex or: solutions. You or your coworker are not a web app. You can do some of the things that web apps can, and many things that a web app can't, but neither is because of the modality. Coded determinism is hard for many problems and I find it entirely plausible that it could turn out to be the wrong approach in software, that is designed to solve som…

> Because nobody actually wants a "web app". People want food, love, sex or: solutions. Okay but when I start my car I want to drive it, not fuck it.

...so that you can get to the supermarket for food, to meet someone you love, meet someone you may or may not love, or to solve the problem of how to get to work; etc.

Your ancestors didn't want horses and carts, bicycles, shoes - they wanted the solutions of the day to the same scenarios above.

Re: Show HN: Why write code if the LLM can just do the thing? (web app experiment)

#126
Just in time UI is incredibly promising direction. I don't expect (in the near term) that entire apps would do this but many small parts of them would really benefit. For instance, website/app tours could be just generated atop the existing ui.

Re: Show HN: Why write code if the LLM can just do the thing? (web app experiment)

#129
post #78

The question posed sounds like "why should we have deterministic behavior if we can have non-deterministic behavior instead?" Am I wrong to think that the answer is obvious? I mean, who wants web apps to behave differently every time you interact with them?

Like, for sure you can ask the AI to save it's "settings" or "context" to a local file in a format of its own choosing, and then bring that back in the next prompt ; couple this with temperature 0 and you should get to a fixed-point deterministic app immediately

Why wouldn't the llm codify that "context" into code so it doesn't have to rethink through it over and over? Just like humans would. Imagine if you were manually operating a website and every time a request came in you had come up with sql queries (without remembering how you did it last time) and manually type the responses. You wouldn't last long before you started automating.

Re: Show HN: Why write code if the LLM can just do the thing? (web app experiment)

#130
post #115

Earlier quoted context omitted.

I just this week vibe-coded a personal knowledge management app that reads all my org-mode and logseq files and answers questions, and can update them, with WebSpeech voice input. Now it's my todo manager, grocery list, "what do I need to do today?", "when did I get the leaves done the last few years?" and so on, even on mobile (bye bye Android-Emacs). It's just a basic chatbot with a few tools and access to my files…

I did that in the past, without a chatbot. Plain text search is really powerful.

Full assistant and a text search are quite a bit different things in terms of usefulness
Post reply on HN