Talk to GPT
I made an Apple Shortcut for ChatGPT. I use it on my:
- Apple Watch - “Hey Siri, talk to GPT”.
- Mac - run the shortcut and type into a text box.
- iPhone - talk or type.
You can use this shortcut too!
- Get an OpenAI API key.
- Install the shortcut by visiting this link on your Mac or iPhone.
- Enter your API key.
Privacy
The API key will remain on your device. Besides talking directly to the OpenAI API, the shortcut runs entirely on your device.
Customize the prompt
You can change the prompt by editing the shortcut in the Shortcuts app on your Mac or iPhone. I find this makes it much more powerful than off-the-shelf wrapper apps like Quora’s Poe.
GPT-4
If OpenAI have granted you access to GPT-4 and you would rather use that than ChatGPT, just change model
to gpt-4
in the shortcut.
Things I've made and done
Programming environments
- Code Lauren - An online IDE for beginners. Includes a vm that lets the user run their program forwards or backwards. Watch a demo or try it out.
- Isla - A livecoding interface and programming language for young children.
Games
- Pistol Slut - A platform shooter. Guns, grenades, parallax scrolling, particle effects. The enemies work in teams. I talked about the game at JSConf.
- Empty Black - A puzzle platform shooter. Throw crates, set off bombs, fire missiles, stab with your sword. Featured in Kill Screen, PC Gamer and others.
Frameworks
- Coquette - A micro framework for JavaScript games.
Building to learn
- Gitlet - Git implemented in 1000 lines of JavaScript. I used what I learned building it to write an essay and talk on the innards of Git.
- Little Lisp - A Lisp interpreter in JavaScript and an essay about how it works.
Music
- 10997 - My latest record on Apple Music and Spotify. Recorded on my phone in my kitchen in Berlin.
Essays
- Git from the inside out
- A practical introduction to functional programming
- A Lisp interpreter in JavaScript
- The Fibonacci heap ruins my life
- Walking
Talks
- Mary livecodes Space Invaders
- An intuitive introduction to algorithmic efficiency
- Mary livecodes a drum machine
- Git from the inside out
- Isla: a programming language for children
- Pistol Slut, collision detection, AI, falling in love
Interviews
- Future of Coding podcast
- The Setup - interview about the tools I use
Texting with GPT-3
I set up my GPT-3 account so I can text with it over SMS. It’s pretty fun.
To build this, I combined Airtable and Twilio. Here’s how it works:
- I text my query to a Twilio phone number. E.g. “What is a good thing to reflect on as I fall asleep?”
- Twilio receives the text and sends a webhook with the query to Airtable.
- Airtable receives the webhook and this triggers an automation.
- The automation stores the query.
- The automation sends the query to the GPT-3 API.
- The automation gets the response from the GPT-3 API.
- The automation stores the response.
- The automation texts the response back to me.
Airtable serves two purposes.
First, it sends the query to the GPT-3 API.
Second, it provides a way to store queries and responses, which allows it to build up context in an exchange. For example, imagine I send this initial message to GPT-3:
The following is a conversation with an AI movie buff.
The movie buff has excellent taste in movies and is
great at recommending obscure but high quality movies.
Human: Hello, can you recommend me a movie?
AI: Sure, how about Hoop Dreams?
Human: I loved that. Can you recommend me a movie like it?
AI:
It replied with:
Sure, how about Beautiful Girls.
I replied:
...Human: I actually didn't like that movie at all. Can you
recommend me another?
GPT-3:
AI: Sure, how about Boyhood?
Me:
...Human: I did like that one. I really loved Drinking
Buddies which felt more truthy. Can you recommend a movie
like that?
The ...
s are what create the context. GPT-3 only operates based on your query. It has no memory of what you sent it previously. To retain context, each query you send must recapitulate earlier messages.
So, in step 5 above, Airtable gathers up all earlier consecutive queries that start with ...
, plus one more (the query that started the exchange e.g. “The following [etc]”), plus the intervening replies from GPT-3. It sends this whole chunk to GPT-3 as a query.
This enables you to steer the algorithm towards more and more useful responses.
Future of Coding podcast interview
I was interviewed on the Future of Coding podcast. It was a really fun conversation. We talked about:
- My work at Airtable helping build tools for non-programmers to make software to do their work.
- Making software without writing code.
- GameMaker, an amazing environment for creating games with minimal code. It has been used to make killers like Nuclear Throne, Hyper Light Drifter and the first version of Spelunky.
- UI design lessons from games like Into the Breach and The Witness.
- Code Lauren and Isla, my past attempts at making accessible programming environments and how my goals of learning to write compilers conflicted with the tools’ goals of making it easier for beginner programmers to build software.
Exponential explorer
I wanted to get a better intuition for exponential growth. So I made this exponential explorer.
It lets me directly manipulate the starting amount, growth rate and number of periods of a graphed exponential.
I can create multiple graphs and overlay them or compare them side by side to see the relative effects of the different factors.
I can create a set of graphs and share a link to illustrate a property of exponentials. For example: in this exponential, nothing happens for half the periods, then it goes off like a rocketship.
Step
Use Step to get a more precise understanding of how code executes.
You see a code listing. You click on the part of the code that you think will execute next. Then you click on the part of the code that you think will execute after that. And so on.
This is just a proof of concept. You can’t enter your own code, but I plan to change that.
Paper programs animation program
Inspired by Dynamicland, I added a feature to Paper Programs to make each page publish a picture of itself. I used this feature to write a very crude animation program.
The dynamic medium community in London
I want to help foster the community of people in London who are interested in the dynamic medium / tools for thought / interactive simulations for creation or understanding.
Here is a hopelessly narrow set of example projects:
A possible first step. I’ll arrange a meetup. At the meetup, I’ll give a brief talk that provides an overview of some of the interesting projects that I know of. Around the room, there will be posters that give more information about each project. These posters could attract groups of people who might discuss the project, or even get out a laptop and work together on trying it out.
This is just a set of initial bad ideas. If you have thoughts about how I could make them better, I’d love you to email me at mary@maryrosecook.com or send me a reply on Twitter. Thanks!