<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Api on traviscj/blog</title>
    <link>https://traviscj.com/blog/tags/api/</link>
    <description>Recent content in Api on traviscj/blog</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Tue, 24 Jun 2025 19:47:52 -0500</lastBuildDate>
    <atom:link href="https://traviscj.com/blog/tags/api/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Evolution of a Get Endpoint</title>
      <link>https://traviscj.com/blog/post/2025-06-24-evolution-of-a-get-endpoint/</link>
      <pubDate>Tue, 24 Jun 2025 19:47:52 -0500</pubDate>
      <guid>https://traviscj.com/blog/post/2025-06-24-evolution-of-a-get-endpoint/</guid>
      <description>&lt;p&gt;My work project started pretty simple: there was a simple &lt;code&gt;GetXyz&lt;/code&gt; endpoint that just looked up the &lt;code&gt;xyz&lt;/code&gt; record in the database by a unique key &amp;amp; returned it.&#xA;How complicated could it be?&lt;/p&gt;&#xA;&lt;p&gt;It was a straightforward generalization of an old &lt;code&gt;GetAbc&lt;/code&gt; functionality, it was really only used by oncall engineers through an admin console, it shouldn&amp;rsquo;t have been too big of a deal.&lt;/p&gt;&#xA;&lt;p&gt;Ok, but then it outgrew its original datastore, so a separate service had to be created.&#xA;We thought about migrating clients, but at the time it seemed faster to just implement once on our side &amp;amp; have clients continue calling us; essentially encapsulating the separate service as an implementation detail.&#xA;But as part of the traffic swing, we figured it should support either the &lt;code&gt;local&lt;/code&gt; or the &lt;code&gt;remote&lt;/code&gt; read path.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Transacter and Intent/Result</title>
      <link>https://traviscj.com/blog/post/2022-06-15-transacter-and-intent-result/</link>
      <pubDate>Wed, 15 Jun 2022 08:07:47 -0500</pubDate>
      <guid>https://traviscj.com/blog/post/2022-06-15-transacter-and-intent-result/</guid>
      <description>&lt;p&gt;At SQ, we had a family of &lt;code&gt;Transacter&lt;/code&gt; interfaces:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;public&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;interface&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;Transacter&lt;/span&gt; {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#66d9ef&#34;&gt;void&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;transaction&lt;/span&gt;(Function&lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;&lt;/span&gt;Session, Void&lt;span style=&#34;color:#f92672&#34;&gt;&amp;gt;&lt;/span&gt; session);&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#66d9ef&#34;&gt;public&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;interface&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;Session&lt;/span&gt; {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    DSLContext &lt;span style=&#34;color:#a6e22e&#34;&gt;dsl&lt;/span&gt;();&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;where &lt;code&gt;DSLContext&lt;/code&gt; is a &lt;a href=&#34;https://www.jooq.org/javadoc/latest/org.jooq/org/jooq/DSLContext.html&#34;&gt;jOOQ concept&lt;/a&gt; &amp;amp; is the handle for doing work against the database.&#xA;Then this would be used in some class like&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;public&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;class&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;KvDao&lt;/span&gt; {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#a6e22e&#34;&gt;@Inject&lt;/span&gt; Transacter transacter;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#66d9ef&#34;&gt;void&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;put&lt;/span&gt;(String ns, String k, String v) {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    transacter.&lt;span style=&#34;color:#a6e22e&#34;&gt;transaction&lt;/span&gt;(session &lt;span style=&#34;color:#f92672&#34;&gt;-&amp;gt;&lt;/span&gt; {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        KvRecord record &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;new&lt;/span&gt; KvRecord(ns, k, v);&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        session.&lt;span style=&#34;color:#a6e22e&#34;&gt;dsl&lt;/span&gt;().&lt;span style=&#34;color:#a6e22e&#34;&gt;insertInto&lt;/span&gt;(KV).&lt;span style=&#34;color:#a6e22e&#34;&gt;set&lt;/span&gt;(record).&lt;span style=&#34;color:#a6e22e&#34;&gt;execute&lt;/span&gt;();&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    });&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The parameters &lt;code&gt;ns&lt;/code&gt;, &lt;code&gt;k&lt;/code&gt;, and &lt;code&gt;v&lt;/code&gt; are shorthand for &lt;code&gt;namespace&lt;/code&gt;, &lt;code&gt;key&lt;/code&gt;, and &lt;code&gt;value&lt;/code&gt;, respectively.&#xA;We&amp;rsquo;ll show how these might be used together shortly!&lt;/p&gt;</description>
    </item>
    <item>
      <title>interceptors</title>
      <link>https://traviscj.com/blog/post/2020-05-18-interceptors/</link>
      <pubDate>Mon, 18 May 2020 15:13:00 -0700</pubDate>
      <guid>https://traviscj.com/blog/post/2020-05-18-interceptors/</guid>
      <description>&lt;p&gt;INTERCEPTORS ARE SO COOL!&lt;/p&gt;&#xA;&lt;p&gt;Sometimes you need some &amp;ldquo;generic rails&amp;rdquo; that are still highly adaptable to other uses.&#xA;This is the basic problem solved by the &lt;a href=&#34;https://en.wikipedia.org/wiki/Interceptor_pattern&#34;&gt;Interceptor pattern&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;I really love the way &lt;a href=&#34;https://square.github.io/okhttp/&#34;&gt;OkHttp&lt;/a&gt; does &lt;a href=&#34;https://square.github.io/okhttp/interceptors/&#34;&gt;interceptors&lt;/a&gt; for the generic rails of making HTTP calls, so I wanted to walk through a case study of why an interceptor might be useful and then try to synthesize some lessons &amp;amp; a minimal example of the pattern.&lt;/p&gt;</description>
    </item>
    <item>
      <title>unreasonable wish -- an sql interface to websites</title>
      <link>https://traviscj.com/blog/post/2019-01-06-sql_interface_to_websites/</link>
      <pubDate>Sun, 06 Jan 2019 00:00:00 +0000</pubDate>
      <guid>https://traviscj.com/blog/post/2019-01-06-sql_interface_to_websites/</guid>
      <description>&lt;p&gt;I was searching Amazon Prime for some Earl Grey tea for my wife.&#xA;I got these results&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://traviscj.com/blog/assets/earl_grey_tea.png&#34; alt=&#34;earl grey tea&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;This was just a basic search for &lt;a href=&#34;https://www.amazon.com/s?url=srs%3D7301146011%26search-alias%3Dpantry&amp;amp;field-keywords=earl+grey+tea&#34;&gt;earl grey tea&lt;/a&gt; in the Prime Pantry store.&lt;/p&gt;&#xA;&lt;p&gt;I would love to&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;SELECT&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;FROM&lt;/span&gt; products p&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;WHERE&lt;/span&gt; p.prime_pantry &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#66d9ef&#34;&gt;AND&lt;/span&gt; p.keywords &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;earl grey tea&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#66d9ef&#34;&gt;AND&lt;/span&gt; p.packaging &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;bulk&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I get that this&amp;rsquo;ll never happen, but man&amp;hellip; it&amp;rsquo;d be nice.&lt;/p&gt;</description>
    </item>
    <item>
      <title>mysql feeds</title>
      <link>https://traviscj.com/blog/post/2018-06-29-mysql_feeds/</link>
      <pubDate>Fri, 29 Jun 2018 00:00:00 +0000</pubDate>
      <guid>https://traviscj.com/blog/post/2018-06-29-mysql_feeds/</guid>
      <description>&lt;p&gt;At work, we use a pattern called &lt;em&gt;feeds&lt;/em&gt; that gets an incredible amount of work done.&#xA;I&amp;rsquo;ve been wanting to describe it here for quite a while, and now seems as good of time as any.&lt;/p&gt;&#xA;&lt;p&gt;The basic premise is: You have a service A with some data that other &amp;ldquo;consuming&amp;rdquo; services B, C, and D want to find out about.&#xA;Maybe the data is payments, maybe it&amp;rsquo;s support cases, maybe it&amp;rsquo;s password changes&amp;hellip; whatever.&#xA;The other services might include your data warehouse, some event listeners, whatever.&lt;/p&gt;</description>
    </item>
    <item>
      <title>sfpark api</title>
      <link>https://traviscj.com/blog/post/2018-04-24-sfpark-api/</link>
      <pubDate>Tue, 24 Apr 2018 16:29:39 +0000</pubDate>
      <guid>https://traviscj.com/blog/post/2018-04-24-sfpark-api/</guid>
      <description>&lt;p&gt;I recently came to learn of the &lt;a href=&#34;http://sfpark.org/wp-content/uploads/2013/12/SFpark_API_Dec2013.pdf&#34;&gt;SFpark API&lt;/a&gt;, which lets one make queries like:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;LAT=37.787702&#xA;LONG=-122.407796&#xA;curl &amp;quot;http://api.sfpark.org/sfpark/rest/availabilityservice?lat=${LAT}&amp;amp;long=${LONG}&amp;amp;radius=0.25&amp;amp;uom=mile&amp;amp;response=json&amp;quot; | pbcopy&#xA;pbpaste | jq &#39;.AVL[] | select (.TYPE | contains(&amp;quot;OFF&amp;quot;))&#39;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;and get a response including records like:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;{&#xA;  &amp;quot;TYPE&amp;quot;: &amp;quot;OFF&amp;quot;,&#xA;  &amp;quot;OSPID&amp;quot;: &amp;quot;950&amp;quot;,&#xA;  &amp;quot;NAME&amp;quot;: &amp;quot;Union Square Garage&amp;quot;,&#xA;  &amp;quot;DESC&amp;quot;: &amp;quot;333 Post Street&amp;quot;,&#xA;  &amp;quot;INTER&amp;quot;: &amp;quot;Geary between Stockton &amp;amp; Powell&amp;quot;,&#xA;  &amp;quot;TEL&amp;quot;: &amp;quot;(415) 397-0631&amp;quot;,&#xA;  &amp;quot;OPHRS&amp;quot;: {&#xA;    &amp;quot;OPS&amp;quot;: {&#xA;      &amp;quot;FROM&amp;quot;: &amp;quot;7 Days/Wk&amp;quot;,&#xA;      &amp;quot;BEG&amp;quot;: &amp;quot;24 Hrs/Day&amp;quot;&#xA;    }&#xA;  },&#xA;  &amp;quot;OCC&amp;quot;: &amp;quot;381&amp;quot;,&#xA;  &amp;quot;OPER&amp;quot;: &amp;quot;670&amp;quot;,&#xA;  &amp;quot;PTS&amp;quot;: &amp;quot;1&amp;quot;,&#xA;  &amp;quot;LOC&amp;quot;: &amp;quot;-122.407447946,37.7876789151&amp;quot;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Pretty cool!&lt;/p&gt;</description>
    </item>
    <item>
      <title>todobackend.com</title>
      <link>https://traviscj.com/blog/post/2018-01-05-todobackend.com/</link>
      <pubDate>Fri, 05 Jan 2018 00:01:00 +0000</pubDate>
      <guid>https://traviscj.com/blog/post/2018-01-05-todobackend.com/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://www.todobackend.com/&#34;&gt;TodoBackend.com&lt;/a&gt; defines &lt;a href=&#34;http://www.todobackend.com/contribute.html&#34;&gt;a simple API&lt;/a&gt; and has a frontend that works given any backend URL.&lt;/p&gt;&#xA;&lt;p&gt;Particularly interesting to me:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://github.com/jhedev/todobackend-haskell&#34;&gt;haskell&lt;/a&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;super concise!&lt;/li&gt;&#xA;&lt;li&gt;whoa, 6 different backends!&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://github.com/jhedev/todobackend-haskell/blob/master/todobackend-spock/src/Main.hs&#34;&gt;spock backend&lt;/a&gt; is crazy concise.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://github.com/Faerbit/todo-backend-flask/blob/master/todo/views.py&#34;&gt;python + flask&lt;/a&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;seems like it would greatly benefit from a &lt;code&gt;Store&lt;/code&gt; object&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://github.com/raboof/todo-backend-akka/blob/master/src/main/scala/net/bzzt/todo/backend/akka/TodoStorage.scala&#34;&gt;scala + akka&lt;/a&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;crazy pattern matching in &lt;a href=&#34;https://github.com/raboof/todo-backend-akka/blob/master/src/main/scala/net/bzzt/todo/backend/akka/TodoRoutes.scala&#34;&gt;routes definition&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://github.com/ismagilov/todobackend-mangooio/tree/master/src/main/java&#34;&gt;java + mangooio + jOOQ&lt;/a&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;especially the distinction between &lt;code&gt;Todo&lt;/code&gt; and &lt;code&gt;TodoPatch&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;also really glad I don&amp;rsquo;t have to write &lt;a href=&#34;https://github.com/ismagilov/todobackend-mangooio/blob/master/src/main/resources/routes.yaml&#34;&gt;routes config&lt;/a&gt; separately from the code!&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://github.com/akiellor/todo-backend-compojure/blob/master/src/todo_backend_compojure/&#34;&gt;clojure + jetty/compojure + postgresql&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://github.com/hammerdr/todo-backend-rails&#34;&gt;rails&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://github.com/meier-christoph/todo-backend-golang-goa/blob/master/app/controllers.go&#34;&gt;go + goa&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>url encoding safe relational operators</title>
      <link>https://traviscj.com/blog/post/2017-11-29-url-encoding-safe-relational-operators/</link>
      <pubDate>Wed, 29 Nov 2017 07:55:04 +0000</pubDate>
      <guid>https://traviscj.com/blog/post/2017-11-29-url-encoding-safe-relational-operators/</guid>
      <description>&lt;p&gt;I was catching up on &lt;a href=&#34;https://publicobject.com/&#34;&gt;Jesse Wilson&amp;rsquo;s blog&lt;/a&gt; this morning, and in particular his post &lt;a href=&#34;https://publicobject.com/2017/08/01/url-encoding-is-material/&#34;&gt;URL Encoding Is Material&lt;/a&gt;.&#xA;In that article, he says&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;My advice&lt;/p&gt;&#xA;&lt;p&gt;If you’re defining your own URLs, you’ll save a lot of trouble by avoiding characters like &amp;lt;, &amp;gt;, {, }, +, ^, &amp;amp;, |, and ;.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I came across this problem in one of my projects at work:&#xA;I wanted a page to display some recent records with 1) a &lt;code&gt;name&lt;/code&gt; field provided by the user and 2) a &lt;code&gt;value&lt;/code&gt; field that match $l \leq \text{value} \leq b$, where $l$ and $b$ are given by the user.&#xA;I also wanted that page to have a URL representing that condition, so that it could be easily shared with teammates and soforth.&#xA;When I started working on it, I didn&amp;rsquo;t have Jesse&amp;rsquo;s wisdom, and so I naively came up with a URL structure something like&lt;/p&gt;</description>
    </item>
    <item>
      <title>basic http requests and server handlers in clojure</title>
      <link>https://traviscj.com/blog/post/2017-02-01-basic_http_requests_and_server_handlers_in_clojure/</link>
      <pubDate>Wed, 01 Feb 2017 00:00:00 +0000</pubDate>
      <guid>https://traviscj.com/blog/post/2017-02-01-basic_http_requests_and_server_handlers_in_clojure/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve been playing around a tiny bit with &lt;a href=&#34;https://clojure.org/&#34;&gt;clojure&lt;/a&gt;, and wanted to document the process of doing something pretty basic: make a project that can request my website over HTTPs.&lt;/p&gt;&#xA;&lt;p&gt;The first step is pretty easy:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;brew install leiningen&#xA;lein new random-experimentation&#xA;cd random-experimentation&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;and add &lt;code&gt;[clj-http &amp;quot;3.4.1&amp;quot;]&lt;/code&gt; to &lt;code&gt;project.clj&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;The HTTPS part is a bit trickier.&#xA;The JDK doesn&amp;rsquo;t include the &lt;a href=&#34;https://letsencrypt.org/&#34;&gt;Letsencrypt&lt;/a&gt; certificates.&#xA;But I found a simple script &lt;a href=&#34;https://gist.github.com/Firefishy/109b0f1a90156f6c933a50fe40aa777e&#34;&gt;install-letsencrypt-in-jdk.sh&lt;/a&gt; that can set it up.&lt;/p&gt;</description>
    </item>
    <item>
      <title>filter vs spec (draft)</title>
      <link>https://traviscj.com/blog/post/2017-01-18-filter_vs_spec/</link>
      <pubDate>Wed, 18 Jan 2017 00:00:00 +0000</pubDate>
      <guid>https://traviscj.com/blog/post/2017-01-18-filter_vs_spec/</guid>
      <description>&lt;p&gt;Consider a silly data model to store data about cities like&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;message City {&#xA;  optional string city_name = 1;&#xA;  optional string state = 2;&#xA;  optional int32 population = 3;&#xA;  optional int32 year_founded = 4;&#xA;  // ... presumably others :-)&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;and some sample data like:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;[&#xA;  {&amp;quot;city_name&amp;quot;: &amp;quot;Portland&amp;quot;, &amp;quot;state&amp;quot;: &amp;quot;OR&amp;quot;, &amp;quot;population&amp;quot;: ...},&#xA;  {&amp;quot;city_name&amp;quot;: &amp;quot;Portland&amp;quot;, &amp;quot;state&amp;quot;: &amp;quot;ME&amp;quot;, &amp;quot;population&amp;quot;: ...},&#xA;  {&amp;quot;city_name&amp;quot;: &amp;quot;Springfield&amp;quot;, &amp;quot;state&amp;quot;: &amp;quot;FL&amp;quot;, &amp;quot;population&amp;quot;: ...},&#xA;  {&amp;quot;city_name&amp;quot;: &amp;quot;Springfield&amp;quot;, &amp;quot;state&amp;quot;: &amp;quot;IL&amp;quot;, &amp;quot;population&amp;quot;: ...},&#xA;  {&amp;quot;city_name&amp;quot;: &amp;quot;Springfield&amp;quot;, &amp;quot;state&amp;quot;: &amp;quot;CO&amp;quot;, &amp;quot;population&amp;quot;: ...}&#xA;]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;There are some useful entities we can define: (DRAFT NB: don&amp;rsquo;t read too much into the matcher vs filter lingo.)&lt;/p&gt;</description>
    </item>
    <item>
      <title>CBCL: The Common Business Communication Language</title>
      <link>https://traviscj.com/blog/post/2016-12-12-cbcl/</link>
      <pubDate>Mon, 12 Dec 2016 23:05:28 +0000</pubDate>
      <guid>https://traviscj.com/blog/post/2016-12-12-cbcl/</guid>
      <description>&lt;p&gt;I recently came across McCarthy&amp;rsquo;s &lt;a href=&#34;http://www-formal.stanford.edu/jmc/cbcl2.pdf&#34;&gt;CBCL&lt;/a&gt; paper on Hacker News.&#xA;He presents a Lisp notation as a format for sharing requests between different software on different computers.&#xA;He calls out&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;(PLEASE-RESERVE (EPSILON (x) &#xA;  (AND&#xA;    (IS-FLIGHT x) &#xA;    (DEPARTS MONDAY) &#xA;    (ARRIVES (BEFORE WEDNESDAY)))))&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;where $\epsilon x$ is an operator maps a predicate to &lt;em&gt;a value&lt;/em&gt; matching the predicate, and considers it an improvement on the &amp;ldquo;iota&amp;rdquo; &lt;a href=&#34;https://en.wikipedia.org/wiki/Definite_description#Mathematical_logic&#34;&gt;definite description&lt;/a&gt; operator, which seems to be an operator that returns &lt;em&gt;the unique value&lt;/em&gt; matching the predicate.&#xA;It seems interesting to me that the unique match operator is not considered as useful as the arbitrary match operator &amp;ndash; unique keys actually seem critical to a lot of my work with data models.&#xA;Even more fascinating, though, is that this &lt;em&gt;looks&lt;/em&gt; like an anonymous function!&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
