https://bismuth.garden/feed.xml
Jekyll 2020-12-13T20:56:53+11:00 https://bismuth.garden/feed.xml A digital garden with notes on programming, languages, music, and more. 2020-11-11T21:55:00+11:00 2020-11-11T21:55:00+11:00 https://bismuth.garden/2020/11/ruby-squares <p>My latest hobby is a kind of coding challenge, writing short <a href="/ruby">Ruby</a> programs with self-imposed constraints. The goal is not to write the shortest code possible, but to fit the code neatly into a rectangle. Achieving this requires some trickery.</p> <h2 id="h:20201102arb">20201102a.rb</h2> <div class="language-rb highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1">#!/usr/bin/env ruby</span> <span class="n">c</span><span class="o">=</span><span class="p">(</span><span class="mi">0</span><span class="o">..</span><span class="mh">0x7f</span><span class="p">).</span><span class="nf">map</span><span class=...