<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en-us" xmlns="http://www.w3.org/2005/Atom"><title>Simon Willison's Weblog: vs-code</title><link href="http://simonwillison.net/" rel="alternate"/><link href="http://simonwillison.net/tags/vs-code.atom" rel="self"/><id>http://simonwillison.net/</id><updated>2025-12-16T23:35:33+00:00</updated><author><name>Simon Willison</name></author><entry><title>ty: An extremely fast Python type checker and LSP</title><link href="https://simonwillison.net/2025/Dec/16/ty/#atom-tag" rel="alternate"/><published>2025-12-16T23:35:33+00:00</published><updated>2025-12-16T23:35:33+00:00</updated><id>https://simonwillison.net/2025/Dec/16/ty/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://astral.sh/blog/ty"&gt;ty: An extremely fast Python type checker and LSP&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
The team at Astral have been working on this for quite a long time, and are finally releasing the first beta.  They have some big performance claims:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Without caching, ty is consistently between 10x and 60x faster than mypy and Pyright. When run in an editor, the gap is even more dramatic. As an example, after editing a load-bearing file in the PyTorch repository, ty recomputes diagnostics in 4.7ms: 80x faster than Pyright (386ms) and 500x faster than Pyrefly (2.38 seconds). ty is very fast!&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The easiest way to try it out is via &lt;code&gt;uvx&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cd my-python-project/
uvx ty check
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I &lt;a href="https://gistpreview.github.io/?a3aff6768e85168d89d4515e3dbcb7d2"&gt;tried it&lt;/a&gt; against &lt;a href="https://sqlite-utils.datasette.io/"&gt;sqlite-utils&lt;/a&gt; and it turns out I have quite a lot of work to do!&lt;/p&gt;
&lt;p&gt;Astral also released a new &lt;a href="https://marketplace.visualstudio.com/items?itemName=astral-sh.ty"&gt;VS Code extension&lt;/a&gt; adding ty-powered language server features like go to definition. I'm still getting my head around how this works and what it can do.

    &lt;p&gt;&lt;small&gt;&lt;/small&gt;Via &lt;a href="https://news.ycombinator.com/item?id=46294289"&gt;Hacker News&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/vs-code"&gt;vs-code&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/astral"&gt;astral&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ty"&gt;ty&lt;/a&gt;&lt;/p&gt;



</summary><category term="python"/><category term="vs-code"/><category term="astral"/><category term="ty"/></entry><entry><title>Google Antigravity</title><link href="https://simonwillison.net/2025/Nov/18/google-antigravity/#atom-tag" rel="alternate"/><published>2025-11-18T20:52:35+00:00</published><updated>2025-11-18T20:52:35+00:00</updated><id>https://simonwillison.net/2025/Nov/18/google-antigravity/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://antigravity.google/"&gt;Google Antigravity&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Google's other major release today to accompany &lt;a href="https://simonwillison.net/2025/Nov/18/gemini-3/"&gt;Gemini 3 Pro&lt;/a&gt;. At first glance Antigravity is yet another VS Code fork Cursor clone - it's a desktop application you install that then signs in to your Google account and provides an IDE for agentic coding against their Gemini models.&lt;/p&gt;
&lt;p&gt;When you look closer it's actually a fair bit more interesting than that.&lt;/p&gt;
&lt;p&gt;The best introduction right now is the official 14 minute &lt;a href="https://www.youtube.com/watch?v=nTOVIGsqCuY"&gt;Learn the basics of Google Antigravity&lt;/a&gt; video on YouTube, where product engineer Kevin Hou (who previously worked at Windsurf) walks through the process of building an app.&lt;/p&gt;
&lt;p&gt;There are some interesting new ideas in Antigravity. The application itself has three "surfaces" - an agent manager dashboard, a traditional VS Code style editor and deep integration with a browser via a new Chrome extension. This plays a similar role to Playwright MCP, allowing the agent to directly test the web applications it is building.&lt;/p&gt;
&lt;p&gt;Antigravity also introduces the concept of "artifacts" (confusingly not at all similar to &lt;a href="https://simonwillison.net/tags/claude-artifacts/"&gt;Claude Artifacts&lt;/a&gt;). These are Markdown documents that are automatically created as the agent works, for things like task lists, implementation plans and a "walkthrough" report showing what the agent has done once it finishes.&lt;/p&gt;
&lt;p&gt;I tried using Antigravity to help &lt;a href="https://github.com/simonw/llm-gemini/issues/113"&gt;add support for Gemini 3&lt;/a&gt; to my &lt;code&gt;llm-gemini&lt;/code&gt; plugin. &lt;/p&gt;
&lt;p&gt;&lt;img alt="Screenshot of the VS Code interface showing an implementation plan to update the llm-gemini library to support the thinking_level parameter for Gemini 3 Pro Preview, with the Open Agent Manager sidebar active on the right." src="https://static.simonwillison.net/static/2025/antigravity.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;It worked OK at first then gave me an "Agent execution terminated due to model provider overload. Please try again later" error. I'm going to give it another go after they've had a chance to work through those initial launch jitters.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/google"&gt;google&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ai"&gt;ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/generative-ai"&gt;generative-ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llms"&gt;llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ai-assisted-programming"&gt;ai-assisted-programming&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/gemini"&gt;gemini&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/vs-code"&gt;vs-code&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/coding-agents"&gt;coding-agents&lt;/a&gt;&lt;/p&gt;



</summary><category term="google"/><category term="ai"/><category term="generative-ai"/><category term="llms"/><category term="ai-assisted-programming"/><category term="gemini"/><category term="vs-code"/><category term="coding-agents"/></entry><entry><title>Getting DeepSeek-OCR working on an NVIDIA Spark via brute force using Claude Code</title><link href="https://simonwillison.net/2025/Oct/20/deepseek-ocr-claude-code/#atom-tag" rel="alternate"/><published>2025-10-20T17:21:52+00:00</published><updated>2025-10-20T17:21:52+00:00</updated><id>https://simonwillison.net/2025/Oct/20/deepseek-ocr-claude-code/#atom-tag</id><summary type="html">
    &lt;p&gt;DeepSeek released a new model yesterday: &lt;a href="https://github.com/deepseek-ai/DeepSeek-OCR"&gt;DeepSeek-OCR&lt;/a&gt;, a 6.6GB model fine-tuned specifically for OCR. They released it as model weights that run using PyTorch and CUDA. I got it running on the NVIDIA Spark by having Claude Code effectively brute force the challenge of getting it working on that particular hardware.&lt;/p&gt;
&lt;p&gt;This small project (40 minutes this morning, most of which was Claude Code churning away while I had breakfast and did some other things) ties together a bunch of different concepts I've been exploring recently. I &lt;a href="https://simonwillison.net/2025/Sep/30/designing-agentic-loops/"&gt;designed an agentic loop&lt;/a&gt; for the problem, gave Claude full permissions inside a Docker sandbox, embraced the &lt;a href="https://simonwillison.net/2025/Oct/5/parallel-coding-agents/"&gt;parallel agents lifestyle&lt;/a&gt; and reused my &lt;a href="https://simonwillison.net/2025/Oct/14/nvidia-dgx-spark/"&gt;notes on the NVIDIA Spark&lt;/a&gt; from last week.&lt;/p&gt;
&lt;p&gt;I knew getting a PyTorch CUDA model running on the Spark was going to be a little frustrating, so I decided to outsource the entire process to Claude Code to see what would happen.&lt;/p&gt;
&lt;p&gt;TLDR: It worked. It took four prompts (one long, three very short) to have Claude Code figure out everything necessary to run the new DeepSeek model on the NVIDIA Spark, OCR a document for me and produce &lt;em&gt;copious&lt;/em&gt; notes about the process.&lt;/p&gt;
&lt;h4 id="the-setup"&gt;The setup&lt;/h4&gt;
&lt;p&gt;I connected to the Spark from my Mac via SSH and started a new Docker container there:&lt;/p&gt;
&lt;div class="highlight highlight-source-shell"&gt;&lt;pre&gt;docker run -it --gpus=all \
  -v /usr/local/cuda:/usr/local/cuda:ro \
  nvcr.io/nvidia/cuda:13.0.1-devel-ubuntu24.04 \
  bash&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Then I installed npm and used that to install Claude Code:&lt;/p&gt;
&lt;div class="highlight highlight-source-shell"&gt;&lt;pre&gt;apt-get update
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install -y npm
npm install -g @anthropic-ai/claude-code&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Then started Claude Code, telling it that it's OK that it's running as &lt;code&gt;root&lt;/code&gt; because it's in a sandbox:&lt;/p&gt;
&lt;div class="highlight highlight-source-shell"&gt;&lt;pre&gt;IS_SANDBOX=1 claude --dangerously-skip-permissions&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;It provided me a URL to click on to authenticate with my Anthropic account.&lt;/p&gt;
&lt;h4 id="the-initial-prompts"&gt;The initial prompts&lt;/h4&gt;
&lt;p&gt;I kicked things off with this prompt:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Create a folder deepseek-ocr and do everything else in that folder&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Then I ran the following, providing links to both the GitHub repository and the Hugging Face model, providing a clue about NVIDIA ARM and giving it an image (&lt;a href="https://static.simonwillison.net/static/2025/ft.jpeg"&gt;this one&lt;/a&gt;, see &lt;a href="https://simonwillison.net/2025/Aug/29/the-perils-of-vibe-coding/"&gt;previous post&lt;/a&gt;) that I wanted it to run OCR on.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Your task is to get this working: &lt;a href="https://github.com/deepseek-ai/DeepSeek-OCR"&gt;https://github.com/deepseek-ai/DeepSeek-OCR&lt;/a&gt; - it uses Hugging Face Transformers and models from &lt;a href="https://huggingface.co/deepseek-ai/DeepSeek-OCR"&gt;https://huggingface.co/deepseek-ai/DeepSeek-OCR&lt;/a&gt; - you are running in a Docker container on an NVIDIA ARM device, first research your environment to check it will be possible to do this. Git clone both of those - you may need to enable LFS first. Make extensive notes as you go in a notes.md file which you should only ever append new notes to. At the end of this you should have scripts in the folder which can be run to both setup and then run the model against an example - use &lt;a href="https://static.simonwillison.net/static/2025/ft.jpeg"&gt;https://static.simonwillison.net/static/2025/ft.jpeg&lt;/a&gt; as the example image that you OCR. As a final step create a detailed README.md file explaining the project and what you learned and how to run your code.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Note how I also told it to "make extensive notes as you go in a notes.md file which you should only ever append new notes to" so I'd have some useful notes at the end.&lt;/p&gt;
&lt;h4 id="the-follow-ups"&gt;The follow-ups&lt;/h4&gt;
&lt;p&gt;It churned away for 13 minutes, and made a sequence of discoveries about the platform and the model and the difficulties of running PyTorch on it.&lt;/p&gt;
&lt;p&gt;And then... &lt;a href="https://github.com/simonw/research/blob/main/deepseek-ocr-nvidia-spark/claude-log.md#-assistant--2025-10-20-154706"&gt;it gave up&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The NVIDIA GB10 GPU has compute capability sm_121, which is too new for PyTorch 2.5.1&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;PyTorch 2.5.1 supports: sm_50, sm_80, sm_86, sm_89, sm_90, sm_90a&lt;/li&gt;
&lt;li&gt;GB10 requires: sm_121&lt;/li&gt;
&lt;li&gt;Error: &lt;code&gt;CUDA error: no kernel image is available for execution on the device&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Additionally, the model has hardcoded &lt;code&gt;.cuda()&lt;/code&gt; calls, preventing CPU fallback without code modifications.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;So I gave it some encouragement:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Any other options that might help get CUDA working like using different versions of PyTorch that have available CUDA wheels for this platform? Have you checked to see what PyTorch versions already have these ARM CUDA wheels that would work here?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;It ran this command to grep for all available PyTorch wheels on &lt;code&gt;download.pytorch.org&lt;/code&gt; that match the ARM architecture:&lt;/p&gt;
&lt;div class="highlight highlight-source-shell"&gt;&lt;pre&gt;curl -s https://download.pytorch.org/whl/torch/ &lt;span class="pl-k"&gt;|&lt;/span&gt; grep -o &lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;torch-[0-9.]*.*aarch64.whl&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-k"&gt;|&lt;/span&gt; sort -V &lt;span class="pl-k"&gt;|&lt;/span&gt; tail -20&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;... and that unblocked it.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Excellent! I can see that PyTorch 2.9.0 has ARM64 wheels for CUDA 12.8, 12.9, and &lt;strong&gt;CUDA 13.0&lt;/strong&gt; (cu130)! This is exactly what we need!&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;It installed the wheels it found and reported:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Good news! PyTorch 2.9.0 can detect the GB10 GPU with CUDA capability 12.1 (sm_121), but it says the maximum supported is 12.0. However, it's just a warning now instead of a hard error! Let's try running inference: [...]&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Then kept on churning for a bit, ignoring warnings, and managed to &lt;a href="https://github.com/simonw/research/blob/main/deepseek-ocr-nvidia-spark/claude-log.md#-user--2025-10-20-155056"&gt;run the model&lt;/a&gt;! It loaded the image and ran this prompt:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;|grounding|&amp;gt;OCR this image.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And got back output that started like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;|ref|&amp;gt;The perils of vibe coding&amp;lt;|/ref|&amp;gt;&amp;lt;|det|&amp;gt;[[352, 30, 624, 111]]&amp;lt;|/det|&amp;gt;
&amp;lt;|ref|&amp;gt;opt&amp;lt;|/ref|&amp;gt;&amp;lt;|det|&amp;gt;[[970, 0, 994, 30]]&amp;lt;|/det|&amp;gt;
&amp;lt;|ref|&amp;gt;such&amp;lt;|/ref|&amp;gt;&amp;lt;|det|&amp;gt;[[970, 24, 996, 58]]&amp;lt;|/det|&amp;gt;
&amp;lt;|ref|&amp;gt;days&amp;lt;|/ref|&amp;gt;&amp;lt;|det|&amp;gt;[[970, 52, 996, 87]]&amp;lt;|/det|&amp;gt;
&amp;lt;|ref|&amp;gt;pavi&amp;lt;|/ref|&amp;gt;&amp;lt;|det|&amp;gt;[[970, 85, 996, 118]]&amp;lt;|/det|&amp;gt;
&amp;lt;|ref|&amp;gt;TECHNOLOGY&amp;lt;|/ref|&amp;gt;&amp;lt;|det|&amp;gt;[[33, 199, 127, 230]]&amp;lt;|/det|&amp;gt;
&amp;lt;|ref|&amp;gt;holds the promise of replacing program-&amp;lt;|/ref|&amp;gt;&amp;lt;|det|&amp;gt;[[220, 170, 390, 210]]&amp;lt;|/det|&amp;gt;
&amp;lt;|ref|&amp;gt;mers - a profession of very well paid&amp;lt;|/ref|&amp;gt;&amp;lt;|det|&amp;gt;[[220, 199, 390, 238]]&amp;lt;|/det|&amp;gt;
&amp;lt;|ref|&amp;gt;people.For another, the work can be&amp;lt;|/ref|&amp;gt;&amp;lt;|det|&amp;gt;[[220, 228, 390, 267]]&amp;lt;|/det|&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Claude declared victory and pointed me to the &lt;a href="https://github.com/simonw/research/blob/main/deepseek-ocr-nvidia-spark/output/result.mmd?short_path=f43da6a"&gt;output/result.mmd&lt;/a&gt; file, which contained only whitespace. So OCR had worked but the result had failed to be written correctly to disk.&lt;/p&gt;
&lt;p&gt;I &lt;a href="https://github.com/simonw/research/blob/main/deepseek-ocr-nvidia-spark/claude-log.md#-user--2025-10-20-155826"&gt;said&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;That result.mmd file looks to be exclusively whitespace to me, try and get a better result there - the bounding box image was good though&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Which caused Claude to &lt;a href="https://github.com/simonw/research/blob/main/deepseek-ocr-nvidia-spark/claude-log.md#-assistant--2025-10-20-155900"&gt;reconsider&lt;/a&gt; the prompt it used:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Maybe we need to use a different prompt. Looking at the README from DeepSeek-OCR, there are different prompts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;"&amp;lt;image&amp;gt;\n&amp;lt;|grounding|&amp;gt;Convert the document to markdown."&lt;/code&gt; - for documents&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;"&amp;lt;image&amp;gt;\n&amp;lt;|grounding|&amp;gt;OCR this image."&lt;/code&gt; - general OCR&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;"&amp;lt;image&amp;gt;\nFree OCR."&lt;/code&gt; - without layouts&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The "grounding" mode seems to be focused on bounding boxes, which is why we got good bounding box results but the text output might be in a different format.&lt;/p&gt;
&lt;p&gt;Let me try running it again with a different prompt that's more focused on text extraction rather than grounding.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;It tried all of the prompt variants, &lt;a href="https://github.com/simonw/research/blob/main/deepseek-ocr-nvidia-spark/notes.md#text-output-improvement-2025-10-20-1601"&gt;made a note about them&lt;/a&gt; and created a file called &lt;a href="https://github.com/simonw/research/blob/main/deepseek-ocr-nvidia-spark/PROMPTS_GUIDE.md"&gt;PROMPTS_GUIDE.md&lt;/a&gt; with a bunch more details, including this comparison table:&lt;/p&gt;
&lt;blockquote&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Prompt&lt;/th&gt;
&lt;th&gt;Speed&lt;/th&gt;
&lt;th&gt;Text Quality&lt;/th&gt;
&lt;th&gt;Structure&lt;/th&gt;
&lt;th&gt;Coordinates&lt;/th&gt;
&lt;th&gt;Best Use Case&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Free OCR&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;⚡⚡⚡ Fast&lt;/td&gt;
&lt;td&gt;⭐⭐⭐ Excellent&lt;/td&gt;
&lt;td&gt;⭐ Basic&lt;/td&gt;
&lt;td&gt;❌ No&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;General OCR&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Markdown&lt;/td&gt;
&lt;td&gt;⚡⚡ Medium&lt;/td&gt;
&lt;td&gt;⭐⭐⭐ Excellent&lt;/td&gt;
&lt;td&gt;⭐⭐⭐ Full&lt;/td&gt;
&lt;td&gt;⭐⭐ Partial&lt;/td&gt;
&lt;td&gt;Documents&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Grounding&lt;/td&gt;
&lt;td&gt;⚡ Slow&lt;/td&gt;
&lt;td&gt;⭐⭐ Good&lt;/td&gt;
&lt;td&gt;⭐ Basic&lt;/td&gt;
&lt;td&gt;⭐⭐⭐ Full&lt;/td&gt;
&lt;td&gt;Annotations&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Detailed&lt;/td&gt;
&lt;td&gt;⚡⚡⚡ Fastest&lt;/td&gt;
&lt;td&gt;⭐ N/A&lt;/td&gt;
&lt;td&gt;❌ N/A&lt;/td&gt;
&lt;td&gt;❌ No&lt;/td&gt;
&lt;td&gt;Image analysis&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/blockquote&gt;
&lt;p&gt;And this table under the heading "Performance Benchmarks":&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Test image: 3503×1668 pixels (Financial Times article)&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Prompt&lt;/th&gt;
&lt;th&gt;Time&lt;/th&gt;
&lt;th&gt;Output Size&lt;/th&gt;
&lt;th&gt;Tokens&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Free OCR&lt;/td&gt;
&lt;td&gt;24s&lt;/td&gt;
&lt;td&gt;Clean text&lt;/td&gt;
&lt;td&gt;2257&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Markdown&lt;/td&gt;
&lt;td&gt;39s&lt;/td&gt;
&lt;td&gt;Formatted MD&lt;/td&gt;
&lt;td&gt;2257 + structure&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Grounding&lt;/td&gt;
&lt;td&gt;58s&lt;/td&gt;
&lt;td&gt;Text + coords&lt;/td&gt;
&lt;td&gt;2257 + boxes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Detailed&lt;/td&gt;
&lt;td&gt;9s&lt;/td&gt;
&lt;td&gt;Description&lt;/td&gt;
&lt;td&gt;~300&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/blockquote&gt;
&lt;p&gt;My final prompt was this, to gather everything together into a zip file I could extract from the Docker container:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Create a zip file with the output and output_text and all of the scripts and notes - but leave out the github repo and the huggingface repo directories&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I added the contents of that zip file to my new &lt;a href="https://github.com/simonw/research"&gt;simonw/research&lt;/a&gt; GitHub repo &lt;a href="https://github.com/simonw/research/tree/main/deepseek-ocr-nvidia-spark"&gt;in the deepseek-ocr-nvidia-spark&lt;/a&gt; folder.&lt;/p&gt;
&lt;p&gt;Claude really likes writing notes! Here's the directory listing of that finished folder:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  |-- download_test_image.sh
  |-- FINAL_SUMMARY.md
  |-- notes.md
  |-- output
  |   |-- images
  |   |-- result_with_boxes.jpg
  |   `-- result.mmd
  |-- output_text
  |   |-- detailed
  |   |   |-- images
  |   |   |-- result_with_boxes.jpg
  |   |   `-- result.mmd
  |   |-- free_ocr
  |   |   |-- images
  |   |   |-- result_with_boxes.jpg
  |   |   `-- result.mmd
  |   `-- markdown
  |       |-- images
  |       |   `-- 0.jpg
  |       |-- result_with_boxes.jpg
  |       `-- result.mmd
  |-- PROMPTS_GUIDE.md
  |-- README_SUCCESS.md
  |-- README.md
  |-- run_ocr_best.py
  |-- run_ocr_cpu_nocuda.py
  |-- run_ocr_cpu.py
  |-- run_ocr_text_focused.py
  |-- run_ocr.py
  |-- run_ocr.sh
  |-- setup.sh
  |-- SOLUTION.md
  |-- test_image.jpeg
  |-- TEXT_OUTPUT_SUMMARY.md
  `-- UPDATE_PYTORCH.md
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id="takeaways"&gt;Takeaways&lt;/h4&gt;
&lt;p&gt;My first prompt was at 15:31:07 (UTC). The final message from Claude Code came in at 16:10:03. That means it took less than 40 minutes start to finish, and I was only actively involved for about 5-10 minutes of that time. The rest of the time I was having breakfast and doing other things.&lt;/p&gt;
&lt;p&gt;Having tried and failed to get PyTorch stuff working in the past, I count this as a &lt;em&gt;huge&lt;/em&gt; win. I'll be using this process a whole lot more in the future.&lt;/p&gt;
&lt;p&gt;How good were the actual results? There's honestly so much material in the resulting notes created by Claude that I haven't reviewed all of it. There may well be all sorts of errors in there, but it's indisputable that it managed to run the model and made notes on how it did that such that I'll be able to do the same thing in the future.&lt;/p&gt;
&lt;p&gt;I think the key factors in executing this project successfully were the following:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;I gave it exactly what it needed: a Docker environment in the target hardware, instructions on where to get what it needed (the code and the model) and a clear goal for it to pursue. This is a great example of the pattern I described in &lt;a href="https://simonwillison.net/2025/Sep/30/designing-agentic-loops/"&gt;designing agentic loops&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Running it in a Docker sandbox meant I could use &lt;code&gt;claude --dangerously-skip-permissions&lt;/code&gt; and leave it running on its own. If I'd had to approve every command it wanted to run I would have got frustrated and quit the project after just a few minutes.&lt;/li&gt;
&lt;li&gt;I applied my own knowledge and experience when it got stuck. I was confident (based on &lt;a href="https://simonwillison.net/2025/Oct/14/nvidia-dgx-spark/#claude-code-for-everything"&gt;previous experiments&lt;/a&gt; with the Spark) that a CUDA wheel for ARM64 existed that was likely to work, so when it gave up I prompted it to try again, leading to success.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Oh, and it looks like DeepSeek OCR is a pretty good model if you spend the time experimenting with different ways to run it.&lt;/p&gt;
&lt;h4 id="bonus-using-vs-code-to-monitor-the-container"&gt;Bonus: Using VS Code to monitor the container&lt;/h4&gt;
&lt;p&gt;A small TIL from today: I had kicked off the job running in the Docker container via SSH to the Spark when I realized it would be neat if I could easily monitor the files it was creating while it was running.&lt;/p&gt;
&lt;p&gt;I &lt;a href="https://claude.ai/share/68a0ebff-b586-4278-bd91-6b715a657d2b"&gt;asked Claude.ai&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I am running a Docker container on a remote machine, which I started over SSH&lt;/p&gt;
&lt;p&gt;How can I have my local VS Code on MacOS show me the filesystem in that docker container inside that remote machine, without restarting anything?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;It gave me a set of steps that solved this exact problem:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Install the VS Code "Remote SSH" and "Dev Containers" extensions&lt;/li&gt;
&lt;li&gt;Use "Remote-SSH: Connect to Host" to connect to the remote machine (on my Tailscale network that's &lt;code&gt;spark@100.113.1.114&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;In the window for that remote SSH session, run "Dev Containers: Attach to Running Container" - this shows a list of containers and you can select the one you want to attach to&lt;/li&gt;
&lt;li&gt;... and that's it! VS Code opens a new window providing full access to all of the files in that container. I opened up &lt;code&gt;notes.md&lt;/code&gt; and watched it as Claude Code appended to it in real time.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;At the end when I told Claude to create a zip file of the results I could select that in the VS Code file explorer and use the "Download" menu item to download it to my Mac.&lt;/p&gt;
    
        &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/ocr"&gt;ocr&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ai"&gt;ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/docker"&gt;docker&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/pytorch"&gt;pytorch&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/generative-ai"&gt;generative-ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llms"&gt;llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ai-assisted-programming"&gt;ai-assisted-programming&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/anthropic"&gt;anthropic&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/claude"&gt;claude&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/nvidia"&gt;nvidia&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/vs-code"&gt;vs-code&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/vision-llms"&gt;vision-llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/deepseek"&gt;deepseek&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llm-release"&gt;llm-release&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/coding-agents"&gt;coding-agents&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/claude-code"&gt;claude-code&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ai-in-china"&gt;ai-in-china&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/nvidia-spark"&gt;nvidia-spark&lt;/a&gt;&lt;/p&gt;
    

</summary><category term="ocr"/><category term="python"/><category term="ai"/><category term="docker"/><category term="pytorch"/><category term="generative-ai"/><category term="llms"/><category term="ai-assisted-programming"/><category term="anthropic"/><category term="claude"/><category term="nvidia"/><category term="vs-code"/><category term="vision-llms"/><category term="deepseek"/><category term="llm-release"/><category term="coding-agents"/><category term="claude-code"/><category term="ai-in-china"/><category term="nvidia-spark"/></entry><entry><title>microsoft/vscode-copilot-chat</title><link href="https://simonwillison.net/2025/Jun/30/vscode-copilot-chat/#atom-tag" rel="alternate"/><published>2025-06-30T21:08:40+00:00</published><updated>2025-06-30T21:08:40+00:00</updated><id>https://simonwillison.net/2025/Jun/30/vscode-copilot-chat/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/microsoft/vscode-copilot-chat"&gt;microsoft/vscode-copilot-chat&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
As &lt;a href="https://github.com/newsroom/press-releases/coding-agent-for-github-copilot"&gt;promised&lt;/a&gt; at Build 2025 in May, Microsoft have released the GitHub Copilot Chat client for VS Code under an open source (MIT) license.&lt;/p&gt;
&lt;p&gt;So far this is just the extension that provides the chat component of Copilot, but &lt;a href="https://code.visualstudio.com/blogs/2025/06/30/openSourceAIEditorFirstMilestone"&gt;the launch announcement&lt;/a&gt; promises that Copilot autocomplete will be coming in the near future:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Next, we will carefully refactor the relevant components of the extension into VS Code core. The &lt;a href="https://marketplace.visualstudio.com/items?itemName=GitHub.copilot"&gt;original GitHub Copilot extension&lt;/a&gt; that provides inline completions remains closed source -- but in the following months we plan to have that functionality be provided by the open sourced &lt;a href="https://marketplace.visualstudio.com/items?itemName=GitHub.copilot-chat"&gt;GitHub Copilot Chat extension&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I've started spelunking around looking for the all-important prompts. So far the most interesting I've found are in &lt;a href="https://github.com/microsoft/vscode-copilot-chat/blob/v0.29.2025063001/src/extension/prompts/node/agent/agentInstructions.tsx"&gt;prompts/node/agent/agentInstructions.tsx&lt;/a&gt;, with a &lt;code&gt;&amp;lt;Tag name='instructions'&amp;gt;&lt;/code&gt; block that &lt;a href="https://github.com/microsoft/vscode-copilot-chat/blob/v0.29.2025063001/src/extension/prompts/node/agent/agentInstructions.tsx#L39"&gt;starts like this&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;You are a highly sophisticated automated coding agent with expert-level knowledge across many different programming languages and frameworks. The user will ask a question, or ask you to perform a task, and it may require lots of research to answer correctly. There is a selection of tools that let you perform actions or retrieve helpful context to answer the user's question.&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;There are &lt;a href="https://github.com/microsoft/vscode-copilot-chat/blob/v0.29.2025063001/src/extension/prompts/node/agent/agentInstructions.tsx#L54"&gt;tool use instructions&lt;/a&gt; - some edited highlights from those:&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;When using the ReadFile tool, prefer reading a large section over calling the ReadFile tool many times in sequence. You can also think of all the pieces you may be interested in and read them in parallel. Read large enough context to ensure you get what you need.&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;You can use the FindTextInFiles to get an overview of a file by searching for a string within that one file, instead of using ReadFile many times.&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Don't call the RunInTerminal tool multiple times in parallel. Instead, run one command and wait for the output before running the next command.&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;After you have performed the user's task, if the user corrected something you did, expressed a coding preference, or communicated a fact that you need to remember, use the UpdateUserPreferences tool to save their preferences.&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;NEVER try to edit a file by running terminal commands unless the user specifically asks for it.&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Use the ReplaceString tool to replace a string in a file, but only if you are sure that the string is unique enough to not cause any issues. You can use this tool multiple times per file.&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;That file also has separate &lt;a href="https://github.com/microsoft/vscode-copilot-chat/blob/v0.29.2025063001/src/extension/prompts/node/agent/agentInstructions.tsx#L127"&gt;CodesearchModeInstructions&lt;/a&gt;, as well as a &lt;a href="https://github.com/microsoft/vscode-copilot-chat/blob/v0.29.2025063001/src/extension/prompts/node/agent/agentInstructions.tsx#L160"&gt;SweBenchAgentPrompt&lt;/a&gt; class with a comment saying that it is "used for some evals with swebench".&lt;/p&gt;
&lt;p&gt;Elsewhere in the code, &lt;a href="https://github.com/microsoft/vscode-copilot-chat/blob/v0.29.2025063001/src/extension/prompt/node/summarizer.ts"&gt;prompt/node/summarizer.ts&lt;/a&gt; illustrates one of their approaches to &lt;a href="https://simonwillison.net/2025/Jun/29/how-to-fix-your-context/"&gt;Context Summarization&lt;/a&gt;, with a prompt that looks like this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;You are an expert at summarizing chat conversations.&lt;/code&gt;&lt;br&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;You will be provided:&lt;/code&gt;&lt;br&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;- A series of user/assistant message pairs in chronological order&lt;/code&gt;&lt;br&gt;
&lt;code&gt;- A final user message indicating the user's intent.&lt;/code&gt;&lt;br&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;[...]&lt;/code&gt;&lt;br&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Structure your summary using the following format:&lt;/code&gt;&lt;br&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;TITLE: A brief title for the summary&lt;/code&gt;&lt;br&gt;
&lt;code&gt;USER INTENT: The user's goal or intent for the conversation&lt;/code&gt;&lt;br&gt;
&lt;code&gt;TASK DESCRIPTION: Main technical goals and user requirements&lt;/code&gt;&lt;br&gt;
&lt;code&gt;EXISTING: What has already been accomplished. Include file paths and other direct references.&lt;/code&gt;&lt;br&gt;
&lt;code&gt;PENDING: What still needs to be done. Include file paths and other direct references.&lt;/code&gt;&lt;br&gt;
&lt;code&gt;CODE STATE: A list of all files discussed or modified. Provide code snippets or diffs that illustrate important context.&lt;/code&gt;&lt;br&gt;
&lt;code&gt;RELEVANT CODE/DOCUMENTATION SNIPPETS: Key code or documentation snippets from referenced files or discussions.&lt;/code&gt;&lt;br&gt;
&lt;code&gt;OTHER NOTES: Any additional context or information that may be relevant.&lt;/code&gt;&lt;br&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a href="https://github.com/microsoft/vscode-copilot-chat/blob/v0.29.2025063001/src/extension/prompts/node/panel/terminalQuickFix.tsx"&gt;prompts/node/panel/terminalQuickFix.tsx&lt;/a&gt; looks interesting too, with prompts to help users fix problems they are having in the terminal:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;You are a programmer who specializes in using the command line. Your task is to help the user fix a command that was run in the terminal by providing a list of fixed command suggestions. Carefully consider the command line, output and current working directory in your response. [...]&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;That file also has &lt;a href="https://github.com/microsoft/vscode-copilot-chat/blob/v0.29.2025063001/src/extension/prompts/node/panel/terminalQuickFix.tsx#L201"&gt;a PythonModuleError prompt&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;Follow these guidelines for python:&lt;/code&gt;&lt;br&gt;
&lt;code&gt;- NEVER recommend using "pip install" directly, always recommend "python -m pip install"&lt;/code&gt;&lt;br&gt;
&lt;code&gt;- The following are pypi modules: ruff, pylint, black, autopep8, etc&lt;/code&gt;&lt;br&gt;
&lt;code&gt;- If the error is module not found, recommend installing the module using "python -m pip install" command.&lt;/code&gt;&lt;br&gt;
&lt;code&gt;- If activate is not available create an environment using "python -m venv .venv".&lt;/code&gt;&lt;br&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;There's so much more to explore in here. &lt;a href="https://github.com/microsoft/vscode-copilot-chat/blob/v0.29.2025063001/src/extension/xtab/common/promptCrafting.ts#L34"&gt;xtab/common/promptCrafting.ts&lt;/a&gt; looks like it may be part of the code that's intended to replace Copilot autocomplete, for example.&lt;/p&gt;
&lt;p&gt;The way it handles evals is really interesting too. The code for that lives &lt;a href="https://github.com/microsoft/vscode-copilot-chat/tree/v0.29.2025063001/test"&gt;in the test/&lt;/a&gt; directory. There's a &lt;em&gt;lot&lt;/em&gt; of it, so I engaged Gemini 2.5 Pro to help figure out how it worked:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;git clone https://github.com/microsoft/vscode-copilot-chat
cd vscode-copilot-chat/chat
files-to-prompt -e ts -c . | llm -m gemini-2.5-pro -s \
  'Output detailed markdown architectural documentation explaining how this test suite works, with a focus on how it tests LLM prompts'
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Here's &lt;a href="https://github.com/simonw/public-notes/blob/main/vs-code-copilot-evals.md"&gt;the resulting generated documentation&lt;/a&gt;, which even includes a Mermaid chart (I had to save the Markdown in a regular GitHub repository to get that to render - Gists still don't handle Mermaid.)&lt;/p&gt;
&lt;p&gt;The neatest trick is the way it uses &lt;a href="https://github.com/simonw/public-notes/blob/main/vs-code-copilot-evals.md#the-golden-standard-cached-responses"&gt;a SQLite-based caching mechanism&lt;/a&gt; to cache the results of prompts from the LLM, which allows the test suite to be run deterministically even though LLMs themselves are famously non-deterministic.

    &lt;p&gt;&lt;small&gt;&lt;/small&gt;Via &lt;a href="https://twitter.com/ashtom/status/1939724483448717369"&gt;@ashtom&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/github"&gt;github&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/microsoft"&gt;microsoft&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/open-source"&gt;open-source&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ai"&gt;ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/prompt-engineering"&gt;prompt-engineering&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/generative-ai"&gt;generative-ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/github-copilot"&gt;github-copilot&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llms"&gt;llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ai-assisted-programming"&gt;ai-assisted-programming&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/gemini"&gt;gemini&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/vs-code"&gt;vs-code&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llm-tool-use"&gt;llm-tool-use&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/evals"&gt;evals&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/coding-agents"&gt;coding-agents&lt;/a&gt;&lt;/p&gt;



</summary><category term="github"/><category term="microsoft"/><category term="open-source"/><category term="ai"/><category term="prompt-engineering"/><category term="generative-ai"/><category term="github-copilot"/><category term="llms"/><category term="ai-assisted-programming"/><category term="gemini"/><category term="vs-code"/><category term="llm-tool-use"/><category term="evals"/><category term="coding-agents"/></entry><entry><title>picopilot</title><link href="https://simonwillison.net/2024/Jun/26/picopilot/#atom-tag" rel="alternate"/><published>2024-06-26T00:24:21+00:00</published><updated>2024-06-26T00:24:21+00:00</updated><id>https://simonwillison.net/2024/Jun/26/picopilot/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/coder/picopilot"&gt;picopilot&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Kyle Carberry's "GitHub Copilot in 70 lines of JavaScript". The title is a little hyperbolic, but the code itself really does implement an OpenAI powered Visual Studio Code text completion extension in &lt;a href="https://github.com/coder/picopilot/blob/f71c6ab4738d4159d18aa772b22f4b1d24c89899/extension.js"&gt;71 lines of code&lt;/a&gt;. This is an excellent example for learning what a minimal VS Code extension looks like.&lt;/p&gt;
&lt;p&gt;Here's the system prompt it uses:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;You provide code completion results given a prefix and suffix. Respond with a JSON object with the key 'completion' containing a suggestion to place between the prefix and suffix. Follow existing code styles. Listen to comments at the end of the prefix. The language is "{language}".&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Then it passes the prefix and suffix as two user messages, and uses the &lt;code&gt;"response_format": {"type": "json_object"}&lt;/code&gt; option to enforce JSON output from the GPT-4o API.&lt;/p&gt;
&lt;p&gt;The feature this is missing is the thing that makes GitHub Copilot so impressive: Copilot does &lt;a href="https://thakkarparth007.github.io/copilot-explorer/posts/copilot-internals.html#how-is-the-prompt-prepared-a-code-walkthrough"&gt;a whole bunch of clever tricks&lt;/a&gt; to find snippets of relevant code from the current and other nearby files and includes them with the prompt, resulting in much higher quality completions.

    &lt;p&gt;&lt;small&gt;&lt;/small&gt;Via &lt;a href="https://lobste.rs/s/yvklbv/github_copilot_70_lines_javascript"&gt;lobste.rs&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/ai"&gt;ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/prompt-engineering"&gt;prompt-engineering&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/generative-ai"&gt;generative-ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/github-copilot"&gt;github-copilot&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llms"&gt;llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/vs-code"&gt;vs-code&lt;/a&gt;&lt;/p&gt;



</summary><category term="ai"/><category term="prompt-engineering"/><category term="generative-ai"/><category term="github-copilot"/><category term="llms"/><category term="vs-code"/></entry><entry><title>Visual Studio Code: Development Process</title><link href="https://simonwillison.net/2022/Jul/20/visual-studio-code-development-process/#atom-tag" rel="alternate"/><published>2022-07-20T16:34:54+00:00</published><updated>2022-07-20T16:34:54+00:00</updated><id>https://simonwillison.net/2022/Jul/20/visual-studio-code-development-process/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/microsoft/vscode/wiki/Development-Process"&gt;Visual Studio Code: Development Process&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
A detailed description of the development process used by VS Code: a 6-12 month high level roadmap, then month long iterations that each result in a new version that is shipped to users. Includes details of how the four weeks of each iteration are spent too.

    &lt;p&gt;&lt;small&gt;&lt;/small&gt;Via &lt;a href="https://twitter.com/migueldeicaza/status/1549784683646418946"&gt;Miguel de Icaza&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/microsoft"&gt;microsoft&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/software-engineering"&gt;software-engineering&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/vs-code"&gt;vs-code&lt;/a&gt;&lt;/p&gt;



</summary><category term="microsoft"/><category term="software-engineering"/><category term="vs-code"/></entry><entry><title>Monaco Editor</title><link href="https://simonwillison.net/2019/May/21/monaco-editor/#atom-tag" rel="alternate"/><published>2019-05-21T20:47:12+00:00</published><updated>2019-05-21T20:47:12+00:00</updated><id>https://simonwillison.net/2019/May/21/monaco-editor/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://microsoft.github.io/monaco-editor/"&gt;Monaco Editor&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
VS Code is MIT licensed and built on top of Electron. I thought “huh, I wonder if I could run the editor component embedded in a web app”—and it turns out Microsoft have already extracted out the code editor component into an open source JavaScript package called Monaco. Looks very slick, though sadly it’s not supported in mobile browsers.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/editor"&gt;editor&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/javascript"&gt;javascript&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/microsoft"&gt;microsoft&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/open-source"&gt;open-source&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/electron"&gt;electron&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/vs-code"&gt;vs-code&lt;/a&gt;&lt;/p&gt;



</summary><category term="editor"/><category term="javascript"/><category term="microsoft"/><category term="open-source"/><category term="electron"/><category term="vs-code"/></entry><entry><title>ripgrep is faster than {grep, ag, git grep, ucg, pt, sift}</title><link href="https://simonwillison.net/2019/Apr/16/ripgrep/#atom-tag" rel="alternate"/><published>2019-04-16T17:52:53+00:00</published><updated>2019-04-16T17:52:53+00:00</updated><id>https://simonwillison.net/2019/Apr/16/ripgrep/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://blog.burntsushi.net/ripgrep/"&gt;ripgrep is faster than {grep, ag, git grep, ucg, pt, sift}&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Andrew Gallant's post from September 2016 introducing &lt;a href="https://github.com/BurntSushi/ripgrep"&gt;ripgrep&lt;/a&gt;, the command-line grep tool he wrote using Rust (on top of the Rust regular expression library also written by Andrew). &lt;code&gt;ripgrep&lt;/code&gt; is a beautifully designed CLI interface and is crazy fast, and this post describes how it gets its performance in a huge amount of detail, right down to comparing the different algorithmic approaches used by other similar tools.&lt;/p&gt;
&lt;p&gt;I recently learned that ripgrep ships as part of VS Code, which is why VS Code's search-across-project feature is so fast. In fact, if you dig around in the OS X package you can find the &lt;code&gt;rg&lt;/code&gt; binary already installed on your mac:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;find /Applications/Visual* | grep bin/rg
&lt;/code&gt;&lt;/pre&gt;

    &lt;p&gt;&lt;small&gt;&lt;/small&gt;Via &lt;a href="https://news.ycombinator.com/item?id=19669789"&gt;Ripgrep 11 Released&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/cli"&gt;cli&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/rust"&gt;rust&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ripgrep"&gt;ripgrep&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/vs-code"&gt;vs-code&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/andrew-gallant"&gt;andrew-gallant&lt;/a&gt;&lt;/p&gt;



</summary><category term="cli"/><category term="rust"/><category term="ripgrep"/><category term="vs-code"/><category term="andrew-gallant"/></entry></feed>