<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://max.irro.at/rss.xsl"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Maximilian Irro</title>
    <link>https://max.irro.at/tags/stack-based-programming.html</link><description>Recent content on <a href="https://max.irro.at/">max.irro.at/</a></description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Tue, 13 Jan 2015 00:00:00 +0000</lastBuildDate><atom:link href="https://max.irro.at/tags/stack-based-programming/rss.xml" rel="self" type="application/rss+xml" /><item>
      <title>ERMMA-Studie 2018 – Deutschland: Messung und Analyse der ERM-Reifegrade von deutschen Unternehmen</title>
      <link>https://max.irro.at/pub/reports/ermma-studie-2018.html</link>
      <pubDate>Sat, 15 Dec 2018 00:00:00 +0000</pubDate>
      
      <guid>https://max.irro.at/pub/reports/ermma-studie-2018.html</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Walter S.A. Schwaiger, Michael Brandsträtter, Theresa Fröschl, Maximilian Irro  :
&amp;ldquo;ERMMA-Studie 2018 – Deutschland: Messung und Analyse der ERM-Reifegrade von deutschen Unternehmen&amp;rdquo;;
Bericht für Funk Stiftung Hamburg; 2018&lt;/p&gt;
&lt;/blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Paper: [&lt;a href=&#34;http://publik.tuwien.ac.at/files/publik_262862.pdf&#34;&gt;pdf&lt;/a&gt;]&lt;/li&gt;
&lt;li&gt;BibTeX: [&lt;a href=&#34;../../pub/reports/ermma-studie-2018.bib&#34;&gt;bib&lt;/a&gt;]&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;abstract&#34;&gt;Abstract&lt;/h2&gt;
&lt;p&gt;Unternehmensweites Risikomanagement (Enterprise Risk Management: ERM) ist ein komplexes und schwierig messbares Konstrukt. Die vorliegende Studie wurde von der Funk Stiftung gefördert und in Kooperation mit der Risk Management Association (RMA e.V.) konzipiert. Zur Messung (Assessment) des ERM-Reifegrads (ERM-Maturity level Assessment: ERMMA) wurde das ERMMA-Reifegradmodell nach facheinschlägigen ERM-Standards und ERM-Frameworks erstellt und mit Hilfe eines intelligenten Online-Fragebogens softwaremäßig implementiert. Mit dem ERMMA-Online-Tool werden die Reifegrade von deutschen Unternehmen gemessen und sodann statistisch ausgewertet. Das ERMMA-Tool ist so gestaltet, dass damit nicht nur die aktuellen Reifegrade, sondern auch deren zeitlichen Entwicklungen messbar sind.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Keywords&lt;/strong&gt;: Enterprise Risk Management (ERM), Maturity Assessment (MA), ERMMA-Reifegradmodell, -Klassifikationsschema und -Scoring, 3-Lines Of De-fense-Modell (3LoD-Modell), COSO ERM-Framework, ISO-RM-Standard&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#d8dee9;background-color:#2e3440;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bibtex&#34; data-lang=&#34;bibtex&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8fbcbb&#34;&gt;@techreport&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;{&lt;/span&gt;&lt;span style=&#34;color:#8fbcbb&#34;&gt;ErmmaStudie2018&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#8fbcbb&#34;&gt;author&lt;/span&gt;  &lt;span style=&#34;color:#eceff4&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a3be8c&#34;&gt;{Walter S.A. Schwaiger and 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a3be8c&#34;&gt;             Michael Brandst{\&amp;#34;a}tter and 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a3be8c&#34;&gt;             Theresa Fr{\&amp;#34;o}schl and 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a3be8c&#34;&gt;             Maximilian Irro}&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#8fbcbb&#34;&gt;title&lt;/span&gt;   &lt;span style=&#34;color:#eceff4&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a3be8c&#34;&gt;{{ERMMA-Studie 2018 - Deutschland: Messung und Analyse der ERM-Reifegrade von österreichischen Unternehmen}}&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#8fbcbb&#34;&gt;institution&lt;/span&gt; &lt;span style=&#34;color:#eceff4&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a3be8c&#34;&gt;{E330 - Institut f{\&amp;#34;u}r Managementwissenschaften; Technische Universit{\&amp;#34;a}t Wien}&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#8fbcbb&#34;&gt;year&lt;/span&gt;    &lt;span style=&#34;color:#eceff4&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a3be8c&#34;&gt;{2018}&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#8fbcbb&#34;&gt;url&lt;/span&gt;     &lt;span style=&#34;color:#eceff4&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a3be8c&#34;&gt;{http://publik.tuwien.ac.at/files/publik_262862.pdf}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item><item>
      <title>Hemin</title>
      <link>https://max.irro.at/projects/hemin.html</link>
      <pubDate>Fri, 30 Nov 2018 00:00:00 +0000</pubDate>
      
      <guid>https://max.irro.at/projects/hemin.html</guid>
      <description>&lt;ul&gt;
&lt;li&gt;WebApp: &lt;a href=&#34;https://hemin.io&#34;&gt;hemin.io&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Source: &lt;a href=&#34;https://github.com/mpgirro/hemin&#34;&gt;github&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Hemin is a podcast catalog &amp;amp; search engine infrastructure. It&amp;rsquo;s engine is written in &lt;a href=&#34;https://www.scala-lang.org&#34;&gt;Scala&lt;/a&gt;, uses &lt;a href=&#34;https://www.mongodb.com&#34;&gt;MongoDB&lt;/a&gt; to store the podcast/episode/feed catalog, and indexes the data with &lt;a href=&#34;http://lucene.apache.org/solr/&#34;&gt;Solr&lt;/a&gt;. The REST API relies on the &lt;a href=&#34;https://www.playframework.com&#34;&gt;Play&lt;/a&gt; framework for routing and JSON. The server is fully asynchronous, and makes heavy use of &lt;a href=&#34;https://akka.io&#34;&gt;Akka&lt;/a&gt; actors and &lt;a href=&#34;https://docs.scala-lang.org/overviews/core/futures.html&#34;&gt;Scala Futures&lt;/a&gt;. The current web client is written in &lt;del&gt;&lt;a href=&#34;https://www.typescriptlang.org&#34;&gt;Typescript&lt;/a&gt; and builds on the &lt;a href=&#34;https://angular.io&#34;&gt;Angular&lt;/a&gt; framework&lt;/del&gt; &lt;a href=&#34;https://elm-lang.org&#34;&gt;Elm&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;-early-development-status-warning&#34;&gt;⚠️ Early development status warning&lt;/h2&gt;
&lt;p&gt;The Hemin infrastructure is still in the early development phase and not yet ready for full productive use.&lt;/p&gt;
&lt;p&gt;The system currently supports the following standards:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Syndication feeds in &lt;a href=&#34;https://cyber.harvard.edu/rss/rss.html&#34;&gt;RSS 2.0&lt;/a&gt; or Atom (&lt;a href=&#34;https://tools.ietf.org/html/rfc4287&#34;&gt;RFC 4287&lt;/a&gt;) format&lt;/li&gt;
&lt;li&gt;Metadata from Apple&amp;rsquo;s &lt;a href=&#34;https://help.apple.com/itc/podcasts_connect/#/itcb54353390&#34;&gt;Podcasts Connect&lt;/a&gt; XML namespace (&amp;ldquo;iTunes tags&amp;rdquo;)&lt;/li&gt;
&lt;li&gt;Chapter marks in &lt;a href=&#34;https://podlove.org/simple-chapters/&#34;&gt;Podlove Simple Chapter&lt;/a&gt; format&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Support for the following standards is planned:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Paged Feeds (&lt;a href=&#34;https://tools.ietf.org/html/rfc5005&#34;&gt;RFC 5005&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Adhere to &lt;a href=&#34;https://jsonapi.org&#34;&gt;JSON:API&lt;/a&gt; standards&lt;/li&gt;
&lt;li&gt;Add feeds by importing &lt;a href=&#34;http://dev.opml.org&#34;&gt;OPML&lt;/a&gt; files&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item><item>
      <title>ERMMA-Studie 2017 - Österreich: Messung und Analyse der ERM-Reifegrade von österreichischen Unternehmen</title>
      <link>https://max.irro.at/pub/reports/ermma-studie-2017.html</link>
      <pubDate>Wed, 15 Nov 2017 00:00:00 +0000</pubDate>
      
      <guid>https://max.irro.at/pub/reports/ermma-studie-2017.html</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;W.S.A. Schwaiger, M. Irro, T. Fröschl, M. Brandstätter, D. Raffaele:
&amp;ldquo;ERMMA-Studie 2017 - Österreich: Messung und Analyse der ERM-Reifegrade von österreichischen Unternehmen&amp;rdquo;;
Bericht für Governance, Risk &amp;amp; Compliance ERFA; 2017&lt;/p&gt;
&lt;/blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Paper: [&lt;a href=&#34;http://publik.tuwien.ac.at/files/publik_262862.pdf&#34;&gt;pdf&lt;/a&gt;]&lt;/li&gt;
&lt;li&gt;BibTeX: [&lt;a href=&#34;../../pub/reports/ermma-studie-2017.bib&#34;&gt;bib&lt;/a&gt;]&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;abstract&#34;&gt;Abstract&lt;/h2&gt;
&lt;p&gt;Unternehmensweites Risikomanagement (Enterprise Risk Management: ERM) ist ein komplexes und schwierig messbares Konstrukt. In der vorliegenden Studie, welche von der Funk Stiftung gefördert wurde, wird zur Messung (Assessment) des ERM-Reifegrads (ERM-Maturity level Assessment: ERMMA) das ERMMA-Reifegradmodell nach facheinschlägigen ERM-Standards und ERM-Frameworks konzipiert und mit Hilfe eines intelligenten Online-Fragebogens softwaremäßig implementiert. Mit dem ERMMA-Online-Fragebogen werden die Reifegrade von österreichischen Unternehmen gemessen und sodann statistisch ausgewertet. Der ERMMA-Fragebogen ist so konzipiert, dass damit nicht nur die aktuellen Reifegrade, sondern auch deren zeitlichen Entwicklungen messbar sind.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Keywords&lt;/strong&gt;: Enterprise Risk Management (ERM), Maturity Assessment (MA), ERMMA-Reifegradmodell, -Klassifikationsschema und -Scoring, 3-Lines Of Defense-Modell (3LoD-Modell), COSO ERM-Framework, ISO-RM-Standard&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#d8dee9;background-color:#2e3440;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bibtex&#34; data-lang=&#34;bibtex&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8fbcbb&#34;&gt;@techreport&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;{&lt;/span&gt;&lt;span style=&#34;color:#8fbcbb&#34;&gt;ErmmaStudie2017&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#8fbcbb&#34;&gt;author&lt;/span&gt;  &lt;span style=&#34;color:#eceff4&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a3be8c&#34;&gt;{Walter S.A. Schwaiger and 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a3be8c&#34;&gt;             Maximilian Irro and 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a3be8c&#34;&gt;             Theresa Fr{\&amp;#34;o}schl and 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a3be8c&#34;&gt;             Michael Brandst{\&amp;#34;a}tter and 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a3be8c&#34;&gt;             Davide Raffaele}&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#8fbcbb&#34;&gt;title&lt;/span&gt;   &lt;span style=&#34;color:#eceff4&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a3be8c&#34;&gt;{ERMMA-Studie 2017 - {\&amp;#34;O}sterreich: Messung und Analyse der ERM-Reifegrade von {\&amp;#34;o}sterreichischen Unternehmen}&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#8fbcbb&#34;&gt;institution&lt;/span&gt; &lt;span style=&#34;color:#eceff4&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a3be8c&#34;&gt;{E330 - Institut f{\&amp;#34;u}r Managementwissenschaften; Technische Universit{\&amp;#34;a}t Wien}&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#8fbcbb&#34;&gt;year&lt;/span&gt;    &lt;span style=&#34;color:#eceff4&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a3be8c&#34;&gt;{2017}&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#8fbcbb&#34;&gt;url&lt;/span&gt;     &lt;span style=&#34;color:#eceff4&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a3be8c&#34;&gt;{http://publik.tuwien.ac.at/files/publik_262862.pdf}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item><item>
      <title>Flatten directory structure on *nix</title>
      <link>https://max.irro.at/posts/unix-flatten-directory-structure.html</link>
      <pubDate>Tue, 16 Feb 2016 00:00:00 +0000</pubDate>
      
      <guid>https://max.irro.at/posts/unix-flatten-directory-structure.html</guid>
      <description>&lt;p&gt;Given this example directory structure:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#d8dee9;background-color:#2e3440;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;rootDir/
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── dir1
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── file1.markdown
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   └── file2.txt
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── dir2
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   └── file3.html
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;└── dir3
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    ├── file4.mp3
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    └── file5.c
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;it is quite easy to flatten &lt;code&gt;rootDir&lt;/code&gt;, so that it contains all the files
from the child directories &lt;code&gt;dir1&lt;/code&gt;, &lt;code&gt;dir2&lt;/code&gt; and &lt;code&gt;dir3&lt;/code&gt; by moving them via
a single command liner using &lt;a href=&#34;http://en.wikipedia.org/wiki/Find&#34;&gt;find&lt;/a&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#d8dee9;background-color:#2e3440;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;find rootDir/ -mindepth &lt;span style=&#34;color:#b48ead&#34;&gt;2&lt;/span&gt; -type f -exec mv -i &lt;span style=&#34;color:#a3be8c&#34;&gt;&amp;#39;{}&amp;#39;&lt;/span&gt; rootDir/ &lt;span style=&#34;color:#a3be8c&#34;&gt;&amp;#39;;&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The &lt;code&gt;-i&lt;/code&gt; option for &lt;code&gt;mv&lt;/code&gt; will prompt before overwriting a file when a
file name collision occurs. There is an additional tweak for this, e.g.
if every subdirectory contains a &lt;code&gt;README.md&lt;/code&gt; file which should be
ignored. The &lt;code&gt;-type&lt;/code&gt; option of &lt;code&gt;find&lt;/code&gt; can be:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#d8dee9;background-color:#2e3440;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;-type f &lt;span style=&#34;color:#ebcb8b&#34;&gt;\(&lt;/span&gt; ! -iname &lt;span style=&#34;color:#a3be8c&#34;&gt;&amp;#34;README.md&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#ebcb8b&#34;&gt;\)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;So to flatten the directory structure, but leaving the &lt;code&gt;*.txt&lt;/code&gt; files
untouched is accomplished with:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#d8dee9;background-color:#2e3440;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;find rootDir/ -mindepth &lt;span style=&#34;color:#b48ead&#34;&gt;2&lt;/span&gt; -type f &lt;span style=&#34;color:#ebcb8b&#34;&gt;\(&lt;/span&gt; ! -iname &lt;span style=&#34;color:#a3be8c&#34;&gt;&amp;#34;*.txt&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#ebcb8b&#34;&gt;\)&lt;/span&gt; -exec mv -i &lt;span style=&#34;color:#a3be8c&#34;&gt;&amp;#39;{}&amp;#39;&lt;/span&gt; rootDir/ &lt;span style=&#34;color:#a3be8c&#34;&gt;&amp;#39;;&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To match all &lt;code&gt;.txt&lt;/code&gt; files, but not &lt;code&gt;README.txt&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#d8dee9;background-color:#2e3440;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;-type f &lt;span style=&#34;color:#ebcb8b&#34;&gt;\(&lt;/span&gt; -iname &lt;span style=&#34;color:#a3be8c&#34;&gt;&amp;#34;*.txt&amp;#34;&lt;/span&gt; ! -iname &lt;span style=&#34;color:#a3be8c&#34;&gt;&amp;#34;README.txt&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#ebcb8b&#34;&gt;\)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The &lt;code&gt;find&lt;/code&gt; command line program should be available on most unix-like
operating systems, but they do not all support all options and can
handle regex matching differently (so I read at least).&lt;/p&gt;
</description>
    </item><item>
      <title>LNCS-markdown</title>
      <link>https://max.irro.at/projects/lncs-markdown.html</link>
      <pubDate>Sun, 24 May 2015 00:00:00 +0000</pubDate>
      
      <guid>https://max.irro.at/projects/lncs-markdown.html</guid>
      <description>&lt;p&gt;[&lt;a href=&#34;https://github.com/mpgirro/LNCS-markdown&#34;&gt;github&lt;/a&gt;]&lt;/p&gt;
&lt;p&gt;This are &lt;a href=&#34;lncs-template.tex&#34;&gt;TeX&lt;/a&gt; and &lt;a href=&#34;lncs-template.html&#34;&gt;HTML&lt;/a&gt; templates as well as a &lt;a href=&#34;lncs.css&#34;&gt;CSS&lt;/a&gt; to render &lt;a href=&#34;https://www.springer.com/computer/lncs?SGWID=0-164-6-793341-0&#34;&gt;LNCS&lt;/a&gt; styled papers to PDF and HTML written in &lt;a href=&#34;http://daringfireball.net/projects/markdown/&#34;&gt;Markdown&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Currently only one author is supported.&lt;/p&gt;
&lt;h2 id=&#34;format&#34;&gt;Format&lt;/h2&gt;
&lt;p&gt;The papers source markdown file has to have a front-matter with this layout:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#d8dee9;background-color:#2e3440;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8fbcbb&#34;&gt;---&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1&#34;&gt;title&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#a3be8c&#34;&gt;&amp;#34;My Title&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1&#34;&gt;subtitle&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#a3be8c&#34;&gt;&amp;#34;My Subtitle&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1&#34;&gt;author&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;:&lt;/span&gt; Maximilian Irro
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1&#34;&gt;email&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;:&lt;/span&gt; optional@email.com
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1&#34;&gt;institute&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;:&lt;/span&gt; My optional Institute
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1&#34;&gt;university&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;:&lt;/span&gt; My optional University
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1&#34;&gt;keywords&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#a3be8c&#34;&gt;&amp;#34;Lorem, ipsum&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1&#34;&gt;abstract&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#a3be8c&#34;&gt;&amp;#34;Lorem ipsum&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1&#34;&gt;bibliography&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;:&lt;/span&gt; references.bib
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1&#34;&gt;csl&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;:&lt;/span&gt; lncs.csl
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1&#34;&gt;output&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#81a1c1&#34;&gt;html_document&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#616e87;font-style:italic&#34;&gt;#    toc: true&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#616e87;font-style:italic&#34;&gt;#    toc_depth: 2&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#81a1c1&#34;&gt;number_sections&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;true&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#81a1c1&#34;&gt;template&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;:&lt;/span&gt; lncs-template.html
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#81a1c1&#34;&gt;theme&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;null&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#81a1c1&#34;&gt;highlight&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;:&lt;/span&gt; kate
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#81a1c1&#34;&gt;css&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;:&lt;/span&gt; lncs.css
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#81a1c1&#34;&gt;self_contained&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;false&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#81a1c1&#34;&gt;md_extensions&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;:&lt;/span&gt; +footnotes
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#81a1c1&#34;&gt;pdf_document&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#81a1c1&#34;&gt;fig_caption&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;yes&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#81a1c1&#34;&gt;keep_tex&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;true&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#81a1c1&#34;&gt;template&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;:&lt;/span&gt; lncs-template.tex
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#81a1c1&#34;&gt;md_extensions&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;:&lt;/span&gt; +footnotes
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8fbcbb&#34;&gt;---&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;For a full list of output options, see R Markdowns &lt;a href=&#34;http://rmarkdown.rstudio.com/html_document_format.html&#34;&gt;HTML document format&lt;/a&gt; and &lt;a href=&#34;http://rmarkdown.rstudio.com/pdf_document_format.html&#34;&gt;PDF document format&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I added &lt;code&gt;toc&lt;/code&gt;, &lt;code&gt;toc_depth&lt;/code&gt; and &lt;code&gt;number_sections&lt;/code&gt; to the &lt;code&gt;html_document&lt;/code&gt; options out of personal favour though this is not conform with the LNCS style. Feel free to remove these.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;
&lt;p&gt;To generate the PDF:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#d8dee9;background-color:#2e3440;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;R -q -e &lt;span style=&#34;color:#a3be8c&#34;&gt;&amp;#34;rmarkdown::render(&amp;#39;paper.markdown&amp;#39;, &amp;#39;pdf_document&amp;#39;)&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To generate the HTML:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#d8dee9;background-color:#2e3440;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;R -q -e &lt;span style=&#34;color:#a3be8c&#34;&gt;&amp;#34;rmarkdown::render(&amp;#39;paper.markdown&amp;#39;, &amp;#39;html_document&amp;#39;)&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The &lt;a href=&#34;Makefile&#34;&gt;Makefile&lt;/a&gt; provides the basic targets &lt;code&gt;make pdf&lt;/code&gt; and &lt;code&gt;make html&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;dependencies&#34;&gt;Dependencies&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Note: this are the installation instructions for OSX. For other platforms, use their package managers. The package names might differe there.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Fonts&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;The fonts in &lt;a href=&#34;fonts/&#34;&gt;fonts/&lt;/a&gt; must be installed on your system.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://pandoc.org&#34;&gt;Pandoc&lt;/a&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#d8dee9;background-color:#2e3440;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;brew install pandoc
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&#34;https://github.com/jgm/pandoc-citeproc&#34;&gt;pandoc-citeproc&lt;/a&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#d8dee9;background-color:#2e3440;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;brew install pandoc-citeproc
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&#34;http://rmarkdown.rstudio.com&#34;&gt;R Markdown&lt;/a&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#d8dee9;background-color:#2e3440;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ brew install R
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ R
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;gt; install.packages&lt;span style=&#34;color:#81a1c1&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#a3be8c&#34;&gt;&amp;#39;rmarkdown&amp;#39;&lt;/span&gt;, dependencies &lt;span style=&#34;color:#81a1c1&#34;&gt;=&lt;/span&gt; TRUE&lt;span style=&#34;color:#81a1c1&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;citation&#34;&gt;Citation&lt;/h3&gt;
&lt;p&gt;In the Markdown files front matter there has to be the attribute &lt;code&gt;bibliography: references.bib&lt;/code&gt; set, where the specified &lt;code&gt;.bib&lt;/code&gt; file contains the references of course.&lt;/p&gt;
&lt;p&gt;Citing a reference from the &lt;code&gt;.bib&lt;/code&gt; file in the markdown text is simply done via &lt;a href=&#34;http://rmarkdown.rstudio.com/authoring_bibliographies_and_citations.html&#34;&gt;R markdowns citation syntax&lt;/a&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;bla bla bla [@xiang2007robust; @wu2005efficiently].
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Basically, citations go inside square brackets and are separated by semicolons. Each citation must have a key, composed of &lt;code&gt;@&lt;/code&gt; + the citation identifier from the database.&lt;/p&gt;
&lt;h3 id=&#34;paper-name&#34;&gt;Paper name&lt;/h3&gt;
&lt;p&gt;The default paper name used is &lt;code&gt;paper.markdown&lt;/code&gt;, which will produce &lt;code&gt;paper.pdf&lt;/code&gt; and &lt;code&gt;paper.html&lt;/code&gt;. If you want to use a different name, feel free to change the &lt;code&gt;.markdown&lt;/code&gt; files name, but keep in mind to alter the &lt;code&gt;PAPER&lt;/code&gt; variable in the &lt;code&gt;Makefile&lt;/code&gt; if you are using the &lt;code&gt;make&lt;/code&gt; build approach.&lt;/p&gt;
&lt;p&gt;Note that there is a variable for the markdown file extension &lt;code&gt;MDEXT&lt;/code&gt; as well, if you would rather use &lt;code&gt;.md&lt;/code&gt; or one of the other 10 or so that are out there.&lt;/p&gt;
</description>
    </item><item>
      <title>Web scraping problem with PHP</title>
      <link>https://max.irro.at/posts/php-webscraping.html</link>
      <pubDate>Mon, 20 Apr 2015 00:00:00 +0000</pubDate>
      
      <guid>https://max.irro.at/posts/php-webscraping.html</guid>
      <description>&lt;p&gt;I am scraping a website in PHP via a cronjob quite frequently for about
2 years now and did not have a problem so far. Yesterday however, the
mechanism broke, because the HTML code I scrapped with
&lt;a href=&#34;http://php.net/manual/de/function.file-get-contents.php&#34;&gt;file_get_contents&lt;/a&gt;
was now empty. The basic code is this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#d8dee9;background-color:#2e3440;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-php&#34; data-lang=&#34;php&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1&#34;&gt;&amp;lt;?&lt;/span&gt;php
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$url &lt;span style=&#34;color:#81a1c1&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a3be8c&#34;&gt;&amp;#34;http://...&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;;&lt;/span&gt; &lt;span style=&#34;color:#616e87;font-style:italic&#34;&gt;// some url
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$context &lt;span style=&#34;color:#81a1c1&#34;&gt;=&lt;/span&gt; stream_context_create&lt;span style=&#34;color:#eceff4&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;array&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#a3be8c&#34;&gt;&amp;#39;http&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#81a1c1&#34;&gt;=&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;array&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#a3be8c&#34;&gt;&amp;#39;timeout&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#81a1c1&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span style=&#34;color:#b48ead&#34;&gt;10&lt;/span&gt; &lt;span style=&#34;color:#616e87;font-style:italic&#34;&gt;// for reasons this shall be short
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#eceff4&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;));&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$html &lt;span style=&#34;color:#81a1c1&#34;&gt;=&lt;/span&gt; file_get_contents&lt;span style=&#34;color:#eceff4&#34;&gt;(&lt;/span&gt;$url&lt;span style=&#34;color:#eceff4&#34;&gt;,&lt;/span&gt;&lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;false&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;,&lt;/span&gt;$context&lt;span style=&#34;color:#eceff4&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;if&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;(&lt;/span&gt; $html &lt;span style=&#34;color:#81a1c1&#34;&gt;==&lt;/span&gt; &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;false&lt;/span&gt; &lt;span style=&#34;color:#eceff4&#34;&gt;){&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#616e87;font-style:italic&#34;&gt;// some error handling
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;if&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;(&lt;/span&gt; &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;empty&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;(&lt;/span&gt;$html&lt;span style=&#34;color:#eceff4&#34;&gt;)&lt;/span&gt; &lt;span style=&#34;color:#eceff4&#34;&gt;){&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#616e87;font-style:italic&#34;&gt;// some error handling
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;First the &lt;code&gt;empty($html)&lt;/code&gt; did not match because the &lt;code&gt;$html == false&lt;/code&gt;
error handling went of. Looking into the documentation I noticed &amp;ldquo;This
function may return Boolean &lt;strong&gt;FALSE&lt;/strong&gt;, but may also return a non-Boolean
value which evaluates to &lt;strong&gt;FALSE&lt;/strong&gt;&amp;rdquo;. Classic mistake by me, for I used
&lt;code&gt;==&lt;/code&gt; and therefore the return value (which was empty) evaluated to
&lt;code&gt;FALSE&lt;/code&gt;. After changing to &lt;code&gt;===&lt;/code&gt; the second error handling confirmed
that HTML read really was an empty string. This is in fact quite odd,
for opening the URL in a browser I did see the website.&lt;/p&gt;
&lt;p&gt;Checking the site via an &lt;a href=&#34;http://validator.w3.org&#34;&gt;HTML validator&lt;/a&gt; I
realized that the site suddenly lacked the &lt;code&gt;&amp;lt;!DOCTYPE HTML SYSTEM&amp;gt;&lt;/code&gt;
header. I honestly do not know why, but this was a problem for
&lt;code&gt;file_get_contents&lt;/code&gt; seems to refuse reading the HTML code if this fails
to exist.&lt;/p&gt;
&lt;p&gt;I did not find any useful workaround (or simply a related problem in
fact) on Google, but in the end I did come up with one myself. Out of
sheer desperation I tried to provide a &lt;a href=&#34;http://en.wikipedia.org/wiki/User_agent&#34;&gt;User
agent&lt;/a&gt; with my request:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#d8dee9;background-color:#2e3440;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-php&#34; data-lang=&#34;php&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1&#34;&gt;&amp;lt;?&lt;/span&gt;php
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$context &lt;span style=&#34;color:#81a1c1&#34;&gt;=&lt;/span&gt; stream_context_create&lt;span style=&#34;color:#eceff4&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;array&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#a3be8c&#34;&gt;&amp;#39;http&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#81a1c1&#34;&gt;=&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;array&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#a3be8c&#34;&gt;&amp;#39;timeout&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#81a1c1&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span style=&#34;color:#b48ead&#34;&gt;10&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#a3be8c&#34;&gt;&amp;#39;header&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#81a1c1&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span style=&#34;color:#a3be8c&#34;&gt;&amp;#34;User-Agent: Mozilla/5.0 (iPad; U;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#81a1c1&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#a3be8c&#34;&gt;&amp;#34; CPU OS 3_2 like Mac OS X; en-us)&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#81a1c1&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#a3be8c&#34;&gt;&amp;#34; AppleWebKit/531.21.10 (KHTML, like Gecko)&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#81a1c1&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#a3be8c&#34;&gt;&amp;#34; Version/4.0.4 Mobile/7B334b&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#81a1c1&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#a3be8c&#34;&gt;&amp;#34; Safari/531.21.102011-10-16 20:23:10&lt;/span&gt;&lt;span style=&#34;color:#ebcb8b&#34;&gt;\r\n&lt;/span&gt;&lt;span style=&#34;color:#a3be8c&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#eceff4&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;));&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$html &lt;span style=&#34;color:#81a1c1&#34;&gt;=&lt;/span&gt; file_get_contents&lt;span style=&#34;color:#eceff4&#34;&gt;(&lt;/span&gt;$url&lt;span style=&#34;color:#eceff4&#34;&gt;,&lt;/span&gt;&lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;false&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;,&lt;/span&gt;$context&lt;span style=&#34;color:#eceff4&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;and tada! I worked. Not immediately though, for most user agents still
do not suffice. I had to fake being an iPad before the web server in
question agreed to serve me something more than just emptiness. Why I do
not know though&amp;hellip;&lt;/p&gt;
</description>
    </item><item>
      <title>Creating slides with LaTeX&#39;s Beamer package</title>
      <link>https://max.irro.at/posts/latex-beamer.html</link>
      <pubDate>Tue, 31 Mar 2015 00:00:00 +0000</pubDate>
      
      <guid>https://max.irro.at/posts/latex-beamer.html</guid>
      <description>&lt;p&gt;I am quite fond of a special kind of lecture slides formats I see regularly at University. I always had the feeling that those were made using &lt;a href=&#34;http://en.wikipedia.org/wiki/LaTeX&#34;&gt;LaTeX&lt;/a&gt; and now that I have to do a presentation I though this might be a good chance to look into it.&lt;/p&gt;
&lt;p&gt;I found out that this is the &lt;a href=&#34;http://en.wikipedia.org/wiki/Beamer_(LaTeX)&#34;&gt;Beamer package&lt;/a&gt; with its default layout (easily spotted in the &lt;a href=&#34;https://www.hartwork.org/beamer-theme-matrix/&#34;&gt;Beamer Theme Matrix&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;The usage is quite simple:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#d8dee9;background-color:#2e3440;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-latex&#34; data-lang=&#34;latex&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;\documentclass&lt;/span&gt;&lt;span style=&#34;color:#81a1c1&#34;&gt;{&lt;/span&gt;beamer&lt;span style=&#34;color:#81a1c1&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#616e87;font-style:italic&#34;&gt;%\usetheme{umbc4}
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;\begin&lt;/span&gt;&lt;span style=&#34;color:#81a1c1&#34;&gt;{&lt;/span&gt;document&lt;span style=&#34;color:#81a1c1&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#616e87;font-style:italic&#34;&gt;% ==========================
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#616e87;font-style:italic&#34;&gt;% Title page and information
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#616e87;font-style:italic&#34;&gt;% ==========================
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;\title&lt;/span&gt;&lt;span style=&#34;color:#8fbcbb&#34;&gt;[fancy topic]&lt;/span&gt; &lt;span style=&#34;color:#616e87;font-style:italic&#34;&gt;% (optional, only for long titles)
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1&#34;&gt;{&lt;/span&gt;my very fancy topic&lt;span style=&#34;color:#81a1c1&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;\subtitle&lt;/span&gt;&lt;span style=&#34;color:#81a1c1&#34;&gt;{&lt;/span&gt;even more fancy than you think!&lt;span style=&#34;color:#81a1c1&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;\author&lt;/span&gt;&lt;span style=&#34;color:#8fbcbb&#34;&gt;[Irro]&lt;/span&gt; &lt;span style=&#34;color:#616e87;font-style:italic&#34;&gt;% (optional, for multiple authors)
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1&#34;&gt;{&lt;/span&gt;Maximilian Irro&lt;span style=&#34;color:#81a1c1&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;\institute&lt;/span&gt;&lt;span style=&#34;color:#8fbcbb&#34;&gt;[Some Institute]&lt;/span&gt; &lt;span style=&#34;color:#616e87;font-style:italic&#34;&gt;% (optional)
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;\date&lt;/span&gt;&lt;span style=&#34;color:#8fbcbb&#34;&gt;[\today]&lt;/span&gt; &lt;span style=&#34;color:#616e87;font-style:italic&#34;&gt;% (optional)
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1&#34;&gt;{&lt;/span&gt;Seminar aus Programmiersprachen, 2015S&lt;span style=&#34;color:#81a1c1&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;\subject&lt;/span&gt;&lt;span style=&#34;color:#81a1c1&#34;&gt;{&lt;/span&gt;Computer Science&lt;span style=&#34;color:#81a1c1&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;\frame&lt;/span&gt;&lt;span style=&#34;color:#81a1c1&#34;&gt;{&lt;/span&gt;&lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;\titlepage&lt;/span&gt;&lt;span style=&#34;color:#81a1c1&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#616e87;font-style:italic&#34;&gt;% =================
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#616e87;font-style:italic&#34;&gt;% Table of Contents
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#616e87;font-style:italic&#34;&gt;% =================
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;\begin&lt;/span&gt;&lt;span style=&#34;color:#81a1c1&#34;&gt;{&lt;/span&gt;frame&lt;span style=&#34;color:#81a1c1&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;\frametitle&lt;/span&gt;&lt;span style=&#34;color:#81a1c1&#34;&gt;{&lt;/span&gt;Table of Contents&lt;span style=&#34;color:#81a1c1&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;\tableofcontents&lt;/span&gt;&lt;span style=&#34;color:#8fbcbb&#34;&gt;[currentsection]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;\end&lt;/span&gt;&lt;span style=&#34;color:#81a1c1&#34;&gt;{&lt;/span&gt;frame&lt;span style=&#34;color:#81a1c1&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#616e87;font-style:italic&#34;&gt;% ======
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#616e87;font-style:italic&#34;&gt;% Slides
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#616e87;font-style:italic&#34;&gt;% ======
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;\begin&lt;/span&gt;&lt;span style=&#34;color:#81a1c1&#34;&gt;{&lt;/span&gt;frame&lt;span style=&#34;color:#81a1c1&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;\frametitle&lt;/span&gt;&lt;span style=&#34;color:#81a1c1&#34;&gt;{&lt;/span&gt;Overlaying declarations and graphics&lt;span style=&#34;color:#81a1c1&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;\begin&lt;/span&gt;&lt;span style=&#34;color:#81a1c1&#34;&gt;{&lt;/span&gt;theorem&lt;span style=&#34;color:#81a1c1&#34;&gt;}&lt;/span&gt;&amp;lt;1-&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Every finite distributive lattice can be 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;embedded in a boolean lattice.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;\end&lt;/span&gt;&lt;span style=&#34;color:#81a1c1&#34;&gt;{&lt;/span&gt;theorem&lt;span style=&#34;color:#81a1c1&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;\begin&lt;/span&gt;&lt;span style=&#34;color:#81a1c1&#34;&gt;{&lt;/span&gt;proof&lt;span style=&#34;color:#81a1c1&#34;&gt;}&lt;/span&gt;&amp;lt;3-&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Use join-irreducible elements.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;\end&lt;/span&gt;&lt;span style=&#34;color:#81a1c1&#34;&gt;{&lt;/span&gt;proof&lt;span style=&#34;color:#81a1c1&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#616e87;font-style:italic&#34;&gt;% ===
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#616e87;font-style:italic&#34;&gt;% End
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#616e87;font-style:italic&#34;&gt;% ===
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;\end&lt;/span&gt;&lt;span style=&#34;color:#81a1c1&#34;&gt;{&lt;/span&gt;frame&lt;span style=&#34;color:#81a1c1&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;\end&lt;/span&gt;&lt;span style=&#34;color:#81a1c1&#34;&gt;{&lt;/span&gt;document&lt;span style=&#34;color:#81a1c1&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Basically every slide is encapsulated in pair of &lt;code&gt;\begin{frame}&lt;/code&gt; and &lt;code&gt;\end{frame}&lt;/code&gt;. I use the default theme, colortheme and fonttheme. Those I like best. The rest is what you call visual noice to me.&lt;/p&gt;
</description>
    </item><item>
      <title>Universal Turing Machine in Forth</title>
      <link>https://max.irro.at/posts/forth-universal-turing-machine.html</link>
      <pubDate>Fri, 16 Jan 2015 00:00:00 +0000</pubDate>
      
      <guid>https://max.irro.at/posts/forth-universal-turing-machine.html</guid>
      <description>&lt;p&gt;I (co-)wrote a universal turing machine in &lt;a href=&#34;http://www.forth.org&#34;&gt;Forth&lt;/a&gt; this semester for &lt;a href=&#34;http://www.complang.tuwien.ac.at/anton/lvas/stack-14w.html&#34;&gt;a course about stack-based languages&lt;/a&gt;. It is named &lt;em&gt;Universal Forth Machine&lt;/em&gt;. The major feature is the compilation of the &lt;code&gt;transition&lt;/code&gt; word at runtime based on a provided turing machine specification. This word performs the machines state transition in a loop. We developed our program for the &lt;a href=&#34;http://www.complang.tuwien.ac.at/forth/gforth/Docs-html/index.html#Top&#34;&gt;Gforth&lt;/a&gt; interpreter. If used with other Forth interpreters there might be issues (we never tested).&lt;/p&gt;
&lt;p&gt;The &lt;a href=&#34;https://github.com/mpgirro/universal-forth-machine&#34;&gt;project is available on GitHub&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;name-explanation&#34;&gt;Name explanation&lt;/h2&gt;
&lt;p&gt;We call our program &lt;em&gt;Universal Forth Machine&lt;/em&gt; (UFM), a wordplay between &amp;ldquo;Universal Turing Machine&amp;rdquo;, being written in Forth, and Forth being a stack machine.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;ufm.forth /path/to/machine /path/to/tape
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;machine-specification-format&#34;&gt;Machine specification format&lt;/h2&gt;
&lt;p&gt;We provide some example machines in &lt;a href=&#34;machines/&#34;&gt;machines/&lt;/a&gt; and tapes to test them in &lt;a href=&#34;tapes/&#34;&gt;tapes/&lt;/a&gt;. The basic file format looks like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;start-state
state-term1 label
state1
sym-read sym-write next-state tape-ptr-move
sym-read sym-write next-state tape ptr-move
state-term2 otherlabel
state-term3 yetanotherlabel
state2
sym-read sym-write next-state tape-ptr-move
sym-read sym-write next-state tape ptr-move
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The first line &lt;strong&gt;has&lt;/strong&gt; to be the &lt;code&gt;start-state&lt;/code&gt;. All following lines are state descriptions. A &lt;code&gt;term-state&lt;/code&gt; (terminal state) is followbed by a &lt;code&gt;label&lt;/code&gt; which is a string that will be the output of UFM if the machine terminates in this state. A line containing just a &lt;code&gt;state&lt;/code&gt; token starts the definition of a regular state. All following lines until a new &lt;code&gt;state&lt;/code&gt; or &lt;code&gt;state-term&lt;/code&gt; line are the edge dedinitions for this state. An edge line has to consist of:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;sym-read&lt;/code&gt;: the symbol read on the tape. If the machine is in the currently defined state, and this symbol is read, the machine will execute the following actions of this line. Think of it as the edge label when picturing the turing machine as a graph.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;sym-write&lt;/code&gt;: the symbol to write onto the current tape position.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;next-state&lt;/code&gt;: the next state the turing (state-)machine goes to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;tape-ptr-move&lt;/code&gt;: the direction the tape pointer (&lt;code&gt;tape-ptr&lt;/code&gt;) moves. It can go one step to the left (&lt;code&gt;-1&lt;/code&gt;) or right (&lt;code&gt;1&lt;/code&gt;), or just stay (&lt;code&gt;0&lt;/code&gt;) at its current position.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt; that all tokens except the &lt;code&gt;label&lt;/code&gt; for terminal states support literals only! They will all be converted into numbers. So no strings allowed here.&lt;/p&gt;
&lt;h2 id=&#34;special-stack-feature&#34;&gt;Special stack feature&lt;/h2&gt;
&lt;p&gt;The state transition of the machine is done in a loop calling the &lt;code&gt;transition&lt;/code&gt; word. This is a word that will be dynamically compiled at runtime just before it&amp;rsquo;s first execution. Therefore the code of &lt;code&gt;transition&lt;/code&gt; is not hardcoded in the program file, but will be generated by a special compilation word &lt;code&gt;[compile-transition]&lt;/code&gt; which is &lt;code&gt;compile-only&lt;/code&gt; and &lt;code&gt;immediate&lt;/code&gt;. It will compile Forth code into &lt;code&gt;transition&lt;/code&gt; based on the input machine specification file. Have a look at the colon definition of &lt;code&gt;transition&lt;/code&gt; in the source code, and at runtime using &lt;code&gt;see transition&lt;/code&gt;&lt;/p&gt;
&lt;h2 id=&#34;structure-of-transition-word&#34;&gt;Structure of transition word&lt;/h2&gt;
&lt;p&gt;The code structure of &lt;code&gt;transition&lt;/code&gt; (which will be compiled depending on the machine-file) looks like this for the &lt;a href=&#34;https://github.com/mpgirro/universal-forth-machine/blob/master/machines/increment.machine&#34;&gt;machines/increment.machine&lt;/a&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#d8dee9;background-color:#2e3440;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-forth&#34; data-lang=&#34;forth&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#8fbcbb&#34;&gt;transition&lt;/span&gt; &lt;span style=&#34;color:#616e87;font-style:italic&#34;&gt;( cur-state sym-read -- next-state flag )&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;over &lt;/span&gt;&lt;span style=&#34;color:#b48ead&#34;&gt;1&lt;/span&gt; &lt;span style=&#34;color:#88c0d0&#34;&gt;=&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;IF &lt;/span&gt;    &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;cr &lt;/span&gt;&lt;span style=&#34;color:#b48ead&#34;&gt;4546001056&lt;/span&gt; &lt;span style=&#34;color:#b48ead&#34;&gt;16&lt;/span&gt; &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;type &lt;/span&gt;&lt;span style=&#34;color:#b48ead&#34;&gt;4545995737&lt;/span&gt; &lt;span style=&#34;color:#b48ead&#34;&gt;9&lt;/span&gt; &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;type cr 2drop &lt;/span&gt;&lt;span style=&#34;color:#b48ead&#34;&gt;0&lt;/span&gt; &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;EXIT
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;THEN
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;over &lt;/span&gt;&lt;span style=&#34;color:#b48ead&#34;&gt;0&lt;/span&gt; &lt;span style=&#34;color:#88c0d0&#34;&gt;=&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;IF &lt;/span&gt;    &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;dup &lt;/span&gt;&lt;span style=&#34;color:#b48ead&#34;&gt;1&lt;/span&gt; &lt;span style=&#34;color:#88c0d0&#34;&gt;=&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;IF &lt;/span&gt;    &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;2drop &lt;/span&gt;&lt;span style=&#34;color:#b48ead&#34;&gt;1&lt;/span&gt; &lt;span style=&#34;color:#88c0d0&#34;&gt;tape-write&lt;/span&gt; &lt;span style=&#34;color:#b48ead&#34;&gt;0&lt;/span&gt; &lt;span style=&#34;color:#88c0d0&#34;&gt;tape-ptr-move-right&lt;/span&gt; &lt;span style=&#34;color:#b48ead&#34;&gt;-1&lt;/span&gt; &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;EXIT
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;THEN
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;dup &lt;/span&gt;&lt;span style=&#34;color:#b48ead&#34;&gt;0&lt;/span&gt; &lt;span style=&#34;color:#88c0d0&#34;&gt;=&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;IF &lt;/span&gt;    &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;2drop &lt;/span&gt;&lt;span style=&#34;color:#b48ead&#34;&gt;1&lt;/span&gt; &lt;span style=&#34;color:#88c0d0&#34;&gt;tape-write&lt;/span&gt; &lt;span style=&#34;color:#b48ead&#34;&gt;1&lt;/span&gt; &lt;span style=&#34;color:#88c0d0&#34;&gt;tape-ptr-move-stay&lt;/span&gt; &lt;span style=&#34;color:#b48ead&#34;&gt;-1&lt;/span&gt; &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;EXIT
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;THEN
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;THEN ; &lt;/span&gt;&lt;span style=&#34;color:#88c0d0&#34;&gt;ok&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The &lt;code&gt;over &amp;lt;some-literal&amp;gt; = if&lt;/code&gt; sequences will check for the state the machine is currently occupying. The &lt;code&gt;dup &amp;lt;some-literal&amp;gt; = if&lt;/code&gt; parts then check the current symbol on the tape. With this mechanism it is decided which action the machine will perform next.&lt;/p&gt;
</description>
    </item><item>
      <title>Dynamic compilation of Forth words at runtime</title>
      <link>https://max.irro.at/posts/forth-dynamic-runtime-compilation.html</link>
      <pubDate>Tue, 13 Jan 2015 00:00:00 +0000</pubDate>
      
      <guid>https://max.irro.at/posts/forth-dynamic-runtime-compilation.html</guid>
      <description>&lt;p&gt;One very powerful feature of stack-based programming is the compilation of
words at runtime. This allows you to define the compiled state of a word
dynamically.&lt;/p&gt;
&lt;p&gt;To compile a word &lt;code&gt;foo&lt;/code&gt; (the Forth community seems to have a fabel for &lt;code&gt;foo&lt;/code&gt;
and &lt;code&gt;bar&lt;/code&gt; in examples) that will contain the even literals from 10 to 2
descending:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#d8dee9;background-color:#2e3440;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-forth&#34; data-lang=&#34;forth&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#b48ead&#34;&gt;10&lt;/span&gt; &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;Value&lt;/span&gt; &lt;span style=&#34;color:#8fbcbb&#34;&gt;token&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#616e87;font-style:italic&#34;&gt;\ decrement the token value
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#8fbcbb&#34;&gt;decr-token&lt;/span&gt; &lt;span style=&#34;color:#616e87;font-style:italic&#34;&gt;( -- )&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#88c0d0&#34;&gt;token&lt;/span&gt; &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;1- to &lt;/span&gt;&lt;span style=&#34;color:#88c0d0&#34;&gt;token&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#8fbcbb&#34;&gt;compile-foo&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#b48ead&#34;&gt;10&lt;/span&gt; &lt;span style=&#34;color:#b48ead&#34;&gt;0&lt;/span&gt; &lt;span style=&#34;color:#88c0d0&#34;&gt;u+do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#88c0d0&#34;&gt;token&lt;/span&gt; &lt;span style=&#34;color:#b48ead&#34;&gt;2&lt;/span&gt; &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;mod 0= if &lt;/span&gt;&lt;span style=&#34;color:#616e87;font-style:italic&#34;&gt;\ if token is even
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#616e87;font-style:italic&#34;&gt;\ compile token literal value into foo
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#88c0d0&#34;&gt;token&lt;/span&gt; &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;postpone literal
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#88c0d0&#34;&gt;endif&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#88c0d0&#34;&gt;decr-token&lt;/span&gt; &lt;span style=&#34;color:#616e87;font-style:italic&#34;&gt;\ decrement token value
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;loop
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;; &lt;/span&gt;&lt;span style=&#34;color:#88c0d0&#34;&gt;compile-only&lt;/span&gt; &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;immediate
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now, &lt;code&gt;compile-foo&lt;/code&gt; is an &lt;code&gt;ìmmediate&lt;/code&gt; word, meaning it will be executed when it
is used in compile state, that is the colon definition (= what comes between
&lt;code&gt;:&lt;/code&gt; and &lt;code&gt;;&lt;/code&gt;) of a word. So when doing&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#d8dee9;background-color:#2e3440;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-forth&#34; data-lang=&#34;forth&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#8fbcbb&#34;&gt;foo&lt;/span&gt; &lt;span style=&#34;color:#616e87;font-style:italic&#34;&gt;( C: -- ; I: -- n1 n2 n3 n4 n5 )&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#88c0d0&#34;&gt;[&lt;/span&gt; &lt;span style=&#34;color:#88c0d0&#34;&gt;compile-foo&lt;/span&gt; &lt;span style=&#34;color:#88c0d0&#34;&gt;]&lt;/span&gt; &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;every word within &lt;code&gt;compile-foo&lt;/code&gt; that is not preceded by &lt;code&gt;postpone&lt;/code&gt; will be
executed immediately. Checking correctness with &lt;code&gt;see foo&lt;/code&gt; yields:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#d8dee9;background-color:#2e3440;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-forth&#34; data-lang=&#34;forth&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;see &lt;/span&gt;&lt;span style=&#34;color:#88c0d0&#34;&gt;foo&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#8fbcbb&#34;&gt;foo&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#b48ead&#34;&gt;10&lt;/span&gt; &lt;span style=&#34;color:#b48ead&#34;&gt;8&lt;/span&gt; &lt;span style=&#34;color:#b48ead&#34;&gt;6&lt;/span&gt; &lt;span style=&#34;color:#b48ead&#34;&gt;4&lt;/span&gt; &lt;span style=&#34;color:#b48ead&#34;&gt;2&lt;/span&gt; &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;; &lt;/span&gt;&lt;span style=&#34;color:#88c0d0&#34;&gt;ok&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Note that &lt;code&gt;[&lt;/code&gt; and &lt;code&gt;]&lt;/code&gt; will switch between compile state and interpret state.
But this is in fact not even necessary:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#d8dee9;background-color:#2e3440;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-forth&#34; data-lang=&#34;forth&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#8fbcbb&#34;&gt;foo&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#88c0d0&#34;&gt;compile-foo&lt;/span&gt; &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;generated the same compiled content of &lt;code&gt;foo&lt;/code&gt; which is easily checked with
&lt;code&gt;see foo&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;For only the compile time behaviour of &lt;code&gt;compile-foo&lt;/code&gt; is defined it is tagged
&lt;code&gt;compile-only&lt;/code&gt;. This will prevent any call of &lt;code&gt;compile-foo&lt;/code&gt; in interprete
state. It is not necessary to do this, yet useful, for the error message will
clearly state that the call of &lt;code&gt;compile-only&lt;/code&gt; is an error. Otherwise there
would be whatever error which would be hard to find and debug in a larger
program.&lt;/p&gt;
&lt;p&gt;Executing more complicated control structures are possible as well as calling
custom defined words. Every word preceded by &lt;code&gt;postpone&lt;/code&gt; will be compiled into
the word, everything else immediately executed. Note that in order to compile
literals into a word it has to be followed by &lt;code&gt;postpone literal&lt;/code&gt; as shown in
&lt;code&gt;compile-foo&lt;/code&gt;, even when it is the result of a word, a &lt;code&gt;Constant&lt;/code&gt; or a &lt;code&gt;Value&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;using-the-data-stack-in-compile-state&#34;&gt;Using the data stack in compile state&lt;/h2&gt;
&lt;p&gt;When compiling a word like this, all data is put onto the data stack while the
Forth interpreter is in compile state. Therefore, all &lt;code&gt;postpone&lt;/code&gt;d words will
leave a stack effect behind (compilation tokens and such - this basically is
what &lt;code&gt;postpone&lt;/code&gt; does: keep the following word from executing, but putting its
compilation tokens on the data stack) which &lt;strong&gt;must not&lt;/strong&gt; be tampered with.
This is especially tricky when &lt;code&gt;postpone&lt;/code&gt;ing control structures like &lt;code&gt;if&lt;/code&gt;
(and therefore also &lt;code&gt;endif&lt;/code&gt;) inside a loop. To ensure a consistent stack
effect of loop control data throughout each loop iteration, the stack effect
I produce manually has to be passed by each &lt;code&gt;postpone&lt;/code&gt;d word without modifying
the stack-effect produced by &lt;code&gt;postpone&lt;/code&gt;. Elsewise the &lt;code&gt;endif&lt;/code&gt; will not match
its &lt;code&gt;if&lt;/code&gt; and a compile error will be the effect.&lt;/p&gt;
&lt;p&gt;Problem is in general it is not clear what &lt;code&gt;postpone&lt;/code&gt; will leave behind.
Fortunately there is the return-stack which can be used in compile state (in
fact it can &lt;strong&gt;only&lt;/strong&gt; be used in compile state). It must only be guaranteed
that the return-stack is empty when leaving compile state.&lt;/p&gt;
&lt;p&gt;Additionally, there is this nice effect of a stack that it is a LIFO (last
in first out) data structure. So when pushing (using &lt;code&gt;&amp;gt;r&lt;/code&gt;) 5 values to the
return-stack they will be on it in reversed order compared to when they were
on the data stack. But when poping (using &lt;code&gt;r&amp;gt;&lt;/code&gt;) them back onto the data stack,
there will be the same stack effect as before the push operations.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#d8dee9;background-color:#2e3440;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-forth&#34; data-lang=&#34;forth&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#8fbcbb&#34;&gt;foo&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#b48ead&#34;&gt;1&lt;/span&gt; &lt;span style=&#34;color:#b48ead&#34;&gt;2&lt;/span&gt; &lt;span style=&#34;color:#b48ead&#34;&gt;3&lt;/span&gt; &lt;span style=&#34;color:#b48ead&#34;&gt;5&lt;/span&gt; &lt;span style=&#34;color:#b48ead&#34;&gt;6&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;&amp;gt;r &amp;gt;r &amp;gt;r &amp;gt;r &amp;gt;r
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#616e87;font-style:italic&#34;&gt;( )&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;r&amp;gt; r&amp;gt; r&amp;gt; r&amp;gt; r&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#616e87;font-style:italic&#34;&gt;( 1 2 3 4 5 )&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Sweet.&lt;/p&gt;
</description>
    </item><item>
      <title>Minecraft Overviewer on FreeBSD 10.1</title>
      <link>https://max.irro.at/posts/freebsd-minecraft-overviewer.html</link>
      <pubDate>Tue, 30 Dec 2014 00:00:00 +0000</pubDate>
      
      <guid>https://max.irro.at/posts/freebsd-minecraft-overviewer.html</guid>
      <description>&lt;p&gt;The &lt;a href=&#34;http://overviewer.org&#34;&gt;Minecraft Overviewer&lt;/a&gt; is a nice python tool that enables you to render google maps like maps for your minecraft server.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
  &lt;img
    src=&#34;../../images/screenshot-minecraft-overviewer.jpg&#34;
    alt=&#34;minecraft.disposia.org overviewer map&#34;
    loading=&#34;lazy&#34;
    
  /&gt;
  &lt;figcaption&gt;minecraft.disposia.org overviewer map&lt;/figcaption&gt;
  &lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;This is an example showing the map of my server &lt;a href=&#34;http://minecraft.disposia.org&#34;&gt;minecraft.disposia.org&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;installation&#34;&gt;Installation&lt;/h2&gt;
&lt;p&gt;You need a minecraft &lt;code&gt;world&lt;/code&gt; that will be displayed, of course. A world is generated by your minecraft server (port &lt;code&gt;games/minecraft-server&lt;/code&gt;) upon first start.&lt;/p&gt;
&lt;p&gt;For image rendering it is easier if you have the minecraft client installed too:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# portmaster games/minecraft-client
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Clone the &lt;a href=&#34;http://overviewer.org&#34;&gt;Minecraft Overviewer&lt;/a&gt; repository:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# git clone git://github.com/overviewer/Minecraft-Overviewer.git
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;(Note: you need &lt;a href=&#34;http://git-scm.com&#34;&gt;git&lt;/a&gt; for this. Install port &lt;code&gt;devel/git&lt;/code&gt; if need be)&lt;/p&gt;
&lt;p&gt;Make sure you have &lt;code&gt;python2.7&lt;/code&gt; installed (port &lt;code&gt;lang/python27&lt;/code&gt;). Ensure that you are using it by adding:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;PYTHON_VERSION=2.7
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;to the file &lt;code&gt;/etc/make.conf&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The Minecraft Overviewer has some python dependencies:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# portmaster math/py-numpy
# portmaster graphics/py-imaging
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Build the Overviewer:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# python2.7 setup.py build
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You now have an &lt;code&gt;overviewer.py&lt;/code&gt; script in you &lt;code&gt;Minecraft-Overviewer&lt;/code&gt; directory.&lt;/p&gt;
&lt;h2 id=&#34;configuration&#34;&gt;Configuration&lt;/h2&gt;
&lt;p&gt;The basic usage is now:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;python2.7 overviewer.py /path/to/world /path/to/output-dir
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Additionally, the overviewer may also require a path to the texture files if it can not find them itself. This is why I recommended installing the &lt;code&gt;minecraft-client&lt;/code&gt; as well. Providing the path is done via the &lt;code&gt;config.py&lt;/code&gt; script. You can provide the path to the world data and the output directory in this config file as well, or dynamically load it from you OS environment (which will be shown further down).&lt;/p&gt;
&lt;p&gt;Here is the config file I use to generate the maps:
&lt;a href=&#34;https://gist.github.com/mpgirro/abe487fbed85c8157c49&#34;&gt;gist.github.com/mpgirro/abe487fbed85c8157c49&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This config file uses some OS environment variables. Those are exported by a bash script automating the steps for the whole generation of the map.&lt;/p&gt;
&lt;h2 id=&#34;running-and-operations&#34;&gt;Running and operations&lt;/h2&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#d8dee9;background-color:#2e3440;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#5e81ac;font-style:italic&#34;&gt;#!/usr/bin/env bash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;MINECRAFT_SERVER_WORLD&lt;span style=&#34;color:#81a1c1&#34;&gt;=&lt;/span&gt;/usr/home/max/minecraft/world
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;MINECRAFT_OVERVIEWER_DIR&lt;span style=&#34;color:#81a1c1&#34;&gt;=&lt;/span&gt;/usr/home/max/Minecraft-Overviewer
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;MINECRAFT_OVERVIEWER_OUTPUT_DIR&lt;span style=&#34;color:#81a1c1&#34;&gt;=&lt;/span&gt;/websites/minecraft.disposia.org/http
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;MINECRAFT_OVERVIEWER_CONFIG_LOCAL&lt;span style=&#34;color:#81a1c1&#34;&gt;=&lt;/span&gt;/usr/home/max/minecraft-overviewer-config.py
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#616e87;font-style:italic&#34;&gt;# view the config file at: https://gist.github.com/mpgirro/abe487fbed85c8157c49#file-minecraft-overviewer-config-py&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;MINECRAFT_OVERVIEWER_CONFIG_GIST&lt;span style=&#34;color:#81a1c1&#34;&gt;=&lt;/span&gt;https://gist.githubusercontent.com/mpgirro/abe487fbed85c8157c49/raw/minecraft-overviewer-config.py
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;MINECRAFT_OVERVIEWER_TEXTURES&lt;span style=&#34;color:#81a1c1&#34;&gt;=&lt;/span&gt;/usr/home/max/.minecraft/versions/1.8/1.8.jar
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#616e87;font-style:italic&#34;&gt;# Export the variables config.py needs&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1&#34;&gt;export&lt;/span&gt; MINECRAFT_SERVER_WORLD
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1&#34;&gt;export&lt;/span&gt; MINECRAFT_OVERVIEWER_DIR
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1&#34;&gt;export&lt;/span&gt; MINECRAFT_OVERVIEWER_OUTPUT_DIR
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1&#34;&gt;export&lt;/span&gt; MINECRAFT_OVERVIEWER_TEXTURES
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#616e87;font-style:italic&#34;&gt;# Download current version of the config file.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;rm $MINECRAFT_OVERVIEWER_CONFIG_LOCAL
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;curl -fsSL $MINECRAFT_OVERVIEWER_CONFIG_GIST &amp;gt; $MINECRAFT_OVERVIEWER_CONFIG_LOCAL
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#616e87;font-style:italic&#34;&gt;# Render the World&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1&#34;&gt;cd&lt;/span&gt; $MINECRAFT_OVERVIEWER_DIR
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;python2.7 overviewer.py --config&lt;span style=&#34;color:#81a1c1&#34;&gt;=&lt;/span&gt;$MINECRAFT_OVERVIEWER_CONFIG_LOCAL
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#616e87;font-style:italic&#34;&gt;# Generate the markers - looks similar to the rendering run, but --genpoi will only generate some JS&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;python2.7 overviewer.py --genpoi --config&lt;span style=&#34;color:#81a1c1&#34;&gt;=&lt;/span&gt;$MINECRAFT_OVERVIEWER_CONFIG_LOCAL
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cp $MINECRAFT_OVERVIEWER_DIR/overviewer_core/data/web_assets/icons/*
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$MINECRAFT_OVERVIEWER_OUTPUT_DIR/icons/
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Note that the points of interest (POI) are generated in a second step, looking very similar to the rendering. Yet the &lt;code&gt;--genpoi&lt;/code&gt; option does not execute a rendering step, it only creates the JavaScript files for the POI options in the map.&lt;/p&gt;
</description>
    </item><item>
      <title>Abstract of Bachelor Thesis</title>
      <link>https://max.irro.at/pub/bakk/abstract.html</link>
      <pubDate>Thu, 26 Jun 2014 00:00:00 +0000</pubDate>
      
      <guid>https://max.irro.at/pub/bakk/abstract.html</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Maximilian Irro. &lt;em&gt;Digital Audio-Watermarking für analoge Übertragungsstrecken&lt;/em&gt;. Bachelor Thesis. 2014&lt;/p&gt;
&lt;/blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Paper: [&lt;a href=&#34;../../pub/bakk/thesis.pdf&#34;&gt;pdf&lt;/a&gt;] [&lt;a href=&#34;../../pub/bakk/thesis.html&#34;&gt;html&lt;/a&gt;] [&lt;a href=&#34;../../pub/bakk/thesis.ps&#34;&gt;ps&lt;/a&gt;]&lt;/li&gt;
&lt;li&gt;Code: [&lt;a href=&#34;https://github.com/mpgirro/bakk&#34;&gt;github&lt;/a&gt;]&lt;/li&gt;
&lt;li&gt;BibTeX: [&lt;a href=&#34;../../pub/bakk/thesis.bib&#34;&gt;bib&lt;/a&gt;]&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;abstract&#34;&gt;Abstract&lt;/h2&gt;
&lt;p&gt;While digital audio watermarking is already a widespread practice, most research
only concern copyright protection mechanisms. An aim on open information
integration is hardly ever a focus of development goals. Yet there are use cases
were additional information in audio signals would be of most value. Especially
digital/analog (DA) conversion processes tend to lose all
sorts of metadata, for them not being translated into acoustic signals. This is
where watermarks may come to aid. Also they could be utilized to add additional
information to radio and TV broadcast which would make them accessible not only
to the receiving device.&lt;/p&gt;
&lt;p&gt;This paper describes the implementations of an existing watermarking algorithm
claiming to be capable of enduring DA conversions. Additionally a framework is
proposed to utilize the algorithm in a developed communication protocol with
synchronization-codes and error-correction mechanisms to provide a well defined,
stable communication channel.&lt;/p&gt;
&lt;h2 id=&#34;zusammenfassung&#34;&gt;Zusammenfassung&lt;/h2&gt;
&lt;p&gt;Während digitales Audio-Watermarking einen an sich viel beachteten Bereich
darstellt, beschränkt sich die Forschung dennoch hauptsächlich auf
Anwendungsgebiete rund um Urheberrechtsschutz. Eine Ausrichtung auf offen
eingebrachte Information ist kaum im Fokus der Entwicklung. Doch gibt es
durchaus Anwendungsfälle in denen Zusatzinformationen in Audiosignalen einen
erheblichen Mehrwert bedeuten können. Vor allem bei der Digital/Analog Wandlung
gehen in der Regel sämtliche Metadaten eines Audiosignals verloren, da diese
nicht in akustische Signale mit überführt werden. Hier können Watermarks Abhilfe
schaffen. Auch könnten sie genutzt werden um in Radio- oder Fernsehübertragungen
gezielt zusätzliche Informationen einzubauen, welche auch von anderen Geräten
als dem ursprünglichen Empfangsgerät verarbeitet werden könnten.&lt;/p&gt;
&lt;p&gt;Diese Arbeit beschäftigt sich mit der Implementierung einer vorhandenen Audio-
Watermarking Methode welche für die DA- und AD-Wandlung
geeignet sein soll. Weiters wurde für deren
Verwendung ein Framework entwickelt, welches mittels eines eigens entwickelten
Übertragungsprotokolls unter Verwendung von Synchronisations-Codes und
Fehlerkorrekturverfahren einen definierten Übertragungskanal bereitstellt.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Keywords&lt;/strong&gt;: audio, watermarking&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#d8dee9;background-color:#2e3440;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bibtex&#34; data-lang=&#34;bibtex&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8fbcbb&#34;&gt;@mastersthesis&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;{&lt;/span&gt;&lt;span style=&#34;color:#8fbcbb&#34;&gt;Irro2014&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#8fbcbb&#34;&gt;document_type&lt;/span&gt; &lt;span style=&#34;color:#eceff4&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a3be8c&#34;&gt;{Bachelor Thesis}&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#8fbcbb&#34;&gt;author&lt;/span&gt;        &lt;span style=&#34;color:#eceff4&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a3be8c&#34;&gt;{Maximilian Irro}&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#8fbcbb&#34;&gt;title&lt;/span&gt;         &lt;span style=&#34;color:#eceff4&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a3be8c&#34;&gt;{Digital Audio-Watermarking für analoge Übertragungsstrecken}&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#8fbcbb&#34;&gt;school&lt;/span&gt;        &lt;span style=&#34;color:#eceff4&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a3be8c&#34;&gt;{Interactive Media Systems Group, TU Wien}&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#8fbcbb&#34;&gt;type&lt;/span&gt;          &lt;span style=&#34;color:#eceff4&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a3be8c&#34;&gt;{Bachelor Thesis}&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#8fbcbb&#34;&gt;year&lt;/span&gt;          &lt;span style=&#34;color:#eceff4&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a3be8c&#34;&gt;{2014}&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#8fbcbb&#34;&gt;month&lt;/span&gt;         &lt;span style=&#34;color:#eceff4&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a3be8c&#34;&gt;{June}&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#8fbcbb&#34;&gt;keywords&lt;/span&gt;      &lt;span style=&#34;color:#eceff4&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a3be8c&#34;&gt;{audio, watermarking}&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#8fbcbb&#34;&gt;timestamp&lt;/span&gt;     &lt;span style=&#34;color:#eceff4&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a3be8c&#34;&gt;{20140624}&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#8fbcbb&#34;&gt;url&lt;/span&gt;           &lt;span style=&#34;color:#eceff4&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a3be8c&#34;&gt;{https://max.irro.at/pub/bakk/thesis.pdf}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item><item>
      <title>Häkelschwein in the Wikipedia</title>
      <link>https://max.irro.at/posts/wikipedia-haekelschwein.html</link>
      <pubDate>Mon, 09 Jun 2014 00:00:00 +0000</pubDate>
      
      <guid>https://max.irro.at/posts/wikipedia-haekelschwein.html</guid>
      <description>&lt;p&gt;For a university course I had to write a (prefereably german) new Wikipedia article that should not become a victim to the &amp;ldquo;unimportantness discussion&amp;rdquo; (the german Wikipedia is very prone to them) and be deleted in the aftermath. So I decided to wrote an article about the &lt;a href=&#34;http://de.wikipedia.org/wiki/H%C3%A4kelschwein&#34;&gt;Häkelschwein&lt;/a&gt; which had none yet. It&amp;rsquo;s basically an internet phenomenon about a little pink crocheted pig.&lt;/p&gt;
</description>
    </item><item>
      <title>Ode to Disposia</title>
      <link>https://max.irro.at/posts/ode-to-disposia.html</link>
      <pubDate>Sun, 28 Jul 2013 00:00:00 +0000</pubDate>
      
      <guid>https://max.irro.at/posts/ode-to-disposia.html</guid>
      <description>&lt;p&gt;I found myself on a 4 hours train ride with a very sunny seat and no air conditioning today. Whilest I &amp;ldquo;enjoyed&amp;rdquo; the illusions comming with dehydration a poem came to mind, which - as far as I can remember - never happened before. At home I did some final adjustments and so here it is, my very first and quite likely only ever poem, explaining the term &amp;ldquo;Disposia&amp;rdquo;.&lt;/p&gt;
&lt;div style=&#34;text-align: center; font-style: italic; margin-top: 4rem; margin-bottom: 4rem;&#34;&gt;
    &lt;p style=&#34;-webkit-margin-before: 0;-webkit-margin-after: 0;&#34;&gt;an island far, on ocean blue&lt;/p&gt;
    &lt;p style=&#34;-webkit-margin-before: 0;-webkit-margin-after: 0;&#34;&gt;lies far from me, and not to see&lt;/p&gt;
    &lt;p style=&#34;-webkit-margin-before: 0;-webkit-margin-after: 0;&#34;&gt;a land of old, still new although&lt;/p&gt;
    &lt;p style=&#34;-webkit-margin-before: 1rem;-webkit-margin-after: 1rem;&#34;&gt; * &lt;/p&gt;
    &lt;p style=&#34;-webkit-margin-before: 0;-webkit-margin-after: 0;&#34;&gt;left there to reign, left to obtain&lt;/p&gt;
    &lt;p style=&#34;-webkit-margin-before: 0;-webkit-margin-after: 0;&#34;&gt;a wondrous place, all to embrace&lt;/p&gt;
    &lt;p style=&#34;-webkit-margin-before: 0;-webkit-margin-after: 0;&#34;&gt;made out of waste, for your distaste&lt;/p&gt;
    &lt;p style=&#34;-webkit-margin-before: 0;-webkit-margin-after: 0;&#34;&gt;but not for mine, it is divine&lt;/p&gt;
    &lt;p style=&#34;-webkit-margin-before: 1rem;-webkit-margin-after: 1rem;&#34;&gt; * &lt;/p&gt;
    &lt;p style=&#34;-webkit-margin-before: 0;-webkit-margin-after: 0;&#34;&gt;though we apart, you&#39;re in my heart&lt;/p&gt;
    &lt;p style=&#34;-webkit-margin-before: 0;-webkit-margin-after: 0;&#34;&gt;and so it&#39;s lore, you are my more&lt;/p&gt;
    &lt;p style=&#34;-webkit-margin-before: 0;-webkit-margin-after: 0;&#34;&gt;conceived so lite, one faithful night&lt;/p&gt;
    &lt;p style=&#34;-webkit-margin-before: 0;-webkit-margin-after: 0;&#34;&gt;on one symposia, my own utopia&lt;/p&gt;
    &lt;p style=&#34;-webkit-margin-before: 1rem;-webkit-margin-after: 1rem;&#34;&gt; * &lt;/p&gt;
    &lt;p style=&#34;-webkit-margin-before: 0;-webkit-margin-after: 0;&#34;&gt;disposia&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;I&amp;rsquo;ve also made a nice looking &lt;a href=&#34;../../ode-to-disposia.html&#34;&gt;stand-alone page&lt;/a&gt;.&lt;/p&gt;
</description>
    </item><item>
      <title>Full disk encrypted ZFS with geli on FreeBSD</title>
      <link>https://max.irro.at/posts/freebsd-zfs-geli.html</link>
      <pubDate>Sat, 23 Feb 2013 00:00:00 +0000</pubDate>
      
      <guid>https://max.irro.at/posts/freebsd-zfs-geli.html</guid>
      <description>&lt;p&gt;I built myself a NAS of my own design lately for my old one did not perform to
the tasks I have in mind for those sorts of dedicated machines. Two of the many
desires I wanted to tackle were the utilisation of a modern file system and
properly encrypted disks. I had my eyes on FreeBSD and ZFS for quite a while and
so I decided the time was right.&lt;/p&gt;
&lt;p&gt;The problem was on how to achive the full disk encryption. ZFS does have this
feature, but only as of Zpool version 30. FreeBSD 9.1 on the other hand only
supports version 28 at this point. On my old maschine I used the Linux &lt;a href=&#34;http://en.wikipedia.org/wiki/Dm-crypt&#34;&gt;dm-crypt&lt;/a&gt; tool for encryption. Though I was
now very happy with it, it did perform the task, so I looked into similar
methods available on FreeBSD.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&#34;https://www.freebsd.org/doc/en/books/handbook/&#34;&gt;FreeBSD Handbook&lt;/a&gt; (great
resource as it always is) has a section on
&lt;a href=&#34;https://www.freebsd.org/doc/en/books/handbook/disks-encrypting.html&#34;&gt;Encrypting Disk Partitions&lt;/a&gt;
and points out a solution using &lt;a href=&#34;https://www.freebsd.org/cgi/man.cgi?geli&#34;&gt;geli&lt;/a&gt;.
This does work nicely, but the example uses keyfiles - something I did not want.
Also, one has to know the device name (or number, like &lt;code&gt;da2&lt;/code&gt;) of each disk.&lt;/p&gt;
&lt;p&gt;Every disk of mine has a name trivial name. I tend to mount them into a folder
with this name, and I would like it if I could reference the device with this
name too, so there will not be some name mixup in case the device number changes
due to a changing disk setup. There is a tool called
&lt;a href=&#34;https://www.freebsd.org/cgi/man.cgi?query=glabel&#34;&gt;glabel&lt;/a&gt; that does exactly
perform to the task. It assigns a labelname to a device, making it available
under &lt;code&gt;/dev/label/$labelname&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;disk-setup&#34;&gt;Disk setup&lt;/h2&gt;
&lt;p&gt;Well now, lets go through the steps needed to get an encrypted ZFS disk:&lt;/p&gt;
&lt;p&gt;First of all, we destroy any previous partitioning on the disk.
&lt;strong&gt;This will wipe the device clean&lt;/strong&gt;, therefore only proceed when you are
absolutely certain!&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#d8dee9;background-color:#2e3440;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;dd &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;if&lt;/span&gt;&lt;span style=&#34;color:#81a1c1&#34;&gt;=&lt;/span&gt;/dev/zero of&lt;span style=&#34;color:#81a1c1&#34;&gt;=&lt;/span&gt;/dev/$device bs&lt;span style=&#34;color:#81a1c1&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#b48ead&#34;&gt;512&lt;/span&gt; count&lt;span style=&#34;color:#81a1c1&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#b48ead&#34;&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now we create a new partitioning layout using the GPT (GUID Partition Table).&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#d8dee9;background-color:#2e3440;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;gpart create -s GPT $device
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Next, we assign the label to the device.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#d8dee9;background-color:#2e3440;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;glabel label -v $labelname /dev/$device
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Until now you had to know the &lt;code&gt;$device&lt;/code&gt; of the disk. From now on, we will only
reference it via the &lt;code&gt;$labelname&lt;/code&gt; we just assigned.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#d8dee9;background-color:#2e3440;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;geli init -s &lt;span style=&#34;color:#b48ead&#34;&gt;4096&lt;/span&gt; -e AES-XTS -J - /dev/label/$labelname
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And this is where it gets interesting. We just used &lt;code&gt;geli&lt;/code&gt; to initialise a
password protected GEOM container on the device. The &lt;code&gt;-j&lt;/code&gt; option will make
&lt;code&gt;geli&lt;/code&gt; prompt the password from the command line.&lt;/p&gt;
&lt;p&gt;From now on, the device &lt;code&gt;/dev/label/$labelname&lt;/code&gt; holds encrypted data. In order
to get a decrypted device we need to attach it.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#d8dee9;background-color:#2e3440;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;geli attach -d -j - /dev/label/$labelname
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;As in the previous step &lt;code&gt;-j&lt;/code&gt; will make &lt;code&gt;geli&lt;/code&gt; prompt the password from the
command line. The result of this step is a new device called
&lt;code&gt;/dev/label/$labelname.eli&lt;/code&gt;. This one is decrypted and we can use it as any
ordinary device. At this point it is still empty though, lacking even a file
system. So lets give it one.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#d8dee9;background-color:#2e3440;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;zpool create -m /$mountpoint/$labelname $labelname &lt;span style=&#34;color:#ebcb8b&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    /dev/label/$labelname.eli
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This will create a Zpool on the disk with the poolname equal to the &lt;code&gt;$labelname&lt;/code&gt;
we gave the disk. Additionally, it will set the mountpoint. This can be anywhere
within your file system. I have it in a special folder within the file system
root called &lt;code&gt;/frachtraum&lt;/code&gt; (German for &lt;em&gt;cargo bay&lt;/em&gt;), but you may choose any name
and place.&lt;/p&gt;
&lt;p&gt;And finally we do some tweaks.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#d8dee9;background-color:#2e3440;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;zfs &lt;span style=&#34;color:#81a1c1&#34;&gt;set&lt;/span&gt; compression&lt;span style=&#34;color:#81a1c1&#34;&gt;=&lt;/span&gt;lz4 $labelname
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;: As of FreeBSD 10 the &lt;code&gt;lz4&lt;/code&gt; compression algorithm is supported, and it
is quite a good choice. Previously I used &lt;code&gt;lzjb&lt;/code&gt; which was fine too.&lt;/p&gt;
&lt;p&gt;And of course, we do need permissions.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#d8dee9;background-color:#2e3440;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;chmod -R &lt;span style=&#34;color:#b48ead&#34;&gt;775&lt;/span&gt; /$mountpoint/$labelname
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And that&amp;rsquo;s it! There is our new full disk encrypted ZFS drive. The reason why I
use bash variables like &lt;code&gt;$device&lt;/code&gt;, &lt;code&gt;$labelname&lt;/code&gt; and &lt;code&gt;$mountpoint&lt;/code&gt; in all the
steps is because I do not tend to do this by hand, but within a script of
course. One does not want to make a tiny error and screw up the setup, you know.
All the variables are therefore provided as command line arguments.&lt;/p&gt;
&lt;h2 id=&#34;mounting-procedure&#34;&gt;Mounting procedure&lt;/h2&gt;
&lt;p&gt;Most likely one has more than one disk these days and running a decryption and
mounting procedure by hand after every restart (a home NAS does not run 24/7 in
general) tends to be quite dull, so some automation is in order. Basically, the
only thing you need is a list of you labelnames stored somewhere in you file
system. This - in opposition to an encryption keyfile - does not pose as a
security risk.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#d8dee9;background-color:#2e3440;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1&#34;&gt;echo&lt;/span&gt; -n &lt;span style=&#34;color:#a3be8c&#34;&gt;&amp;#34;enter password: &amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#eceff4&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;stty -echo
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1&#34;&gt;read&lt;/span&gt; password
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;stty &lt;span style=&#34;color:#81a1c1&#34;&gt;echo&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;LABELLIST&lt;span style=&#34;color:#81a1c1&#34;&gt;=(&lt;/span&gt; &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;$(&lt;/span&gt; &amp;lt; labellist.txt &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;)&lt;/span&gt; &lt;span style=&#34;color:#81a1c1&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;for&lt;/span&gt; labelname in &lt;span style=&#34;color:#a3be8c&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#a3be8c&#34;&gt;${&lt;/span&gt;LABELLIST&lt;span style=&#34;color:#eceff4&#34;&gt;[@]&lt;/span&gt;&lt;span style=&#34;color:#a3be8c&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#a3be8c&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#eceff4&#34;&gt;;&lt;/span&gt; &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#81a1c1&#34;&gt;echo&lt;/span&gt; $password &lt;span style=&#34;color:#eceff4&#34;&gt;|&lt;/span&gt; geli attach -d -j - /dev/label/$labelname
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;if&lt;/span&gt; &lt;span style=&#34;color:#81a1c1&#34;&gt;[&lt;/span&gt; $? -eq &lt;span style=&#34;color:#b48ead&#34;&gt;0&lt;/span&gt; &lt;span style=&#34;color:#81a1c1&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        zfs mount $labelname
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;fi&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#81a1c1;font-weight:bold&#34;&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is the very short version of my mounting script. I do have much more error handling and output eye candy involved, but this makes it a bit confusing to read.
Basically it prompts for the password and attaches the crypted device the same way used in the setup procedure. On success, it only performes a &lt;code&gt;zfs mount&lt;/code&gt;. We told ZFS where the Zpool should be mounted during setup, so no need to do it again.&lt;/p&gt;
&lt;h2 id=&#34;some-final-notes&#34;&gt;Some final notes&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;As you will have already noticed at this point, every disk gets its own Zpool, every Zpool containing exactly one ZFS. A lot of the great features of ZFS like mirroring or RaidZ are not used, therefore there is no redundancy involved in this setup. Many of you may not want this (and I myself am not entirely happy with it either)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Also, you will find that there are two ways for &lt;code&gt;glabel&lt;/code&gt; to write the label: &lt;em&gt;automatic&lt;/em&gt; and &lt;em&gt;manual&lt;/em&gt;. On the first glance &lt;em&gt;automatic&lt;/em&gt; seems like a good idea. But if you read the man page carefully, you will find that this method stores the label name in the &lt;strong&gt;last&lt;/strong&gt; sector of the GEOM provider (that is the disk). This sector is later overwritten by the geli encryption process - and therefore the label destroyed!&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If you do use a disk as an automatic backup target (lets say for OSXs time machine), I found it effective to use a stronger compression algorithm. ZFS also supports the &lt;code&gt;gzip&lt;/code&gt; algorithm family from compression level 1 to 9, the later  being the maximum. The results are quite effektive, though initial backups may take a little while longer. Yet it is not a good idea on disks storing a lot of already compressed data (like multimedia files). &lt;code&gt;gzip&lt;/code&gt; tries to compress it nevertheless, but fails of course, not without having spent a lot of time in the process, making write performance quite bad. &lt;code&gt;lz4&lt;/code&gt; on the other hand is quite quick in realising a lost cause and will not effekt performance noticeably.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The encryption key used for disk encryption is 4096 bits. At the time I wrote this script it was a good practice and there was no indication to worry. Yet this was before the Snowden leaks in Mid 2013 of course. And it seems that to Mid 2014 this still is a save keylength to stick to.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item><item>
      <title>Follow Zero - xkcd inspired art</title>
      <link>https://max.irro.at/posts/follow-zero.html</link>
      <pubDate>Sat, 11 Feb 2012 00:00:00 +0000</pubDate>
      
      <guid>https://max.irro.at/posts/follow-zero.html</guid>
      <description>&lt;p&gt;Recently while watching &lt;a href=&#34;http://en.wikipedia.org/wiki/Code_Geass&#34;&gt;Code Geass&lt;/a&gt; R2 I got an idea for what would make a funny &lt;a href=&#34;http://xkcd.com&#34;&gt;xkcd comic&lt;/a&gt;. So I tried myself in drawing the “complex” character design thats makes one of the secrets to the unique charm of xkcd. And I think I might made it.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
  &lt;img
    src=&#34;../../images/xkcd_follow_zero.jpg&#34;
    alt=&#34;Follow Zero&#34;
    loading=&#34;lazy&#34;
    
    title=&#34;Now, let&amp;#39;s see what&amp;#39;s Cornelia been up to lately&#34;
    
  /&gt;
  &lt;figcaption&gt;Follow Zero&lt;/figcaption&gt;
  &lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;&lt;em&gt;The picture is under a Creative Commons Attribution-NonCommercial 3.0 License.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;If you are not familiar with Code Geass, I recommend you to watch the series. It may be the best Anime I have ever seen (and I have seen a lot), and it contains something for everybody. Promised.&lt;/p&gt;
</description>
    </item></channel>
</rss>
