<article>
<h2 id="introduction">Introduction</h2>
<p>Hosts:</p>
<ul>
<li><a
href="https://hackerpublicradio.org/correspondents/0201.html">MrX</a></li>
<li><a
href="https://hackerpublicradio.org/correspondents/0225.html">Dave
Morriss</a></li>
</ul>
<p>We recorded this on Saturday September 14<sup>th</sup> 2024. This
time we were at Swanston Farm, a place we had previously visited for
lunch in March 2024.</p>
<p>After lunch we adjourned to Dave's car (<em>Studio N</em>) in the car
park, and recorded a chat. The details of why it is <u>Studio N</u>
instead of <u>Studio C</u> is mentioned in the chat itself!</p>
<p><small><em>Preparing this show has taken longer than usual this time
- apologies!</em></small></p>
<h2 id="topics-discussed">Topics discussed</h2>
<ul>
<li>Studio change:
<ul>
<li>Sadly, since the last recording <em>Studio C</em> (Dave's 10-year
old <a
href="https://en.wikipedia.org/wiki/Citro%C3%ABn_C4_Picasso">Citroën C4
Picasso</a>) self-destructed. It was a diesel car and one of the fuel
injectors failed and destroyed the engine management system as it died.
It wasn't worth repairing!</li>
<li>The replacement is <em>Studio N</em>, a Nissan Leaf, which is an <a
href="https://en.wikipedia.org/wiki/Electric_vehicle">EV (electric
vehicle)</a>. The price of nearly new EV cars is fairly good in the UK
at this time in 2024, so it seemed like a good opportunity to get
one.</li>
<li>Learning to own and drive an EV can be challenging to some extent:
<ul>
<li>"Range anxiety" and access to charging stations</li>
<li><a
href="https://en.wikipedia.org/wiki/Regenerative_braking">Regenerative
braking</a></li>
<li>Fast (DC) charging on the road is relatively expensive (£0.79p per
kWh), but is convenient</li>
<li>Ideally, a home (AC) charger is required. It will be slower (7 kW
per hour) but will be cheaper with a night tariff (£0.085 per kWh versus
£0.25 per kWh normal rate)</li>
<li>There is potential, with solar panels and a battery, to use free
electricity to charge an EV at home</li>
</ul></li>
<li><code>MrX</code> might like to move to an EV in the future</li>
</ul></li>
</ul>
<ul>
<li>YouTube channels:
<ul>
<li>Dave is subscribed to a channel called "<a
href="https://www.youtube.com/@ThePostApocalypticInventor"><em>The Post
Apocalyptic Inventor</em> (TPAI)</a>" and recently shared one of the
latest videos with <code>MrX</code>. The channel owner collects
discarded items from scrapyards in Germany, or buys old bits of
equipment, and gets them working again.
<ul>
<li><a href="https://www.youtube.com/watch?v=BJklwDYfZDo">Milling
Machine Adventure! Bring her Home! / Gantry Build</a></li>
<li><a href="https://www.youtube.com/watch?v=18-lrsp8Vg8">I built a CNC
Plasma Cutting Table from Scrap!</a></li>
</ul></li>
</ul></li>
</ul>
<ul>
<li>Databases:
<ul>
<li><code>MrX</code> used <a
href="https://en.wikipedia.org/wiki/DBase">dBase</a> on DOS in the past,
and received some training in databases.</li>
<li>In 2017 he obtained a large <a
href="https://en.wikipedia.org/wiki/Comma-separated_values">csv
(comma-separated values)</a> file from the <a
href="https://en.wikipedia.org/wiki/Ofcom">OFCOM (Office of
Communications, UK)</a> website containing their <em>Wireless Legacy
Register</em>, which contains licensees and frequencies with longitude
and latitude values. A means of interrogating this file was sought,
having found that spreadsheets were not really very good at handling
files of this size (around 200,000 records).</li>
<li><code>MrX</code> used the <a
href="https://github.com/BurntSushi/xsv">xsv tool</a>, which was covered
in shows <a
href="https://hackerpublicradio.org/eps/hpr2698/index.html">hpr2698</a>
and <a
href="https://hackerpublicradio.org/eps/hpr2752/index.html">hpr2752</a>
by <a href="https://hackerpublicradio.org/correspondents/0300.html">Mr.
Young</a>. It allows a CSV file to be interrogated in quite a lot of
detail from the command line. However, with a file of this size it was
still quite slow.</li>
<li>In a discussion with Dave the subject of the <a
href="https://en.wikipedia.org/wiki/SQLite">SQLite</a> database came up.
Using the <a href="https://sqlitebrowser.org/">SQLite Browser</a> it was
simple to load this CSV file into a database and gain rapid access to
its contents. SQLite databases may also be queried through a
command-line interface which can also be run on a Raspberry Pi, phones,
tablets and on a ChromeBook.</li>
</ul></li>
</ul>
<ul>
<li>The <a
href="https://github.com/jiro4989/textimg"><code>textimg</code></a>
tool:
<ul>
<li>This is a command to convert from colored text (ANSI or 256) to an
image. Dave generates coloured text from his meal database (HPR show <a
href="https://hackerpublicradio.org/eps/hpr3386/index.html">hpr3386 ::
What's for dinner?</a>, this being a later enhancement), then captures
the output and sends it to a Telegram channel shared with his
family.</li>
<li>Dave also exchanges weather data obtained from the site
<code>wttr.in</code> with <a
href="https://hackerpublicradio.org/correspondents/0318.html"><code>Archer72</code></a>
on Matrix.</li>
<li>This is a useful tool for generating images from text, including any
text colours. It can be installed from the GitHub copy, and maybe from
some package repositories.</li>
</ul></li>
</ul>
<ul>
<li>Using coloured text in BASH (Dave responding to <code>MrX</code>):
<ul>
<li>I have used a function to define variables with colour names:
<ul>
<li>Call a function <code>define_colours</code> which defines (and
exports) variables called <code>red</code>, <code>green</code>,
etc.</li>
<li>Using <code>red=$(tput setaf 1); export red</code></li>
</ul></li>
<li>I use the colours in two ways:
<ul>
<li>Method 1: use these names in
<code>echo "${red}Red text${reset}"</code></li>
<li>Method 2: use another function <code>coloured</code> which takes two
arguments, a colour name (as a string) and a message. The script
encloses the message argument in a colour variable and a reset. The
colour name argument is used in a redirection to turn <code>red</code>
into the contents of the variable <code>$red</code>.</li>
</ul></li>
<li>This probably needs a show to explain things fully.</li>
</ul></li>
</ul>
<ul>
<li>Terminal multiplexers:
<ul>
<li>Dave and <code>MrX</code> use GNU <code>screen</code>.</li>
<li>Both recognise that the alternative <code>tmux</code> might be
better to use in terms of features, but are reluctant to learn a new
interface!</li>
<li>Dave has noticed a new open-source alternative called <a
href="https://zellij.dev/">zellij</a> but has not yet used it.</li>
</ul></li>
</ul>
<ul>
<li>Variable weather:
<ul>
<li>Dealing with hot weather: YouTube, Techmoan channel <a
href="https://www.youtube.com/watch?v=6kw4B-8ez1M">PERSONAL AIRCON -
Ranvoo Aice Lite Review</a></li>
<li><code>MrX</code> had recently had a holiday in the <a
href="https://en.wikipedia.org/wiki/Lake_District">Lake District</a>
where the weather was good.</li>
<li>In Scotland the weather has been wet and windy in the same
period.</li>
</ul></li>
</ul>
<ul>
<li>Spectrum24, OggCamp:
<ul>
<li><code>MrX</code> is attending his first <a
href="https://oggcamp.org/">OggCamp</a> in Manchester. Dave will be
attending too, as will Ken.
<ul>
<li>HPR has a table/booth at OggCamp.</li>
</ul></li>
<li>Ken was recently at <a
href="https://spectrum-conference.org/">Spectrum24</a>, an amateur radio
conference in Paris.
<ul>
<li><a href="https://meshtastic.org/">Meshtastic</a> an open source,
off-grid, decentralized, mesh network built to run on affordable,
low-power devices</li>
</ul></li>
</ul></li>
</ul>
<ul>
<li>Old inkjet printers:
<ul>
<li><code>MrX</code> has an Epson R300 printer where the black ink seems
to have dried up.</li>
<li>Dave has an old HP Inkjet with the same type of problem. This
printer has a scanner and FAX capability. An <a
href="https://hackerpublicradio.org/eps/hpr1864/index.html">HPR show</a>
was done in 2015 describing how it was set up to use a Raspberry Pi to
make it available on the local network.</li>
</ul></li>
</ul>
<ul>
<li>Propelling or <em>mechanical</em> pencils:
<ul>
<li>Dave had a Pentel GraphGear 1000 propelling (aka mechanical) pencil
which was mentioned on <a
href="https://hackerpublicradio.org/eps/hpr3197/index.html">HPR show
3197</a>. This was dropped onto concrete, and didn't appear damaged at
the time, but it apparently received internal damage and eventually fell
apart.</li>
</ul></li>
</ul>
<h2 id="links">Links</h2>
<ul>
<li>Electric cars:
<ul>
<li><a href="https://en.wikipedia.org/wiki/Electric_vehicle">EV
(electric vehicle)</a></li>
<li><a
href="https://en.wikipedia.org/wiki/Regenerative_braking">Regenerative
braking</a></li>
</ul></li>
</ul>
<ul>
<li>Databases
<ul>
<li>SQLite:
<ul>
<li><a href="https://en.wikipedia.org/wiki/SQLite">SQLite</a></li>
<li><a href="https://sqlitebrowser.org/">SQLite Browser</a></li>
<li><a href="https://www.sqlitetutorial.net/">An Easy Way to Master
SQLite Fast</a></li>
<li>Open source SQLite Studio available for Linux <a
href="https://sqlitestudio.pl/">SQLiteStudio</a></li>
</ul></li>
<li>SQL:
<ul>
<li>Origins: <a
href="https://youtube.com/watch?v=z8L202FlmD4&amp;si=qUNEabvUxrLKH0Ha">The
Birth of SQL &amp; the Relational Database</a></li>
<li>Intricacies: <a
href="https://stevestedman.com/2015/03/mysql-join-types-poster/">MySQL
JOIN Types Poster (Steve Stedman)</a></li>
</ul></li>
<li>Design:
<ul>
<li><a
href="https://youtube.com/watch?v=y1tcbhWLiUM&amp;si=OorjdxGR2Dq-sZn-">How
to Fake a Database Design - Curtis Poe (<em>Ovid</em>)</a></li>
</ul></li>
</ul></li>
</ul>
<ul>
<li>The <code>textimg</code> tool:
<ul>
<li>GitHub repository: <a
href="https://github.com/jiro4989/textimg">textimg</a></li>
</ul></li>
</ul>
<ul>
<li><code>zellij</code>:
<ul>
<li>Website: <a href="https://zellij.dev/">zellij</a></li>
<li>Github repository: <a
href="https://github.com/zellij-org/zellij">zellij</a></li>
<li>Quote from the repo: <em>Zellij is a workspace aimed at developers,
ops-oriented people and anyone who loves the terminal. Similar programs
are sometimes called "Terminal Multiplexers".</em></li>
</ul></li>
</ul>
</article>
