<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en-us" xmlns="http://www.w3.org/2005/Atom"><title>Simon Willison's Weblog: compilers</title><link href="http://simonwillison.net/" rel="alternate"/><link href="http://simonwillison.net/tags/compilers.atom" rel="self"/><id>http://simonwillison.net/</id><updated>2026-02-22T23:58:43+00:00</updated><author><name>Simon Willison</name></author><entry><title>The Claude C Compiler: What It Reveals About the Future of Software</title><link href="https://simonwillison.net/2026/Feb/22/ccc/#atom-tag" rel="alternate"/><published>2026-02-22T23:58:43+00:00</published><updated>2026-02-22T23:58:43+00:00</updated><id>https://simonwillison.net/2026/Feb/22/ccc/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://www.modular.com/blog/the-claude-c-compiler-what-it-reveals-about-the-future-of-software"&gt;The Claude C Compiler: What It Reveals About the Future of Software&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
On February 5th Anthropic's Nicholas Carlini wrote about a project to use &lt;a href="https://www.anthropic.com/engineering/building-c-compiler"&gt;parallel Claudes to build a C compiler&lt;/a&gt; on top of the brand new Opus 4.6&lt;/p&gt;
&lt;p&gt;Chris Lattner (Swift, LLVM, Clang, Mojo) knows more about C compilers than most. He just published this review of the code.&lt;/p&gt;
&lt;p&gt;Some points that stood out to me:&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Good software depends on judgment, communication, and clear abstraction. AI has amplified this.&lt;/li&gt;
&lt;li&gt;AI coding is automation of implementation, so design and stewardship become more important.&lt;/li&gt;
&lt;li&gt;Manual rewrites and translation work are becoming AI-native tasks, automating a large category of engineering effort.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;Chris is generally impressed with CCC (the Claude C Compiler):&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Taken together, CCC looks less like an experimental research compiler and more like a competent textbook implementation, the sort of system a strong undergraduate team might build early in a project before years of refinement. That alone is remarkable.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;It's a long way from being a production-ready compiler though:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Several design choices suggest optimization toward passing tests rather than building general abstractions like a human would. [...] These flaws are informative rather than surprising, suggesting that current AI systems excel at assembling known techniques and optimizing toward measurable success criteria, while struggling with the open-ended generalization required for production-quality systems.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The project also leads to deep open questions about how agentic engineering interacts with licensing and IP for both open source and proprietary code:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;If AI systems trained on decades of publicly available code can reproduce familiar structures, patterns, and even specific implementations, where exactly is the boundary between learning and copying?&lt;/p&gt;
&lt;/blockquote&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/c"&gt;c&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/compilers"&gt;compilers&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/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/nicholas-carlini"&gt;nicholas-carlini&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/agentic-engineering"&gt;agentic-engineering&lt;/a&gt;&lt;/p&gt;



</summary><category term="c"/><category term="compilers"/><category term="open-source"/><category term="ai"/><category term="ai-assisted-programming"/><category term="anthropic"/><category term="claude"/><category term="nicholas-carlini"/><category term="coding-agents"/><category term="agentic-engineering"/></entry><entry><title>llvm: InstCombine: improve optimizations for ceiling division with no overflow - a PR by Alex Gaynor and Claude Code</title><link href="https://simonwillison.net/2025/Jun/30/llvm/#atom-tag" rel="alternate"/><published>2025-06-30T16:44:59+00:00</published><updated>2025-06-30T16:44:59+00:00</updated><id>https://simonwillison.net/2025/Jun/30/llvm/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/llvm/llvm-project/pull/142869"&gt;llvm: InstCombine: improve optimizations for ceiling division with no overflow - a PR by Alex Gaynor and Claude Code&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Alex Gaynor maintains &lt;a href="https://github.com/alex/rust-asn1"&gt;rust-asn1&lt;/a&gt;, and recently spotted a missing LLVM compiler optimization while hacking on it, with &lt;a href="https://claude.ai/share/d998511d-45ee-4132-bee4-fe7f70350a67"&gt;the assistance of Claude&lt;/a&gt; (Alex works for Anthropic).&lt;/p&gt;
&lt;p&gt;He describes how he confirmed that optimization in &lt;a href="https://alexgaynor.net/2025/jun/20/serialize-some-der/"&gt;So you want to serialize some DER?&lt;/a&gt;, taking advantage of a tool called &lt;a href="https://github.com/AliveToolkit/alive2"&gt;Alive2&lt;/a&gt; to automatically verify that the potential optimization resulted in the same behavior.&lt;/p&gt;
&lt;p&gt;Alex &lt;a href="https://github.com/llvm/llvm-project/issues/142497"&gt;filed a bug&lt;/a&gt;, and then... &lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Obviously the next move is to see if I can send a PR to LLVM, but it’s been years since I was doing compiler development or was familiar with the LLVM internals and I wasn’t really prepared to invest the time and energy necessary to get back up to speed. But as a friend pointed out… what about Claude?&lt;/p&gt;
&lt;p&gt;At this point my instinct was, "Claude is great, but I'm not sure if I'll be able to effectively code review any changes it proposes, and I'm &lt;em&gt;not&lt;/em&gt; going to be the asshole who submits an untested and unreviewed PR that wastes a bunch of maintainer time". But excitement got the better of me, and I asked &lt;code&gt;claude-code&lt;/code&gt; to see if it could implement the necessary optimization, based on nothing more than the test cases.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Alex reviewed the resulting code &lt;em&gt;very&lt;/em&gt; carefully to ensure he wasn't wasting anyone's time, then submitted &lt;a href="https://github.com/llvm/llvm-project/pull/142869"&gt;the PR&lt;/a&gt; and had Claude Code help implement the various changes requested by the reviewers. The optimization &lt;a href="https://github.com/llvm/llvm-project/commit/632151fbeea972f4aa3c14921eca1e45c07646f3"&gt;landed&lt;/a&gt; two weeks ago.&lt;/p&gt;
&lt;p&gt;Alex's conclusion (emphasis mine):&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I am incredibly leery about &lt;a href="https://alexgaynor.net/2025/mar/05/generality/"&gt;over-generalizing&lt;/a&gt; how to understand the capacity of the models, but at a minimum it seems safe to conclude that &lt;strong&gt;sometimes you should just let the model have a shot at a problem and you may be surprised -- particularly when the problem has very clear success criteria&lt;/strong&gt;. This only works if you have the capacity to review what it produces, of course. [...]&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This echoes Ethan Mollick's advice to "always invite AI to the table". For programming tasks the "very clear success criteria" is extremely important, as it helps fit the tools-in-a-loop pattern implemented by coding agents such as Claude Code.&lt;/p&gt;
&lt;p&gt;LLVM have &lt;a href="https://llvm.org/docs/DeveloperPolicy.html#ai-generated-contributions"&gt;a policy&lt;/a&gt; on AI-assisted contributions which is compatible with Alex's work here:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;[...] the LLVM policy is that contributors are permitted to use artificial intelligence tools to produce contributions, provided that they have the right to license that code under the project license. Contributions found to violate this policy will be removed just like any other offending contribution.&lt;/p&gt;
&lt;p&gt;While the LLVM project has a liberal policy on AI tool use, contributors are considered responsible for their contributions. We encourage contributors to review all generated code before sending it for review to verify its correctness and to understand it so that they can answer questions during code review.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Back in April Ben Evans &lt;a href="https://mastodon.social/@kittylyst/114397697851381604"&gt;put out a call&lt;/a&gt; for concrete evidence that LLM tools were being used to solve non-trivial problems in mature open source projects:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I keep hearing #AI boosters / talking heads claiming that #LLMs have transformed software development [...] Share some AI-derived pull requests that deal with non-obvious corner cases or non-trivial bugs from mature #opensource  projects.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I think this LLVM optimization definitely counts!&lt;/p&gt;
&lt;p&gt;(I also like how this story supports the idea that AI tools amplify existing human expertise rather than replacing it. Alex had previous experience with LLVM, albeit rusty, and could lean on that knowledge to help direct and evaluate Claude's work.)


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/alex-gaynor"&gt;alex-gaynor&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/compilers"&gt;compilers&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llvm"&gt;llvm&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-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/coding-agents"&gt;coding-agents&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/claude-code"&gt;claude-code&lt;/a&gt;&lt;/p&gt;



</summary><category term="alex-gaynor"/><category term="compilers"/><category term="llvm"/><category term="open-source"/><category term="ai-assisted-programming"/><category term="anthropic"/><category term="claude"/><category term="coding-agents"/><category term="claude-code"/></entry><entry><title>Figma’s journey to TypeScript: Compiling away our custom programming language</title><link href="https://simonwillison.net/2024/May/4/figmas-journey-to-typescript/#atom-tag" rel="alternate"/><published>2024-05-04T14:08:27+00:00</published><updated>2024-05-04T14:08:27+00:00</updated><id>https://simonwillison.net/2024/May/4/figmas-journey-to-typescript/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://www.figma.com/blog/figmas-journey-to-typescript-compiling-away-our-custom-programming-language/"&gt;Figma’s journey to TypeScript: Compiling away our custom programming language&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
I love a good migration story. Figma had their own custom language that compiled to JavaScript, called Skew. As WebAssembly support in browsers emerged and improved the need for Skew’s performance optimizations reduced, and TypeScript’s maturity and popularity convinced them to switch.&lt;/p&gt;

&lt;p&gt;Rather than doing a stop-the-world rewrite they built a transpiler from Skew to TypeScript, enabling a multi-year migration without preventing their product teams from continuing to make progress on new features.

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


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/compilers"&gt;compilers&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/javascript"&gt;javascript&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/typescript"&gt;typescript&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/webassembly"&gt;webassembly&lt;/a&gt;&lt;/p&gt;



</summary><category term="compilers"/><category term="javascript"/><category term="typescript"/><category term="webassembly"/></entry><entry><title>Ruff v0.4.0: a hand-written recursive descent parser for Python</title><link href="https://simonwillison.net/2024/Apr/19/ruff-v040/#atom-tag" rel="alternate"/><published>2024-04-19T05:00:26+00:00</published><updated>2024-04-19T05:00:26+00:00</updated><id>https://simonwillison.net/2024/Apr/19/ruff-v040/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://astral.sh/blog/ruff-v0.4.0"&gt;Ruff v0.4.0: a hand-written recursive descent parser for Python&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
The latest release of Ruff—a Python linter and formatter, written in Rust—includes a complete rewrite of the core parser. Previously Ruff used a parser borrowed from RustPython, generated using the LALRPOP parser generator. Victor Hugo Gomes contributed a new parser written from scratch, which provided a 2x speedup and also added error recovery, allowing parsing of invalid Python—super-useful for a linter.&lt;/p&gt;

&lt;p&gt;I tried Ruff 0.4.0 just now against Datasette—a reasonably large Python project—and it ran in less than 1/10th of a second. This thing is Fast.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/compilers"&gt;compilers&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/rust"&gt;rust&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ruff"&gt;ruff&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/astral"&gt;astral&lt;/a&gt;&lt;/p&gt;



</summary><category term="compilers"/><category term="python"/><category term="rust"/><category term="ruff"/><category term="astral"/></entry><entry><title>Lark parsing library JSON tutorial</title><link href="https://simonwillison.net/2023/Aug/13/lark-parsing-library-json-tutorial/#atom-tag" rel="alternate"/><published>2023-08-13T21:50:16+00:00</published><updated>2023-08-13T21:50:16+00:00</updated><id>https://simonwillison.net/2023/Aug/13/lark-parsing-library-json-tutorial/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://lark-parser.readthedocs.io/en/stable/json_tutorial.html"&gt;Lark parsing library JSON tutorial&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
A very convincing tutorial for a new-to-me parsing library for Python called Lark.&lt;/p&gt;

&lt;p&gt;The tutorial covers building a full JSON parser from scratch, which ends up being just 19 lines of grammar definition code and 15 lines for the transformer to turn that tree into the final JSON.&lt;/p&gt;

&lt;p&gt;It then gets into the details of optimization—the default Earley algorithm is quite slow, but swapping that out for a LALR parser (a one-line change) provides a 5x speedup for this particular example.

    &lt;p&gt;&lt;small&gt;&lt;/small&gt;Via &lt;a href="https://github.com/spandanb/learndb-py"&gt;spandanb/learndb-py&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/compilers"&gt;compilers&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/json"&gt;json&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/parsing"&gt;parsing&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;&lt;/p&gt;



</summary><category term="compilers"/><category term="json"/><category term="parsing"/><category term="python"/></entry><entry><title>Mapping Python to LLVM</title><link href="https://simonwillison.net/2023/Jan/10/mapping-python-to-llvm/#atom-tag" rel="alternate"/><published>2023-01-10T02:08:29+00:00</published><updated>2023-01-10T02:08:29+00:00</updated><id>https://simonwillison.net/2023/Jan/10/mapping-python-to-llvm/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://blog.exaloop.io/python-llvm/"&gt;Mapping Python to LLVM&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Codon is a fascinating new entry in the “compile Python code to something else” world—this time targeting LLVM.  Ariya Shajii describes in great detail how it pulls this off, including tricks such as transforming Python generators to LLVM coroutines. Codon doesn’t promise that all Python code will work—it’s best thought of as a Python-like language which can be used to create compiled modules which can then be imported back into regular Python projects.

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


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/compilers"&gt;compilers&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llvm"&gt;llvm&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;&lt;/p&gt;



</summary><category term="compilers"/><category term="llvm"/><category term="python"/></entry><entry><title>A CGo-free port of SQLite</title><link href="https://simonwillison.net/2022/Jan/30/a-cgo-free-port-of-sqlite/#atom-tag" rel="alternate"/><published>2022-01-30T22:25:19+00:00</published><updated>2022-01-30T22:25:19+00:00</updated><id>https://simonwillison.net/2022/Jan/30/a-cgo-free-port-of-sqlite/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://pkg.go.dev/modernc.org/sqlite"&gt;A CGo-free port of SQLite&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Fascinating Go version of SQLite, which uses Go code that has been translated from the original SQLite C using ccgo, a package by the same author which “translates cc ASTs to Go source code”. It claims to pass the full public SQLite test suite, which is very impressive.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/compilers"&gt;compilers&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/go"&gt;go&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/sqlite"&gt;sqlite&lt;/a&gt;&lt;/p&gt;



</summary><category term="compilers"/><category term="go"/><category term="sqlite"/></entry><entry><title>Writing a minimal Lua implementation with a virtual machine from scratch in Rust</title><link href="https://simonwillison.net/2022/Jan/15/minimal-lua-rust/#atom-tag" rel="alternate"/><published>2022-01-15T18:29:06+00:00</published><updated>2022-01-15T18:29:06+00:00</updated><id>https://simonwillison.net/2022/Jan/15/minimal-lua-rust/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://notes.eatonphil.com/lua-in-rust.html"&gt;Writing a minimal Lua implementation with a virtual machine from scratch in Rust&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Phil Eaton implements a subset of Lua in a Rust in this detailed tutorial.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/compilers"&gt;compilers&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/lua"&gt;lua&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/rust"&gt;rust&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/phil-eaton"&gt;phil-eaton&lt;/a&gt;&lt;/p&gt;



</summary><category term="compilers"/><category term="lua"/><category term="rust"/><category term="phil-eaton"/></entry><entry><title>Introducing stack graphs</title><link href="https://simonwillison.net/2021/Dec/9/introducing-stack-graphs/#atom-tag" rel="alternate"/><published>2021-12-09T23:07:29+00:00</published><updated>2021-12-09T23:07:29+00:00</updated><id>https://simonwillison.net/2021/Dec/9/introducing-stack-graphs/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.blog/2021-12-09-introducing-stack-graphs/"&gt;Introducing stack graphs&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
GitHub launched “precise code navigation” for Python today—the first language to get support for this feature. Click on any Python symbol in GitHub’s code browsing views and a box will show you exactly where that symbol was defined—all based on static analysis by a custom parser written in Rust as opposed to executing any Python code directly. The underlying computer science uses a technique called stack graphs, based on scope graphs research from Eelco Visser’s research group at TU Delft.

    &lt;p&gt;&lt;small&gt;&lt;/small&gt;Via &lt;a href="https://github.blog/2021-12-09-precise-code-navigation-python-code-navigation-pull-requests/"&gt;Precise code navigation for Python, and code navigation in pull requests&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/compilers"&gt;compilers&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/github"&gt;github&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/rust"&gt;rust&lt;/a&gt;&lt;/p&gt;



</summary><category term="compilers"/><category term="github"/><category term="python"/><category term="rust"/></entry><entry><title>lex.go in json5-go</title><link href="https://simonwillison.net/2021/Aug/19/lexgo-in-json5-go/#atom-tag" rel="alternate"/><published>2021-08-19T20:15:58+00:00</published><updated>2021-08-19T20:15:58+00:00</updated><id>https://simonwillison.net/2021/Aug/19/lexgo-in-json5-go/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/json5/json5-go/blob/master/lex.go"&gt;lex.go in json5-go&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
This archived GitHub repository has a beautifully clean and clear example of a hand-written lexer in Go, for the JSON5 format (JSON + comments + multi-line strings). parser.go is worth a look too.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/compilers"&gt;compilers&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/go"&gt;go&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/json"&gt;json&lt;/a&gt;&lt;/p&gt;



</summary><category term="compilers"/><category term="go"/><category term="json"/></entry><entry><title>A hands-on introduction to static code analysis</title><link href="https://simonwillison.net/2020/May/5/hands-introduction-static-code-analysis/#atom-tag" rel="alternate"/><published>2020-05-05T00:15:37+00:00</published><updated>2020-05-05T00:15:37+00:00</updated><id>https://simonwillison.net/2020/May/5/hands-introduction-static-code-analysis/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://deepsource.io/blog/introduction-static-code-analysis/"&gt;A hands-on introduction to static code analysis&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Useful tutorial on using the Python standard library tokenize and ast modules to find specific patterns in Python source code, using the visitor pattern.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/compilers"&gt;compilers&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/static-analysis"&gt;static-analysis&lt;/a&gt;&lt;/p&gt;



</summary><category term="compilers"/><category term="python"/><category term="static-analysis"/></entry><entry><title>A Compiler Writing Journey</title><link href="https://simonwillison.net/2020/Jan/8/compiler-writing-journey/#atom-tag" rel="alternate"/><published>2020-01-08T03:33:19+00:00</published><updated>2020-01-08T03:33:19+00:00</updated><id>https://simonwillison.net/2020/Jan/8/compiler-writing-journey/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/DoctorWkt/acwj"&gt;A Compiler Writing Journey&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Warren Toomey has been writing a self-compiling compiler for a subset of C, and extensively documenting every step of the journey here on GitHub. The result is an extremely high quality free textbook on compiler construction.

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


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/c"&gt;c&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/compilers"&gt;compilers&lt;/a&gt;&lt;/p&gt;



</summary><category term="c"/><category term="compilers"/></entry><entry><title>grammar.coffee</title><link href="https://simonwillison.net/2010/Mar/8/coffeescript/#atom-tag" rel="alternate"/><published>2010-03-08T19:27:13+00:00</published><updated>2010-03-08T19:27:13+00:00</updated><id>https://simonwillison.net/2010/Mar/8/coffeescript/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://jashkenas.github.com/coffee-script/documentation/docs/grammar.html"&gt;grammar.coffee&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
The annotated grammar for CoffeeScript, a new language that compiles to JavaScript developed by DocumentCloud’s Jeremy Ashkenas. The linked page is generated using Jeremy’s Docco tool for literate programming, also written in CoffeeScript. CoffeeScript itself is implemented in CoffeeScript, using a bootstrap compiler originally written in Ruby.

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


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/coffeescript"&gt;coffeescript&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/compilers"&gt;compilers&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/docco"&gt;docco&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/documentcloud"&gt;documentcloud&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/javascript"&gt;javascript&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/jeremy-ashkenas"&gt;jeremy-ashkenas&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/literateprogramming"&gt;literateprogramming&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/programming"&gt;programming&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ruby"&gt;ruby&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/selfhosting"&gt;selfhosting&lt;/a&gt;&lt;/p&gt;



</summary><category term="coffeescript"/><category term="compilers"/><category term="docco"/><category term="documentcloud"/><category term="javascript"/><category term="jeremy-ashkenas"/><category term="literateprogramming"/><category term="programming"/><category term="ruby"/><category term="selfhosting"/></entry><entry><title>Developing for the Apple iPhone using Flash</title><link href="https://simonwillison.net/2009/Oct/5/adobe/#atom-tag" rel="alternate"/><published>2009-10-05T21:15:45+00:00</published><updated>2009-10-05T21:15:45+00:00</updated><id>https://simonwillison.net/2009/Oct/5/adobe/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.adobe.com/devnet/logged_in/abansod_iphone.html"&gt;Developing for the Apple iPhone using Flash&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
A brilliant feat of engineering: Adobe worked around Apple’s “no runtime allowed” rules by writing a compiler front end for LLVM that compiles ActionScript 3 to ARM assembly code, and apparently ported the regular Flash drawing APIs as well.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/actionscript"&gt;actionscript&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/adobe"&gt;adobe&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/compilers"&gt;compilers&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/flash"&gt;flash&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/hacking"&gt;hacking&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/iphone"&gt;iphone&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llvm"&gt;llvm&lt;/a&gt;&lt;/p&gt;



</summary><category term="actionscript"/><category term="adobe"/><category term="compilers"/><category term="flash"/><category term="hacking"/><category term="iphone"/><category term="llvm"/></entry><entry><title>Simple Top-Down Parsing in Python</title><link href="https://simonwillison.net/2008/Jul/19/simple/#atom-tag" rel="alternate"/><published>2008-07-19T23:37:59+00:00</published><updated>2008-07-19T23:37:59+00:00</updated><id>https://simonwillison.net/2008/Jul/19/simple/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://effbot.org/zone/simple-top-down-parsing.htm"&gt;Simple Top-Down Parsing in Python&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Eye-opening tutorial on building a recursive descent parser for Python, in Python that uses top-down operator precedence.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/compilers"&gt;compilers&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/effbot"&gt;effbot&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/fredrik-lundh"&gt;fredrik-lundh&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/parsing"&gt;parsing&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/recursivedescent"&gt;recursivedescent&lt;/a&gt;&lt;/p&gt;



</summary><category term="compilers"/><category term="effbot"/><category term="fredrik-lundh"/><category term="parsing"/><category term="python"/><category term="recursivedescent"/></entry><entry><title>python4ply tutorial</title><link href="https://simonwillison.net/2008/Mar/11/pythonply/#atom-tag" rel="alternate"/><published>2008-03-11T05:49:22+00:00</published><updated>2008-03-11T05:49:22+00:00</updated><id>https://simonwillison.net/2008/Mar/11/pythonply/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.dalkescientific.com/writings/diary/archive/2008/03/09/python4ply_tutorial_1.html"&gt;python4ply tutorial&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
python4ply is a parser for Python written in Python using the PLY toolkit, which compiles to Python bytecode using the built-in compiler module. The tutorial shows how to use it to add support for Perl-style 1_000_000 readable numbers.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/compilers"&gt;compilers&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/lexing"&gt;lexing&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/parsing"&gt;parsing&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python4ply"&gt;python4ply&lt;/a&gt;&lt;/p&gt;



</summary><category term="compilers"/><category term="lexing"/><category term="parsing"/><category term="python"/><category term="python4ply"/></entry><entry><title>NestedVM</title><link href="https://simonwillison.net/2007/Jul/11/nestedvm/#atom-tag" rel="alternate"/><published>2007-07-11T14:52:05+00:00</published><updated>2007-07-11T14:52:05+00:00</updated><id>https://simonwillison.net/2007/Jul/11/nestedvm/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://nestedvm.ibex.org/"&gt;NestedVM&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Provides binary translation from a GCC compiled MIPS binary to a Java class file, letting you run anything supported by GCC on the JVM with no source changes.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/compilers"&gt;compilers&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/gcc"&gt;gcc&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/java"&gt;java&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/nestedvm"&gt;nestedvm&lt;/a&gt;&lt;/p&gt;



</summary><category term="compilers"/><category term="gcc"/><category term="java"/><category term="nestedvm"/></entry></feed>