跳到正文
每分钟自动更新
11月18日周三
  1. Simon Willison

    Running the full server-side Datasette Python app in the browser with service workers and Pyodide

    中文摘要

    Datasette Lite是我将Datasette Python应用程序移植到浏览器中运行的版本,使用的是WebAssembly和Pyodide。我使用service workers发布了Datasette Lite的完整重写版本,现在它几乎与真正的服务器端应用程序无法区分。现在你可以使用精心设计的URL lite.datasette.io完成以下所有操作:加载客户端的Datasette来浏览任何SQLite数据库、JSON文件、CSV文件或SQL脚本;从PyPI中选择一个发布的Datasette版本进行加载;从Datasette GitHub仓库中选择特定的提交、标签或分支名称;从超过100个SQLite版本中进行选择,与Datasette一起使用;从PyPI或wheel文件的URL中安装额外的Datasette插件,包括JavaScript可视化工具。能够加载特定的Datasette引用、插件和SQLite版本,使这成为一种极好的工具,可以链接到正在进行中的功能演示或错误复现,而无需启动完整的Web服务器来提供该演示。例如,考虑以下URL:https://lite.datasette.io/?install=datasette-maplibre&url=https://gist.githubusercontent.com/simonw/39fa5d399465766039549912e2b3d291/raw/f6dfba9

    英文原文

    Datasette Lite is my port of the Datasette Python application to run directly in the browser using WebAssembly and Pyodide . I've released a complete rewrite of Datasette Lite using service workers, and it's now almost indistinguishable from the real server-side application. You can now do all of the following, using a carefully crafted URL to lite.datasette.io : Load client-side Datasette to browse any SQLite database, JSON file, CSV file or SQL script Select a released version of Datasette to load from PyPI Load a specific commit, tag, or branch name from the Datasette GitHub repository Pick from over 100 versions of SQLite to use with Datasette Install additional Datasette plugins from PyPI or URLs to wheel files, including JavaScript visualization tools The ability to load specific Datasette references, plugins, and SQLite versions makes this a fantastic tool for linking to demos of work-in-progress features or bug reproductions, without needing to spin up a full web server to serve that demo. As an example, consider the following URL: https://lite.datasette.io/?install=datasette-maplibre&url=https://gist.githubusercontent.com/simonw/39fa5d399465766039549912e2b3d291/raw/f6dfba9

11月16日周一
  1. Simon Willison

    datasette 1.0a43

    中文摘要

    发布:datasette 1.0a43 我一直在努力利用Claude Fable 5.2来帮助完成1.0里程碑,目前该里程碑已完成53%。此次发布的最重要的1.0功能是输出渲染器的流式支持——内置的TSV和CSV导出机制现在也使用了这一功能,插件可以通过新的Response.stream()方法注册自己,以一次性流式传输表中的每一行。有一些安全修复,其中一项我认定值得发布GitHub安全公告:私有存储查询可能会被暴露,从而允许访问查询的标题和SQL(但不允许执行该查询)。还有数十项较小的改进。行页面的JSON表示终于有了适合1.0的设计。一个新的<datasette-copy-button>网络组件在多个地方提供了复制模式的功能。行页面中的列中的JSON可以进行美化排版。新增了一个DatasetteModal.confirm() JavaScript实用方法。此外还有数十个错误修复,包括Zihan Dai、Peter Olkhovets、Ilya Khalafi和Ankita Advitot的贡献。我最兴奋的新功能是一个非常小的功能:我已在Datasette中添加了CSS多页视图过渡效果!

    英文原文

    Release: datasette 1.0a43 I've been leaning hard into Claude Fable 5.2 to help knock things off the 1.0 milestone , which is now 53% complete. The biggest 1.0 item in this release is streaming support for output renderers - the built-in TSV and CSV export mechanisms now use this as well, and plugins can register themselves as capable of streaming every row in a table in one go via the new Response.stream() method. There are a couple of security fixes, one of which I deemed deserving of a GitHub advisory : private stored queries could be exposed, granting access to the title and SQL of the query (but not allowing that query to be executed). There are dozens of smaller improvements. The row page JSON representation finally has a design suitable for 1.0 . A new <datasette-copy-button> Web Component provides copy-schema in various places. JSON in columns on the row page can be pretty-printed. There's a new DatasetteModal.confirm() JavaScript utility method. Plus dozens of bug fixes, including contributions by Zihan Dai , Peter Olkhovets , Ilya Khalafi , and Ankita Advitot . The feature I'm most excited about is a pretty tiny one: I've added CSS multi-page view transitions to Datasette!

11月12日周四
  1. Simon Willison

    Browse tools.simonwillison.net by tag

    中文摘要

    通过标签浏览 tools.simonwillison.net 我一直想要一种更好的方式来浏览我收集的由 vibe-coded 工具(目前已有 244 个)。 在我每周重置之前,我还有几笔 Fable 5.2 的积分,所以我用它们来运行程序,使用 tree-sitter 来分析每个工具所使用的 JavaScript API、库和网络 API 主机的代码。 现在首页上现在有标签云,可以按这些类别进行浏览:标签:javascript,tools,ai,generative-ai,llms,claude,vibe-coding

    英文原文

    Browse tools.simonwillison.net by tag I've been wanting a better way to browse my collection of vibe-coded tools (244 and counting) for a while. I had a few Fable 5.2 credits left over before my weekly reset so I set it to work using tree-sitter to analyze the code for JavaScript APIs, libraries, and web API hosts used by each tool. The homepage now features tag clouds for browsing by each of those categories of tag: Tags: javascript , tools , ai , generative-ai , llms , claude , vibe-coding

11月9日周一
  1. Simon Willison

    The Web Is More Than Enough, by Paul Ford

    中文摘要

    对保罗·福特(Paul Ford)的文章《The Web Is More Than Enough》的评论——Hacker News。好的,这条评论说服我尝试了一下。今天早上我用Three.js做了一件东西——一个海蛞蝓主题的法贝热彩蛋:https://static.simonwillison.net/static/2026/Hidden-Reef-Egg...(77KB)。我刚刚让Claude(在常规Claude Chat中运行的Opus 5.5)在同一个线程中将它转换为原生JS,结果得到了这个:https://static.simonwillison.net/static/2026/Hidden-Reef-Egg...(98KB)。它们并不完全相同——你可以在对话记录中看到Claude对此的说明(我不完全明白为什么会有差异):https://claude.ai/share/e56d163e-2793-4677-aa11-191d5058b414。但确实,Claude Opus 5.5完全有能力在不使用Three.js的情况下,使用原生JS + WebGL进行3D建模。在粗略查看代码后,我发现Three.js对我来说稍微容易理解一些,但我很少会去查看这些3D项目的代码,所以这并不是一个特别大的问题。标签:claude、javascript、three-js、hacker-news、generative-ai、ai、llms

    英文原文

    My comment on The Web Is More Than Enough, by Paul Ford — Hacker News. OK, this comment convinced me to give that a shot. Here's a thing I made in Three.js this morning - a Nudibranch themed Faberge Egg: https://static.simonwillison.net/static/2026/Hidden-Reef-Egg... (77KB) I just asked Claude (Opus 5.5 Medium running in regular Claude Chat) to port that to Vanilla JS, in the same thread where it had built it, and got this: https://static.simonwillison.net/static/2026/Hidden-Reef-Egg... (98KB) They aren't identical - you can see what Claude said about that in the transcript (I don't fully understand why it differed): https://claude.ai/share/e56d163e-2793-4677-aa11-191d5058b414 But yeah, it turns out Claude Opus 5.5 is perfectly capable of 3D modeling in Vanilla JS + WebGL without Three.js. In eyeballing the code I find the Three.js slightly easier to understand myself, but I rarely look at the code for these 3D projects so that isn't a particularly big deal. Tags: claude , javascript , three-js , hacker-news , generative-ai , ai , llms

11月1日周日
  1. Simon Willison

    How We Took Over ChatGPT Accounts

    中文摘要

    我们是如何入侵ChatGPT账户的 Parameter Labs描述了一种他们发现的针对ChatGPT对“artifacts模式”(OpenAI以前称之为“Canvas”,但看起来最新版本称为“HTML预览”)实现的漏洞。在该模式中,交互式自定义HTML应用程序会在沙箱化的iframe中显示。确保这些HTML内容保持严格的沙箱化非常重要,以避免不受信任的代码与OpenAI API进行交互并访问私人数据。Parameter发现了一个相当复杂的攻击链。OpenAI在他们的图表支持中使用了MathLive JavaScript库,而该库包含了自己的虚拟键盘,可以通过沙箱化iframe通过postMessage()触发父页面。接收该消息的代码使用innerHTML,因此任何发送消息的内容都可以向父页面添加自定义HTML,并且没有机制阻止其他沙箱化框架(包括HTML预览框架)调用该方法。这意味着iframe中的不受信任代码可以插入HTML,虽然innerHTML不会直接执行脚本元素,但可以用来注入一个没有沙箱限制的新iframe。OpenAI的CSP规则完全阻止了内联脚本,并且只允许

    英文原文

    How We Took Over ChatGPT Accounts Parameter Labs describe an exploit they found against ChatGPT's implementation of the artifacts pattern (OpenAI used to call this "Canvas" but it looks like the latest revision is called HTML previews ), where interactive custom HTML apps are displayed in a sandboxed iframe. It's important that HTML in these stays tightly sandboxed to avoid untrusted code interacting with OpenAI APIs and accessing private data. Parameter found quite a complex attack chain. OpenAI use the MathLive JavaScript library as part of their graph support, and that library includes its own virtual keyboard , which can be triggered in the parent page via postMessage() from the sandboxed iframe. That message receiving code uses innerHTML , so anything that sends a message can add custom HTML to the parent - and there was no mechanism to prevent other sandboxed frames, including HTML preview frames, from calling that method. This meant untrusted code in an iframe could insert HTML, and while innerHTML doesn't directly execute script elements it could be used to inject a new iframe without sandbox restrictions. OpenAI’s CSP rules blocked inline scripts entirely, and only allowed

10月27日周二
  1. Simon Willison

    webframe: evaluated as a scraper and a sandbox

    中文摘要

    研究:webframe:被评估为一个爬虫和沙盒框架,webframe 是 Jeff Lindsay 的一个简洁的小项目,它让你“像运行程序一样运行网页”——你把它指向一个 URL 或文件,它会在一个隐藏的无头网页视图中执行它,并将 console.log() 输出到标准输出,任何异常输出到标准错误。它使用 glaze 库用 Go 编写,该库提供了对系统浏览器的访问(“macOS 上的 WKWebView,Linux 上的 WebKitGTK,Windows 上的 WebView2”,因此它不需要捆绑自己的浏览器引擎。这让我想起了我自己的 shot-scraper JavaScript 工具,尽管它是一个更小的包装,不依赖 Playwright。我让 Claude Opus 5.5 对它进行了测试,并为我准备了一份研究报告。我使用的提示是:探索 https://github.com/tractordev/webframe,尝试运行它,并对其进行测试,构建几个探索性原型,然后评估它作为潜在沙盒工具和作为使用“shot-scraper JavaScript”命令鼓励的相同模式来抓取网页的工具。 (参见 GitHub 上的 simonw/shot-scraper,文档目录)标签:浏览器,go,javascript,jeff-lindsay,shot-scraper

    英文原文

    Research: webframe: evaluated as a scraper and a sandbox webframe is a neat little project from Jeff Lindsay which lets you "run a web page like a program" - you point it at a URL or file and it executes it in a hidden headless web view and outputs console.log() to standard output and any exceptions to standard error. It's written in Go on top of the glaze library, which provides access to a system browser ("WKWebView on macOS, WebKitGTK on Linux, WebView2 on Windows") so it doesn't need to bundle its own browser engine. It reminds me of my own shot-scraper javascript tool, albeit in a much smaller package that doesn't depend on Playwright. I had Claude Opus 5.5 put it through its paces and prepare a research report for me. Here's the prompt I used: Explore https://github.com/tractordev/webframe try running it and put it though its paces, build a few exploratory prototypes, then evaluate it as a potential sandboxing tool and as a tool for scraping web pages using the same patterns encouraged by the "shot-scraper JavaScript" command (see simonw/shot-scraper on GitHub, docs directory) Tags: browsers , go , javascript , jeff-lindsay , shot-scraper

10月18日周日
  1. Simon Willison

    Inline rendering with document​.currentScript

    中文摘要

    内联渲染使用 document.currentScript。Lean Rada 描述了一个巧妙的技巧,利用了 document.currentScript 属性。你可以使用它在页面加载时插入一个微小的内联 <script> 元素,该元素会自行替换:当前年份是 <script> document.currentScript.replaceWith( new Date().getFullYear())</script> 如果你定义一个像这样的快捷函数: $=(...n)=>document.currentScript.replaceWith(...n) 你就会得到一个微小的模板语言:当前年份是 <script>$(new Date().getFullYear())</script> 标签:javascript

    英文原文

    Inline rendering with document​.currentScript Lean Rada describes a neat trick that takes advantage of the document.currentScript property. You can use that to drop in a tiny inline <script> element that replaces itself when the page loads: The year is <script> document.currentScript.replaceWith( new Date().getFullYear())</script> If you define a shortcut function like this: $=(...n)=>document.currentScript.replaceWith(...n) You get a tiny template language: The year is <script>$(new Date().getFullYear())</script> Tags: javascript

10月15日周四
  1. Simon Willison

    Tree Appreciator

    中文摘要

    工具:树欣赏者 另一个与Claude的游戏实验。这个游戏使用的是默认的Claude iPhone应用(聊天模式,不是Claude代码模式),我向Claude Opus 5.5 Max发出的提示是:“创建一个名为‘树欣赏者’的three js游戏——它会向你展示两棵算法生成的树,游戏机制是关于欣赏它们之间的差异。认真思考如何确保它既有趣又美观。” 有点尴尬的是,鉴于我最近的演讲,我发现告诉Opus 5.5“确保它有趣”效果出奇的好。在这种情况下,Claude运行了3小时7分钟,最终返回了一个温馨的小游戏,需要找出差异,配有音乐和动画以及成就系统,游戏体验非常吸引人。标签:游戏设计、javascript、ai、生成式ai、llms、claude、氛围编程、three-js

    英文原文

    Tool: Tree Appreciator Another game experiment with Claude. This one used the default Claude iPhone app (chat mode, not Claude Code mode), where I prompted Claude Opus 5.5 Max with: Build a three js game called "Tree appreciator" - it shows you two algorithmically generated trees and the game mechanics is about appreciating the differences between them. Think hard about how to make sure it is both fun and beautiful. Somewhat embarrassingly given my recent talk , I've found that telling Opus 5.5 "make sure it is fun" works uncomfortably well. In this case Claude crunched for 3 hours and 7 minutes before retuning a cosy little spot-the-difference game with music and animation and achievements that's quite compelling to play. Tags: game-design , javascript , ai , generative-ai , llms , claude , vibe-coding , three-js

10月10日周六
  1. Simon Willison

    Deno is joining Cloudflare

    中文摘要

    Deno 正加入 Cloudflare。Deno 团队早在八月就发布了 celld 的第一个版本——这是他们对 Cloudflare Workers 中 Durable Objects 模式的开源实现。如今,Cloudflare 正彻底收购 Deno,目标是基于 celld 来“使 workerd 自托管成为使用 Workers 编程模型构建和运行应用的一种首要支持方式”(详见 Cloudflare 博客)。坏消息是,Deno 本身将不会由 Cloudflare 在未来一年之后继续维护:我们将继续支持 Deno 运行时一年,每月发布包含错误修复和安全更新的版本。一年之后,我们将停止对 Deno 运行时的开发。Deno 仍将保持开源,我们欢迎希望继续其开发的其他人。Deno(以及 Node.js)的创建者 Ryan Dahl 在 Hacker News 上的一条评论中解释了这一决定:这是一个共同的决定,我同意这个决定。我最关心它的成功,并且我为其投入了最多的工作——但我现在不再认为这是我能做最重要工作的领域。Deno 中有一些好的想法,而且它设计得很好——但最终它并没有解决大问题。它已经被卷入了 Node.js 的引力井中。

    英文原文

    Deno is joining Cloudflare The Deno team released the first version of celld back in August - their open source implementation of the Durable Objects pattern from Cloudflare Workers. Today, Cloudflare are acquiring Deno outright, with the goal of building on celld to "make workerd self-hosting a first-class supported way to build and run apps using the Workers programming model" (see the Cloudflare blog .) The bad news is that Deno itself will not be maintained by Cloudflare beyond the next year: We will support the Deno runtime for another year with monthly releases containing bug fixes and security updates. After that year we will end our development of the Deno runtime. Deno will remain open source, and we welcome others who want to continue its development. Deno (and Node.js) creator Ryan Dahl explained that decision in a comment on Hacker News: It's a joint decision and I agree with it. I'm most invested in its success and have put the most work into it - and I no longer think it's where I can do the most important work. There are some good ideas in Deno and it's well engineered - but it ultimately is not solving big problems. It has been sucked into the gravity well of node c