<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
    <channel>
        <title>MadMode</title>
        <link>http://www.madmode.com/</link>
        <description>Dan Connolly's tinkering notebook</description>
        <language>en-us</language>
        <pubDate>Mon, 27 Jan 2025 00:03:46 +0000</pubDate>
        <lastBuildDate>Mon, 27 Jan 2025 00:03:46 +0000</lastBuildDate>
        
        <item>
            <title>Formal Verification is catching up with cutting-edge Mathematics</title>
            <link>http://www.madmode.com//2025/formal-verification-catching-up/</link>
            <description>&lt;p&gt;Formalization has trailed cutting-edge mathematics for some time:
the &lt;a href=&#34;https://en.wikipedia.org/wiki/Four_color_theorem&#34;&gt;four color theorem&lt;/a&gt; was proved in 1976,
but it wasn&#39;t formally verifed until 2005.&lt;/p&gt;
&lt;p&gt;This was one of the objections of the &lt;a href=&#34;https://en.wikipedia.org/wiki/QED_manifesto&#34;&gt;QED manifesto&lt;/a&gt; in 1993:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Objection 4.&lt;/strong&gt; Mechanically checked formality is impossible.
There is no evidence that extremely hard proofs can be put into formal form
in less than some utterly ridiculous amount of work.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Reply to Objection 4.&lt;/strong&gt; Based upon discussions with numerous workers in automated reasoning,
it is our view that using current proof-checking technology, we can, using a variety of systems and expert users of those systems,
check mathematics at &lt;strong&gt;within a factor of ten&lt;/strong&gt;, often much better, of the time it takes a skilled mathematician to write down a proof
at the level of an advanced undergraduate textbook. (&lt;em&gt;emphasis mine&lt;/em&gt;)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Today I got a github notification that prompted me check in on &lt;a href=&#34;https://groups.google.com/g/metamath&#34;&gt;recent discussion around Metamath&lt;/a&gt;,
and I learned that one of the greatest living mathematicians is formally verifying his work as he develops it:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;... when it comes to formalising mathematics in real time, we now have an even more spectacular data point:
Terry Tao led a team which formalised the main result in his breakthrough new paper
 with Gowers, Green and Manners proving Katalin Marton’s polynomial Freiman-Ruzsa conjecture.
 The 33 page paper was formalised in &lt;strong&gt;&lt;em&gt;just three weeks&lt;/em&gt;&lt;/strong&gt; (before the paper had even been submitted)!
 -- &lt;a href=&#34;https://xenaproject.wordpress.com/2024/01/20/lean-in-2024/&#34;&gt;Lean in 2024 | Xena&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;My &lt;a href=&#34;https://www.diigo.com/user/dckc-madmode?query=%23research+%23logic&#34;&gt;notes&lt;/a&gt; show I first looked at &lt;a href=&#34;https://lean-lang.org/about/&#34;&gt;Lean&lt;/a&gt;
back in 2015. I&#39;m trying to remember what I didn&#39;t like about it... ah yes... it&#39;s written in C++ and the logic is kinda hairy.&lt;/p&gt;
&lt;p&gt;The logic does have a &lt;a href=&#34;https://lean-lang.org/doc/reference/latest/Elaboration-and-Compilation/#The-Lean-Language-Reference--Elaboration-and-Compilation--The-Kernel&#34;&gt;kernel&lt;/a&gt;,
which was written up by someone I recognize from the Metamath community:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Mario Carneiro, 2019. &lt;a href=&#34;https://github.com/digama0/lean-type-theory/releases/download/v1.0/main.pdf&#34;&gt;The Type Theory of Lean.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.youtube.com/watch?v=3sKrSNhSxik&#34;&gt;The Type Theory of Lean - YouTube&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In his &lt;a href=&#34;https://github.com/digama0/mm0&#34;&gt;mm0&lt;/a&gt; work, he calls it a &#34;very strong axiomatic framework&#34;.&lt;/p&gt;
&lt;p&gt;I tried to read that paper; it&#39;s a little over my head. But Lean can export proof objects and there are independent checkers.
&lt;a href=&#34;https://github.com/ammkrn/nanoda_lib/blob/master/src/tc.rs&#34;&gt;tc.rs&lt;/a&gt; is the core of a rust implementation;
it&#39;s over 1000 LOC; over 5000 if you count the modules it imports.
Compare with the 362 line &lt;a href=&#34;https://lists.w3.org/Archives/Public/sw99/2000JanMar/0002.html&#34;&gt;otter proof checker&lt;/a&gt;.
The &lt;a href=&#34;https://ammkrn.github.io/type_checking_in_lean4/&#34;&gt;Type Checking in Lean 4&lt;/a&gt; docs are just about my speed, though. Thanks!&lt;/p&gt;</description>
            <pubDate>Wed, 01 Jan 2025 00:00:00 +0000</pubDate>
            <guid>http://www.madmode.com//2025/formal-verification-catching-up/</guid>
        </item>
        <item>
            <title>awesome-ocap stargazers grow steadily since 2017</title>
            <link>http://www.madmode.com//2024/awesome-ocap-stargazer-growth/</link>
            <description>&lt;p&gt;The number of stars on my &lt;a href=&#34;https://github.com/dckc/awesome-ocap&#34;&gt;awesome-ocap&lt;/a&gt; repo has grown steadily since
&lt;a href=&#34;../2017/ocap-wish-list&#34;&gt;My Capability Security 2017 Wish-List&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;stargazers_chart.svg&#34; src=&#34;https://gist.githubusercontent.com/dckc/53d44b5b11b9c462c9f3d0e33db2994f/raw/0d7ec8befbc841f56934c14d194fcac65c84182d/stargazers_chart.svg&#34; /&gt;&lt;/p&gt;
&lt;p&gt;My github feed shows new stars now and then, which made me
curious about how folks are discovering it. I expected
the growth would be episodic -- prompted by events now and then.&lt;/p&gt;
&lt;p&gt;The nearly straight line over 7 years is quite a surprise!&lt;/p&gt;
&lt;p&gt;&lt;em&gt;TODO: check the linear hypothesis with pandas. Get slope, coefficient.&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;The web knows how to make this chart&lt;/h2&gt;
&lt;p&gt;I just wished into a popular LLM:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;for my dckc/awesome-ocap github repo, how do I get a chart of when the stargazers arrived? I want to make a chart&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;and it got &lt;a href=&#34;https://gist.github.com/dckc/53d44b5b11b9c462c9f3d0e33db2994f#file-script-py&#34;&gt;script.py&lt;/a&gt; right on the 1st try, IIRC.&lt;/p&gt;
&lt;h2&gt;PyData tool setup: uv beat nix&lt;/h2&gt;
&lt;p&gt;The LLM&#39;s first draft for fetching was some shell code that had a silent endless loop, which put me in rate-limiting penalty box at github.
I tried using nix to set up a python env for pandas and such, but the rate limiting put the kibosh on that.
So I used uv to manage the dependencies.&lt;/p&gt;
&lt;p&gt;I used direnv to manage &lt;code&gt;$GITHUB_TOKEN&lt;/code&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://gist.github.com/dckc/53d44b5b11b9c462c9f3d0e33db2994f#file-makefile&#34;&gt;Makefile&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://gist.github.com/dckc/53d44b5b11b9c462c9f3d0e33db2994f#file-fetch_stargazers-py&#34;&gt;fetch_stargazers.py&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;p.s. commit history for the &lt;a href=&#34;https://gist.github.com/dckc/53d44b5b11b9c462c9f3d0e33db2994f&#34;&gt;gist&lt;/a&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;2024-12-12 00:29 496c37f
2024-12-12 00:27 0d7ec8b
2024-12-09 09:41 035f04b
&lt;/code&gt;&lt;/pre&gt;</description>
            <pubDate>Thu, 12 Dec 2024 00:00:00 +0000</pubDate>
            <guid>http://www.madmode.com//2024/awesome-ocap-stargazer-growth/</guid>
        </item>
        <item>
            <title>rebuilding madmode on 11ty using aider</title>
            <link>http://www.madmode.com//2024/llm-pairing-jamstack/</link>
            <description>&lt;p&gt;&lt;a href=&#34;https://en.wikipedia.org/wiki/Generative_artificial_intelligence&#34;&gt;Generative AI&lt;/a&gt; can
definitely be a productivity booster... &#34;I&#39;m kinda scared of my python site builder now,&#34;
I wrote way back in 2016. I&#39;ve been sort of stuck since then.&lt;/p&gt;
&lt;p&gt;Then I learned about &lt;a href=&#34;https://aider.chat/&#34;&gt;aider&lt;/a&gt;, &#34;pair programming in your terminal&#34;.
It took just 2 and 1/2 hrs to re-created the features of my blog with modern JavaScript tooling.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://github.com/user-attachments/assets/82f6fedb-5b3d-4053-b657-156b8b2668ef&#34; alt=&#34;MadMode blog screenshot&#34; width=&#34;600&#34; /&gt;&lt;/p&gt;
&lt;p&gt;After setting up billing, we start start it with &lt;code&gt;aider --sonnet&lt;/code&gt;.
Then literally type &lt;strong&gt;Create an 11ty blog called MadMode with the subtitle &#34;Dan Connolly&#39;s hacking notebook&#34;&lt;/strong&gt;.
And whoosh:&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://asciinema.org/a/678026?t=60&#34; target=&#34;_blank&#34;&gt;&lt;img src=&#34;https://asciinema.org/a/678026.svg&#34; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Not only that, but &lt;code&gt;aider&lt;/code&gt; makes a git commit out of what it did. No more copying and pasting code
between the LLM chat window and your text editor.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;2024-09-21 11:53 850441f feat: Create an 11ty blog called MadMode with the subtitle &#34;Dan Connolly&#39;s hacking notebook&#34;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Its first try had a bug. So I typed &lt;strong&gt;fix it&lt;/strong&gt;. And it did.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;2024-09-21 11:54 7fc1488 fix: resolve template render error in layout.njk&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;aider&lt;/code&gt; offers to run the command to start the site in dev mode, and I agreed. The initial site looks like this:&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;Screenshot at 2024-09-28 02-56-10&#34; src=&#34;https://github.com/user-attachments/assets/c68799f3-0997-4b47-8743-b54ddf808659&#34; /&gt;&lt;/p&gt;
&lt;p&gt;Retrofitting the file structure to my existing content is something that usually trips me up
when trying to migrate to a different blog engine. It was pretty much automatic with these tools:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;2024-09-21 11:57 44d680e feat: move the source of the posts to pages/YYYY&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It borked the footer code now and then. I was about to give up in frustration, but
since &lt;strong&gt;fix it&lt;/strong&gt; generally works, I just moved on without worrying about it too much.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;2024-09-21 12:03 d93752d fix: Remove Liquid escaping from copyright footer&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Tags took a couple tries:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;2024-09-21 12:07 152ff32 feat: Add &#39;writing&#39; tag to first post&lt;/li&gt;
&lt;li&gt;2024-09-21 12:09 804eb5a feat: Add navigation and improve layout&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Between those two, I said &lt;strong&gt;I don&#39;t see the new &#34;writing&#34; tag. how do tags work in 11ty?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;With an LLM, we don&#39;t have to settle for Lorem Ipsum. I
made a &lt;strong&gt;make up a dozen posts going back several years&lt;/strong&gt; wish, and lo...&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;2024-09-21 12:12 591e119 feat: Add a dozen new blog posts and update index page with archives&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Next wish: &lt;strong&gt;under Recent Posts, each item should include the post summary. if the post has no explicit summary, use the 1st 135 characters&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;2024-09-21 12:35 5123baa feat: Add post summary to Recent Posts section&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;each post should show the date and tags at the bottom&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;2024-09-21 12:39 4a9cf7f feat: add date and tags to post layout&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;add a tag index; that is: a list of the tags, each linked to a list of all the posts with that tag&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;2024-09-21 12:42 46e57da feat: Add tag index pages&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;good. but can you change the url structure from /tags/foo/ to /search/label/foo/ ?&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;2024-09-21 12:43 f9dc1d0 feat: Change URL structure from /tags/foo/ to /search/label/foo/&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;good! now change the tags index from a list to a tag cloud; that is: tags with more posts are bigger&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;2024-09-21 12:45 45afb88 feat: Implement tag cloud in tags index&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img alt=&#34;image&#34; src=&#34;https://github.com/user-attachments/assets/705b710c-dcd8-4578-8ddd-d6eb6e0c8d9d&#34; /&gt;&lt;/p&gt;
&lt;p&gt;I did a little research to figure out which search library I wanted to use, and then
asked it to &lt;strong&gt;add search using minisearch&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;2024-09-21 13:08 4f8d01b feat: Add search functionality using MiniSearch&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Then I started playing around with style:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;2024-09-21 13:25 55e0f22 feat: use serif fonts&lt;/li&gt;
&lt;li&gt;2024-09-21 13:27 26e7149 feat: Add blockquote styles with italics and large quotation mark&lt;/li&gt;
&lt;li&gt;2024-09-21 14:21 6ae305a feat: Add laboratory notebook style to background&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And finally:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;2024-09-28 03:37 472793c feat: Move the Welcome section to the bottom and rename it to &#34;About MadMode&#34;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;move-section-down.cast 
    https://asciinema.org/a/678027&lt;/p&gt;
&lt;p&gt;aider wrote 7% of its own code
in the most recent release, it wrote 70% https://github.com/paul-gauthier/aider/releases/tag/v0.57.0&lt;/p&gt;
&lt;p&gt;It can definitely make something &lt;em&gt;good enough to criticize&lt;/em&gt;... not
a finished product, but something that&#39;s close enough to go &#34;no, not like that, but...&#34; and now
you have a better sense of what you &lt;em&gt;do&lt;/em&gt; want.&lt;/p&gt;</description>
            <pubDate>Sat, 28 Sep 2024 00:00:00 +0000</pubDate>
            <guid>http://www.madmode.com//2024/llm-pairing-jamstack/</guid>
        </item>
        <item>
            <title>One Year with an E-bike</title>
            <link>http://www.madmode.com//2024/e-bike-1-year/</link>
            <description>&lt;p&gt;I wasn&#39;t sure how long it would last when I replaced my car with an ebike. After a year, I have not once wished I had my own car.&lt;/p&gt;
&lt;p&gt;When one of my kids moved out last spring, I gave him my car, a 2006 Infinity G35X. Shopping for a replacement was a depressing prospect. I had gotten a great deal on that G35 in 2019 (paid about $5k, including $1.5k in repairs), and I had little hope of finding another deal like that, especially with the &lt;a href=&#34;https://www.npr.org/2023/03/18/1163278082/car-prices-used-cars-electric-vehicles-pandemic&#34;&gt;impact of the pandemic on car prices&lt;/a&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Retail used-vehicle prices now average $26,510.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;With new car prices averaging $49K, I started to think I might as well get a Tesla. But as I looked closer, I realized they&#39;re not so good for the planet after all.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Walk, bike or take the train for the lowest footprint -- &lt;a href=&#34;https://ourworldindata.org/travel-carbon-footprint#article-citation&#34;&gt;Our World in Data&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;With several e-bike models around $1,000, I figured I could hire a car when I need one and still save a lot.&lt;/p&gt;
&lt;h2&gt;Heybike Ranger&lt;/h2&gt;
&lt;p&gt;I like the fat tire style. I picked a &lt;a href=&#34;https://www.heybike.com/products/heybike-ranger-step-thru-electric-bike&#34;&gt;Heybike Ranger Electric Bike&lt;/a&gt; (&lt;a href=&#34;https://www.amazon.com/gp/product/B0CYC185VD/&#34;&gt;from amazon&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;Heybike Ranger fat-tire e-bike, assembled&#34; src=&#34;https://lh3.googleusercontent.com/pw/AP1GczN0qvx05QWKrViGW1Z1Vhrf0MhChoisYYmJsMzvTT7ChOyxJfIMx4jl5_6f57GERH1_STocIYlBW4KPr8JbfJ7iIHaXmrFB-SKBMu5JGIjgwSn_Vsogk4mkLh8GVHTVxdvVrT-qxNzM2DqNDVwNFSh8=w1392-h783-s-no-gm&#34; /&gt;&lt;/p&gt;
&lt;p&gt;Assembly took about an hour, with a few frustrations here and there as the instructions and &lt;a href=&#34;https://www.youtube.com/watch?v=qZd_xIp8QZg&#34;&gt;video&lt;/a&gt; didn&#39;t exactly match what came in the box.&lt;/p&gt;
&lt;h2&gt;Riding to shops and restaurants&lt;/h2&gt;
&lt;p&gt;Feeling the wind and sun as I ride to nearby shops and such really is exhilarating.&lt;/p&gt;
&lt;p&gt;Full disclosure:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Mine wasn&#39;t the only car in the house. I still have access to my wife&#39;s car when she is not using it.&lt;/li&gt;
&lt;li&gt;I work from home, so commuting is not an issue.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I have some of the usual accessories:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://www.amazon.com/dp/B092QKJNPM/&#34;&gt;BriskMore Bike Handlebar Mirror&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.amazon.com/gp/product/B01KD9AQ92/&#34;&gt;Via Velo Heavy Duty Bicycle U-Lock&lt;/a&gt; - the U-Lock is a pretty secure option, except that sometimes I don&#39;t bother. Plus, it rattles when I ride. So I&#39;m considering one of the motion-activated alarms.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.amazon.com/gp/product/B085DMV7XD/&#34;&gt;Lamicall Bike Phone Holder&lt;/a&gt; - Google Maps has pretty good bike directions.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.amazon.com/gp/product/B06XPXTCTK/&#34;&gt;ROCKBROS Bike Trunk Bag&lt;/a&gt; - I tried a couple different kinds of panniers and even a milk crate. But they get in the way when I&#39;m just trying to get from here to there, and getting them on and off is a bother. So this bag is just right: I keep it on all the time, but I only unfold the panniers when I need them for groceries or the like.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Folding&lt;/h2&gt;
&lt;p&gt;Lifting the 70lb bike is a bit of a challenge, but folding is especially useful if I bike one way and get a ride the other; it even fits in the back of a Prius!
&lt;img alt=&#34;Heybike stock photo of folding the bike into a car&#34; src=&#34;https://www.heybike.com/cdn/shop/files/ae1ff23ad17489e42d354c187e091b5d_e0fb07ef-1aa6-434c-b2e1-49047a81a2a2.jpg?v=1710837587&amp;amp;width=400&#34; /&gt;&lt;/p&gt;
&lt;h2&gt;Brakes: squeaky or mushy&lt;/h2&gt;
&lt;p&gt;The brakes squeaked when I first got it. I found an adjustment to address that, but it made the brakes so mushy I could hardly stop. So I live with a bit of squeak.&lt;/p&gt;
&lt;h2&gt;Speed: 25mph&lt;/h2&gt;
&lt;p&gt;Ok, so it only goes that fast downhill. But even uphill, going 15mph+ without pedaling hard sure is nice :)&lt;/p&gt;
&lt;p&gt;The top speed is fast enough that my eyes water. So rather than one of the bike helmets we&#39;ve had in the garage for decades, I now use a &lt;a href=&#34;https://www.amazon.com/gp/product/B07P5LB7Y3/&#34;&gt;VICTGOAL Bike Helmet with Detachable Magnetic Goggles&lt;/a&gt;. Bonus: works as sunglasses too.&lt;/p&gt;
&lt;h2&gt;Cold weather riding&lt;/h2&gt;
&lt;p&gt;Going that fast does make it feel colder. But with the right gear, even riding below freezing is not bad. &lt;a href=&#34;https://www.amazon.com/gp/product/B0CCP3MPWZ/&#34;&gt;LINGSFIRE Bike Handlebar Mittens&lt;/a&gt; are cozy.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;mittens for cold&#34; src=&#34;https://lh3.googleusercontent.com/pw/AP1GczN7dGqs87eKdQEs4dubxpaLTBME8WNdVNDL--V_BmOZDkNCiV22iVlUYlWABC5P_XYxUFVumabcK46iIvLdA8rDj9EyXyrR-KfkRKegKgRlHh-b_KKb8STISz75Y89WgW13spiIT2xAJ5PrQe5ib3XEkA=w612-h813-s-no-gm?authuser=0&#34; /&gt;&lt;/p&gt;
&lt;p&gt;I haven&#39;t tried it in the rain, much.&lt;/p&gt;
&lt;h2&gt;Range?&lt;/h2&gt;
&lt;p&gt;I don&#39;t know what the range is. My trips are typically a mile or two. I averaged 7.7miles per week over the year. I think my longest trip was about 5 miles each way. It was to music practice, with my guitar on my back :)&lt;/p&gt;</description>
            <pubDate>Sat, 04 May 2024 00:00:00 +0000</pubDate>
            <guid>http://www.madmode.com//2024/e-bike-1-year/</guid>
        </item>
        <item>
            <title>Ubuntu 5.10, archive.org, and .torrent files</title>
            <link>http://www.madmode.com//2023/archive-ubuntu-torrent/</link>
            <description>&lt;p&gt;I&#39;m ready to say goodbye to my copy of &lt;a href=&#34;https://archive.org/details/ubuntu-5.10-pc&#34;&gt;Ubuntu 5.10 for i386&lt;/a&gt; on CD, after nearly 2 decades of keeping it as a combination keepsake and software supply chain anchor. I donated it to archive.org:&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://archive.org/details/ubuntu-5.10-pc&#34;&gt;&lt;img alt=&#34;Ubuntu 5.10&#34; src=&#34;https://ia804507.us.archive.org/14/items/ubuntu-5.10-pc/__ia_thumb.jpg&#34; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;While brainstorming about Merkle trees for file access, I noticed that not only does archive.org OCR the PDF I gave them of the cover and support browsing of the contents of &lt;a href=&#34;https://ia904507.us.archive.org/view_archive.php?archive=/14/items/ubuntu-5.10-pc/Ubuntu%205.10%20i386.iso&#34;&gt;Ubuntu 5.10 i386.iso&lt;/a&gt;, but they provide &lt;a href=&#34;https://archive.org/download/ubuntu-5.10-pc/ubuntu-5.10-pc_archive.torrent&#34;&gt;ubuntu-5.10-pc_archive.torrent&lt;/a&gt;, which means I can have high-performance access to the the full contents of the CDs for just 29k of storage. And brave supports &lt;code&gt;.torrent&lt;/code&gt; files natively with WebTorrent (&lt;a href=&#34;https://webtorrent.io/intro&#34;&gt;WebTorrent Tutorial&lt;/a&gt; looks pretty straightforward.)&lt;/p&gt;
&lt;p&gt;But what&#39;s in that &lt;code&gt;.torrent&lt;/code&gt; file? Aha! &lt;a href=&#34;https://en.wikipedia.org/wiki/Bencode&#34;&gt;bencode&lt;/a&gt; from &lt;a href=&#34;https://www.bittorrent.org/beps/bep_0003.html#bencoding&#34;&gt;BEP 3&lt;/a&gt;! I&#39;ve heard of it in &lt;a href=&#34;https://github.com/ocapn/ocapn/issues/1#issuecomment-819652299&#34;&gt;OCapN discussion&lt;/a&gt;
but didn&#39;t realize it comes from bittorrent. &lt;a href=&#34;https://www.nayuki.io/page/bittorrent-bencode-format-tools&#34;&gt;BitTorrent bencode format tools&lt;/a&gt; is really handy, including stopping in a debugger to see the details:&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;image&#34; src=&#34;https://github.com/dckc/madmode-blog/assets/150986/39fc8f12-4679-4fe3-91df-30814143c001&#34; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/johngunderman/haskell-torrent/blob/0385d0d4af9778053317d2b7725ef027ae870daf/src/Protocol/BCode.hs#L60-L65&#34;&gt;BCode.hs from haskell-torrent&lt;/a&gt; has a crisp specification:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-hs&#34;&gt;-- | BCode represents the structure of a bencoded file
data BCode = BInt Integer                       -- ^ An integer
           | BString B.ByteString               -- ^ A string of bytes
           | BArray [BCode]                     -- ^ An array
           | BDict (M.Map B.ByteString BCode)   -- ^ A key, value map
  deriving (Show, Eq)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;...&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-hs&#34;&gt;-- | Return the hash of the info-dict in a torrent file
hashInfoDict :: BCode -&amp;gt; IO Digest
hashInfoDict bc =
  do ih &amp;lt;- case info bc of
              Nothing -&amp;gt; fail &amp;quot;Could not find infoHash&amp;quot;
              Just x  -&amp;gt; return x
     let encoded = encode ih
     digest $ L.fromChunks $ [encoded]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Playing with &lt;a href=&#34;https://www.npmjs.com/package/parse-torrent&#34;&gt;parse-torrent&lt;/a&gt; in a &lt;a href=&#34;https://stackblitz.com/edit/stackblitz-starters-gcvlq7&#34;&gt;parse-torrent-ubuntu-5.10 project on StackBlitz&lt;/a&gt; is handy in that it shows the &lt;code&gt;infoHash&lt;/code&gt;, &lt;code&gt;b890d2e1174a809d1cd0437de30400c542e0a939&lt;/code&gt;, but its JSON output misled me about the real structure: there is no &lt;code&gt;infoHash&lt;/code&gt; key in the file; there&#39;s an &lt;code&gt;info&lt;/code&gt; dictionary that gets hashed.&lt;/p&gt;
&lt;p&gt;Say... Ubuntu offers bittorrent as a download option; maybe they keep a 5.10 &lt;code&gt;.torrent&lt;/code&gt; file around? I didn&#39;t find one from them, but I did find:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://archive.org/details/Ubuntu-5.10&#34;&gt;Ubuntu 5.10 (Breezy Badger) : Canonical Ltd., Ubuntu community : Internet Archive&lt;/a&gt;&lt;br /&gt;
   Source &lt;a href=&#34;https://archive.org/search.php?query=source%3A%22torrent%3Aurn%3Asha1%3A329a357ebd51db73417e1ad767b041291f598ae8%22&#34;&gt;torrent:urn:sha1:329a357ebd51db73417e1ad767b041291f598ae8&lt;/a&gt;
  Addeddate: 2017-06-20 14:16:31
  Identifier: Ubuntu-5.10&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Note the &lt;strong&gt;Source&lt;/strong&gt;; yes, &lt;a href=&#34;https://help.archive.org/help/archive-bittorrents/&#34;&gt;Internet Archive ingests BitTorrents&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Somehow my &lt;code&gt;Ubuntu 5.10 i386.iso&lt;/code&gt; is 632,262 kb, which is 300 kb larger than theirs (631,962 kb). Maybe some &lt;a href=&#34;https://gitlab.gnome.org/GNOME/gnome-disk-utility/-/issues/321&#34;&gt;unused space captured by gnome-disk-utility&lt;/a&gt; when I ripped the CD?&lt;/p&gt;</description>
            <pubDate>Thu, 21 Dec 2023 00:00:00 +0000</pubDate>
            <guid>http://www.madmode.com//2023/archive-ubuntu-torrent/</guid>
        </item>
        <item>
            <title>walk-n-talk?</title>
            <link>http://www.madmode.com//2023/walk-n-talk/</link>
            <description>&lt;p&gt;walk-n-talk?&lt;/p&gt;
&lt;p&gt;That&#39;s short for: would you like to talk with me as I take my dog on a walk?&lt;/p&gt;
&lt;p&gt;When the pandemic hit, I traded in my commute to &lt;a href=&#34;/label/cube%20life/&#34;&gt;KU Med Center&lt;/a&gt; for a walk with my dog Mojo.&lt;/p&gt;
&lt;figure&gt;
  &lt;img alt=&#34;my dog Mojo on a walk in the fall in KC&#34;
    src=&#34;https://lh3.googleusercontent.com/pw/ADCreHchkU0fj04I0dsci4RXy-w4nbcVRW7yG7ntZ3EHb-6wI-_Ewp0gLPVGwcQfLg89aTncmoGfUhL1ipecUI8DJKpa-WkMdPWptdE4LXZUANLT4ZxvCAje7GldCUreHtXrXEfVTdvyDLOZ6Oi8UetRq-GV=w616-h765-s-no-gm&#34;
    width=&#34;400&#34; /&gt;
&lt;/figure&gt;

&lt;p&gt;While we&#39;re out walking, I like to talk with a friend, family member, or some colleagues.
Mojo really likes it because I lose track of time and she gets to smell everything more.&lt;/p&gt;
&lt;p&gt;Usually it&#39;s a plain 1-1 phone call (or &lt;a href=&#34;https://support.signal.org/hc/en-us/articles/360007060492-Voice-or-Video-Calling&#34;&gt;signal call&lt;/a&gt;). But
sometiems it&#39;s a group thing. It&#39;s great to talk-real time with
colleagues around the globe, but sometimes the tech reminds
you that there&#39;s nothing like being there:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Zoom: the dominant player. Pretty reliable&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://meet.jit.si/&#34;&gt;Jitsi Meet&lt;/a&gt;: based on open tech.
   Also reliable in my experience. The main drawback is that recording
isn&#39;t as well integrated.&lt;/li&gt;
&lt;li&gt;Discord void: disappointing, especially since
I gather the reason it was created was to provide a voice
side-channel for gaming.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href=&#34;/contact/&#34;&gt;Contact me&lt;/a&gt; if you&#39;re interested to chat some time.&lt;/p&gt;</description>
            <pubDate>Sat, 18 Nov 2023 00:00:00 +0000</pubDate>
            <guid>http://www.madmode.com//2023/walk-n-talk/</guid>
        </item>
        <item>
            <title>Office Hours: Patterns of Cooperation without Vulnerability</title>
            <link>http://www.madmode.com//2023/office-hours/</link>
            <description>&lt;p&gt;One of my favorite patterns of cooperation is &lt;dfn&gt;Office Hours&lt;/dfn&gt;.
I open my office, virtually, and welcome questions and other open discussion,
mostly about the way &lt;a href=&#34;http://erights.org/&#34;&gt;object capabilities&lt;/a&gt; can be used to form patterns
of cooperation without vulnerabilities, but also wider discussion of Web Architecture,
open source, project management... and occasionally, to fill gaps, guitar :)&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/Agoric/agoric-sdk/wiki/Office-Hours&#34;&gt;Agoric Dev Office Hours&lt;/a&gt;
on Wednesdays is the main series these days.&lt;/p&gt;
&lt;figure&gt;
&lt;a href=&#34;https://github.com/Agoric/agoric-sdk/discussions/8489&#34;&gt;
&lt;img alt=&#34;Dan&#39;s talking head next to an Agoric web page&#34;
src=&#34;https://user-images.githubusercontent.com/150986/284014913-a1623da3-d9ba-4da4-abb5-e1a96fbabdbc.png&#34;
/&gt;&lt;/a&gt;
&lt;/figure&gt;

&lt;p&gt;&lt;a href=&#34;https://github.com/Agoric/agoric-sdk/discussions/categories/office-hours?discussions_q=is%3Aopen+category%3A%22Office+Hours%22+label%3Avideo-recording&#34;&gt;Notes with video recordings&lt;/a&gt;
are the norm. &lt;a href=&#34;https://github.com/Agoric/agoric-sdk/discussions/categories/office-hours?discussions_q=is%3Aopen+category%3A%22Office+Hours%22+&#34;&gt;All episodes&lt;/a&gt;
have at least a tab dump of the links discussed in the session
(&lt;em&gt;thanks to the &lt;a href=&#34;https://chrome.google.com/webstore/detail/tabcopy/micdllihgoppmejpecmkilggmaagfdmb&#34;&gt;TabCopy&lt;/a&gt; extension&lt;/em&gt;).&lt;/p&gt;
&lt;p&gt;There&#39;s a lot going on at Agoric!&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://community.agoric.com/t/big-news-at-agoric-appjam-at-cosmoverse-liquid-staked-atom-for-vaults/507&#34;&gt;Big News at Agoric: AppJam at Cosmoverse, Liquid Staked ATOM for Vaults - Agoric Community Forum&lt;/a&gt;
Oct 15&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I started doing Saturday &lt;a href=&#34;https://github.com/rchain/bounties/issues/403&#34;&gt;RChain community building office hours: Story Telling and Test Cases&lt;/a&gt; in 2018.
but as the &lt;a href=&#34;/2019/rchain-blues&#34;&gt;RChain Blues&lt;/a&gt; set in, I re-scoped
my Saturday time as &lt;a href=&#34;https://github.com/dckc/awesome-ocap/issues/22&#34;&gt;awesome-ocap office hours&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I haven&#39;t had critical mass on a Saturday morning for a while,
so I join &lt;a href=&#34;https://fossandcrafts.org/hack-and-craft/&#34;&gt;Hack &amp;amp; Craft&lt;/a&gt; now and then.
Darn... this is an off week; they only run 1st and 3rd Saturdays of the month.&lt;/p&gt;</description>
            <pubDate>Sat, 18 Nov 2023 00:00:00 +0000</pubDate>
            <guid>http://www.madmode.com//2023/office-hours/</guid>
        </item>
        <item>
            <title>Toward capabilities all the way down with Genode on a Thinkpad</title>
            <link>http://www.madmode.com//2023/genode-thinkpad-dual-boot/</link>
            <description>&lt;p&gt;In this year&#39;s holiday lull, I got closer to a &#34;capabilities all the way down&#34; workstation using &lt;a href=&#34;https://genode.org/&#34;&gt;Genode&lt;/a&gt;, an OS framework with capability-based security.&lt;/p&gt;
&lt;p&gt;Sculpt is a Genode-based general-purpose OS.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;Sculpt system overview&#34; src=&#34;https://genode.org/documentation/articles/sculpt_overview.png&#34; /&gt;&lt;/p&gt;
&lt;p&gt;Genode has a choice of low level microkernels at the bottom.
Sculpt uses the &lt;a href=&#34;http://hypervisor.org/&#34;&gt;NOVA microhypervisor&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;... the NOVA microhypervisor uses a capability-based authorization model and provides only basic mechanisms for virtualization, spatial and temporal separation, scheduling, communication, and management of platform resources.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;NOVA isn&#39;t formally verified like seL4, but it&#39;s tiny (9,000 LOC):&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img alt=&#34;figure 1&#34; src=&#34;https://user-images.githubusercontent.com/150986/210296418-9ce6f1e6-ce31-4328-96e9-8009a815d7cc.png&#34; /&gt;&lt;br /&gt;
Figure 1: Comparison of the TCB size of virtual environments.
-- &lt;a href=&#34;http://hypervisor.org/eurosys2010.pdf&#34;&gt;Steinberg 2010&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;... not to mention mature: that peer-reviewed release was in 2010 and the &lt;a href=&#34;https://github.com/alex-ab/NOVA/blob/a34076e/doc/specification.pdf&#34;&gt;spec&lt;/a&gt; last changed in 2014.
It&#39;s clearly trustworthy enough for my hobby usage.&lt;/p&gt;
&lt;p&gt;For reference, &lt;a href=&#34;https://github.com/genodelabs/genode/blob/sculpt-22.10/repos/base-nova/ports/nova.port&#34;&gt;genode sculpt-22.10 &lt;code&gt;ports/nova.port&lt;/code&gt;&lt;/a&gt; points to &lt;a href=&#34;https://github.com/alex-ab/NOVA/tree/a34076e&#34;&gt;NOVA a34076e&lt;/a&gt;, modified Sep 29. So they do continue to make the occasional tweak here and there to the C++ code... prompted by Sculpt usage, I suspect.&lt;/p&gt;
&lt;p&gt;The Sculpt release notes include a tutorial on how to boot it from a USB drive and play around with it; I managed to get that far back in 2018. This time, I got a more clear understanding of how &lt;a href=&#34;https://genode.org/documentation/articles/sculpt-22-10#Making_customizations_permanent&#34;&gt;persistent configuration&lt;/a&gt; on a partition of the USB drive works. A big clue is that the built-in &#34;inspect&#34; view is plenty for command-line file manipulation; there&#39;s no need to install and configure all the components of a shell.&lt;/p&gt;
&lt;p&gt;I wanted to reproduce Schlatow&#39;s results from &lt;a href=&#34;https://genodians.org/jschlatow/2021-04-23-start-existing-linux-from-sculpt&#34;&gt;Starting an existing Linux installation from Sculpt&lt;/a&gt;. I managed to&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/dckc/madmode-blog/issues/49#issuecomment-1356447232&#34;&gt;partition the hard drive&lt;/a&gt;&lt;ul&gt;
&lt;li&gt;considered &lt;a href=&#34;https://github.com/nix-community/disko&#34;&gt;nix declarative disk partitioning with disko&lt;/a&gt; a la &lt;a href=&#34;https://lobste.rs/s/aamjm7/setting_up_my_new_laptop_nix_style&#34;&gt;McGee&#39;s notes&lt;/a&gt;&lt;ul&gt;
&lt;li&gt;learned a bit more about &lt;a href=&#34;https://nixos.org/manual/nix/unstable/command-ref/new-cli/nix3-flake.html&#34;&gt;nix flakes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;tried to make my own flake; re-discovered &lt;a href=&#34;https://lobste.rs/s/ff54p1/how_nix_nixos_get_so_close_perfect#c_po5s5h&#34;&gt;my problem with nix&lt;/a&gt;: unlike &lt;code&gt;apt&lt;/code&gt; where if you get an option wrong, some C code tells you that you got an option wrong, nix just passes the wrong option down into interpreted code where you eventually get “string found where integer expected” or some such. As Phil Karlton would say, &#34;yet another interpreted language without a debugger.&#34;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;install linux on the internal SDD&lt;/li&gt;
&lt;li&gt;install genode on another partition&lt;ul&gt;
&lt;li&gt;though I couldn&#39;t get the grub config to work automatically&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;and I downloaded the components to run a VM, but when I tried to start it up, it couldn&#39;t find &lt;code&gt;/machine.vbox6&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;[runtime] child &amp;quot;vbox6&amp;quot;
[runtime]   RAM quota:  4402952K
[runtime]   cap quota:  7966
...
[runtime -&amp;gt; vbox6 -&amp;gt; vbox] main     Executable:  /virtualbox6
[runtime -&amp;gt; vbox6 -&amp;gt; vbox] Error: failed to init machine from settings
[runtime -&amp;gt; vbox6 -&amp;gt; vbox] Runtime error opening &#39;/machine.vbox6&#39; for reading: -102 (File not found.).
[runtime -&amp;gt; vbox6 -&amp;gt; vbox] /data/depot/genodelabs/src/vbox6/2022-10-11/src/virtualbox6/src/VBox/Main/src-server/MachineImpl.cpp[499] (nsresult Machine::initFromSettings(VirtualBox*, const com::Utf8Str&amp;amp;, const com::Guid*))
[core] attempted exec at non-executable memory (EXEC pf_addr=0x271dd78 pf_ip=0x271dd78 from pager_object: pd=&#39;init -&amp;gt; runtime -&amp;gt; vbox6 -&amp;gt; vbox&#39; thread=&#39;ep&#39;) 
[core] page fault, pd=&#39;init -&amp;gt; runtime -&amp;gt; vbox6 -&amp;gt; vbox&#39; thread=&#39;ep&#39; cpu=0 ip=0x271dd78 address=0x271dd78 stack pointer=0x403fe6b8 qualifiers=0x15 IrUwP reason=3
[core] no RM attachment (READ pf_addr=0x0 pf_ip=0x16bb302 from pager_object: pd=&#39;init -&amp;gt; runtime -&amp;gt; vbox6 -&amp;gt; vbox&#39; thread=&#39;Watcher&#39;) 
[core] page fault, pd=&#39;init -&amp;gt; runtime -&amp;gt; vbox6 -&amp;gt; vbox&#39; thread=&#39;Watcher&#39; cpu=0 ip=0x16bb302 address=0x0 stack pointer=0x409feb00 qualifiers=0x4 irUwp reason=1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;After a &lt;a href=&#34;https://www.diigo.com/user/dckc-madmode&#34;&gt;a bit of diigoing&lt;/a&gt;, I came to the conclusion that there&#39;s a significant gap in my education around using VirtualBox in general, never mind in Genode.&lt;/p&gt;</description>
            <pubDate>Tue, 03 Jan 2023 00:00:00 +0000</pubDate>
            <guid>http://www.madmode.com//2023/genode-thinkpad-dual-boot/</guid>
        </item>
        <item>
            <title>Divesting from Flickr in the Annual File Purge</title>
            <link>http://www.madmode.com//2023/file-purge-flickr-divest/</link>
            <description>&lt;p&gt;I spent much of this year&#39;s annual file purge recovering from &lt;a href=&#34;https://blog.flickr.net/en/2022/04/19/update-free-account-limit-changes-and-enforcement-start-may-1-2022/&#34;&gt;Flickr going back on their 1TB storage offer&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;While &lt;a href=&#34;https://github.com/dckc/madmode-blog/issues/49&#34;&gt;tinkering with Genode&lt;/a&gt; and catching up on Metamath (RIP, Norm Megill), I made a lot of use of github issues as my lab notebook; I can search copies of my comments in my email since &lt;a href=&#34;https://www.madmode.com/2021/closet-librarian-approach-cloud-services&#34;&gt;I&#39;m a closet librarian and I don&#39;t trust cloud services completely&lt;/a&gt;. One of these searches led me to the pile of monthly &lt;strong&gt;&#34;account in violation free account limits&#34;&lt;/strong&gt; nasty-grams building up since May:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://blog.flickr.net/en/2022/04/19/update-free-account-limit-changes-and-enforcement-start-may-1-2022/&#34;&gt;Update: Free account limit changes and enforcement start May 1, 2022. \| Flickr Blog&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Back in 2015, I mostly knew better, but I did take them up on their terabyte storage offer:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;My photostream on flickr goes back to &lt;a href=&#34;https://www.flickr.com/photos/dckc/archives/date-posted/2004/12/calendar/&#34;&gt;Dec 2004&lt;/a&gt; when it was big in the open web community. I could never bring myself to go premium, but in May 2013 when they announced the terabyte storage offer, I dusted it off. - &lt;a href=&#34;../2015/photo-flickr-explore.html&#34;&gt;MadMode: Syncing a 5 Year iPhoto Library with flickr&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I have about 50GB of files from a Flickr data request Feb 17, 2019 on an external SSD. I didn&#39;t take the time to keep the private data separate from the code and other detailed notes, but briefly, I&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;verified access to 47GB of data from a March 2019 Flickr data request (&lt;code&gt;72157706876334384_ff8f2206a90f_part1.zip&lt;/code&gt; etc.) by copying it from an external SSD to an internal NVMe.&lt;ul&gt;
&lt;li&gt;Why did that take 20 minutes? Oops... I used a USB2 cable and so lost USB3 &#34;SuperSpeed&#34;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;verified that I can recover a favorite album from iPhoto&lt;ul&gt;
&lt;li&gt;dealt with the fact that the &lt;code&gt;photo_NNN.json&lt;/code&gt; files don&#39;t actually contain the name of the &lt;code&gt;abc_NNN_xyz.jpg&lt;/code&gt; media files&lt;/li&gt;
&lt;li&gt;joined the flickr ids with iPhoto ids using records from the 2015 upload process&lt;ul&gt;
&lt;li&gt;used nix to bring up a juypter notebook environment with the relevant goodies: &lt;code&gt;nix-shell -p &#34;python3.withPackages(ps: with ps; [ipython jupyter numpy pandas pillow flickrapi progress crc32c])&#34;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;made a simple HTML list of links to photos&lt;/li&gt;
&lt;li&gt;reverse-engineered the way Web-iPhoto would make an album of those photos from iPhoto files:&lt;ul&gt;
&lt;li&gt;wrote out &lt;code&gt;albums&lt;/code&gt; and &lt;code&gt;photos&lt;/code&gt; JSON&lt;ul&gt;
&lt;li&gt;discovered the README docs were incomplete and the code needs &lt;code&gt;tree&lt;/code&gt; too.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;verified that I can recover a favorite keyword from Apple photos&lt;ul&gt;
&lt;li&gt;reified the keyword as a directory with symlinks to the relevant photo files&lt;/li&gt;
&lt;li&gt;toured &lt;a href=&#34;https://simonwillison.net/2020/May/21/dogsheep-photos/&#34;&gt;simonwillison&#39;s dogsheep-photos work&lt;/a&gt; and &lt;a href=&#34;https://github.com/RhetTbull/osxphotos&#34;&gt;osxphotos&lt;/a&gt; while decoding the Apple photos database.&lt;/li&gt;
&lt;li&gt;evaluated &lt;a href=&#34;https://photoprism.app/&#34;&gt;photoprism&lt;/a&gt;, an &#34;AI-Powered Photos App for the Decentralized Web&#34; in hopes that open source AI would help me curate interesting photos the way Apple&#39;s applied &lt;a href=&#34;https://machinelearning.apple.com/research/recognizing-people-photos&#34;&gt;computer-vision research&lt;/a&gt; did for Simon&lt;ul&gt;
&lt;li&gt;wow! nicely packaged!&lt;/li&gt;
&lt;li&gt;bulk import with move option for canonical naming: &lt;code&gt;2015/10/20150510_015146_88F59DFB.jpg&lt;/code&gt;&lt;ul&gt;
&lt;li&gt;that hash is a Castagnoli &lt;a href=&#34;https://pypi.org/project/crc32c/&#34;&gt;crc32c&lt;/a&gt;, the one with hardware support, not the one from the python stdlib.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;deleted all 10,000+ non-private photos using the &lt;a href=&#34;https://stuvel.eu/software/flickrapi/&#34;&gt;flickr API&lt;/a&gt; so I&#39;ll stop getting those monthly nasty-grams.&lt;ul&gt;
&lt;li&gt;learned to use the &lt;a href=&#34;https://pypi.org/project/progress/&#34;&gt;progress&lt;/a&gt; package to see that it would take about an hour&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I made lots of &lt;a href=&#34;https://www.diigo.com/user/dckc-madmode&#34;&gt;diigo bookmarks and annotations&lt;/a&gt; too.&lt;/p&gt;
&lt;h3&gt;Footnote on Apple photos dates&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://discussions.apple.com/message/27873467#27873467&#34;&gt;Apple support discussion Apr 2015&lt;/a&gt; gives us some clues about the database schema, which seems to be an &lt;a href=&#34;https://en.wikipedia.org/wiki/Photos_(application)&#34;&gt;Aperture&lt;/a&gt; database (&lt;code&gt;apdb&lt;/code&gt;).&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Aperture uses Core Data, which is a database-independent abstraction layer, and thus does not use the native SQLite encoding for dates (juliandate), but rather the NSDate format, which should be a double-precision number of seconds since the reference date (2001-01-01 00:00:00 GMT). -- &lt;a href=&#34;https://majid.info/blog/aperture-internals/#comment-4860&#34;&gt;majid 2011-05-03&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;</description>
            <pubDate>Tue, 03 Jan 2023 00:00:00 +0000</pubDate>
            <guid>http://www.madmode.com//2023/file-purge-flickr-divest/</guid>
        </item>
        <item>
            <title>Unbelievably good noise cancellation</title>
            <link>http://www.madmode.com//2022/09-amazing-headset/</link>
            <description>&lt;p&gt;It was loud. I mean &lt;strong&gt;really&lt;/strong&gt; loud. Like guns going off over my head.
The noise from the nailguns and hammers from the hardwood floor installation
going on right above my office.&lt;/p&gt;
&lt;p&gt;I apologized to the other folks in the meeting about the background noise,
but since my business in the meeting was urgent and the noise
wasn&#39;t going to get any better, I pressed on.&lt;/p&gt;
&lt;p&gt;They dind&#39;t hear it. At all. They reported my voice was coming through
just fine.&lt;/p&gt;
&lt;p&gt;I still hardly believe it.&lt;/p&gt;
&lt;p&gt;Hats off to Corsair!&lt;/p&gt;
&lt;p&gt;And thanks, B!&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ lsusb | grep -i headset
Bus 001 Device 018: ID 1b1c:0a17 Corsair Corsair VOID PRO USB Gaming Headset
&lt;/code&gt;&lt;/pre&gt;</description>
            <pubDate>Fri, 09 Sep 2022 00:00:00 +0000</pubDate>
            <guid>http://www.madmode.com//2022/09-amazing-headset/</guid>
        </item>
        <item>
            <title>Hello Spritely Institute! And Haunt. And Guix, again</title>
            <link>http://www.madmode.com//2022/spritely-haunt-guix/</link>
            <description>&lt;p&gt;Hello, &lt;a href=&#34;https://spritely.institute/&#34;&gt;Spritely Institute&lt;/a&gt;!&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;... ActivityPub, social networks, smart contracts, object capabilities, and
secure distributed virtual worlds. ... freely licensed open source ...&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Yum, yum, gimme some! Can&#39;t wait for mind-boggling stuff like
this &lt;a href=&#34;https://blog.pimaker.at/texts/rvc1/&#34;&gt;VRChat hack&lt;/a&gt;, but powered by ocaps and open source!&lt;/p&gt;
&lt;iframe width=&#34;560&#34; height=&#34;315&#34; src=&#34;https://www.youtube-nocookie.com/embed/G2u7NOpzcBQ?controls=0&amp;amp;start=5110&#34; title=&#34;YouTube video player&#34; frameborder=&#34;0&#34; allow=&#34;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&#34; allowfullscreen&gt;&lt;/iframe&gt;

&lt;blockquote&gt;
&lt;p&gt;Privacy &amp;amp; moderation issues have triggered the permanent shutdown of millions
of networked communities and the destruction of their relationships and artifacts.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I was just talking with &lt;a href=&#34;https://twitter.com/simonw&#34;&gt;@simonw&lt;/a&gt;
about &lt;a href=&#34;https://twitter.com/dckc/status/1479108723494699021&#34;&gt;portable posts using ERTP&lt;/a&gt;.
More on that later...&lt;/p&gt;
&lt;p&gt;Nice &lt;a href=&#34;https://spritely.institute/&#34;&gt;site&lt;/a&gt; btw... shiny!&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Powered by &lt;a href=&#34;https://dthompson.us/projects/haunt.html&#34;&gt;Haunt&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Keep talking... looks clean...&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;gives authors the ability to treat websites as Scheme programs.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Or maybe Scheme programs that are also &lt;a href=&#34;https://agoric.com/documentation/guides/js-programming/hardened-js.html&#34;&gt;Hardened JavaScript&lt;/a&gt; programs,
using James / Jessie on &lt;a href=&#34;https://github.com/cwebber/rockit&#34;&gt;rockit&lt;/a&gt;?&lt;/p&gt;
&lt;p&gt;Let&#39;s give it a spin as-is before stretching it...&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;To install Haunt ..., run:
&lt;code&gt;guix install haunt&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Ah yes... &lt;a href=&#34;https://github.com/dckc/madmode-blog/issues/144&#34;&gt;guix for ocaps at the systemd level&lt;/a&gt;
is on my wish-list too. I have &lt;code&gt;guix&lt;/code&gt; on my Ubuntu workstation, don&#39;t I? Let&#39;s see...
&lt;code&gt;guix install haunt&lt;/code&gt;...
&lt;strong title=&#34;haunt 0.2.5 /gnu/store/5pk6cwrh11bgchm68phj556srvcvdlvb-profile.drv&#34;&gt;bingo!&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;Catching up with Guix after 55 days&lt;/h2&gt;
&lt;p&gt;meanwhile...&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;guix install: warning: Your Guix installation is 55 days old.
guix install: warning: Consider running &#39;guix pull&#39; followed by
&#39;guix package -u&#39; to get up-to-date packages and security updates.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;so...&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;15:38 jambox$ guix pull
Updating channel &#39;guix&#39; from Git repository at &#39;https://git.savannah.gnu.org/git/guix.git&#39;...
Authenticating channel &#39;guix&#39;, commits 9edb3f6 to 2dfbd03 (5,405 new commits)...
...
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Ugh... taking a while... I wonder what it&#39;s doing, so
I hop over to &lt;a href=&#34;https://matrix.to/#/#guix:libera.chat&#34;&gt;#guix&lt;/a&gt;
and learn that the 5K commits include a big merge recently.
I&#39;m just about to give up on it when it comes back to life...&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;185.4 MB will be downloaded
building /gnu/store/7y8wijc8zmbf8il1yzrv4ivmggi5zx7i-compute-guix-derivation.drv...
Computing Guix derivation for &#39;x86_64-linux&#39;...

News for channel &#39;guix&#39;
  Icedove 91: profile folder moved to `~/.thunderbird&#39;
  `gdm-service-type&#39; now supports Wayland

16:10 jambox$ guix package -u
The following derivation will be built:
   /gnu/store/gpf86rpdl5k21v65xdshv7qdypwc3w89-profile.drv
33.2 MB will be downloaded

16:15 jambox$ guix install haunt
The following derivation will be built:
   /gnu/store/kciishw2a3xb52ql3m55m3g16dry7p0h-profile.drv
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Thansk for the &#34;News...&#34; bit. The editorial discretion shows user-centered design.
&lt;code&gt;guix search&lt;/code&gt; is another breath of fresh air in contrast to the way &lt;code&gt;apt&lt;/code&gt; and &lt;code&gt;nix&lt;/code&gt;
seem to grudgingly provide a search feature. Likewise:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;hint: Consider setting the necessary environment variables by running:

     GUIX_PROFILE=&amp;quot;/home/connolly/.guix-profile&amp;quot;
     . &amp;quot;$GUIX_PROFILE/etc/profile
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;guix install emacs&lt;/code&gt; gives 27.2 (2021) where Ubuntu gives 26.3 (2019).
And &lt;code&gt;guix install gnucash&lt;/code&gt; has the new sqlite3 and postgres support.
Yes, this could be my tribe. I can&#39;t go all in yet because I use Brave
and I think there&#39;s a reason guix doesn&#39;t support it.&lt;/p&gt;
&lt;p&gt;Now let&#39;s pop back...&lt;/p&gt;
&lt;h2&gt;Blogging with Haunt eval, cont.&lt;/h2&gt;
&lt;p&gt;Stubbed my toe on &lt;code&gt;ERROR: In procedure setlocale: Invalid argument&lt;/code&gt;.
But &lt;code&gt;guix search locale&lt;/code&gt; guided me nicely to &lt;code&gt;guix install glibc-locales&lt;/code&gt;.
Then &lt;code&gt;asset processing failed with errno:  &#34;images&#34; 2&lt;/code&gt; because the homepage
has &lt;code&gt;(static-directory &#34;images&#34;)&lt;/code&gt; in the example config but neglects &lt;code&gt;mkdir images&lt;/code&gt;.
(The tutorial doesn&#39;t have this bug.) Now we&#39;re rolling:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;09:48 connolly@jambox$ haunt serve
serving site on port 8080
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So close! If it were &lt;code&gt;serving site on http://localhost:8080&lt;/code&gt; I could just follow the link.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;First post!
by Eva Luator&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;There&#39;s my tribe again :)&lt;/p&gt;
&lt;p&gt;But I doubt netlify supports guix as well as they support python and node.js.
Here&#39;s hoping they do it well enough...&lt;/p&gt;</description>
            <pubDate>Sat, 08 Jan 2022 00:00:00 +0000</pubDate>
            <guid>http://www.madmode.com//2022/spritely-haunt-guix/</guid>
        </item>
        <item>
            <title>Closet Librarian Approach to Cloud Services</title>
            <link>http://www.madmode.com//2021/closet-librarian-approach-cloud-services/</link>
            <description>&lt;p&gt;A colleague suggested we shouldn&#39;t delete calendar items of old meetings.
I said I don&#39;t rely on my calendar for records of the past.
Then I admitted that actually, I keep version-controlled backups of my cloud-hosted calendars.&lt;/p&gt;
&lt;p&gt;I&#39;m content to use the &lt;a href=&#34;https://support.google.com/calendar/answer/37111?hl=en&#34;&gt;Google calendar export feature&lt;/a&gt;
manually. I tend to do it in preparation for travel or perhaps when reviewing a trip:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;gdata$ hg log10
790:9efa3d723bb1 2021-10-16 before SFO trip
789:03f577c7a24e 2021-08-08 RedRocks Road Trip KML data from Google Timeline
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In general, I don&#39;t trust any cloud services. I keep backups of
linkedin contacts, tweets, etc.&lt;/p&gt;
&lt;p&gt;I&#39;m much more comfortable using github issues to capture my thoughts
since I discovered &#34;Include your own updates&#34; in the
&lt;a href=&#34;https://docs.github.com/en/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/configuring-notifications#customizing-your-email-notifications&#34;&gt;email notification settings&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I generally follow the &lt;a href=&#34;https://indieweb.org/PESOS&#34;&gt;IndieWeb PESOS&lt;/a&gt; pattern: Publish Elsewhere, Syndicate (to your) Own Site
rather than &lt;a href=&#34;https://indieweb.org/POSSE&#34;&gt;POSSE&lt;/a&gt;: Publish (on your) Own Site, Syndicate Elsewhere.
The cost of keeping backups in an open format is manageable (I avoid services that don&#39;t support it)
but economies of scale naturally result in rich knowledge capture and sharing user interfaces for large
communities--why should I limit myself to the writing tools I can maintain on my own site?&lt;/p&gt;
&lt;p&gt;The ownership risk seems manageable: in large communities including many of my peers,
I rely on them to alert me to poor terms of service, and when I venture out on new ground,
I read the TOS myself fairly carefully.&lt;/p&gt;
&lt;p&gt;PESOS also gives me editorial discretion over which syndicated copies go on the front page of my blog
and which go on backups in a closet.&lt;/p&gt;</description>
            <pubDate>Sat, 18 Dec 2021 00:00:00 +0000</pubDate>
            <guid>http://www.madmode.com//2021/closet-librarian-approach-cloud-services/</guid>
        </item>
        <item>
            <title>What&#39;s Next: Agoric Computing</title>
            <link>http://www.madmode.com//2021/next-gig-agoric/</link>
            <description>&lt;p&gt;After 15 years at W3C and 10 years at KU Med Center, my next gig is at
&lt;a href=&#34;https://agoric.com/&#34;&gt;Agoric&lt;/a&gt;. Here I answer some questions, some
recently asked and some anticipated.&lt;/p&gt;
&lt;p&gt;Q: I see a &lt;a href=&#34;https://www.nytimes.com/2021/01/10/technology/tim-berners-lee-privacy-internet.html&#34;&gt;NY Times feature&lt;/a&gt; about Tim Berners Lee and his new
company, Inrupt. Did you work with Tim Berners-Lee?&lt;br /&gt;
A: yes, from the early 1990s to 2010 we worked together building the Web at W3C.&lt;/p&gt;
&lt;p&gt;Q: Are you working with Tim at Inrupt?&lt;br /&gt;
A: No, but I am starting a new job at Agoric.&lt;/p&gt;
&lt;p&gt;Q: What is Agoric? What do they do?&lt;br /&gt;
A: Agoric provides a safer, simpler way to program smart contracts. We
believe smart contracts enable the future of global economic
cooperation.&lt;/p&gt;
&lt;p&gt;Q: Why is it called &#34;Agoric&#34;?&lt;br /&gt;
A: &lt;em&gt;Agoric&lt;/em&gt; stems from &lt;em&gt;agora&lt;/em&gt;, the Greek term for a meeting and
market place. An agoric system is a software system using market
mechanisms. (&lt;a href=&#34;https://agoric.com/papers/markets-and-computation-agoric-open-systems/abstract/&#34;&gt;Miller and Drexler, 1988&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;Q: Smart contracts? What&#39;s that?&lt;br /&gt;
A: If you&#39;ve used amazon, ebay, or a vending machine,
you&#39;ve used a smart contract: a contract-like arrangement expressed in
software, where the behavior of the software enforces the terms of the
contract.&lt;/p&gt;
&lt;p&gt;At W3C, a big part of my job was developing the W3C standards process
and figuring out how much of it could and should automate; looking
back, I think of it as smart contract design.&lt;/p&gt;
&lt;p&gt;Q: Are these smart contracts for blockchains and cryptocurrencies like Bitcoin and Ethereum?&lt;br /&gt;
A: Yes, Agoric plans to build on the high-integrity shared compute
infrastructure provided by blockchains, though the architecture
scales down to private clusters and single machines as well. (&lt;a href=&#34;https://www.youtube.com/watch?v=iyuo0ymTt4g&amp;amp;list=PLhuBigpl7lqth_Ow_eQWZs7NFxmeDw9W8&#34;&gt;Miller, 2019&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;Agoric is not building on Bitcoin or Ethereum directly, but we are
building on mature blockchain technology, the Cosmos &lt;abbr
title=&#34;Software Development Kit&#34;&gt;SDK&lt;/abbr&gt;. In order to bridge to
Ethereum and Bitcoin, Agoric is a leading contributor to
&lt;a href=&#34;https://cosmos.network/ibc&#34;&gt;IBC&lt;/a&gt;, the Inter-Blockchain Communication
protocol.&lt;/p&gt;
&lt;p&gt;Q: How are smart contracts safer using Agoric&#39;s technology?&lt;br /&gt;
A: At least three ways:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Agoric provides &lt;strong&gt;offer safety&lt;/strong&gt;: when you place an
     offer, either you&#39;ll get what you wanted or you get a refund,
     regardless of the (mis)behavior of the underlying smart contract.
     This API (Zoe) is built using a couple of more fundamental mechanisms:&lt;/li&gt;
&lt;li&gt;Agoric supports patterns of cooperation without vulnerability using
     &lt;strong&gt;object capabilities&lt;/strong&gt; (OCaps).&lt;/li&gt;
&lt;li&gt;Agoric avoids reentrancy hazards (such as the $50M DAO bug) using
     asynchronous &lt;strong&gt;eventual-sends&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Q: Do developers have to learn a new programming language to get all this?&lt;br /&gt;
A: No; Agoric smart contracts are written in a &lt;a href=&#34;https://github.com/Agoric/Jessie#subsetting-ecmascript&#34;&gt;secure subset of
JavaScript&lt;/a&gt;
that mostly involves sticking to established best practices.&lt;/p&gt;
&lt;p&gt;Q: Object capabilities? What&#39;s that?&lt;br /&gt;
A: Capability-based security is like the way we control access to our
cars: I use a key to drive my car. I can delegate driving the car
to you by handing you the key. But keys are impractical to forge,
so effectively, unauthorized people can&#39;t drive it.&lt;/p&gt;
&lt;p&gt;In contrast, the traditional way to control access to computing
resources is with access control lists (ACLs): each file or database
table has a list of who can read and write it. If cars worked this
way, the car would let me drive it only if I present the right
driver&#39;s license; perhaps my wife would be on the list too. But if I
wanted to delegate to you, I&#39;d have to update the list of drivers in
the car. And what if my son got hurt and I wasn&#39;t around to update the
list of drivers so his friend could get him to the doctor? (&lt;a href=&#34;http://erights.org/talks/efun/SecurityPictureBook.pdf&#34;&gt;Stiegler,
2004&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;Valet parking would be pretty tedious. And the trunk would have to
have a separate access control list to do what valet keys do.&lt;/p&gt;
&lt;p&gt;Worse: what we normally do when we run programs on our computers is
like giving my driver&#39;s license to you or the valet to let you drive
the car. I have to run the risk that you&#39;ll do other things with the
driver&#39;s license like open a bank account in my name. Maybe I trust
you not to do that, but every program on my computer can do anything I
can do, including mess up all my files and demand a ransom to get them
back. And with our computers connected to millions of other computers
via the Internet, we&#39;re vulnerable to more than just our friends.
With capabilities, making things like valet keys is easy so that each
program, and each part of a program, gets access to only what it needs
in order to do its job; capabilities support the &lt;strong&gt;principle of least
authority&lt;/strong&gt; much better than access control lists. (&lt;a href=&#34;https://www.hpl.hp.com/techreports/2009/HPL-2009-20.html&#34;&gt;Close, 2009&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;I have been excited about capability-based security since 2001 when I
discovered OCaps and composable smart contracts(&lt;a href=&#34;http://erights.org/elib/capability/ode/index.html&#34;&gt;Miller, Morningstar,
Frantz, 2000&lt;/a&gt;). Since 2010 I have been responsible for the security
of a million or so health records in a clinical data research
warehouse at KU Med Center. Being constrained to use ACL-based
filesystems, databases, and web applictions drives me crazy!  The
chance to work on smart contracts with OCaps as a day job is a dream
come true.&lt;/p&gt;
&lt;p&gt;Q: And Berners-Lee&#39;s Inrupt? What do they do?&lt;br /&gt;
A: Inrupt &#34;aims to reset the balance of power on the web&#34; by giving
users control of their data in &#34;pods,&#34; personal online data
stores. &#34;Each person could control his or her own data — websites
visited, credit card purchases, workout routines, music streamed — in
an individual data safe, typically a sliver of server space&#34; (&lt;a href=&#34;https://www.nytimes.com/2021/01/10/technology/tim-berners-lee-privacy-internet.html&#34;&gt;NY
Times Jan 10&lt;/a&gt;). It uses SOLID, a set of open technologies.&lt;/p&gt;
&lt;p&gt;Q: What do you think of Inrupt and SOLID?&lt;br /&gt;
A: I certainly agree when Tim says that &#34;too much power and too much
personal data reside with the tech giants like Google and
Facebook&#34;. But&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;SOLID Web Access Control
     (&lt;a href=&#34;https://github.com/solid/web-access-control-spec/&#34;&gt;WAC&lt;/a&gt;)
     uses ACLs, not capabilities.&lt;/li&gt;
&lt;li&gt;I don&#39;t see an integrated economic model in SOLID.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;To free users from Google, we have to provide the same sub-second
search for all of their email, and I don&#39;t see how to do that without
bringing the application code to where the data is.  We&#39;re going to
want mash-ups of multiple applications.  We need the kind of
cooperation without vulnerability that only capability-based security
brings. I wonder what would happen if we mixed the Agoric platform&#39;s
ability to scale down to clusters and single machines with the notion
of a SOLID pod.&lt;/p&gt;
&lt;p&gt;In 2005, I learned that Internet pioneer Dave Clark took a year off to
study economics. Since then it has been pretty clear to me that
whatever comes next in the architecture of the Internet and the Web,
economics needs to be an integral part of the protocols. Bitcoin came
along in 2008 and Ethereum in 2014. Mixing in economics increases the
motivation for fraud, which has made me hesitant to commit to the
cryptocurrency industry as a career. But the Agoric platform provides
an increasing level of safety and most of the team has been working on
smart contracts with capability security as long as I&#39;ve been working
on the Web, so I just can&#39;t pass up the opportunity to join them as
they scale it up to global economic cooperation.&lt;/p&gt;</description>
            <pubDate>Mon, 11 Jan 2021 00:00:00 +0000</pubDate>
            <guid>http://www.madmode.com//2021/next-gig-agoric/</guid>
        </item>
        <item>
            <title>Fun with @ski at Agoric &#34;Hack the Orb&#34;</title>
            <link>http://www.madmode.com//2020/agoric-hackathon-prize/</link>
            <description>&lt;blockquote class=&#34;twitter-tweet&#34;&gt;
    &lt;p lang=&#34;en&#34; dir=&#34;ltr&#34;&gt;This was
    great fun... especially working with &lt;a
    href=&#34;https://twitter.com/suhailski?ref_src=twsrc%5Etfw&#34;&gt;@suhailski&lt;/a&gt;.
    &lt;a href=&#34;https://t.co/11uJri3Wvv&#34;&gt;https://t.co/11uJri3Wvv&lt;/a&gt;
&lt;/p&gt;&amp;mdash; Dan Connolly (@dckc) &lt;a
href=&#34;https://twitter.com/dckc/status/1336061189013581826?ref_src=twsrc%5Etfw&#34;&gt;December
7, 2020&lt;/a&gt;
&lt;/blockquote&gt;
&lt;script async
src=&#34;https://platform.twitter.com/widgets.js&#34;
charset=&#34;utf-8&#34;&gt;&lt;/script&gt;

&lt;noscript&gt;
&lt;blockquote&gt;
@agoric · Dec 7
&lt;p&gt;
2/ 📽️ Umqhele: @dckc, @suhailski, and @tgrecojs built a #dapp that allows you to auction and trade #NFTs that grant access to live video streams. This dapp demonstrates Agoric contract composition, offer safety, and object capabilities. https://github.com/ski/umqhele
&lt;/p&gt;
3:33 PM · Dec 7, 2020·Twitter Web App
&lt;/blockquote&gt;
&lt;/noscript&gt;

&lt;blockquote&gt;
Suhail Manzoor @suhailski · Dec 7 Replying to @dckc
&lt;p&gt;
The pleasure was all mine Dan :)
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href=&#34;https://github.com/dckc/umqhele&#34;&gt;dckc/umqhele&lt;/a&gt; 20cdf68 on Nov 23
forked form &lt;a href=&#34;https://github.com/ski/umqhele&#34;&gt;ski/umqhele&lt;/a&gt;&lt;/p&gt;
&lt;div class=&#34;h-event vevent&#34;&gt;
&lt;a href=&#34;https://www.hacktheorb.com/&#34;&gt;
Hack the Orb: the Agoric and Chainlink Hackathon
&lt;time class=&#34;dt-start dtstart&#34;&gt;November 6 - 21, 2020&lt;/time&gt;
&lt;/div&gt;

&lt;div class=&#34;h-event vevent&#34;&gt;
&lt;a href=&#34;https://www.youtube.com/watch?v=wVrX06owyeY&#34;&gt;
&lt;b class=&#34;p-name summary&#34;&gt;Agoric Monthly Community Call #3&lt;/b&gt;
&lt;/a&gt;
&lt;time class=&#34;dt-start dtstart&#34;&gt;2020-12-02&lt;/time&gt;
&lt;/div&gt;

&lt;h3&gt;Relevant people&lt;/h3&gt;
&lt;ul&gt;
&lt;li class=&#34;h-card hCard&#34;&gt;&lt;b class=&#34;fn&#34;&gt;Dan Connolly&lt;/b&gt; @dckc
&lt;em class=&#34;p-note&#34;&gt;writing software to support health research; using capability security whenever I can&lt;/em&gt;&lt;/li&gt;
&lt;li class=&#34;h-card&#34;&gt;&lt;b class=&#34;fn&#34;&gt;Suhail Manzoor&lt;/b&gt; @suhailski
&lt;em class=&#34;p-note&#34;&gt;A cultural refugee in Edinburgh who is still trying to search and sort his way through life. Retweets are often endorsement but sometimes not.&lt;/em&gt;&lt;/li&gt;
&lt;li class=&#34;h-card&#34;&gt;&lt;b&gt;Agoric&lt;/b&gt; @agoric
&lt;em class=&#34;p-note&#34;&gt;We believe smart contracts enable the future of global economic cooperation. Agoric provides a safer, simpler way to program smart contracts.&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
            <pubDate>Mon, 07 Dec 2020 00:00:00 +0000</pubDate>
            <guid>http://www.madmode.com//2020/agoric-hackathon-prize/</guid>
        </item>
        <item>
            <title>Javascript on genode, genode on HP Envy 15</title>
            <link>http://www.madmode.com//2020/genode-js-hp-envy/</link>
            <description>&lt;p&gt;Genode is a microkernel operating system with capability-based
security; in the 20.05 release they added &lt;a href=&#34;https://genode.org/documentation/release-notes/20.05#Capability-based_security_using_seccomp_on_Linux&#34;&gt;capability-based security
using seccomp on Linux&lt;/a&gt;. That got me excited enough to make
some real progress on JavaScript on Genode using the Moddable XS
engine and on Genode on an HP Envy laptop.&lt;/p&gt;
&lt;p&gt;In &lt;a href=&#34;https://github.com/dckc/genode-js-xs&#34;&gt;genode-js-xs&lt;/a&gt; I got this
JavaScript code running on genode:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;export default function main() {
    let message = &amp;quot;Hello, world - sample&amp;quot;;
    trace(message + &amp;quot;\n&amp;quot;);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It works like this, once it&#39;s built (see below):&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;goa-hello$ goa run
[goa-hello:make] recursive make: make
Genode 20.02-1-gac1b2ec24e
17592186044415 MiB RAM and 8997 caps assigned to init
[init -&amp;gt; goa-hello] Hello before libc
[init -&amp;gt; goa-hello] hello via stdio
[init -&amp;gt; goa-hello] Hello in libc
[init -&amp;gt; goa-hello] lin_xs_cli: loading top-level main.js
[init -&amp;gt; goa-hello]  lin_xs_cli: loaded
[init -&amp;gt; goa-hello] lin_xs_cli: invoking main(argv)
[init -&amp;gt; goa-hello] Hello, world - sample
[init -&amp;gt; goa-hello] main() returned immediate value (not a promise). exiting
[init -&amp;gt; goa-hello] Warning: rtc not configured, returning 0
Warning: blocking canceled in entrypoint constructor
[init] child &amp;quot;goa-hello&amp;quot; exited with exit value 0
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I started with the hello package from then &lt;a href=&#34;https://genodians.org/nfeske/2019-11-25-goa&#34;&gt;Nov 2019 article
introducing goa&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Then I grabbed the
&lt;a href=&#34;https://github.com/Moddable-OpenSource/moddable/tree/public/examples/helloworld&#34;&gt;helloworld&lt;/a&gt;
example from the Moddable XS SDK, generated C sources, and got it to
build.&lt;/p&gt;
&lt;p&gt;Then I worked out getting &lt;code&gt;goa run&lt;/code&gt; to work. My &lt;code&gt;artifacts&lt;/code&gt; is
a bit of a kludge: it reaches out from &lt;code&gt;var/build&lt;/code&gt; back to &lt;code&gt;src/bin&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;before &lt;code&gt;goa build&lt;/code&gt;: &lt;code&gt;gensrc&lt;/code&gt;, &lt;code&gt;genode_platform&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;There&#39;s a bit of an impedence mismatch between &lt;code&gt;goa build&lt;/code&gt; and the
&lt;a href=&#34;https://github.com/Moddable-OpenSource/moddable/&#34;&gt;Moddable SDK&lt;/a&gt;, so
use &lt;code&gt;make -C src gensrc&lt;/code&gt; to generate C etc. before running &lt;code&gt;goa
build&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;We also extend the Moddable SDK to add a &lt;code&gt;genode&lt;/code&gt; platform
using &lt;code&gt;make -C src genode_platform&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;Next Steps&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;event loop&lt;/strong&gt;: Figure out how to integrate the &lt;a href=&#34;https://github.com/genodelabs/genode-world/blob/master/ports/glib.port&#34;&gt;port of glib to
    genode&lt;/a&gt;
    to turn the event loop, which is currently commented out, back on.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;nix and dhall&lt;/strong&gt;: Compare goa to &lt;a href=&#34;https://git.sr.ht/~ehmry/genodepkgs&#34;&gt;genodepkgs&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;NixOS 20.03 and Genode Sculpt 20.02 on the HP Envy 15&lt;/h2&gt;
&lt;p&gt;When my son upgraded his gaming laptop last year, I got his
hand-me-down &lt;a href=&#34;https://support.hp.com/us-en/product/hp-envy-15-j100-notebook-pc-series/5401187/model/6521450?sku=E1R44AV&#34;&gt;HP ENVY
15z-j100&lt;/a&gt;
and tried to boot it from free software.  I got Windows so messed up
that it could neither boot nor repair itself, so I set it aside in
frustration.&lt;/p&gt;
&lt;p&gt;Prompted by my success with js on genode, I tried a Ubuntu 20.04 USB
stick (that I had made for my other son, who uses linux for his gaming
PC) and lo, it worked the first time. Ubuntu has gone to the trouble
to get their installation media working with secure boot.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/NixOS/nixpkgs/pull/53901&#34;&gt;secure boot for NixOS&lt;/a&gt;
looks really bleeding edge, but with a better understanding based on
&lt;a href=&#34;https://www.rodsbooks.com/efi-bootloaders/secureboot.html#hp705&#34;&gt;EFI Boot Loaders for Linux: Dealing with Secure
Boot&lt;/a&gt;
by Rod Smith, I managed to turn secure boot off and get NixOS installed.&lt;/p&gt;
&lt;p&gt;With all this momentum, I did not give up when booting &lt;a href=&#34;https://genode.org/download/sculpt&#34;&gt;Sculpt OS
20.02&lt;/a&gt; quit with a just &lt;a href=&#34;https://github.com/alex-ab/g2fg/issues/1&#34;&gt;screen
full of (?)s&lt;/a&gt;. They only
document support for Intel CPUs and this has an AMD A10-5750M, so it
looked like an AHCI driver problem or some such. But the screen wasn&#39;t
locked altogether. It responded to enter and to &lt;code&gt;clear&lt;/code&gt;... aha!  It&#39;s
a grub prompt with a missing font. &lt;code&gt;terminal_output console&lt;/code&gt; dealt
with the font issue and the solution turned out to be changing &lt;code&gt;hd0&lt;/code&gt;
to &lt;code&gt;hd1&lt;/code&gt; in a grub config file. Genode has no ath9k driver, so wifi
isn&#39;t working, but I have plenty of ethernet ports and cables. :)&lt;/p&gt;</description>
            <pubDate>Sun, 07 Jun 2020 00:00:00 +0000</pubDate>
            <guid>http://www.madmode.com//2020/genode-js-hp-envy/</guid>
        </item>
        <item>
            <title>Rosetta Stone: Taking propositions-as-types to the next level</title>
            <link>http://www.madmode.com//2020/grok-idris-ct/</link>
            <description>&lt;blockquote class=&#34;twitter-tweet&#34;&gt;&lt;p lang=&#34;en&#34; dir=&#34;ltr&#34;&gt;I read CS papers by turning notation into (&lt;a href=&#34;https://twitter.com/idrislang?ref_src=twsrc%5Etfw&#34;&gt;@idrislang&lt;/a&gt;) code. Slow going, but the only way I really grok. e.g. &lt;a href=&#34;https://t.co/8Y34KMgiXd&#34;&gt;https://t.co/8Y34KMgiXd&lt;/a&gt; more: &lt;a href=&#34;https://t.co/AecWRmyFJG&#34;&gt;https://t.co/AecWRmyFJG&lt;/a&gt;&lt;/p&gt;&amp;mdash; Dan Connolly (@dckc) &lt;a href=&#34;https://twitter.com/dckc/status/1230157668888780800?ref_src=twsrc%5Etfw&#34;&gt;February 19, 2020&lt;/a&gt;&lt;/blockquote&gt;
&lt;script async src=&#34;https://platform.twitter.com/widgets.js&#34; charset=&#34;utf-8&#34;&gt;&lt;/script&gt;

&lt;p&gt;The &lt;a href=&#34;https://arxiv.org/abs/0903.0340&#34;&gt;Rosetta Stone&lt;/a&gt; paper by Baez and
Stay has been on my to-read list since a conversation with Stay on a
bus a few years ago. The scope is a bit intimidating:&lt;/p&gt;
&lt;table&gt;
&lt;tr&gt;
  &lt;th&gt;Category Theory&lt;/th&gt; &lt;th&gt;Physics&lt;/th&gt; &lt;th&gt;Topology&lt;/th&gt; &lt;th&gt;Logic&lt;/th&gt; &lt;th&gt;Computation&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td&gt;object&lt;/td&gt; &lt;td&gt;system&lt;/td&gt; &lt;td&gt;manifold&lt;/td&gt; &lt;td&gt;proposition&lt;/td&gt; &lt;td&gt;data type&lt;/td&gt;
&lt;tr&gt;
 &lt;td&gt;morphism&lt;/td&gt; &lt;td&gt;process&lt;/td&gt; &lt;td&gt;cobordism&lt;/td&gt; &lt;td&gt;proof&lt;/td&gt; &lt;td&gt;program&lt;/td&gt;
&lt;/tr&gt;
&lt;caption&gt;Table 1: The Rosetta Stone (pocket version)&lt;/caption&gt;
&lt;/table&gt;

&lt;p&gt;But in &lt;a href=&#34;https://blog.statebox.org/fun-with-categories-70c64649b8e0&#34;&gt;Fun with
Categories&lt;/a&gt;,
the Statebox folks laid the groundwork for grokking category theory
with idris in their &lt;a href=&#34;https://github.com/statebox/idris-ct&#34;&gt;idris-ct&lt;/a&gt;
library.&lt;/p&gt;
&lt;p&gt;And the RChain community includes a
&lt;a href=&#34;https://discordapp.com/channels/257555930173014017/548583847235682304&#34;&gt;#computational-calculi&lt;/a&gt;
channel where people get together to study such things... I get to
fill in gaps from skipping grad school without all the tuition and
tests :). Jake and several other people there immediately agreed when
I suggested we read this paper together.  Jake dug up &lt;a href=&#34;http://math.ucr.edu/~mike/rosettaslides.pdf&#34;&gt;Mike Stay&#39;s
slides&lt;/a&gt; and
&lt;a href=&#34;http://math.ucr.edu/~mike/rosetta%20slides.txt&#34;&gt;notes&lt;/a&gt; and it took
just a little work to get the details into &lt;a href=&#34;https://calendar.google.com/calendar/embed?src=2cj152c9nidh6glpr1d5g4eq28%40group.calendar.google.com&#34;&gt;the calendar&lt;/a&gt;.
Jake connected us to the statebox folks via a &lt;a href=&#34;https://categorytheory.zulipchat.com/&#34;&gt;Category
Theory&lt;/a&gt; chat group started by
Christian W.&lt;/p&gt;
&lt;h2&gt;Quantum Physics Gap&lt;/h2&gt;
&lt;p&gt;Of the five domains in the Rosetta Stone, Quantum Physics is
definitely the most indimidating, to me.  &lt;a href=&#34;https://www.lesswrong.com/posts/hc9Eg6erp6hk9bWhn/the-quantum-physics-sequence&#34;&gt;The Quantum Physics
Sequence&lt;/a&gt;
by Yudkowsky in 2008 is the closest thing I have found so far to
something my speed, but I think I made it only 1/3rd of the way thru.&lt;/p&gt;
&lt;p&gt;I had to look up &lt;a href=&#34;https://en.wikipedia.org/wiki/Hilbert_space&#34;&gt;Hilbert
space&lt;/a&gt;; fortunately my
linear algebra and topology is fresh enough that &#34;a real or complex
inner product space that is also a complete metric space with respect
to the distance function induced by the inner product&#34; only took a few
minutes to grok.&lt;/p&gt;
&lt;p&gt;I just watched &lt;a href=&#34;https://youtu.be/cuJY14BYac4&#34;&gt;a lecture by Edward Witten about knots and
QM&lt;/a&gt;, a recommended Tomaslov passed along
from Greg. Quantifier noted &lt;em&gt;A Quantum Mechanics Primer&lt;/em&gt; by
D.T.Gillespie as highly regarded.  Jake sai Baez has a &lt;a href=&#34;http://math.ucr.edu/home/baez/books.html&#34;&gt;good list of
recommend resources&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Fab from Statebox recommended &lt;a href=&#34;https://www.amazon.com/Picturing-Quantum-Processes-Diagrammatic-Reasoning-ebook/dp/B06XB1K71P&#34;&gt;Picturing Quantum
Processes&lt;/a&gt;. Here&#39;s hoping...&lt;/p&gt;
&lt;h2&gt;Intro to Idris&lt;/h2&gt;
&lt;p&gt;I gave an intro to idris this week:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href=&#34;https://www.idris-lang.org/&#34;&gt;Idris&lt;/a&gt; is a programming language designed to encourage &lt;em&gt;Type-Driven Development&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;In type-driven development, types are tools for constructing
programs. We treat the type as the plan for a program, and use the
compiler and type checker as our assistant, guiding us to a complete
program that satisfies the type. The more expressive the type is
that we give up front, the more confidence we can have that the
resulting program will be correct.&lt;/p&gt;
&lt;p&gt;In Idris, types are first-class constructs in the langauge. This
means types can be passed as arguments to functions, and returned
from functions just like any other value ...&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;We have a &lt;a href=&#34;https://youtu.be/IXqTq839pIo&#34;&gt;recording&lt;/a&gt;, though it was a
pretty informal session.&lt;/p&gt;
&lt;h3&gt;Installing Idris&lt;/h3&gt;
&lt;p&gt;Idris docs recommend &lt;code&gt;cabal install idris&lt;/code&gt; but that&#39;s a pain;
&lt;a href=&#34;https://nixos.org/nixpkgs/manual/#idris&#34;&gt;nix support for idris&lt;/a&gt;
reduces installation (and use!) to just[^1]:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;$ nix-shell -p &#39;idrisPackages.with-packages (with idrisPackages; [ contrib pruviloj ])&#39;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I like to combine it with &lt;a href=&#34;https://direnv.net/&#34;&gt;direnv&lt;/a&gt; support for nix
so that when I &lt;code&gt;cd&lt;/code&gt; into an idris project directory, it all Just Works.&lt;/p&gt;
&lt;p&gt;[^1]: if you get &lt;code&gt;idris-modules/build-builtin-package.nix:23 is marked
    as broken, refusing to evaluate&lt;/code&gt;, your nix installation may be out
    of date; &lt;code&gt;nix update-nix&lt;/code&gt; worked for me.&lt;/p&gt;
&lt;p&gt;There seems to be good &lt;a href=&#34;https://github.com/zjhmale/vscode-idris&#34;&gt;vs-code support for
idris&lt;/a&gt;, but I don&#39;t know how
to get it to look at the &lt;code&gt;contrib&lt;/code&gt; package, so for today, I tried
emacs, though even that showed some rough edges.&lt;/p&gt;
&lt;h3&gt;Formalizing Knowledge with Idris&lt;/h3&gt;
&lt;p&gt;LaTeX is fine for &lt;em&gt;typesetting&lt;/em&gt; knowledge, but my goal is to
&lt;em&gt;formalize&lt;/em&gt; knowledge such that the machine can help exploit it.&lt;/p&gt;
&lt;p&gt;The example I gave in my &lt;a href=&#34;https://twitter.com/dckc/status/1230157668888780800?ref_src=twsrc%5Etfw&#34;&gt;Feb 29
tweet&lt;/a&gt;
was a &lt;a href=&#34;https://www-sop.inria.fr/lemme/Tamara.Rezk/publication/csf16Capabilities.pdf&#34;&gt;2016 paper on capabilities and confused deputy
attacks&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The first definitions I captured were:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;We assume two countable sets, $Loc$ of mutable references and $Prin$ of
principals. ...
Values consist of integers ($n$), booleans ($tt$, $ff$) and pointers or
mutable references $R_r$ and $W_r$.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;In idris, this takes the somewhat familiar of a haskell / ML data type:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-idris&#34;&gt;data Loc = MkLoc Nat
data Prin = MkPrin Nat

data Value =
    IntVal ZZ
  | True
  | False
  | Read Loc
  | Write Loc
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This allows the idris compiler to, for example, let me know when I neglected to
handle all kinds of &lt;code&gt;Value&lt;/code&gt; later in my transcription to code.&lt;/p&gt;
&lt;h2&gt;Extending idris-ct for the Rosetta Stone&lt;/h2&gt;
&lt;p&gt;On page 5 of the Rosetta Stone paper we find this nice diagram
relating definitions in category theory:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;/static/img/rosetta-fig-p5.svg&#34; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/statebox/idris-ct&#34;&gt;idris-ct&lt;/a&gt; already formalizes monoidal categories and symmetric
monoidal categories but not closed categories and cartesian
categories. Jake started laying the ground work for
&lt;a href=&#34;https://gitlab.com/jake.gillberg/programmingcats/-/blob/master/src/ProgrammingCats/MonoidalCategory/CartesianCategory.idr&#34;&gt;CartesianCategory.idr&lt;/a&gt;
and such.&lt;/p&gt;
&lt;p&gt;In discussion of cup and cap, Fabrizio answered a question by way of a
figure from some of his &lt;a href=&#34;https://arxiv.org/abs/1805.05988&#34;&gt;work on petri
nets&lt;/a&gt;. He also mentioned
Samson Abramsky&#39;s work; 
&lt;a href=&#34;https://www.sciencedirect.com/science/article/pii/030439759390181R&#34;&gt;Computational interpretations of linear logic&lt;/a&gt; has been on
my list since Greg said it &#34;changed the direction of his career.&#34;
Here&#39;s hoping for time to study that one closely too.&lt;/p&gt;</description>
            <pubDate>Sat, 02 May 2020 00:00:00 +0000</pubDate>
            <guid>http://www.madmode.com//2020/grok-idris-ct/</guid>
        </item>
        <item>
            <title>Trying znc IRC bouncer to stay in touch with the ocap community</title>
            <link>http://www.madmode.com//2020/what-i-use-irc/</link>
            <description>&lt;p&gt;I&#39;m typically connected to IRC channels for a few ocap projects etc.:&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://www.erights.org/&#34;&gt;#erights&lt;/a&gt;
&lt;a href=&#34;https://genode.org/community/index&#34;&gt;#genode&lt;/a&gt;
&lt;a href=&#34;https://www.idris-lang.org/&#34;&gt;#idris&lt;/a&gt;
&lt;a href=&#34;https://indieweb.org/IRC&#34;&gt;#indieweb&lt;/a&gt;
&lt;a href=&#34;http://www.monte-language.org/#IRC&#34;&gt;#monte&lt;/a&gt;
&lt;a href=&#34;https://ocaml.org/community/mailing_lists.html&#34;&gt;#ocaml&lt;/a&gt;
&lt;a href=&#34;https://sandstorm.io/community&#34;&gt;#sandstorm&lt;/a&gt;
&lt;a href=&#34;https://www.w3.org/2001/sw/interest/#swig_chan&#34;&gt;#swig&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I use &lt;a href=&#34;https://packages.ubuntu.com/bionic/hexchat&#34;&gt;hexchat&lt;/a&gt; to connect
to these channels on &lt;a href=&#34;https://freenode.net/&#34;&gt;freenode&lt;/a&gt; but netsplits
and other failure modes inherent in
&lt;a href=&#34;https://en.wikipedia.org/wiki/Internet_Relay_Chat&#34;&gt;IRC&lt;/a&gt; make for
annoying little gaps in the connection from time to time.&lt;/p&gt;
&lt;p&gt;An ice storm here in Kansas City gives me a chance to install the
&lt;a href=&#34;https://packages.ubuntu.com/bionic/net/znc&#34;&gt;znc&lt;/a&gt; IRC bouncer in my
home office, after a few months of positive experience at work.&lt;/p&gt;
&lt;p&gt;Both &lt;code&gt;znc --makeconf&lt;/code&gt; and &lt;a href=&#34;https://wiki.znc.in/HexChat&#34;&gt;HexChat znc
config&lt;/a&gt; want me to specify passwords,
servers, and channels.  I don&#39;t have a clear mental model of how it&#39;s
supposed to work, but I managed to muddle through, I think. &lt;em&gt;Where to
back up the config? Passwords don&#39;t fit in a dotfiles repo... ok, kbfs
+= &lt;code&gt;znc-irc-bouncer-config.tgz&lt;/code&gt;, &lt;code&gt;hexchat-irc-client-config.tgz&lt;/code&gt;.&lt;/em&gt;&lt;/p&gt;</description>
            <pubDate>Fri, 17 Jan 2020 00:00:00 +0000</pubDate>
            <guid>http://www.madmode.com//2020/what-i-use-irc/</guid>
        </item>
        <item>
            <title>Toward secure distributed computing with Agoric at SFBW &#39;19</title>
            <link>http://www.madmode.com//2019/agoric-xs-sfbw/</link>
            <description>&lt;p&gt;After months of indecision, I decided to go to &lt;a href=&#34;https://sfblockchainweek.io/&#34;&gt;San Francisco
Blockchain Week&lt;/a&gt; in hopes of syncing up with the &lt;a href=&#34;https://agoric.com/&#34;&gt;Agoric&lt;/a&gt;
team. I&#39;m glad I did!&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://twitter.com/agoric/status/1188952857002696704&#34;&gt;
&lt;img src=&#34;https://pbs.twimg.com/media/EIACUZfU4AAeYxA?format=jpg&amp;name=small&#34;
     alt=&#34;#Agoric Team at #CESC Day 1.&#34; /&gt;
&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I have been working remotely for a few months on &lt;a href=&#34;https://github.com/Agoric/SwingSet/issues/126&#34;&gt;SwingSet on
xs&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;A key to Agoric&#39;s smart contract platform is compatibility between
widespread understanding of best practices in JavaScript development
with object capabilities and fail-stop deterministic
execution. Initial development of cosmic-swingset is based on the
popular and feature-rich node.js platform, but node.js represents an
uncomfortably large amount of code to include in a trusted computing
base as well as a substantial risk to deterministic execution. The
xs engine in the Moddable SDK is designed for constrained
microcontroller environments. It has some limitations, but the
supported feature set seems to be an excellent match for the Agoric
platform.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;SwingSet has about 500 tests across 15 files. Once I got about 200 in
3 files, I started looking for someone to reproduce my work.
Switching from my linux desktop to a macbook for this trip meant I
could be that someone. In the Agoric office on Wednesday, I found out
that some of the kludges I had put in place weren&#39;t portable between
linux and macOS, so only about 170 tests are working cross-platform.
It was great to be able to chat in person with Brian and Michael about
this stuff.&lt;/p&gt;
&lt;h2&gt;Zoe and Offer Safety&lt;/h2&gt;
&lt;p&gt;Agoric leveled up their platform this week with &lt;a href=&#34;https://agoric.com/zoe-vs-status-quo/&#34;&gt;Zoe&lt;/a&gt;, which provides
&lt;strong&gt;offer safety&lt;/strong&gt;: when you place an offer, either you&#39;ll get what you
wanted or you get a refund, regardless of the (mis)behavior of the
underlying smart contract.&lt;/p&gt;
&lt;p&gt;For example, &lt;a href=&#34;https://github.com/Agoric/autoswap-frontend&#34;&gt;autoswap&lt;/a&gt;
is a cool service, but conventional interfaces provide little
assurance as to what is going to happen when you send it some tokens
in a transaction. In contrast, a &lt;a href=&#34;https://github.com/Agoric/wallet-frontend&#34;&gt;wallet working with
Zoe&lt;/a&gt; presents offers in an
intelligible form and guarantees that the offer is either executed as
stated or you get a refund.&lt;/p&gt;
&lt;p&gt;There are some rough edges in getting these demos running, but I had
done the &lt;a href=&#34;https://agoric.com/testnet-pixel-demo/&#34;&gt;testnet demo&lt;/a&gt; the previous week so it only took me a
little chatting with JF and co to get them running.&lt;/p&gt;
&lt;p&gt;And the Agoric folks are not alone in smoothing out the UI: Dan Finlay
built a &lt;a href=&#34;https://github.com/danfinlay/metamask-agoric-plugin&#34;&gt;MetaMask Agoric
Plugin&lt;/a&gt; at the
DeFi hackathon.&lt;/p&gt;
&lt;p&gt;I think it would be fun to formally verify the offer safety property.
Mark Miller and I chatted about this with Eric McCarthy, who works on
the &lt;a href=&#34;https://www.kestrel.edu/home/projects/ethereum/index.html&#34;&gt;ACL2
Ethereum&lt;/a&gt;
project. I have some history with ACL2, and in some sense the untyped
style of ACL2 goes well with JavaScript, but I wonder if that&#39;s a
false economy. I&#39;m more facile with ML style propositions-as-types
systems (idris, ocaml) lately.&lt;/p&gt;
&lt;h2&gt;CESC: Ouroboros, Kara from Oasis Labs, ...&lt;/h2&gt;
&lt;p&gt;At CESC (crypto economics security conference) Monday and Tuesday,
some talks were too full of greek letters for me to follow and others
were more like TV commercials than academic contributions. Two that
stood were:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Vassilis Zikas on &lt;em&gt;The Evolution of Ouroboros: From Proof of Work
   to Proof of Stake&lt;/em&gt;. He started with an introduction to bitcoin that
   seemed a little remedial for this venue but he built on the
   structure of that intro to make a clear presentation of the rest.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://kara.cloud/#/&#34;&gt;Kara&lt;/a&gt; from &lt;a href=&#34;https://www.oasislabs.com&#34;&gt;Oasis
   Labs&lt;/a&gt;: privacy-preserving health data
   analytics. &#34;AI for healthcare is limited by the fact, that the most
   valuable data is locked in data silos. Kara breaks up these silos
   and allow researchers to train their models on data that is
   otherwise hidden from science - extracting value from it, while
   never exposing the data itself.&#34; The talk was a little on the TV
   commercial side, but the &lt;a href=&#34;https://arxiv.org/abs/1804.05141&#34;&gt;Ekiden&lt;/a&gt;
   on how they mix private compute nodes with the blockchain is pretty
   convincing. The evaluation includes some machine learning stuff for
   medical diagnostics.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Epicenter: CasperLabs, Chainlink&lt;/h2&gt;
&lt;p&gt;I went to the &lt;a href=&#34;https://twitter.com/meetCasperLabs/status/1190015712208666624&#34;&gt;CasperLabs workshop by Michael&lt;/a&gt; with Joshy, a
&lt;a href=&#34;https://joshyorndorff.com/blog/keeping-the-rchain-community-together&#34;&gt;fellow rchain expat&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The Chainlink marketplace for connecting smart contracts to real world
data sources (oracles) and payment systems looked interesting. I&#39;m a
little bummed I missed the &lt;a href=&#34;https://docs.google.com/document/d/e/2PACX-1vTfuGrmqJO_il0PzZY5iU5_HtmiEExu5t7XHzrj6rRVKZnOdvy3fUJzlIlTgd-FMrUl2A-9T9ndP7Nj/pub&#34;&gt;chainlink
workshop&lt;/a&gt;,
but I think I made the right call hanging out with the Agoric team
instead.&lt;/p&gt;</description>
            <pubDate>Sun, 03 Nov 2019 00:00:00 +0000</pubDate>
            <guid>http://www.madmode.com//2019/agoric-xs-sfbw/</guid>
        </item>
        <item>
            <title>spendr: toward an rchain gRPC client in rust using tokio and async / await</title>
            <link>http://www.madmode.com//2019/spendr-rust-async/</link>
            <description>&lt;p&gt;Inspired by mention of a gRPC client and server library in &lt;a href=&#34;https://tokio.rs/blog/2019-08-alphas/&#34;&gt;Tokio alpha release with async &amp;amp;
await&lt;/a&gt;, I tried building an rchain wallet client
in rust.&lt;/p&gt;
&lt;p&gt;A couple hours later, I had the hello-world client from &lt;a href=&#34;https://github.com/tower-rs/tower-grpc/issues/198&#34;&gt;tower-grpc&lt;/a&gt;
adapted to talk to the shiny new &lt;a href=&#34;https://github.com/rchain/rchain/releases/tag/v0.9.12&#34;&gt;0.9.12 release of rnode&lt;/a&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;~/projects/spendr$ cargo run
   Compiling spendr v0.1.0 (/home/connolly/projects/spendr)
    Finished dev [unoptimized + debuginfo] target(s) in 3.00s
     Running `target/debug/spendr`
RESPONSE = Response { metadata: MetadataMap { headers: {&amp;quot;content-type&amp;quot;: &amp;quot;application/grpc&amp;quot;, &amp;quot;grpc-encoding&amp;quot;: &amp;quot;identity&amp;quot;, &amp;quot;grpc-accept-encoding&amp;quot;: &amp;quot;gzip&amp;quot;} }, message: Streaming }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;But that client code doesn&#39;t use the yummy new async / await stuff.
It doesn&#39;t look like async / await has made it up to the gRPC level yet.
I think I mis-read the blog post; I think it was just saying that
tokio has a gRPC client and server library.&lt;/p&gt;</description>
            <pubDate>Tue, 10 Sep 2019 00:00:00 +0000</pubDate>
            <guid>http://www.madmode.com//2019/spendr-rust-async/</guid>
        </item>
        <item>
            <title>Practical production python scripts</title>
            <link>http://www.madmode.com//2019/python-eng/</link>
            <description>&lt;p&gt;In &lt;a href=&#34;https://vincent.bernat.ch/en/blog/2019-sustainable-python-script&#34;&gt;Writing sustainable Python scripts&lt;/a&gt; (&lt;a href=&#34;https://lobste.rs/s/zoo6tm/sustainable_python_scripts&#34;&gt;lobsters
discussion&lt;/a&gt;), the initial prototype looks like:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-python&#34;&gt;import sys
for n in range(int(sys.argv[1]), int(sys.argv[2])):
    if n % 3 == 0 and n % 5 == 0:
        print(&amp;quot;fizzbuzz&amp;quot;)
    elif n % 3 == 0:
        print(&amp;quot;fizz&amp;quot;)
    elif n % 5 == 0:
        print(&amp;quot;buzz&amp;quot;)
    else:
        print(n)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I have a process for turning this sort of thing into production code
that I quite enjoy. I just did it for this code in a &lt;a href=&#34;https://gist.github.com/dckc/d58a04b154d44d46de9abcda84b2a2f0&#34;&gt;fizzbuzz.py gist&lt;/a&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;1ac9082&lt;/li&gt;
&lt;li&gt;621ddad only run when invoked as script&lt;/li&gt;
&lt;li&gt;4cfa693 ocap discipline: explicit access to argv, stdout&lt;/li&gt;
&lt;li&gt;35e74c6 quick-n-dirty arg parsing&lt;/li&gt;
&lt;li&gt;7cfeeea factor out fizzbuzz() from main()&lt;/li&gt;
&lt;li&gt;8d85c04 module doctest of usage&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The bottom line in the &lt;a href=&#34;https://informatics.kumc.edu/work/wiki/CodeReviewNotes&#34;&gt;code review checklist&lt;/a&gt; in the shop I run
is: &lt;strong&gt;is this code I would be happy to maintain?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;While I appreciate writing documentation first, it usually takes me a
few iterations of prototyping before I know what it is I want to
document.&lt;/p&gt;
&lt;p&gt;I haven&#39;t made strict habit of test-driven development, but I do find
factoring out tricky bits of logic and adding unit tests for them
frees my mind up during development. And I do make it a rule to write
tests before fixing any bugs.&lt;/p&gt;
&lt;h2&gt;Only run when invoked as script&lt;/h2&gt;
&lt;p&gt;If this code is good, we want to be able to reuse it by importing it
from other modules. And even if we never reuse this code, we want the
ability to unit test it. So we use the &lt;a href=&#34;https://docs.python.org/3/library/__main__.html&#34;&gt;top level convention&lt;/a&gt;
(&lt;code&gt;if __name__ == &#34;__main__&#34;:&lt;/code&gt;) to test whether this code is invoked as
a script, but we minimize the code there. As a rule, module level code
shouldn&#39;t do anything but define things:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-python&#34;&gt;

def main():
    for n in range(int(sys.argv[1]), int(sys.argv[2])):
        if n % 3 == 0 and n % 5 == 0:
            print(&amp;quot;fizzbuzz&amp;quot;)
        elif n % 3 == 0:
            print(&amp;quot;fizz&amp;quot;)
        elif n % 5 == 0:
            print(&amp;quot;buzz&amp;quot;)
        else:
            print(n)


if __name__ == &#39;__main__&#39;:
    main()
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Ocap discipline: explicit access to IO&lt;/h2&gt;
&lt;p&gt;To facilitate patterns of cooperation without vulnerability, object
capability (&lt;a href=&#34;https://en.wikipedia.org/wiki/Object-capability_model&#34;&gt;ocap&lt;/a&gt;) discipline says the only thing globally
accessible should be immutable data. This also supports
&lt;a href=&#34;http://misko.hevery.com/code-reviewers-guide/&#34;&gt;testability&lt;/a&gt;. &lt;code&gt;argv&lt;/code&gt; and &lt;code&gt;stdout&lt;/code&gt; are IO, or at least sources
of non-determinism; object capability discipline calls for passing
these around explicitly.&lt;/p&gt;
&lt;p&gt;Of course we have to get them from somewhere. In an object capability
language, they would be passed (directly or indirectly) to &lt;code&gt;main()&lt;/code&gt;;
we simulate this using &lt;code&gt;_script_io()&lt;/code&gt;, a function that we only define
and invoke if &lt;code&gt;__name__ == &#39;__main__&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-python&#34;&gt;
def main(argv, stdout):
    for n in range(int(argv[1]), int(argv[2])):
        if n % 3 == 0 and n % 5 == 0:
            print(&amp;quot;fizzbuzz&amp;quot;, file=stdout)
        elif n % 3 == 0:
            print(&amp;quot;fizz&amp;quot;, file=stdout)
        elif n % 5 == 0:
            print(&amp;quot;buzz&amp;quot;, file=stdout)
        else:
            print(n, file=stdout)


if __name__ == &#39;__main__&#39;:
    def _script_io():
        from sys import argv, stdout

        main(argv, stdout)

    _script_io()
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Quick-n-dirty arg parsing&lt;/h2&gt;
&lt;p&gt;The code is now testable, so we start looking inside the functions.
Mixing in arg parsing with other logic doesn&#39;t smell right:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;def main(argv, stdout):
    for n in range(int(argv[1]), int(argv[2]))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;For a little script like this, one or two carefully crafted lines is
all I&#39;d spend on arg parsing:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-python&#34;&gt; def main(argv, stdout):
    [lo_, hi_] = argv[1:3]
    lo, hi = int(lo_), int(hi_)

    for n in range(lo, hi):
        ...
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If we just invoke this script with no args, the resulting traceback is
often enough of a usage clue, given that the userbase of these scripts
is a handful of devs in the shop (plus jenkins):&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ python3 fizzbuzz.py
Traceback ...
  File &amp;quot;fizzbuzz.py&amp;quot;, line 4, in main
    [lo_, hi_] = argv[1:3]
...
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;For more involved arg parsing, or perhaps if the userbase were larger,
I prefer &lt;a href=&#34;http://docopt.org/&#34;&gt;docopt&lt;/a&gt; to writing (or worse: reading!) elaborate argparse
calls.&lt;/p&gt;
&lt;h3&gt;Aside: who asked for fizz and buzz to be parameterized?&lt;/h3&gt;
&lt;p&gt;Parameterizing fizz and buzz adds testing and maintenance burden.
Unless we&#39;ve got a customer requirement, let&#39;s skip all that.&lt;/p&gt;
&lt;h2&gt;Factor out fizzbuzz() from main()&lt;/h2&gt;
&lt;p&gt;I like to keep our &lt;code&gt;main()&lt;/code&gt; functions small and separate logic from
IO. Using &lt;code&gt;yield&lt;/code&gt; in place of &lt;code&gt;print&lt;/code&gt; is particularly
convenient. Let&#39;s add one quick doctest while we&#39;re at it:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-python&#34;&gt;def main(argv, stdout):
    [lo_, hi_] = argv[1:3]
    lo, hi = int(lo_), int(hi_)

    for word in fizzbuzz(lo, hi):
        print(word, file=stdout)


def fizzbuzz(lo, hi):
    &amp;quot;&amp;quot;&amp;quot;
    &amp;gt;&amp;gt;&amp;gt; list(fizzbuzz(1, 6))
    [1, 2, &#39;fizz&#39;, 4, &#39;buzz&#39;]
    &amp;quot;&amp;quot;&amp;quot;
    for n in range(lo, hi):
        if n % 3 == 0 and n % 5 == 0:
            yield &amp;quot;fizzbuzz&amp;quot;
        elif n % 3 == 0:
            yield &amp;quot;fizz&amp;quot;
        elif n % 5 == 0:
            yield &amp;quot;buzz&amp;quot;
        else:
            yield n
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Module doctest of usage&lt;/h2&gt;
&lt;p&gt;Now we can document and test usage together in the module docstring.&lt;/p&gt;
&lt;p&gt;I actually started the module doctest earlier in the process, but I
didn&#39;t commit it until the end in order to make each commit
demonstrate one part of the process.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;quot;&amp;quot;&amp;quot;Simple fizzbuzz generator.

The game proceeds with players announcing numbers increasing
sequentially, except for multiples of 3 and 5:

    &amp;gt;&amp;gt;&amp;gt; usage = &#39;fizzbuzz 1 20&#39;

    &amp;gt;&amp;gt;&amp;gt; from io import StringIO; stdout = StringIO()
    &amp;gt;&amp;gt;&amp;gt; main(usage.split(), stdout)
    &amp;gt;&amp;gt;&amp;gt; print(stdout.getvalue())
    ... #doctest: +ELLIPSIS
    1
    2
    fizz
    4
    buzz
    fizz
    7
    ...
    14
    fizzbuzz
    16
    ...

&amp;quot;&amp;quot;&amp;quot;


def main(argv, stdout):
    [lo_, hi_] = argv[1:3]
    lo, hi = int(lo_), int(hi_)

    for word in fizzbuzz(lo, hi):
        print(word, file=stdout)


def fizzbuzz(lo, hi):
    &amp;quot;&amp;quot;&amp;quot;
    &amp;gt;&amp;gt;&amp;gt; list(fizzbuzz(1, 6))
    [1, 2, &#39;fizz&#39;, 4, &#39;buzz&#39;]
    &amp;quot;&amp;quot;&amp;quot;
    for n in range(lo, hi):
        if n % 3 == 0 and n % 5 == 0:
            yield &amp;quot;fizzbuzz&amp;quot;
        elif n % 3 == 0:
            yield &amp;quot;fizz&amp;quot;
        elif n % 5 == 0:
            yield &amp;quot;buzz&amp;quot;
        else:
            yield n


if __name__ == &#39;__main__&#39;:
    def _script_io():
        from sys import argv, stdout

        main(argv, stdout)

    _script_io()
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Reflection&lt;/h2&gt;
&lt;p&gt;In this example, our 10 line (working!) prototype has turned into 60
lines of code. If a developer asked me to review the original 10 lines
after using it succefully for a few days, and if the cost of a failure
was just a few minutes, I might not bother to touch it.&lt;/p&gt;
&lt;p&gt;But the code did mix IO with logic in a way that makes me uneasy.&lt;/p&gt;
&lt;p&gt;More often, the cost of a failure is re-running a Jenkins job that
takes hours. And even in early prototype form, scripts are usually
longer than 10 lines and applying these techniques turns up a bug or
two or at least clarifies the security properties of the code.&lt;/p&gt;
&lt;p&gt;And in this case, of the resulting 60 lines:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;25 are documentation&lt;ul&gt;
&lt;li&gt;10 show simulated script output, which is very simple&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;main()&lt;/code&gt; function is 6 lines that clearly do nothing
    but parse args, call a function, and output the results&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;_script_io()&lt;/code&gt; function is formulaic&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The &lt;code&gt;fizbuzz()&lt;/code&gt; function retains structure of the original 10 line
prototype, with just 4 lines added for documentation / testing.&lt;/p&gt;</description>
            <pubDate>Mon, 22 Jul 2019 00:00:00 +0000</pubDate>
            <guid>http://www.madmode.com//2019/python-eng/</guid>
        </item>
        <item>
            <title>RChain Blues</title>
            <link>http://www.madmode.com//2019/rchain-blues/</link>
            <description>&lt;p&gt;Working on RChain was fun for a while, but I am no longer be
comfortable with the RChain Cooperative&#39;s business practices.&lt;/p&gt;
&lt;p&gt;I am inclined to keep my distance until I see&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;quarterly financials on time (&#34;no later than 20 days after the
    quarter ends&#34; per IOB 1 from the &lt;a href=&#34;https://blog.rchain.coop/blog/2018/10/26/rchain-2018-election-results/&#34;&gt;2018 annual meeting&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;the &lt;a href=&#34;https://github.com/rchain-community/sm19a/issues/3&#34;&gt;board carry out IOB 4 member participation in
    governance&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/rchain-community/sm19a/issues/11&#34;&gt;timely board agendas and minutes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;some &lt;a href=&#34;https://github.com/rchain-community/sm19a/issues/14#issuecomment-495039918&#34;&gt;details re Barcelona&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;this open-source cooperative &lt;a href=&#34;https://github.com/rchain-community/sm19a/issues/9#issuecomment-495452506&#34;&gt;divest any significant
    interest in a proprietary audio codec license&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The story of how &lt;a href=&#34;https://coinmarketcap.com/currencies/rchain/&#34;&gt;RChain&#39;s CoinMarketCap rank&lt;/a&gt; fell from 30 to
over 200 in 2018 would take more energy to tell than I have just now,
but to emphasize why something as supposedly mundane as quarterly
financial reports has me so uncomfortable...&lt;/p&gt;
&lt;p&gt;I assumed since I got involved in Nov 2017 that any organization that
had raised $30M from investors would have someone keeping books, so
that producing a balance sheets or cashflow statements was a one-click
task... I assumed that people were busy and they just hadn&#39;t bothered
to click that button and share the results.&lt;/p&gt;
&lt;p&gt;I should have known this was yet another case where the web reflects
reality.&lt;/p&gt;
&lt;p&gt;In the board meeting of July 23, 2018, when they decided to spend tens
of millions of dollars on a proprietary audio codec, they &lt;em&gt;did not
know how much money the coop actually had&lt;/em&gt;, according to Meredith at
the &lt;a href=&#34;https://www.youtube.com/watch?v=xdi6ZCsX4K8&#34;&gt;Oct 2018 annual meeting&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Some new board members were elected and tried to improve corporate
governance, but one by one they reached a point of diminishing returns
and moved on to other things.&lt;/p&gt;
&lt;p&gt;After the April &lt;a href=&#34;https://blog.rchain.coop/blog/2019/04/26/rchain-update-04-26-19/&#34;&gt;Barcelona incident&lt;/a&gt;, one member put it this way:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;... it became near impossible to responsibly put one&#39;s reputation on
the line for this project.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I attempted to steer member engagement in a useful direction in a
&lt;a href=&#34;https://github.com/rchain-community/sm19a&#34;&gt;Special Meeting 19A&lt;/a&gt; process; it was a long-shot and not much
resulted from it, but I did manage to get over 100 members on record
thanking those who had served on the board since the October annual
meeting, trying to right the ship:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Whereas Barry Cynamon, Mark Pui, and Kevin Goldstein served with
distinction on the RChain Cooperative board, let us thank them for
their service.&lt;/p&gt;
&lt;/blockquote&gt;</description>
            <pubDate>Wed, 05 Jun 2019 00:00:00 +0000</pubDate>
            <guid>http://www.madmode.com//2019/rchain-blues/</guid>
        </item>
        <item>
            <title>Migrated from github pages to netlify for continuous deployment, SSL</title>
            <link>http://www.madmode.com//2019/netlify-deploy-https/</link>
            <description>&lt;p&gt;A lot of the friction around my blog has been running the build step:
re-constituting python dependencies, running the build, manually
tweaking the results, and committing the build results to github
pages[^1].&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/pmoorman&#34;&gt;pmoorman&lt;/a&gt; turned me on to
&lt;a href=&#34;https://www.netlify.com/&#34;&gt;Netlify&lt;/a&gt; last fall, so I gave it a try:
&lt;strong&gt;Holy shnikeys! it worked 1st try with no tweaks whatsoever!&lt;/strong&gt; I told
it my build command was &lt;code&gt;./site build&lt;/code&gt;[^2] and it picked up my
&lt;code&gt;requirements.txt&lt;/code&gt;, installed the dependencies, built the site and
deployed it.&lt;/p&gt;
&lt;p&gt;Fiddling with DNS took quite a bit longer, but I got free SSL for my
trouble. Netflify pointed out a zillion mixed content issues...
enough that I wrote a little
&lt;a href=&#34;https://github.com/dckc/madmode-blog/blob/netlify-https/fix_insecure.py&#34;&gt;fix_insecure.py&lt;/a&gt;
script to parse their log and make the edits.&lt;/p&gt;
&lt;p&gt;While I&#39;m addressing hygene issues, I fixed the dependency
vulerabilities that github pointed out.[^3]
&lt;a href=&#34;https://github.com/dckc/madmode-blog/blob/netlify-https/CONTRIBUTING.md&#34;&gt;CONTRIBUTING.md&lt;/a&gt;
shows how I bootstrap with direnv and pipenv.&lt;/p&gt;
&lt;p&gt;[^1]: I migrated from nearlyfreespeech.net to github pages in 2015.&lt;/p&gt;
&lt;p&gt;[^2]: When did I switch to frozen flask? Wow... it was 2012. Time flies.&lt;/p&gt;
&lt;p&gt;[^3]: Darn. This footnote markup doesn&#39;t work because flask-markdown predates
     &lt;a href=&#34;https://python-markdown.github.io/change_log/release-3.0/#positional-arguments-deprecated&#34;&gt;deprecating positional arguments&lt;/a&gt;.&lt;/p&gt;</description>
            <pubDate>Thu, 30 May 2019 00:00:00 +0000</pubDate>
            <guid>http://www.madmode.com//2019/netlify-deploy-https/</guid>
        </item>
        <item>
            <title>Smart Contracts for Health Research Data Sharing</title>
            <link>http://www.madmode.com//2018/boulder-bos/</link>
            <description>&lt;p&gt;I&#39;m under contract with RChain, two days a week from June to December,
to work on &lt;a href=&#34;https://github.com/rchain/bounties/issues/788&#34;&gt;smart contracts for health research data
sharing&lt;/a&gt;. I&#39;m still at KUMC for the other three days a week.&lt;/p&gt;
&lt;h2&gt;RChain Devcon Boulder&lt;/h2&gt;
&lt;p&gt;In April, I was invited to &lt;a href=&#34;https://developer.rchain.coop/conference&#34;&gt;RChain Devcon&lt;/a&gt; in Boulder. I enjoyed
Greg&#39;s &lt;a href=&#34;https://www.youtube.com/watch?v=3R3IL1bGm0s&amp;amp;t=617s&#34;&gt;RChain VM talk&lt;/a&gt;. (&lt;em&gt;More on that later, I hope.&lt;/em&gt;) Vlad&#39;s
CBC Casper talk was mostly familiar; I think I got most of it from
&lt;a href=&#34;https://www.youtube.com/watch?v=z3sY8zZRPtw&#34;&gt;his devcon three talk&lt;/a&gt;, which was just my speed.&lt;/p&gt;
&lt;p&gt;I gave a short talk about &lt;a href=&#34;https://docs.google.com/presentation/d/1B2Vu8o3ACwruY6HY1ayXRQ4qkNKsMy4hdbOdxrCHI2o/edit&#34;&gt;Getting Involved in the RChain Bounty
Program&lt;/a&gt; (&lt;a href=&#34;https://www.youtube.com/watch?v=HsQTDNEIbjs&amp;amp;t=1s&#34;&gt;video&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;TimBL had written &lt;a href=&#34;https://webfoundation.org/2018/03/web-birthday-29/&#34;&gt;The web is under threat&lt;/a&gt;, which I used as a
springboard for &lt;a href=&#34;https://docs.google.com/presentation/d/1GOboFZj311rfGExrtCFp3aaQ2vYhxHqX3qnix21nqo4/edit&#34;&gt;Can RChain Answer?&lt;/a&gt; (&lt;a href=&#34;https://www.youtube.com/watch?v=ZnBbi6ifzdo&amp;amp;t=849s&#34;&gt;video&lt;/a&gt;). My summary
slide is:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;It has a lot of the right pieces:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Object Capability Discipline&lt;/li&gt;
&lt;li&gt;Support for Formal Verification&lt;/li&gt;
&lt;li&gt;Integrated Economics with Network Architecture&lt;/li&gt;
&lt;li&gt;Scalability&lt;/li&gt;
&lt;li&gt;Down to transistors&lt;/li&gt;
&lt;li&gt;Up to the globe&lt;/li&gt;
&lt;li&gt;Visionary Leadership&lt;/li&gt;
&lt;li&gt;Cooperative Governance&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;I did a quick run up of capabilities from simple closure-based objects
to sealing and unsealing to capability-based money as in &lt;a href=&#34;http://erights.org/elib/capability/ode/index.html&#34;&gt;Miller,
Morningstar, and Franz&lt;/a&gt; from FC 2000, including:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Before presenting the following simple example of capability-based
money, we must attempt to head off a confusion this example
repeatedly causes. &lt;strong&gt;We are not proposing to actually do money this
way!&lt;/strong&gt; A desirable money system must also provide for: ... blinding,
non-repudiation, accounting controls, and backing (redeemability).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Then—tada!—I showed that &lt;strong&gt;RChain &lt;em&gt;does&lt;/em&gt; propose to do money this
way&lt;/strong&gt; by translating the E code to &lt;a href=&#34;https://github.com/rchain/rchain/blob/master/casper/src/main/rholang/MakeMint.rho&#34;&gt;MakeMint.rho&lt;/a&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;   contract MakeMint(return) = {
     new pairCh, thisMint, internalMakePurse in {
       MakeBrandPair!(*pairCh) | for(@p &amp;lt;- pairCh) {
       ...
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;HERON Clinical Data Repository Access Policy&lt;/h2&gt;
&lt;p&gt;The main smart contract I want to work on is an evolution of the
&lt;a href=&#34;https://informatics.kumc.edu/work/wiki/HeronAdminDev&#34;&gt;HERON policy enforcement layer&lt;/a&gt;, a bunch of python / PHP / SQL
code that enforces the policy around access to KUMC&#39;s clinical data
repository on ~500K patients: you have to be qualified faculty or
sponsored by one, and your human subjects training has to be current
and you have to sign a couple forms:&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;flow of authority&#34; src=&#34;https://informatics.kumc.edu/work/graphviz/a02d7fe066856aadf1894e50f41f4b2aa27ca3b4.dot.png&#34; /&gt;&lt;/p&gt;
&lt;p&gt;Once you get through all that, you can use the i2b2 ad-hoc query
interface to do &#34;cohort discovery&#34;; for example, to find out if enough
of the right kind of patients come through KU Med for the study you
want to do.&lt;/p&gt;
&lt;h2&gt;i2b2 Harvard Symposium&lt;/h2&gt;
&lt;p&gt;The &lt;a href=&#34;http://transmartfoundation.org/harvard-symposium-2018/&#34;&gt;i2b2 tranSMART Foundation Harvard Symposium&lt;/a&gt; was this year&#39;s
annual meeting of the i2b2 user community. Automation of regulatory
processes is a regular topic and this year &lt;a href=&#34;http://geekdoctor.blogspot.com/&#34;&gt;John Halamka&lt;/a&gt; spoke on
&lt;em&gt;Emerging Models of Data Flow - APIs, Blockchain and Cloud&lt;/em&gt;.  He cut
through a lot of the mystery around blockchain technology with a great
illustration of one-way hashing. :)&lt;/p&gt;
&lt;p&gt;&lt;img
src=&#34;https://lh3.googleusercontent.com/6w32pE2Tpc6ZHzHSWKR-TmNvIvL1Nl_21z3UAYFdCukNr-MJcDlPpVTy1HRnTOcrVD2jTt59TQeaD4WEmcftD8PtxAQWeA-OIlRJ8mageizVjdaTUCCL2ENSjmHulogCqPtwcYeQ-Q=w640-h480&#34;
width=&#34;640&#34; height=&#34;480&#34; /&gt;&lt;/p&gt;
&lt;h2&gt;Decentralized identity, verifiable claims&lt;/h2&gt;
&lt;p&gt;While killing time in the airport, I managed to reach Manu Sporny. His
work around &lt;a href=&#34;https://veres.io/use-cases/verifiable-prescriptions/&#34;&gt;verifyable prescriptions&lt;/a&gt; has certain parallels with
research data sharing. It wasn&#39;t all good news, but he did put me in
touch with a couple of his colleagues in the Boston area.&lt;/p&gt;
&lt;p&gt;I had hoped to meet with &lt;a href=&#34;https://dustycloud.org/&#34;&gt;Chris Webber&lt;/a&gt; and
sync up on js libraries for &lt;a href=&#34;https://w3c-ccg.github.io/ocap-ld/&#34;&gt;linked data
capabilities&lt;/a&gt;. Capability security
seems necessary and sufficient, to me, for decentralized access
control. As Stiegler put it in the &lt;a href=&#34;http://erights.org/talks/efun/SecurityPictureBook.pdf&#34;&gt;picture
book&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The patterns described in this picturebook are simple because they
discard the modern fascination with the identities of the
participants. Individual Authentication is so pervasive, it is now a
part of the problem.&lt;/p&gt;
&lt;p&gt;Suppose that your car, instead of accepting a delegatable key,
demanded that your driver’s license match the car’s title registry,
which happens to be in your spouse’s name. Entrepreneurs would leap
forward to develop ever more powerful &#34;identity management&#34; for
automobiles. We would subcontract to security experts so our
teenage daughters could borrow the car to buy milk. Heaven forfend
that the daughter, breaking her leg, had to delegate to her best
friend to get to the hospital.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Unfortunately, while Chris is closer to Boston these days, he&#39;s still a couple hours away.&lt;/p&gt;
&lt;p&gt;But I did get to meet &lt;a href=&#34;http://computingjoy.com/&#34;&gt;Dmitri Zagidulin&lt;/a&gt; over breakfast. He has
done javascript work both with TimBL and company on
&lt;a href=&#34;https://github.com/solid/solid&#34;&gt;solid&lt;/a&gt; and with Manu on decentralized
identifiers
(e.g. &lt;a href=&#34;https://github.com/digitalbazaar/did-io&#34;&gt;did-io&lt;/a&gt;). He isn&#39;t yet
working on linked data capabilities yet, so I twisted his arm in that
direction, and &lt;a href=&#34;http://www.madmode.com/2011/07/secure-mashups-csrf-resistent.html&#34;&gt;away from
WebID&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Things started to click for him when I talked about verifyable claims
in terms of insurance and markets:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Proof of identity, in so much as it involves revelation of the
profile, or enables its revelation through the use of unique
identifiers, is trade in an asset when the information revealed is
more than the minimum required with current technology. -- &lt;a href=&#34;https://www.w3.org/2000/12/drm-ws/pp/hp-poorvi2.html&#34;&gt;Vora
et. al from HP at W3C 2001 DRM
Workshop&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Take proof of age, for example. A smart contract for a client might
ask &#34;who will bet me $10 at 50-to-1 that this request comes from
someone over 21 years of age?&#34; A business where people are routinely
physically present is in a position to take such bets with high
confidence.&lt;/p&gt;
&lt;h2&gt;Personal Health Records&lt;/h2&gt;
&lt;p&gt;Manu also put me in touch with &lt;a href=&#34;http://healthurl.com/www/Blogs_+.html&#34;&gt;Adrian
Gropper&lt;/a&gt;, CTO of Patient
Privacy Rights. Meeting in the airport as he was arriving and I was
departing was a bit hectic, so I couldn&#39;t be sure whether I had read
the paper he and Mark Miller worked:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/WebOfTrustInfo/rebooting-the-web-of-trust-fall2017/blob/master/final-documents/identity-hubs-capabilities-perspective.md&#34;&gt;Identity Hubs Capabilities Perspective&lt;/a&gt; Rebooting the Web of
   Trust V, October 13, 2017 by Adrian Gropper, Drummond Reed, Mark
   S. Miller&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;His description of &lt;a href=&#34;http://hieofone.org/&#34;&gt;HIEofone&lt;/a&gt; increased the
priority of UMA in my things-to-study-in-more-depth list:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;HIE of One (Health Information Exchange of One) is a
volunteer-driven open source project to combine emerging standards
for access authorization (OpenID HEART) and emerging standards for
blockchain-based self-sovereign identity (DID) into a
patient-centered health record infrastructure.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;He was one of several people on this trip that talked about FHIR
deployment in ways that make me want to look into it again. In
particular, he mentioned a FHIR sandbox by CMS, the medicare folks.&lt;/p&gt;
&lt;h2&gt;OCap-safe JavaScript&lt;/h2&gt;
&lt;p&gt;On the way home, I got stuck in the Washington D.C. airport overnight
due to weather. I used the time to start
&lt;a href=&#34;https://github.com/dckc/tinyses2rho/&#34;&gt;tinyses2rho&lt;/a&gt;, some exploratory
scala code to integrate TinySES with RChain.&lt;/p&gt;
&lt;p&gt;TinySES is a small subset of JavaScript designed so that non-experts
can use to write non-trivial non-exploitable smart contracts. It comes
from Mark Miller and company, who have been working on object
capabilities and smart contracts at least as far back as the early
&#39;90s, and recently &lt;a href=&#34;https://www.coindesk.com/new-startup-zooko-naval-betting-better-crypto-contracts/&#34;&gt;launched
Agoric&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#39;https://photos.google.com/share/AF1QipPEmCV0T84sLHj1L1zNUQ-eldo2SVxeNYYf49RhnQF-5kp6kHZua4BAbfgCDOrICw?key=cmVENTBqc2YwY2g2QzZxQkJjSUVvVXFYYXg3QTVB&amp;source=ctrlq.org&#39;&gt;&lt;img alt=&#39;DCA in the wee hours&#39; src=&#39;https://lh3.googleusercontent.com/rv9s-h-_E58jZftv4H1XcBlgGtx1hszNMMpXrQyMVDGuath90K8OtXn7_ItZxR0G6n-_1dEVujUf0ED_nKtPq8qZElbDRsAY7PkWvKyOGejZgAZVU6HLKmQ3cKOdF0Rf-gCrh0zM8w=w2400&#39; /&gt;&lt;/a&gt;&lt;/p&gt;</description>
            <pubDate>Thu, 12 Jul 2018 00:00:00 +0000</pubDate>
            <guid>http://www.madmode.com//2018/boulder-bos/</guid>
        </item>
        <item>
            <title>dreaming big at the RChain Governance Forum</title>
            <link>http://www.madmode.com//2018/rchain-gov-forum-SEA/</link>
            <description>&lt;p&gt;I&#39;m back from the &lt;a href=&#34;https://www.rchain.coop/&#34;&gt;RChain&lt;/a&gt; Governance Forum in Seattle, which was
full of big dreams, just like the first Web conference in Geneva.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Why RChain? Governance and blockchain can&#39;t be separated; I felt
compelled to connect them. -- &lt;a href=&#34;https://platform.coop/2017/schedule/breakout-panels-next-money-new-tech-for-new-finance&#34;&gt;Greg Meredith Sep 2017&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I went in with almost no idea what that means. But at the closing
brunch, I found myself telling the next person at the table that the
economics of email—the original decentralized Internet communication
platform—was what led me to trade my privacy to Google for spam
protection.&lt;/p&gt;
&lt;p&gt;Many of us who built the Web had in mind a decentralized system where
access to information and freedom of expression would enrich our lives.
At some level, we knew sharp tools cut both ways, but ...&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;When REST was being framed, it seemed inconceivable that two billion
people would all agree to use one website (Facebook); -- &lt;a href=&#34;https://research.google.com/pubs/pub46310.html&#34;&gt;Fielding et. al. 2017&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The result is a vulnerability that Kate Charlet, who worked on Cyber
Policy in the U.S. Department of Defense for the last decade, &lt;a href=&#34;http://www.irckc.org/m/event_details.asp?id=1041848&#34;&gt;says&lt;/a&gt;
nation states have successfully used to destabilize our democracy.&lt;/p&gt;
&lt;p&gt;Perhaps there&#39;s something to all this blockchain stuff; perhaps we can
repair the imbalance by integrating economics into the next generation
network architecture.&lt;/p&gt;
&lt;p&gt;The imbalance in the system has a glib description:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;If you are not paying for it, you&#39;re not the customer; you&#39;re the
product being sold. -- &lt;a href=&#34;https://www.metafilter.com/95152/Userdriven-discontent#32560467&#34;&gt;blue_beetle Aug 2010&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;But another way to put it is:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;There&#39;s a strangle-hold on social media today; people don&#39;t get a
chance to participate in the economic proposition in an equitable
way. -- &lt;a href=&#34;https://youtu.be/p0a0zu5APd4&#34;&gt;Greg Meredith, Jan 2017&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;He emphasizes that we need new ways of coordinating, inspired by
resilient living systems and reflective intelligence. Tai Chi on
Saturday morning was a whole body experience of it.&lt;/p&gt;
&lt;p&gt;And music!&lt;/p&gt;
&lt;p&gt;I had great conversations with Peter and Jonathan and Derek and Rudy,
including Ted Nelson&#39;s ideas on the &lt;a href=&#34;http://www.madmode.com/2008/01/technology-that-inspires.html&#34;&gt;evolution of movie making&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Greg performed in a group of mind-bogglingly improvisational guitar
players. Mostly I felt stressed and out of place when listening to it.
But I was right at home when the twelve bar blues chord progression
emerged in the middle of it.&lt;/p&gt;
&lt;p&gt;I was also pretty much at home when I saw lightning talks on the
agenda, so I offered to lead the session.  That was &lt;a href=&#34;https://youtu.be/Mmkae9E93tk?t=1h46m13s&#34;&gt;great
fun&lt;/a&gt;. I gave two talks myself and enjoyed a lot of the
follow-up discussions.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://docs.google.com/presentation/d/1XxdZxk9mWbB4cAely1_Ly5DZo8sTIeE4jq-s5gqiaqw/edit?usp=sharing&#34;&gt;Toward a Trust Metric for Authority in the RChain Bounty System&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://docs.google.com/presentation/d/1dW1nsNDJjXBd6YTBOxQ21GBGqHMt5Q8f3B1RIG3bNao/edit#slide=id.p&#34;&gt;RChain Life, a learning game&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The technical architecture of RChain also sunk in a bit more.
In addition to &lt;a href=&#34;http://www.madmode.com/2017/rchain-dev-retreat.html&#34;&gt;capability security and namespaces&lt;/a&gt;, I&#39;m beginning
to see reflection (the R in RChain) as a possible solution
to the &lt;a href=&#34;https://lists.w3.org/Archives/Public/public-cwm-talk/2016JanMar/0000.html&#34;&gt;quoting and diagonalization issues&lt;/a&gt; TimBL and I struggled
with in the Semantic Web.&lt;/p&gt;
&lt;h2&gt;References&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Fielding, Taylor, Erenkrantz, Gorlick, Whitehead, Khare, Oreizy,
   &lt;a href=&#34;https://research.google.com/pubs/pub46310.html&#34;&gt;Reflections on the REST Architectural Style and “Principled Design
   of the Modern Web Architecture”&lt;/a&gt; ESEC/FSE 2017&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://www.youtube.com/watch?v=6oFAmQUM8ws&#34;&gt;video&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Arndt, Verborgh, De Roo, Sun, Mannens, Van De Walle, &lt;a href=&#34;http://link.springer.com/chapter/10.1007/978-3-319-21542-6_9&#34;&gt;Semantics of
    Notation3 Logic: A Solution for Implicit Quantification&lt;/a&gt;
    RuleML 2015&lt;/li&gt;
&lt;li&gt;Berners-Lee, Connolly, Kagal, Hendler, and
   Schraf, &lt;a href=&#34;https://arxiv.org/abs/0711.1533&#34;&gt;N3Logic: A Logical Framework for the World Wide
   Web&lt;/a&gt; Journal of Theory and Practice of Logic Programming
   (TPLP), Special Issue on Logic Programming and the Web, 2008&lt;/li&gt;
&lt;/ul&gt;</description>
            <pubDate>Wed, 21 Feb 2018 00:00:00 +0000</pubDate>
            <guid>http://www.madmode.com//2018/rchain-gov-forum-SEA/</guid>
        </item>
        <item>
            <title>Smart Contracts and Capabilities Up Close</title>
            <link>http://www.madmode.com//2017/rchain-dev-retreat/</link>
            <description>&lt;p&gt;This year I was invited to a &lt;a href=&#34;https://foresight.org/event/next-frontier-blockchain-meets-object-capabilities/&#34;&gt;Blockchain meets Object Capabilities
panel&lt;/a&gt; in San Francisco July 3 and the &lt;a href=&#34;https://github.com/rchain/Members/issues/191&#34;&gt;RChain developer retreat&lt;/a&gt;
in Park City Nov 12-17. Leaving Park City was... &lt;em&gt;interesting&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;My flight to San Francisco was funded from the &lt;a href=&#34;http://www.madmode.com/2016/eth-dao.html&#34;&gt;$30 that I put into
Ethereum&lt;/a&gt; in mid 2016--as an educational expense, I thought; I
hardly expected to square my investment.&lt;/p&gt;
&lt;p&gt;Jorge Lopez of &lt;a href=&#34;https://economicspace.agency/gravity&#34;&gt;Gravity&lt;/a&gt; hosted long-time capabilities leaders Mark
Miller, Zooko Wilcox, and Brian Warner as well as Arthur Breitman of
&lt;a href=&#34;https://www.tezos.com/&#34;&gt;Tezos&lt;/a&gt;. Zooko also represented &lt;a href=&#34;https://z.cash/&#34;&gt;Zcash&lt;/a&gt;.&lt;/p&gt;
&lt;figure&gt;
&lt;a href=&#34;https://photos.app.goo.gl/XnUs6dddBlRTl94F2&#34;&gt; &lt;img src=&#34;https://lh3.googleusercontent.com/-47cAa-jvInI/WknX6v9rDuI/AAAAAAAAEsk/0WCmJqTB3YAJLdm1gux1PRZ86BF32kU3QCJoC/w530-h224-n-rw/IMG_20170703_182953499.jpg&#34; alt=&#34;&#34; /&gt;
&lt;figcaption&gt;Mark Miller with Lopez and Warner to his right and Breitman and Wilcox to his left&lt;/figcaption&gt; &lt;/a&gt;
&lt;/figure&gt;

&lt;p&gt;Brian gave a great summary of the bitcoin market forces but I was too
engrossed in the event to take notes; the one quote I managed to write
down was &#34;Satoshi is probably in the room.&#34;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Aside: &lt;a href=&#34;https://oasis.sandstorm.io/&#34;&gt;Sandstorm Oasis&lt;/a&gt; let me export
the grain I took my notes in even though my subscription had
lapsed. That&#39;s pretty cool.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;The evening before the panel, @zooko gave a &lt;a href=&#34;https://twitter.com/zooko/status/881656410777411584&#34;&gt;shout&lt;/a&gt; out to my
&lt;a href=&#34;https://github.com/dckc/awesome-ocap&#34;&gt;awesome-ocap&lt;/a&gt; list, and in a &lt;a href=&#34;https://twitter.com/robertobrien/status/905362724292509696&#34;&gt;reply from @robertobrien&lt;/a&gt;, I
discovered &lt;a href=&#34;http://rchain-architecture.readthedocs.io/en/latest/contracts/namespaces.html&#34;&gt;RChain&#39;s Namespace Logic&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I saw Mike Stay&#39;s name, which was familiar from &lt;a href=&#34;https://groups.google.com/forum/#!forum/cap-talk&#34;&gt;cap-talk&lt;/a&gt;
discussion, on some of the citations in the RChain Architecture
document, and asked him some questions in email. Before long I was
contributing &lt;a href=&#34;https://github.com/rchain/rchain/pull/40&#34;&gt;little tweaks&lt;/a&gt; to the code and wrangled an
invitation to the developer retreat.&lt;/p&gt;
&lt;blockquote class=&#34;twitter-tweet&#34; data-lang=&#34;en&#34;&gt;&lt;p lang=&#34;en&#34; dir=&#34;ltr&#34;&gt;RChain developer&amp;#39;s retreat at Flanagan&amp;#39;s &lt;a href=&#34;https://t.co/5by4odQ85J&#34;&gt;pic.twitter.com/5by4odQ85J&lt;/a&gt;&lt;/p&gt;&amp;mdash; Dan Connolly (@dckc) &lt;a href=&#34;https://twitter.com/dckc/status/930621928116592640?ref_src=twsrc%5Etfw&#34;&gt;November 15, 2017&lt;/a&gt;&lt;/blockquote&gt;
&lt;script async src=&#34;https://platform.twitter.com/widgets.js&#34; charset=&#34;utf-8&#34;&gt;&lt;/script&gt;

&lt;p&gt;Again, I was too engrossed to take good notes, but they made
&lt;a href=&#34;https://www.youtube.com/playlist?list=PLf2bbiic5ZjCPzin3gCSMGiBtbT8UO5o2&#34;&gt;recordings of the main sessions&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The RChain goals are ambitious, to say the least: &#34;content delivery at
the scale of Facebook and transactions at the speed of Visa.&#34; Not to
mention a an &#34;e pluribus unum 2.0, a new center on a scale-invariant
axis reconciling the wisdom of collective and the wisdom of the
individual&#34; for collaborating on problems such as global warming.  An
&lt;a href=&#34;https://www.youtube.com/watch?v=p0a0zu5APd4&#34;&gt;interview with Greg Meredith&lt;/a&gt; from the &lt;a href=&#34;https://bitcointalk.org/index.php?topic=1747033.0&#34;&gt;January RChain
announcement&lt;/a&gt; filled in a lot of the background for me.&lt;/p&gt;
&lt;p&gt;Nash and the gang did an amazing job hosting. We had dinner out most
nights and breakfast in the houses in the morning, and it&#39;s a tough
call which was better.&lt;/p&gt;
&lt;p&gt;On the last day, after a mind-blowing week, we were all lounging
around, zoned out on our phones, when we noticed the snow. For some,
it was their first snowstorm... nice and pretty. Then Nash snapped
us out of it: &#34;&lt;strong&gt;Get off the mountain now&lt;/strong&gt; before they close
the pass and you miss your flights!&#34; As we were getting in the
big rental SUV, I asked, &#34;Have you driven in snow before?&#34; and since
she hadn&#39;t, the keys passed to me.&lt;/p&gt;
&lt;p&gt;The drive out was a little hairy, but
&lt;a href=&#34;https://twitter.com/VladZamfir&#34;&gt;Vlad&lt;/a&gt; shared some tunes and
we all got to know each other a little better.&lt;/p&gt;
&lt;figure&gt;
&lt;a href=&#34;https://photos.app.goo.gl/eTkY2Pb8L8Errglf2&#34;&gt; &lt;img src=&#34;https://lh3.googleusercontent.com/-aUKMLj97inQ/Wk3Dn5U6f5I/AAAAAAAAEuY/-CMagGS7HuQ6RVwCGm42zhNAYfbZkvP2gCJoC/w530-h323-n-rw/IMG_0572.jpg&#34; alt=&#34;&#34; /&gt;
&lt;figcaption&gt;Escaping Park City&lt;/figcaption&gt; &lt;/a&gt;
&lt;/figure&gt;</description>
            <pubDate>Sun, 31 Dec 2017 00:00:00 +0000</pubDate>
            <guid>http://www.madmode.com//2017/rchain-dev-retreat/</guid>
        </item>
        
    </channel>
</rss>