Ok it seems like the saga started on Feb 2 when they said that they would shut down the free API on Feb 9 🤣🤣🤣
Seems like it was a classic @elonmusk bold proclamation that needed to be rolled back almost instantly...
https://x.com/TwitterDev/status/1621026986784337922?s=20
Notes
- Ah, I found the horse's mouth! @TwitterDev is the Twitter Developer API's own Twitter account!
- Time for some googling... Maybe the answers to my questions can be found somewhere on the interwebs instead of poking around blindly in the Twitter Developer Portal...
Text may be partial · Read original
- My live integrations are in the "Elevated" App section. There I have a http://val.town production app. It still seems to work, though I wonder for how much longer!
- I have some super old "Standalone Apps" (from my @firstround days, 👋 @brettberson) on the v1.1 API. Who knows (or cares) if those still work?
- I have used the Twitter API for random projects throughout the years. Apparently I've been using the "Projects & Apps" section vs this new Products section. I don't know how these relate to each other. I've never paid for access here https://x.com/stevekrouse/status/1644318722390196226/photo/1
- For Enterprise, whatever that is, there's a very legit Google Form https://x.com/stevekrouse/status/1644318014165200897/photo/1
- The Basic tier seems to offer the whole API (every resource, every route, and allows you to pull 10k tweets per month) This seems too expensive for hobbyists, so I guess this is for companies that want to experiment with the API 🤷♂️ https://x.com/stevekrouse/status/1644317741350805509/photo/1
- The Developer Portal now has "Free" and "Basic" tiers for the v2 API The free tier seems to only get you 1. Manage Tweets (post, delete) 2. User lookup This doesn't seem to include any ability to lookup tweets, so I'm not sure what kind of twitter bot this tier could power... https://x.com/stevekrouse/status/1644315947908431872/photo/1
- What is THE DEAL with the new Twitter API? I have a bunch of old twitter integrations - are they ok? Do I need to start paying $100/month for "Basic"? How does it all work? When is it going down? I'm going to do some research and tinkering this morning and live tweet as I go...
Text may be partial · Read original
- twice in the last week I met people irl and said "I DMed you and you never replied" and it was funny to see their reaction
- @laurentdelrey finder friendly
- Europe banning GPT is like the US banning TikTok: not invented here meets geopolitics https://x.com/GergelyOrosz/status/1643903467734409216
- @maccaw So good!
- 74 degrees it's time for a run in prospect park
- @thejasonchan I also like "goof off, king!"
- learn how to make your own in val town 🧵 https://x.com/tmcw/status/1644035676432748544
- just kidding, @tmcw 🤣🤣🤣🤣
- [ got distracted... wished my mom & grandparents happy passover... will resume later! ]
- How to architect this on Val Town...? Create a val to store history: autoGPTHistory = [] Define a function runAutoGPT: 1. Read from autoGPTHistory 2. Ask GPT what code to run based on the history 3. Run it and save the result in `autoGPTHistory` 4. Recursively call runAutoGPT
- Ok but now I need to do it recursively... 1. Ask GPT to achieve a goal, and explain how it can run code on Val Town to do that 2. Run the code it asks me to 3. Re-prompt GPT to achieve the goal, now with the context of what it previously ran 4. Repeat
- So freaking close! It's saving the result into a variable, but not returning it properly https://x.com/stevekrouse/status/1644037014528860160/photo/1Guys, it did it! GPT came up with code, ran it, and gave me back the result I want https://x.com/stevekrouse/status/1644037215385710629/photo/1
- Well it's pretty reasonable why: I tried to shove all of this content into the URL of my request. GPT is clearly not paying attention to my "only output JS" constraint Time to refactor my prompt... https://x.com/stevekrouse/status/1644035458807083016/photo/1So freaking close! It's saving the result into a variable, but not returning it properly https://x.com/stevekrouse/status/1644037014528860160/photo/1
- Well it's pretty reasonable why: I tried to shove all of this content into the URL of my request. GPT is clearly not paying attention to my "only output JS" constraint Time to refactor my prompt... https://x.com/stevekrouse/status/1644035458807083016/photo/1
- I've been blocked by Cloudflare before, but never on my own API. Classic! https://x.com/stevekrouse/status/1644034867103973376/photo/1
- Let me tell you: there's nothing quite like the feeling of waiting gpt generate code and then immediately evaluate it I chickened out and removed my auth token for now. I don't want it to accidentally leak any of my secrets!
- Never mind! I just made the auth token secret a parameter, so now I can easily make the function public https://www.val.town/@stevekrouse.evaltown
- (2) run val town code & get the output Let's make an `evaltown` function that can run code as me I am keeping it private so y'all can't run it! (Public vals are runnable by anyone) https://x.com/stevekrouse/status/1644028487949230091/photo/1
- Ok, if I want autonomy, it needs to be able to: 1. output val town code ✅ 2. run val town code & get the output 3. do this recursively somehow
- [ Got distracted by a user question and then had to make a tweet thread... ] https://x.com/stevekrouse/status/1644023790882398233?s=20
- The same distinction between functions and values lives in the Val Town API. /eval/ /eval/@stevekrouse.hnTopStory - > a function /eval/@stevekrouse.hnTopStory() -> returns a value https://api.val.town/eval/@stevekrouse.hnTopStory%28%29 https://x.com/stevekrouse/status/1644024366730977287/photo/1
- (1) Calling it immediately lets you iterate faster: every time you save, it runs the function and shows you the result (2) Calling it in another val means you have to first save the function, and then re-run the val calling it, but your code is more organized
- I normally do (1) when I'm iterating quickly, then move to (2) when it's done-ish We can do better as a platform at giving you the best of both worlds: functions & vals separate, but edits to the function, immediately re-runs calls to it reactively (like @observablehq)
- Let's say you want to get the top story from Hacker News You could make a function, like this: https://www.val.town/@stevekrouse.hnTopStory
- The downside of functions is that they don't run on save. You can't see the output as you're developing it. There are two patterns around this: 1. Immediately call the function: `(() => {...})()` 2. Call the function in another val https://x.com/stevekrouse/status/1644023793805828115/photo/1
- I want to clear up a common confusion with Val Town: Functions vs Values Like with traditional programming, functions are for behavior and values to store state. Example...
Text may be partial · Read original
- Nice! It seems to get the idea pretty quick https://x.com/stevekrouse/status/1644011893491638272/photo/1
- Pretty funny trying to teach GPT how to use Val Town: https://www.val.town/@stevekrouse.ValTownPrompt
- I wonder if I should just teach it how to use Val Town, ie give it these tips, and tell it that it can execute arbitrary code, and see what code it wants to execute... https://x.com/stevekrouse/status/1644003326722203652/photo/1
- @patife @Clerk it was easy enough to do, and it hopefully will give folks a taste of why they should sign up the medium is the message - val town is trying to be super lightweight and easy to use, and so should everything about it











