<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>context examples on Programmer.ie: Modern AI programming</title>
		<link>http://programmer.ie/examples/context/</link>
		<description>Recent content in context examples on Programmer.ie: Modern AI programming</description>
		<generator>Hugo</generator>
		<language>en-US</language>
		
		
		
		
			<atom:link href="http://programmer.ie/examples/context/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Account for the context you did not type</title>
				<link>http://programmer.ie/examples/context/03-chapter/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>http://programmer.ie/examples/context/03-chapter/</guid>
				<description>&lt;p&gt;Most of what reaches a model is not what you typed. The chapter&amp;rsquo;s claim is that&#xA;a context window has to be &lt;em&gt;accounted for&lt;/em&gt; before anything else can be said&#xA;about it, and the research harness can do that accounting from a captured&#xA;invocation: the same capture that produced the model call produces the report.&lt;/p&gt;&#xA;&lt;h2 id=&#34;run-it&#34;&gt;Run it&lt;/h2&gt;&#xA;&lt;div class=&#34;bookkit-example-code&#34; data-example-code&gt;&#xA;  &lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git clone https://github.com/ernanhughes/project-context.git&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cd project-context&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git checkout b4e84a35bce27eff15584750e59131da49b1c049&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;python -m venv .venv&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;.venv/Scripts/pip install -e .&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;.venv/Scripts/contextlab debug panel fixtures/opencode-capture-v2/spool/captures.jsonl --output panel.html --svg-output panel.svg --json-output report.json&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;  &lt;textarea data-example-source hidden readonly aria-hidden=&#34;true&#34; aria-label=&#34;Code source&#34;&gt;git clone https://github.com/ernanhughes/project-context.git&#xA;cd project-context&#xA;git checkout b4e84a35bce27eff15584750e59131da49b1c049&#xA;python -m venv .venv&#xA;.venv/Scripts/pip install -e .&#xA;.venv/Scripts/contextlab debug panel fixtures/opencode-capture-v2/spool/captures.jsonl --output panel.html --svg-output panel.svg --json-output report.json&lt;/textarea&gt;&#xA;  &lt;button type=&#34;button&#34; data-example-copy hidden&gt;Copy code&lt;/button&gt;&lt;span role=&#34;status&#34;&gt;&lt;/span&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;Python 3.11 or later. The command is read-only over the fixture and writes&#xA;only the three output files you named. No model is called and nothing leaves the&#xA;machine.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Assemble for the task, or report that you cannot</title>
				<link>http://programmer.ie/examples/context/22-chapter/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>http://programmer.ie/examples/context/22-chapter/</guid>
				<description>&lt;p&gt;The chapter&amp;rsquo;s question is whether assembly is possible at all, before any&#xA;question about which candidates are best. A packer that treats required&#xA;constraints as soft preferences produces a plausible-looking bundle whose&#xA;declared obligations have been violated. The compiler here answers&#xA;feasibility first, and its answer can be &amp;ldquo;no&amp;rdquo;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;run-it&#34;&gt;Run it&lt;/h2&gt;&#xA;&lt;div class=&#34;bookkit-example-code&#34; data-example-code&gt;&#xA;  &lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git clone https://github.com/ernanhughes/project-context-compiler.git&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cd project-context-compiler&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git checkout 8d8bd31a20788c4c3298dfdffac741c507211a58&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;npm ci&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;node src/cli.ts conformance&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;  &lt;textarea data-example-source hidden readonly aria-hidden=&#34;true&#34; aria-label=&#34;Code source&#34;&gt;git clone https://github.com/ernanhughes/project-context-compiler.git&#xA;cd project-context-compiler&#xA;git checkout 8d8bd31a20788c4c3298dfdffac741c507211a58&#xA;npm ci&#xA;node src/cli.ts conformance&lt;/textarea&gt;&#xA;  &lt;button type=&#34;button&#34; data-example-copy hidden&gt;Copy code&lt;/button&gt;&lt;span role=&#34;status&#34;&gt;&lt;/span&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;Node 22 or later. The command is offline and deterministic: no model, no&#xA;network, no service.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Compile a request into a bundle or a typed failure</title>
				<link>http://programmer.ie/examples/context/23-chapter/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>http://programmer.ie/examples/context/23-chapter/</guid>
				<description>&lt;p&gt;The chapter that owns the implementation. A compiler here is a function from a&#xA;request, a candidate pool and a policy to &lt;em&gt;either&lt;/em&gt; a bundle &lt;em&gt;or&lt;/em&gt; a typed&#xA;failure, and it leaves a decision trace either way. The point of the trace is&#xA;that a reader can disagree with a decision after the fact.&lt;/p&gt;&#xA;&lt;h2 id=&#34;run-it&#34;&gt;Run it&lt;/h2&gt;&#xA;&lt;div class=&#34;bookkit-example-code&#34; data-example-code&gt;&#xA;  &lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git clone https://github.com/ernanhughes/project-context-compiler.git&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cd project-context-compiler&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git checkout 8d8bd31a20788c4c3298dfdffac741c507211a58&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;npm ci&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;node src/cli.ts compile --request conformance/compiler-v1/mandatory-overflow.request.json --candidates conformance/compiler-v1/mandatory-overflow.candidates.json --policy conformance/compiler-v1/compiler-policy-v1.json&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;  &lt;textarea data-example-source hidden readonly aria-hidden=&#34;true&#34; aria-label=&#34;Code source&#34;&gt;git clone https://github.com/ernanhughes/project-context-compiler.git&#xA;cd project-context-compiler&#xA;git checkout 8d8bd31a20788c4c3298dfdffac741c507211a58&#xA;npm ci&#xA;node src/cli.ts compile --request conformance/compiler-v1/mandatory-overflow.request.json --candidates conformance/compiler-v1/mandatory-overflow.candidates.json --policy conformance/compiler-v1/compiler-policy-v1.json&lt;/textarea&gt;&#xA;  &lt;button type=&#34;button&#34; data-example-copy hidden&gt;Copy code&lt;/button&gt;&lt;span role=&#34;status&#34;&gt;&lt;/span&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;Node 22 or later. The command is offline and deterministic.&lt;/p&gt;</description>
			</item>
			<item>
				<title>What a compilation proves, and where it refuses wrongly</title>
				<link>http://programmer.ie/examples/context/24-chapter/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>http://programmer.ie/examples/context/24-chapter/</guid>
				<description>&lt;p&gt;A conformance suite shows the compiler agrees with a reference on the cases&#xA;both of them were given. It does not show the compiler is &lt;em&gt;complete&lt;/em&gt; — that a&#xA;refusal to assemble is ever wrong. The chapter&amp;rsquo;s evidence for that question is&#xA;a counterexample, and the repository ships one: a constructed case where the&#xA;compiler says &lt;code&gt;INSUFFICIENT_BUDGET&lt;/code&gt; and a legal bundle exists.&lt;/p&gt;&#xA;&lt;h2 id=&#34;run-it&#34;&gt;Run it&lt;/h2&gt;&#xA;&lt;div class=&#34;bookkit-example-code&#34; data-example-code&gt;&#xA;  &lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git clone https://github.com/ernanhughes/project-context-compiler.git&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cd project-context-compiler&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git checkout 8d8bd31a20788c4c3298dfdffac741c507211a58&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;npm ci&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;node scripts/feasibility-oracle.mjs conformance/completeness-v1&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;  &lt;textarea data-example-source hidden readonly aria-hidden=&#34;true&#34; aria-label=&#34;Code source&#34;&gt;git clone https://github.com/ernanhughes/project-context-compiler.git&#xA;cd project-context-compiler&#xA;git checkout 8d8bd31a20788c4c3298dfdffac741c507211a58&#xA;npm ci&#xA;node scripts/feasibility-oracle.mjs conformance/completeness-v1&lt;/textarea&gt;&#xA;  &lt;button type=&#34;button&#34; data-example-copy hidden&gt;Copy code&lt;/button&gt;&lt;span role=&#34;status&#34;&gt;&lt;/span&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;Node 22 or later. The oracle enumerates legal subsets exhaustively and shares&#xA;the compiler&amp;rsquo;s cost units. No model, no network.&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
