Val Town Newsletter 5
Steve Krouseon
We shipped our new Deno runtime! We launched imports, from npm, esm.sh, deno.land. Our next focus is on quick wins, particularly in social directions. Y’all continue to dazzle us with very cool vals 🤩
We embarked on the migration to Deno mostly for security reasons, but also because they have incredibly sexy imports via URL (although it’s ironic to say that today because they finally conceded to adding an optional package.json to deno). I was hoping that the migration would only take 2-4 weeks but it took 6. Looking back on it, we are lucky it only took 6 weeks! It was a grueling migration, because porting a runtime is an incredibly difficult task, particularly when it was built quickly and without many tests. Tom rebuilt it almost entirely from the ground up, for security, and long-term maintainability. His experience working on similar projects at Observable was key here. Now we’re on much more stable and organized footing. And we have lots of tests!
We have almost 200 active user intervals running now, and I migrated over each one by hand to the new runtime, and babysat it for a few runs to make sure we didn’t cause any new bugs. Special thanks to Kartik (@akkartik) for being our volunteer to test the new runtime and for his patience when we ran into a couple snags.
The award for best Val Town user this month clearly goes to Andrew Healey (@healeycodes) for his tireless work trying to outwit our and Deno’s sandboxing. He’s up to maybe 5 exploits so far. So hats off to Andrew for keeping us all secure 🙏 If you’re interested in the challenges of sandboxing JavaScript, I highly recommend his article Sandboxing JavaScript Code.
You can read the full Upgrade to Deno guide here.
As alluded to, Deno comes with this amazing import syntax that fits so well into the Val Town model. I shudder to think of a full package.json in a val. We may have to do it some day but hopefully not soon! After we launched Deno, it only took Tom about an afternoon to launch the first version of imports 🥳
We didn’t set out to entirely redesign val headers this month, but we kinda did, piece by piece:
Refreshed Val
Public vs private is a lot clearer now, and how to switch betwhttps://blog.val.town/_astro/screenshot_2023-03-21_at_84721_am.CxwF4mrn_Z2HiYi.webp.png" loading="lazy" decoding="async" src="/_astro/screenshot_2023-03-21_at_84721_am.CxwF4mrn_Z2HiYi.webp">
We added profile pictureshttps://blog.val.town/_astro/screenshot_2023-03-21_at_85326_am.hn3firmK_274ytG.webp3-03-21 at 8.53.26 AM.png" loading="lazy" decoding="async" src="/_astro/screenshot_2023-03-21_at_85326_am.hn3firmK_274ytG.webp">
The Archive button is a simple way to get vals out ohttps://blog.val.town/_astro/screenshot_2023-03-21_at_84748_am.CWt-8Dbx_ZebVy2.webpg alt="Screenshot 2023-03-21 at 8.47.48 AM.png" loading="lazy" decoding="async" src="/_astro/screenshot_2023-03-21_at_84748_am.CWt-8Dbx_ZebVy2.webp"> In order to make rohttps://blog.val.town/_astro/screenshot_2023-03-21_at_84738_am.U9IK2WUQ_ZQSFYO.webpcription lives in tooltips now. A lot of folks probably don’t even know that Val Town comes with tracing built in. We automatically track all evaluations of any val, including every time your function is run, and show you all those evaluations on the val’s page at the bottom. For security concerns, we only show you evaluations on vals that you own and that you were the initiator of the run. So if someone else calls your val, you won’t see the evaluation history forhttps://blog.val.townhttps://blog.val.town/_astro/screenshot_2023-03-20_at_31127_pm.BnxeJSub_ZIiOA1.webpions UI, including these cute green checkmarks when no errors are thrown. You may have noticed that our API URL sometimes is displayed as We are focused on quick wins, better onboarding, and social features over the next couple weeks. We’re thinking about improved auth, better search, dynamic featured vals, profile page customization & hero stats, comments, liking and mini pull requests on vals, pretty val share URLs, public folders, seeing & getting notifications about your vals’ usage, and much more. https://twitter.com/stevekrouse/status/1637890851031359517 https://twitter.com/stevekrouse/status/1638937904087982086 https://twitter.com/stevekrouse/status/1638936182838132736?s=20 https://twitter.com/stevekrouse/status/1638158128473600002?s=20 https://twitter.com/dvddkkim/status/1635850605435707392?s=20 https://twitter.com/stevekrouse/status/1638930095585779712 

Bug fixes around moving vals in your workspaces & deleting vals

api.val.town, api2.val.town or api3.val.town. Apologies for the confusion! They all go to the same place. We needed to make a couple different subdomains and we moved our infrastructure around last week. We will soon reconsolidate them back to simply just api.val.town, but continue to support api2 and api3 as symlinks to api.val.town in perpetuity.
