<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>M3PGS/2E0PGS blog</title>
    <description>Ham radio, Programming, Networks, Electronics, FOSS, GNU/Linux, Trance and Ale.</description>
    <link>https://2e0pgs.github.io/blog/</link>
    <atom:link href="https://2e0pgs.github.io/blog/feed.xml" rel="self" type="application/rss+xml" />
    <pubDate>Sun, 26 Nov 2023 11:36:09 +0000</pubDate>
    <lastBuildDate>Sun, 26 Nov 2023 11:36:09 +0000</lastBuildDate>
    <generator>Jekyll v3.9.3</generator>
    
      <item>
        <title>REPL maths 2</title>
        
          <description>&lt;h1 id=&quot;bc-power-of-zero-psion-programming-and-repl&quot;&gt;bc, power of zero, PSION programming and REPL&lt;/h1&gt;

&lt;p&gt;See part 1: &lt;a href=&quot;https://2e0pgs.github.io/blog/programming/2020/09/27/repl-maths-and-notation/&quot;&gt;Maths, notation, calculators and REPL programming&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;moduloremainders&quot;&gt;Modulo/remainders&lt;/h2&gt;

&lt;h3 id=&quot;bc&quot;&gt;bc&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;https://superuser.com/questions/31445/gnu-bc-modulo-with-scale-other-than-0&quot;&gt;GNU BC: “modulo” % with scale other than 0&lt;/a&gt;&lt;/p&gt;

&lt;div class=&quot;language-sh highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;bc &lt;span class=&quot;nt&quot;&gt;-l&lt;/span&gt;

scale
20
5 - &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;5/2&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;*&lt;/span&gt; 2
0
5 - &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;5/4&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;*&lt;/span&gt; 4
0
5%4
0

&lt;span class=&quot;nv&quot;&gt;scale&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;0
5 - &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;5/2&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;*&lt;/span&gt; 2
1
5 - &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;5/4&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;*&lt;/span&gt; 4
1
5%4
1
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Another GNU BC gotcha is the order of precedence aka order of operations is different to C. See comments here: &lt;a href=&quot;https://www.gnu.org/software/bc/manual/html_node/bc_13.html&quot;&gt;https://www.gnu.org/software/bc/manual/html_node/bc_13.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That is one reason to use parentheses in large equations to make it more readable and avoid the need to recall many different orders of precedence.&lt;/p&gt;

&lt;h3 id=&quot;c&quot;&gt;C#&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/operators/arithmetic-operators#remainder-operator-&quot;&gt;C# Remainder operator % integer and floating point&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I was doing some maths in C# for fun which turned out to be “Multinomial distribution” (TODO: more on this in another post) and as I was running multiple iterations with larger and larger numbers I recalled about a nice C# feature for making large literal numbers easier to read.&lt;/p&gt;

&lt;div class=&quot;language-csharp highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;100000000&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;n&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;_000_000&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Also see: &lt;a href=&quot;https://stackoverflow.com/questions/43476056/what-do-the-underscores-mean-in-a-numeric-literal-in-c&quot;&gt;What do the underscores mean in a numeric literal in C#?&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;to-the-power-of-zero&quot;&gt;To the power of zero&lt;/h2&gt;

&lt;h3 id=&quot;bc-1&quot;&gt;BC&lt;/h3&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;1^0
1
2^0
1
0^0
1
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;javascript&quot;&gt;JavaScript&lt;/h3&gt;

&lt;div class=&quot;language-js highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;**&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;**&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;**&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;c-1&quot;&gt;C#&lt;/h3&gt;

&lt;div class=&quot;language-csharp highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;Console&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;WriteLine&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Math&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;Pow&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Output&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;1
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;c-2&quot;&gt;C++&lt;/h3&gt;

&lt;div class=&quot;language-cpp highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;%f&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pow&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Output&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;1.000000
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;sql-microsoft&quot;&gt;SQL (Microsoft)&lt;/h3&gt;

&lt;div class=&quot;language-sql highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;select&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;power&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Output&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;1
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;libreoffice-calc&quot;&gt;LibreOffice Calc&lt;/h3&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;=0^0
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Output&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;1
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;microsoft-excel&quot;&gt;Microsoft Excel&lt;/h3&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;=0^0
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Output&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Number Error
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;psion-series-3a-calc-app&quot;&gt;PSION Series 3a Calc app&lt;/h3&gt;

&lt;p&gt;More below on the PSION in another heading. Note if you run the second before last statement in OPL you’ll get a runtime error not a compile/translate time error.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;  1**0
= 1
  2**0
= 1
  0**0 &quot;Invalid arguments&quot;
  2^7 &quot;Illegal character&quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;casio-fx-991es-plus&quot;&gt;Casio fx-991ES PLUS&lt;/h3&gt;

&lt;p&gt;Much to my annoyance it only has a exponent button and not a dedicated power of caret button. This basically means it semi expects some equation inside parentheses and opens a parenthesis. The redeeming factor is that it implicitly closes the parentheses.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;2^(7
1^(0
2^(0
0^(0
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Output&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;128
1
1
Math ERROR
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;It wont however implicitly open a parenthesis:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;2+2)*2
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Output&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Syntax ERROR
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This model has LCD display glare too.&lt;/p&gt;

&lt;h3 id=&quot;casio-fx-83ms&quot;&gt;Casio fx-83MS&lt;/h3&gt;

&lt;p&gt;This calculator I prefer over my fx-991ES PLUS. It has zero display glare and richer text due to the non glossy simpler LCD. It also has the caret button of which I prefer as it doesn’t try to open parentheses unless I choose to. So input is more readable when written out verbatim unlike the fx-991ES PLUS unless I manually close the parentheses. The buttons are also a bit better quality.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;2^7
1^0
2^0
0^0
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Output&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;128
1
1
Math ERROR
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;psion-series-3a-pda&quot;&gt;PSION Series 3a PDA&lt;/h2&gt;

&lt;h3 id=&quot;calc-app&quot;&gt;Calc app&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;https://www.manualslib.com/manual/1231246/Psion-3a-Series.html?page=45#manual&quot;&gt;Psion 3a Series User Manual&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Using “Menu” button you get access to various functions just a few examples:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sin(x)&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cos(x)&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;tan(x)&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;log(x)&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In the menu is the option for power of, which generates a place holder: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;(x)**2&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Sadly no &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pow(x)&lt;/code&gt; function.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;  (2)**7
= 128
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;It works without parentheses also:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;  2**7
= 128
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The “Sheet” app works with the 2**7 but not 2^7 much like the “Calc” app.&lt;/p&gt;

&lt;p&gt;The functions work with a space after comma.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;  max(22,5)
= 22
  max(22, 5)
= 22
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;opl-programming&quot;&gt;OPL programming&lt;/h3&gt;

&lt;p&gt;Another great old WYSIWYG website: &lt;a href=&quot;https://stevelitchfield.com/progindex.htm&quot;&gt;Steve Litchfield - OPL programming&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Random interesting page about Python on Symbian: &lt;a href=&quot;https://stevelitchfield.com/pythonintro.htm&quot;&gt;Steve Litchfield - Introduction to Python on Nokia/Symbian Series 60&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://basic.hopto.org/basic/manual/PSION%203a%20programming%20Reference.pdf&quot;&gt;PSION Series 3a - PSION Programming Reference (Dave Stafford)&lt;/a&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;language-OPL&quot;&gt;PROC myprog:
	PRINT &quot;case insensitive&quot;
	print &quot;yes&quot;
	get
	print &quot;semi colon&quot;;
	print &quot;foo&quot;
	print &quot;bar&quot;
	get
ENDP
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Output&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;case insensitive
yes
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Key press&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;semi colonfoo
bar
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Key press terminates. Interesting how the semi colon behaves.&lt;/p&gt;

&lt;h4 id=&quot;maths&quot;&gt;Maths&lt;/h4&gt;

&lt;pre&gt;&lt;code class=&quot;language-OPL&quot;&gt;print max (1, 6)
print 2**7
get
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Output&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;6
128
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;a-list-of-more-repls&quot;&gt;A list of more REPLs&lt;/h2&gt;

&lt;p&gt;Only ones not mentioned on the first post.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://jsfiddle.net/&quot;&gt;https://jsfiddle.net/&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://dotnetfiddle.net/&quot;&gt;https://dotnetfiddle.net/&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.onlinegdb.com/&quot;&gt;https://www.onlinegdb.com/&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.mathcad.com/en&quot;&gt;https://www.mathcad.com/en&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.maplesoft.com/&quot;&gt;https://www.maplesoft.com/&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://en.smath.com/view/SMathStudio/summary&quot;&gt;https://en.smath.com/view/SMathStudio/summary&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://cocalc.com/&quot;&gt;https://cocalc.com/&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://labdeck.com/matdeck/&quot;&gt;https://labdeck.com/matdeck/&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://sqlfiddle.com/&quot;&gt;http://sqlfiddle.com/&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.db-fiddle.com/&quot;&gt;https://www.db-fiddle.com/&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.w3schools.com/js/js_editor.asp&quot;&gt;https://www.w3schools.com/js/js_editor.asp&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://try.dot.net/&quot;&gt;https://try.dot.net/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
        
        <pubDate>Thu, 03 Nov 2022 20:24:10 +0000</pubDate>
        <link>https://2e0pgs.github.io/blog/programming/2022/11/03/repl-maths-2/</link>
        <guid isPermaLink="true">https://2e0pgs.github.io/blog/programming/2022/11/03/repl-maths-2/</guid>
        
        <category>maths</category>
        
        
        <category>programming</category>
        
      </item>
    
      <item>
        <title>Arduino is C++</title>
        
          <description>&lt;h2 id=&quot;is-arduino-c&quot;&gt;Is Arduino C++?&lt;/h2&gt;

&lt;p&gt;A friend asked the following questions which provoked some thought:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&amp;gt; Is Arduino its own language?&lt;/li&gt;
  &lt;li&gt;&amp;gt; Is Arduino based on Processing, Java, C++ or C?&lt;/li&gt;
  &lt;li&gt;&amp;gt; Are Arduino sketches/programs classed as a firmware?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;tldr&quot;&gt;TLDR&lt;/h2&gt;

&lt;p&gt;More of a domain language.&lt;/p&gt;

&lt;p&gt;avr-gcc which includes avr-g++&lt;/p&gt;

&lt;p&gt;So Ardunio (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;arduino-1.8.8&lt;/code&gt;) is C++ 11 (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;-std=gnu++11&lt;/code&gt;) but without any standard libraries so it can have optimised versions that consume less memory and are safer from leaks.&lt;/p&gt;

&lt;p&gt;Yes an Arduino program/sketch would qualify as a firmware.&lt;/p&gt;

&lt;h2 id=&quot;c-ide&quot;&gt;C++ IDE&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://docs.platformio.org/en/latest/integration/ide/atom.html&quot;&gt;https://docs.platformio.org/en/latest/integration/ide/atom.html&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://platformio.org/install/ide?install=vscode&quot;&gt;https://platformio.org/install/ide?install=vscode&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=platformio.platformio-ide&quot;&gt;https://marketplace.visualstudio.com/items?itemName=platformio.platformio-ide&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;non-c-ide&quot;&gt;Non C++ IDE&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Arduino IDE 1.8.8&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=vsciot-vscode.vscode-arduino&quot;&gt;https://marketplace.visualstudio.com/items?itemName=vsciot-vscode.vscode-arduino&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Arduino IDE version 2.0.0-beta.3&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;arduino-is-cppino&quot;&gt;arduino-is-cpp.ino&lt;/h2&gt;

&lt;div class=&quot;language-cpp highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;setup&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;Serial&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;begin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;9600&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;while&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Serial&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){}&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;Serial&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;println&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;__cplusplus&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;loop&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;output&quot;&gt;Output&lt;/h3&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;201103
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;verbose-compiler-output&quot;&gt;Verbose compiler output&lt;/h2&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;/home/peter/downloads/arduino-1.8.8/arduino-builder -dump-prefs -logger=machine -hardware /home/peter/downloads/arduino-1.8.8/hardware -tools /home/peter/downloads/arduino-1.8.8/tools-builder -tools /home/peter/downloads/arduino-1.8.8/hardware/tools/avr -built-in-libraries /home/peter/downloads/arduino-1.8.8/libraries -libraries /home/peter/Arduino/libraries -fqbn=arduino:avr:uno -vid-pid=0X2341_0X0043 -ide-version=10808 -build-path /tmp/arduino_build_342783 -warnings=none -build-cache /tmp/arduino_cache_309119 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=/home/peter/downloads/arduino-1.8.8/hardware/tools/avr -prefs=runtime.tools.avr-gcc-5.4.0-atmel3.6.1-arduino2.path=/home/peter/downloads/arduino-1.8.8/hardware/tools/avr -prefs=runtime.tools.arduinoOTA.path=/home/peter/downloads/arduino-1.8.8/hardware/tools/avr -prefs=runtime.tools.arduinoOTA-1.2.1.path=/home/peter/downloads/arduino-1.8.8/hardware/tools/avr -prefs=runtime.tools.avrdude.path=/home/peter/downloads/arduino-1.8.8/hardware/tools/avr -prefs=runtime.tools.avrdude-6.3.0-arduino14.path=/home/peter/downloads/arduino-1.8.8/hardware/tools/avr -verbose /home/peter/downloads/sketch_may15a/sketch_may15a.ino
/home/peter/downloads/arduino-1.8.8/arduino-builder -compile -logger=machine -hardware /home/peter/downloads/arduino-1.8.8/hardware -tools /home/peter/downloads/arduino-1.8.8/tools-builder -tools /home/peter/downloads/arduino-1.8.8/hardware/tools/avr -built-in-libraries /home/peter/downloads/arduino-1.8.8/libraries -libraries /home/peter/Arduino/libraries -fqbn=arduino:avr:uno -vid-pid=0X2341_0X0043 -ide-version=10808 -build-path /tmp/arduino_build_342783 -warnings=none -build-cache /tmp/arduino_cache_309119 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=/home/peter/downloads/arduino-1.8.8/hardware/tools/avr -prefs=runtime.tools.avr-gcc-5.4.0-atmel3.6.1-arduino2.path=/home/peter/downloads/arduino-1.8.8/hardware/tools/avr -prefs=runtime.tools.arduinoOTA.path=/home/peter/downloads/arduino-1.8.8/hardware/tools/avr -prefs=runtime.tools.arduinoOTA-1.2.1.path=/home/peter/downloads/arduino-1.8.8/hardware/tools/avr -prefs=runtime.tools.avrdude.path=/home/peter/downloads/arduino-1.8.8/hardware/tools/avr -prefs=runtime.tools.avrdude-6.3.0-arduino14.path=/home/peter/downloads/arduino-1.8.8/hardware/tools/avr -verbose /home/peter/downloads/sketch_may15a/sketch_may15a.ino
Using board 'uno' from platform in folder: /home/peter/downloads/arduino-1.8.8/hardware/arduino/avr
Using core 'arduino' from platform in folder: /home/peter/downloads/arduino-1.8.8/hardware/arduino/avr
Detecting libraries used...
/home/peter/downloads/arduino-1.8.8/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10808 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/home/peter/downloads/arduino-1.8.8/hardware/arduino/avr/cores/arduino -I/home/peter/downloads/arduino-1.8.8/hardware/arduino/avr/variants/standard /tmp/arduino_build_342783/sketch/sketch_may15a.ino.cpp -o /dev/null
Generating function prototypes...
/home/peter/downloads/arduino-1.8.8/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10808 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/home/peter/downloads/arduino-1.8.8/hardware/arduino/avr/cores/arduino -I/home/peter/downloads/arduino-1.8.8/hardware/arduino/avr/variants/standard /tmp/arduino_build_342783/sketch/sketch_may15a.ino.cpp -o /tmp/arduino_build_342783/preproc/ctags_target_for_gcc_minus_e.cpp
/home/peter/downloads/arduino-1.8.8/tools-builder/ctags/5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives /tmp/arduino_build_342783/preproc/ctags_target_for_gcc_minus_e.cpp
Compiling sketch...
/home/peter/downloads/arduino-1.8.8/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10808 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/home/peter/downloads/arduino-1.8.8/hardware/arduino/avr/cores/arduino -I/home/peter/downloads/arduino-1.8.8/hardware/arduino/avr/variants/standard /tmp/arduino_build_342783/sketch/sketch_may15a.ino.cpp -o /tmp/arduino_build_342783/sketch/sketch_may15a.ino.cpp.o
Compiling libraries...
Compiling core...
Using precompiled core: /tmp/arduino_cache_309119/core/core_arduino_avr_uno_dbe74caced8262d937c72ad4123d41cb.a
Linking everything together...
/home/peter/downloads/arduino-1.8.8/hardware/tools/avr/bin/avr-gcc -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o /tmp/arduino_build_342783/sketch_may15a.ino.elf /tmp/arduino_build_342783/sketch/sketch_may15a.ino.cpp.o /tmp/arduino_build_342783/../arduino_cache_309119/core/core_arduino_avr_uno_dbe74caced8262d937c72ad4123d41cb.a -L/tmp/arduino_build_342783 -lm
/home/peter/downloads/arduino-1.8.8/hardware/tools/avr/bin/avr-objcopy -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 /tmp/arduino_build_342783/sketch_may15a.ino.elf /tmp/arduino_build_342783/sketch_may15a.ino.eep
/home/peter/downloads/arduino-1.8.8/hardware/tools/avr/bin/avr-objcopy -O ihex -R .eeprom /tmp/arduino_build_342783/sketch_may15a.ino.elf /tmp/arduino_build_342783/sketch_may15a.ino.hex
/home/peter/downloads/arduino-1.8.8/hardware/tools/avr/bin/avr-size -A /tmp/arduino_build_342783/sketch_may15a.ino.elf
Sketch uses 1634 bytes (5%) of program storage space. Maximum is 32256 bytes.
Global variables use 188 bytes (9%) of dynamic memory, leaving 1860 bytes for local variables. Maximum is 2048 bytes.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;research-links&quot;&gt;Research links&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://forum.arduino.cc/t/changing-finding-out-the-c-compiler-version/604413/2&quot;&gt;Arduino Forum - Changing/Finding Out The C++ Compiler Version&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Wiring_(development_platform)&quot;&gt;Wikipedia - Wiring (development platform)&lt;/a&gt;
    &lt;ul&gt;
      &lt;li&gt;More of a domain language.&lt;/li&gt;
      &lt;li&gt;&amp;gt; The Wiring IDE includes a C/C++ library called “Wiring”, which makes common input/output operations much easier. Wiring programs are written in C++.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Processing_(programming_language)&quot;&gt;Wikipedia - Processing (programming language)&lt;/a&gt;
    &lt;ul&gt;
      &lt;li&gt;&amp;gt; Processing has spawned another project, Wiring, which uses the Processing IDE with a collection of libraries written in the C++ language&lt;/li&gt;
      &lt;li&gt;This is where the confusion comes in around Java. However this is only relevant to the Processing language which isn’t what Arduino uses.
        &lt;ul&gt;
          &lt;li&gt;&amp;gt; Written in	Java, GLSL, JavaScript&lt;/li&gt;
          &lt;li&gt;&amp;gt; When programming in Processing, all additional classes defined will be treated as inner classes when the code is translated into pure Java before compiling.&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Arduino&quot;&gt;Wikipedia - Arduino&lt;/a&gt;
    &lt;ul&gt;
      &lt;li&gt;&amp;gt; The Arduino IDE supports the languages C and C++ using special rules of code structuring. The Arduino IDE supplies a software library from the Wiring project, which provides many common input and output procedures.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://stackoverflow.com/questions/18523577/how-to-program-an-arduino-with-c&quot;&gt;Stack Overflow - How to program an Arduino with C++&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/ladislas/Bare-Arduino-Project&quot;&gt;GitHub - ladislas/Bare-Arduino-Project&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://forum.arduino.cc/t/what-is-the-difference-between-std-string-and-string/641910&quot;&gt;Arduino Forum - What is the difference between std::string and String&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://stackoverflow.com/questions/10612385/strings-in-c-class-file-for-arduino-not-compiling&quot;&gt;Stack Overflow -Strings in C++ class file for Arduino not compiling&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://forum.arduino.cc/t/error-include-string-while-compileing/411001&quot;&gt;Arduino Forum - Error #include &amp;lt;string&amp;gt; while compileing&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
        
        <pubDate>Wed, 16 Mar 2022 21:17:19 +0000</pubDate>
        <link>https://2e0pgs.github.io/blog/programming/2022/03/16/arduino-is-cpp/</link>
        <guid isPermaLink="true">https://2e0pgs.github.io/blog/programming/2022/03/16/arduino-is-cpp/</guid>
        
        <category>Arduino</category>
        
        
        <category>programming</category>
        
      </item>
    
      <item>
        <title>.NET Conf focus on F# notes</title>
        
          <description>&lt;h1 id=&quot;net-conf-focus-on-f-notes&quot;&gt;.NET Conf: Focus on F# notes&lt;/h1&gt;

&lt;p&gt;Yes this has been sat in my drafts for far too long. I suspect since 2021-07-29&lt;/p&gt;

&lt;div align=&quot;center&quot;&gt;
	&lt;iframe width=&quot;419&quot; height=&quot;236&quot; src=&quot;https://www.youtube.com/embed/i3qEhwcG7ps&quot; title=&quot;YouTube video player&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;ul&gt;
  &lt;li&gt;JavaScript backend&lt;/li&gt;
  &lt;li&gt;Supports .NET libs&lt;/li&gt;
  &lt;li&gt;Supports LINQ&lt;/li&gt;
  &lt;li&gt;Has pipes, is this similar to what we have in bash and unix?&lt;/li&gt;
  &lt;li&gt;Prefers type inference.
    &lt;ul&gt;
      &lt;li&gt;Total opposite of C# which prefers explicit type definition to cut down on run time errors.&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=yScuF1UgGU0&quot;&gt;How to use python type hinting?&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=pMgmKJyWKn8&quot;&gt;Carl Meyer - Type-checked Python in the real world - PyCon 2018&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;Type&lt;/strong&gt;Script&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Looks like a scripting language.&lt;/li&gt;
  &lt;li&gt;F# interactive in VS Code.&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;let&lt;/code&gt; keyword much like TypeScript.&lt;/li&gt;
  &lt;li&gt;I wonder if it will replace TypeScript in some applications.&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://fsharpforfunandprofit.com/&quot;&gt;F# for Fun and Profit&lt;/a&gt;
    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;https://fsharpforfunandprofit.com/why-use-fsharp/&quot;&gt;Why use F#?&lt;/a&gt;
        &lt;ul&gt;
          &lt;li&gt;&amp;gt; F# is not cluttered up with coding “noise” such as curly brackets, semicolons and so on.
            &lt;ul&gt;
              &lt;li&gt;&lt;a href=&quot;https://fsharpforfunandprofit.com/posts/fvsc-sum-of-squares/&quot;&gt;https://fsharpforfunandprofit.com/posts/fvsc-sum-of-squares/&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;Reminds me of what I was saying here: &lt;a href=&quot;https://2e0pgs.github.io/blog/programming/2021/01/10/a-state-of-dotnet-in-late-2020/#c-9&quot;&gt;A state of .NET in late 2020 - C# 9&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;Perhaps C# 9 is actually getting lots of ideas from F# however I think there needs to be a clear line between them otherwise you muddy the two languages.&lt;/li&gt;
            &lt;/ul&gt;
          &lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://safe-stack.github.io/&quot;&gt;SAFE Stack&lt;/a&gt;
    &lt;ul&gt;
      &lt;li&gt;ASP.NET + F#&lt;/li&gt;
      &lt;li&gt;Fable compiles F# to JavaScript.&lt;/li&gt;
      &lt;li&gt;React for client.&lt;/li&gt;
      &lt;li&gt;Sharing custom types between server and client.&lt;/li&gt;
      &lt;li&gt;Sharing validation between server and client.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Alt + enter for dotnet fsi repl run current selection&lt;/li&gt;
  &lt;li&gt;Dotnet fsi… where is C# fsi? &lt;a href=&quot;https://github.com/dotnet/roslyn/issues/17666&quot;&gt;Integrate csi to dotnet cli #17666&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Haskell vs f#…&lt;/li&gt;
&lt;/ul&gt;
</description>
        
        <pubDate>Wed, 16 Mar 2022 20:14:19 +0000</pubDate>
        <link>https://2e0pgs.github.io/blog/programming/2022/03/16/dotnet-conf-focus-on-fsharp-notes/</link>
        <guid isPermaLink="true">https://2e0pgs.github.io/blog/programming/2022/03/16/dotnet-conf-focus-on-fsharp-notes/</guid>
        
        <category>C#</category>
        
        <category>ASP.NET</category>
        
        <category>.NET</category>
        
        
        <category>programming</category>
        
      </item>
    
      <item>
        <title>Visual safety development</title>
        
          <description>&lt;h1 id=&quot;visual-warnings-when-developing-on-multiple-environments&quot;&gt;Visual warnings when developing on multiple environments&lt;/h1&gt;

&lt;p&gt;It is common for a developer or sysadmin to have access to multiple environments or servers such as production (live) (server-1), test (staging) and perhaps localhost (server-2).&lt;/p&gt;

&lt;p&gt;The problem with this is that it’s easy to forget which environment you’re using.&lt;/p&gt;

&lt;p&gt;One solution would be to have a mental pre-check of “am I on server X… yes I am” before running any commands that perform changes (writes/updates). However this is bound to fail you one day.&lt;/p&gt;

&lt;p&gt;Another solution is making a visual clue appear which makes it clear consciously or subconsciously which server you’re using.&lt;/p&gt;

&lt;h2 id=&quot;sql-server-management-studio-ssms&quot;&gt;SQL Server Management Studio (SSMS)&lt;/h2&gt;

&lt;p&gt;Server 1 connection pane. In this example server-1 is our live production environment.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/2022-02-20/2022-02-10-17-21-42-server-1.png&quot; alt=&quot;server-1&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Server 1 connection options.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/2022-02-20/2022-02-10-17-22-12-server-1-settings.png&quot; alt=&quot;server-1-settings&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Server 2 connection pane. In this example server-2 is our localhost environment.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/2022-02-20/2022-02-10-17-22-53-server-2.png&quot; alt=&quot;server-2&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Server 2 connection options.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/2022-02-20/2022-02-10-17-23-08-server-2-settings.png&quot; alt=&quot;server-2-settings&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Here is the server list on the left. Top one is localhost (server-2) and bottom is live production (server-1).&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/2022-02-20/2022-02-10-17-24-39-1-server-list.png&quot; alt=&quot;server-list&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Running a SQL query against server-1 shows us the nice warning at the bottom.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/2022-02-20/2022-02-10-17-24-58-1-server-1-query-pane.png&quot; alt=&quot;server-1-query-pane&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Running a SQL query against server-2 shows us we’re safe.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/2022-02-20/2022-02-10-17-25-08-1-server-2-query-pane.png&quot; alt=&quot;server-2-query-pane&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;insomnia-rest&quot;&gt;Insomnia REST&lt;/h2&gt;

&lt;p&gt;I use Insomnia which is like Postman for my API testing. I have various environment variables such as URIs which get swapped out based on environment.&lt;/p&gt;

&lt;p&gt;Live environment shows red as a warning.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/2022-02-20/2022-02-10-17-44-36-insomnia-live.png&quot; alt=&quot;insomnia-live&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Staging environment shows orange as a warning.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/2022-02-20/2022-02-10-17-44-57-insomina-staging.png&quot; alt=&quot;insomnia-staging&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Localhost environment shows green as we’re safe.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/2022-02-20/2022-02-10-17-45-11-insomnia-local.png&quot; alt=&quot;insomnia-local&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;linux-ssh&quot;&gt;Linux SSH&lt;/h2&gt;

&lt;p&gt;From my &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.bashrc&lt;/code&gt; I deploy on remote servers and local machines.&lt;/p&gt;

&lt;div class=&quot;language-sh highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$color_prompt&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;yes&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;then
	if&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;!&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$SSH_CLIENT&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;then&lt;/span&gt;
		&lt;span class=&quot;c&quot;&gt;# If this is a ssh session then change our PS1 colour to let them know it's remote.&lt;/span&gt;
		&lt;span class=&quot;nv&quot;&gt;PS1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'${debian_chroot:+($debian_chroot)}\[\033[01;33m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '&lt;/span&gt;
	&lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;
		&lt;span class=&quot;c&quot;&gt;# If this isn't a ssh connection then use our normal colour PS1.&lt;/span&gt;
		&lt;span class=&quot;nv&quot;&gt;PS1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '&lt;/span&gt;
	&lt;span class=&quot;k&quot;&gt;fi
else
	&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;PS1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;fi&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Green for local.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/2022-02-20/2022-02-20-16-54-03-local-ssh.png&quot; alt=&quot;local-ssh&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Yellow for remote.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/2022-02-20/2022-02-20-16-54-43-remote-ssh.png&quot; alt=&quot;remote-ssh&quot; /&gt;&lt;/p&gt;
</description>
        
        <pubDate>Sun, 20 Feb 2022 16:16:19 +0000</pubDate>
        <link>https://2e0pgs.github.io/blog/programming/2022/02/20/visual-safety-development/</link>
        <guid isPermaLink="true">https://2e0pgs.github.io/blog/programming/2022/02/20/visual-safety-development/</guid>
        
        <category>API</category>
        
        <category>SQL</category>
        
        
        <category>programming</category>
        
      </item>
    
      <item>
        <title>Citroen Berlingo maintenance</title>
        
          <description>&lt;h1 id=&quot;citroen-berlingo-maintenance&quot;&gt;Citroen Berlingo maintenance&lt;/h1&gt;

&lt;h2 id=&quot;rear-load-space-light&quot;&gt;Rear load space light&lt;/h2&gt;

&lt;p&gt;I wanted to check how the extra LED lights were hooked in.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/2022-02-10/IMG_20211229_172723174.jpg&quot; alt=&quot;rear-load-space-light-1&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Looks like the previous owner tapped into the main lighting circuit which comes from the BSI unit (Body Control Unit).&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/2022-02-10/IMG_20211229_172744091.jpg&quot; alt=&quot;rear-load-space-light-2&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;auxiliary-belt&quot;&gt;Auxiliary belt&lt;/h2&gt;

&lt;p&gt;Checking auxiliary belt condition.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/2022-02-10/IMG_20220105_191423692.jpg&quot; alt=&quot;auxiliary-belt-1&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Can see the bar code so that’s a good sign.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/2022-02-10/IMG_20220105_191756584.jpg&quot; alt=&quot;auxiliary-belt-2&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;pollen-filter&quot;&gt;Pollen filter&lt;/h2&gt;

&lt;p&gt;It was a very finicky job to get the old pollen/cab filter out as it was stuck behind the plastic lip. You can see the amount of debris that came with it.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/2022-02-10/IMG_20220105_195258550.jpg&quot; alt=&quot;pollen-filter-1&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Old vs new filter. A massive difference.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/2022-02-10/IMG_20220105_195557025.jpg&quot; alt=&quot;pollen-filter-2&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I think I could grow a tree from that.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/2022-02-10/IMG_20220105_195551528.jpg&quot; alt=&quot;pollen-filter-3&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;battery&quot;&gt;Battery&lt;/h2&gt;

&lt;p&gt;The new Varta 12 v 60 Ah 540 CCA battery.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/2022-02-10/IMG_20220109_161930163.jpg&quot; alt=&quot;battery-new&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I cleaned the battery holder.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/2022-02-10/IMG_20220109_162023649.jpg&quot; alt=&quot;battery-holder&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Interestingly the positive lug has a quick connect/disconnect toolless fastener. Useful for long term storage of the vehicle. I cleaned off the old anti rust petroleum which appeared to be water logged.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/2022-02-10/IMG_20220109_162028631.jpg&quot; alt=&quot;battery-positive-lug&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Similar situation with the negative although slightly inaccessible.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/2022-02-10/IMG_20220109_162033064.jpg&quot; alt=&quot;battery-negative-lug&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Battery cover got a clean up too.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/2022-02-10/IMG_20220109_162038985.jpg&quot; alt=&quot;battery-cover&quot; /&gt;&lt;/p&gt;

&lt;p&gt;This is the old Varta. Interestingly I didn’t note the old battery brand before purchasing a replacement. Anyway it’s 12 v 640 CCA with 60 Ah.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/2022-02-10/IMG_20220109_162043856.jpg&quot; alt=&quot;battery-old&quot; /&gt;&lt;/p&gt;

&lt;p&gt;At first the distribution seemed like it would get in the way but actually it’s easily moved aside. Anyway overall it’s useful since you get a few high amperage fuses to tap off from. 30 A and some 50 A fuses come as spare.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/2022-02-10/IMG_20220109_163957880.jpg&quot; alt=&quot;battery-positive-distribution&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Adding the red cover keeps the water off.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/2022-02-10/IMG_20220109_164258795.jpg&quot; alt=&quot;battery-positive-distribution-cover&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The socket for the battery holder is a 10 mm. You will need a socket extension or two.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/2022-02-10/IMG_20220109_165441933.jpg&quot; alt=&quot;battery-tie-down-socket&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;rear-breaks&quot;&gt;Rear breaks&lt;/h2&gt;

&lt;p&gt;Socket size required for “wheel nuts” is 17 mm. I noted the actual bolts are the removable part, this is something other vehicles do backwards which makes it a pain when the nuts are stuck and the bolts need drilling.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/2022-02-10/IMG_20220123_130852855.jpg&quot; alt=&quot;wheel-nut-socket&quot; /&gt;&lt;/p&gt;

&lt;p&gt;An example of the tools required.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/2022-02-10/IMG_20220122_154819633_HDR.jpg&quot; alt=&quot;rear-break-tools&quot; /&gt;&lt;/p&gt;

&lt;p&gt;They actually thought about this. I like it. Nice tie point supplied for holding the calipers.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/2022-02-10/IMG_20220122_154858728.jpg&quot; alt=&quot;rear-break-caliper-tie&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Quite a big difference in old vs new pads.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/2022-02-10/IMG_20220122_162842048.jpg&quot; alt=&quot;rear-break-pad-comparison&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Driver side rear disc looks fine.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/2022-02-10/IMG_20220122_164947737.jpg&quot; alt=&quot;rear-break-disc-1&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Passenger side rear disc looks fine.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/2022-02-10/IMG_20220122_173951830.jpg&quot; alt=&quot;rear-break-disc-2&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;key-fob&quot;&gt;Key fob&lt;/h2&gt;

&lt;p&gt;I had to replace the battery in my key fob. Interesting antenna design on the PCB.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/2022-02-10/IMG_20220123_114513370.jpg&quot; alt=&quot;key-fob-pcb-1&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Looks like there is a separate RFID (passive) device on the board which handles immobiliser. It works regardless of the battery.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/2022-02-10/IMG_20220123_114544041.jpg&quot; alt=&quot;key-fob-pcb-2&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Previously I found wrong information when looking up the replacement battery type online. This is the actual battery I had.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/2022-02-10/IMG_20220123_115029750.jpg&quot; alt=&quot;key-fob-battery&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I needed to replace my fey fob outer plastic shell. The spring mechanism to flip open the key is rather tricky to replace. I suspect it wasn’t intended to be replaced since the new shell came with a new key blank. I wanted to swap in my existing key. Here I have laid out the exact orientation of how the parts nest.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/2022-02-10/IMG_20220123_185509626.jpg&quot; alt=&quot;key-fob-spring-1&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Notice the orientation of each part. They must nest a particular way. It feels like it could nest 2 ways but ultimately it only works in the correct orientation.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/2022-02-10/IMG_20220123_185518544.jpg&quot; alt=&quot;key-fob-spring-2&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Inserting the key.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/2022-02-10/IMG_20220123_185543053.jpg&quot; alt=&quot;key-fob-spring-3&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Inserting the coupler part.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/2022-02-10/IMG_20220123_185552864.jpg&quot; alt=&quot;key-fob-spring-4&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Here I am showing how the button fits onto that coupler, for reference purposes it is without the spring.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/2022-02-10/IMG_20220123_185602609.jpg&quot; alt=&quot;key-fob-spring-5&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Closer look at the orientations. What you would need to do is put the spring in then pretension it since there is a grove in the case and button that locks the spring in place at each end. You need to ensure the locking of the spring is so that it’s around 45 degrees forward from the position you need to insert the button. This means you rotate the button 45 degrees back roughly to tension that spring so it’s trying to rotate forward when it’s pushed down into position. Thus locking the assembly. When the button is later pressed the coupler moves allowing the button to rotate forward bringing the key with it until it’s at its un-tensioned position. You should only test that with the top cover on or while holding the button otherwise it could spring out into your face.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/2022-02-10/IMG_20220123_185616968.jpg&quot; alt=&quot;key-fob-spring-6&quot; /&gt;&lt;/p&gt;

&lt;p&gt;New finished shell top.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/2022-02-10/IMG_20220127_104536681.jpg&quot; alt=&quot;key-fob-spring-7&quot; /&gt;&lt;/p&gt;

&lt;p&gt;New shell bottom.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/2022-02-10/IMG_20220127_104544278.jpg&quot; alt=&quot;key-fob-spring-8&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Previous old shell with nasty buttons.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/2022-02-10/IMG_20220127_104607977.jpg&quot; alt=&quot;key-fob-spring-9&quot; /&gt;&lt;/p&gt;
</description>
        
        <pubDate>Thu, 10 Feb 2022 17:52:19 +0000</pubDate>
        <link>https://2e0pgs.github.io/blog/mechanical/2022/02/10/citroen-berlingo-maintenance/</link>
        <guid isPermaLink="true">https://2e0pgs.github.io/blog/mechanical/2022/02/10/citroen-berlingo-maintenance/</guid>
        
        
        <category>mechanical</category>
        
      </item>
    
      <item>
        <title>ISM GSM band mesh networking LoRa</title>
        
          <description>&lt;h1 id=&quot;bristol-lora-disasterradio&quot;&gt;Bristol LoRa disaster.radio&lt;/h1&gt;

&lt;p&gt;This post has been sat around in my drafts for a long time (since 2020-01-23) before I posted it and therefore may no longer be relevant.&lt;/p&gt;

&lt;p&gt;I thought I better get on and post this now as a flurry of videos about LoRa have surfaced again.&lt;/p&gt;

&lt;p&gt;I ordered two of these in the 868 MHz variant from AliExpress: &lt;a href=&quot;https://www.aliexpress.com/item/4000396836096.html&quot;&gt;LILYGO® TTGO Disaster-Radio LoRa32 V2.1 1.6 Version 433/868/915MHZ LoRa ESP-32 OLED 0.96 Inch SD Card Bluetooth WIFI Module&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;They come pre flashed with the disaster.radio firmware.&lt;/p&gt;

&lt;p&gt;Just did some range tests and had really impressive results of 700 m with one unit in hand on foot and the other on a shelf in the QTH second floor.&lt;/p&gt;

&lt;p&gt;I suggested some improvements to the project. Below is a couple of my suggestions/bug reports along with related links:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/sudomesh/disaster-radio/issues/38&quot;&gt;Routing table error after long uptime or 3+ nodes #38&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/sudomesh/disaster-radio-website/issues/4&quot;&gt;disaster-radio-website/issues/4&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/sudomesh/disaster-radio/issues/43&quot;&gt;868 Mhz setting for Europe #43&lt;/a&gt; Sam raised the ticket but this is something we discussed in the “Bristol LoRa” WhatsApp group.
    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;https://github.com/sudomesh/disaster-radio/commit/a94ca40b72bf207a8d4c7fca0d11128dada49459&quot;&gt;adds ability to configure lora frequency and spreading factor via con…&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;https://github.com/sudomesh/disaster-radio/commit/93aafa36f6aff5abe6fe12e06d3e831ce188059e&quot;&gt;add lora frequency as config option&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;https://github.com/sudomesh/LoRaLayer2/commit/8509821d2a04b5edccaaaab7a6ef3260aa7b2cba&quot;&gt;expose LoRaFrequency and spreadingFactor in public functions&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/sudomesh/disaster-radio/releases/tag/0.2.0&quot;&gt;releases/tag/0.2.0&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/sudomesh/disaster-radio/wiki/Protocol&quot;&gt;Useful docs on the protocol&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.link-labs.com/blog/what-is-lora&quot;&gt;What is lora?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;also-see&quot;&gt;Also see&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/espressif/esptool&quot;&gt;esptool for flashing the LoRa boards&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://2e0pgs.github.io/blog/programming/2021/03/07/arduino-package-management/&quot;&gt;My blog post on Arduino package management mentioning platformio&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.facebook.com/groups/1783722755224874&quot;&gt;Bristol HAMNET&lt;/a&gt; and &lt;a href=&quot;https://2e0pgs.github.io/ham-radio/hsmm-mesh.html&quot;&gt;2E0PGS - HSMM-MESH&lt;/a&gt; since we’re semi the same group.&lt;/li&gt;
&lt;/ul&gt;
</description>
        
        <pubDate>Sat, 27 Nov 2021 16:42:10 +0000</pubDate>
        <link>https://2e0pgs.github.io/blog/hamradio/2021/11/27/ism-gsm-band-mesh-networking-lora/</link>
        <guid isPermaLink="true">https://2e0pgs.github.io/blog/hamradio/2021/11/27/ism-gsm-band-mesh-networking-lora/</guid>
        
        <category>loRa</category>
        
        <category>Mesh</category>
        
        
        <category>hamradio</category>
        
      </item>
    
      <item>
        <title>DV4 CCTV file format conversion</title>
        
          <description>&lt;h1 id=&quot;how-i-processed-cctv-custom-dv4-file-format-into-mp4&quot;&gt;How I processed CCTV custom DV4 file format into MP4&lt;/h1&gt;

&lt;h2 id=&quot;exporting&quot;&gt;Exporting&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;I found my DVR required a FAT32 MBR formatted file system USB stick or USB HDD.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;part-files&quot;&gt;Part files&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;The files when exported from the CCTV will split at 2.1 GB into part files once the clip exceeds 2.1 GB in size.&lt;/li&gt;
  &lt;li&gt;You will need to reassemble them before making a MP4.&lt;/li&gt;
  &lt;li&gt;Turns out these can simply be concatenated together into one large blob: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cat filename*.dv4 &amp;gt; filename.cat.dv4&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;Real example: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cat CH04_2021JAN01000000_1.dv4 CH04_2021JAN01000000_1.part02.dv4 &amp;gt; CH04_2021JAN01000000_1.cat.dv4&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;&lt;em&gt;VLC didn’t work on raw DV4 files. mpv does and so does ffplay.&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;conversion&quot;&gt;Conversion&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;After reassembling the part files you need to then do a container copy: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ffmpeg -i filename.cat.dv4 -c:v copy -c:a copy -y filename.cat.dv4.mp4&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;Real example: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ffmpeg -i CH04_2021JAN01000000_1.cat.dv4 -c:v copy -c:a copy -y CH04_2021JAN01000000_1.cat.dv4.mp4&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;bulk-processsh&quot;&gt;bulk-process.sh&lt;/h2&gt;

&lt;p&gt;Below is just a script to bulk process the concatenated files in a batch as it’s rather time consuming if you have more than one camera channel or date range exported.&lt;/p&gt;

&lt;div class=&quot;language-sh highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;#!/bin/bash&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;for &lt;/span&gt;i &lt;span class=&quot;k&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;*&lt;/span&gt;.cat.dv4&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do
		&lt;/span&gt;ffmpeg &lt;span class=&quot;nt&quot;&gt;-i&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$i&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-c&lt;/span&gt;:v copy &lt;span class=&quot;nt&quot;&gt;-c&lt;/span&gt;:a copy &lt;span class=&quot;nt&quot;&gt;-y&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$i&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;.mp4
&lt;span class=&quot;k&quot;&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
</description>
        
        <pubDate>Thu, 09 Sep 2021 20:16:10 +0000</pubDate>
        <link>https://2e0pgs.github.io/blog/sysadmin/2021/09/09/dv4-cctv-file-format-conversion/</link>
        <guid isPermaLink="true">https://2e0pgs.github.io/blog/sysadmin/2021/09/09/dv4-cctv-file-format-conversion/</guid>
        
        <category>Linux</category>
        
        
        <category>sysadmin</category>
        
      </item>
    
      <item>
        <title>WRT54G NVRAM WiFi drop outs</title>
        
          <description>&lt;h1 id=&quot;flashing-wrt54g-with-openwrt-causes-wifi-drop-outs&quot;&gt;Flashing WRT54G with OpenWRT causes WiFi drop outs&lt;/h1&gt;

&lt;p&gt;When swapping between firmwares (stock Linksys, Tomato, DDWRT, OpenWRT) you may find the WiFi drops out.&lt;/p&gt;

&lt;p&gt;I thought it maybe a temperature issue or even hardware issue. I tried cooling fans and heat blown across the PCB and I tried various pressure across PCB in case there was a loose solder joint.&lt;/p&gt;

&lt;p&gt;If you experience this try doing a full wipe of the NVRAM as flashing firmware doesn’t fully clear down the NVRAM.&lt;/p&gt;

&lt;p&gt;You can try the 30/30/30 reset but that never got me anywhere. I had to use a software method.&lt;/p&gt;

&lt;p&gt;Look up firmware specific ways. Some use the GUI and some use the command line, see the below examples respectively:&lt;/p&gt;

&lt;p&gt;“Erase all data in NVRAM memory (thorough)”&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;erase nvram&lt;/code&gt;&lt;/p&gt;

&lt;h2 id=&quot;wrt-and-router-off-topic-notes&quot;&gt;WRT and router off topic notes&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;WRT54G still useful as a 10/100 Mbps router for NAT separation or translation.&lt;/li&gt;
  &lt;li&gt;BT routers don’t seem to have the ability to use the WAN port with a local subnet gateway so WRT based stuff is still a good tool in the network engineer/sysadmin toolbox.&lt;/li&gt;
  &lt;li&gt;Checkout the &lt;a href=&quot;https://www.amazon.co.uk/GL-iNet-GL-MT300N-V2-Converter-Pre-installed-Performance/dp/B073TSK26W/&quot;&gt;GL.iNet GL-MT300N-V2&lt;/a&gt; and various other GL.iNet products. They’re useful as a mini firewall, router, data diode or WiFi AP and supports/has pre-installed OpenWRT.&lt;/li&gt;
&lt;/ul&gt;
</description>
        
        <pubDate>Tue, 31 Aug 2021 17:00:19 +0000</pubDate>
        <link>https://2e0pgs.github.io/blog/sysadmin/2021/08/31/wrt54g-nvram-wifi-drop-outs/</link>
        <guid isPermaLink="true">https://2e0pgs.github.io/blog/sysadmin/2021/08/31/wrt54g-nvram-wifi-drop-outs/</guid>
        
        <category>OpenWRT</category>
        
        <category>WRT54G</category>
        
        <category>Linksys</category>
        
        
        <category>sysadmin</category>
        
      </item>
    
      <item>
        <title>Small van comparison</title>
        
          <description>&lt;h1 id=&quot;comparison-of-various-caddycombo-small-vans&quot;&gt;Comparison of various caddy/combo small vans&lt;/h1&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.autoexpress.co.uk/vauxhall/combo&quot;&gt;Vauxhall Combo&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.autoexpress.co.uk/volkswagen/caddy&quot;&gt;Volkswagen Caddy&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.autoexpress.co.uk/renault/kangoo/van&quot;&gt;Renault Kangoo&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.autoexpress.co.uk/peugeot/partner&quot;&gt;Peugeot Partner&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.autoexpress.co.uk/peugeot/bipper&quot;&gt;Peugeot Bipper&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.autoexpress.co.uk/citroen/berlingo-van&quot;&gt;Citroen Berlingo&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.autoexpress.co.uk/nissan/nv200&quot;&gt;Nissan NV200&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.autoexpress.co.uk/ford/transit-connect&quot;&gt;Ford Transit Connect&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.autoexpress.co.uk/ford/transit-courier&quot;&gt;Ford Transit Courier&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.autoexpress.co.uk/mercedes/citan&quot;&gt;Mercedes Citan&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.autoexpress.co.uk/fiat/doblo-cargo&quot;&gt;Fiat Doblo Cargo&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.autoexpress.co.uk/fiat/fiorino&quot;&gt;Fiat Fiorino&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.autoexpress.co.uk/toyota/proace-city/van&quot;&gt;Toyota Proace&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;sorted-ascending-order-load-area-length&quot;&gt;Sorted ascending order load area length&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Also highlighted for my goldilocks zone.&lt;/li&gt;
&lt;/ul&gt;

&lt;style type=&quot;text/css&quot;&gt;
.tg  {border-collapse:collapse;border-spacing:0;}
.tg td{border-color:black;border-style:solid;border-width:1px;font-family:Arial, sans-serif;font-size:14px;
  overflow:hidden;padding:10px 5px;word-break:normal;}
.tg th{border-color:black;border-style:solid;border-width:1px;font-family:Arial, sans-serif;font-size:14px;
  font-weight:normal;overflow:hidden;padding:10px 5px;word-break:normal;}
.tg .tg-uyi7{background-color:#963400;border-color:inherit;text-align:left;vertical-align:top}
.tg .tg-0pky{border-color:inherit;text-align:left;vertical-align:top}
&lt;/style&gt;

&lt;table class=&quot;tg&quot;&gt;
&lt;thead&gt;
  &lt;tr&gt;
    &lt;th class=&quot;tg-0pky&quot;&gt;Name&lt;/th&gt;
    &lt;th class=&quot;tg-0pky&quot;&gt;Body style&lt;/th&gt;
    &lt;th class=&quot;tg-0pky&quot;&gt;Height&lt;/th&gt;
    &lt;th class=&quot;tg-0pky&quot;&gt;Width&lt;/th&gt;
    &lt;th class=&quot;tg-0pky&quot;&gt;Length&lt;/th&gt;
    &lt;th class=&quot;tg-0pky&quot;&gt;Volume&lt;/th&gt;
  &lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
  &lt;tr&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;Fiat Fiorino&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;Combi van&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,205mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,473mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;740mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1.3m3&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;Ford Transit Connect&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;L1 Double Cab In-Van&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,237mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,533mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;861mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1.2m3&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;Fiat Doblo Cargo&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;Short low-roof Combi&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,250mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,261mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;950mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;0.79m3&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;Renault Kangoo&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;Maxi crew van&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,154mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,145mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,008mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1.3m3&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;Ford Transit Connect&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;L2 Double Cab In-Van&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,267mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,496mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,061mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1.6m3&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;Nissan NV200&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;Combi (five seat/seven seat)&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,358mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,500mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,160/510mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;2.3/0.9m3&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;Peugeot Bipper&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;Van&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,178mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,473mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,164mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;2.5m3&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;Fiat Doblo Cargo&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;Long low-roof Combi&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,250mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,261mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,300mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1.05m3&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;Fiat Doblo Cargo&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;XL long high-roof Combi&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,950mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,261mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,300mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1.1m3&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;Mercedes Citan&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;Dualiner&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,255mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,460mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,337mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;2.4/3.7m3&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;Mercedes Citan&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;Compact&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,258mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,460mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,369mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;2.4m3&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;Renault Kangoo&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;Standard van&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,251mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,219mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,476mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;4.0m3&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;Fiat Fiorino&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;Standard van&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,205mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,473mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,523mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;2.5m3&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;Mercedes Citan&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;Long&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,258mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,460mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,753mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;3.1m3&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;Volkswagen Caddy&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;Caddy&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,257 mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,556mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,779mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;3.2m3&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;Vauxhall Combo&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;L1 short wheelbase van&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,236mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,630mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,781mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;3.3m3&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;Ford Transit Connect&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;L1 Short wheelbase van&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,269mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,543mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,786mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;2.9m3&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;Peugeot Partner&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;Standard van&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,236mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,550mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,817mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;3.3m3&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;Citroen Berlingo&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;M standard van&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,236mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,550mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,817mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;3.3m3&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;Toyota Proace&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;L1&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,200mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,527mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,817mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;3.3m3&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;Fiat Doblo Cargo&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;Short low-roof van&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,305mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,714mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,820mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;3.4m3&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;Fiat Doblo Cargo&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;Long high-roof van&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,550mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,714mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,820mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;4.0m3&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;Renault Kangoo&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;Maxi van&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,252mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,219mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,862mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1.4m3&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;Nissan NV200&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;Van&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,358mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,500mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;2,040mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;4.2m3&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;Vauxhall Combo&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;L2 long wheelbase crew van&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,243mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,527mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;2,110mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;4.0m3&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;Vauxhall Combo&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;L2 long wheelbase van&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,243mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,630mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;2,131mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;3.9m3&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;Mercedes Citan&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;Extra Long&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,258mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,460mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;2,137mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;3.8m3&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;Ford Transit Connect&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;L2 Long wheelbase van&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,269mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,496mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;2,152mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;3.6m3&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;Peugeot Partner&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;Long van&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,243mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,550mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;2,167mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;3.8m3&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;Citroen Berlingo&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;XL long wheelbase van&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,243mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,550mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;2,167mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;3.8m3&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;Toyota Proace&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;L2&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,200mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,527mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;2,167mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;3.9m3&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;Fiat Doblo Cargo&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;Long low-roof van&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,305mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,714mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;2,170mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;4.2m3&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;Fiat Doblo Cargo&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;XL long high-roof van&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,550mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,714mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;2,170mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;5.0m3&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;Volkswagen Caddy&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;Caddy Maxi&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,262mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;1,556mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;2,249mm&lt;/td&gt;
    &lt;td class=&quot;tg-uyi7&quot;&gt;4.2m3&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;Fiat Doblo Cargo&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;Work-Up pick-up&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,368mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,818mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;2,300mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1.54m3&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;Vauxhall Combo&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;L1 with FlexCargo&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,236mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,630mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;3,090mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;3.8m3&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;Peugeot Partner&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;Standard with Extenso&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,236mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,550mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;3,090mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;3.9m3&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;Citroen Berlingo&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;M with Extenso&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,236mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,550mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;3,090mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;3.9m3&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;Peugeot Partner&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;Long with Extenso&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,243mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,550mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;3,440mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;4.4m3&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;Citroen Berlingo&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;XL with Extenso&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,243mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;1,550mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;3,440mm&lt;/td&gt;
    &lt;td class=&quot;tg-0pky&quot;&gt;4.4m3&lt;/td&gt;
  &lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;h2 id=&quot;size-of-items&quot;&gt;Size of items&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;So we know if the van can fit a UK single size mattress for camping:
    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;https://www.frenchbedroomcompany.co.uk/uk-mattress-sizes#:~:text=The%20UK%20Single%20measures%2090,plenty%20of%20floor%20space%20free!&quot;&gt;YOUR GUIDE TO UK MATTRESS SIZES&lt;/a&gt;
        &lt;ul&gt;
          &lt;li&gt;Single: 90 cm x 190 cm&lt;/li&gt;
          &lt;li&gt;In mm: 900 mm x 1900 mm&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;6 ft is 1828.8 mm&lt;/li&gt;
  &lt;li&gt;Medium size equipment rack is 1400 mm&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;things-of-note&quot;&gt;Things of note&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;A lot of the vans now have PSA engines, quotes from AutoExpress:
    &lt;ul&gt;
      &lt;li&gt;&amp;gt; Proace City model, which is another PSA joint-venture offering, this time a rebadged version of the Citroen Berlingo, Peugeot Partner and Vauxhall&lt;/li&gt;
      &lt;li&gt;&amp;gt; Development was led by the Citroen Berlingo and Peugeot Partner which arrived in 2018, with the Vauxhall Combo arriving in 2019 and the Toyota Proace City arriving in 2020. They all use the same running gear and are largely identical from the leading edge of the bonnet all the way to the back doors.&lt;/li&gt;
      &lt;li&gt;&amp;gt; The Fiat Doblo used to have a platform sharing partner in the shape of the Vauxhall Combo. But with that model now part of the PSA Group, the Doblo soldiers on alone.&lt;/li&gt;
      &lt;li&gt;&amp;gt; The Renault is a versatile urban delivery van that majors on being good to drive and delivering impressive fuel efficiency. It’s also great value for money, and shares much of its engineering with the Mercedes Citan
        &lt;ul&gt;
          &lt;li&gt;Citan and Kangoo share the same running rail?&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Observed vans with tailgate windows:
    &lt;ul&gt;
      &lt;li&gt;Volkswagen Caddy&lt;/li&gt;
      &lt;li&gt;Citroen Berlingo&lt;/li&gt;
      &lt;li&gt;Fiat Fiorino&lt;/li&gt;
      &lt;li&gt;&lt;em&gt;Mercedes Citan&lt;/em&gt;&lt;/li&gt;
      &lt;li&gt;Peugeot Bipper&lt;/li&gt;
      &lt;li&gt;Peugeot Partner&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Small vans like this are often called &lt;a href=&quot;https://en.wikipedia.org/wiki/Light_commercial_vehicle&quot;&gt;LCV&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Common rail fuel injection.
    &lt;ul&gt;
      &lt;li&gt;Volkswagen adopt common rail.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&amp;gt; One area where the Citan is a bit of a letdown is the quality of the materials on board. This isn’t like Merc’s cars with plush materials everywhere, instead the cabin has the look of the Kangoo&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;review-links&quot;&gt;Review links&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.admiral.com/magazine/guides/van/10-of-the-best-small-vans&quot;&gt;Admiral - 10 of the best small vans&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.whatcar.com/news/the-best-small-vans-2021/n20723&quot;&gt;whatcar - The best small vans 2021&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.buyacar.co.uk/vans/small-vans/519/the-best-small-vans-10-vans-that-prove-tiny-can-be-mighty&quot;&gt;buyacar - The best small vans: 10 vans that prove tiny can be mighty&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.autoexpress.co.uk/vans/98413/best-small-vans-on-sale&quot;&gt;Auto Express - Best small vans to buy 2021&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.parkers.co.uk/vans-pickups/best/small-vans/&quot;&gt;Parkers - Best small vans 2021&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.vansdirect.co.uk/5-best-small-vans-2021&quot;&gt;Vansdirect - The 5 best small vans to buy in 2021&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;mpg-links&quot;&gt;MPG links&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.autoexpress.co.uk/best-cars-vans/86968/most-economical-commercial-vehicles&quot;&gt;Auto Express - Most economical commercial vehicles&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.vanwisegroup.com/news/a-guide-to-fuel-economy-for-small-vans/&quot;&gt;Vanwise - A guide to fuel economy for small vans&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.vanarama.com/latest-news/top-5-small-vans-by-mpg.html&quot;&gt;vanarama - Top 5 Small Vans By MPG&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.parkers.co.uk/vans-pickups/best/2017/small-vans/&quot;&gt;Parkers - Most economical small vans&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;youtube-review-links&quot;&gt;YouTube review links&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://youtu.be/_XVbFznYQZY&quot;&gt;Detail Corps Media - The Best Budget Van Money Can Buy - Renault Kangoo Review&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://youtu.be/c8UWFR0CEcU&quot;&gt;Detail Corps Media - Is This Really the BEST Small Van? Transit Connect Vs Caddy&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://youtu.be/q6vv3dnKGmk&quot;&gt;Detail Corps Media - Transit vs Traffic vs Transporter? The Best Combi Van&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
        
        <pubDate>Tue, 31 Aug 2021 07:21:19 +0000</pubDate>
        <link>https://2e0pgs.github.io/blog/mechanical/2021/08/31/small-van-comparison/</link>
        <guid isPermaLink="true">https://2e0pgs.github.io/blog/mechanical/2021/08/31/small-van-comparison/</guid>
        
        
        <category>mechanical</category>
        
      </item>
    
      <item>
        <title>Portable data layer library</title>
        
          <description>&lt;h1 id=&quot;portable-data-layer-library&quot;&gt;Portable data layer library&lt;/h1&gt;

&lt;ol&gt;
  &lt;li&gt;Needs to work with dependency injection. E.g. Consumed in large MVC Web application.&lt;/li&gt;
  &lt;li&gt;Needs to work without dependency injection. E.g. Consumed in small console application.&lt;/li&gt;
  &lt;li&gt;Needs to use Dapper ORM. Lightweight, fast and simple.&lt;/li&gt;
  &lt;li&gt;Needs to be portable. We are building a .NET Standard library so why ruin the portability with specific references or tightly coupling to dependencies.&lt;/li&gt;
  &lt;li&gt;I want it to work with SqlConnection, SQLiteConnection and possibly other connectors. Therefore it should be not overly specific.&lt;/li&gt;
  &lt;li&gt;Should be &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;async&lt;/code&gt; but can also provided non &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;async&lt;/code&gt; methods.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;research-materials&quot;&gt;Research materials&lt;/h2&gt;

&lt;ol&gt;
  &lt;li&gt;My previous attempts at this.&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://blog.maskalik.com/asp-net/sqlite-simple-database-with-dapper/&quot;&gt;SQLite + Dapper = Simple Data Access Layer&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/mercury2269/SQLiteDemo/tree/master/SQLiteDemo&quot;&gt;SQLiteDemo&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.codewithmukesh.com/blog/dapper-in-aspnet-core/&quot;&gt;Dapper in ASP.NET Core with Repository Pattern – Detailed&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://codewithshadman.com/repository-pattern-csharp/&quot;&gt;Repository Pattern C#&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;research-analysed&quot;&gt;Research analysed&lt;/h2&gt;

&lt;p&gt;Numbered points correspond to “Research materials” respectively.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;When I first started using Dapper I created a simple repository design pattern lib. However it didn’t work well for dependency injection and had references to specific dependencies. I wanted to make this truly universal so I can apply it to future applications.&lt;/li&gt;
  &lt;li&gt;Doesn’t show namespaces or folder structure so lets look at the actual source. See point 3.&lt;/li&gt;
  &lt;li&gt;Has hard coded file paths. I like the use of a base repository and class inheritance. Has interfaces which is good for DI. Seems excessive to check SQLite file existence on every call. Make use of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;using&lt;/code&gt; which is good practice. Folder structure is slightly off.&lt;/li&gt;
  &lt;li&gt;Makes use of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;UnitOfWork&lt;/code&gt; pattern which is powerful but potentially overly abstracted. It depends on dependency injection and assumes configuration strings. It demos how to implement the DI which is nice.&lt;/li&gt;
  &lt;li&gt;Very much based around Entity Framework and other large framework design with requirement of DI. Does however give a nice example of using repository pattern from end to end.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;specific-issues&quot;&gt;Specific issues&lt;/h2&gt;

&lt;p&gt;There is some old code which has monolithic design and cross database talking. The new data layer library needs to be a bit flexible around this. So originally there was namespace separation with this hierarchy.&lt;/p&gt;

&lt;h3 id=&quot;namespaces&quot;&gt;Namespaces&lt;/h3&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;MyOrg.SpecialApp.Models.DbOne.CustomerModel.cs&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;MyOrg.SpecialApp.Repositories.DbOne.CustomerRepository.cs&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;MyOrg.SpecialApp.Models.DbTwo.UserModel.cs&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;However this makes referencing items messy and solution explorer navigation a mess of expanded folders. For example inside the repository &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;CustomerRepository&lt;/code&gt; you would have to reference &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Models.DbOne.CustomerModel&lt;/code&gt;. Why specify the context which should be default.&lt;/p&gt;

&lt;p&gt;Improved is&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;MyOrg.SpecialApp.DbOne.Models.CustomerModel.cs&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;MyOrg.SpecialApp.DbOne.Repositories.CustomerRepository.cs&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;MyOrg.SpecialApp.DbTwo.Models.UserModel.cs&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now inside the repository &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;CustomerRepository&lt;/code&gt; you can reference &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Models.CustomerModel&lt;/code&gt; and all the bits your likely to work on are under one folder too.&lt;/p&gt;

&lt;p&gt;I also found it useful to postfix &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Repository&lt;/code&gt; to the end of the repository classes so it’s immediately obvious they’re not a model. Then when intellisense suggests a variable you have a nice &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;await customerRepository.GetByIdAsync(1);&lt;/code&gt;&lt;/p&gt;

&lt;h2 id=&quot;design-notes&quot;&gt;Design notes&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;It’s all part of engineering.&lt;/li&gt;
  &lt;li&gt;It’s not uncommon to come up with solutions which work but can be improved upon with hindsight.&lt;/li&gt;
  &lt;li&gt;Another thing is business or project requirements change over years.&lt;/li&gt;
  &lt;li&gt;We could spend 4 weeks over engineering something simple then come to replace it in years to come or we can implement what looks good in 2 days and replace it if required.&lt;/li&gt;
  &lt;li&gt;It could also take many years to find a short coming with a particular design pattern.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;project-examples&quot;&gt;Project examples&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://bitbucket.org/2E0PGS/user-trak/src/master/UserTrak.Data/&quot;&gt;2E0PGS/user-trak/src/master/UserTrak.Data/&lt;/a&gt; (SQLite)&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://bitbucket.org/2E0PGS/always-watching-bot/src/master/AlwaysWatchingBot.Data/&quot;&gt;2E0PGS/always-watching-bot/src/master/AlwaysWatchingBot.Data&lt;/a&gt; (SQLite)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;project-example-with-interfaces-for-di-scenarios&quot;&gt;Project example with interfaces for DI scenarios&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;TODO: MVC or Web API project example.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;folder-structure-example-with-interfaces&quot;&gt;Folder structure example with interfaces&lt;/h3&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;|   AlwaysWatchingBot.Data.csproj                 
|                                                 
+---Interfaces                                    
|       IAttachmentRepository.cs                  
|       IMessageRepository.cs                     
|                                                 
+---Models                                        
|       AttachmentModel.cs                        
|       MessageModel.cs                           
|                                                 
\---Repositories                                  
        AttachmentRepository.cs                   
        BaseRepository.cs                         
        MessageRepository.cs.cs                   
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;ul&gt;
  &lt;li&gt;One repo per a table at the moment, you can use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;UnitOfWork&lt;/code&gt; pattern to combine that into one large object.&lt;/li&gt;
  &lt;li&gt;One base repo per a database, normally only one DB per a microservice but if you got monolithic or multiple DBs then you can seperate each DB using namespaces above the three main namespaces.&lt;/li&gt;
  &lt;li&gt;TODO: Show multi DB example.&lt;/li&gt;
  &lt;li&gt;TODO: Show example interface class for DI as I don’t have a public repo with one in.&lt;/li&gt;
  &lt;li&gt;TODO: Simple injector example?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;connection-string-setup-examples&quot;&gt;Connection string setup examples&lt;/h2&gt;

&lt;h2 id=&quot;aspnet-framework-example-with-sql-server-connector-startupcs&quot;&gt;ASP.NET Framework example with SQL Server connector (Startup.cs)&lt;/h2&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Data.Repositories.BaseRepository.ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings[&quot;MyMicroService&quot;].ConnectionString;&lt;/code&gt;&lt;/p&gt;

&lt;h2 id=&quot;aspnet-core-example-with-sql-server-connector-startupcs&quot;&gt;ASP.NET Core example with SQL Server connector (Startup.cs)&lt;/h2&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Data.Repositories.BaseRepository.ConnectionString = Configuration[&quot;ConnectionStrings:MyMicroService&quot;];&lt;/code&gt;&lt;/p&gt;

&lt;h2 id=&quot;net-core-console-example-with-sqlite-connector-programcs&quot;&gt;.NET Core Console example with SQLite connector (Program.cs)&lt;/h2&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Data.Repositories.BaseRepository.FilePath = _configuration[&quot;sqliteFilePath&quot;];&lt;/code&gt;&lt;/p&gt;

&lt;h2 id=&quot;di-examples&quot;&gt;DI examples&lt;/h2&gt;

&lt;h3 id=&quot;aspnet-core-example-startupcs&quot;&gt;ASP.NET Core example (Startup.cs)&lt;/h3&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;services.AddSingleton&amp;lt;ICustomerRepository, CustomerRepository&amp;gt;();&lt;/code&gt;&lt;/p&gt;

&lt;h3 id=&quot;aspnet-framework-example-unity-container-unityconfigcs&quot;&gt;ASP.NET Framework example (Unity Container) (UnityConfig.cs)&lt;/h3&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;container.RegisterType(typeof(ICustomerRepository), typeof(CustomerRepository));&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;or&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;container.RegisterType&amp;lt;Data.Interfaces.ICustomerRepository, Data.Repositories.CustomerRepository&amp;gt;();&lt;/code&gt;&lt;/p&gt;
</description>
        
        <pubDate>Wed, 11 Aug 2021 08:43:19 +0000</pubDate>
        <link>https://2e0pgs.github.io/blog/programming/2021/08/11/portable-data-layer-library/</link>
        <guid isPermaLink="true">https://2e0pgs.github.io/blog/programming/2021/08/11/portable-data-layer-library/</guid>
        
        <category>.NET Standard</category>
        
        <category>.NET</category>
        
        <category>ASP.NET</category>
        
        <category>C#</category>
        
        
        <category>programming</category>
        
      </item>
    
  </channel>
</rss>
