https://koldfront.dk/koldfront2024-03-19T12:16:04.818382427ZAdam Sjøgrenhttps://asjo.koldfront.dkasjo@koldfront.dkhttps://koldfront.dk/early_unix_rand_1868Early Unix rand()2024-03-12T20:15:33Z<p>I have mentioned The Unix Heritage Society mailing list before - <a href="https://koldfront.dk/search?q=tuhs">fun stuff</a> comes by on it from time to time.</p>
<p>Today <a href="https://en.wikipedia.org/wiki/Douglas_McIlroy">Douglas McIlroy</a> <a href="https://xref.olduse.net/news.gmane.io/gmane.org.unix-heritage.general/23001">replied to a thread</a> about the early Unix <code>rand()</code> routine and who had written a funny note in the documentation, recalling an early story of password breaking:</p>
<blockquote>
<p>When Ken pioneered password cracking by trying every word in word lists at hand, one of the password files he found plenty of hits in came from Berkeley. He told them and they responded by assigning random passwords to everybody. That was a memorable error. Guessing that the passwords were generated by a simple encoding of the output of rand, Ken promptly broke 100% of the newly "hardened" password file.</p>
</blockquote>
<p><a href="https://en.wikipedia.org/wiki/Ken_Thompson">Ken Thompson</a> <a href="https://xref.olduse.net/news.gmane.io/gmane.org.unix-heritage.general/23005">replied</a>:</p>
<blockquote>
<p>i wrote the generator.<br/>
dmr or rhm wrote the comment.</p>
</blockquote>
Adam Sjøgrenhttps://koldfront.dk/signatures_1866.signatures2024-02-24T16:07:29Z<p>A staple of usenet and email is the .signature. I just had a little peek at <a href="https://olduse.net/">a usenet archive</a> to find some of my old ones.</p>
<h3><a href="https://article.olduse.net/OD.6badnetOA92-910-101_CE51AA79%40piraya.bad.se">1992</a>:</h3>
<pre><code> .
-*-
Adam_Sjoegren@thesystem.bbs.bad.se \O_ BBS +45-31-354775
Copenhagen, Denmark | ANet betatester
GCChost support DK / \ FidoNet 2:230/149
</code></pre>
<p>GCChost was software for running a <a href="https://www.fidonet.org/">FidoNet</a> node - it was very configurable through <a href="https://wiki.amigaos.net/wiki/AmigaOS_Manual:_ARexx">ARexx</a>, and at some point I think I started handling licenses for Denmark (the author was in Italy).</p>
<p>ANet was BBS software from Sweden that I was running, it had a cool interface where navigation was done by typing "shortest command prefix", automatically figured out by the software.</p>
<p>My BBS was called "The system", with that capitalization, for some... uh... artistic or otherwise self-indulgent reason.</p>
<h3><a href="https://article.olduse.net/OD.6badnetOA92-910-0_C4A05E24%40piraya.bad.se">1993</a>:</h3>
<pre><code> Adam Sjoegren Interstellar Navigation DLG BB/OS 24h
Copenhagen, Denmark asj@inav.bbs.bad.se +45 31354775
EMS/GCCh support DK * Powered by AGA and 040 * 16.8k USR Dual
</code></pre>
<p>GCChost was replaced by EMS, by the same author, which was designed to handle other types of mail/news systems than FidoNet - we all had email and <a href="https://en.wikipedia.org/wiki/Usenet">usenet</a> envy in those days - so it was attractive.</p>
<p>By this time I had changed the name of my BBS to <a href="https://d-a-d.com/lyrics/album/no-fuel-left-for-the-pilgrims/">Interstellar Navigation</a>, and I had changed software to the Canadian developed <a href="http://www.bbsdocumentary.com/software/COMMODORE/AMIGA/DLG/">DLG</a>, and it was running on my <a href="https://en.wikipedia.org/wiki/Amiga_4000">Amiga 4000</a>, which I was very proud of. It was <em>very</em> expensive as well.</p>
<p>I kind of liked the little stick figure in the older .signature, and have taken to putting a variant in <a href="https://en.wikipedia.org/wiki/Message_of_the_day">motd</a> on my machines these days, eg:</p>
<pre><code>$ ssh virgil
Linux virgil 6.1.0-18-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.76-1 (2024-02-01) x86_64
_.
\O_. virgil: PC, Copenhagen
| AMD Ryzen 5 2400 GE (8 cores)
._/_\_, 64G memory, 1.9T disk
o o
Last login: Sat Feb 24 15:20:02 2024 from 192.168.1.102
</code></pre>
<p>Just for fun.</p>
Adam Sjøgrenhttps://koldfront.dk/dad_turns_40__exhibition_1865D-A-D turns 40 - exhibition2024-02-21T20:04:35Z<a href="https://www.dad.natmus.dk/"><img class="inline" src="1865/part/dad40-1.jpg" alt="Columns outside the Danish National Museum decorated with pictures of the band D-A-D"></a><a href="https://www.dad.natmus.dk/"><img class="inline" src="1865/part/dad40-2.jpg" alt="Columns outside the Danish National Museum decorated with pictures of the band D-A-D, other angle"></a><p>The <a href="https://natmus.dk/museer-og-slotte/nationalmuseet/">Danish National Museum</a> has started advertising <a href="https://www.dad.natmus.dk/">the upcoming exhibition</a> about Denmark during the last 40 years seen through <a href="https://d-a-d.com/">the band D-A-D</a>, which turns 40 the day the exhibit opens, March 3rd, 2024.</p>
<p>The weekend after the opening there is <a href="https://www.dad.natmus.dk/arrangementer">a series of talks</a> at the museum as well!</p>
Adam Sjøgrenhttps://koldfront.dk/i__free_software_1864I ❤️ Free Software2024-02-14T16:34:08Z<a href="https://ilovefs.org/"><img class="attachment" src="1864/part/i-love-free-software-sticker.png" alt="I Love Free Software sticker - Use Study Share Improve"></a><p><a href="https://www.gnu.org/software/emacs/">GNU Emacs</a>,
<a href="https://debian.org/">Debian GNU/Linux</a>,
<a href="https://kernel.org/">Linux</a>,
<a href="https://gnus.org/gnus/">Gnus</a>,
<a href="http://www.x.org/">X.Org</a>,
<a href="http://www.postfix.org/">Postfix</a>,
<a href="https://www.haskell.org/ghc/">GHC</a>,
<a href="https://postgresql.org/">PostgreSQL</a>,
<a href="http://www.openssh.com/">OpenSSH</a>,
<a href="https://www.mozilla.org/en-US/firefox/products/">Firefox</a>,
<a href="https://httpd.apache.org/">Apache</a>,
<a href="https://ejabberd.im/">ejabberd</a>,
<a href="http://dovecot.org/">Dovecot</a>,
<a href="https://git-scm.com/">git</a>,
<a href="https://gnupg.org/">GnuPG</a>,
<a href="http://xmonad.org/">XMonad</a>,
<a href="https://www.emacswiki.org/emacs/JabberEl">jabber.el</a>,
<a href="https://magit.vc/">Magit</a>,
<a href="http://www.nongnu.org/rdiff-backup/">rdiff-backup</a>,
<a href="https://www.latex-project.org/">LaTeX</a>,
<a href="https://www.gimp.org/">Gimp</a>,
<a href="https://www.videolan.org/vlc/index.html">VLC</a>,
<a href="https://syncthing.net/">Syncthing</a>,
<a href="https://launchpad.net/sakura">Sakura</a>,
<a href="https://chrony.tuxfamily.org/">chrony</a>,
<a href="https://www.fail2ban.org/">Fail2ban</a>,
<a href="https://weewx.com/">WeeWX</a>,
<a href="https://dejavu-fonts.github.io/">DejaVu fonts</a>,
<a href="https://github.com/BurntSushi/ripgrep">ripgrep</a>,
<a href="https://www.lirc.org/">lirc</a>,
<a href="https://www.musicpd.org/">MPD</a>
<a href="https://flameshot.org/">Flameshot</a>,
<a href="https://www.gnu.org/software/">lots of GNU</a>,
the list goes on and on - thanks everybody!</p>
Adam Sjøgrenhttps://koldfront.dk/fallen_leaves_2023_1863Fallen Leaves (2023)2024-01-28T11:38:45Z<a href="https://www.rottentomatoes.com/m/fallen_leaves"><img class="inline" src="1863/part/kuolleet-lehdet.jpg" alt="Cinema poster for Koulleet Lehdet (Fallen Leaves) by Aki Kaurismäki, showing the to main characters sitting in a cinema"></a><p>Caught the early Sunday screening of Kuolleet Lehdet (Fallen Leaves) by Aki Kaurismäki today.</p>
<p>The movie is good - good is the movie.</p>
<p>Well worth going to the cinema for.</p>
Adam Sjøgrenhttps://koldfront.dk/improvements_in_htmlcss_1862Improvements in HTML/CSS2024-01-17T19:14:07Z<p>I kind of stopped following the HTML and CSS standards quite a while
back. Sort of when XHTML and CSS2 were the newest stuff.</p>
<p>Recently I learned about CSS grids, which seemed nice, although I
haven't used that on a public site yet.</p>
<p>I stumbled over the blog-post "<a href="https://cliffle.com/blog/making-website-faster/">Making my website
faster</a>" a couple of
days ago, and it had some stuff I want to remember without having to
read the entire thing again, so I'm just going to list them here:</p>
<pre><code> <link rel="preload" as="ROLE" crossorigin href="URL">
</code></pre>
<p>in <code><head></code> before anything else, eg for fonts; URL must match the
entry in the CSS file <em>exactly</em>.</p>
<p>Lazy loading images using <code>loading="lazy"</code>, and <code><details></code>:</p>
<pre><code> <details>
<summary>This is a big GIF, you have been warned!</summary>
<img src="big-gif.gif" loading="lazy" alt="You're not missing much, really">
</details>
</code></pre>
Adam Sjøgrenhttps://koldfront.dk/bubble_sort_recursive_in_haskell_1861Bubble sort, recursive, in Haskell2024-01-14T19:57:03Z<p>I asked an LLM to spit out an implementation of recursive bubble sort
and it kept regurgitating code that didn't work.</p>
<p>That made me want to write a recursive bubble sort in
<a href="https://www.haskell.org/">Haskell</a>. It took me a, to be honest
slighly embarrassing long, while to come up with a way to write it, so
I'm putting it here:</p>
<pre><code>bubbleSort :: [Int] -> [Int]
bubbleSort (x:xs) | bubble (x:xs) == (x:xs) = x:xs
| otherwise = bubbleSort (bubble (x:xs))
bubble :: [Int] -> [Int]
bubble (x:xs) | null xs = [x]
| x <= head xs = x : bubble xs
| otherwise = head xs : bubble (x : tail xs)
</code></pre>
<p>The first function is the ending condition: if bubbling doesn't change
the list, we are done. Otherwise, bubble the list and test again.</p>
<p>Bubbling is simple as well, if the first element is smaller than or
equal to the second element, keep the first element and bubble the
rest of the list.</p>
<p>On the other hand, if the first element is larger than the second, the
resulting list is the second element followed by bubbling the first
element and the rest of the list.</p>
<p>Here is a Haskell snippet to try it out:</p>
<pre><code>main :: IO ()
main = print (bubbleSort [5, 4, 8, 1, 3, 2, 9, 7])
</code></pre>
Adam Sjøgren