logoalt Hacker News

jiggawatts10/01/20242 repliesview on HN

I just had an evil thought: once AIs are fast enough, it would be possible to create a “dynamic” user interface on the fly using an AI. Instead of Java or C# code running in an event loop processing mouse clicks, in principle we could have a chat bot generate the UI elements in a script like WPF or plain HTML and process user mouse and keyboard input events!

If you squint at it, this is what chat bots do now, except with a “terminal” style text UI instead of a GUI or true Web UI.

The first incremental step had already been taken: pretty-printing of maths and code. Interactive components are a logical next step.

It would be a mere afternoon of work to write a web server where the dozens of “controllers” is replaced with a single call to an LLM API that simply sends the previous page HTML and the request HTML with headers and all.

“Based on the previous HTML above and the HTTP request below, output the response HTML.”

Just sprinkle on some function calling and a database schema, and the site is done!


Replies

ghthor10/01/2024

That actually sounds pretty entertaining. Especially if there is dynamic user input, like text box input

show 1 reply
porridgeraisin10/02/2024

Karpathy talks about this in https://karpathy.medium.com/software-2-0-a64152b37c35