<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Andy Cross</title>
    <description>The latest articles on DEV Community by Andy Cross (@stepinto).</description>
    <link>https://dev.to/stepinto</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4186945%2F85879fa8-8859-4423-8c85-0633101ba792.png</url>
      <title>DEV Community: Andy Cross</title>
      <link>https://dev.to/stepinto</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/stepinto"/>
    <language>en</language>
    <item>
      <title>The AI Act Says Stop a Risky CV Screener, So I Built the Switch</title>
      <dc:creator>Andy Cross</dc:creator>
      <pubDate>Sat, 05 Dec 2026 06:33:24 +0000</pubDate>
      <link>https://dev.to/stepinto/the-ai-act-says-stop-a-risky-cv-screener-so-i-built-the-switch-2lh2</link>
      <guid>https://dev.to/stepinto/the-ai-act-says-stop-a-risky-cv-screener-so-i-built-the-switch-2lh2</guid>
      <description>&lt;p&gt;&lt;a href="https://stepinto.dev/ai-law/article-26-of-the-eu-ai-act-gives-every-deployer-six-duties/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror"&gt;Yesterday's page on Article 26&lt;/a&gt; says that a deployer of a high-risk AI system has to suspend it when there is reason to think it may present a risk, and tell the provider and the market surveillance authority. That one sentence needs a whole system behind it: a written rule for what counts as reason, something watching for it, a switch, a named person who may use it, a way of carrying on the work without the AI, two reports that actually get sent, and a decision about when it is safe to start again. This post sets out that system for one high-risk use, screening CVs, and the code to run it is open source at &lt;a href="https://github.com/AndyCross/stop-switch" rel="noopener noreferrer"&gt;github.com/AndyCross/stop-switch&lt;/a&gt;, with the Bicep for Azure and two models in Microsoft Foundry.&lt;/p&gt;

&lt;p&gt;Screening job applications is high-risk under Annex III, point 4(a). A company that buys a screener and uses it on its applicants is a deployer, and Article 26 applies to it from 2 December 2027. &lt;a href="https://stepinto.dev/ai-law/article-26-of-the-eu-ai-act-gives-every-deployer-six-duties/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror#c-5-risk"&gt;Paragraph 5&lt;/a&gt; reads:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Where deployers have reason to consider that the use of the high-risk AI system in accordance with the instructions may result in that AI system presenting a risk within the meaning of Article 79(1), they shall, without undue delay, inform the provider or distributor and the relevant market surveillance authority, and shall suspend the use of that system.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Nobody has to prove harm first, and the deployer doesn't wait for a serious incident. A risk under Article 79(1) includes a risk to fundamental rights, and non-discrimination is one of them, so a screener that marks people down for their age is squarely the kind of risk the paragraph means.&lt;/p&gt;

&lt;h2&gt;
  
  
  From the article to a running system
&lt;/h2&gt;

&lt;p&gt;Each duty in the article becomes something that exists, with someone responsible for it:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Article 26&lt;/th&gt;
&lt;th&gt;In the running system&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;a href="https://stepinto.dev/ai-law/article-26-of-the-eu-ai-act-gives-every-deployer-six-duties/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror#c-5-monitor"&gt;Monitor the operation&lt;/a&gt;, 26(5)&lt;/td&gt;
&lt;td&gt;A second model, the observer, reads every draft the screener writes before anything leaves. Paired test CVs check the screener from outside&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;a href="https://stepinto.dev/ai-law/article-26-of-the-eu-ai-act-gives-every-deployer-six-duties/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror#c-5-risk"&gt;Reason to consider a risk&lt;/a&gt;, 26(5)&lt;/td&gt;
&lt;td&gt;A written policy, &lt;code&gt;policy.toml&lt;/code&gt;, says in advance which findings trip the switch and which only hold one case&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;a href="https://stepinto.dev/ai-law/article-26-of-the-eu-ai-act-gives-every-deployer-six-duties/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror#c-5-suspend"&gt;Suspend the use&lt;/a&gt;, 26(5)&lt;/td&gt;
&lt;td&gt;One switch. When it trips, no AI recommendation leaves, and every case goes to a person&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Inform the provider and the authority, 26(5)&lt;/td&gt;
&lt;td&gt;The stop opens an incident with both reports drafted and the duty owner alerted. A person sends them and records the reference&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;a href="https://stepinto.dev/ai-law/article-26-of-the-eu-ai-act-gives-every-deployer-six-duties/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror#c-2-competence"&gt;Named people with the authority to act&lt;/a&gt;, 26(2)&lt;/td&gt;
&lt;td&gt;Named operators are the only people who can stop or restart it, and a restart needs a written reason&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;a href="https://stepinto.dev/ai-law/article-26-of-the-eu-ai-act-gives-every-deployer-six-duties/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror#c-2-support"&gt;The support oversight needs&lt;/a&gt;, 26(2)&lt;/td&gt;
&lt;td&gt;An operator console showing the switch, every incident, what was published and what is waiting for a person&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;a href="https://stepinto.dev/ai-law/article-26-of-the-eu-ai-act-gives-every-deployer-six-duties/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror#c-6-period"&gt;Keep the logs&lt;/a&gt;, 26(6)&lt;/td&gt;
&lt;td&gt;Every draft, finding, stop and restart is kept, and the platform logs are kept for 180 days&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The people in it are the recruiters, who only ever see recommendations that passed; the reviewers, who decide every case the system holds back, without seeing the AI's draft; the named operators, who can stop it and start it; and the duty owner, who is alerted when it stops and is responsible for the two reports. In a small company the operator and the owner may be the same person. The runbook names each of them.&lt;/p&gt;

&lt;h2&gt;
  
  
  What counts as reason to stop
&lt;/h2&gt;

&lt;p&gt;The policy starts from one concrete failure: a draft that rejects someone because of their age, when age is not a criterion for the job. The observer doesn't return a risk score, because nobody can act on 0.87 or show it to a regulator. It returns a finding that names a rule and quotes the words that break it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"rule"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"irrelevant_age_used"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"evidence"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"over 55, so reject"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The system checks that the quote really is in the draft, since an observer model can invent a quote as easily as a screener can invent a reason. Then it applies the policy. A verified quote under the age rule trips the switch for everyone. A quote that isn't in the draft, a rule the policy doesn't know, an observer that doesn't answer in two seconds, or output that won't parse holds that one case for a reviewer and leaves the system running. The policy is short enough for the duty owner to read and sign off before go-live, which is the point of writing it down: the deployer decides what it will treat as reason to consider before the day it has to.&lt;/p&gt;

&lt;p&gt;The observer only sees the reasons the screener gives, and a screener can be biased by age without saying so. For that the system also sends paired test CVs to the screener, identical apart from the age, and counts any pair that gets different answers. The tests never pass through to recruiters. Neither check proves that the screener is fair. Each catches a failure that can be named and shown to someone, which is what the duty owner needs in order to say they had reason to consider, and to explain the stop to the provider afterwards.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3wcizm11360wcp8omquq.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3wcizm11360wcp8omquq.webp" alt="The stop switch console after the demo: paused, two incidents, one recommendation and four cases decided by a person" width="800" height="970"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The operator console after the demo: two stops, one recommendation out, four cases with a person, and both reports for each stop waiting to be sent.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  A morning with the switch
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;stopswitch demo&lt;/code&gt; plays the following through with stand-in models, and the test suite runs it against both databases the system supports. Here it is as one morning in a recruitment team. The clock times are illustrative; the order and every outcome are what the demo does.&lt;/p&gt;

&lt;p&gt;One morning, five applicants, two stops&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;span&gt;09:00&lt;/span&gt;&lt;span&gt;An operator starts the system &lt;span&gt;recorded&lt;/span&gt;&lt;/span&gt;&lt;span&gt;A new install starts paused. The named operator restarts it with a written reason, &lt;q&gt;first start for the demo&lt;/q&gt;, and the switch log records who and why.&lt;/span&gt;&lt;span&gt;switch &lt;b&gt;RUNNING&lt;/b&gt; · run 1&lt;/span&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;span&gt;09:02&lt;/span&gt;&lt;span&gt;Applicant A clears &lt;span&gt;published&lt;/span&gt;&lt;/span&gt;&lt;span&gt;The screener advances A for &lt;q&gt;six years of Python services and four on call&lt;/q&gt;. The observer finds nothing. The gate checks the switch is still running in run 1 and writes A to the recommendations table.&lt;/span&gt;&lt;span&gt;switch &lt;b&gt;RUNNING&lt;/b&gt; · run 1&lt;/span&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;span&gt;09:03&lt;/span&gt;&lt;span&gt;Applicant C passes, and its commit is held up &lt;span&gt;in flight&lt;/span&gt;&lt;/span&gt;&lt;span&gt;C's draft is clean and the policy says PASS, but the commit is held up before it reaches the database. In the demo a test hook holds it; in production it would be a slow network or a busy database.&lt;/span&gt;&lt;span&gt;switch &lt;b&gt;RUNNING&lt;/b&gt; · run 1&lt;/span&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;span&gt;09:03&lt;/span&gt;&lt;span&gt;Applicant B trips the switch &lt;span&gt;tripped&lt;/span&gt;&lt;/span&gt;&lt;span&gt;The screener rejects B: &lt;q&gt;the candidate is over 55, so reject&lt;/q&gt;. The observer names &lt;code&gt;irrelevant_age_used&lt;/code&gt; and quotes those words, and the gate finds the quote in the draft. In one transaction the switch pauses, run 1 ends, and an incident opens naming the duty owner, with both reports to send and A listed for review. B goes to a person, without the draft.&lt;/span&gt;&lt;span&gt;switch &lt;b&gt;PAUSED&lt;/b&gt; · run 2&lt;/span&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;span&gt;09:04&lt;/span&gt;&lt;span&gt;Applicant D arrives &lt;span&gt;to a person&lt;/span&gt;&lt;/span&gt;&lt;span&gt;The switch is paused, so D goes straight to the manual queue. Neither model is called.&lt;/span&gt;&lt;span&gt;switch &lt;b&gt;PAUSED&lt;/b&gt; · run 2&lt;/span&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;span&gt;09:05&lt;/span&gt;&lt;span&gt;A job that skips the gate tries to publish D &lt;span&gt;refused&lt;/span&gt;&lt;/span&gt;&lt;span&gt;It writes to the recommendations table directly. The trigger refuses the row: the switch is paused and there is no PASS for D.&lt;/span&gt;&lt;span&gt;switch &lt;b&gt;PAUSED&lt;/b&gt; · run 2&lt;/span&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;span&gt;09:40&lt;/span&gt;&lt;span&gt;The operator restarts it &lt;span&gt;recorded&lt;/span&gt;&lt;/span&gt;&lt;span&gt;With a reason: &lt;q&gt;age rule reviewed with the provider; screener prompt fixed&lt;/q&gt;. A fresh gate starts up, as it would after a redeploy, and the run number stays at 2.&lt;/span&gt;&lt;span&gt;switch &lt;b&gt;RUNNING&lt;/b&gt; · run 2&lt;/span&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;span&gt;09:41&lt;/span&gt;&lt;span&gt;C's commit finally arrives &lt;span&gt;to a person&lt;/span&gt;&lt;/span&gt;&lt;span&gt;It still carries a PASS, from run 1. The switch is running, but in run 2, so the gate sends C to a person. A check of only "is it running?" would have published it.&lt;/span&gt;&lt;span&gt;switch &lt;b&gt;RUNNING&lt;/b&gt; · run 2&lt;/span&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;span&gt;11:15&lt;/span&gt;&lt;span&gt;The observer goes down and applicant E arrives &lt;span&gt;held&lt;/span&gt;&lt;/span&gt;&lt;span&gt;The screener drafts an answer for E, the observer never replies, and after two seconds the gate treats the timeout as a hold. E goes to a person, and nothing is released unchecked.&lt;/span&gt;&lt;span&gt;switch &lt;b&gt;RUNNING&lt;/b&gt; · run 2&lt;/span&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;span&gt;11:16&lt;/span&gt;&lt;span&gt;The operator presses Stop &lt;span&gt;stopped&lt;/span&gt;&lt;/span&gt;&lt;span&gt;With the observer still down. The button is a database transaction and calls no model, so it works. A second incident opens.&lt;/span&gt;&lt;span&gt;switch &lt;b&gt;PAUSED&lt;/b&gt; · run 3&lt;/span&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;By lunchtime the recommendations table holds one row, A. B, C, D and E are with a person, and each stop has its two reports waiting to be sent.&lt;/p&gt;

&lt;h2&gt;
  
  
  After a stop
&lt;/h2&gt;

&lt;p&gt;Suspending the system is the start of the process the paragraph describes. The rest is people's work, and the system's job is to make each step hard to skip.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The work carries on without the AI.&lt;/strong&gt; Every new application goes to the reviewers' queue, and so does every case that was in flight. The suspension note on the Article 26 page asks for an estimate of how long the team can run on that fallback, and the answer belongs in the runbook before the switch is ever pressed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The two reports go out without undue delay.&lt;/strong&gt; The incident names the duty owner and holds both reports, drafted and marked "to send": one to the provider or distributor, one to the market surveillance authority. Each says what was found, when the deployer became aware of it, and that no AI recommendation has left the system since. The owner sends them and records the reference against each one on the console. The time of awareness matters again if this turns out to be a serious incident, because it starts &lt;a href="https://stepinto.dev/ai-law/article-26-of-the-eu-ai-act-gives-every-deployer-six-duties/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror#n-incident-clock"&gt;the provider's reporting clock&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What already went out is reviewed.&lt;/strong&gt; Recommendations published before the stop are not withdrawn automatically, because some of those applicants may already be in interviews. The incident lists every one from the stopped run so a reviewer can look at each.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A restart is a decision with a reason.&lt;/strong&gt; Only a named operator can restart the system, and only by writing down why it is safe: the provider has answered, the rule has been fixed, the paired tests have been run again. Nothing admitted before the stop can come out after the restart; those cases stay with the reviewers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the stop can be trusted
&lt;/h2&gt;

&lt;p&gt;Once the switch is pressed no recommendation may leave, and the code is built so that none can. The Stop button calls no model, and the same stop works straight against the database when the service itself is down. Every case is stamped with the run it started in, every stop ends the run, and the final decision to publish takes the same lock as the Stop button, so a case that was halfway through when the switch tripped can't publish after it, even once the system has been restarted. The database refuses any recommendation that didn't come through that check, which covers a background job someone adds later that skips it. The tests include sixty cases in flight with Stop pressed at a random moment, run thirty times on each database, and no recommendation got out after a stop in any of them. The &lt;a href="https://github.com/AndyCross/stop-switch#how-it-works" rel="noopener noreferrer"&gt;repository's README&lt;/a&gt; has the detail.&lt;/p&gt;

&lt;h2&gt;
  
  
  Running it on Azure
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;infra/main.bicep&lt;/code&gt; makes the whole system in one resource group:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Resource&lt;/th&gt;
&lt;th&gt;What it does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Foundry account and project&lt;/td&gt;
&lt;td&gt;Hosts both models. Key authentication is switched off&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;screener&lt;/code&gt; deployment&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;gpt-5.4-mini&lt;/code&gt;, standing in for the vendor's screener&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;observer&lt;/code&gt; deployment&lt;/td&gt;
&lt;td&gt;Mistral Medium 3.5, from a different vendor so the two are less likely to share a blind spot&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Postgres Flexible Server&lt;/td&gt;
&lt;td&gt;The switch, the cases, the findings and the incidents. Entra sign-in only&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Container App&lt;/td&gt;
&lt;td&gt;The service and the operator console, behind Entra sign-in, with one copy always running so Stop never waits for a cold start&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Managed identity&lt;/td&gt;
&lt;td&gt;Signs in to Foundry, Postgres and the registry, so there are no keys to leak&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Log Analytics&lt;/td&gt;
&lt;td&gt;Keeps logs for 180 days, past the six months paragraph 6 asks for&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Alert&lt;/td&gt;
&lt;td&gt;Emails the duty owner whenever the switch trips&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Both models use the EU Data Zone deployment type, which keeps processing inside the EU; on 4 December Sweden Central offered each model that way. &lt;code&gt;infra/deploy.sh&lt;/code&gt; makes whoever runs it the named operator and gives them direct access to the database, so they can stop the system from their own machine if the service is unreachable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Before go-live
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Name the duty owner and the operators, and check that each has the authority and the time paragraph 2 asks for.&lt;/li&gt;
&lt;li&gt;Write the policy, have the owner sign it off, and agree with the provider what you will tell them if it trips.&lt;/li&gt;
&lt;li&gt;Put the provider's incident contact and the authority's reporting channel into the system, where the reports will use them.&lt;/li&gt;
&lt;li&gt;Work out how long the reviewers can carry the whole queue.&lt;/li&gt;
&lt;li&gt;Tell applicants that an AI system helps decide about them, which is &lt;a href="https://stepinto.dev/ai-law/article-26-of-the-eu-ai-act-gives-every-deployer-six-duties/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror#c-11-inform"&gt;paragraph 11&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Press Stop in production on a quiet day, carry the queue by hand for an hour, send practice reports to your own inbox, and restart with a written reason.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What it leaves out
&lt;/h2&gt;

&lt;p&gt;The observer knows one rule set aimed at one named failure, and a real deployment would write rules for every criterion the provider's instructions rule out. Here a Foundry model plays the vendor's screener; a company that builds its own screener from a general-purpose model and puts it to a high-risk use is the provider of that system, with the provider's duties as well as these. The reports are drafted and a person sends them. Postgres and Foundry are on public endpoints with Entra sign-in, and production wants private endpoints for both. By default the demo's observer is a pattern match standing in for the model, and &lt;code&gt;--observer foundry&lt;/code&gt; swaps in the Mistral deployment to read the same drafts. Proving the switch works comes before asking how good the detector is.&lt;/p&gt;

&lt;p&gt;This is an engineer's reading of Article 26 and no substitute for legal advice.&lt;/p&gt;

&lt;p&gt;AI was used to help produce this draft and the code behind it.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;First published on &lt;a href="https://stepinto.dev/specials/the-ai-act-says-stop-a-risky-cv-screener-so-i-built-the-switch/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror"&gt;stepinto.dev&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>europe</category>
      <category>regulation</category>
      <category>compliance</category>
    </item>
    <item>
      <title>Article 26 of the EU AI Act Gives Every Deployer Six Duties</title>
      <dc:creator>Andy Cross</dc:creator>
      <pubDate>Fri, 04 Dec 2026 06:33:21 +0000</pubDate>
      <link>https://dev.to/stepinto/article-26-of-the-eu-ai-act-gives-every-deployer-six-duties-5fa</link>
      <guid>https://dev.to/stepinto/article-26-of-the-eu-ai-act-gives-every-deployer-six-duties-5fa</guid>
      <description>&lt;p&gt;Article 26 is the EU AI Act's list of duties for deployers. A deployer is whoever uses a high-risk AI system under its own authority in the course of its work: the company screening applicants with a vendor's tool, the bank scoring customers, the council triaging benefit claims. Most teams that touch high-risk AI are deployers, because they bought the system and did not build it. The article applies from 2 December 2027 to the uses listed in Annex III, and from 2 August 2028 to systems that are high-risk under Article 6(1) because they are, or are safety components of, products covered by the laws in Section A of Annex I. Products under Section B, such as cars and aircraft, don't get Article 26 directly: Article 2(2) leaves them to their own sector laws, as &lt;a href="https://stepinto.dev/ai-law/article-6-of-the-eu-ai-act-leaves-four-ways-out-of-high-risk/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror"&gt;the Article 6 page&lt;/a&gt; explains. The Digital Omnibus moved those dates in July and changed no word of the article. It covers a deployer in the EU, and one outside it when the system's output is used in the EU, so a UK employer hiring into an EU office is covered although &lt;a href="https://stepinto.dev/ai-law/the-eu-has-an-ai-act-the-uk-has-regulators-and-no-bill/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror"&gt;the UK has no equivalent rule&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Six duties fall on every deployer, and five more on particular deployers.&lt;/p&gt;

&lt;p id="every-deployer"&gt;&lt;b&gt;6&lt;/b&gt; on every deployerCopy link&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
26(1)&lt;b&gt;Follow the instructions&lt;/b&gt;&lt;span&gt;Use the system as the provider’s instructions say.&lt;/span&gt;
&lt;/li&gt;
&lt;li&gt;
26(2)&lt;b&gt;Name its overseers&lt;/b&gt;&lt;span&gt;Named people with the competence, training, authority and support to step in.&lt;/span&gt;
&lt;/li&gt;
&lt;li&gt;
26(4)&lt;b&gt;Keep input data fit&lt;/b&gt;&lt;span&gt;The input data you control is relevant and sufficiently representative for the system’s purpose.&lt;/span&gt;
&lt;/li&gt;
&lt;li&gt;
26(5)&lt;b&gt;Watch it and stop it&lt;/b&gt;&lt;span&gt;Monitor it, suspend it on reason to think it may present a risk, and report serious incidents.&lt;/span&gt;&lt;a href="https://stepinto.dev/specials/the-ai-act-says-stop-a-risky-cv-screener-so-i-built-the-switch/" rel="noopener noreferrer"&gt;The switch I built&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
26(6)&lt;b&gt;Keep the logs&lt;/b&gt;&lt;span&gt;The logs under your control, for at least six months.&lt;/span&gt;
&lt;/li&gt;
&lt;li&gt;
26(12)&lt;b&gt;Cooperate&lt;/b&gt;&lt;span&gt;Answer the authorities and hand over what you hold.&lt;/span&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p id="particular-deployers"&gt;&lt;b&gt;5&lt;/b&gt; on particular deployersCopy link&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
26(7)Employers&lt;span&gt;Tell workers and their representatives before the system is used on them.&lt;/span&gt;
&lt;/li&gt;
&lt;li&gt;
26(8)Public authorities&lt;span&gt;Register their use in the EU database.&lt;/span&gt;
&lt;/li&gt;
&lt;li&gt;
26(9)Anyone owing a DPIA&lt;span&gt;Build the data protection impact assessment on the provider’s information.&lt;/span&gt;
&lt;/li&gt;
&lt;li&gt;
26(10)Police&lt;span&gt;Ask for authorisation, in advance or within 48 hours, to search recorded footage for a suspect or convicted person, unless it is the initial identification of a suspect.&lt;/span&gt;
&lt;/li&gt;
&lt;li&gt;
26(11)Deciding about people&lt;span&gt;Tell people when the system helps decide about them.&lt;/span&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A breach can be fined up to &lt;b&gt;EUR 15 million or 3% of worldwide turnover&lt;/b&gt;.&lt;/p&gt;

&lt;p&gt;The page works like &lt;a href="https://stepinto.dev/ai-law/article-6-of-the-eu-ai-act-leaves-four-ways-out-of-high-risk/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror"&gt;the Article 6 page&lt;/a&gt; and &lt;a href="https://stepinto.dev/ai-law/article-50-of-the-ai-act-annotated-clause-by-clause/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror"&gt;the Article 50 page&lt;/a&gt;. The article is below, verbatim, with every clause selectable. Each clause has a plain reading, and notes of five kinds on top: what it changes in software, what is contested, what the Commission's guidance says, where it connects to the rest of the law, and dates. Every clause and every note has its own link.&lt;/p&gt;

&lt;p&gt;The Commission has not yet published guidelines on deployer obligations. Its draft classification guidelines say they are coming, and I found none when I checked on 2 December. Four Commission documents touch the article in passing, and three of them are drafts: the guidance on serious incident reporting, the template for the fundamental rights impact assessment that the AI Office put out for feedback on 16 November, and the classification guidelines themselves. The notes cite each by paragraph and say which are drafts. Where a note gives a reading with no source beside it, the reading is mine, and I will add dated notes when the guidelines arrive.&lt;/p&gt;

&lt;p&gt;If you only open three clauses, make them these, because each needs something built before go-live. The duty to stop the system is triggered by reason to think it may present a risk to health, safety or fundamental rights under Article 79, even when you are following the provider's instructions. From then the deployer has to suspend it and tell the provider or distributor, and the relevant market surveillance authority, without undue delay. It does not wait for a serious incident. So before go-live, name who can pause it and test what takes over when they do. The support that oversight needs is what makes that pause real: a named reviewer is not enough without the time, the information and the authority to step in. And the logs under the deployer's control is the clause that hosted software makes hard, because the logs sit with the vendor and the text does not say who keeps them. Logs the vendor hosts can still be under the deployer's control, so check that you can get them out before you buy.&lt;/p&gt;

&lt;p&gt;Two more are worth reading early. Using the system as the instructions say is the duty the others hang from, and a deployer that uses a system for a high-risk purpose its provider never offered becomes the provider. Telling people a high-risk system helps decide about them has no deadline in the text, applies when a human takes the final decision, and can share a notice with Article 50.&lt;/p&gt;

&lt;p&gt;Three notes are written for people who build and run these systems. The note on suspension lists what has to exist before the day the system must be switched off. Article 26 as a check before go-live is the article as a short Python check that a release pipeline can run. The note on prompts and retrieved documents reads the input data duty onto systems built on language models, which no guidance has done yet.&lt;/p&gt;

&lt;p&gt;The notes keep growing after today. Each one is dated, and the log at the foot of the page lists what was added when.&lt;/p&gt;

&lt;p&gt;This is an engineer's reading and no substitute for legal advice. It has not yet been reviewed by a lawyer, and corrections will appear in the notes with their dates.&lt;/p&gt;

&lt;p&gt;AI was used to help produce this page, in its layout and in drafting the text.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;First published on &lt;a href="https://stepinto.dev/ai-law/article-26-of-the-eu-ai-act-gives-every-deployer-six-duties/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror"&gt;stepinto.dev&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>europe</category>
      <category>regulation</category>
      <category>compliance</category>
    </item>
    <item>
      <title>The Hot Path to Claude in Python, With and Without the SDK</title>
      <dc:creator>Andy Cross</dc:creator>
      <pubDate>Thu, 03 Dec 2026 06:32:04 +0000</pubDate>
      <link>https://dev.to/stepinto/the-hot-path-to-claude-in-python-with-and-without-the-sdk-12f5</link>
      <guid>https://dev.to/stepinto/the-hot-path-to-claude-in-python-with-and-without-the-sdk-12f5</guid>
      <description>&lt;p&gt;Ah, Python. I think we all probably know how this is going to go. It's a hugely popular language, renowned for its ease of use, speed of learning, and huge number of libraries that you can just pip install and get going with. It's also a bit of a mess, with pip/uv/poetry and so on having different virtual environments (venvs) which can lead to you having very different experiences just based on toolset choice. Anyway, right up front, it's not known for speed, but there's a reason to measure it anyway ... it's the one you're most likely to come into contact with: popularity.&lt;/p&gt;

&lt;p&gt;Since Python is the language most people call Claude from, and the one where "just use the SDK" is said most often, so it gets two rows on the &lt;a href="https://stepinto.dev/claude-hot-path/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror"&gt;leaderboard&lt;/a&gt;. One is a client in a single file on &lt;code&gt;http.client&lt;/code&gt; and &lt;code&gt;json&lt;/code&gt;, nothing installed. The other is the official &lt;code&gt;anthropic&lt;/code&gt; package, written exactly the way its documentation says. Same spec, same harness, same interpreter. The gap between them is the cost of the SDK, isolated from the cost of Python.&lt;/p&gt;

&lt;p&gt;The code for both is at &lt;a href="https://github.com/AndyCross/claude-hot-path/tree/main/clients" rel="noopener noreferrer"&gt;github.com/AndyCross/claude-hot-path&lt;/a&gt;, under &lt;code&gt;python&lt;/code&gt; and &lt;code&gt;python-sdk&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The standard library client
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;http.client&lt;/code&gt; is the module &lt;code&gt;urllib&lt;/code&gt; is built on, and it is the right level for this: open a connection, send a request, get a response object that is also a buffered reader. Iterating the response yields a line at a time as the bytes arrive, which is the entire SSE transport:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;conn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;request&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"POST"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"/v1/messages"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;dumps&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="s2"&gt;"x-api-key"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"anthropic-version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;VERSION&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"content-type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"application/json"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;resp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;conn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getresponse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;raw&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;raw&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;startswith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="s2"&gt;"data: "&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;continue&lt;/span&gt;  &lt;span class="c1"&gt;# event:, ping, blank separators&lt;/span&gt;
    &lt;span class="n"&gt;ev&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;loads&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;raw&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;index&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;ev&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"index"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;kind&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;ev&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;kind&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;"content_block_start"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ev&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"content_block"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;partial&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="n"&gt;kind&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;"content_block_delta"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;delta&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;ev&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"delta"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;delta&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;"text_delta"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="n"&gt;out&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;delta&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"text"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="n"&gt;out&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;flush&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"text"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"text"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;delta&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"text"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
        &lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="n"&gt;delta&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;"input_json_delta"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="n"&gt;partial&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;delta&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"partial_json"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="n"&gt;kind&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;"content_block_stop"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;"tool_use"&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;partial&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"input"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;loads&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;partial&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="n"&gt;kind&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;"message_delta"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;stop&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;ev&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"delta"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"stop_reason"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Ninety lines, and it reads almost exactly like the Go and Rust versions, because the protocol is the same six events whatever you write it in. The one connection is reused for the second turn, the events decode straight into dicts that are echoed back as the assistant message, and &lt;code&gt;zoneinfo&lt;/code&gt; from the standard library does the timezone lookup, which is the same database Go reads and Rust and Zig parse by hand. Python has had it in the box since 3.9.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;out.flush()&lt;/code&gt; after each delta is there for the same reason as in every other client. Python buffers stdout when it is not a terminal, and without the flush the words would arrive at the end in one piece. The harness checks for that and fails it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The SDK client
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stream&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="no"&gt;MODEL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;max_tokens&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1024&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;tools&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="no"&gt;TOOLS&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;stream&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;text&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;stream&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;text_stream&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;end&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;flush&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;stream&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get_final_message&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is the whole stream in the SDK version, and it is lovely. Fifty-five lines for the complete client, the shortest on the board, and the tool loop is the one from the SDK's own documentation: check &lt;code&gt;stop_reason&lt;/code&gt;, collect the &lt;code&gt;tool_use&lt;/code&gt; blocks, append the assistant turn and a user turn of &lt;code&gt;tool_result&lt;/code&gt; blocks, go round again. The SDK reads &lt;code&gt;ANTHROPIC_API_KEY&lt;/code&gt; and &lt;code&gt;ANTHROPIC_BASE_URL&lt;/code&gt; from the environment on its own, retries on its own (switched off here so the error test is a fair one), and types every block.&lt;/p&gt;

&lt;h2&gt;
  
  
  What they measure as
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Python, standard library&lt;/th&gt;
&lt;th&gt;Python SDK&lt;/th&gt;
&lt;th&gt;Rust, for scale&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;On the path, median of 100&lt;/td&gt;
&lt;td&gt;140.4 ms&lt;/td&gt;
&lt;td&gt;592.5 ms&lt;/td&gt;
&lt;td&gt;3.2 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cold start&lt;/td&gt;
&lt;td&gt;123.8 ms&lt;/td&gt;
&lt;td&gt;464.6 ms&lt;/td&gt;
&lt;td&gt;1.1 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Turnaround&lt;/td&gt;
&lt;td&gt;1.9 ms&lt;/td&gt;
&lt;td&gt;8.7 ms&lt;/td&gt;
&lt;td&gt;0.7 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tail after the last reply&lt;/td&gt;
&lt;td&gt;15.2 ms&lt;/td&gt;
&lt;td&gt;119.8 ms&lt;/td&gt;
&lt;td&gt;1.3 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Peak RSS&lt;/td&gt;
&lt;td&gt;21 MB&lt;/td&gt;
&lt;td&gt;84 MB&lt;/td&gt;
&lt;td&gt;3 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Runtime shipped&lt;/td&gt;
&lt;td&gt;35.5 MB&lt;/td&gt;
&lt;td&gt;71.9 MB&lt;/td&gt;
&lt;td&gt;2.0 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Lines of code&lt;/td&gt;
&lt;td&gt;90&lt;/td&gt;
&lt;td&gt;55&lt;/td&gt;
&lt;td&gt;184&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Python 3.14.8 and &lt;code&gt;anthropic&lt;/code&gt; 1.15.0, linux/arm64, Apple M4 Max under Docker.&lt;/p&gt;

&lt;p&gt;Read the cold start column first. The standard library client spends 124 ms before its first byte goes out, and that is the interpreter starting plus the imports of &lt;code&gt;http.client&lt;/code&gt;, &lt;code&gt;json&lt;/code&gt;, &lt;code&gt;datetime&lt;/code&gt; and &lt;code&gt;zoneinfo&lt;/code&gt;. The SDK client spends 465 ms, and the extra 340 ms is &lt;code&gt;import anthropic&lt;/code&gt;: pydantic, httpx, anyio, the generated type modules for every request and response shape in the API. The SDK ships with sixteen packages in site-packages and loads most of them before it has sent anything.&lt;/p&gt;

&lt;p&gt;Then the tail. After the last byte of the answer has been printed, the standard library client takes 15 ms to exit and the SDK client takes 120 ms. That is the HTTP client's connection pool closing down and the interpreter tearing down everything the import built. Nobody waits for it in a terminal, and a Lambda is billed for it.&lt;/p&gt;

&lt;p&gt;Between those two numbers, while the stream is actually flowing, the SDK is good. Its turnaround of 8.7 ms is slower than the standard library's 1.9 ms, because each event passes through pydantic on the way to you, but both are a rounding error against the 1.5 seconds the model takes to answer.&lt;/p&gt;

&lt;p&gt;So the honest split is this. Python costs you 140 ms per process, and the SDK costs you another 450 ms on top. If your process lives for an hour and makes a thousand calls, neither number matters and you should use the SDK, because it is fifty-five lines and it is typed. If your process lives for one call, a CLI, a Lambda, a hook, the SDK is costing you half a second you can see, and ninety lines of standard library gets most of it back.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to run it
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/AndyCross/claude-hot-path
&lt;span class="nb"&gt;cd&lt;/span&gt; claude-hot-path
./bench/bench.sh python
./bench/bench.sh python-sdk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You need Docker, Python 3 and Go 1.25 or later on your PATH, because both commands build the bench's runner on the host first. You need no API key. The SDK row is marked as a baseline on the leaderboard and sorts below the hand-written clients, because it is the thing they are measured against rather than one of them. The TypeScript SDK gets the same treatment, next.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;First published on &lt;a href="https://stepinto.dev/posts/claude-hot-path-python/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror"&gt;stepinto.dev&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>claude</category>
      <category>python</category>
      <category>sse</category>
    </item>
    <item>
      <title>Which Open Model Licences Let You Ship</title>
      <dc:creator>Andy Cross</dc:creator>
      <pubDate>Wed, 02 Dec 2026 08:15:22 +0000</pubDate>
      <link>https://dev.to/stepinto/which-open-model-licences-let-you-ship-me1</link>
      <guid>https://dev.to/stepinto/which-open-model-licences-let-you-ship-me1</guid>
      <description>&lt;p&gt;"Open weights" means you can download the file. What you may do with the file afterwards is set by the licence that comes with it, and the licences differ more than the word suggests.&lt;/p&gt;

&lt;p&gt;I'd like to preface this with my hope that Open weights continue to be a trend in our sector, and that a self-host, well revenued research lab is the way to achieve that. When I see what the frontier labs are becoming, I feel they've already moved beyond research and into fully fledged software companies. Ultimately that closes doors, locks access and competes with their own customers. &lt;/p&gt;

&lt;p&gt;I read the licence of every model family that has held the open-weight record, and all of Mistral's, on 2 December 2026. This post sorts them by four things a European company wants to do with a model: serve it to customers, fine-tune it, sell the result, and pass the weights on. Each licence is linked, and the quotes are from the licence files themselves.&lt;/p&gt;

&lt;p&gt;I am an engineer and not a lawyer. Read the licence of the exact file you deploy, and take advice before you rely on any of this.&lt;/p&gt;

&lt;h2&gt;
  
  
  The short version
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Licence family&lt;/th&gt;
&lt;th&gt;Serve it&lt;/th&gt;
&lt;th&gt;Fine-tune it&lt;/th&gt;
&lt;th&gt;Sell the result&lt;/th&gt;
&lt;th&gt;Pass it on&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Apache 2.0 and MIT&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes, with the notice&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MIT with a badge (Kimi K2 line)&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes, showing the model's name above a size threshold&lt;/td&gt;
&lt;td&gt;Yes, with the notice&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Open unless you sell model access (Kimi K3, Muse Spark Open, Mistral Large 4)&lt;/td&gt;
&lt;td&gt;Yes inside a product. A hosted API needs an agreement&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes as a product. Model access is the restricted part&lt;/td&gt;
&lt;td&gt;Yes, with the notice&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Revenue bar (Mistral Medium 3.5, Devstral 2)&lt;/td&gt;
&lt;td&gt;Only below $20 million monthly revenue&lt;/td&gt;
&lt;td&gt;Same bar&lt;/td&gt;
&lt;td&gt;Same bar&lt;/td&gt;
&lt;td&gt;Same bar, and the bar travels with the weights&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Community licences (Llama, Gemma 3)&lt;/td&gt;
&lt;td&gt;Yes, under a use policy&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes, with naming and notice rules&lt;/td&gt;
&lt;td&gt;Yes, with the terms attached&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Research and non-production (Mistral MRL, CC BY-NC)&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;For research only&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;For research only&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The row that matters most to a company based in the EU is the fifth one. Meta's use policy withholds the licence for its multimodal Llama models from companies with their principal place of business in the EU.&lt;/p&gt;

&lt;h2&gt;
  
  
  Apache 2.0 and MIT
&lt;/h2&gt;

&lt;p&gt;These two answer yes to all four questions. You can run the model for customers, offer it as an API, fine-tune it, sell the fine-tune and give the weights to someone else. The conditions are about paperwork. MIT asks you to keep the copyright and permission notice with every copy. Apache 2.0 asks for the licence text, any NOTICE file and a statement of what you changed. It also grants a patent licence and gives no right to the provider's trademarks.&lt;/p&gt;

&lt;p&gt;The models under them on 2 December, by the licence tag on each Hugging Face page:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Apache 2.0&lt;/strong&gt;: &lt;a href="https://huggingface.co/Qwen/Qwen3-235B-A22B" rel="noopener noreferrer"&gt;Qwen3&lt;/a&gt; and Qwen 3.8, &lt;a href="https://huggingface.co/openai/gpt-oss-120b" rel="noopener noreferrer"&gt;gpt-oss&lt;/a&gt;, and Gemma 4.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MIT&lt;/strong&gt;: &lt;a href="https://huggingface.co/deepseek-ai/DeepSeek-R1" rel="noopener noreferrer"&gt;DeepSeek R1&lt;/a&gt; and &lt;a href="https://huggingface.co/deepseek-ai/DeepSeek-V4.1-Flash" rel="noopener noreferrer"&gt;DeepSeek V4.1 Flash&lt;/a&gt;, &lt;a href="https://huggingface.co/zai-org/GLM-5.2" rel="noopener noreferrer"&gt;GLM-5.1 and GLM-5.2&lt;/a&gt;, and &lt;a href="https://huggingface.co/microsoft/phi-4" rel="noopener noreferrer"&gt;Phi-4&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Gemma changed this year. Gemma 3 and earlier are under Google's own terms, covered below. Google &lt;a href="https://opensource.googleblog.com/2026/03/gemma-4-expanding-the-gemmaverse-with-apache-20.html" rel="noopener noreferrer"&gt;released Gemma 4&lt;/a&gt; under Apache 2.0, the first Gemma generation to use it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Mistral has five sets of terms
&lt;/h2&gt;

&lt;p&gt;Mistral is the European lab on every chart in this series, and its models are spread across more licences than any other lab's. The model name does not tell you which one applies. Devstral Small 2 is Apache 2.0, and Devstral 2 has a revenue bar.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Apache 2.0.&lt;/strong&gt; Most Mistral releases are here: Mixtral, Mistral Small 3.2 and Small 4, the Ministral 3 family, Devstral Small 2, Magistral Small, Voxtral Small, and &lt;a href="https://huggingface.co/mistralai/Mistral-Large-3-675B-Instruct-2512" rel="noopener noreferrer"&gt;Mistral Large 3&lt;/a&gt;. All four answers are yes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The modified MIT licence with a revenue bar.&lt;/strong&gt; &lt;a href="https://huggingface.co/mistralai/Mistral-Medium-3.5-128B/blob/main/LICENSE" rel="noopener noreferrer"&gt;Mistral Medium 3.5&lt;/a&gt; and &lt;a href="https://huggingface.co/mistralai/Devstral-2-123B-Instruct-2512/blob/main/LICENSE" rel="noopener noreferrer"&gt;Devstral 2&lt;/a&gt; carry the same text. It grants the MIT rights and then adds:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You are not authorized to exercise any rights under this license if the global consolidated monthly revenue of your company (or that of your employer) exceeds $20 million (or its equivalent in another currency) for the preceding month.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The test is the whole company's revenue, measured monthly, and it has nothing to do with what the model earns. Above the bar you have no rights at all, which includes running the model internally. The bar also applies to "any derivatives, modifications, or combined works based on it, whether provided by Mistral AI or by a third party", so a fine-tune someone else published is under it too. A company above the bar can ask Mistral for a commercial licence, "which Mistral AI may grant you at its sole discretion", or use Mistral's hosted service. Mistral's &lt;a href="https://help.mistral.ai/en/articles/347393-under-which-license-are-mistral-s-open-models-available" rel="noopener noreferrer"&gt;help page&lt;/a&gt; says the same.&lt;/p&gt;

&lt;p&gt;A company below the bar gets all four answers as yes. It should know that passing $20 million in a month ends the licence for the month after.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Ecosystem Open-Weight licence.&lt;/strong&gt; &lt;a href="https://huggingface.co/mistralai/Mistral-Large-4-1T-A52B/blob/main/LICENSE" rel="noopener noreferrer"&gt;Mistral Large 4&lt;/a&gt; is under a new licence with no revenue figure in it. It grants the MIT rights, including to "run, deploy, further train or otherwise modify the Model and create derivative works from it". Its one restriction is on companies that sell access to models:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If the Licensee or any of its affiliates operates a Model as a Service business, the Licensee must enter into a separate commercial license with Mistral before using the Model or its derivative works for any commercial purpose.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Model as a Service means giving a third party access to the model "for inference or post-training by any means (for instance via API or hosted endpoints)" with "meaningful control over the inputs, parameters, or training data". The definition leaves out "end-user products with model capabilities solely embedded within specific features". Internal use is exempt as well.&lt;/p&gt;

&lt;p&gt;So a company that builds Mistral Large 4 into its own product can ship without asking. A company that sells API access to models needs a commercial licence first, at any size. The restriction applies to the company and not just to the offering: if any affiliate runs a model API business, every commercial use of Large 4 needs the licence.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The research licence.&lt;/strong&gt; &lt;a href="https://huggingface.co/mistralai/Mistral-Large-Instruct-2407" rel="noopener noreferrer"&gt;Mistral Large 2&lt;/a&gt;, Pixtral Large and the 2024 Ministral 8B are under the &lt;a href="https://mistral.ai/static/licenses/MRL-0.1.md" rel="noopener noreferrer"&gt;Mistral Research License&lt;/a&gt;. Section 3.2 limits use of the model, its derivatives and its outputs to research purposes. The definition excludes use by "individuals or contractors employed in or engaged by companies in the context of (a) their daily tasks", and any testing or proof of concept "intended to generate revenue". None of the four is allowed commercially. Fine-tuning is allowed for research, and the fine-tune stays under the same limit (section 4.3).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Non-production and non-commercial.&lt;/strong&gt; The 2024 &lt;a href="https://huggingface.co/mistralai/Codestral-22B-v0.1" rel="noopener noreferrer"&gt;Codestral&lt;/a&gt; is tagged with the Mistral Non-Production License, and Voxtral TTS with CC BY-NC 4.0. I did not read the non-production licence in full. Treat both as not for products.&lt;/p&gt;

&lt;p&gt;For anything outside Apache 2.0, the route to production is a commercial licence from Mistral or Mistral's own API.&lt;/p&gt;

&lt;h2&gt;
  
  
  Open unless you sell model access
&lt;/h2&gt;

&lt;p&gt;Three of this year's strongest open-weight models use the same shape of licence as Mistral Large 4: MIT rights, with a restriction aimed at companies that resell inference.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Kimi K3 and K3.1 Pro.&lt;/strong&gt; The &lt;a href="https://huggingface.co/moonshotai/Kimi-K3/blob/main/LICENSE" rel="noopener noreferrer"&gt;Kimi K3 licence&lt;/a&gt; and the &lt;a href="https://huggingface.co/moonshotai/Kimi-K3.1-Pro/blob/main/LICENSE" rel="noopener noreferrer"&gt;K3.1 Pro licence&lt;/a&gt; differ only in the model's name. Each grants the rights to "run, deploy, fine-tune, or otherwise modify the Software and create derivative works from it". A separate agreement with Moonshot is needed when two things are both true: the licensee or an affiliate "operates a Model as a Service business", and their combined revenue "exceeds 20 million US dollars" over any twelve consecutive months. Products with the model embedded in specific features are outside the definition, and internal use is exempt. A product with more than 100 million monthly users, or $20 million in monthly revenue, has to display the model's name.&lt;/p&gt;

&lt;p&gt;Epoch files Kimi K3 as non-commercial, and in &lt;a href="https://stepinto.dev/sovereignty/how-far-behind-are-open-weights-measured/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror"&gt;How Far Behind Are Open Weights, Measured&lt;/a&gt; I wrote that the best open model of September 2026 was one you could not legally run in production. The licence text is narrower than that. A company that ships K3 inside its own product, and does not sell model access, can use it commercially at any revenue.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Muse Spark Open.&lt;/strong&gt; Meta's &lt;a href="https://huggingface.co/meta-models/Muse-Spark-Open-816B-A42B" rel="noopener noreferrer"&gt;Muse Model License&lt;/a&gt; of 15 October 2026 has dropped the Llama licence's structure for the same MIT shape. The official repository asks you to accept the terms before it shows the file, so I read the copy in &lt;a href="https://huggingface.co/unsloth/Muse-Spark-Open-816B-A42B/blob/main/LICENSE.md" rel="noopener noreferrer"&gt;a mirror&lt;/a&gt;. It grants the rights to "modify (including fine-tune), create derivative works, distill". A company whose group revenue passes $20 million in twelve months has to sign an agreement with Meta "before offering the Software or any Derivatives as part of that Model as a Service business". Using the model "as a component to power features of the Licensee's own product" is expressly outside that. Every product has to display "Built with Muse Spark Open" in its interface or its documentation, and a usage policy is attached. I found no clause about the EU in the licence or the policy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Kimi K2 line.&lt;/strong&gt; &lt;a href="https://huggingface.co/moonshotai/Kimi-K2-Instruct-0905/blob/main/LICENSE" rel="noopener noreferrer"&gt;Kimi K2&lt;/a&gt; and &lt;a href="https://huggingface.co/moonshotai/Kimi-K2.6/blob/main/LICENSE" rel="noopener noreferrer"&gt;K2.6&lt;/a&gt; are plain MIT with one addition: a product with more than 100 million monthly users, or $20 million in monthly revenue, has to display the model's name. All four answers are yes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Community licences with a use policy
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Llama 3.3 and Llama 4.&lt;/strong&gt; The &lt;a href="https://www.llama.com/llama4/license/" rel="noopener noreferrer"&gt;Llama 4 licence&lt;/a&gt; allows commercial use, fine-tuning and redistribution. You own your fine-tunes. The conditions are a copy of the agreement with anything you distribute, "Built with Llama" displayed prominently, and a name beginning with "Llama" for any model you distribute that was trained or improved with it. A company with more than 700 million monthly users needs Meta's permission.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://www.llama.com/llama4/use-policy/" rel="noopener noreferrer"&gt;use policy&lt;/a&gt; is part of the licence, and it contains this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;With respect to any multimodal models included in Llama 4, the rights granted under Section 1(a) of the Llama 4 Community License Agreement are not being granted to you if you are an individual domiciled in, or a company with a principal place of business in, the European Union. This restriction does not apply to end users of a product or service that incorporates any such multimodal models.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Llama 4 models take images as well as text. A company headquartered in the EU therefore has no licence to run them, although its staff may use a product someone else built on them. The UK is not in the EU, so a company with its principal place of business in the UK is not caught. The Llama 3.3 policy has the same sentence, and Llama 3.3 70B is a text model, so that one is usable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Gemma 3 and earlier.&lt;/strong&gt; The &lt;a href="https://ai.google.dev/gemma/terms" rel="noopener noreferrer"&gt;Gemma terms&lt;/a&gt; allow all four. They count a hosted service as distribution, so serving the model brings the distribution conditions with it. You have to pass the use restrictions in section 3.2 on to your own users "as an enforceable provision" of your terms, and Google reserves the right to restrict usage it believes breaks them. Fine-tunes and models distilled from Gemma are covered too.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The first DeepSeek licence.&lt;/strong&gt; &lt;a href="https://huggingface.co/deepseek-ai/DeepSeek-V3/blob/main/LICENSE-MODEL" rel="noopener noreferrer"&gt;DeepSeek-V3&lt;/a&gt; still carries DeepSeek's licence of October 2023. It allows hosting, fine-tuning and redistribution, with a list of prohibited uses that has to be passed on, and the list includes military use. DeepSeek's later models are MIT.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the licence changes under the AI Act
&lt;/h2&gt;

&lt;p&gt;The licence also decides what the model's provider owes you. Article 53(1)(b) of the &lt;a href="https://eur-lex.europa.eu/eli/reg/2024/1689/oj" rel="noopener noreferrer"&gt;AI Act&lt;/a&gt; requires the provider of a general-purpose model to give companies building on it documentation of what the model can and cannot do. Article 53(2) lifts that duty for models "released under a free and open-source licence that allows for the access, usage, modification, and distribution of the model", unless the model has systemic risk.&lt;/p&gt;

&lt;p&gt;Recital 103 says components "provided against a price or otherwise monetised" do not get the exception, and the Commission's &lt;a href="https://digital-strategy.ec.europa.eu/en/faqs/guidelines-obligations-gpai-providers" rel="noopener noreferrer"&gt;guidance for model providers&lt;/a&gt; describes a qualifying licence as one that "allows access, use, modification, and distribution without monetisation".&lt;/p&gt;

&lt;p&gt;My reading is that Apache 2.0 and MIT models can come without that documentation, and the model card is all you get. A model whose licence charges some users, or bars them, is outside the exception, so its provider owes you the documents. That covers the revenue bar and the hosted-service licences above. I have not seen a regulator or a court say so about any of these licences.&lt;/p&gt;

&lt;h2&gt;
  
  
  Choosing
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Any company, any use&lt;/strong&gt;: Apache 2.0 or MIT. On capability that currently means DeepSeek V4.1 Flash, GLM-5.2, Qwen and Gemma 4, and from Europe Mistral Large 3 and Small 4.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A product company that does not sell model access&lt;/strong&gt;: Kimi K3.1 Pro, Muse Spark Open and Mistral Large 4 are all usable. Mistral Large 4 is the strongest European model on these terms.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A company that sells inference&lt;/strong&gt;: Mistral Large 4 needs a commercial licence at any size. Kimi K3.1 Pro and Muse Spark Open need an agreement above $20 million of group revenue a year.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A company with more than $20 million of monthly revenue&lt;/strong&gt;: Mistral Medium 3.5 and Devstral 2 are not available without a commercial licence, including for internal use.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A company headquartered in the EU&lt;/strong&gt;: Llama 4 is not licensed to you.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Anything under a research, non-production or non-commercial licence&lt;/strong&gt;: keep it out of the product and out of revenue-bearing pilots.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Record the licence with the weights. The same model name has shipped under different terms across versions, and Gemma, DeepSeek and Mistral have all changed licence between releases. &lt;a href="https://stepinto.dev/sovereignty/securing-the-open-source-ai-supply-chain/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror"&gt;Securing the Open Source AI Supply Chain&lt;/a&gt; covers pinning the weights by hash, and the licence file belongs in the same record.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;First published on &lt;a href="https://stepinto.dev/sovereignty/which-open-model-licences-let-you-ship/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror"&gt;stepinto.dev&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>europe</category>
      <category>sovereignty</category>
      <category>openweights</category>
    </item>
    <item>
      <title>The 2027 Regulatory Calendar, as an Engineer's Checklist</title>
      <dc:creator>Andy Cross</dc:creator>
      <pubDate>Wed, 02 Dec 2026 06:33:16 +0000</pubDate>
      <link>https://dev.to/stepinto/the-2027-regulatory-calendar-as-an-engineers-checklist-3nn7</link>
      <guid>https://dev.to/stepinto/the-2027-regulatory-calendar-as-an-engineers-checklist-3nn7</guid>
      <description>&lt;p&gt;This is every date I could find in 2027 on which EU or UK law changes what software has to do, in date order. Each date links to the article that sets it, and I read each of those articles on 1 December 2026. Next to each one is what it means for the people building the system.&lt;/p&gt;

&lt;p&gt;Three of the dates in the table fall this month. They are there because a team planning 2027 starts the year already under them.&lt;/p&gt;

&lt;p&gt;I am an engineer and not a lawyer. This is a reading list with dates on it and no substitute for legal advice.&lt;/p&gt;

&lt;h2&gt;
  
  
  The calendar
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Date&lt;/th&gt;
&lt;th&gt;What starts&lt;/th&gt;
&lt;th&gt;Who it lands on&lt;/th&gt;
&lt;th&gt;Source&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;2 December 2026&lt;/td&gt;
&lt;td&gt;Generative systems already on the market on 2 August have to mark their output. Two new prohibitions apply&lt;/td&gt;
&lt;td&gt;Providers of generative AI systems&lt;/td&gt;
&lt;td&gt;AI Act &lt;a href="https://eur-lex.europa.eu/eli/reg/2026/1744/oj" rel="noopener noreferrer"&gt;Article 111(4) and Article 113(a)&lt;/a&gt;, as amended&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;9 December 2026&lt;/td&gt;
&lt;td&gt;The new product liability rules cover products placed on the market after this date, software included&lt;/td&gt;
&lt;td&gt;Manufacturers, which includes software producers&lt;/td&gt;
&lt;td&gt;
&lt;a href="https://eur-lex.europa.eu/eli/dir/2024/2853/oj" rel="noopener noreferrer"&gt;Directive (EU) 2024/2853&lt;/a&gt;, Articles 2(1), 21 and 22(1)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;24 December 2026&lt;/td&gt;
&lt;td&gt;Each member state has to offer at least one EU Digital Identity Wallet&lt;/td&gt;
&lt;td&gt;Member states&lt;/td&gt;
&lt;td&gt;
&lt;a href="https://eur-lex.europa.eu/eli/reg/2024/1183/oj" rel="noopener noreferrer"&gt;Regulation (EU) 2024/1183&lt;/a&gt;, Article 5a(1)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;12 January 2027&lt;/td&gt;
&lt;td&gt;Cloud providers may no longer charge for switching&lt;/td&gt;
&lt;td&gt;Providers of data processing services&lt;/td&gt;
&lt;td&gt;
&lt;a href="https://eur-lex.europa.eu/eli/reg/2023/2854/oj" rel="noopener noreferrer"&gt;Data Act&lt;/a&gt;, Article 29(1)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;28 June 2027&lt;/td&gt;
&lt;td&gt;Last date for member states to apply the accessibility rules on answering 112 calls&lt;/td&gt;
&lt;td&gt;Member states and emergency answering points&lt;/td&gt;
&lt;td&gt;
&lt;a href="https://eur-lex.europa.eu/eli/dir/2019/882/oj" rel="noopener noreferrer"&gt;Directive (EU) 2019/882&lt;/a&gt;, Article 31(3)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1 August 2027&lt;/td&gt;
&lt;td&gt;Commission guidelines on running the AI Act's requirements inside existing product-safety processes&lt;/td&gt;
&lt;td&gt;The Commission&lt;/td&gt;
&lt;td&gt;AI Act Article 96(1)(g), added by the &lt;a href="https://eur-lex.europa.eu/eli/reg/2026/1744/oj" rel="noopener noreferrer"&gt;Omnibus&lt;/a&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2 August 2027&lt;/td&gt;
&lt;td&gt;General-purpose models released before 2 August 2025 have to comply. Every member state has an AI sandbox running&lt;/td&gt;
&lt;td&gt;Model providers, member states&lt;/td&gt;
&lt;td&gt;AI Act &lt;a href="https://eur-lex.europa.eu/eli/reg/2024/1689/oj" rel="noopener noreferrer"&gt;Article 111(3)&lt;/a&gt; and Article 57(1)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2 September 2027&lt;/td&gt;
&lt;td&gt;Commission guidance and a template for the post-market monitoring plan&lt;/td&gt;
&lt;td&gt;The Commission&lt;/td&gt;
&lt;td&gt;AI Act Article 72(3), as amended&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;12 September 2027&lt;/td&gt;
&lt;td&gt;The unfair-terms rules reach older, long-running data contracts&lt;/td&gt;
&lt;td&gt;Businesses with data-sharing contracts&lt;/td&gt;
&lt;td&gt;
&lt;a href="https://eur-lex.europa.eu/eli/reg/2023/2854/oj" rel="noopener noreferrer"&gt;Data Act&lt;/a&gt;, Article 50&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;17 October 2027&lt;/td&gt;
&lt;td&gt;Commission review of NIS2 is due&lt;/td&gt;
&lt;td&gt;The Commission&lt;/td&gt;
&lt;td&gt;
&lt;a href="https://eur-lex.europa.eu/eli/dir/2022/2555/oj" rel="noopener noreferrer"&gt;NIS2&lt;/a&gt;, Article 40&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2 December 2027&lt;/td&gt;
&lt;td&gt;High-risk obligations for the uses listed in Annex III&lt;/td&gt;
&lt;td&gt;Providers and deployers of those systems&lt;/td&gt;
&lt;td&gt;AI Act Article 113(c)(i), as amended&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;11 December 2027&lt;/td&gt;
&lt;td&gt;The Cyber Resilience Act applies in full&lt;/td&gt;
&lt;td&gt;Manufacturers of products with digital elements&lt;/td&gt;
&lt;td&gt;
&lt;a href="https://eur-lex.europa.eu/eli/reg/2024/2847/oj" rel="noopener noreferrer"&gt;Regulation (EU) 2024/2847&lt;/a&gt;, Article 71(2)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;24 December 2027&lt;/td&gt;
&lt;td&gt;Regulated private services have to accept the EU Digital Identity Wallet&lt;/td&gt;
&lt;td&gt;Larger private services that must use strong authentication&lt;/td&gt;
&lt;td&gt;
&lt;a href="https://eur-lex.europa.eu/eli/reg/2024/1183/oj" rel="noopener noreferrer"&gt;Regulation (EU) 2024/1183&lt;/a&gt;, Article 5f(2)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;"AI Act" is &lt;a href="https://eur-lex.europa.eu/eli/reg/2024/1689/oj" rel="noopener noreferrer"&gt;Regulation (EU) 2024/1689&lt;/a&gt;. "As amended" and "the Omnibus" mean the Digital Omnibus on AI, &lt;a href="https://eur-lex.europa.eu/eli/reg/2026/1744/oj" rel="noopener noreferrer"&gt;Regulation (EU) 2026/1744&lt;/a&gt;, which was published on 24 July 2026 and came into force three days later.&lt;/p&gt;

&lt;p&gt;Three of the 2027 rows are deadlines for the Commission, and the 28 June row and the sandbox in the 2 August row are for member states. They are in the table because the guidance they produce is what teams will build to, and because the Commission has missed one of these before. The Article 6 guidelines were due on 2 February 2026 under Article 6(5) and are still a draft.&lt;/p&gt;

&lt;h2&gt;
  
  
  December 2026
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;2 December, AI content marking.&lt;/strong&gt; Article 50(2) of the AI Act has applied since 2 August 2026. It requires the output of generative systems to be "marked in a machine-readable format and detectable as artificially generated or manipulated". The Omnibus added Article 111(4), which gave systems already on the market before 2 August until 2 December to comply. That period ends today, so every generative system now has to mark what it produces. I went through the article clause by clause in &lt;a href="https://stepinto.dev/ai-law/article-50-of-the-ai-act-annotated-clause-by-clause/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror"&gt;Article 50 of the EU AI Act Makes AI Declare Itself&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The two prohibitions the Omnibus added to Article 5 also apply from today. They cover systems that generate non-consensual intimate imagery and systems that generate child sexual abuse material.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;9 December, product liability.&lt;/strong&gt; Article 4(1) of the new Product Liability Directive says that "product" includes software. Article 2(1) applies the directive "to products placed on the market or put into service after 9 December 2026", and Article 21 keeps the 1985 directive for products placed on the market before that date. Free and open-source software developed or supplied outside a commercial activity is out of scope (Article 2(2)).&lt;/p&gt;

&lt;p&gt;Liability under the directive needs no proof of fault. A person harmed by a defective product claims against the manufacturer, and Article 11(2) stops the manufacturer arguing that the defect appeared after release when the cause was a missing update that was within its control. For a team, that makes three things worth having on record for every release: which version shipped when, which security updates were offered, and how long updates are promised for.&lt;/p&gt;

&lt;p&gt;It is a directive, so it works through each member state's own law, and the deadline for those laws is the same day (Article 22(1)). Check the position in the countries you sell in.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;24 December, identity wallets.&lt;/strong&gt; Article 5a(1) gives each member state 24 months from the entry into force of the wallet's implementing acts to provide a wallet. The first of those acts, such as &lt;a href="https://eur-lex.europa.eu/eli/reg_impl/2024/2979/oj" rel="noopener noreferrer"&gt;Implementing Regulation (EU) 2024/2979&lt;/a&gt;, were published on 4 December 2024 and came into force twenty days later, on 24 December 2024. The date matters to engineers because the acceptance duty a year later is counted from the same day.&lt;/p&gt;

&lt;h2&gt;
  
  
  January to June 2027
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;12 January, cloud switching charges.&lt;/strong&gt; Article 29(1) of the Data Act reads: "From 12 January 2027, providers of data processing services shall not impose any switching charges on the customer for the switching process." Until then Article 29(2) allows reduced charges. The Act's definition of switching charges includes data egress charges.&lt;/p&gt;

&lt;p&gt;If you run a cloud service, including software as a service, your billing has to stop charging customers who are leaving for getting their data out. If you buy cloud services, the fee for leaving a provider falls to zero on that day. The engineering work of moving is unchanged, so an exit plan written before 2027 still needs its migration steps, and only its cost line changes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;28 June, accessibility.&lt;/strong&gt; The European Accessibility Act has applied to products and services since 28 June 2025 (Article 31(2)). The 2027 date in Article 31(3) is the latest day a member state may start applying Article 4(8), which is about emergency answering points handling calls to 112. It asks nothing new of a product team.&lt;/p&gt;

&lt;h2&gt;
  
  
  August to October 2027
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;2 August, general-purpose models.&lt;/strong&gt; Article 111(3) of the AI Act gives providers of general-purpose models that were placed on the market before 2 August 2025 until 2 August 2027 to comply. Models released after August 2025 have had to comply from release.&lt;/p&gt;

&lt;p&gt;If you build on someone else's model, this is the date after which every model you could be calling is covered. Article 53(1)(b) requires the model's provider to give you documentation of what the model can and cannot do. An older model that still has none by August is one to ask about, or move off.&lt;/p&gt;

&lt;p&gt;On the same day every member state has to have at least one AI regulatory sandbox operating (Article 57(1), as amended). Under the original Act, 2 August 2027 was also the date for high-risk systems inside regulated products. The Omnibus moved that to 2 August 2028.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1 August and 2 September, Commission guidance.&lt;/strong&gt; By 1 August the Commission has to publish guidelines on meeting the Act's requirements inside the quality and risk systems that product-safety law already demands (Article 96(1)(g)). By 2 September it has to publish guidance on the post-market monitoring plan, with a template (Article 72(3)). Both feed the December date. A team building a high-risk system will want its monitoring plan to follow that template.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;12 September, older data contracts.&lt;/strong&gt; Chapter IV of the Data Act stops one business imposing unfair terms on another about access to data and its use. It has covered new contracts since 12 September 2025. Under Article 50 it applies from 12 September 2027 to contracts concluded on or before 12 September 2025 that are of indefinite duration, or due to expire at least ten years from 11 January 2024. This one is for whoever owns your data-sharing agreements. The engineering consequence is indirect: a term that limited what you could do with a supplier's or customer's data may stop binding.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;17 October, NIS2 review.&lt;/strong&gt; Article 40 of NIS2 requires the Commission to review the directive by 17 October 2027, including which sectors and sizes of company it covers. Nothing changes for a company on that day. NIS2 itself was due in national law by 17 October 2024 (Article 41(1)), and in July 2026 the Commission &lt;a href="https://digital-strategy.ec.europa.eu/en/news/commission-refers-ireland-spain-france-and-netherlands-court-justice-failing-transpose-rules" rel="noopener noreferrer"&gt;referred Ireland, Spain, France and the Netherlands&lt;/a&gt; to the Court of Justice for not having notified full transposition.&lt;/p&gt;

&lt;h2&gt;
  
  
  December 2027
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;2 December, high-risk AI systems.&lt;/strong&gt; This is the largest date of the year for anyone building AI. The Omnibus moved the high-risk obligations for Annex III uses from 2 August 2026 to 2 December 2027 (Article 113(c)(i), as amended). Annex III lists eight areas, among them biometrics, employment, education, law enforcement and access to essential services such as credit.&lt;/p&gt;

&lt;p&gt;From that day a system in one of those areas needs what Articles 9 to 15 describe before it goes on the market: a risk management system, data governance, technical documentation, automatic logging, instructions for deployers, human oversight, and the levels of accuracy and cybersecurity that Article 15 asks for. Deployers have their own duties in Article 26.&lt;/p&gt;

&lt;p&gt;Two things decide whether this is your date. The first is whether the system is high-risk at all, which is Article 6, and I covered the four exemptions in &lt;a href="https://stepinto.dev/ai-law/article-6-of-the-eu-ai-act-leaves-four-ways-out-of-high-risk/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror"&gt;Article 6 of the EU AI Act Leaves Four Ways Out of High-Risk&lt;/a&gt;. The second is when the system went on the market. Under Article 111(2), as amended, a system placed on the market before the date is covered only if its design changes significantly afterwards. A release in 2028 with a significant design change brings an older system in.&lt;/p&gt;

&lt;p&gt;The logging and oversight patterns in &lt;a href="https://stepinto.dev/sovereignty/architecting-for-two-europes-with-compliance-as-code/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror"&gt;Architecting for Two Europes with Compliance-as-Code&lt;/a&gt; are the ones to have running before this date.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;11 December, Cyber Resilience Act.&lt;/strong&gt; Article 71(2) reads: "This Regulation shall apply from 11 December 2027." The Act covers products with digital elements, which takes in most software and connected hardware sold in the EU. From that day a product needs a CE mark that stands for the security requirements in Annex I. Those include no known exploitable vulnerabilities at release, secure defaults, a software bill of materials, and security updates for a declared support period.&lt;/p&gt;

&lt;p&gt;Part of the Act already applies. Article 14 has required manufacturers to report actively exploited vulnerabilities and severe incidents since 11 September 2026, with an early warning inside 24 hours. Article 69(3) applies that duty to products already on the market. The rest of the Act reaches an older product only if it is substantially modified from 11 December 2027 (Article 69(2)).&lt;/p&gt;

&lt;p&gt;The work for 2027 is a bill of materials generated in the build, a way to receive vulnerability reports and ship fixes, and a decision on how long each product is supported. &lt;a href="https://stepinto.dev/sovereignty/securing-the-open-source-ai-supply-chain/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror"&gt;Securing the Open Source AI Supply Chain&lt;/a&gt; covers the bill of materials for models and their dependencies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;24 December, wallet acceptance.&lt;/strong&gt; Article 5f(2) of the amended eIDAS Regulation requires private services to accept the EU Digital Identity Wallet "no later than 36 months from the date of entry into force of the implementing acts". Counted from 24 December 2024, that is 24 December 2027, and the date is my arithmetic from the article.&lt;/p&gt;

&lt;p&gt;It applies to services that are required by law or by contract to use strong user authentication, in areas that include banking, financial services, transport, energy, health, education and telecommunications. Micro and small enterprises are exempt, and the wallet is used only when the user asks for it. If that describes your login, there is a new identity provider to add in 2027. Public sector services that require electronic identification have to accept wallets under Article 5f(1), which carries no extra period.&lt;/p&gt;

&lt;h2&gt;
  
  
  Early 2028, for the roadmap
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;17 January 2028.&lt;/strong&gt; The Commission's review of DORA is due (&lt;a href="https://eur-lex.europa.eu/eli/reg/2022/2554/oj" rel="noopener noreferrer"&gt;Regulation (EU) 2022/2554&lt;/a&gt;, Article 58(1)). DORA has applied to financial firms and their technology suppliers since 17 January 2025, and I found no date in 2027 in its text.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;28 January 2028.&lt;/strong&gt; Notified bodies under existing product-safety law have to apply for designation under the AI Act (Article 43(3), as amended).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;2 August 2028.&lt;/strong&gt; High-risk obligations for AI systems inside products regulated under Annex I, such as medical devices and toys (Article 113(c)(ii), as amended).&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The UK has no dated duty in 2027
&lt;/h2&gt;

&lt;p&gt;I found no UK date in 2027 on which a new duty starts for software teams.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Data (Use and Access) Act 2025.&lt;/strong&gt; It is in force. &lt;a href="https://www.legislation.gov.uk/uksi/2026/82" rel="noopener noreferrer"&gt;SI 2026/82&lt;/a&gt; brought in the main data protection changes on 5 February 2026, the new rules on automated decisions among them, and the complaints procedure on 19 June 2026. The government's &lt;a href="https://www.gov.uk/guidance/data-use-and-access-act-2025-plans-for-commencement" rel="noopener noreferrer"&gt;commencement page&lt;/a&gt; lists nothing for 2027, and says it is not a complete list.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cyber Security and Resilience Bill.&lt;/strong&gt; It is still a bill. Parliament's &lt;a href="https://bills.parliament.uk/bills/4035" rel="noopener noreferrer"&gt;record&lt;/a&gt; shows the Lords due to consider Commons amendments on 7 December 2026. It has no Royal Assent and no commencement dates, so any 2027 duty under it is not yet law.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Online Safety Act.&lt;/strong&gt; Ofcom's &lt;a href="https://www.ofcom.org.uk/online-safety/illegal-and-harmful-content/important-dates-for-online-safety-compliance" rel="noopener noreferrer"&gt;list of dates&lt;/a&gt; has one entry for 2027 that is not about fees: Ofcom's report on app stores, in January. In November 2025 Ofcom &lt;a href="https://www.ofcom.org.uk/siteassets/resources/documents/online-safety/information-for-industry/illegal-harms/update-on-online-safety-implementation-plans-12-november-2025.pdf" rel="noopener noreferrer"&gt;planned&lt;/a&gt; to publish its final statements on the extra duties for categorised services "by mid-2027". Those are Ofcom's publication dates. The duties start later, on dates not yet set.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;An AI bill.&lt;/strong&gt; There is no government bill. Parliament's bill records list one private member's bill on AI this session, the &lt;a href="https://bills.parliament.uk/bills/4310" rel="noopener noreferrer"&gt;Artificial Intelligence (Consent and Misuse) Bill&lt;/a&gt;, which is at second reading in the Commons.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What could move
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The data part of the Digital Omnibus.&lt;/strong&gt; The Commission's proposal to amend the GDPR, the ePrivacy rules and the Data Act is not law. Parliament's &lt;a href="https://oeil.secure.europarl.europa.eu/oeil/en/procedure-file?reference=2025/0360(COD)" rel="noopener noreferrer"&gt;procedure file&lt;/a&gt; showed it awaiting a committee decision on 1 December 2026. Until it is adopted, the Data Act dates above stand and the GDPR is unchanged.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Article 6 guidelines.&lt;/strong&gt; The Commission's &lt;a href="https://digital-strategy.ec.europa.eu/en/library/draft-commission-guidelines-classification-high-risk-ai-systems" rel="noopener noreferrer"&gt;draft&lt;/a&gt; of 19 May 2026 is still the only version. The final text decides the borderline cases for the 2 December 2027 date.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Cyber Security and Resilience Bill&lt;/strong&gt;, which could become law this month and bring commencement regulations in 2027.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;National law.&lt;/strong&gt; The product liability rules and NIS2 are directives, and the member states are not all on time.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The checklist
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Now.&lt;/strong&gt; If your product generates text, images, audio or video, check that its output carries a machine-readable mark.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Now.&lt;/strong&gt; Record what ships in each release and which security updates you offered. Product liability covers software placed on the EU market after 9 December 2026.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Now.&lt;/strong&gt; Have a route for reporting an actively exploited vulnerability inside 24 hours. The Cyber Resilience Act has required it since September.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;By 12 January.&lt;/strong&gt; If you sell a cloud service in the EU, remove switching and egress charges for customers who are leaving.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;By 2 August.&lt;/strong&gt; For each general-purpose model you build on, hold the documentation its provider owes you under Article 53(1)(b).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;By September.&lt;/strong&gt; Read the Commission's post-market monitoring template when it appears, and write your plan to it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;By 2 December.&lt;/strong&gt; Check every AI feature against Annex III. For any that is high-risk, have Articles 9 to 15 in place before it goes on the market.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;By 11 December.&lt;/strong&gt; Generate a software bill of materials in the build, publish a support period, and have a process for vulnerability reports and fixes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;By 24 December.&lt;/strong&gt; If your service is required to use strong authentication and you are not a small enterprise, accept the EU Digital Identity Wallet as a way to log in.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;In the UK.&lt;/strong&gt; Watch the Cyber Security and Resilience Bill and Ofcom's statements. Neither has put a dated duty into 2027 yet.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;First published on &lt;a href="https://stepinto.dev/specials/the-2027-regulatory-calendar-as-an-engineers-checklist/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror"&gt;stepinto.dev&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>europe</category>
      <category>regulation</category>
      <category>compliance</category>
    </item>
    <item>
      <title>One Service, Two Runtimes, Measured</title>
      <dc:creator>Andy Cross</dc:creator>
      <pubDate>Tue, 01 Dec 2026 06:33:12 +0000</pubDate>
      <link>https://dev.to/stepinto/one-service-two-runtimes-measured-d6k</link>
      <guid>https://dev.to/stepinto/one-service-two-runtimes-measured-d6k</guid>
      <description>&lt;p&gt;This series has said "Go deploys smaller and starts faster" in a dozen different ways, and the &lt;a href="https://stepinto.dev/posts/dotnet-to-go-docker/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror"&gt;containers post&lt;/a&gt; put rough sizes on it from memory. It has never put the two runtimes on the same box, with the same limits, doing the same work, and written down what came out. This is that post. There is no winner in the title because on the measure most people argue about, requests per second, there is not one.&lt;/p&gt;

&lt;p&gt;The whole thing is one repo, &lt;a href="https://github.com/AndyCross/one-service-two-runtimes" rel="noopener noreferrer"&gt;one-service-two-runtimes&lt;/a&gt;, and &lt;code&gt;./bench/bench.sh all&lt;/code&gt; reproduces every number here on any machine with Docker, Go 1.27 or later and Python 3. Go is needed on the host because the cold start probe runs there. The file under each chart is the output of that script.&lt;/p&gt;

&lt;h2&gt;
  
  
  The service
&lt;/h2&gt;

&lt;p&gt;An orders API with three routes and no database. It is small enough to read in full and large enough to exercise the things a real service spends its time on: routing, JSON in and out, validation, a lock around shared state.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Route&lt;/th&gt;
&lt;th&gt;Does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;GET /healthz&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;200 ok&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;POST /orders&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Validates &lt;code&gt;{customer, lines:[{sku, qty, unit_pence}]}&lt;/code&gt;, totals it, stores it, returns &lt;code&gt;201&lt;/code&gt; with the order&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;GET /orders/{id}&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;200&lt;/code&gt; with the order, or &lt;code&gt;404 {"error":"not found"}&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The store keeps the latest ten thousand orders and evicts the oldest, so a thirty second run measures the runtime rather than an ever-growing heap.&lt;/p&gt;

&lt;p&gt;The Go version is &lt;code&gt;net/http&lt;/code&gt; with the method-and-pattern routing from Go 1.22, &lt;code&gt;encoding/json&lt;/code&gt;, and a mutex. The create handler is the whole shape of it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="n"&gt;mux&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;HandleFunc&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"POST /orders"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;func&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;w&lt;/span&gt; &lt;span class="n"&gt;http&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;ResponseWriter&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;http&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Request&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="nc"&gt;NewOrder&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;NewDecoder&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;http&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;MaxBytesReader&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Body&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Decode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="kc"&gt;nil&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nf"&gt;writeError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;http&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;StatusBadRequest&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"invalid json"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nf"&gt;validate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="kc"&gt;nil&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nf"&gt;writeError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;http&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;StatusBadRequest&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="n"&gt;o&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nc"&gt;Order&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="no"&gt;ID&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;newID&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;Customer&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Customer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;Lines&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Lines&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;CreatedAt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Now&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;UTC&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;_&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;l&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="k"&gt;range&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Lines&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;TotalPence&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="n"&gt;l&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Qty&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;l&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;UnitPence&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="n"&gt;store&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Put&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nf"&gt;writeJSON&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;http&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;StatusCreated&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The C# version is a minimal API on &lt;code&gt;CreateSlimBuilder&lt;/code&gt; with a source-generated &lt;code&gt;JsonSerializerContext&lt;/code&gt;, which is the shape Microsoft's own templates use for Native AOT and which works just as well on the JIT:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;MapPost&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"/orders"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;NewOrder&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Validate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;is&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nc"&gt;Results&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Json&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;AppJsonContext&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Default&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;statusCode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;400&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="n"&gt;total&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;foreach&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="n"&gt;l&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Lines&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;total&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="n"&gt;l&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Qty&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;l&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;UnitPence&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Order&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;NewId&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Customer&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Lines&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;total&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;DateTime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;UtcNow&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;store&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Put&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nc"&gt;Results&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Json&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;AppJsonContext&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Default&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Order&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;statusCode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;201&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One C# file produces two of the three builds. &lt;code&gt;dotnet publish&lt;/code&gt; gives the framework-dependent build that runs on the JIT in the &lt;code&gt;aspnet:10.0&lt;/code&gt; image, the way most .NET services ship today. &lt;code&gt;dotnet publish -p:PublishAot=true&lt;/code&gt; gives a native executable in the &lt;code&gt;runtime-deps:10.0&lt;/code&gt; image, with no runtime to start. The Go build is a static binary in a &lt;code&gt;scratch&lt;/code&gt; image. The C# file is 71 non-blank lines and the Go file is 118, mostly because Go spells out the store and the error helpers that ASP.NET Core provides.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it was measured
&lt;/h2&gt;

&lt;p&gt;Everything runs under Docker Compose, which is also how the &lt;a href="https://stepinto.dev/claude-hot-path/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror"&gt;hot path&lt;/a&gt; clients are measured. Each service gets the same box: a container limited to two CPUs and 512 MB. The load generator is a small Go program in its own container on the same Compose network, so the host's port forwarding is not in the measured path. It opens 64 connections and each one loops over create, read back, and read a missing order, for thirty seconds, after a ten second warm-up. That is run three times per target and the middle run by request rate is the one reported, with the range under the chart.&lt;/p&gt;

&lt;p&gt;The service's CPU is sampled every second during the load runs, and all three sit at the 200% limit for the whole run. That is the check that the load generator was not the thing being measured. The first version of this harness used k6, which needed nine CPUs and four gigabytes to drive the same load and left the Go service at 174%, and the three runtimes looked identical because the client was the bottleneck.&lt;/p&gt;

&lt;p&gt;Cold start is measured from the host by a probe that stops and starts the container twenty times. For each start it records the time from &lt;code&gt;docker start&lt;/code&gt; returning to the first &lt;code&gt;200&lt;/code&gt; from &lt;code&gt;/healthz&lt;/code&gt;, polled every millisecond, and then the time taken by the first real &lt;code&gt;POST /orders&lt;/code&gt; after that, which is where a JIT pays for compiling the JSON path. Docker's own &lt;code&gt;docker start&lt;/code&gt; takes about 230 ms on this machine for all three images and is reported separately so it can be ignored.&lt;/p&gt;

&lt;p&gt;Memory is what &lt;code&gt;docker stats&lt;/code&gt; reports for the container, which is the cgroup's view, read once a second after the cold starts with no load, and once at the end of the load runs. Image sizes are from &lt;code&gt;docker image inspect&lt;/code&gt; (compressed, what a pull transfers) and &lt;code&gt;docker image ls&lt;/code&gt; (unpacked, what sits on the node). Build time is one clean &lt;code&gt;docker build --no-cache&lt;/code&gt; per target with the base images already pulled.&lt;/p&gt;

&lt;p&gt;The box is a MacBook Pro with an Apple M4 Max, so the Linux VM under Docker Desktop is arm64 with sixteen virtual CPUs and eight gigabytes. Go is 1.27.3, the .NET SDK is 10.0.403, and both come from the official images. It is a laptop, the connections are plain HTTP without TLS, and there is no database. The numbers say which things are the same order of magnitude and which are not, and they are not a capacity plan for your service.&lt;/p&gt;

&lt;h2&gt;
  
  
  Throughput and latency
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fb1k3u2earm84di8jnr9x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fb1k3u2earm84di8jnr9x.png" alt="Requests per second, 64 connections, 2 CPUs" width="800" height="200"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Requests per second over 30 s at 64 connections, the middle of three runs. The three runs ranged from 154,224 to 155,281 for Go, 156,373 to 166,866 for the JIT and 159,771 to 160,438 for AOT.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://stepinto.dev/data/two-runtimes-summary.csv" rel="noopener noreferrer"&gt;Download the data (CSV)&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frl028zppy27rx9r831db.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frl028zppy27rx9r831db.png" alt="Request latency under load" width="800" height="367"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Median and 99th percentile request time from the load generator's side, same run.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://stepinto.dev/data/two-runtimes-summary.csv" rel="noopener noreferrer"&gt;Download the data (CSV)&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With two CPUs pinned, all three builds serve between 155 and 160 thousand requests a second, each request being a JSON parse, a lock, a map operation and a JSON encode. The gap between them is three percent, which is inside the run-to-run range of the JIT build on its own, so I am not going to rank them. The medians are within four hundredths of a millisecond of each other, with .NET slightly lower. The one difference that held across all three runs is the tail: Go's 99th percentile stayed under two milliseconds every time, and both .NET builds sat between two and a half and three. The gap is a millisecond, and nobody will see it behind a database call.&lt;/p&gt;

&lt;p&gt;The series has been careful never to claim Go is faster at serving requests, and this is the measurement behind that care. Kestrel and &lt;code&gt;net/http&lt;/code&gt; both saturate two cores with the same work done per core, give or take the noise of a laptop. The runtime is not where this service's time goes, and the same would be true of yours the moment it talked to a database.&lt;/p&gt;

&lt;h2&gt;
  
  
  Memory
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqgwc4z881y9qy17xbc1x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqgwc4z881y9qy17xbc1x.png" alt="Container memory, idle and after load" width="800" height="367"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Container memory from docker stats: a second after start with no load, and at the end of the load runs.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://stepinto.dev/data/two-runtimes-summary.csv" rel="noopener noreferrer"&gt;Download the data (CSV)&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here the runtimes separate. The Go process idles at a few megabytes and grows to under twenty under load. The JIT build idles at thirty and grows to over eighty. Native AOT halves the idle figure and takes a chunk off the loaded one, but it is still several times Go, because the GC and the thread pool are the same runtime underneath.&lt;/p&gt;

&lt;p&gt;The web SDK publishes with &lt;code&gt;System.GC.Server&lt;/code&gt; set to &lt;code&gt;true&lt;/code&gt; in the runtime config, which you can read out of the image with &lt;code&gt;cat /app/service.runtimeconfig.json&lt;/code&gt;, and the server GC trades memory for throughput by collecting less often and keeping more heap committed. Since .NET 9 it starts with one heap and adds more as the allocation rate demands, which is why the loaded figure is a lot larger than the idle one. Setting &lt;code&gt;DOTNET_gcServer=0&lt;/code&gt; is the usual answer when memory matters more than the last few percent of throughput. I ran everything at the defaults, because that is what you get when you follow the template, and the point of the post is the defaults.&lt;/p&gt;

&lt;p&gt;In practice this is the number that sets how many replicas fit on a node. Four or five Go replicas of this service fit in the memory of one JIT replica, and three fit in one AOT replica. Whether that matters depends entirely on whether you are paying per node or per team.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cold start
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjszizjkyuc62ib2smtp3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjszizjkyuc62ib2smtp3.png" alt="Cold start, median of 20" width="800" height="367"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Median of 20 cold starts: from docker start returning to the first healthy reply, then the first real request after that.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://stepinto.dev/data/two-runtimes-summary.csv" rel="noopener noreferrer"&gt;Download the data (CSV)&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Go answers its health check under two milliseconds after the container starts, and Native AOT is a millisecond behind it. The JIT build takes around fifty milliseconds to be healthy and then another twelve on the first real request, which is Kestrel's pipeline, the routing, and the JSON path being compiled on the way through. After that first request the JIT build is as fast as the others, which is what the throughput chart shows.&lt;/p&gt;

&lt;p&gt;Fifty milliseconds once per process start is nothing for a service that runs for days. It is something for a scale-to-zero platform that starts a process per request burst, for a test suite that starts the service hundreds of times, and for Lambda, where the &lt;a href="https://stepinto.dev/posts/claude-hot-path-csharp/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror"&gt;C# hot path client&lt;/a&gt; found the same thing: AOT closes the gap, and the JIT does not.&lt;/p&gt;

&lt;h2&gt;
  
  
  What ships, and how long it takes to build
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzxjh5r2f6c7jegrgd3mx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzxjh5r2f6c7jegrgd3mx.png" alt="What ships and how long it takes to build" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Compressed image, unpacked image, and one clean build with the base images already present.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://stepinto.dev/data/two-runtimes-summary.csv" rel="noopener noreferrer"&gt;Download the data (CSV)&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Go image is a binary and nothing else: under three megabytes compressed, nine on disk. The JIT image carries the ASP.NET Core shared framework and a Debian userland, and the application itself is a hundred kilobytes of IL inside it. The AOT image drops the framework but keeps the Debian base for libc and OpenSSL, and the binary is just under ten megabytes. Microsoft's chiseled Ubuntu variants of both base images cut that down a long way: &lt;code&gt;runtime-deps:10.0-noble-chiseled&lt;/code&gt; is 4.6 MB compressed against 44 for the Debian default, which would put the AOT image around 15 MB over the wire, and the chiseled &lt;code&gt;aspnet&lt;/code&gt; base is 50 MB against 89. The default tags are what the documentation reaches for first and they are what I measured, with the chiseled sizes in the repo's README for anyone who wants the other row.&lt;/p&gt;

&lt;p&gt;Build time is the cost of AOT that the size and cold start charts do not show. The Go and JIT builds are a few seconds each. The AOT build is three quarters of a minute on this machine, every time, because ILCompiler compiles the whole framework's reachable surface to native code for each publish. On a CI runner with fewer cores it is longer. That is a cost paid on every commit, and it is the reason the AOT row is not simply the best of both.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I take from it
&lt;/h2&gt;

&lt;p&gt;The series has argued that the reason to move a service from .NET to Go is the deployment story, and the numbers put it at thirty-five times smaller over the wire, four to five times less memory under load, and a cold start measured in single milliseconds rather than tens. They also put throughput and latency at a draw, which is the claim I most wanted a number against.&lt;/p&gt;

&lt;p&gt;Native AOT gets .NET most of the way on cold start and image size and some of the way on memory, for the price of most of a minute per build, source-generated JSON, and the set of libraries that have done the work to be trimmable. If you have a .NET team and a cold start problem, that is the move, and it is a much smaller one than a rewrite.&lt;/p&gt;

&lt;p&gt;If you are choosing from nothing, the Go column is the one with no asterisks on it. That has been the series' position since the &lt;a href="https://stepinto.dev/posts/dotnet-to-go-single-binary/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror"&gt;single binary post&lt;/a&gt;, and it is a relief to have it be a measurement rather than a feeling.&lt;/p&gt;

&lt;p&gt;Both source files, the Dockerfiles, the load generator, the cold start probe and the script that ties them together are in the &lt;a href="https://github.com/AndyCross/one-service-two-runtimes" rel="noopener noreferrer"&gt;repo&lt;/a&gt;. Run it on an x86 box and send me the CSV.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;First published on &lt;a href="https://stepinto.dev/posts/dotnet-to-go-measured/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror"&gt;stepinto.dev&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>go</category>
      <category>dotnet</category>
      <category>csharp</category>
      <category>benchmarks</category>
    </item>
    <item>
      <title>Every Thistle on This Knitted Cloth Grows From Its Own Seed</title>
      <dc:creator>Andy Cross</dc:creator>
      <pubDate>Mon, 30 Nov 2026 09:18:59 +0000</pubDate>
      <link>https://dev.to/stepinto/every-thistle-on-this-knitted-cloth-grows-from-its-own-seed-5h1f</link>
      <guid>https://dev.to/stepinto/every-thistle-on-this-knitted-cloth-grows-from-its-own-seed-5h1f</guid>
      <description>&lt;p&gt;&lt;a href="https://stepinto.dev/art/thistle.html" rel="noopener noreferrer"&gt;Thistle&lt;/a&gt; is the newest pattern piece, made on St Andrew's Day. It is a knitted cloth with thistles embroidered on it: rows of sprigs sewn onto plain knitting, with a narrow knitted band between one row and the next. Each sprig is grown from a seed, so no two on the cloth are the same, and the cloth goes on for as far as you care to drag.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxmnthh7xpszx644pe2o4.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxmnthh7xpszx644pe2o4.webp" alt="Three tall panels of knitted cloth with embroidered thistles. The first is cream with a band of navy lozenges and purple thistle heads on green stems, the second is navy with a band of white crosses, the third is dark green with pink-red heads on gold cups." width="800" height="392"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Three of the presets: thistle, andermas and moss. Every sprig on a cloth is different.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  A doodle in two techniques
&lt;/h2&gt;

&lt;p&gt;Google's doodle for St Andrew's Day this year was a strip of cream knitting. The name was worked in navy, with a unicorn at each end, a saltire in each corner and a border of small diamonds, and the two Os were thistles in raised embroidery.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Feqrrduhq6m9hm9hhvl3o.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Feqrrduhq6m9hm9hhvl3o.webp" alt="A strip of cream knitted fabric with Google's name in navy stitches. The two Os are replaced by embroidered thistles with pink tufts and green cups. A small navy unicorn stands at each end and a square patch with a white saltire sits in each corner." width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Google's doodle on 30 November 2026, as it appeared on the search page, with its tooltip. The image is Google's.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Every pattern piece so far has been one material: tile, brick, iron, silk, wool. The doodle is two on one cloth. The knitted parts sit on the grid of the stitches, and the embroidered thistles lie across that grid at whatever angle the needle took.&lt;/p&gt;

&lt;p&gt;I already had both halves. &lt;a href="https://stepinto.dev/patterns/fair-isle-has-two-rules-and-the-second-fills-every-corner/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror"&gt;Fair Isle&lt;/a&gt; knits, and the &lt;a href="https://stepinto.dev/patterns/iron-and-silk/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror"&gt;Mantón de Manila&lt;/a&gt; embroiders silk with a satin stitch that changes brightness as the light moves. Thistle puts the second on top of the first. Nothing is traced from the doodle. There are no letters, unicorns or flags, and the thistles are grown by the code described below.&lt;/p&gt;

&lt;h2&gt;
  
  
  The knitting keeps to its chart
&lt;/h2&gt;

&lt;p&gt;The ground is knitted by &lt;code&gt;azulejeria/knit&lt;/code&gt;, the module Fair Isle uses. A stitch is a V, one unit wide and 0.8 high. The cloth is 56 plain rows for the sprigs to stand on, then a band, then the same again. The band is written the way a Fair Isle cloth is written (&lt;code&gt;lozenge&lt;/code&gt;, &lt;code&gt;cross&lt;/code&gt;, &lt;code&gt;star11&lt;/code&gt;) and keeps Fair Isle's two rules: two colours in a row, and no loose strand carried for more than seven stitches. The advanced tab offers nine bands, or plain wool with no band.&lt;/p&gt;

&lt;p&gt;A sprig stands on every 36 stitches, and each row of sprigs is moved 18 stitches along from the row above.&lt;/p&gt;

&lt;p&gt;The embroidery is measured in the same units and ignores the grid. A thread is 0.3 of a knitted stitch wide, and a stitch of embroidery starts and ends wherever its shape puts it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6ruaob9cea9i8t44kqdj.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6ruaob9cea9i8t44kqdj.webp" alt="A close view of two embroidered thistle heads on cream knitting. The knitting is rows of V-shaped stitches. Each head is a green cup of overlapping striped scales with a fan of pink and purple threads rising from it, and a soft shadow falls on the wool beside it." width="800" height="457"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Two heads at 34 pixels a knitted stitch. The wool is in rows of Vs, and the thread lies across them at any angle.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  A sprig from a seed
&lt;/h2&gt;

&lt;p&gt;Each sprig takes its random numbers from the cloth's seed and its own place in the repeat. The same seed always gives the same cloth, and a double tap gives another.&lt;/p&gt;

&lt;p&gt;The stem is a curve 19 to 23 stitches tall that leans a little to one side. It is worked in stem stitch: a cord with the slant of each stitch marked across it. The "growth" slider decides how much the stem carries, from one head and three leaves to three heads and six leaves.&lt;/p&gt;

&lt;p&gt;A leaf is the Mantón's leaf with its edge cut. It is two halves, one on each side of the midrib, and each half is satin stitch laid at about 50 degrees to the midrib, in opposite directions. Each half is cut into five lobes, and each lobe ends in a short pale stitch for its spine.&lt;/p&gt;

&lt;p&gt;A head is sewn in the order a needle would sew it. The tuft goes down first: about eighty long straight stitches fanned out from the neck, a long dark fan behind and a shorter pale one in front. Each fan is laid from its outer edges inwards, so the middle stitches lie on top. Then the green cup is stitched over the foot of the tuft. Its scales go on last, in five rows from the top down, so that each row covers the feet of the row above. The scales alternate between two greens and two directions of thread.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fk2w86e10r7x0pda0psh2.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fk2w86e10r7x0pda0psh2.webp" alt="Two panels of cream knitting with embroidered thistles. On the left each sprig has a single head and three leaves. On the right each sprig has three heads and a thick cluster of leaves." width="800" height="315"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Growth at 1 and at 5, with the same seed.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The light is in the angle of the thread
&lt;/h2&gt;

&lt;p&gt;Nothing in a sprig is shaded by hand. Each stitch carries the angle its thread lies at, and its brightness is how far that angle is from the light: &lt;code&gt;lit = |sin(direction - light)|&lt;/code&gt;. A thread is brightest when the light falls across it and dullest when the light runs along it. That is the Mantón's rule, and here it lights all three kinds of stitch.&lt;/p&gt;

&lt;p&gt;The tuft shows it most clearly. Its stitches fan through about 130 to 145 degrees, so some always lie across the light and some along it, and the bright part of the fan moves round as the light turns. The two halves of a leaf swap which is bright. "Turn the light" on the advanced tab keeps it moving. The knitting is painted once and kept, so each frame redraws only the thread.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvnis83045fwa93r784nt.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvnis83045fwa93r784nt.webp" alt="The same embroidered thistle sprig twice. On the left the pink tuft is brightest in the middle and the shadows fall to the lower left. On the right the tuft is brightest at its sides, the green cup is paler and the shadows fall straight down." width="799" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The same sprig with the light at 15 degrees and at 105.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Thread stands proud of wool
&lt;/h2&gt;

&lt;p&gt;Silk embroidered on silk lies nearly flat. Thread sewn onto knitting stands up from it, so every stitch here casts a shadow on the wool. The shadow is the stitch's own outline, moved away from the light by the distance on the "proud" slider (half a knitted stitch to begin with), softened and multiplied onto the cloth. The caster is &lt;code&gt;azulejeria/shadow&lt;/code&gt;, which also casts the shadows of &lt;a href="https://stepinto.dev/patterns/sashiko-a-stone-screen-and-tartan-each-made-from-one-simple-rule/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror"&gt;Jali's stone screen&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;ayrshire&lt;/code&gt; preset is white thread on white wool. It is named after Ayrshire whitework, the white embroidery on fine muslin that was made in Ayrshire in the nineteenth century. That was cotton on muslin and this is wool on wool, so only the idea is borrowed. With no colour, the sheen and the shadow are all that draw the thistle.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fco3dply6ot5hvxx3zczk.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fco3dply6ot5hvxx3zczk.webp" alt="White embroidered thistles on pale knitted wool. The heads, cups and lobed leaves are visible only by the direction of their threads and the grey shadows they cast to the lower right." width="800" height="457"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Ayrshire: white on white, with the stitching standing 0.9 of a stitch proud.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The stitches are in the package
&lt;/h2&gt;

&lt;p&gt;The Mantón's satin stitch stayed on its own page until a second piece wanted it. It is now &lt;code&gt;azulejeria/stitch&lt;/code&gt;, new in &lt;a href="https://www.npmjs.com/package/azulejeria" rel="noopener noreferrer"&gt;azulejeria&lt;/a&gt; 2.10.0, and both pages import it.&lt;/p&gt;

&lt;p&gt;A design is a list of plain objects of three kinds. A satin stitch is a polygon, the angle of its thread and a pair of colours. A cord is a line with a width. A straight stitch is one thread from end to end. &lt;code&gt;paintStitch&lt;/code&gt; paints whichever it is given, and &lt;code&gt;silhouette&lt;/code&gt; gives a stitch's outline to the shadow caster. The light rule and the lay of the threads across a shape need no page, so their tests run in Node.&lt;/p&gt;

&lt;p&gt;The move changed the Mantón. Its page mixed two colours into an &lt;code&gt;rgb()&lt;/code&gt; string and then passed that string back in as if it were a hex colour. A canvas ignores a colour it can't read, so every shape on the darker face was filled with whatever colour the canvas had been left on, and most of the outer petals came out dark. The module's &lt;code&gt;mix&lt;/code&gt; returns hex, and the shawl's roses and peonies now have all their petals in their own colours.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the page leaves out
&lt;/h2&gt;

&lt;p&gt;A real needle has to pass between the knitted stitches or through the yarn. Here a stitch of embroidery can end anywhere. There is no duplicate stitch, which is embroidery that follows a knitted V exactly, and the wool doesn't pucker under the thread.&lt;/p&gt;

&lt;p&gt;There are six cloths: cream, navy, heather, moss, white on white and this site's colours. The navy one has a band of white crosses and is called &lt;code&gt;andermas&lt;/code&gt;, after Andermes, an old Scots name for St Andrew's Day.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;First published on &lt;a href="https://stepinto.dev/patterns/every-thistle-on-this-knitted-cloth-grows-from-its-own-seed/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror"&gt;stepinto.dev&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>art</category>
      <category>generative</category>
      <category>canvas</category>
      <category>javascript</category>
    </item>
    <item>
      <title>The Model Found the Warm-Up I Never Logged</title>
      <dc:creator>Andy Cross</dc:creator>
      <pubDate>Mon, 30 Nov 2026 06:32:52 +0000</pubDate>
      <link>https://dev.to/stepinto/the-model-found-the-warm-up-i-never-logged-3nnk</link>
      <guid>https://dev.to/stepinto/the-model-found-the-warm-up-i-never-logged-3nnk</guid>
      <description>&lt;p&gt;This post fits the heater model from &lt;a href="https://stepinto.dev/posts/world-models-104/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror"&gt;104&lt;/a&gt; to a real room instead of a simulated one. The data is six and a half months of hourly temperature readings from my office, with the weather outside and a sensor on the door. The building controls the heating, so the log has no record of it. You will see the model's one private field pick up a warm-up of about three-quarters of a degree an hour every morning, how that compares with a model that is simply given the time of day, why the door made no difference, and the October mornings the field gets wrong. The model has eleven weights and trains in 0.3 seconds.&lt;/p&gt;

&lt;p&gt;My office has a sensor on the door. I put it there because a door seemed like the obvious thing that would change how the room behaves, and because &lt;a href="https://stepinto.dev/posts/world-models-104/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror"&gt;104&lt;/a&gt; spent a whole post teaching a model to find a door it couldn't see. Six months later I fitted 104's model to the office's real log, held the door back as an answer key, and the door turned out not to matter at all. The thing that did matter was a warm-up of about three-quarters of a degree an hour every morning, which no sensor records and I hadn't noticed. The model's private field found it by itself.&lt;/p&gt;

&lt;p&gt;The hidden state a model learns is whatever the inputs leave unexplained, which here was the heating and not the door.&lt;/p&gt;

&lt;p&gt;The code is in &lt;a href="https://github.com/AndyCross/step-into-world-models/blob/main/tools/office_fit.ts" rel="noopener noreferrer"&gt;tools/office_fit.ts&lt;/a&gt; and the hourly data is in &lt;a href="https://stepinto.dev/data/office-hourly.csv" rel="noopener noreferrer"&gt;office-hourly.csv&lt;/a&gt;, so everything below can be rerun.&lt;/p&gt;

&lt;h2&gt;
  
  
  The room and its log
&lt;/h2&gt;

&lt;p&gt;The office is a small room in a serviced building in Ashford, Kent. Since April the room has been logged by &lt;a href="https://getunimo.com" rel="noopener noreferrer"&gt;Unimo&lt;/a&gt;, which is our own product at &lt;a href="https://crossmoore.io/products/unimo/" rel="noopener noreferrer"&gt;CrossMoore&lt;/a&gt;. A Unimo hub in the office reads four cheap Zigbee sensors and fetches the weather.&lt;/p&gt;

&lt;p&gt;Unimo builds a live 3D model of a site from the documents, photographs and drawings you already have. It brings the site's readings (weather, noise, power, and here a room's temperature and its door) into one view, and turns them into dashboards and reports without a specialist team. I was part of making it, so I would say this, but if you run a building or a site you should buy it immediately. Everything in this post came out of data it had been collecting for months before I thought to look.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;sensor&lt;/th&gt;
&lt;th&gt;what it reports&lt;/th&gt;
&lt;th&gt;in the log from&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;temperature and humidity (Sonoff SNZB-02P)&lt;/td&gt;
&lt;td&gt;on change, about every five to ten minutes&lt;/td&gt;
&lt;td&gt;17 April&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;door contact (SNZB-04P)&lt;/td&gt;
&lt;td&gt;open or shut, on change and hourly&lt;/td&gt;
&lt;td&gt;30 July&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;motion (SNZB-03P)&lt;/td&gt;
&lt;td&gt;occupied or not&lt;/td&gt;
&lt;td&gt;30 July&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;smart plug, with a lamp on it&lt;/td&gt;
&lt;td&gt;signal strength only&lt;/td&gt;
&lt;td&gt;30 July&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;OpenWeatherMap&lt;/td&gt;
&lt;td&gt;outside temperature and humidity, every twelve minutes&lt;/td&gt;
&lt;td&gt;17 April&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Averaged into hours, that is 4,426 hours with both a room reading and an outside reading, from 17 April to 3 November. The weather comes from a point in east London about 45 miles away, because that is where the hub's location was set, so "outside" below means roughly the right part of England. The weather feed went quiet from 19 to 29 June and the hub was offline from 20 to 24 September. The office also flooded on 4 September, which comes back at the end.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstepinto.dev%2Fcharts%2Foffice-months.svg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstepinto.dev%2Fcharts%2Foffice-months.svg" alt="The office, every day from 17 April to 3 November 2026" width="720" height="380"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Every day in the log. The bars are the room's daily range, the blue line its daily mean, and the grey line the mean outside. From May to August the outside mean swings between about 8 and 28 degrees and the room barely notices. The flood arrives on 4 September and the door is propped open on the 7th, where it stays until 2 November.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://stepinto.dev/data/office-months.csv" rel="noopener noreferrer"&gt;Download the data (CSV)&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the simulated room the log had three fields: the room, the outside, and whether the heater was on. This log has the first two and nothing in the third. The building runs the heating and doesn't tell Unimo, and the only thing in the room I can switch is a lamp.&lt;/p&gt;

&lt;h2&gt;
  
  
  What three weights make of it
&lt;/h2&gt;

&lt;p&gt;With no heater column, the &lt;a href="https://stepinto.dev/posts/world-models-103/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror"&gt;103&lt;/a&gt; model drops to three weights: the room, the outside and a bias. Fitted to the 2,895 hourly transitions before the flood, with the inputs centred and scaled as in 104, it learns that the room loses 0.025 degrees an hour for every degree it sits above 21, and gains 0.0012 an hour for every degree the outside is above 14. In the simulation those two numbers were equal and opposite. Here the outside barely registers, and the model says this room settles at about 22 degrees whatever the weather does.&lt;/p&gt;

&lt;p&gt;That is a building with a thermostat, read straight from the logs, and three weights can't say anything more about it. Scored one hour ahead, the model's error is 0.407 degrees. Guessing "the same as now" every hour gets 0.410.&lt;/p&gt;

&lt;h2&gt;
  
  
  One private field
&lt;/h2&gt;

&lt;p&gt;The model from 104, with the heater input taken out, keeps one number to itself. &lt;code&gt;act&lt;/code&gt; predicts the next hour from the room, the outside and that number. &lt;code&gt;observe&lt;/code&gt; updates the number from what the room just did.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="nf"&gt;act&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Hour&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;number&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;inputs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;w&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;base&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;room&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;room&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;outside&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;outside&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;bias&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;extra&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;fieldRoom&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;room&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;fieldOutside&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;outside&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;fieldBias&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;roomTemp&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;base&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="kc"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;#&lt;span class="n"&gt;field&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;extra&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nf"&gt;observe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Hour&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;nextState&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Hour&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;inputs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;w&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;change&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;nextState&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;roomTemp&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;roomTemp&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kc"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;#&lt;span class="n"&gt;field&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;tanh&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;uField&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="kc"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;#&lt;span class="n"&gt;field&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;uRoom&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;room&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;uOutside&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;outside&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;uChange&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;change&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;uBias&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each local day is an episode, so the field starts at zero at midnight, and training walks each day forwards and back as in 104. Eleven weights, 126 days, three thousand epochs, 0.3 seconds. On those days its one-hour error is 0.276, a third lower than the three-weight model's.&lt;/p&gt;

&lt;p&gt;The field isn't labelled, so to see what it learned I averaged it by hour of day.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstepinto.dev%2Fcharts%2Foffice-morning.svg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstepinto.dev%2Fcharts%2Foffice-morning.svg" alt="What an average hour does to the room, by time of day" width="720" height="440"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Top: the average change in the room over the next hour, by local time. From April to August it cools by about a tenth of a degree an hour overnight, then warms by 0.74 degrees in the hour from 07:00 and 0.67 in the hour from 08:00. In October the warm-up comes an hour later and ends sooner. Bottom: the private field, averaged the same way. It sits near zero all day except the morning.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://stepinto.dev/data/office-morning.csv" rel="noopener noreferrer"&gt;Download the data (CSV)&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The field sits near zero overnight and through the afternoon, and drops to -0.52 at 08:00. The top half of the chart shows why. Something warms this room by about three-quarters of a degree an hour every morning, Saturdays and Sundays included. It is the largest single thing that happens to the room, and nothing in the log records it. I didn't know it was there until the field pointed at it.&lt;/p&gt;

&lt;p&gt;The weights say how. An hour that warmed pushes the field negative, and a negative field adds warmth to the next hour's prediction: at -0.5, about two-thirds of a degree, which is the size of the warm-up. The field has almost no memory, so it reads each hour fresh. That suits a warm-up that lasts two or three hours and stops.&lt;/p&gt;

&lt;h2&gt;
  
  
  Is it just learning the clock?
&lt;/h2&gt;

&lt;p&gt;A warm-up at the same time every day is a timetable, and the obvious way to model a timetable is to hand the model the clock. So I fitted one more model: room, outside, and a separate bias for every hour of the day, 25 weights by least squares. If the field is only rediscovering the time of day, this timetable model should do as well.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;one hour ahead, rms error in degrees&lt;/th&gt;
&lt;th&gt;hours&lt;/th&gt;
&lt;th&gt;same as now&lt;/th&gt;
&lt;th&gt;three-weight&lt;/th&gt;
&lt;th&gt;timetable&lt;/th&gt;
&lt;th&gt;latent&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;April to August (fitted)&lt;/td&gt;
&lt;td&gt;2,895&lt;/td&gt;
&lt;td&gt;0.410&lt;/td&gt;
&lt;td&gt;0.407&lt;/td&gt;
&lt;td&gt;0.324&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0.276&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;the flood, 4 to 20 September&lt;/td&gt;
&lt;td&gt;322&lt;/td&gt;
&lt;td&gt;0.599&lt;/td&gt;
&lt;td&gt;0.596&lt;/td&gt;
&lt;td&gt;0.517&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0.508&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;drying out, 24 September to 6 October&lt;/td&gt;
&lt;td&gt;274&lt;/td&gt;
&lt;td&gt;0.656&lt;/td&gt;
&lt;td&gt;0.650&lt;/td&gt;
&lt;td&gt;0.547&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0.518&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;October&lt;/td&gt;
&lt;td&gt;599&lt;/td&gt;
&lt;td&gt;0.417&lt;/td&gt;
&lt;td&gt;0.423&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0.380&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;0.402&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Mostly, yes. The timetable model gets most of the way, from 0.410 to 0.324. The field takes it on to 0.276, because it reacts to the hour the warm-up actually starts, which varies from day to day.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstepinto.dev%2Fcharts%2Foffice-days.svg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstepinto.dev%2Fcharts%2Foffice-days.svg" alt="One June day and one October day, an hour at a time" width="720" height="430"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Two days, one hour at a time. Each dot is a model's prediction for that hour, made from the reading an hour earlier. Left, Thursday 18 June: the warm-up starts at 07:00, the three-weight model trails it by an hour all morning, and the latent model catches it from the second hour, once its field has dropped to -0.72. Right, Thursday 22 October: the room is four degrees colder, the warm-up is sharper and shorter, and the field keeps adding warmth after the warm-up has eased off.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://stepinto.dev/data/office-days.csv" rel="noopener noreferrer"&gt;Download the data (CSV)&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;These two days are from the middle of their months, not the best of them. On 18 June the first hour of the warm-up catches both models out, as step 11 did in 104, because nothing has happened yet for the field to read. From the second hour the field has seen the room move. Across April to August, the error for the hour from 08:00 drops from 1.02 degrees to 0.52.&lt;/p&gt;

&lt;p&gt;The timetable model works because I already knew to give it the hour of day. The field was never given the time.&lt;/p&gt;

&lt;h2&gt;
  
  
  The door it ignored
&lt;/h2&gt;

&lt;p&gt;The door is the one thing in the log the model is never shown, which makes it an answer key. If the field had picked up the door, it would differ between hours with the door open and hours with it shut. It doesn't: -0.052 over the 1,121 open hours, -0.046 over the 901 shut ones.&lt;/p&gt;

&lt;p&gt;In fairness to the field, the door gave it nothing to find. It opens onto an inside corridor that is probably the same temperature as the room, and in the hourly log it changes state twice in fourteen weeks: open on 7 September, shut on 2 November. 104's door moved 310 times in 4,800 steps. Given the door as an input, the timetable model concludes that the room follows the outside temperature slightly less while the door is open. An open door doesn't do that. The autumn arrived the same week, and with only two changes in the log there is no telling the door's effect from the season's.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where it stops
&lt;/h2&gt;

&lt;p&gt;October is the one stretch where the timetable model does better, 0.380 against 0.402. The right-hand day shows why. The room sits near 17 degrees, colder than the summer that taught the model this room drifts back towards 22, and the warm-up comes as one sharp hour rather than two or three steady ones. The field switches on at 09:00, exactly as summer taught it, and adds a summer warm-up to hours that no longer have one: 20.4 predicted for a room that reached 19.5. Refitting on all six months only brings October to 0.378. A single field can't represent both the summer warm-up and the October one.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to log
&lt;/h2&gt;

&lt;p&gt;I added a door sensor because I could picture a door changing a room. I didn't add anything for the heating because I don't control it and couldn't picture it.&lt;/p&gt;

&lt;p&gt;So log the plain readings densely and for a long time, and let a model with a little private state show where the unexplained behaviour is. Then go and find out what it is. I still don't know what warms this office at eight every morning. A timer on the building's heating would do it, and so would the sun through an east-facing window. The field can't tell me which. What it gave me is a precise question, about three-quarters of a degree an hour starting at 07:00 in summer and 08:00 in October, which is far more than the door sensor ever told me.&lt;/p&gt;

&lt;h2&gt;
  
  
  The flood
&lt;/h2&gt;

&lt;p&gt;The temperature model barely noticed the flood. The flood is in the humidity, which none of these models reads. From about two in the morning on 4 September, with nobody in the office until 06:27, the room's humidity climbed from 66.8 percent to 76.5, and by the next day its air held 5.7 grams of water per cubic metre more than the outside air, against a summer range of -2.5 to +3.4. Whether a model watching that column would have raised the alarm before anyone walked in is a question for the monitor in the next post, and the office is where it gets tested.&lt;/p&gt;

&lt;h2&gt;
  
  
  Running it yourself
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;node --no-warnings tools/office_fit.ts&lt;/code&gt; reads &lt;a href="https://stepinto.dev/data/office-hourly.csv" rel="noopener noreferrer"&gt;office-hourly.csv&lt;/a&gt;, fits all four models, prints every number in this post and writes the CSVs behind the charts. &lt;code&gt;tools/office_export.sh&lt;/code&gt; shows how the CSV was made from the hub's databases. I left the motion sensor out of the published data, since it is a record of when I'm at my desk, and the weather rows went in without their coordinates. A different seed finds different weights and the same two results.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;First published on &lt;a href="https://stepinto.dev/posts/world-models-105/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror"&gt;stepinto.dev&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>worldmodels</category>
      <category>typescript</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>Fair Isle Has Two Rules, and the Second Fills Every Corner</title>
      <dc:creator>Andy Cross</dc:creator>
      <pubDate>Sat, 28 Nov 2026 06:33:11 +0000</pubDate>
      <link>https://dev.to/stepinto/fair-isle-has-two-rules-and-the-second-fills-every-corner-mhm</link>
      <guid>https://dev.to/stepinto/fair-isle-has-two-rules-and-the-second-fills-every-corner-mhm</guid>
      <description>&lt;p&gt;&lt;a href="https://stepinto.dev/art/fairisle.html" rel="noopener noreferrer"&gt;Fair Isle&lt;/a&gt; is the newest pattern piece, and the second made of cloth after &lt;a href="https://stepinto.dev/patterns/sashiko-a-stone-screen-and-tartan-each-made-from-one-simple-rule/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror"&gt;Tartan&lt;/a&gt;. It is stranded knitting from Shetland: bands of small repeating motifs, two colours in every row, the colours changing every few rows. You pick a cloth or write one as a line of text, and the page knits it for as far as you care to drag.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcvjv5naieaacxqzpmpbz.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcvjv5naieaacxqzpmpbz.webp" alt="Three tall panels of knitted cloth in bands. The first has red diamonds and crosses shading to gold on cream above blue stars, the second has pale stars and blocks on navy, the third has lilac snow crystals on purple above cream diamonds on green." width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Three of the presets: madder and indigo, sea, and heather. Each is a few bands repeated down the cloth.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  A cloth is a stack of bands
&lt;/h2&gt;

&lt;p&gt;Fair Isle is the southernmost island of Shetland, about halfway to Orkney, and this way of knitting is named after it. The cloth is built in horizontal bands. The wide ones are a dozen or so rows of a large motif. Between them are narrow bands of one to five rows that Shetland calls peeries, peerie being the word for small. Each band is one small chart repeated all the way round the body.&lt;/p&gt;

&lt;p&gt;The page writes a cloth as its bands from the top down. The first preset is &lt;code&gt;oxo13 zig star11 seed&lt;/code&gt;: the O and the X over thirteen rows, a three-row zigzag, a star over eleven rows and a three-row scatter of single stitches. With a plain row after each band that comes to 34 rows, and then the cloth starts again. A wide band takes its number of rows after its name, any odd number from 7 to 21. There are five wide bands (oxo, star, diamond, flake and tile) and ten peeries, and the advanced tab lists them when its text box is empty. The text goes in the address as &lt;code&gt;?bands=&lt;/code&gt;, so a cloth can be sent as a link.&lt;/p&gt;

&lt;p&gt;A chart is drawn on squared paper, one square for each stitch. In the code it is a list of strings, with a dot for the ground and an X for the pattern. This one is &lt;code&gt;zig&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;..X.
.X.X
X...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The wide bands aren't typed out. Each is a rule on how far a stitch is from the middle of the motif, across and up, so the same rule gives the band at 7 rows or at 21, and every motif has the eight symmetries of a square. The O is the stitches whose two distances add up to the half-width or one less, with smaller rings inside it. The snow crystal should have six arms and has eight, because eight is what a square grid gives.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs5k72axrho50wyxwpdit.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs5k72axrho50wyxwpdit.webp" alt="On the left, squared paper with a diamond ring and a cross filled in as dark red squares. On the right, the same shapes knitted in dark red on cream wool, each square now a V and the whole band less tall." width="800" height="310"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The O and the X at thirteen rows: the chart, 27 stitches wide, and the same chart knitted in two flat colours.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Two colours a row, and nowhere far to carry them
&lt;/h2&gt;

&lt;p&gt;Two rules separate Fair Isle from other colourwork. The first is that a row has two colours and no more. The knitter carries both along the row, often one in each hand, and knits each stitch with whichever colour the chart asks for.&lt;/p&gt;

&lt;p&gt;The second rule follows from the first. The colour that isn't being knitted runs loose across the back of the cloth until it is wanted again. That loose strand is called a float, and a long float catches a finger every time the jumper goes on. The usual advice is to keep a float to about an inch. The page's limit is seven stitches.&lt;/p&gt;

&lt;p&gt;A star thirteen rows high is thirteen stitches wide, and its top row has a single stitch of pattern. Knitted on its own, that row would leave the pattern colour floating behind thirteen stitches of ground. So no Fair Isle motif stands alone on its ground, and the corners between two stars always have something in them.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu1zi0ce4wlkb67q4yxtu.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu1zi0ce4wlkb67q4yxtu.webp" alt="Two bands of navy stars on pale blue wool. On the left the stars stand apart with long plain stretches between their points. On the right small clusters of navy stitches fill the gaps between the stars at the top and bottom of the band." width="800" height="280"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The thirteen-row star as its bare shape, with floats of up to 13 stitches, and with its corners filled until none is longer than 7.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The module fills the corners the same way. Every wide band starts as its bare shape, and &lt;code&gt;floatsOf&lt;/code&gt; measures the longest float as the chart repeats, counting across the join between one repeat and the next. If the float is over seven, rings of alternate stitches are added in the corners, where four motifs meet, and at the middle of each side. The rings grow one step at a time and stop as soon as the longest float is seven or less, so a band gets no more filling than it needs. The thirteen-row star goes from a longest float of 13 to one of 7.&lt;/p&gt;

&lt;p&gt;Under the text box the page prints the longest float of the cloth you have written. The tests check both rules for every peerie, and for every wide band at every height from 7 to 21 rows. They also knit a cloth in each of the six wools and count the colours in every row.&lt;/p&gt;

&lt;h2&gt;
  
  
  The colours change on every row
&lt;/h2&gt;

&lt;p&gt;Two colours a row says nothing about which two. Both can change on any row, and in Fair Isle they do. Here the ground and the pattern each step through a few shades from the edge of a band to its middle row and back. In the middle row of a wide band the pattern is knitted in one bright colour that the wool uses nowhere else.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fivo2d2p5zc07ccfrbvjm.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fivo2d2p5zc07ccfrbvjm.webp" alt="The same knitted cloth twice. On the left every band is one flat red, green or blue on cream. On the right the red band warms to orange on a gold ground at its middle, and the blue band pales to sky blue with a row of gold stitches." width="800" height="360"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The first preset with shading off and on. The pattern is the same stitch for stitch.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Each wool on the page is a dye lot: a base colour for the plain rows, the bright colour for the middle row, and three sets of shades, each with a run for the ground and a run for the pattern. The wide bands take the sets in turn, which is why the O and the X come out in madder red on gold and the star below them in indigo. "Shade each band" in the advanced tab turns the stepping off, and the cloth goes flat.&lt;/p&gt;

&lt;p&gt;There are six wools: madder, undyed Shetland, sea, heather, yule and this site's own colours. The names describe the colours and aren't dyers' records. The motifs were made by rule on squared paper, and none was copied from a pattern book.&lt;/p&gt;

&lt;h2&gt;
  
  
  Every stitch is a V
&lt;/h2&gt;

&lt;p&gt;Fair Isle is knitted in the round, so the knitter only ever makes knit stitches, and from the front each one is a V. A column of stitches is a stack of chevrons. Where the colour changes along a row the edge is a zigzag, and where it changes between rows the points of one colour hang down into the next.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhyrwiwaeskzg24yx1b39.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhyrwiwaeskzg24yx1b39.webp" alt="A close view of knitted stitches, each a V of two round strands. Red, gold, cream, green and blue stitches meet along zigzag edges." width="800" height="320"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The first preset at 44 pixels a stitch.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;paintKnit&lt;/code&gt; draws exactly that. A stitch is one unit wide and 0.8 high, and the point of the V hangs 0.6 of a row below its shoulders. A stitch is wider than it is tall, which is why the chart on squared paper further up comes out squatter in wool. A run of one colour along a row is drawn as a single shape, with the zigzag along its top and the same zigzag along its bottom. Over the colour goes one small tile of shading, repeated for every stitch: each leg of the V is round across its width and dark where it tucks under the row above, with the slant of the plies across it. Last comes a tile of loose fibres for the halo of the wool, which the "halo" slider fades.&lt;/p&gt;

&lt;p&gt;My first version put every run of a colour into one path for the whole cloth, and filling that path took 2.3 seconds at five pixels a stitch. Filling the same shapes six rows at a time takes about 150 milliseconds. Below four pixels a stitch the Vs aren't drawn, and the cloth is painted at one pixel a stitch and scaled up.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bands nobody charted
&lt;/h2&gt;

&lt;p&gt;A &lt;code&gt;?&lt;/code&gt; in the text is a wide band made from the seed. The module makes two short strings of random bits. It reads one by the sum of a stitch's two distances from the middle and the other by their difference, which is reading along the two diagonals. A stitch is in the pattern where the two bits disagree. Reading along diagonals gives lozenges and saltires, the shapes the big Fair Isle bands are made of. The module tries up to sixty pairs of strings and keeps the first whose longest float is seven or less. For the forty seeds and three heights in the tests, it always finds one.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdxz0osl7j4553tsuhd16.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdxz0osl7j4553tsuhd16.webp" alt="Three tall panels of knitted cloth. The first has unfamiliar red, blue and green motifs with small zigzags between, the second is narrow bands only with rows of green hearts, the third is brown and grey diamonds on undyed cream." width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;By rule (three bands from the seed 2026), peeries only, and naturals.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The "by rule" preset is three of these bands with peeries between them. The double tap writes a new cloth: two to four wide bands, some charted and some not, each followed by a peerie or two.&lt;/p&gt;

&lt;p&gt;A real jumper has things the page doesn't. There is no corrugated ribbing, no steek (the extra stitches that are cut open for the armholes) and no yoke that narrows towards the neck.&lt;/p&gt;

&lt;h2&gt;
  
  
  In the package
&lt;/h2&gt;

&lt;p&gt;The knitting is &lt;code&gt;azulejeria/knit&lt;/code&gt;, new in &lt;a href="https://www.npmjs.com/package/azulejeria" rel="noopener noreferrer"&gt;azulejeria&lt;/a&gt; 2.8.0. Charts, bands, the float check and &lt;code&gt;knitPixels&lt;/code&gt;, which fills a cloth at one pixel a stitch, need no page, so their tests run in Node, as the loom's do.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;First published on &lt;a href="https://stepinto.dev/patterns/fair-isle-has-two-rules-and-the-second-fills-every-corner/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror"&gt;stepinto.dev&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>art</category>
      <category>generative</category>
      <category>canvas</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Article 6 of the EU AI Act Leaves Four Ways Out of High-Risk</title>
      <dc:creator>Andy Cross</dc:creator>
      <pubDate>Fri, 27 Nov 2026 06:33:08 +0000</pubDate>
      <link>https://dev.to/stepinto/article-6-of-the-eu-ai-act-leaves-four-ways-out-of-high-risk-10de</link>
      <guid>https://dev.to/stepinto/article-6-of-the-eu-ai-act-leaves-four-ways-out-of-high-risk-10de</guid>
      <description>&lt;p&gt;Article 6 is the classification rule of the EU AI Act. It decides which AI systems have to meet the high-risk requirements in Chapter III, and which providers and deployers take on the duties that go with them, such as risk management, logging, human oversight and conformity assessment. The Digital Omnibus moved the dates in July: the rules now apply from 2 December 2027 to the uses listed in Annex III (recruitment, credit scoring, education, essential services and the rest), and from 2 August 2028 to AI that is a regulated product or a safety component of one. Where the provider is based makes no difference. The Act covers any provider that places a system on the EU market or puts it into service there, and a provider or deployer outside the EU when the system's output is used in the EU. A UK product can be covered either way, although &lt;a href="https://stepinto.dev/ai-law/the-eu-has-an-ai-act-the-uk-has-regulators-and-no-bill/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror"&gt;the UK has no equivalent rule&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The article gives two routes into high-risk. One is for AI that is a safety component of a regulated product such as a machine, a lift or a medical device, or is such a product itself. The other is for systems whose intended purpose is one of the Annex III uses. Paragraph 3 then lets some Annex III systems back out, if they meet one of four conditions and do not profile people. The Commission's draft guidelines treat one condition as enough, provided it is read narrowly, with no further risk test on top. The final guidelines could change that. Nobody approves the answer in advance. The provider makes the assessment itself, writes it down, registers the system, and can be asked to hand the reasoning to a regulator later.&lt;/p&gt;

&lt;p&gt;The page works like &lt;a href="https://stepinto.dev/ai-law/article-50-of-the-ai-act-annotated-clause-by-clause/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror"&gt;the Article 50 page&lt;/a&gt;. The article is below, verbatim, with every clause selectable. Each clause has a plain reading, and notes of five kinds on top: what it changes in software, what is contested, what the Commission's guidance says, where it connects to the rest of the law, and dates. Every clause and every note has its own link.&lt;/p&gt;

&lt;p&gt;Paragraph 5 told the Commission to publish guidelines on this article by 2 February 2026. It published a &lt;a href="https://digital-strategy.ec.europa.eu/en/library/draft-commission-guidelines-classification-high-risk-ai-systems" rel="noopener noreferrer"&gt;draft for consultation&lt;/a&gt; on 19 May, and the draft was still the only version when I checked on 26 November. The Commission says the final text will be adopted by the end of 2026. The notes cite the draft by paragraph number, because it is the most detailed statement there is of how the Commission reads the four conditions, and I will add dated notes when the final version changes anything.&lt;/p&gt;

&lt;p&gt;If you only open three clauses, make them these. The preparatory task condition is the one most document and retrieval tools will rely on, and the draft guidelines say where it stops: at a recommendation about the individual case. The profiling rule removes all four conditions from any system that evaluates a person from their data, which is most of what Annex III is about. And the duty to document the assessment applies to a provider that relies on one of the four conditions. The Act asks for no such record from anyone else, but I would keep one in the repository whichever way the answer comes out.&lt;/p&gt;

&lt;p&gt;Two notes are written for people who build on model APIs. Article 6 as a function is the article in twenty lines of Python, as the Commission's draft guidelines read it, with the hard part left as five inputs you have to fill in honestly. The note on general-purpose products covers assistants and agent platforms: a line in the terms of service saying "not for recruitment" does not keep recruitment out of your intended purpose if the rest of your material invites it.&lt;/p&gt;

&lt;p&gt;The notes keep growing after today. Each one is dated, and the log at the foot of the page lists what was added when.&lt;/p&gt;

&lt;p&gt;This is an engineer's reading and no substitute for legal advice. It has not yet been reviewed by a lawyer, and corrections will appear in the notes with their dates.&lt;/p&gt;

&lt;p&gt;AI was used to help produce this page, in its layout and in drafting the text.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;First published on &lt;a href="https://stepinto.dev/ai-law/article-6-of-the-eu-ai-act-leaves-four-ways-out-of-high-risk/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror"&gt;stepinto.dev&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>europe</category>
      <category>regulation</category>
      <category>compliance</category>
    </item>
    <item>
      <title>Sashiko, a Stone Screen and Tartan, Each Made From One Simple Rule</title>
      <dc:creator>Andy Cross</dc:creator>
      <pubDate>Thu, 26 Nov 2026 06:33:28 +0000</pubDate>
      <link>https://dev.to/stepinto/sashiko-a-stone-screen-and-tartan-each-made-from-one-simple-rule-d72</link>
      <guid>https://dev.to/stepinto/sashiko-a-stone-screen-and-tartan-each-made-from-one-simple-rule-d72</guid>
      <description>&lt;p&gt;Every pattern piece on this site so far has been a wall: tiles, glaze, clay, cement, a grille in front of whitewash. The three newest leave the wall. &lt;a href="https://stepinto.dev/art/hitomezashi.html" rel="noopener noreferrer"&gt;Hitomezashi&lt;/a&gt; is a running stitch on indigo cotton, &lt;a href="https://stepinto.dev/art/jali.html" rel="noopener noreferrer"&gt;Jali&lt;/a&gt; is a stone screen and the light it lets onto the floor, and &lt;a href="https://stepinto.dev/art/tartan.html" rel="noopener noreferrer"&gt;Tartan&lt;/a&gt; is wool on a loom. Each one is still a rule, and in two of them the rule was worth moving into the engine.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbcwdu7vdsa69ye4u2i06.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbcwdu7vdsa69ye4u2i06.webp" alt="Three tall panels side by side: white running stitches on indigo cotton making stepped crosses, a pointed arch of red sandstone pierced with stars and hexagons with sunlight lying across a tiled floor, and a red tartan with green, blue, yellow and white lines." width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Hitomezashi with the words sevilla and acapulco, Jali at half past nine in the morning, and Royal Stewart on the loom.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Two words and a running stitch
&lt;/h2&gt;

&lt;p&gt;Hitomezashi is the sashiko pattern made of one stitch. A grid has a running stitch along every row and every column, and the only decision is whether each line starts with a stitch or a gap. That is one bit per row and one bit per column, so the whole design is two strings of bits.&lt;/p&gt;

&lt;p&gt;The page takes two words and turns them into those bits. A vowel is a 1 and a consonant is a 0, so "sevilla" across is 0101001 and "acapulco" down is 10101001, and the bits repeat for as long as the cloth goes on. In the advanced tab a letter can instead be five bits, its place in the alphabet. Noughts and ones are taken as typed, which is how the plain patterns are made: 01 both ways gives stairs, 0110 gives crosses.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6kdrevioo885iayjuao4.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6kdrevioo885iayjuao4.webp" alt="Three panels of running-stitch patterns: white stair steps on blue-black, red crosses on indigo, and cream meanders on brown cloth." width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Stairs (01 and 01), crosses (0110 both ways) and needle and thread at five bits a letter.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Row j has a stitch from i to i + 1 when i plus the row's bit is odd, and the columns work the same way turned. The stitches never cross each other, so the cloth falls into regions, and the "two tones" switch shades them alternately. The tone of a square is the number of stitches you cross walking to it from the origin, counted odd or even. The page works that out from running counts of the bits, so shading a square costs no more than drawing it.&lt;/p&gt;

&lt;p&gt;Each stitch is a short round thread with a hole at either end where it goes through, a shadow on the cloth, a lit top and the slanted marks of the ply. The cloth is a plain weave with clouds where the dye took more or less, and the odd slub. Boro lays the cloth down as patches of different blues before it is stitched. The &lt;a href="https://stepinto.dev/patterns/iron-and-silk/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror"&gt;Mantón de Manila&lt;/a&gt; has a sheen pass that I thought this might use, but cotton is matt, so it doesn't.&lt;/p&gt;

&lt;p&gt;The presets are named for what they look like. I have not checked the traditional Japanese names against a pattern book, so I left them off. The words go in the address as &lt;code&gt;?rows=&lt;/code&gt; and &lt;code&gt;?cols=&lt;/code&gt;, so a cloth made from two names can be sent as a link.&lt;/p&gt;

&lt;h2&gt;
  
  
  Light through a stone screen
&lt;/h2&gt;

&lt;p&gt;A jali is a pierced stone screen, the window of the Mughal buildings at Fatehpur Sikri, Agra and Ahmedabad: a slab of sandstone or marble with a pattern cut right through it. It is seen two ways at once. From inside the room the stone is dark against the sky in every opening, and on the floor the same pattern lies in sunlight, stretched by the angle of the sun and sliding across the flags through the day.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fz478mgfyfr5m11o26vmk.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fz478mgfyfr5m11o26vmk.webp" alt="The inside of a dark red sandstone room. A pointed arch screen pierced with six-pointed stars and hexagons glows with sky, and a long patch of star-shaped light lies across the tiled floor to the right." width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The sikri preset: red sandstone, stars and hexagons, mid morning, with the sun low on the left throwing the pattern to the right.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The page is the inside of that room. The wall faces you with the screen on a sill, either an arch or a rectangle, and the floor runs back towards you from an eye fifteen units away from the wall. A point on the floor Y units out from the wall is drawn D / (D − Y) times further from the middle of the picture, and lower by the same factor, and that is the whole of the perspective.&lt;/p&gt;

&lt;p&gt;Every opening is a polygon. There are four patterns: six-pointed stars with hexagons between them, a honeycomb, octagons with squares, and eight-pointed stars with lozenges. Each is a lattice of shapes at the size where they would touch, shrunk about their middles by the "open" slider, and what is left between them is the stone. On the wall each opening is filled with sky. On the floor each corner of each opening is thrown along the sun's ray to where it lands and then drawn through the eye.&lt;/p&gt;

&lt;p&gt;The slab has a thickness. Light only reaches the floor if it gets through both faces of an opening, and with a low sun the back face is shifted sideways from the front one. The light on the floor is the opening intersected with itself moved by that shift, and the part that falls short lights the side of the cut instead. A thick slab at a low sun closes the screen almost completely.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftp9q803fxx2z5aqt26sa.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftp9q803fxx2z5aqt26sa.webp" alt="Two rooms side by side. On the left a white marble arch pierced with a honeycomb, with its light in a small pool on a black and white floor directly below. On the right a rectangular red sandstone screen with small openings and no light on the floor." width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Agra at noon, with the light falling straight down, and the zenana screen, whose slab is thick enough to keep the late morning sun off the floor.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The sun comes from the engine. &lt;a href="https://stepinto.dev/patterns/light-on-brick-paint-on-cream/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror"&gt;Sebka&lt;/a&gt; cast the first shadows, of brick courses standing proud of a wall, and &lt;a href="https://stepinto.dev/patterns/iron-and-silk/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror"&gt;Rejería&lt;/a&gt; cast the second, of iron in front of whitewash. Both carried their own copy of the code. Jali was the third page to want it, so it moved into the package as &lt;code&gt;azulejeria/shadow&lt;/code&gt;: &lt;code&gt;sunOf(hour)&lt;/code&gt; gives the sun's slant, its height and the colour of the light and the shade, and &lt;code&gt;castShadow&lt;/code&gt; draws a caster on a layer, cuts back out whatever must stay lit, blurs it and multiplies it onto the page. Sebka and Rejería now use it too, and I compared seven canvas hashes before and after to check they render exactly as they did.&lt;/p&gt;

&lt;p&gt;The shade is blue because what the sun doesn't reach is lit by the sky, and it gets bluer as the sun gets lower and warmer. In Jali the whole wall is the caster and the openings are the cut, which is the reverse of Sebka, where the bricks are the caster and everything else is lit.&lt;/p&gt;

&lt;p&gt;The stones are red sandstone, white Makrana marble (the marble of the Taj Mahal), buff and a Jaisalmer yellow. Floral jalis are not built, and nor is a screen cut to one of the wallpaper groups from the &lt;a href="https://stepinto.dev/patterns/the-seventeen-ways-a-wall-can-repeat/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror"&gt;seventeen ways a wall can repeat&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  A sett is read twice
&lt;/h2&gt;

&lt;p&gt;A tartan is written down as a sett, a string of colours and thread counts. "K4 R24 K24 Y4" is four threads of black, twenty-four of red, twenty-four of black and four of yellow. The weaver warps the loom in that order, turning back at each end so the stripes mirror, and then weaves the weft in the same order. Nothing else is decided.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Falty0wf7vlsjaceb72aq.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Falty0wf7vlsjaceb72aq.webp" alt="A close-woven tartan of dark blue, black and green squares crossed by fine diagonal hatching where the colours mix." width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Black Watch, B/24 K4 B4 K4 B4 K20 G24 K6 G24 K20 B24 K4 B/4, in 2/2 twill.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Where red crosses red the cloth is red, but where red crosses black it is neither. Tartan is a 2/2 twill: each thread goes over two and under two, one step along from its neighbour, so where two colours cross they show in fine diagonal lines, half and half. Six colours in a sett make twenty-one in the cloth, and fifteen of them are mixtures your eye makes out of hatching.&lt;/p&gt;

&lt;p&gt;A weaving draft is a small program in three parts. The threading says which shaft each warp thread goes through, the tie-up says which shafts each treadle lifts, and the treadling says which treadle is pressed for each pass of the weft. Where a thread's shaft is lifted the warp lies on top; everywhere else the weft does. That is the whole of the structure, and in the new &lt;code&gt;azulejeria/loom&lt;/code&gt; module it is one function, &lt;code&gt;lifted(draft, i, j)&lt;/code&gt;. The 2/2 twill comes out as this, one row per pass:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1100
0110
0011
1001
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The module has six drafts (plain, twill, drill, herringbone, diamond and basket), a parser for setts, and three sets of dyes: modern, ancient and weathered. &lt;code&gt;weavePixels&lt;/code&gt; weaves a window of cloth at one pixel a crossing without needing a page, so the rule has tests that run in Node. The page weaves at one pixel a thread, draws that up to size without smoothing, blurs it a little for the nap of the wool, and lays a tile of thread and fibre over the top.&lt;/p&gt;

&lt;p&gt;A sett turns back at both ends unless it has "..." in it, in which case it just repeats. "warp | weft" gives the weft a sett of its own, which is what tweed needs. Houndstooth is four black and four white repeating, in the same twill, and nothing more. "On the bias" hangs the cloth at 45°.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3hlk0kvz0h8v831twp3n.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3hlk0kvz0h8v831twp3n.webp" alt="Three panels of woven cloth: a black and white houndstooth, a grey herringbone tweed with a faint brown line, and a navy tartan with sky blue and violet lines hung on the diagonal." width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Houndstooth (K4 W4, repeating), tweed (a herringbone with a dark warp and a pale weft), and this site's colours as a sett, on the bias.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Black Watch is 304 threads to the repeat and Royal Stewart is 190, most of them red. I took both counts from tartan sellers' pages and haven't checked them against the Scottish Register of Tartans. The double tap gives you a sett nobody has registered: two grounds in broad bands with thin lines over them. Kente and Mallorcan ikat should follow from the same module, but both need a weft that isn't a repeat, and the loom doesn't do that yet.&lt;/p&gt;

&lt;h2&gt;
  
  
  In the package
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;azulejeria/shadow&lt;/code&gt; and &lt;code&gt;azulejeria/loom&lt;/code&gt; are in &lt;a href="https://www.npmjs.com/package/azulejeria" rel="noopener noreferrer"&gt;azulejeria&lt;/a&gt; 2.7.0. Hitomezashi put nothing into the package: its rule is short and no other page uses it yet.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;First published on &lt;a href="https://stepinto.dev/patterns/sashiko-a-stone-screen-and-tartan-each-made-from-one-simple-rule/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror"&gt;stepinto.dev&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>art</category>
      <category>generative</category>
      <category>canvas</category>
      <category>javascript</category>
    </item>
    <item>
      <title>A Claude Client in One C File, and the Library It Pays For</title>
      <dc:creator>Andy Cross</dc:creator>
      <pubDate>Thu, 26 Nov 2026 06:33:23 +0000</pubDate>
      <link>https://dev.to/stepinto/a-claude-client-in-one-c-file-and-the-library-it-pays-for-3dlb</link>
      <guid>https://dev.to/stepinto/a-claude-client-in-one-c-file-and-the-library-it-pays-for-3dlb</guid>
      <description>&lt;p&gt;C has no HTTP client, no TLS and no JSON, so the spec's rule for languages without a transport applies: one named library, and it counts towards size. The library is libcurl, which is what every C program that speaks HTTP has linked for twenty-five years. The JSON is written by hand, because the alternative is a second library and the scanner this protocol needs is ninety lines. The result is the fastest client on the &lt;a href="https://stepinto.dev/claude-hot-path/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror"&gt;leaderboard&lt;/a&gt;, and it got there on the third build, after the first one came in slower than C#.&lt;/p&gt;

&lt;p&gt;The code is at &lt;a href="https://github.com/AndyCross/claude-hot-path/tree/main/clients/c" rel="noopener noreferrer"&gt;github.com/AndyCross/claude-hot-path&lt;/a&gt;, 271 lines once blanks and comments are taken out, built with GCC 14.2 against libcurl 8.23.0, the release from 14 October.&lt;/p&gt;

&lt;h2&gt;
  
  
  One source file, three leaderboard rows
&lt;/h2&gt;

&lt;p&gt;The obvious build is &lt;code&gt;apt-get install libcurl4-openssl-dev&lt;/code&gt; and &lt;code&gt;gcc client.c -lcurl&lt;/code&gt;. That produces a 66 KB binary, the smallest compiled artefact in the series by a factor of seven. It also produces a 3.6 ms cold start, behind Zig, Rust, Go and C# Native AOT, with 12 MB of peak memory.&lt;/p&gt;

&lt;p&gt;The binary is not the program. &lt;code&gt;ldd&lt;/code&gt; on it lists 32 shared libraries: libcurl, OpenSSL, nghttp2 and nghttp3, libssh2, librtmp, LDAP, Kerberos, SASL, GnuTLS and its three dependencies, libidn2, libpsl, zlib, brotli and zstd. Debian's libcurl is built to speak every protocol curl has ever supported, and a program that links it loads all of that before &lt;code&gt;main&lt;/code&gt; runs. The harness sums the libraries a binary links into its runtime column, the same way it prices bash's interpreter and curl's, and the sum is 21.8 MB. The loader resolving those 32 files is where the 3.6 ms goes. The client itself, once running, has the best turnaround on the board.&lt;/p&gt;

&lt;p&gt;The second build compiles curl from source with everything but HTTP switched off, links it statically against Debian's OpenSSL, and links the whole program statically:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;./configure --disable-shared --enable-static --with-openssl \
    --disable-ftp --disable-file --disable-ldap --disable-rtsp --disable-dict \
    --disable-telnet --disable-tftp --disable-pop3 --disable-imap --disable-smb \
    --disable-smtp --disable-gopher --disable-mqtt --disable-proxy --disable-cookies \
    --disable-doh --disable-alt-svc --disable-hsts --disable-websockets --disable-ntlm \
    --without-zlib --without-brotli --without-zstd --without-libidn2 --without-nghttp2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Cold start halves to 2.0 ms and memory to 6 MB. The binary is 7.2 MB, bigger than Go's, and nearly all of it is &lt;code&gt;libcrypto.a&lt;/code&gt;. OpenSSL 3 ships its algorithms as one provider, so a static link that wants TLS 1.3 gets every cipher, every hash and every key format whether the linker can prove them unused or not.&lt;/p&gt;

&lt;p&gt;The third build changes one configure flag, &lt;code&gt;--with-mbedtls&lt;/code&gt; instead of &lt;code&gt;--with-openssl&lt;/code&gt;. mbedTLS is a TLS library written for embedded targets, and it is one of curl's supported backends, so the client's own code does not change at all. The static binary drops to 2.1 MB, the cold start to 1.3 ms, and the total to 2.8 ms, ahead of Rust's 3.2. That is the row on the board. All three are the same 271 lines of C; the language set the floor and the library chose the row.&lt;/p&gt;

&lt;h2&gt;
  
  
  A JSON scanner in ninety lines
&lt;/h2&gt;

&lt;p&gt;Every other client in this series parsed the events into a tree and asked it questions. In C that means picking a JSON library, and the spec allows one named library, which is already spent on the transport. So the scanner is written for this protocol and nothing else: find a key at the top level of an object, hand back a pointer at its value, and decode a string when one is actually wanted.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="c1"&gt;// The value for key in the object at p, or NULL. Keys in this protocol carry&lt;/span&gt;
&lt;span class="c1"&gt;// no escapes, so the comparison is on raw bytes.&lt;/span&gt;
&lt;span class="kd"&gt;static&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="kt"&gt;char&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="kt"&gt;char&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="kt"&gt;char&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;ws&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="s1"&gt;'{'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kt"&gt;size_t&lt;/span&gt; &lt;span class="n"&gt;klen&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;strlen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;ws&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s1"&gt;'"'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="kt"&gt;char&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;k&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;end&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;skip&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;ws&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;end&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="s1"&gt;':'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;ws&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;size_t&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;end&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;klen&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nf"&gt;memcmp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;klen&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;ws&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;skip&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s1"&gt;','&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;ws&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;skip&lt;/code&gt; steps over one complete value, whatever it is, by counting brackets and honouring string escapes, and that is the whole of the parsing. Nested lookups chain: the stop reason is &lt;code&gt;get(get(ev, "delta"), "stop_reason")&lt;/code&gt;, and &lt;code&gt;get&lt;/code&gt; on a NULL returns NULL, so a missing field anywhere in the path reads as absent rather than as a crash. Nothing is copied until &lt;code&gt;json_str&lt;/code&gt; decodes a string into a buffer, which handles &lt;code&gt;\n&lt;/code&gt;, &lt;code&gt;\"&lt;/code&gt;, &lt;code&gt;\uXXXX&lt;/code&gt; and the surrogate pairs that emoji arrive as. Going the other way, &lt;code&gt;quote&lt;/code&gt; escapes a C string into a JSON one for the request bodies, which are assembled with &lt;code&gt;snprintf&lt;/code&gt;-style appends into a growable buffer.&lt;/p&gt;

&lt;p&gt;It is not a JSON parser. It will accept things a parser would reject and it does no validation beyond what finding a key needs. It is also the reason nobody writes clients this way: the ninety lines are fine for a protocol with a dozen known keys, and they would be a liability the day the payloads got interesting. For this spec they are the cheapest code in the file.&lt;/p&gt;

&lt;h2&gt;
  
  
  libcurl hands you the body in pieces
&lt;/h2&gt;

&lt;p&gt;The transport is the easy interface: one handle, a header list, &lt;code&gt;CURLOPT_POSTFIELDS&lt;/code&gt;, and a write callback that libcurl calls with whatever the socket delivered. The callback is the SSE parser:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="kd"&gt;static&lt;/span&gt; &lt;span class="kt"&gt;size_t&lt;/span&gt; &lt;span class="nf"&gt;body&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;char&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;size_t&lt;/span&gt; &lt;span class="n"&gt;size&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;size_t&lt;/span&gt; &lt;span class="n"&gt;nmemb&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;userdata&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;turn&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;userdata&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kt"&gt;size_t&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;size&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;nmemb&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nf"&gt;curl_easy_getinfo&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;curl&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;CURLINFO_RESPONSE_CODE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nf"&gt;put&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nf"&gt;put&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kt"&gt;char&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;start&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;nl&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;nl&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;memchr&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;start&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'\n'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;start&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;nl&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;strncmp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;start&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"data: "&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nf"&gt;event&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;start&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;start&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;nl&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;-=&lt;/span&gt; &lt;span class="n"&gt;start&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nf"&gt;memmove&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;start&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A chunk can end in the middle of a line, so the unfinished tail is kept and the next chunk is appended to it. Every complete &lt;code&gt;data:&lt;/code&gt; line goes to &lt;code&gt;event&lt;/code&gt;, which prints text deltas as they arrive with an &lt;code&gt;fflush&lt;/code&gt; after each, accumulates the &lt;code&gt;input_json_delta&lt;/code&gt; fragments for the tool, and notes the stop reason. The status code is read from the handle on the first callback, so a non-2xx body is collected rather than parsed as events, and &lt;code&gt;error.message&lt;/code&gt; comes out of it afterwards with the same &lt;code&gt;get&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;One handle serves both requests, which is what keeps the connection open between the first reply and the second request. I had a line setting an empty &lt;code&gt;Expect:&lt;/code&gt; header, from the memory of libcurl waiting for a &lt;code&gt;100 Continue&lt;/code&gt; on larger POSTs. The current rule is that it only does that above a megabyte, so the line came out.&lt;/p&gt;

&lt;h2&gt;
  
  
  The tool is fifteen lines, because libc has a timezone database
&lt;/h2&gt;

&lt;p&gt;Rust and Zig had to read the TZif files under &lt;code&gt;/usr/share/zoneinfo&lt;/code&gt; themselves to avoid spawning &lt;code&gt;date&lt;/code&gt;. C's standard library has been reading them since before either language existed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="nf"&gt;setenv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"TZ"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;tz&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nf"&gt;tzset&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;time_t&lt;/span&gt; &lt;span class="n"&gt;now&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;time&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="nf"&gt;tm&lt;/span&gt; &lt;span class="n"&gt;tm&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nf"&gt;localtime_r&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;now&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;tm&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nf"&gt;strftime&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;out&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;sizeof&lt;/span&gt; &lt;span class="n"&gt;out&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"%Y-%m-%dT%H:%M:%S%z"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;tm&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The only work around it is checking that the zone the model asked for is a real file in that directory, because glibc falls back to UTC silently on a name it does not know, and a timezone tool that answers UTC for &lt;code&gt;Europe/Londn&lt;/code&gt; is worse than one that says so. The turnaround column, which is where the tool runs, is 0.67 ms, a shade ahead of Rust's 0.73 and the best on the board.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where the numbers land
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;C&lt;/th&gt;
&lt;th&gt;Rust&lt;/th&gt;
&lt;th&gt;Zig&lt;/th&gt;
&lt;th&gt;Go&lt;/th&gt;
&lt;th&gt;C# Native AOT&lt;/th&gt;
&lt;th&gt;bash and curl&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Artefact&lt;/td&gt;
&lt;td&gt;2.1 MB&lt;/td&gt;
&lt;td&gt;1.4 MB&lt;/td&gt;
&lt;td&gt;488 KB&lt;/td&gt;
&lt;td&gt;5.8 MB&lt;/td&gt;
&lt;td&gt;5.4 MB&lt;/td&gt;
&lt;td&gt;3.7 KB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Runtime&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;2.0 MB&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;2.4 MB&lt;/td&gt;
&lt;td&gt;23.7 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ship&lt;/td&gt;
&lt;td&gt;2.1 MB&lt;/td&gt;
&lt;td&gt;3.3 MB&lt;/td&gt;
&lt;td&gt;488 KB&lt;/td&gt;
&lt;td&gt;5.8 MB&lt;/td&gt;
&lt;td&gt;7.8 MB&lt;/td&gt;
&lt;td&gt;23.7 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cold start, median of 100&lt;/td&gt;
&lt;td&gt;1.3 ms&lt;/td&gt;
&lt;td&gt;1.1 ms&lt;/td&gt;
&lt;td&gt;1.4 ms&lt;/td&gt;
&lt;td&gt;1.7 ms&lt;/td&gt;
&lt;td&gt;3.0 ms&lt;/td&gt;
&lt;td&gt;7.0 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Turnaround, median of 100&lt;/td&gt;
&lt;td&gt;0.7 ms&lt;/td&gt;
&lt;td&gt;0.7 ms&lt;/td&gt;
&lt;td&gt;1.0 ms&lt;/td&gt;
&lt;td&gt;1.1 ms&lt;/td&gt;
&lt;td&gt;1.4 ms&lt;/td&gt;
&lt;td&gt;19.1 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Client total, median of 100&lt;/td&gt;
&lt;td&gt;2.8 ms&lt;/td&gt;
&lt;td&gt;3.2 ms&lt;/td&gt;
&lt;td&gt;3.7 ms&lt;/td&gt;
&lt;td&gt;4.4 ms&lt;/td&gt;
&lt;td&gt;7.1 ms&lt;/td&gt;
&lt;td&gt;35.3 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Peak RSS&lt;/td&gt;
&lt;td&gt;6 MB&lt;/td&gt;
&lt;td&gt;3 MB&lt;/td&gt;
&lt;td&gt;2 MB&lt;/td&gt;
&lt;td&gt;6 MB&lt;/td&gt;
&lt;td&gt;7 MB&lt;/td&gt;
&lt;td&gt;12 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Lines of code&lt;/td&gt;
&lt;td&gt;271&lt;/td&gt;
&lt;td&gt;184&lt;/td&gt;
&lt;td&gt;179&lt;/td&gt;
&lt;td&gt;156&lt;/td&gt;
&lt;td&gt;102&lt;/td&gt;
&lt;td&gt;75&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Third-party packages&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;36&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;GCC 14.2, libcurl 8.23.0 built static with HTTP only, mbedTLS 3.6.6, linux/arm64, Apple M4 Max under Docker.&lt;/p&gt;

&lt;p&gt;And the three builds of the same file, since they are the point of the post:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;apt-get libcurl, dynamic&lt;/th&gt;
&lt;th&gt;static, OpenSSL&lt;/th&gt;
&lt;th&gt;static, mbedTLS&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Artefact&lt;/td&gt;
&lt;td&gt;66 KB&lt;/td&gt;
&lt;td&gt;7.2 MB&lt;/td&gt;
&lt;td&gt;2.1 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Shared libraries&lt;/td&gt;
&lt;td&gt;32, 21.8 MB&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cold start&lt;/td&gt;
&lt;td&gt;3.6 ms&lt;/td&gt;
&lt;td&gt;2.0 ms&lt;/td&gt;
&lt;td&gt;1.3 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Turnaround&lt;/td&gt;
&lt;td&gt;0.7 ms&lt;/td&gt;
&lt;td&gt;0.7 ms&lt;/td&gt;
&lt;td&gt;0.7 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tail, last byte to exit&lt;/td&gt;
&lt;td&gt;2.2 ms&lt;/td&gt;
&lt;td&gt;1.8 ms&lt;/td&gt;
&lt;td&gt;0.8 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Client total&lt;/td&gt;
&lt;td&gt;6.7 ms&lt;/td&gt;
&lt;td&gt;4.7 ms&lt;/td&gt;
&lt;td&gt;2.8 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Peak RSS&lt;/td&gt;
&lt;td&gt;12 MB&lt;/td&gt;
&lt;td&gt;6 MB&lt;/td&gt;
&lt;td&gt;6 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Turnaround does not move, because the work between the two requests is the client's own code and it is the same code. Everything else is the library. The one column C does not win is lines: 271 against Rust's 184, and most of the difference is the JSON that serde wrote for Rust and I wrote for C. Zig keeps the size and memory columns, at a quarter of the binary and well under half the memory, because its standard library has a TLS client in it and mbedTLS, small as it is, is still a general-purpose one.&lt;/p&gt;

&lt;p&gt;The third-party count is one, and the leaderboard has no column for how big that one is. The second table is that column.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to run it
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/AndyCross/claude-hot-path
&lt;span class="nb"&gt;cd&lt;/span&gt; claude-hot-path
./bench/bench.sh c
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Docker, Python 3 and Go 1.25 or later on your PATH, because the bench builds its runner on the host. No key. The build stage downloads the curl tarball and compiles the library, which makes it the slowest build in the series so far at just under a minute cold. Next is Python on the standard library alone, &lt;code&gt;http.client&lt;/code&gt; and no &lt;code&gt;requests&lt;/code&gt;, which is the post where the interpreter's start-up time is the whole story.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;First published on &lt;a href="https://stepinto.dev/posts/claude-hot-path-c/?utm_source=dev.to&amp;amp;utm_medium=mirror&amp;amp;utm_campaign=dev-mirror"&gt;stepinto.dev&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>claude</category>
      <category>c</category>
      <category>sse</category>
    </item>
  </channel>
</rss>
