<?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: Akintayo Akinnibosun</title>
    <description>The latest articles on DEV Community by Akintayo Akinnibosun (@akintayo74).</description>
    <link>https://dev.to/akintayo74</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%2F2975764%2F57b5960f-ff6e-423e-af24-69a245e7aa37.jpeg</url>
      <title>DEV Community: Akintayo Akinnibosun</title>
      <link>https://dev.to/akintayo74</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/akintayo74"/>
    <language>en</language>
    <item>
      <title>I proved tennis scoring correct in Bend, then simulated the WTA Finals a million times</title>
      <dc:creator>Akintayo Akinnibosun</dc:creator>
      <pubDate>Sat, 14 Nov 2026 21:38:23 +0000</pubDate>
      <link>https://dev.to/akintayo74/i-proved-tennis-scoring-correct-in-bend-then-simulated-the-wta-finals-a-million-times-33i3</link>
      <guid>https://dev.to/akintayo74/i-proved-tennis-scoring-correct-in-bend-then-simulated-the-wta-finals-a-million-times-33i3</guid>
      <description>&lt;p&gt;I was watching &lt;a href="https://x.com/poteto" rel="noopener noreferrer"&gt;@poteto's&lt;/a&gt; video on how she shipped &lt;a href="https://x.com/poteto/status/2102050467505430555?s=20" rel="noopener noreferrer"&gt;2,500 PRs in one month&lt;/a&gt; (!) when I came across &lt;a href="https://x.com/poteto/status/2101384547543978195?s=20" rel="noopener noreferrer"&gt;a reply she made to Victor Taelin's tweet&lt;/a&gt; about Bend. What is Bend you might ask? Those were my thoughts exactly. A few minutes of research soon procured the desired information. Bend (&lt;a href="https://bend-lang.com" rel="noopener noreferrer"&gt;bend-lang.com&lt;/a&gt;) is a programming language whose pitch is the speed of C, the syntax of Python, and the scale of CUDA. The language's premise is that before writing any code, you write LAWS, then the AI writes the code plus PROOFS that it follows them. Thus, assuming the LAWS logic is correct, the AI model can write code, blocking mistakes via proofs, especially when introducing new features. As &lt;a href="https://x.com/GiulioRebuffo" rel="noopener noreferrer"&gt;@GiulioRebuffo&lt;/a&gt; put it:&lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-2101337958821327199-359" src="https://platform.twitter.com/embed/Tweet.html?id=2101337958821327199"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-2101337958821327199-359');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=2101337958821327199&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;
  PROOFS
  &lt;br&gt;
A proof is a step by step argument that a law holds for &lt;em&gt;every&lt;/em&gt; input. The way I see it, a law is a claim e.g It's going to rain tomorrow. A proof is my working out, my &lt;em&gt;proof&lt;/em&gt; if you will, that it will actually rain tomorrow. It can't actually be proven if it &lt;em&gt;will&lt;/em&gt; rain tomorrow but hopefully this helps get my point across.&lt;br&gt;


&lt;p&gt;&lt;/p&gt;

&lt;p&gt;A good instance of its usefulness is in games. Below is a screen recorded video of a sample game from Bend's own website:&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%2F7r4vszg2tckhod9iehas.gif" 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%2F7r4vszg2tckhod9iehas.gif" alt="Step 1: the demo game from Bend's website running with the law &amp;quot;winning is impossible&amp;quot; in place" width="800" height="450"&gt;&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/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffzqhoqq6ysumbyec1odu.gif" 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%2Ffzqhoqq6ysumbyec1odu.gif" alt="Step 2: without LAWS.bend, an AI change to make the board wrap around breaks the law and gets merged" width="800" height="450"&gt;&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/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx84uf0rj11349ewtpst9.gif" 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%2Fx84uf0rj11349ewtpst9.gif" alt="Step 3: with LAWS.bend, the same AI mistake is blocked until the law is proved to hold" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Screen recordings of the interactive demo on &lt;a href="https://bend-lang.com" rel="noopener noreferrer"&gt;bend-lang.com&lt;/a&gt;, by the Bend team (&lt;a href="https://github.com/HigherOrderCO" rel="noopener noreferrer"&gt;HigherOrderCO&lt;/a&gt;).&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Now knowing what Bend was, I was excited to try it out. My first instinct was to try it out as the backend in place of more traditional programming languages — a payroll app for instance. Wouldn't the LAWS prove especially useful as we're dealing with money which is quite delicate?&lt;/p&gt;

&lt;p&gt;Wrong.&lt;/p&gt;

&lt;p&gt;Turns out the hard part in creating a payroll isn't the math, it's talking to a money infrastructure API (Paystack in my instance), and Bend currently has no HTTPS or JSON support.&lt;/p&gt;

&lt;p&gt;'Okay then' I thought, 'So ideally we'd want something mathematically heavy, something dealing with probabilities or a simulation of sorts'.&lt;/p&gt;

&lt;p&gt;After some brainstorming, I settled on an idea: A WTA simulator for the WTA Finals this November. What if I could select a seed of my choice, and then using recent Tennis data (I got all my data from &lt;a href="https://github.com/JeffSackmann/tennis_wta" rel="noopener noreferrer"&gt;Jeff Sackmann's&lt;/a&gt; &lt;a href="https://www.tennisabstract.com/" rel="noopener noreferrer"&gt;'Tennis Abstract'&lt;/a&gt; (data's licence: Tennis Abstract, CC BY-NC-SA 4.0) project, simulate what the odds of winning for a particular player is? Turns out this was the perfect use case for Bend.&lt;/p&gt;

&lt;p&gt;My idea, distilled down to its essence is this: I'm able to pick any 8 tennis players I'd like to match up against each other. Bend then simulates a million tournaments which comes down to about 15 matches per tournament (well, 2^20 which equals 1,048,576 times to be precise) based on recent data, and gives me the probability of each player winning the tournament.&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;
  If you are interested, here are some more facts
  &lt;br&gt;
SPW refers to Serve Points Won. This is the share of points a player wins on her own serve. RPW refers to the return points won which are the share of points a player wins on her opponent's serve. To get player A's chance of winning a point on her serve against player B, the model takes player A's SPW, adds how often B &lt;em&gt;fails&lt;/em&gt; to win return points i.e 100% - B's RPW, and then subtracts the tour average. This model, however, only covers the last 52 weeks on hard courts.&lt;br&gt;


&lt;p&gt;&lt;/p&gt;

&lt;p&gt;Now playing a million matches sounded like some heavy computer work to me, but that's when a core feature of Bend became prominent to me called &lt;a href="https://bend-lang.com" rel="noopener noreferrer"&gt;Parallelisation&lt;/a&gt;. This allows Bend to divide up your code and run it on individual cpu cores, and then tally it up.&lt;/p&gt;

&lt;p&gt;How is this possible you might ask?&lt;/p&gt;

&lt;p&gt;Well, two pieces can work at the same time if they don't depend on each other. This isn't the case with most programming languages: Variables are shared and changed by various parts. Bend however, has no hidden state; A function's result depends only on what you pass into it (a pure function; it's really similar to &lt;a href="https://www.haskell.org/" rel="noopener noreferrer"&gt;Haskell&lt;/a&gt; in this way). Thus, Bend's runtime is free to feed them to different cores&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;
  If you want an even deeper dive, click me!
  &lt;br&gt;
To parallelise, you have to give your code that shape on purpose. Here's an example of some code in Bend doing just this:&lt;br&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nc"&gt;Run&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;tally&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Nat&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;prefix&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;U32&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nc"&gt;Tally&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="k"&gt;match&lt;/span&gt; &lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="mi"&gt;0n&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="nc"&gt;Run&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;count&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Run&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;single&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ca&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;cb&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;seed&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;prefix&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="mi"&gt;1n&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="n"&gt;x&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Run&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;tally&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="n"&gt;prefix&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;2&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="nc"&gt;Run&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;tally&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="n"&gt;prefix&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;2&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="nc"&gt;Run&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This looks a bit scary so let's break it down line by line:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Line 1&lt;/strong&gt;: &lt;code&gt;def Run.tally(+d: Nat, ..., +prefix: U32) -&amp;gt; Tally:&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This declares a function (note the Python based &lt;code&gt;def&lt;/code&gt; keyword). The function has arguments and let's start with &lt;code&gt;+d&lt;/code&gt; . This denotes the depth of the expression. &lt;code&gt;d&lt;/code&gt; being equal to 20 like it is in my code, is what gives 1,048,576.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;+&lt;/code&gt; in front of the &lt;code&gt;d&lt;/code&gt; marks an input that can be used more than once; Bend inputs are use-once by default. Marking it with the &lt;code&gt;+&lt;/code&gt; means we can use the variable elsewhere.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;...&lt;/code&gt; hides the match settings: the format, both players' chances and the random seed. &lt;code&gt;prefix&lt;/code&gt; says which block of runs this call is responsible for (&lt;code&gt;U32&lt;/code&gt; types it as a 32-bit whole number). &lt;code&gt;-&amp;gt; Tally&lt;/code&gt; (also typing) means it returns totals.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Line 2&lt;/strong&gt;: &lt;code&gt;match d:&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Though similar, this isn't quite an &lt;code&gt;if&lt;/code&gt; &lt;code&gt;else&lt;/code&gt; type thing. &lt;code&gt;match&lt;/code&gt; checks which &lt;em&gt;shape&lt;/em&gt; d has: zero, or one-more-than-something. This is called pattern matching.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Line 3 &amp;amp; 4&lt;/strong&gt;: &lt;code&gt;case 0n: Run.count(Run.single(fmt, ca, cb, seed, prefix))&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;That's &lt;code&gt;0n&lt;/code&gt;, the number zero (the &lt;code&gt;n&lt;/code&gt; marks a Nat), not the letter O. At zero, stop splitting: play one match (&lt;code&gt;Run.single&lt;/code&gt;, run number &lt;code&gt;prefix&lt;/code&gt;) and turn its result into a tally (&lt;code&gt;Run.count&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Line 5, 6, &amp;amp; 7&lt;/strong&gt;: &lt;code&gt;case 1n+p: x y = Run.tally(p, ..., prefix * 2 + 0) Run.tally(p, ..., prefix * 2 + 1) Run.add(x, y)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;1n+p&lt;/code&gt; matches any d of at least 1, and names one less than d as &lt;code&gt;p&lt;/code&gt;. It makes two calls one level smaller, on blocks &lt;code&gt;prefix*2&lt;/code&gt; and &lt;code&gt;prefix*2+1&lt;/code&gt;. Those are the two halves, and they run in parallel. &lt;code&gt;x y =&lt;/code&gt; catches both results, and &lt;code&gt;Run.add&lt;/code&gt; sums them.&lt;br&gt;
&lt;/p&gt;

&lt;br&gt;
&lt;p&gt;&lt;/p&gt;

&lt;p&gt;This allowed for fast simulation. On a 4-core cloud machine, a simulation of 1,048,576 best-of-three matches took &lt;strong&gt;about 21 s on 1 core and 5 s on all 4&lt;/strong&gt; (roughly a 4x speed-up). The full Finals run of 1,048,576 tournaments took 113 s on 4 cores.&lt;/p&gt;

&lt;p&gt;The next major concept, which I alluded to earlier, are LAWs. These are basically &lt;em&gt;claims&lt;/em&gt; about every possible input, written in Bend. Let's go through one together to see how it works:&lt;/p&gt;

&lt;h4&gt;
  
  
  Law 3: Deuce is never over
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;law&lt;/span&gt; &lt;span class="nc"&gt;L3_deuce_is_not_over&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;n&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Nat&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="no"&gt;S&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Game&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;winner&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;S&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Game&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;3n&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3n&lt;/span&gt;&lt;span class="o"&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="o"&gt;==&lt;/span&gt; &lt;span class="kc"&gt;None&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;Maybe&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="no"&gt;S&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Side&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3n + n here means 3 plus n&lt;/p&gt;

&lt;p&gt;"What, Akintayo" I can hear you say. "How can that be?"&lt;/p&gt;

&lt;p&gt;Well confusingly enough, the n in &lt;code&gt;3n&lt;/code&gt; doesn't refer to a variable name but is instead a type suffix, typing 3 as a 'natural number' hence the name &lt;code&gt;Nat&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Anyways, 3n + n means 3 plus n. So, assuming n is equal to 0,1,2 and so on, we'd always have the same scoreline due to the &lt;code&gt;S.Game{3n+n, 3n+n}&lt;/code&gt; line. For example, in the case when n is equal to 0, we'd have 3-3 and so on. This could theoretically go on forever, and it's why every match has a 1,000 point cap. &lt;code&gt;==None{}&lt;/code&gt; means that there's 'no winner'. So the law says that 3-3, 4-4, and every tie after that means no one has won the game yet.&lt;/p&gt;

&lt;p&gt;On this WTA project, I handled the conceptualisation of LAWS and the direction I wanted the project to go, while I used Claude Code for the coding. Basically, Claude would propose a rule or a spec change, I'd review it, and then it'd write the Bend code to align with this.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Planted bug&lt;/th&gt;
&lt;th&gt;Caught by&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Game won with a 1-point lead&lt;/td&gt;
&lt;td&gt;L2 (the game rule)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Point given to the wrong player&lt;/td&gt;
&lt;td&gt;L20 (each point goes to its winner)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Points still counted after the game ended&lt;/td&gt;
&lt;td&gt;L5 (a won game is final)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Set won 6-5&lt;/td&gt;
&lt;td&gt;Set laws&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;No tiebreak at 6-6&lt;/td&gt;
&lt;td&gt;Set laws&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Serve order restarts every set&lt;/td&gt;
&lt;td&gt;Serve-order laws&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Match cap of 999 points instead of 1,000&lt;/td&gt;
&lt;td&gt;L27 (the point cap)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Half the runs counted twice&lt;/td&gt;
&lt;td&gt;L14 (every run counted once)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The table above shows eight of the 24 bugs I planted across the game, set, match and simulation layers. Every one of them was caught.&lt;/p&gt;

&lt;p&gt;This I feel, is the real usefulness of Bend: the focus is placed on ensuring your Laws express what you want them to do, and then the code is written around them. For instance, when working on this app, the first 4 laws only said who won the game and ensured that a won game stays won. Going through them revealed a gap: if the wrong player is given points (e.g player A given the points of player B), the laws would still pass. And so a new law was added even before a line of code was written. This doesn't mean there can't be slip ups though, LAWS can only catch what they protect. If no law exists for a case, Bend is like any other programming language. For example, I had a filter which was meant to skip qualifying rounds (Q1 to Q3), however, it also skipped the quarter finals as it also began with 'Q'. There was no law for this and so it wasn't caught by Bend.&lt;/p&gt;

&lt;p&gt;Anyways, here's a screenshot of my end result of the running odds using a random seed:&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%2F8jx309hj980j4g4zz3zd.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%2F8jx309hj980j4g4zz3zd.png" alt=" " width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Title odds from one run of 1,048,576 simulated tournaments (random seed 18949729), using a sample field of eight players. Data: Tennis Abstract, CC BY-NC-SA 4.0.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This was a really fun project and I'm still learning and finding Bend more and more intriguing as I go along.&lt;/p&gt;

&lt;p&gt;Excelsior!&lt;/p&gt;

&lt;p&gt;Akintayo.&lt;/p&gt;

</description>
      <category>bend</category>
      <category>functional</category>
      <category>ai</category>
      <category>parallelcomputing</category>
    </item>
    <item>
      <title>Your static site probably doesn’t need React</title>
      <dc:creator>Akintayo Akinnibosun</dc:creator>
      <pubDate>Sat, 14 Nov 2026 20:06:29 +0000</pubDate>
      <link>https://dev.to/akintayo74/your-static-site-probably-doesnt-need-react-530k</link>
      <guid>https://dev.to/akintayo74/your-static-site-probably-doesnt-need-react-530k</guid>
      <description>&lt;p&gt;About a year ago, when I was a fledgling frontend developer, I created a website with React. This website was a single page app built with Vite and React, and it used all the cutting edge bells and whistles but had only one problem: it wasn’t performant. On mobile, the main content took 11.3 seconds to show up; after I rebuilt it in Astro, it took 2.1. &lt;/p&gt;

&lt;p&gt;Evaluating this site a year ago, it was simple to see the pitfalls I fell into: a lot of images were uncompressed, and I was shipping &lt;em&gt;way&lt;/em&gt; more than necessary to the client. It got me thinking however, though a lot of these mistakes were my fault, wouldn’t it be nice if there was a framework that blocked a lot of these mistakes by default? Something like… Astro?&lt;/p&gt;

&lt;p&gt;For those that may not be familiar, Astro is a frontend framework that by default, ships no JavaScript to the client. It’s based on default web technologies i.e HTML and CSS. Because of this, it’s extremely performant. You opt &lt;em&gt;in&lt;/em&gt; to complexity, unlike most frameworks where you opt out.&lt;/p&gt;

&lt;p&gt;The claim of this article, is that for your static, content driven site, no matter what experience in development you have, you &lt;em&gt;probably&lt;/em&gt; don’t need React. I’ll start by walking through a few pitfalls I made in my earlier project and show how Astro, by default, would have prevented this.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fault 1&lt;/strong&gt;: The site wasn’t rendered until it received all the JavaScript required for the page to render. In React, the fix is a framework that renders the HTML ahead of time, like Next.js. In Astro however, each component by default is an &lt;code&gt;island&lt;/code&gt;. This is a static wrapped server rendered piece of html with zero JavaScript by default. When you need interactivity, you isolate that piece (said &lt;code&gt;island&lt;/code&gt;) and you tell Astro when and how to load that island. These islands are framework agnostic, so you can have islands of React, Svelte, Vue, no problem.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fault 2&lt;/strong&gt;: Embarrassing mistake upcoming😂, but I was shipping the admin page with the blog editor — and that includes the login, image upload, you get the picture — to the client. So all visitors of the site were receiving a huge amount of JavaScript that wasn’t even being used: one 752 KB bundle, with about 60% of it unused on the homepage. React.lazy could have split the admin out, but I didn’t know to reach for it. If I was using Astro, each page would only ship the JavaScript for its own islands, so the admin code would have stayed on the admin page unless I deliberately made the mistake.&lt;/p&gt;

&lt;p&gt;React is an extremely powerful tool, and one of the best we have in our toolbelts as developers — this article is not meant to dunk on it. In fact, the Astro version of the site still uses React islands for things like the slideshow and the blog list. For web apps generally, sites or apps managing complex state, React proves invaluable. This article is mainly meant to point out that for static content sites however, or for developers early on in their career, Astro is well, like a gas lighter — off by default. You light the stove and it’s automatically off even if you forget. React however, is like a naked match flame. Very powerful and versatile, but easier to burn the house down with😂&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>react</category>
      <category>astro</category>
      <category>performance</category>
    </item>
    <item>
      <title>Phanourios: Finding the Hidden Web Between Your Notes</title>
      <dc:creator>Akintayo Akinnibosun</dc:creator>
      <pubDate>Mon, 30 Mar 2026 02:17:26 +0000</pubDate>
      <link>https://dev.to/akintayo74/phanourios-finding-the-hidden-web-between-your-notes-21jd</link>
      <guid>https://dev.to/akintayo74/phanourios-finding-the-hidden-web-between-your-notes-21jd</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/notion-2026-03-04"&gt;Notion MCP Challenge&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;I keep a commonplace book in Notion — a place where I save quotes, lyrics, ideas, passages, things that resonate with me. Over the past year I've saved hundreds of entries: a Hozier lyric in January, an Eliot passage in June, something I wrote myself last week. Each one sits in its own page. Each one made sense when I saved it.&lt;/p&gt;

&lt;p&gt;What I kept discovering — always by accident, always months later — is that entries I saved at completely different times were often circling the same question. The Hozier lyric and the Eliot passage share a water imagery pattern I never consciously noticed. A character name in a piece of my own writing traces back, through an epigraph chain I'd forgotten, to another author already in my notes.&lt;/p&gt;

&lt;p&gt;Notion shows you pages. It doesn't show you the web between them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Phanourios&lt;/strong&gt; (&lt;code&gt;pan&lt;/code&gt;) is a CLI tool that reads any page in your Notion workspace, searches your notes collection for echoes and allusions, uses Claude to identify connections you may not have noticed, and appends a "Threads &amp;amp; Constellations" toggle list to the bottom of your page. The toggle is closed by default. Your original writing is never touched. The connections sit below it like footnotes in a good edition — there if you want them, invisible if you don't.&lt;/p&gt;

&lt;h3&gt;
  
  
  The name
&lt;/h3&gt;

&lt;p&gt;Phanourios is a character from Philip Pullman's &lt;em&gt;Book of Dust&lt;/em&gt; trilogy. The Greek name means "the revealer" — he who brings to light. The short form &lt;code&gt;pan&lt;/code&gt; is both a substring of Phanourios and the name of Lyra's dæmon in &lt;em&gt;His Dark Materials&lt;/em&gt;. A dæmon is the visible form of a person's inner self — the part that thinks alongside you, that notices what you haven't yet articulated. That felt right for a tool whose job is to surface the connections your notes have been quietly forming without your knowledge.&lt;/p&gt;

&lt;h3&gt;
  
  
  What it is not
&lt;/h3&gt;

&lt;p&gt;Phanourios is not a web app with a dashboard. It is not a "summarise my notes" tool or an "AI writing assistant." It does not interpret your writing or tell you what your choices mean. It does not give advice ("you should read X" or "consider adding Y to your commonplace book"). It surfaces connections — specific textual echoes, etymological roots, structural parallels, chain links between entries — and leaves them there. What you do with them is yours.&lt;/p&gt;

&lt;h3&gt;
  
  
  Design philosophy
&lt;/h3&gt;

&lt;p&gt;When I started building, the temptation was to make something architecturally impressive — more agents, more layers, more moving parts. But the question I kept returning to was: &lt;em&gt;what does the person sitting at their desk actually need?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I had a specific, recurring experience — discovering connections between my own notes by accident, months after saving them — and I wanted a tool that would make those discoveries deliberate. Everything follows from that. The architecture is simple because the problem is specific: read a page, search the collection, find the threads, write them back. If the solution is simple, solve it simply. The complexity lives in the system prompt and the quality of the connections, not in the number of moving parts.&lt;/p&gt;

&lt;p&gt;Phanourios doesn't have a dashboard. It doesn't have a web UI. Notion &lt;em&gt;is&lt;/em&gt; the UI — the output lives where the notes live, as a closed toggle at the bottom of the page. That constraint wasn't a limitation. It was the first design decision.&lt;/p&gt;

&lt;h2&gt;
  
  
  Video Demo
&lt;/h2&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
      &lt;div class="c-embed__body flex items-center justify-between"&gt;
        &lt;a href="https://www.awesomescreenshot.com/video/50937711?key=2f2e0240965f201a363275bd327efb5b" rel="noopener noreferrer" class="c-link fw-bold flex items-center"&gt;
          &lt;span class="mr-2"&gt;awesomescreenshot.com&lt;/span&gt;
          

        &lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  Show us the code
&lt;/h2&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/Akintayo74" rel="noopener noreferrer"&gt;
        Akintayo74
      &lt;/a&gt; / &lt;a href="https://github.com/Akintayo74/phanourios-notion" rel="noopener noreferrer"&gt;
        phanourios-notion
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Phanourios&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;Phanourios (&lt;code&gt;pan&lt;/code&gt;) is a CLI tool that finds the hidden connections between pages in your Notion workspace using Claude AI. Give it a page URL; it reads the page, searches your notes collection for echoes and allusions, and appends a "Threads &amp;amp; Constellations" toggle list to the bottom of the page.&lt;/p&gt;
&lt;p&gt;The toggle is closed by default. Your original writing is never touched.&lt;/p&gt;
&lt;p&gt;Built for the &lt;a href="https://dev.to/challenges/notion-2026-03-04" rel="nofollow"&gt;DEV.to / Notion MCP Challenge&lt;/a&gt;.&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Prerequisites&lt;/h2&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://bun.sh" rel="nofollow noopener noreferrer"&gt;Bun&lt;/a&gt; v1.0 or later&lt;/li&gt;
&lt;li&gt;A &lt;a href="https://notion.so" rel="nofollow noopener noreferrer"&gt;Notion&lt;/a&gt; account&lt;/li&gt;
&lt;li&gt;An &lt;a href="https://console.anthropic.com" rel="nofollow noopener noreferrer"&gt;Anthropic API key&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Installation&lt;/h2&gt;
&lt;/div&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;git clone https://github.com/Akintayo74/phanourios-notion.git
&lt;span class="pl-c1"&gt;cd&lt;/span&gt; phanourios-notion
bun install
bun run build
bun link&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;After &lt;code&gt;bun link&lt;/code&gt;, the &lt;code&gt;pan&lt;/code&gt; command is available globally in your terminal.&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Setup&lt;/h2&gt;

&lt;/div&gt;
&lt;p&gt;Run the one-time setup:&lt;/p&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;pan init&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;code&gt;pan init&lt;/code&gt; will:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Ask for your Anthropic API key (or detect it from the &lt;code&gt;ANTHROPIC_API_KEY&lt;/code&gt; environment variable)&lt;/li&gt;
&lt;li&gt;Ask whether to search your entire workspace or scope to a specific database&lt;/li&gt;
&lt;li&gt;…&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/Akintayo74/phanourios-notion" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  How I Used Notion MCP
&lt;/h2&gt;

&lt;p&gt;Phanourios uses Notion's hosted MCP server (&lt;code&gt;https://mcp.notion.com/mcp&lt;/code&gt;) for every interaction with the user's workspace. There are exactly three MCP tools in play:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;notion-fetch&lt;/code&gt;&lt;/strong&gt; — reads page content. The seed page (the one you run &lt;code&gt;pan&lt;/code&gt; against) is fetched first, then each search result is fetched individually to get the full text of matching entries.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;notion-search&lt;/code&gt;&lt;/strong&gt; — searches the user's notes. Claude Haiku generates 3–5 search queries from the seed text (proper names, distinctive phrases, thematic keywords), and each query runs against the configured database via &lt;code&gt;data_source_url&lt;/code&gt; scoping. Results are deduplicated by page ID.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;notion-update-page&lt;/code&gt;&lt;/strong&gt; — writes the toggle back. This is the most constrained part of the architecture. There is no &lt;code&gt;append_content&lt;/code&gt; command in the Notion MCP tools — only &lt;code&gt;update_content&lt;/code&gt; (search-and-replace) and &lt;code&gt;replace_content&lt;/code&gt; (full page overwrite). I use &lt;code&gt;update_content&lt;/code&gt; exclusively, with a structural guarantee: &lt;code&gt;new_str&lt;/code&gt; always contains &lt;code&gt;old_str&lt;/code&gt;. The write can only &lt;em&gt;add&lt;/em&gt; content, never remove it. The worst failure mode is "toggle appears in the wrong spot" — no scenario produces data loss.&lt;/p&gt;

&lt;h3&gt;
  
  
  The safety architecture
&lt;/h3&gt;

&lt;p&gt;This is the part I'm proudest of, and it's invisible to the user.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Claude never has access to Notion.&lt;/strong&gt; The code reads pages via MCP, extracts the text, and sends it to the Claude API as a plain string. Claude receives text in, returns text out. It has no MCP credentials, no Notion connection, no ability to read or modify anything in the workspace. The separation is architectural, not just a prompt instruction.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The code only appends.&lt;/strong&gt; Every &lt;code&gt;update_content&lt;/code&gt; call's &lt;code&gt;new_str&lt;/code&gt; contains its &lt;code&gt;old_str&lt;/code&gt; — structurally incapable of deleting content. After every write, the page is re-fetched to verify the toggle exists and original content is intact.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The toggle is closed by default.&lt;/strong&gt; Your page looks exactly the same after running &lt;code&gt;pan&lt;/code&gt; — until you choose to open the toggle. The connections are additive. The original writing is sacred.&lt;/p&gt;

&lt;h3&gt;
  
  
  What MCP unlocks
&lt;/h3&gt;

&lt;p&gt;The key insight is that Notion's hosted MCP server returns content as Notion-flavoured Markdown — a structured format with toggle syntax (&lt;code&gt;&amp;lt;details&amp;gt;&lt;/code&gt;/&lt;code&gt;&amp;lt;summary&amp;gt;&lt;/code&gt;), page mentions (&lt;code&gt;&amp;lt;mention-page&amp;gt;&lt;/code&gt;), and consistent formatting rules. This means the round-trip works: read content as markdown, generate new content in the same dialect, write it back, and it renders natively in Notion.&lt;/p&gt;

&lt;p&gt;Without MCP, this tool would need the Notion API directly — dealing with block trees, property schemas, and the gap between what you write and what Notion stores. MCP abstracts that into a text-in, text-out interface that maps naturally onto what an LLM can produce.&lt;/p&gt;

&lt;p&gt;The OAuth flow uses &lt;code&gt;mcp-oauth-provider&lt;/code&gt; to handle the full PKCE dance. Tokens are stored locally at &lt;code&gt;~/.pan/oauth/&lt;/code&gt; and refresh silently. After the initial &lt;code&gt;pan init&lt;/code&gt;, you never think about authentication again.&lt;/p&gt;

&lt;h3&gt;
  
  
  The system prompt
&lt;/h3&gt;

&lt;p&gt;The system prompt went through three rounds of iteration against real pages from my own Notion workspace. The hardest boundary to get right was the line between &lt;em&gt;discovery&lt;/em&gt; and &lt;em&gt;commentary&lt;/em&gt;. Observations about the material are welcome ("the word 'Lethean' contains Lethe, the river of forgetting in Greek myth"). Observations about the user's intent are not ("you replaced 'neighbour' with 'dæmon' to turn the commandment inward"). The prompt includes pre-flight checks — trace names through their full web before writing, check for chains where A→B and B→C reveal that A and C are connected through B, exhaust connections before declaring anything an outlier.&lt;/p&gt;

&lt;p&gt;The tone instruction is simple: &lt;em&gt;like a well-written footnote in a good edition&lt;/em&gt;. Present when useful. Invisible when not.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>notionchallenge</category>
      <category>mcp</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
