Here's the entirety of the prompt:<p><pre><code> <|endoftext|>/* This code is running inside of a bookmarklet. Each section should set and return _.*/
// The bookmarklet is now executing on example.com.
// Command: The variable called _ will always contain the previous result.
let _ = null;
/* Command: Add a new primary header "[PAGE TITLE]" by adding an HTML DOM node */
(() => {
let newHeader = document.createElement('h1');
newHeader.innerHTML = '[PAGE TITLE]';
document.body.appendChild(newHeader);
_ = newHeader;
return newHeader;
})()
/* Command: Find the first node containing the word 'house' */
(() => {
let xpath = "//*[contains(text(), 'house')]";
let matchingElement = document.evaluate(xpath, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
_ = matchingElement;
return matchingElement;
})()
/* Command: Delete that node */
(() => {
_.parentNode.removeChild(_);
return _;
})()
/* Command: Change the background color to white */
(() => {
document.body.style.backgroundColor = 'white';
_ = document.body;
return document.body;
})()
/* Command: Select the contents of the first pre tag */
(() => {
let node = document.querySelector('pre');
let selection = window.getSelection();
let range = document.createRange();
range.selectNodeContents(node);
selection.removeAllRanges();
selection.addRange(range);
_ = selection;
return selection;
})()
// The bookmarklet is now executing on [PAGE URL]. It is customized for [PAGE TITLE] and knows the correct
CSS selectors and DOM layout.
let _ = null;
/* Command: [USER INPUT] */</code></pre>
This might totally work and it's kind of impressive if it does. I'm still biased towards ultra skepticism towards all of this since the trustworthiness of all demos like this is completely corrupted at this point due to cherry picking and other deceptive tricks.
I've looked at some demo's of OpenAI Codex and it's pretty impressive start for sure. Something like this tied into R and a whole level of data analysis would become far more accessible to those with business knowledge who don't really want to learn the nuances of tools.<p>But I must say, having lived thru the 80's fad of code generating sudo 4gl's, the code this produces is pretty darn good indeed.<p>Now when something like this can handle a Google coding exam - that's going to be an epic milestone. Though old coding exam questions would equally offer up some great material to push this thru it's paces.
Been playing around with codex over the weekend as a on developer. Certainly impressive and also occasionally frustrating when you push it. The natural language to SQL are still the best and most consistent demos.
Heh, codex has a sense of humor. When asked to add "a url for the video on YouTube", codex added the url below. I won't spoil the surprise, but it's not the video linked in the OP:<p><a href="https://www.youtube.com/watch?v=dQw4w9WgXcQ" rel="nofollow">https://www.youtube.com/watch?v=dQw4w9WgXcQ</a>
The submitted URL was <a href="https://twitter.com/tectonic/status/1426980192317177859" rel="nofollow">https://twitter.com/tectonic/status/1426980192317177859</a> but the video seems like the real submission here, so I changed it. I also changed the title to a nice representative phrase from the video.
thanks for the info! great stuff!<p>gpt3's generalization-by-description never ceases to amuse me; but the difficult thing here is to get the right abstraction layers layered nicely in the conceptual lasagna.<p>This is where category theory becomes extremely powerful.<p>It has occured to me that codex-davinci has an intuitive "understanding" of constructs like monads, or something along that line.
05:39 <a href="https://youtu.be/tNcBQBTeyf4" rel="nofollow">https://youtu.be/tNcBQBTeyf4</a><p>You can see how OpenAI Codex misses some details about HN scraping. What's impressive that you might notice is the variable names it chooses which seems to show the nature of HN scraping codes on the internet
open source attempt at a clone,(not by me…)<p><a href="https://github.com/CodedotAl/gpt-code-clippy" rel="nofollow">https://github.com/CodedotAl/gpt-code-clippy</a>
This demo wouldn't have been out of place in the 80's.<p>Maybe everyone is smarter now and is is looking at some sort of underlying process. Or maybe it's just more of the same.<p>It make no sense to auto fill 'the video' The correct answer is I don't understand. That was a mistake. It also bold'ed the (site) which is not correct.<p>It's a short demo that clearly would have had many test runs.<p>The fact it 'learned' to do a bad Behat is amazing. But there's no reason to think it can equal Behat in 10 years time. Chess AI had a way forward, it's not clear this does.