rs.io https://rs.io/ Recent content on rs.io Hugo -- gohugo.io en-us Thu, 10 Oct 2019 10:43:00 -0500 Books on probabilistic programming https://rs.io/probabilistic-programming-books/ Thu, 10 Oct 2019 10:43:00 -0500 https://rs.io/probabilistic-programming-books/ <h2 id="model-based-machine-learning"><a href="http://www.mbmlbook.com/Introduction.html"><em>Model-Based Machine Learning</em></a></h2> <blockquote> <p>For more than ten years we have been working on such a software framework at Microsoft Research, called Infer.NET [Minka et al., 2014].</p> </blockquote> <h2 id="bayesian-data-analysis-using-probabilistic-programs-statistics-as-pottery"><a href="https://mhtess.github.io/bdappl/"><em>Bayesian Data Analysis using Probabilistic Programs&ndash;Statistics as pottery</em></a></h2> <blockquote> <p>Learning statistics is like learning pottery. With pottery, you can learn how to make different shapes (e.g. a bowl, a vase, a spoon) without understanding general principles. The other way is to learn the basic strokes of forming pottery (e.g. how to mold a curved surface, a flat surface, long pointy things). In this course, we are going to learn the basic strokes of statistics, and compose those strokes to make shapes you’ve seen before (e.g. a t-test), some shapes you’ve probably never seen before, and develop ideas how you would make new shapes if you needed to. We won’t learn what tests apply to what data types but instead foster the ability to reason through data analysis. We will do this through the lens of Bayesian statistics, though the basic ideas will aid your understanding of classical (frequentist) statistics as well.</p> </blockquote> <h2 id="probabilistic-models-of-cognition"><a href="https://probmods.org/"><em>Probabilistic Models of Cognition</em></a></h2> <blockquote> <p>This book explores the probabilistic approach to cognitive science, which models learning and reasoning as inference in complex probabilistic models. We examine how a broad range of empirical phenomena, including intuitive physics, concept learning, causal reasoning, social cognition, and language understanding, can be modeled using probabilistic programs (using the WebPPL language).</p> </blockquote> <h2 id="the-design-and-implementation-of-probabilistic-programming-languages"><a href="http://dippl.org/"><em>The Design and Implementation of Probabilistic Programming Languages</em></a></h2> <blockquote> <p>This book explains how to implement PPLs by lightweight embedding into a host language. We illustrate this by designing and implementing WebPPL, a small PPL embedded in Javascript. We show how to implement several algorithms for universal probabilistic inference, including priority-based enumeration with caching, particle filtering, and Markov chain Monte Carlo. We use program transformations to expose the information required by these algorithms, including continuations and stack addresses. We illustrate these ideas with examples drawn from semantic parsing, natural language pragmatics, and procedural graphics.</p> </blockquote> <h2 id="an-introduction-to-probabilistic-programming"><a href="https://arxiv.org/pdf/1809.10756.pdf"><em>An Introduction to Probabilistic Programming</em></a></h2> <blockquote> <p>This document is designed to be a first-year graduate-level introduction to probabilistic programming. It not only provides a thorough background for anyone wishing to use a probabilistic programming system, but also introduces the techniques needed to design and build these systems. It is aimed at people who have an undergraduate-level understanding of either or, ideally, both probabilistic machine learning and programming languages.</p> </blockquote> <h2 id="bayesian-methods-for-hackers"><a href="https://camdavidsonpilon.github.io/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/"><em>Bayesian Methods for Hackers</em></a></h2> <blockquote> <p>Bayesian Methods for Hackers is designed as a introduction to Bayesian inference from a computational/understanding-first, and mathematics-second, point of view. Of course as an introductory book, we can only leave it at that: an introductory book. For the mathematically trained, they may cure the curiosity this text generates with other texts designed with mathematical analysis in mind. For the enthusiast with less mathematical-background, or one who is not interested in the mathematics but simply the practice of Bayesian methods, this text should be sufficient and entertaining.</p> </blockquote> <h2 id="practical-probabilistic-programming"><a href="https://www.amazon.com/Practical-Probabilistic-Programming-Avi-Pfeffer/dp/1617292338/ref=as%5Fli%5Fss%5Ftl?ie=UTF8&amp;linkCode=ll1&amp;tag=rsio0c-20&amp;linkId=52a33cd4560a7734d498429277b7579b&amp;language=en%5FUS"><em>Practical Probabilistic Programming</em></a></h2> <blockquote> <p>Practical Probabilistic Programming introduces the working programmer to probabilistic programming. In it, you&rsquo;ll learn how to use the PP paradigm to model application domains and then express those probabilistic models in code. Although PP can seem abstract, in this book you&rsquo;ll immediately work on practical examples, like using the Figaro language to build a spam filter and applying Bayesian and Markov networks, to diagnose computer system data problems and recover digital images.</p> </blockquote> <h2 id="stan-a-probabilistic-programming-language"><a href="https://www.osti.gov/servlets/purl/1430202"><em>Stan: A Probabilistic Programming Language</em></a></h2> <h2 id="probabilistic-programming-in-python-using-pymc3"><a href="https://peerj.com/articles/cs-55/?utm%5Fcontent=buffer79887&amp;utm%5Fmedium=TrendMD&amp;utm%5Fsource=TrendMD&amp;utm%5Fcampaign=PeerJ%5FTrendMD%5F1"><em>Probabilistic programming in Python using PyMC3</em></a></h2> <h2 id="bonus-video-a-personal-viewpoint-on-probabilistic-programming">Bonus video: <a href="https://www.youtube.com/watch?v=TFXcVlKqPlM">A Personal Viewpoint on Probabilistic Programming</a></h2> Fixing "FATAL:udev_loader.cc(38) Check failed: false." errors on NixOS https://rs.io/fix-fatal-udev-loader-cc-nixos/ Wed, 09 Oct 2019 16:31:00 -0500 https://rs.io/fix-fatal-udev-loader-cc-nixos/ <p>This is a problem that I ran into while figuring out <a href="https://rs.io/pixelator-nixos/">how to get Pixelator running</a>&ndash;the issue is that electron apps expect to be linked against the old <code>libudev.so.0</code>, not the new <code>libudev.so.1</code>.</p> <p>The error itself looks like</p> <div class="highlight"><pre class="chroma"><code class="language-text" data-lang="text">Start init. [1654:1009/144147.908343:FATAL:udev_loader.cc(38)] Check failed: false. #0 0x00000378afa7 &lt;unknown&gt; #1 0x0000037cb27b &lt;unknown&gt; #2 0x000001109cd3 &lt;unknown&gt; #3 0x000001109626 &lt;unknown&gt; #4 0x000001109d50 &lt;unknown&gt; #5 0x000003b68084 &lt;unknown&gt; #6 0x0000037a2370 &lt;unknown&gt; #7 0x00000376facd &lt;unknown&gt; #8 0x00000376fde8 &lt;unknown&gt; #9 0x000003770486 &lt;unknown&gt; #10 0x000003725fd9 &lt;unknown&gt; #11 0x00000376f7f7 &lt;unknown&gt; #12 0x000003777dde &lt;unknown&gt; #13 0x000000d3a5a5 &lt;unknown&gt; #14 0x000000d3a753 &lt;unknown&gt; #15 0x00000377bd47 &lt;unknown&gt; #16 0x00000377a383 &lt;unknown&gt; #17 0x7fc748e13ef7 start_thread #18 0x7fc74720622f __GI___clone fish: “./pixelator” terminated by signal SIGABRT (Abort)</code></pre></div> <p>Luckily, there is a stub package we can use as a work around&ndash;</p> <div class="highlight"><pre class="chroma"><code class="language-text" data-lang="text">* nixpkgs.libudev0-shim (libudev0-shim) Shim to preserve libudev.so.0 compatibility</code></pre></div> <h2 id="how-to-use-libudev0-shim">How to use libudev0-shim</h2> <p>The trick is to modify your built binary so that its <code>LD_LIBRARY_PATH</code> includes <code>libudev0-shim</code>. This is done via <code>makeWrapper</code>, which wraps the binary with the customized path.</p> <p>Here&rsquo;s an example:</p> <div class="highlight"><pre class="chroma"><code class="language-nix" data-lang="nix"><span class="k">with</span> <span class="kn">import</span> <span class="sr">&lt;nixpkgs&gt;</span> <span class="p">{};</span> <span class="k">let</span> <span class="n">autopatchelf</span> <span class="o">=</span> <span class="kn">import</span> <span class="sr">../default.nix</span><span class="p">;</span> <span class="k">in</span> <span class="n">stdenv</span><span class="o">.</span><span class="n">mkDerivation</span> <span class="p">{</span> <span class="n">name</span> <span class="o">=</span> <span class="s2">&#34;pixelator&#34;</span><span class="p">;</span> <span class="n">src</span> <span class="o">=</span> <span class="sr">~/downloads/pixelator-1.0.5-linux-x64.zip</span><span class="p">;</span> <span class="n">nativeBuildInputs</span> <span class="o">=</span> <span class="p">[</span> <span class="n">libudev0-shim</span> <span class="n">udev</span> <span class="n">dpkg</span> <span class="n">autopatchelf</span> <span class="n">unzip</span> <span class="n">zlib</span> <span class="n">harfbuzz</span> <span class="n">freetype</span> <span class="hl"> <span class="n">makeWrapper</span> </span><span class="p">];</span> <span class="n">libs</span> <span class="o">=</span> <span class="n">stdenv</span><span class="o">.</span><span class="n">lib</span><span class="o">.</span><span class="n">makeLibraryPath</span> <span class="p">[</span> <span class="n">glibc</span> <span class="n">libgcc</span> <span class="n">gcc-unwrapped</span> <span class="n">gtk2-x11</span> <span class="n">zlib</span> <span class="n">gnome2</span><span class="o">.</span><span class="n">pango</span> <span class="n">atk</span> <span class="n">cairo</span> <span class="n">gdk_pixbuf</span> <span class="n">glib</span> <span class="n">fontconfig</span> <span class="n">freetype</span> <span class="n">dbus_daemon</span><span class="o">.</span><span class="n">lib</span> <span class="n">dbus</span><span class="o">.</span><span class="n">lib</span> <span class="n">xlibs</span><span class="o">.</span><span class="n">libX11</span> <span class="n">xlibs</span><span class="o">.</span><span class="n">libxcb</span> <span class="n">xlibs</span><span class="o">.</span><span class="n">libXi</span> <span class="n">xlibs</span><span class="o">.</span><span class="n">libXcursor</span> <span class="n">xlibs</span><span class="o">.</span><span class="n">libXdamage</span> <span class="n">xlibs</span><span class="o">.</span><span class="n">libXrandr</span> <span class="n">xlibs</span><span class="o">.</span><span class="n">libXcomposite</span> <span class="n">xlibs</span><span class="o">.</span><span class="n">libXext</span> <span class="n">nix</span> <span class="n">xlibs</span><span class="o">.</span><span class="n">libXfixes</span> <span class="n">xlibs</span><span class="o">.</span><span class="n">libXrender</span> <span class="n">xlibs</span><span class="o">.</span><span class="n">libXtst</span> <span class="n">xlibs</span><span class="o">.</span><span class="n">libXScrnSaver</span> <span class="n">gnome2</span><span class="o">.</span><span class="n">GConf</span><span class="o">.</span><span class="n">out</span> <span class="n">nss</span><span class="o">.</span><span class="n">out</span> <span class="n">alsaLib</span><span class="o">.</span><span class="n">out</span> <span class="n">nspr</span><span class="o">.</span><span class="n">out</span> <span class="n">cups</span><span class="o">.</span><span class="n">lib</span> <span class="n">xorg_sys_opengl</span><span class="o">.</span><span class="n">out</span> <span class="n">expat</span><span class="o">.</span><span class="n">out</span> <span class="n">harfbuzz</span><span class="o">.</span><span class="n">out</span> <span class="n">libudev0-shim</span> <span class="p">];</span> <span class="n">installPhase</span> <span class="o">=</span> <span class="s1">&#39;&#39; </span><span class="s1"> chmod +xX pixelator </span><span class="s1"> chmod +xX _pixelator_cmd.exe </span><span class="s1"> mkdir -p $out/bin </span><span class="s1"> mv * $out </span><span class="s1"> autopatchelf $out </span><span class="s1"> </span><span class="s1"> ln -s $out/pixelator $out/bin/pixelator </span><span class="s1"> ln -s $out/_pixelator_cmd.exe $out/bin/_pixelator_cmd.exe </span><span class="s1"> &#39;&#39;</span><span class="p">;</span> <span class="hl"> <span class="n">preFixup</span> <span class="o">=</span> <span class="k">let</span> </span><span class="hl"> <span class="n">runtimeLibs</span> <span class="o">=</span> <span class="n">lib</span><span class="o">.</span><span class="n">makeLibraryPath</span> <span class="p">[</span> <span class="n">libudev0-shim</span> <span class="p">];</span> </span><span class="hl"> <span class="k">in</span> <span class="s1">&#39;&#39; </span></span><span class="hl"><span class="s1"> wrapProgram &#34;$out/pixelator&#34; --prefix LD_LIBRARY_PATH : </span><span class="si">${</span><span class="n">runtimeLibs</span><span class="si">}</span><span class="s1"> </span></span><span class="hl"><span class="s1"> &#39;&#39;</span><span class="p">;</span> </span> <span class="n">dontStrip</span> <span class="o">=</span> <span class="no">true</span><span class="p">;</span> <span class="p">}</span></code></pre></div> <p>The highlighted bits are what you need. Notice the wrapping is done during the <code>preFixup</code> phase build phase, so after the binary has been built etc.</p> <h2 id="further-reading">Further Reading</h2> <p>For more examples of usage of <code>libudev0-shim</code>, <a href="https://github.com/search?p=3&amp;q=libudev0-shim+extension%253Anix&amp;type=Code">try this GitHub custom search.</a></p> How to Install Pixelator on NixOS https://rs.io/pixelator-nixos/ Wed, 09 Oct 2019 15:57:00 -0500 https://rs.io/pixelator-nixos/ <ol> <li>Download <a href="http://pixelatorapp.com/">Pixelator</a>.</li> <li>Clone <a href="https://github.com/robertseaton/nix-patchtools">my fork of nix-patchtools</a>.</li> <li>Modify <code>examples/pixelator.nix</code> with the appropriate path to your <code>pixelator-1.0.5-linux-x64.zip</code>.</li> </ol> <!--listend--> <div class="highlight"><pre class="chroma"><code class="language-nix" data-lang="nix"><span class="k">with</span> <span class="kn">import</span> <span class="sr">&lt;nixpkgs&gt;</span> <span class="p">{};</span> <span class="k">let</span> <span class="n">autopatchelf</span> <span class="o">=</span> <span class="kn">import</span> <span class="sr">../default.nix</span><span class="p">;</span> <span class="k">in</span> <span class="n">stdenv</span><span class="o">.</span><span class="n">mkDerivation</span> <span class="p">{</span> <span class="n">name</span> <span class="o">=</span> <span class="s2">&#34;pixelator&#34;</span><span class="p">;</span> <span class="hl"> <span class="n">src</span> <span class="o">=</span> <span class="sr">~/downloads/pixelator-1.0.5-linux-x64.zip</span><span class="p">;</span> </span> <span class="n">nativeBuildInputs</span> <span class="o">=</span> <span class="p">[</span> <span class="n">libudev0-shim</span> <span class="n">udev</span> <span class="n">dpkg</span> <span class="n">autopatchelf</span> <span class="n">unzip</span> <span class="n">zlib</span> <span class="n">harfbuzz</span> <span class="n">freetype</span> <span class="n">makeWrapper</span> <span class="p">];</span> <span class="n">libs</span> <span class="o">=</span> <span class="n">stdenv</span><span class="o">.</span><span class="n">lib</span><span class="o">.</span><span class="n">makeLibraryPath</span> <span class="p">[</span> <span class="n">glibc</span> <span class="n">libgcc</span> <span class="n">gcc-unwrapped</span> <span class="n">gtk2-x11</span> <span class="n">zlib</span> <span class="n">gnome2</span><span class="o">.</span><span class="n">pango</span> <span class="n">atk</span> <span class="n">cairo</span> <span class="n">gdk_pixbuf</span> <span class="n">glib</span> <span class="n">fontconfig</span> <span class="n">freetype</span> <span class="n">dbus_daemon</span><span class="o">.</span><span class="n">lib</span> <span class="n">dbus</span><span class="o">.</span><span class="n">lib</span> <span class="n">xlibs</span><span class="o">.</span><span class="n">libX11</span> <span class="n">xlibs</span><span class="o">.</span><span class="n">libxcb</span> <span class="n">xlibs</span><span class="o">.</span><span class="n">libXi</span> <span class="n">xlibs</span><span class="o">.</span><span class="n">libXcursor</span> <span class="n">xlibs</span><span class="o">.</span><span class="n">libXdamage</span> <span class="n">xlibs</span><span class="o">.</span><span class="n">libXrandr</span> <span class="n">xlibs</span><span class="o">.</span><span class="n">libXcomposite</span> <span class="n">xlibs</span><span class="o">.</span><span class="n">libXext</span> <span class="n">nix</span> <span class="n">xlibs</span><span class="o">.</span><span class="n">libXfixes</span> <span class="n">xlibs</span><span class="o">.</span><span class="n">libXrender</span> <span class="n">xlibs</span><span class="o">.</span><span class="n">libXtst</span> <span class="n">xlibs</span><span class="o">.</span><span class="n">libXScrnSaver</span> <span class="n">gnome2</span><span class="o">.</span><span class="n">GConf</span><span class="o">.</span><span class="n">out</span> <span class="n">nss</span><span class="o">.</span><span class="n">out</span> <span class="n">alsaLib</span><span class="o">.</span><span class="n">out</span> <span class="n">nspr</span><span class="o">.</span><span class="n">out</span> <span class="n">cups</span><span class="o">.</span><span class="n">lib</span> <span class="n">xorg_sys_opengl</span><span class="o">.</span><span class="n">out</span> <span class="n">expat</span><span class="o">.</span><span class="n">out</span> <span class="n">harfbuzz</span><span class="o">.</span><span class="n">out</span> <span class="n">libudev0-shim</span> <span class="p">];</span> <span class="n">installPhase</span> <span class="o">=</span> <span class="s1">&#39;&#39; </span><span class="s1"> chmod +xX pixelator </span><span class="s1"> chmod +xX _pixelator_cmd.exe </span><span class="s1"> mkdir -p $out/bin </span><span class="s1"> mv * $out </span><span class="s1"> autopatchelf $out </span><span class="s1"> </span><span class="s1"> ln -s $out/pixelator $out/bin/pixelator </span><span class="s1"> ln -s $out/_pixelator_cmd.exe $out/bin/_pixelator_cmd.exe </span><span class="s1"> &#39;&#39;</span><span class="p">;</span> <span class="n">preFixup</span> <span class="o">=</span> <span class="k">let</span> <span class="n">runtimeLibs</span> <span class="o">=</span> <span class="n">lib</span><span class="o">.</span><span class="n">makeLibraryPath</span> <span class="p">[</span> <span class="n">libudev0-shim</span> <span class="p">];</span> <span class="k">in</span> <span class="s1">&#39;&#39; </span><span class="s1"> wrapProgram &#34;$out/pixelator&#34; --prefix LD_LIBRARY_PATH : </span><span class="si">${</span><span class="n">runtimeLibs</span><span class="si">}</span><span class="s1"> </span><span class="s1"> &#39;&#39;</span><span class="p">;</span> <span class="n">dontStrip</span> <span class="o">=</span> <span class="no">true</span><span class="p">;</span> <span class="p">}</span></code></pre></div> <h2 id="building-it">Building it</h2> <div class="highlight"><pre class="chroma"><code class="language-text" data-lang="text">$ cd nix-patchtools/examples $ nix-build pixelator.nix</code></pre></div> <p>The output will be something like,</p> <div class="highlight"><pre class="chroma"><code class="language-text" data-lang="text">/nix/store/j89yqn3zhpz2r9jwrng45yl09arxq4h0-pixelator</code></pre></div> <h2 id="installing-it">Installing it</h2> <div class="highlight"><pre class="chroma"><code class="language-text" data-lang="text">nix-env -i /nix/store/j89yqn3zhpz2r9jwrng45yl09arxq4h0-pixelator</code></pre></div> <h2 id="running-it">Running it</h2> <p>Pixelator expects the <code>pixelator</code> and <code>_pixelator_cmd.exe</code> binaries to be in the directory that you launch it from. You can solve that via</p> <div class="highlight"><pre class="chroma"><code class="language-text" data-lang="text">$ mkdir -p ~/scratch/pixelator $ cd ~/scratch/pixelator $ ln -s /nix/store/ksxwcam55sl20bpv39lj1244n5kvcnq9-pixelator/_pixelator_cmd.exe . $ ln -s /nix/store/ksxwcam55sl20bpv39lj1244n5kvcnq9-pixelator/pixelator pixelator</code></pre></div> <h2 id="success">Success!</h2> <figure> <img src="https://rs.io/ox-hugo/2019-10-09T15:52:16-05:00%20-%20Pixelator.png"/> </figure> How to Look up a URL's PageRank with Ruby + Open PageRank's API https://rs.io/ruby-openpagerank-api-example/ Thu, 03 Oct 2019 14:24:00 -0500 https://rs.io/ruby-openpagerank-api-example/ <p>DomCom&rsquo;s <a href="https://www.domcop.com/openpagerank/what-is-openpagerank">Open PageRank</a> is a free alternative to Google&rsquo;s <a href="https://en.wikipedia.org/wiki/PageRank">PageRank</a> and includes a public API. All you gotta do before you can use it is fill out <a href="https://www.domcop.com/openpagerank/auth/signup">this form</a> and they&rsquo;ll email you an access key.</p> <p>The limits are generous:</p> <blockquote> <p>Based on our current limits you can get the PageRank data for 4.3 million domains every single day for a single API Key. If you need more data simply contact us and we will increase the limit.</p> </blockquote> <p>4.3 million&hellip; yeah, that should about cover it.</p> <h2 id="using-it">Using it</h2> <p>The example in <a href="https://www.domcop.com/openpagerank/documentation">their API docs</a> is written in PHP. I&rsquo;ve translated it here into Ruby, took a bit of fiddling.</p> <div class="highlight"><pre class="chroma"><code class="language-ruby" data-lang="ruby"><span class="nb">require</span> <span class="s1">&#39;net/http&#39;</span> <span class="nb">require</span> <span class="s1">&#39;active_support/all&#39;</span> <span class="n">uri</span> <span class="o">=</span> <span class="no">URI</span><span class="o">.</span><span class="n">parse</span><span class="p">(</span><span class="s2">&#34;https://openpagerank.com/api/v1.0/getPageRank&#34;</span><span class="p">)</span> <span class="n">uri</span><span class="o">.</span><span class="n">query</span> <span class="o">=</span> <span class="o">[</span><span class="s2">&#34;rs.io&#34;</span><span class="p">,</span> <span class="s2">&#34;example.com&#34;</span><span class="o">].</span><span class="n">to_query</span><span class="p">(</span><span class="s1">&#39;domains&#39;</span><span class="p">)</span> <span class="n">req</span> <span class="o">=</span> <span class="no">Net</span><span class="o">::</span><span class="no">HTTP</span><span class="o">::</span><span class="no">Get</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="n">uri</span><span class="p">)</span> <span class="n">req</span><span class="o">[</span><span class="s1">&#39;API-OPR&#39;</span><span class="o">]</span> <span class="o">=</span> <span class="no">YOUR_SECRET_KEY</span> <span class="n">res</span> <span class="o">=</span> <span class="no">Net</span><span class="o">::</span><span class="no">HTTP</span><span class="o">.</span><span class="n">start</span><span class="p">(</span><span class="n">uri</span><span class="o">.</span><span class="n">host</span><span class="p">,</span> <span class="n">uri</span><span class="o">.</span><span class="n">port</span><span class="p">,</span> <span class="ss">use_ssl</span><span class="p">:</span> <span class="kp">true</span><span class="p">)</span> <span class="p">{</span> <span class="o">|</span><span class="n">http</span><span class="o">|</span> <span class="n">http</span><span class="o">.</span><span class="n">request</span><span class="p">(</span><span class="n">req</span><span class="p">)</span> <span class="p">}</span> <span class="n">result</span> <span class="o">=</span> <span class="no">JSON</span><span class="o">.</span><span class="n">parse</span><span class="p">(</span><span class="n">res</span><span class="o">.</span><span class="n">body</span><span class="p">)</span> <span class="nb">puts</span> <span class="no">JSON</span><span class="o">.</span><span class="n">pretty_generate</span><span class="p">(</span><span class="n">result</span><span class="p">)</span></code></pre></div> <p>Swap <code>YOUR_SECRET_KEY</code> for your actual key and replace the array <code>[&quot;rs.io&quot;, &quot;example.com&quot;]</code> with whatever URLs you want to look up, max 100 in a single request like this.</p> <p>You should get something like,</p> <div class="highlight"><pre class="chroma"><code class="language-text" data-lang="text">{ &#34;status_code&#34;: 200, &#34;response&#34;: [ { &#34;status_code&#34;: 200, &#34;error&#34;: &#34;&#34;, &#34;page_rank_integer&#34;: 4, &#34;page_rank_decimal&#34;: 4.32, &#34;rank&#34;: &#34;1443770&#34;, &#34;domain&#34;: &#34;rs.io&#34; }, { &#34;status_code&#34;: 200, &#34;error&#34;: &#34;&#34;, &#34;page_rank_integer&#34;: 8, &#34;page_rank_decimal&#34;: 7.88, &#34;rank&#34;: &#34;193&#34;, &#34;domain&#34;: &#34;example.com&#34; } ], &#34;last_updated&#34;: &#34;16th Aug 2019&#34; }</code></pre></div> <p>The metrics are calculated from <a href="https://commoncrawl.org/">Common Crawl&rsquo;s &ldquo;open repository of web crawl data that can be accessed and analyzed by anyone&rdquo;</a>&ndash;very cool!</p> Black progress https://rs.io/black-progress/ Wed, 02 Oct 2019 16:25:00 -0500 https://rs.io/black-progress/ <blockquote> <p>From 2001 to 2017, the incarceration rate for black men declined by 34 percent.</p> </blockquote> <!--quoteend--> <blockquote> <p>Between 2001 and 2017, the birth rate for black women aged 15–19 declined by 63 percent. In fact, the black teenage birth rate in 2017 was lower than the white teenage rate as recently as 2002.</p> </blockquote> <!--quoteend--> <blockquote> <p>In 2017, black female life expectancy was 78.5 years, up from 75.1 years in 2000. Life expectancy for black men increased from 68.2 to 71.9 years over the same timespan.</p> </blockquote> <!--quoteend--> <blockquote> <p>2018 census data showed that 37 percent of black Americans aged 25–34 had some kind of college degree. If black America were its own country, that would place it in between Germany (31 percent) and Spain (43 percent) in terms of educational attainment. What’s more, the economist Raj Chetty has found that black women, though less likely to attend college than white women, are now more likely to attend college than white men from similar socioeconomic backgrounds.</p> </blockquote> <!--quoteend--> <blockquote> <p>The Federal Reserve recently reported that over 60 percent of blacks at every level of educational attainment say they’re doing better financially than their parents—a higher percentage than either whites or Hispanics.</p> </blockquote> <!--quoteend--> <blockquote> <p>Chetty has found that black women now go on to earn slightly higher incomes than white women from similar socioeconomic backgrounds.</p> <p>&ndash;from <a href="https://quillette.com/2019/09/28/the-case-for-black-optimism/">The Case for Black Optimism</a></p> </blockquote> Tall trees https://rs.io/tall-trees/ Wed, 02 Oct 2019 16:09:00 -0500 https://rs.io/tall-trees/ <p><a href="https://www.smithsonianmag.com/science-nature/researchers-discover-tallest-known-tree-amazon-180973227/">Researchers Discover the Tallest Known Tree in the Amazon</a></p> <p>88.5 meters, or over 290 feet</p> <blockquote> <p><a href="https://news.ycombinator.com/item?id=21139616">This tree is not as tall as the tallest tree in the bay area! There is a 328-foot redwood tree in Big Basin.</a></p> </blockquote> <!--quoteend--> <blockquote> <p>Amazing a tree that tall can get things from the root that high. Unless the tops work differently?</p> </blockquote> <!--quoteend--> <blockquote> <p>Redwoods depend on the humidity and fog from the pacific coast to get water to its highest parts and to keep it from drying out.</p> </blockquote> <p><a href="https://www.fs.fed.us/psw/publications/documents/psw%5Fgtr238/psw%5Fgtr238%5F273.pdf">Foliar Uptake of Fog in the Coast Redwood Ecosystem: a Novel Drought-Alleviation Strategy Shared by Most Redwood Forest Plant</a></p> As hedge fund grandma used to say https://rs.io/folksy-wall-street-wisdom/ Tue, 01 Oct 2019 00:00:00 -0500 https://rs.io/folksy-wall-street-wisdom/ <blockquote> <p><a href="https://news.ycombinator.com/item?id=21063284">A truism at the commodities hedge fund I used to work at was the &ldquo;the Saudis are always lying&rdquo; along with &ldquo;never be long a country&rsquo;s currency if they have their own word for afternoon nap&rdquo;</a></p> </blockquote> <p><strong>Related:</strong> <a href="https://marginalrevolution.com/marginalrevolution/2014/11/the-reversal-of-the-latitude-income-correlation.html">GDP per capita increases with distance from the equator and it does so moving both North and South</a></p> <blockquote> <p>Air conditioning was a most important invention for us, perhaps one of the signal inventions of history. It changed the nature of civilization by making development possible in the tropics. Without air conditioning you can work only in the cool early-morning hours or at dusk. The first thing I did upon becoming prime minister was to install air conditioners in buildings where the civil service worked. This was key to public efficiency.</p> <p><a href="https://www.vox.com/2015/3/23/8278085/singapore-lee-kuan-yew-air-conditioning">&ndash;Lee Kuan Yew, Singapore&rsquo;s founding father</a></p> </blockquote> Clowns to the left of me, secret police to the right https://rs.io/underachievers-secret-police/ Tue, 01 Oct 2019 00:00:00 -0500 https://rs.io/underachievers-secret-police/ <blockquote> <p>We find that low‐achieving officers were stuck within the regime hierarchy, threatened with discharge, and thus more likely to join the secret police for future benefits. The study demonstrates how state bureaucracies breed mundane career concerns that produce willing enforcers and cement violent regimes.</p> <p><a href="https://onlinelibrary.wiley.com/doi/full/10.1111/ajps.12475">&ndash;Why Underachievers Dominate Secret Police Organizations: Evidence from Autocratic Argentina</a></p> </blockquote> <p>I had this math teacher who&rsquo;d staple McDonald&rsquo;s job applications to flunked tests&ndash;you fucked up big time Mrs. McCarthy! Those dudes are gestapo now!</p> Communists have the best transit https://rs.io/cheap-transit-beijing/ Tue, 01 Oct 2019 00:00:00 -0500 https://rs.io/cheap-transit-beijing/ <blockquote> <p>Subways in Beijing are roughly 55 cents, only about 1/5th the level of NYC. That means that if you priced the 4 billion annual subway trips in Beijing at NYC subway prices, revenue would rise from about $2 billion to $10 billion. That’s why comparisons of US and Chinese GDPs at market exchange rates are utterly meaningless. America is much richer, even in PPP terms, but the market price gap wildly overstates the actual difference. China’s total GDP in terms of actual output is obviously higher than the US. (BTW, Beijing’s subways are also far nicer than in New York.)</p> <p><a href="https://www.themoneyillusion.com/some-thoughts-on-ppp-in-china-the-us-and-japan/">&ndash;Scott Sumner</a></p> </blockquote> Diversity riddle https://rs.io/diversity-riddle/ Tue, 01 Oct 2019 00:00:00 -0500 https://rs.io/diversity-riddle/ <blockquote> <p><a href="https://www.forbes.com/sites/morgansimon/2019/01/28/what-might-racism-cost-oracle-400m/#281eb81a119f">Between 2013 and 2016, 90% of Oracle’s hires were people of color. While in some communities this fact might be celebrated, there’s a catch — they were all Asian, and still underpaid compared to their white counterparts, according to a lawsuit filed this week by the US Department of Labor.</a></p> </blockquote> <p>Uhm, someone better alert Professor Singer that his <a href="https://bigthink.com/scotty-hendricks/seven-thought-experiments-thatll-make-you-question-everything">thought experiments</a> are leaking into reality&ndash;I&rsquo;d do it but I gotta notify <a href="http://www.scp-wiki.net/about-the-scp-foundation">the proper authorities</a> first.</p> How to make rent in the Bay Area https://rs.io/led-brain-hacking/ Tue, 01 Oct 2019 00:00:00 -0500 https://rs.io/led-brain-hacking/ <blockquote> <p><a href="https://news.ycombinator.com/item?id=21042018">I‘m using near infrared as a brain hack, by shining a cheap 850nm LED light on my forehead. This has, over the last 2 years, enabled me to code for weeks on end, for 12+ hours a day, with only minor cognitive decline. It’s not something I really want to do, but sometimes it’s useful.</a></p> </blockquote> money + fire = VC https://rs.io/vc-negative-returns/ Tue, 01 Oct 2019 00:00:00 -0500 https://rs.io/vc-negative-returns/ <blockquote> <p>Venture capital (VC) has delivered poor returns for more than a decade. VC returns haven’t significantly outperformed the public market since the late 1990s, and, <strong>since 1997, less cash has been returned to investors than has been invested in VC</strong>. Speculation among industry insiders is that the VC model is broken, despite occasional high-profile successes like Groupon, Zynga, LinkedIn, and Facebook in recent years.</p> <p>The Kauffman Foundation investment team analyzed our twenty-year history of venture investing experience in nearly 100 VC funds with some of the most notable and exclusive partnership “brands” and concluded that the Limited Partner (LP) investment model is broken1. Limited Partners—foundations, endowments, and state pension fund—invest too much capital in underperforming venture capital funds on frequently mis-aligned terms. Our research suggests that investors like us succumb time and again to narrative fallacies, a well-studied behavioral finance bias.</p> <p><a href="https://papers.ssrn.com/sol3/papers.cfm?abstract%5Fid=2053258">&ndash;We Have Met the Enemy…and He is Us: Lessons from Twenty Years of the Kauffman Foundation&rsquo;s Investments in Venture Capital Funds and the Triumph of Hope Over Experience</a> (emphasis mine)</p> </blockquote> Mushrooms & civilization https://rs.io/mushrooms-civilization/ Tue, 01 Oct 2019 00:00:00 -0500 https://rs.io/mushrooms-civilization/ <p><a href="https://news.ycombinator.com/item?id=21043774">Psilocybin mushrooms occur in higher concentrations around human settlements than in &ldquo;wild nature&rdquo; (still today).</a></p> Why shouldn't I have my own water fountain? https://rs.io/clarence-thomas-integration/ Tue, 01 Oct 2019 00:00:00 -0500 https://rs.io/clarence-thomas-integration/ <blockquote> <p>If anything, Thomas believes that the state should—where it can, within the law—support the separation of the races. Looking back on his education, in an all-black environment, Thomas has admitted to wanting to “turn back the clock” to a time “when we had our own schools.” Much of his jurisprudence is devoted to undoing the “grand experiment” of which he believes himself to be a victim. As he made clear in 1986, “I have been the guinea pig for many social experiments on social minorities. To all who would continue these experiments, I say please ‘no more.’”</p> <p><a href="https://www.newyorker.com/culture/essay/clarence-thomass-radical-vision-of-race">&ndash;Clarence Thomas’s Radical Vision of Race</a></p> </blockquote> <p>That&rsquo;s, ahem, <em>Supreme Court Justice</em> Clarence Thomas, by the way.</p> Would you hire Elon Musk? https://rs.io/job-market-for-founders/ Tue, 01 Oct 2019 00:00:00 -0500 https://rs.io/job-market-for-founders/ <blockquote> <p>We find that former founders receive fewer callbacks than non-founders; however, all founders are not disadvantaged similarly. <strong>Former founders of successful ventures receive even fewer callbacks than former founders of failed ventures.</strong></p> <p><a href="http://www.tristanbotelho.com/files/BotelhoChang2019%5FFounderExperienceLaborMarkets.pdf">&ndash;The Effect of Founder Experience on Labor Market Outcomes: A Field Experiment</a> (emphasis mine)</p> </blockquote> nginx + Rails (puma) on NixOS https://rs.io/rails-nginx-nixos/ Fri, 27 Sep 2019 00:00:00 -0500 https://rs.io/rails-nginx-nixos/ <p>Not too much on the web about how to set this up, so here&rsquo;s an example.</p> <p><code>nginx</code> serves static content for example.com and rs.io and passes not-static-content requests made to rs.io to <code>127.0.0.:3000</code>&ndash;which, in this case, is Rails and <code>puma</code>, who then handle rendering it dynamically.</p> <div class="highlight"><pre class="chroma"><code class="language-nix" data-lang="nix"><span class="n">services</span><span class="o">.</span><span class="n">nginx</span> <span class="err">=</span> <span class="p">{</span> <span class="n">enable</span> <span class="o">=</span> <span class="no">true</span><span class="p">;</span> <span class="n">upstreams</span><span class="o">.</span><span class="n">rails</span><span class="o">.</span><span class="n">servers</span><span class="o">.</span><span class="s2">&#34;127.0.0.1:3000&#34;</span> <span class="o">=</span> <span class="p">{};</span> <span class="n">virtualHosts</span><span class="o">.</span><span class="s2">&#34;example.com&#34;</span> <span class="o">=</span> <span class="p">{</span> <span class="n">root</span> <span class="o">=</span> <span class="s2">&#34;/var/www/example&#34;</span><span class="p">;</span> <span class="n">forceSSL</span> <span class="o">=</span> <span class="no">true</span><span class="p">;</span> <span class="n">enableACME</span> <span class="o">=</span> <span class="no">true</span><span class="p">;</span> <span class="n">extraConfig</span> <span class="o">=</span> <span class="s1">&#39;&#39; </span><span class="s1"> rewrite ^(/.*)\.html(\?.*)?$ $1$2 permanent; </span><span class="s1"> try_files $uri.html $uri/ $uri =404; </span><span class="s1"> &#39;&#39;</span><span class="p">;</span> <span class="p">};</span> <span class="n">virtualHosts</span><span class="o">.</span><span class="s2">&#34;www.rs.io&#34;</span> <span class="o">=</span> <span class="p">{</span> <span class="n">root</span> <span class="o">=</span> <span class="s2">&#34;/var/www/rs.io&#34;</span><span class="p">;</span> <span class="n">extraConfig</span> <span class="o">=</span> <span class="s1">&#39;&#39; return 301 https://rs.io$request_uri; &#39;&#39;</span><span class="p">;</span> <span class="p">};</span> <span class="n">virtualHosts</span><span class="o">.</span><span class="s2">&#34;rs.io&#34;</span> <span class="o">=</span> <span class="p">{</span> <span class="n">root</span> <span class="o">=</span> <span class="s2">&#34;/var/www/rs.io&#34;</span><span class="p">;</span> <span class="n">enableACME</span> <span class="o">=</span> <span class="no">true</span><span class="p">;</span> <span class="n">locations</span><span class="o">.</span><span class="s2">&#34;/&#34;</span><span class="o">.</span><span class="n">extraConfig</span> <span class="o">=</span> <span class="s1">&#39;&#39; </span><span class="hl"><span class="s1"> &lt;&lt; excerpted block &gt;&gt; </span></span><span class="s1"> &#39;&#39;</span><span class="p">;</span> <span class="n">extraConfig</span> <span class="o">=</span> <span class="s1">&#39;&#39; </span><span class="s1"> index index.html; </span><span class="s1"> try_files $uri $uri/ =404; </span><span class="s1"> &#39;&#39;</span><span class="p">;</span> <span class="p">};</span> <span class="p">};</span></code></pre></div> <p>This block is what goes at the highlighted line (I excerpted it so things would display a little nicer):</p> <div class="highlight"><pre class="chroma"><code class="language-nginx" data-lang="nginx"><span class="k">proxy_set_header</span> <span class="s">X-Forwarded-For</span> <span class="nv">$proxy_add_x_forwarded_for</span><span class="p">;</span> <span class="k">proxy_set_header</span> <span class="s">Host</span> <span class="nv">$http_host</span><span class="p">;</span> <span class="k">if</span> <span class="s">(-f</span> <span class="nv">$request_filename</span><span class="s">)</span> <span class="p">{</span> <span class="kn">break</span><span class="p">;</span> <span class="p">}</span> <span class="k">if</span> <span class="s">(-f</span> <span class="nv">$request_filename/index.html</span><span class="s">)</span> <span class="p">{</span> <span class="kn">rewrite</span> <span class="s">(.*)</span> <span class="nv">$1/index.html</span> <span class="s">break</span><span class="p">;</span> <span class="p">}</span> <span class="k">if</span> <span class="s">(-f</span> <span class="nv">$request_filename.html</span><span class="s">)</span> <span class="p">{</span> <span class="kn">rewrite</span> <span class="s">(.*)</span> <span class="nv">$1.html</span> <span class="s">break</span><span class="p">;</span> <span class="p">}</span> <span class="k">if</span> <span class="s">(!-f</span> <span class="nv">$request_filename</span><span class="s">)</span> <span class="p">{</span> <span class="kn">proxy_pass</span> <span class="s">http://rails</span><span class="p">;</span> <span class="kn">break</span><span class="p">;</span> <span class="p">}</span></code></pre></div> <p>There is more detail on how this bit works <a href="https://github.com/puma/puma/blob/master/docs/nginx.md">here</a>, where I adopted it from.</p> How to: Generate Rails-Compatible html.erb with Hugo https://rs.io/rails-hugo/ Tue, 24 Sep 2019 00:00:00 -0500 https://rs.io/rails-hugo/ <p>Here&rsquo;s how this site is currently generated:</p> <figure> <img src="https://rs.io/ox-hugo/dot_site_generation1.png"/> </figure> <p>This works really great but, thing is, I&rsquo;ve been experimenting with Rails and I discovered a feature I gotta have: <a href="https://github.com/splitrb/split">split, the hacker-friendly A/B framework</a>. Flexible content experiments? Drop in your own algorithms?</p> <p><em>I need it.</em></p> <p>Except running an experiment in split requires embedding code in a page&rsquo;s view, you know, <em>dynamically</em>, and all this Hugo output is static. What to do?</p> <p>Turns out, we can teach Hugo to generate Rails compatible <code>html.erb</code> templates. All we gotta do is define a <a href="https://gohugo.io/templates/output-formats/">custom output format</a> for <code>html.erb</code> and Hugo will turn <code>.md</code> files into that, too.</p> <p>The new pipeline will be like this:</p> <figure> <img src="https://rs.io/ox-hugo/dot_site_generation2.png"/> </figure> <h2 id="configuring-hugo-to-generate-html-dot-erb">Configuring Hugo to generate html.erb</h2> <p>Here&rsquo;s what my initial data looked like&ndash;</p> <div class="highlight"><pre class="chroma"><code class="language-text" data-lang="text">rps@neptune ~/s/rs.io-next&gt; tree content content ├── email │   ├── credit-cards.md │   ├── finding-info.md │   ├── health-tip.md │   ├── lies.md │   ├── reboot.md │   └── welcome.md └── posts ├── about.md ├── book.md ├── cuda-r-keras-nixos.md ├── pepe-data.md ├── rails-static-hugo.md ├── rare-pepes.md └── start-here.md 2 directories, 13 files</code></pre></div> <p>Here&rsquo;s what I&rsquo;ve added to my <code>config.toml</code>:</p> <div class="highlight"><pre class="chroma"><code class="language-toml" data-lang="toml"><span class="nx">uglyURLs</span> <span class="p">=</span> <span class="kc">true</span> <span class="p">[</span><span class="nx">mediaTypes</span><span class="p">]</span> <span class="p">[</span><span class="nx">mediaTypes</span><span class="p">.</span><span class="s2">&#34;text/x-html-erb&#34;</span><span class="p">]</span> <span class="nx">suffixes</span> <span class="p">=</span> <span class="p">[</span><span class="s2">&#34;html.erb&#34;</span><span class="p">]</span> <span class="p">[</span><span class="nx">outputFormats</span><span class="p">]</span> <span class="p">[</span><span class="nx">outputFormats</span><span class="p">.</span><span class="nx">HTML</span><span class="p">]</span> <span class="nx">noUgly</span> <span class="p">=</span> <span class="kc">true</span> <span class="p">[</span><span class="nx">outputFormats</span><span class="p">.</span><span class="nx">ERB</span><span class="p">]</span> <span class="nx">mediaType</span> <span class="p">=</span> <span class="s2">&#34;text/x-html-erb&#34;</span> <span class="nx">isHTML</span> <span class="p">=</span> <span class="kc">true</span> <span class="nx">path</span> <span class="p">=</span> <span class="s2">&#34;hugo&#34;</span> <span class="p">[</span><span class="nx">outputs</span><span class="p">]</span> <span class="nx">page</span> <span class="p">=</span> <span class="p">[</span><span class="s2">&#34;HTML&#34;</span><span class="p">,</span> <span class="s2">&#34;ERB&#34;</span><span class="p">]</span></code></pre></div> <p>The <code>uglyURLs</code> code is necessary so that we don&rsquo;t generate a bunch of <code>filename/index.html.erb</code> when what we want is <code>filename.html.erb</code> to copy into Rails.</p> <p>The <code>path = &quot;hugo&quot;</code> line sets it so that our erb files will be saved to <code>public/hugo</code> and not mixed in with everything else.</p> <p>Next you&rsquo;ll need to create <code>html.erb</code> versions of some of the templates in your theme directory.</p> <div class="highlight"><pre class="chroma"><code class="language-text" data-lang="text">$ ls themes/hyde/layouts/_default/*html.erb themes/hyde/layouts/_default/baseof.html.erb themes/hyde/layouts/_default/list.html.erb themes/hyde/layouts/_default/single.html.erb</code></pre></div> <p>These are what I needed; they&rsquo;re exact copies of the <code>.html</code> versions. Hugo will use these templates to generate <code>html.erb</code> files. Eventually you&rsquo;ll probably wish to modify them to not add Hugo&rsquo;s header / footer / etc code, that way you can have Rails manage that for you.</p> <p>Now it should work. If yours isn&rsquo;t, I found this <a href="https://jfm.carcosa.net/blog/computing/hugo-gopher/">tutorial on building a custom output format for Gopher</a> useful in figuring out how they work.</p> <h2 id="it-lives-it-lives">It lives, it lives!</h2> <div class="highlight"><pre class="chroma"><code class="language-text" data-lang="text">rps@neptune ~/s/rs.io-next&gt; hugo | EN +------------------+-----+ Pages | 27 Paginator pages | 0 Non-page files | 0 Static files | 580 Processed images | 0 Aliases | 1 Sitemaps | 1 Cleaned | 0 Total in 99 ms</code></pre></div> <p>Here is what <code>public/hugo</code> looks like now&ndash;</p> <div class="highlight"><pre class="chroma"><code class="language-text" data-lang="text">rps@neptune ~/s/rs.io-next&gt; tree public/hugo public/hugo ├── email │   ├── credit-cards.html.erb │   ├── finding-info.html.erb │   ├── health-tip.html.erb │   ├── lies.html.erb │   ├── reboot.html.erb │   └── welcome.html.erb └── posts ├── book.html.erb └── cuda-r-keras-nixos.html.erb 2 directories, 8 files</code></pre></div> <p>Look at all those sweet, sweet erb files!</p> <p>Now, in your Rails app, create the folder <code>app/views/pages</code> and <code>cp -r public/hugo/*</code> to it, looking something like&ndash;</p> <div class="highlight"><pre class="chroma"><code class="language-text" data-lang="text">/home/rps/src/rs.io-rails/app/views/ ├── layouts │   ├── application.html.erb │   ├── mailer.html.erb │   └── mailer.text.erb └── pages ├── email │   ├── credit-cards.html.erb │   ├── finding-info.html.erb │   ├── health-tip.html.erb │   ├── lies.html.erb │   ├── reboot.html.erb │   └── welcome.html.erb └── posts ├── book.html.erb └── cuda-r-keras-nixos.html.erb 4 directories, 11 files</code></pre></div> <p>Then, to your Gemfile add <code>high_voltage</code>. It generates static pages and will manage the copied <code>html.erb</code> files for us. You&rsquo;ll need to create the initializer, too.</p> <div class="highlight"><pre class="chroma"><code class="language-ruby" data-lang="ruby"><span class="c1"># config/initializers/high_voltage.rb</span> <span class="no">HighVoltage</span><span class="o">.</span><span class="n">configure</span> <span class="k">do</span> <span class="o">|</span><span class="n">config</span><span class="o">|</span> <span class="n">config</span><span class="o">.</span><span class="n">route_drawer</span> <span class="o">=</span> <span class="no">HighVoltage</span><span class="o">::</span><span class="no">RouteDrawers</span><span class="o">::</span><span class="no">Root</span> <span class="k">end</span></code></pre></div> <p>Without it, all the erb files imported from Hugo will be at <code>http://localhost:3000/pages/&lt;filename&gt;</code>. The above removes <code>/pages/</code> from the URL, otherwise your links will likely to be off in your Hugo-gen&rsquo;d <code>.erb</code>.</p> <p>Rails should now be serving your Hugo imports. For example <code>app/views/pages/posts/cuda-r-keras-nixos.html.erb</code> will be at <code>http://localhost:3000/posts/cuda-r-keras-nixos</code>.</p> <h2 id="tidying-up">Tidying up</h2> <p>Once you&rsquo;ve got it working, you&rsquo;re going to want to go back and remove <code>public/hugo</code> and replace it with a symbolic link to <code>app/views/pages</code> so that Rails&rsquo; folder is automatically updated whenever you trigger a regen with Hugo, i.e.</p> <div class="highlight"><pre class="chroma"><code class="language-text" data-lang="text">ln -s /home/rps/src/rs.io-rails/app/views/pages/ /home/rps/src/rs.io-next/public/hugo</code></pre></div> <p>You&rsquo;ll also want to move and link the static assets from your <code>$HUGO_APP/public</code> folder into <code>$RAILS_APP/public</code>.</p> <div class="highlight"><pre class="chroma"><code class="language-text" data-lang="text">$ mv $HUGO_APP/public/css $RAILS_APP/public/ $ ln -s $RAILS_APP/public/css $HUGO_APP/public/css</code></pre></div> <p>Rinse &amp; repeat for the other static folders.</p> How to: GPU-Accelerated R/Keras on NixOS (via Docker) https://rs.io/cuda-r-keras-nixos/ Tue, 24 Sep 2019 00:00:00 -0500 https://rs.io/cuda-r-keras-nixos/ <p>I spent a weekend trying to get R, Keras, and CUDA to play nice together on NixOS. I suspect this&rsquo;ll be the task I&rsquo;m assigned on my first day in Hell.</p> <p>I&rsquo;ve given up on managing it natively with a <code>shell.nix</code> and am now using a Docker image combined with nVidia&rsquo;s docker wrapper.</p> <p>Before now, I&rsquo;d dismissed Docker as &ldquo;probable fad, soon irrelevant,&rdquo;<sup class="footnote-ref" id="fnref:fn-1"><a href="#fn:fn-1">1</a></sup> so this is my first experience with it.</p> <p>Enabling Docker with the nvidia wrapper took adding this to my <code>configuration .nix</code>:</p> <div class="highlight"><pre class="chroma"><code class="language-nix" data-lang="nix"><span class="n">virtualisation</span><span class="o">.</span><span class="n">docker</span><span class="o">.</span><span class="n">enable</span> <span class="err">=</span> <span class="no">true</span><span class="p">;</span> <span class="n">virtualisation</span><span class="o">.</span><span class="n">docker</span><span class="o">.</span><span class="n">enableNvidia</span> <span class="err">=</span> <span class="no">true</span><span class="p">;</span> <span class="n">hardware</span><span class="o">.</span><span class="n">opengl</span><span class="o">.</span><span class="n">driSupport32Bit</span> <span class="err">=</span> <span class="no">true</span><span class="p">;</span></code></pre></div> <p>I ended up cycling through a few different Docker images before <code>rocker/ml-gpu</code> finally worked.</p> <div class="highlight"><pre class="chroma"><code class="language-nil" data-lang="nil">sudo nvidia-docker run --gpus all --rm -v ~/:/home/rps -ti rocker/ml-gpu /bin/bash</code></pre></div> <p>The bit here, <code>~-v /:/home/rps</code>, mounts my home directory into the Docker container, making it the least painful Linux file-sharing experience I&rsquo;ve ever had, excepting <em>maybe</em> <code>sshfs</code>. I&rsquo;m impressed; maybe this containerization thing isn&rsquo;t so bad. This feature allowed me to easily access my training data / emacs config from inside the container.</p> <h2 id="fixing-pillow-png-errors">Fixing Pillow PNG errors</h2> <p>Unfortunately even the Dockerized setup isn&rsquo;t quite right out the box; it ships an older version of Pillow that produces errors like <code>StopIteration: 'PngStream' object has no attribute 'chunk_bBPn'</code>.</p> <p>To fix, just install an up-to-date version into the Docker container using:</p> <div class="highlight"><pre class="chroma"><code class="language-fish" data-lang="fish">pip --upgrade pillow</code></pre></div> <h2 id="how-to-check-if-keras-and-r-are-using-the-gpu">How to check if Keras &amp; R are using the GPU</h2> <p>Your environment ought to be working now. You can confirm that R/Keras is picking up your GPU via</p> <div class="highlight"><pre class="chroma"><code class="language-R" data-lang="R"><span class="kn">library</span><span class="p">(</span>keras<span class="p">)</span> k<span class="o">=</span>backend<span class="p">()</span> sess <span class="o">=</span> k<span class="o">$</span>get_session<span class="p">()</span> sess<span class="o">$</span>list_devices<span class="p">()</span></code></pre></div> <p>You can also use <code>nvidia-smi</code> to check the GPU&rsquo;s load when you&rsquo;re, say, training a model. It&rsquo;s sorta like <code>top</code>.</p> <div class="footnotes"> <hr /> <ol> <li id="fn:fn-1">Also in this category: everything that comes out of the JavaScript community, all AWS technologies beside EC2, Kubernetes and whatever new meaning &ldquo;devOps&rdquo; has this week and, finally, PulseAudio, whose decade-plus reign of terror can be understood only as divine trial. Just as the Lord tested Jonah with the whale, he tests me with PulseAudio, and just as the Lord commanded the whale to vomit Jonah onto land, he will command the Linux community to vomit PulseAudio onto <code>/dev/null</code>. Amen. <a class="footnote-return" href="#fnref:fn-1"><sup>[return]</sup></a></li> </ol> </div> Top Places to Buy Cheap Houses in USA, 2019 https://rs.io/places-to-buy-cheap-houses/ Sat, 22 Jun 2019 01:44:00 +0000 https://rs.io/places-to-buy-cheap-houses/ <p>Houses in this country can be had for far cheaper than almost anyone realizes.</p> <p>My favorite such example comes from Upstate NY native Christopher Baus: <a href="https://baus.net/4000-dollar-house/">&#8220;The house I was born in sold for $4000.&#8221;</a></p> <blockquote> <p>The house my parents owned when I was born recently sold for $4000. I&#8217;m not omitting a zero or two. That&#8217;s about the price of a used 2001 Honda Civic with 150,000 miles – maybe the Honda is worth a bit more. My parents sold the house for $12,000 (three zeros) in the &#8217;70s. Times have been tough for as long as I can remember my hometown of Jamestown (about 60 miles from Buffalo), NY, but I still found this surprising.</p> </blockquote> <p>That was 6 years ago but Jamestown&#8217;s real estate market hasn&#8217;t changed much since: Zillow lists 264 properties that have recently sold for less than $15,000. For example, <a href="https://www.zillow.com/homes/recently_sold/house_type/29889219_zpid/0-15000_price/0-58_mp/42.149214,-79.162073,42.034951,-79.315195_rect/12_zm/">here&#8217;s one that went for $6,500 and appears liveable</a>, and there are similar listings currently for sale, like <a href="https://www.zillow.com/homes/for_sale/house_type/29890917_zpid/0-15000_price/0-58_mp/42.148768,-79.161902,42.034504,-79.315024_rect/12_zm/0_mmm/">this one for $10,000.</a></p> <p>Jamestown, NY, then is certainly <em>a</em> place to buy cheap houses but is it the best place? Perhaps we can do better.</p> <div id="outline-container-org89bf29d" class="outline-2"> <h2 id="org89bf29d"> Defining the &#8220;Cheap&#8221; in &#8220;Cheap Houses&#8221; </h2> <div id="text-org89bf29d" class="outline-text-2"> <p> Deciding which home is cheapest is surprisingly nuanced. Consider, which of these is the best deal? </p> <p> The house with the… </p> <ul class="org-ul"> <li> lowest initial purchase price. </li> <li> lowest total cost of ownership, i.e. an aggregate of the initial price, lifetime repairs, property taxes, and other expenses. </li> <li> best ratio between price and its cost-to-replace. </li> <li> lowest ratio of price to the area&#8217;s median income. Zillow takes this tact in <a href="https://www.zillow.com/research/most-affordable-markets-homes-18906/">their &#8220;affordability&#8221; ranking</a>, a metric they define as the &#8220;share of median income that residents pay for a 30-year fixed mortgage on a typical home.&#8221; </li> <li> largest price gap between it and an average of what similar houses have sold for. </li> <li> largest return on investment at re-sale. </li> <li> largest return on investment, when rented out. </li> </ul> <p> Trick question, sorta. Which is optimal depends crucially on the preferences of the would-be buyer (a point I make in more detail in my <a href="https://rs.io/the-best-place-to-buy-land-for-homesteading/">guide to the best place to buy homesteading land</a>.) This article, then, is necessarily opinionated as I have my own prejudices here. I&#8217;ll share one of my strongest with you: </p> <p> I hate ranking housing by its profitability as an investment. &#8220;Housing as investment&#8221; is an altogether monstrous idea. Cultures that believe in it end up enacting policies that artificially inflate existing home prices, much to the detriment of everyone else. <a href="https://www.strongtowns.org/journal/2018/7/3/how-zoning-is-holding-your-neighborhood-back">Examples of such policies</a> include restrictions on building and bans on everything-but-single-family-homes. The result is the creation of a system that exerts python-like constriction on the American dream, suffocating it through the gradual replacement of the self-sufficient home-owning class with a desperate renter-class forced to funnel their wages to rent-seeking parasites. At best. At worst it ends in dystopias like the Bay Area, where <a href="https://www.businessinsider.com/san-francisco-human-poop-problem-2019-4">shitting on the street is permitted</a> and building a patio isn&#8217;t. </p> <p> Plus, it&#8217;s just too damn hard. Such measurements depend crucially on forecasting the future and accurate estimation of the preferences of other people, tasks that posses a recursive difficulty reminiscent of an Escher-painting. They&#8217;re always tougher than you expect. </p> <div class="figure"> <p> <img src="https://rs.io/wp-content/uploads/2019/06/escher-drawing-hands.jpg" alt="escher-drawing-hands.jpg" /> </p> </div> <p> No thanks! </p> <p> We&#8217;ll be better served by taking the simplest metrics and then gradually adding complexity from there. Let&#8217;s try that. Let&#8217;s start with the easiest thing that could work. </p> </div> </div> <div id="outline-container-org5127b35" class="outline-2"> <h2 id="org5127b35"> Regions With the Lowest Median Purchase Price </h2> <div id="text-org5127b35" class="outline-text-2"> <p> Zillow publishes <a href="https://www.zillow.com/research/data/">quite a bit of economic housing market data</a>. One of their available measures is the &#8220;Zillow Home Value Index (ZHVI): A smoothed, seasonally adjusted measure of the median estimated home value across a given region and housing type.&#8221; It&#8217;s straightforward to extract a ranking of regions by median home price from this data, so that&#8217;s what I tried first. </p> <p> [table id=6 /] </p> <p> Measured this way, Danville, IL ends up as the #1 cheapest place to buy a house. Coincidentally, it&#8217;s about an hour drive from me and I&#8217;ve visited a few times, so I&#8217;ll give you my impression of the place. </p> <p> Location-wise, the most interesting thing about the town is its proximity to Indiana. It&#8217;s right on the Illinois side of the state&#8217;s border. At first I thought this might explain its cheapness: given that taxation is significantly higher on the Illinois side, maybe Danville&#8217;s residents are all moving to Indiana and selling their houses for cheap on the way out. I plugged Danville into the government&#8217;s <a href="https://flowsmapper.geo.census.gov/map.html">Census Flows Mapper</a> to check. </p> <div class="figure"> <p> <img src="https://rs.io/wp-content/uploads/2019/06/danville-il-to-indiana-migration-map.png" alt="danville-il-to-indiana-migration-map.png" /> </p> </div> <p> Nope! The result is the opposite of what I anticipated. There are more people from Indiana moving to Danville than the reverse. </p> </div> <p><div id="outline-container-org4bfd752" class="outline-3"> <h3 id="org4bfd752"> Is this ranking any good? How does Danville, IL compare to Jamestown, NY? </h3> <div id="text-org4bfd752" class="outline-text-3"> <p> Our first attempt has Jamestown at #4. Promising! But is Danville <i>really</i> cheaper? </p> <p> A Zillow search for houses under $15,000 returns 224 results for Danville, IL. Jamestown NY meanwhile has ~17% more such listings, at 264, even though Danville is larger by about 2,000 residents. On the one hand, this is the opposite of what we should anticipate. On the other, from browsing Danville&#8217;s Zillow results, its real estate market certainly appears comparable to Jamestown&#8217;s. Both <i>cheap</i>. </p> <p> So should you move to Danville? Probably not. It&#8217;s the only place in rural Illinois where I&#8217;ve gotten the sort of vague unease I associate with crime-infested urban neighborhoods. Here it appears my gut was unfortunately right: <a href="https://www.neighborhoodscout.com/il/danville/crime">&#8220;Danville has one of the highest crime rates in America compared to all communities of all sizes.&#8221;</a> This is significantly worse than the earlier example of Jamestown where crime, though elevated, is not nearly so bad. </p> <p> We can do better. </p> </div> </div> </div></p> <div id="outline-container-orgc695462" class="outline-2"> <h2 id="orgc695462"> Leaving &#8220;Median&#8221; Behind </h2> <div id="text-orgc695462" class="outline-text-2"> <p> If you are interested in a cheap house, you presumably have no intention of paying that area&#8217;s median price–you want a deal–so why create a median-based ranking? </p> <p> Zillow can again help us out here. Their data helpfully splits each market into thirds: a top tier, middle tier, and bottom tier. Instead of considering the market as a whole, we can narrow our analysis to median prices for &#8220;bottom tier&#8221; houses, i.e. the cheapest third of that region&#8217;s market. </p> <p> [table id=7 /] </p> <p> Restricting ourselves this way, we&#8217;re sort of following the adage that advises one to buy the worst house in the best neighborhood. Like with any popular wisdom, though, there&#8217;s also a cliche that implies the opposite. One may prefer to be the &#8220;biggest fish in a small pond.&#8221; </p> <p> If we can invert our proverb, maybe we ought to invert our data too? Let&#8217;s re-run the numbers above for the &#8220;top tier&#8221; third of the market instead of the bottom tier and find out. </p> <p> Doing so, we&#8217;re answering a new question, &#8220;Where is it cheapest to have a nicer house than your neighbors, to not just keep up with the Joneses but <i>be</i> the Joneses?&#8221; </p> <p> [table id=8 /] </p> </div> </div> <div id="outline-container-orga8e01fd" class="outline-2"> <h2 id="orga8e01fd"> The Most Bang For Your Buck </h2> <div id="text-orga8e01fd" class="outline-text-2"> <p> According to the US Census, the size of the median house varies regionally. They&#8217;re largest in the Northeast and smallest in the Midwest, 2,336 sq ft vs 2,001. The gap between rural and city houses is even larger with, surprisingly, houses inside &#8220;Metropolitan Statistical Areas&#8221; larger than those that aren&#8217;t. </p> <p> This is a potential source of bias in our rankings: maybe some regions are doing well because they&#8217;ve mostly small houses. </p> <p> Depending on your preferences, this may or may not be a problem. Would you rather buy the absolute cheapest house you can find or the most house for your dollar? The rankings above optimize for the first, the absolute cheapest house you can find. </p> <p> What if you want the most bang for your buck, though, even if that means you have to shell out a few more bucks? We can answer this second question by ranking regions based on housing&#8217;s price per sq ft instead of its purchase price, like so: </p> <p> [table id=9 /] </p> <p> There&#8217;s Jamestown again, at #6! </p> <p> What do these numbers mean? They&#8217;re easier to make sense of with some context: On average, building a new home costs about $150/sq ft but this number varies significantly with region, i.e. costs are an enviable $80/sq ft in Oklahoma, the state boasting the cheapest home construction. </p> <p> This means that, in many regions, houses can be had for significantly less than it would cost to re-build them. Compared to $17/ sq ft, assembling a new house of the same size would cost you almost 5x as much, at a minimum. That&#8217;s like an 80% discount! What a steal! </p> <p> This ranking is still imperfect, though. It&#8217;s biased toward large houses, because the marginal cost of a sq ft of house decreases as the size of the house increases. This makes sense when you think about it: fixed costs, like utility hook ups and permitting, are identical but contribute more to the average cost per sq ft of a small house than a large one. The bigger the house, the more sq ft there are to dilute these expenses. </p> <p> Here&#8217;s a graph of that relationship between price per sq ft versus # of sq ft that was <a href="http://globaldecision.com/price-per-square-foot-distorted.html">shared by globaldecision.com</a>. As you can see, as the sq ft of a house increases (the y axis) the price per sq ft goes down (the x axis). </p> <div class="figure"> <p> <img class="aligncenter" src="https://rs.io/wp-content/uploads/2019/06/price-per-sqft-vs-sqft-graph.jpg" alt="price-per-sqft-vs-sqft-graph.jpg" /> </p> </div> <p> Can we do better? Yeah, probably, but it&#8217;d be a lot more work now that we&#8217;ve exhausted the simplest analyses. Next, it&#8217;d make the most sense to go more fine grained and evaluate specific houses instead of whole regions, maybe by training a predictive model to estimate prices and then using it to identify mispricings. </p> <p> Except I&#8217;ve <a href="https://rs.io/cheap-houses/great-internet/index.html">already built something like that elsewhere</a>. </p> </div> </div> <div id="outline-container-org7c6a5af" class="outline-2"> <h2 id="org7c6a5af"> Further Reading </h2> <div id="text-org7c6a5af" class="outline-text-2"> <ul class="org-ul"> <li> I&#8217;ve written software that can help you discover cheap houses. <a href="https://rs.io/cheap-houses/great-internet/index.html">Check it out.</a> </li> <li> If you&#8217;re interested in purchasing raw land, you&#8217;ll benefit from reading my <a href="https://rs.io/the-best-place-to-buy-land-for-homesteading/">guide to selecting homesteading land.</a> </li> <li> <a href="https://nation.maps.arcgis.com/apps/Cascade/index.html?appid=de7f932e3a1d494f9c9d9a67fb0de646">&#8220;How Many Years of Life Does That House Cost?&#8221;</a> </li> <li> <a href="https://www.nytimes.com/interactive/2014/upshot/buy-rent-calculator.html">The New York Times has an excellent &#8220;rent versus buy&#8221; calculator.</a> </li> </ul> </div> </div> Rural Areas with Good Internet Speeds (for Streaming, Gaming, Remote Work) https://rs.io/rural-areas-with-good-internet/ Fri, 21 Jun 2019 18:24:00 +0000 https://rs.io/rural-areas-with-good-internet/ <p>Ever wonder how remote you can go without sacrificing internet connectivity?</p> <p>A couple months back, I mashed together some publicly available federal data to answer just that. By cross-referencing the <a href="https://www.fcc.gov/general/explanation-broadband-deployment-data">FCC&#8217;s broadband deployment data</a> against <a href="https://www2.census.gov/census_2010/01-Redistricting_File--PL_94-171/">county level statistics for population density</a>, I generated a ranking of counties with symmetric gigabit fiber sorted by remoteness.</p> <p>The winner?</p> <p>It&#8217;s a tie actually. Carter County, Montana and Kenedy County, Texas. The dataset calculates a population density of 0.3 people per square mile for both.</p> <p>Or so I thought, until I realized I could cheat and look up more precise numbers on Wikipedia to break the tie. Drum roll, please…</p> <div id="outline-container-org08198d6" class="outline-2"> <h2 id="org08198d6"> The results </h2> <div id="text-org08198d6" class="outline-text-2"> <p> Kenedy County Texas is #1! With a mere 416 people populating almost 2,000 square miles, they somehow manage to have gigabit fiber available through <a href="http://www.vtx1.net/">VTX Communications.</a> </p> <p> <a href="http://www.rangeweb.net/residential/high-speed-internet/">Range Telephone Cooperative</a> in Carter County Montana is #2, with ~1,100 people on ~3,300 square miles. </p> <p> The final ranking ended up with more than 2600 entries, unfortunately, so it&#8217;s kind of overwhelming but I&#8217;ve reproduced it in the table below. You can also <a href="https://rs.io/wp-content/uploads/2019/06/rural_broadband_by_county_density.csv">download the data set by clicking here</a>. </p> <p> [table id=2 /] </p> <p> Again, you can <a href="https://rs.io/wp-content/uploads/2019/06/rural_broadband_by_county_density.csv">download the data set by clicking here</a>. </p> <p> Whenever you&#8217;re done gorging yourself on the heady rush that is sorted data, I&#8217;ll talk specifics about a couple of especially promising rural areas with good internet&#8230; </p> </div> </div> <div id="outline-container-org95687b8" class="outline-2"> <h2 id="org95687b8"> EPB in Tennessee </h2> <p> <img class="aligncenter size-full wp-image-309" src="https://rs.io/wp-content/uploads/2019/06/2019-06-21T160544-0500-Chattanooga-Gig-Your-Gig-is-Here-Mozilla-Firefox.png" alt="" width="977" height="302" srcset="https://rs.io/wp-content/uploads/2019/06/2019-06-21T160544-0500-Chattanooga-Gig-Your-Gig-is-Here-Mozilla-Firefox.png 977w, https://rs.io/wp-content/uploads/2019/06/2019-06-21T160544-0500-Chattanooga-Gig-Your-Gig-is-Here-Mozilla-Firefox-300x93.png 300w, https://rs.io/wp-content/uploads/2019/06/2019-06-21T160544-0500-Chattanooga-Gig-Your-Gig-is-Here-Mozilla-Firefox-768x237.png 768w" sizes="(max-width: 977px) 100vw, 977px" /> </p> <div id="text-org95687b8" class="outline-text-2"> <p> Chattanooga has been <a href="http://chattanoogagig.com/">branding itself as &#8220;the Gig city,&#8221;</a> ever since its regional electrical company, <a href="https://epb.com/">EPB</a>, ran gigabit fiber to its customer base in 2010. This created the US&#8217;s largest fiber grid, spanning ~600 square miles. Meaning, don&#8217;t let the word &#8220;city&#8221; here turn you off. Sure, it covers Chattanooga, but their network extends out into the country and even across state lines into neighboring Georgia. (<a href="https://epb.com/outage-map">This</a> is the <a href="https://epb.com/outage-map">map of their entire coverage area</a>.) </p> <p> Now, it&#8217;s pretty damn cool that they serve all of this territory symmetric gigabit but it&#8217;s cooler still that they do it at a cost to subscribers of less than $70/month. The craziest thing, though, is what EPB did to their grid in 2015: they upgraded Chattanooga from &#8220;the Gig city&#8221; to &#8220;the 10 Gig city,&#8221; along with the rest of their network. </p> <p> <b>That&#8217;s right. EPB will sell you a symmetric 10Gb/s internet pipe and they&#8217;ll run it way out into the country.</b> It&#8217;s $300/mo but, hey, they&#8217;re the only residential provider offering it in the United States <i>at all</i>. The rest of the country&#8217;s <i>best</i> is a tenth the speed. </p> <p> Insane. EPB and the rest of you crazy bastards in Tennessee, I salute you. Can&#8217;t wait to hear about what y&#8217;all come up with next. </p> </div> </div> <div id="outline-container-orgc3d3b18" class="outline-2"> <h2 id="orgc3d3b18"> Missouri&#8217;s Co-Mo.net </h2> <p> <img class="aligncenter size-full wp-image-313" src="https://rs.io/wp-content/uploads/2019/06/net-cables.jpg" alt="" width="660" height="355" srcset="https://rs.io/wp-content/uploads/2019/06/net-cables.jpg 660w, https://rs.io/wp-content/uploads/2019/06/net-cables-300x161.jpg 300w" sizes="(max-width: 660px) 100vw, 660px" /> </p> <div id="text-orgc3d3b18" class="outline-text-2"> <p> I initially stumbled onto EPB while looking for raw land without building codes that was also served gigabit fiber. The bit of EPB&#8217;s grid that ventures into Sequatchie County, TN, is just such a region. Unfortunately, it&#8217;s the bourgeois expensive area known as &#8220;Signal Mountain.&#8221; Folk are asking for 10 grand/acre, which is <i>hefty</i> for Appalachia. Too rich for me. I had to expand my search. </p> <p> The result: Morgan County, MO, and their ISP, <a href="https://www.co-mo.net/residential/internet-for-residential/">Co-Mo.net</a>. Co-Mo actually covers more than just Morgan county but what&#8217;s cool about Morgan county is that it&#8217;s blissfully free of building codes, as long as your property isn&#8217;t on the lake. Plus, if you own more than 5 acres, you can choose to waive even septic permitting and compost your own waste, like via a humanure system. </p> <p> It&#8217;s more rural than EPB and it&#8217;s <i>cheap</i>, too. You can sometimes find parcels for $1500/acre. (Most of the cheapest listings are in the neighborhood called Ivy Bend and I&#8217;ve heard from locals that this area is sort of sketchy. I&#8217;m not sure whether they mean &#8220;weird and poor neighbors&#8221; sketchy or &#8220;theft and violent crime&#8221; sketchy. It&#8217;s no real problem either way, as I pretty frequently see cheap acreage for sale in the &#8220;nicer&#8221;, Eastern part of the county too.) </p> <p> I&#8217;ve written before, too, about the particular promise of the Ozarks for homesteading, like in <a href="https://rs.io/the-best-place-to-buy-land-for-homesteading/">my guide on selecting the best place to buy homesteading land</a>. </p> </div> </div> <div id="outline-container-org2e9baa0" class="outline-2"> <h2 id="org2e9baa0"> How to Find More Rural Areas With Good Internet </h2> <p> <img class="aligncenter size-full wp-image-311" src="https://rs.io/wp-content/uploads/2019/06/how-to-find-more-rurals-areas-with-great-internet.jpg" alt="" width="660" height="436" srcset="https://rs.io/wp-content/uploads/2019/06/how-to-find-more-rurals-areas-with-great-internet.jpg 660w, https://rs.io/wp-content/uploads/2019/06/how-to-find-more-rurals-areas-with-great-internet-300x198.jpg 300w" sizes="(max-width: 660px) 100vw, 660px" /> </p> <div id="text-org2e9baa0" class="outline-text-2"> <p> If none of the above are what you&#8217;re looking for, the next thing you&#8217;ll want to do is scroll through <a href="https://muninetworks.org/content/rural-cooperatives-page">this list of rural internet cooperatives</a> and make a list of the companies operating in your preferred region. Then, Google each cooperative from your list and make notes on things like: </p> <ul class="org-ul"> <li> Extent of service area </li> <li> Status of current project. Is the grid running and complete? Partially online and still expanding? Not up yet and under construction? Only just announced? </li> <li> Price, speed. </li> <li> If you&#8217;re planning on developing raw land, be sure you determine what is required to hook a new parcel to the co-op&#8217;s grid. Sometimes it&#8217;s impossible or tens of thousands of dollars. Don&#8217;t get burned! </li> </ul> <p> A similar tact you can try, if you&#8217;re unable to find anything in your area that way, is to start your initial list by Googling &#8220;<your state> internet cooperative&#8221; and then digging more into whatever that search finds. </p> <p> Finally, be sure to check out my <a href="https://rs.io/cheap-houses/great-internet/index.html">Cheap Houses, Great Internet page</a>. It may have what you&#8217;re looking for, too. </p> </div> </div>