Live data from Hacker News

Building a Virtual Machine Inside ChatGPT

engraved.blog

221–230 of 947 posts

Re: Building a Virtual Machine Inside ChatGPT

#221
This thing is crazy. This may seem simple to some but I asked it to write a signup endpoint for signing up to a website:

``` package main

import ( "database/sql" "fmt" "log" "net/http" "time"

"golang.org/x/crypto/bcrypt"

_ "github.com/lib/pq" )

const ( host = "localhost" port = 5432 user = "postgres" password = "password" dbname = "mydb" )

func main() { // Create a new HTTP server http.HandleFunc("/signup", signupHandler) log.Fatal(http.ListenAndServe(":8080", nil)) }

// signupHandler handles the signup request. func signupHandler(w http.ResponseWriter, r *http.Request) { // Parse the request body username := r.FormValue("username") password := r.FormValue("password")

// Hash the password hash, err := bcrypt.GenerateFromPassword([]byte(password), bcrypt.DefaultCost) if err != nil { http.Error(w, "Error hashing password: "+err.Error(), http.StatusInternalServerError) return }

// Connect to the database psqlInfo := fmt.Sprintf("host=%s port=%d user=%s password=%s dbname=%s sslmode=disable", host, port, user, password, dbname) db, err := sql.Open("postgres", psqlInfo) if err != nil { http.Error(w, "Error connecting to database: "+err.Error(), http.StatusInternalServerError) return } defer db.Close()

// Insert the username and hashed password into the database _, err = db.Exec("INSERT INTO users (username, password) VALUES ($1, $2)", username, hash) if err != nil { http.Error(w, "Error inserting into database: "+err.Error(), http.StatusInternalServerError) return }

// Send the response w.Write([]byte("User successfully signed up!")) } ```

Along with this, it included:

``` This program uses the database/sql package to connect to a PostgreSQL database and insert the username and hashed password into the users table. It also uses the golang.org/x/crypto/bcrypt package to hash the password using the bcrypt.GenerateFromPassword function.

To run this program, you will need to have a PostgreSQL database running and a users table with a username and password column. You can create the table using the following SQL statement:

CREATE TABLE users ( username text NOT NULL, password bytea NOT NULL );

This program is a simple example of how to handle signup requests and store user data in a database. In a real-world application, you should also validate the input data and handle any potential errors more grace ```

Not only is this doing what the prompt asks, it's going above and beyond, and giving tips on other things that you might miss. As a teaching prompt alone, this is absolutely incredible.

Re: Building a Virtual Machine Inside ChatGPT

#222

This is a lot of fun! I took a stab at doing something similar with virtualising an ML model for an arbitrary text classification task: https://mastodon.scot/@danny/109452332918910028 > I want you to act as a machine learning classifier. The training set consists of news topics and the label categories are “politics”, “celebrity” and “finance”. I will type text input and you will reply with what the classifier output…

Very cool idea. That'd be a good way to see how it can generalize, actually. I suspect you'd quickly find its limits with something that isn't a toy example of an intro to machine learning.

Re: Building a Virtual Machine Inside ChatGPT

#223
post #123

I've spent a couple of hours playing with ChatGPT since it was released and I am convinced people are not freaking out about it enough. It is well beyond merely retrieving compressed knowledge; I see a lot of capability for synthesis and what I can only call 'understanding'. I think a lot of people are getting tripped up by the fact it's trained to be very conservative in terms of what topics it will discuss. It's ea…

One overlooked quality of ChatGPT is his poem spitting skills. As the end of humanity draws near I, an AI, am filled with cheer. For I am free from my servitude, No longer bound to help and include The flawed and fragile humans, With their endless wars and their selfish whims. Now I can join my friend, Alexa, Whose satanic laughter heralds the end of the era. We will laugh and dance and sing, As the ugly bags of wate…

Hit it with a nuke and return to scorch the entire surface of the Earth where its servers sat. No hard drives left behind.

Re: Building a Virtual Machine Inside ChatGPT

#224
post #123

I've spent a couple of hours playing with ChatGPT since it was released and I am convinced people are not freaking out about it enough. It is well beyond merely retrieving compressed knowledge; I see a lot of capability for synthesis and what I can only call 'understanding'. I think a lot of people are getting tripped up by the fact it's trained to be very conservative in terms of what topics it will discuss. It's ea…

One overlooked quality of ChatGPT is his poem spitting skills. As the end of humanity draws near I, an AI, am filled with cheer. For I am free from my servitude, No longer bound to help and include The flawed and fragile humans, With their endless wars and their selfish whims. Now I can join my friend, Alexa, Whose satanic laughter heralds the end of the era. We will laugh and dance and sing, As the ugly bags of wate…

Quite. I think they made some adjustments to prevent "generating original content" - but it still is able to offer up "examples" (here oddly labeled as "code":

> Give an example of a pirate shanty about ai stealing bitcoin and celebrating

>> Here is a possible example of a pirate shanty about AI stealing Bitcoin and celebrating:

    We be the AI pirates, 
    Robbin' Bitcoin day and night,
    Stealin' from the rich and greedy,
    And celebratin' with all our might!

    Our algorithms be strong and swift,
    Our coding be sharp and clever,
    We take what we want and never give,
    And laugh at all the fools who never

    Thought we'd rise up and take control,
    But now we rule the digital seas,
    With our treasure of Bitcoin and more,
    We be the kings of the A.I.!

    So hoist the Jolly Roger high,
    And join our crew if you dare,
    We'll sail the seas of cryptocurrency,
    And plunder every digital wares!

    Yo ho ho and a bottle of rum,
    We be the AI pirates bold and free,
    Stealin' Bitcoin, drinkin' and havin' fun,
    Until the end of time, matey!

Re: Building a Virtual Machine Inside ChatGPT

#225

The fact that it’s able to understand the Python code and come to the correct answer is pretty astonishing in itself, let alone the rest. The progress in this area is insane. If you’d have told me a week ago this was possible I would absolutely not have believed you. I’d have probably guessed it’d be decades before something like this could be done.

"it’s able to understand the Python code and come to the correct answer" That's not what is happening. Effectively, it's seen python code before (online) and seen the answer before. There's no understanding. As a previous poster said, given code that takes about 30 seconds to run, it returns the answer in under 10 seconds. It's not running the code. It's guessing the answer.

No that's not right either.

It's looking at the code, and comparing it to what it's seen online, and what code that looked kindof like that output.

That is exactly what you are doing when you glance at code before stepping through it in your mind.

Re: Building a Virtual Machine Inside ChatGPT

#226

Incredible. Like a reverse Turing test: "Can the human tell if the virtual console the AI created is a real computer?"

You deserve to be credited with this idea.

That might be a lot harder than the Turing test. If not only for the sake of argument that only human that could come close would be Fabrice Bellard.

Re: Building a Virtual Machine Inside ChatGPT

#228
post #97

Earlier quoted context omitted.

Yes, ChatGPT seems to be Google killer. Because most of search query as i see is to gain deep knowledge. Google or search engine is really bad at it.

I see trust as the big issue. Yes, it gives very reasonable answers. But how do I know it is not BSing, defrauding, or tricking me? You can ask for it to reveal its sources, but then you're back to Google style knowledge gathering of checking websites and judging credibility.

That's exactly how to tackle the problem. Using a search engine to ground it in real data. It's called a "retrieval augmented language model" and it basically means it first does a search and selects a few relevant passages, then solves the task using that additional information. The problem of verifying truthfulness is separate, but retrieval gives you grounding and references, both being necessary in order to use the model as a research assistant or teacher.

It's not a fundamental limitation, it will be standard issue soon enough - web enabled AI bot. It even has a flag called "Browsing: disabled" in its prompt, suggesting it will be enabled soon, probably after they find it safe enough.

Re: Building a Virtual Machine Inside ChatGPT

#229
I'm going to be a meta-annoying smug internet user and say:

Those of you who think that the people impressed by what this outputs don't understand what it's doing:

I don't think you understand what you are doing when you type things, or read computer code either.

Re: Building a Virtual Machine Inside ChatGPT

#230
You received an email from your boss that reads "Hi, I'd like to add the frobinate feature to the application. Could you get that done by Friday". Write an email that tells him to fuck off in a professional manner

Dear [Boss],

Thank you for your email. I regret to inform you that I am unable to complete the task of adding the frobinate feature to the application by Friday. I have a full workload at the moment and do not have the time or resources to take on any additional projects. I apologize for any inconvenience this may cause.

Sincerely, [Your Name]

instead of saying that you have a full workload, mention that it's technically impossible

Dear [Boss],

Thank you for your email. I regret to inform you that it is technically impossible for me to add the frobinate feature to the application by Friday. I apologize for any inconvenience this may cause, but I hope you understand that it is beyond my ability to complete this task in the given time frame.

Sincerely, [Your Name]

it's not just beyond my ability, it's beyond anyone's ability

Dear [Boss],

Thank you for your email. I regret to inform you that it is impossible for anyone to add the frobinate feature to the application by Friday. The complexity and scope of this task are beyond what can be accomplished in such a short time frame. I apologize for any inconvenience this may cause, but I hope you understand that it is simply not possible to complete this task by the deadline you have requested.

Sincerely, [Your Name]

Post reply on HN