<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    
    <title>FBlag - Informatik</title>
    <link>http://www.frank-busse.de/blag/</link>
    <description>It's time you started living like the Pieceofschmidt you are.</description>
    <dc:language>de</dc:language>
    <generator>Serendipity 1.6 - http://www.s9y.org/</generator>
    
    

<item>
    <title>Xmonad and uzbl-browser</title>
    <link>http://www.frank-busse.de/blag/archives/522-Xmonad-and-uzbl-browser.html</link>
            <category>Informatik</category>
    
    <comments>http://www.frank-busse.de/blag/archives/522-Xmonad-and-uzbl-browser.html#comments</comments>
    <wfw:comment>http://www.frank-busse.de/blag/wfwcomment.php?cid=522</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.frank-busse.de/blag/rss.php?version=2.0&amp;type=comments&amp;cid=522</wfw:commentRss>
    

    <author>nospam@example.com (Frank)</author>
    <content:encoded>
    Every release of &lt;a href=&quot;http://www.opera.com/&quot;&gt;Opera&lt;/a&gt; seems to add more bugs¹ and useless features², whereas &lt;a href=&quot;http://www.mozilla.org/&quot;&gt;Firefox&lt;/a&gt; is featureless and slow without or feature-rich and ineffable slow with Add-ons. Time for an alternative! What I want is a small browser with external configurable handlers. What I don&#039;t need is qt-bloat, a Firefox clone or something with lua in it. &lt;a href=&quot;http://uzbl.org/&quot;&gt;uzbl&lt;/a&gt; seems to fit, but I&#039;m tired of learning new shortcuts for tabbing implementations. Everyone and his brother integrate tabs (terminal multiplexer, terminal, browser, editor...) but only one application should obviously manage tabs - the window manager. It turned out that my original configuration of xmonad wasn&#039;t the optimal solution. I&#039;d like to have the following behaviour:&lt;br /&gt;
&lt;br /&gt;
First workspace: keep master, switch focus to new window&lt;br /&gt;
&lt;pre style=&quot;line-height:0.7em;&quot;&gt;&lt;br /&gt;
+---------------+    +-----------+---+&lt;br /&gt;
|               |    |           | 2 |&lt;br /&gt;
|               |    |           |   |&lt;br /&gt;
|       1       | -&gt; |     1     | f |&lt;br /&gt;
|    (focus)    |    |           | o |&lt;br /&gt;
|               |    |           | c |&lt;br /&gt;
|               |    |           | . |&lt;br /&gt;
+---------------+    +-----------+---+&lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Second to fourth workspace: switch master and focus&lt;br /&gt;
&lt;pre style=&quot;line-height:0.7em;&quot;&gt;&lt;br /&gt;
+---------------+    +-----------+---+&lt;br /&gt;
|               |    |           | 1 |&lt;br /&gt;
|               |    |           |   |&lt;br /&gt;
|       1       | -&gt; |     2     |   |&lt;br /&gt;
|    (focus)    |    |  (focus)  |   |&lt;br /&gt;
|               |    |           |   |&lt;br /&gt;
|               |    |           |   |&lt;br /&gt;
+---------------+    +-----------+---+&lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Fifth workspace (for browsing): keep master and focus and use tabbed layout (open new links/tabs in background)&lt;br /&gt;
&lt;pre style=&quot;line-height:0.7em;&quot;&gt;&lt;br /&gt;
+---------------+    +-------+-------+&lt;br /&gt;
+---------------+    +-------+-------+&lt;br /&gt;
|               |    |               |&lt;br /&gt;
|       1       | -&gt; |       1       |&lt;br /&gt;
|    (focus)    |    |    (focus)    |&lt;br /&gt;
|               |    |               |&lt;br /&gt;
|               |    |               |&lt;br /&gt;
+---------------+    +---------------+&lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
These are the steps that were necessary to achieve this:&lt;br /&gt;
&lt;br /&gt;
1. copy xmonad-contrib-0.9.2/XMonad/Hooks/InsertPosition.hs to ./xmonad/lib/&lt;br /&gt;
2. apply the patch (sorry, no google account and no desire to install darcs again):&lt;br /&gt;
&lt;div class=&quot;diff geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: #888822;&quot;&gt;--- InsertPosition.hs&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #888822;&quot;&gt;+++ InsertPositionNew.hs&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #440088;&quot;&gt;@@ -16,15 +16,16 @@&lt;/span&gt;&lt;br /&gt;&amp;#160;module XMonad.Hooks.InsertPosition &lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160;-- * Usage&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160;-- $usage&lt;br /&gt;&lt;span style=&quot;color: #991111;&quot;&gt;- &amp;#160; &amp;#160;insertPosition&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #00b000;&quot;&gt;+ &amp;#160; &amp;#160;insertPosition,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #00b000;&quot;&gt;+ &amp;#160; &amp;#160;insertPositionPerWorkspace&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160;,Focus&lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;..&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt;, Position&lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;..&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt; where&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #991111;&quot;&gt;-import XMonad&lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;ManageHook, MonadReader&lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;ask&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #00b000;&quot;&gt;+import XMonad&lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;ManageHook, MonadReader&lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;ask&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt;, WorkspaceId&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&amp;#160;import qualified XMonad.StackSet as W&lt;br /&gt;&amp;#160;import Control.Applicative&lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;&amp;lt;$&amp;gt;&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160;import Data.Maybe&lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;fromMaybe&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #991111;&quot;&gt;-import Data.List&lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;find&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #00b000;&quot;&gt;+import Data.List&lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;find,lookup&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&amp;#160;import Data.Monoid&lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;Endo&lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;Endo&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160;-- $usage&lt;br /&gt;&lt;span style=&quot;color: #440088;&quot;&gt;@@ -44,26 +45,30 @@&lt;/span&gt;&lt;br /&gt;&amp;#160;-- | insertPosition. A manage hook for placing new windows. XMonad&#039;s default is&lt;br /&gt;&amp;#160;-- the same as using: @insertPosition Above Newer@.&lt;br /&gt;&amp;#160;insertPosition :: Position -&amp;gt; Focus -&amp;gt; ManageHook&lt;br /&gt;&lt;span style=&quot;color: #991111;&quot;&gt;-insertPosition pos foc = Endo . g &amp;lt;$&amp;gt; ask&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #00b000;&quot;&gt;+insertPosition = insertPositionPerWorkspace &lt;span style=&quot;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #00b000;&quot;&gt;+&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #00b000;&quot;&gt;+-- | Specify an insertPosition for a particular Workspace.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #00b000;&quot;&gt;+insertPositionPerWorkspace :: &lt;span style=&quot;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;WorkspaceId, &lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;Position, Focus&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;&quot;&gt;&amp;#93;&lt;/span&gt; -&amp;gt; Position -&amp;gt; Focus -&amp;gt; ManageHook&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #00b000;&quot;&gt;+insertPositionPerWorkspace l pos foc = Endo . g &amp;lt;$&amp;gt; ask&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160;where&lt;br /&gt;&lt;span style=&quot;color: #991111;&quot;&gt;- &amp;#160; &amp;#160;g w = viewingWs w &lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;updateFocus w . ins w . W.delete w&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #991111;&quot;&gt;- &amp;#160; &amp;#160;ins w = &lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;\f ws -&amp;gt; fromMaybe id &lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;W.focusWindow &amp;lt;$&amp;gt; W.peek ws&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt; $ f ws&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt; $&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #991111;&quot;&gt;- &amp;#160; &amp;#160; &amp;#160; &amp;#160;case pos of&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #00b000;&quot;&gt;+ &amp;#160; &amp;#160;g w = viewingWs w &lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;\i -&amp;gt; updateFocus i w . ins i w . W.delete w&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #00b000;&quot;&gt;+ &amp;#160; &amp;#160;ins i w = &lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;\f ws -&amp;gt; fromMaybe id &lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;W.focusWindow &amp;lt;$&amp;gt; W.peek ws&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt; $ f ws&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt; $&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #00b000;&quot;&gt;+ &amp;#160; &amp;#160; &amp;#160; &amp;#160;case fst $ fromMaybe &lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;pos,foc&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;lookup i l&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt; of&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;Master -&amp;gt; W.insertUp w . W.focusMaster&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;End &amp;#160; &amp;#160;-&amp;gt; insertDown w . W.modify&#039; focusLast&#039;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;Above &amp;#160;-&amp;gt; W.insertUp w&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;Below &amp;#160;-&amp;gt; insertDown w&lt;br /&gt;&lt;span style=&quot;color: #991111;&quot;&gt;- &amp;#160; &amp;#160;updateFocus =&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #991111;&quot;&gt;- &amp;#160; &amp;#160; &amp;#160; &amp;#160;case foc of&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #00b000;&quot;&gt;+ &amp;#160; &amp;#160;updateFocus i =&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #00b000;&quot;&gt;+ &amp;#160; &amp;#160; &amp;#160; &amp;#160;case snd $ fromMaybe &lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;pos,foc&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;lookup i l&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt; of&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;Older -&amp;gt; const id&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;Newer -&amp;gt; W.focusWindow&lt;br /&gt;&lt;br /&gt;&amp;#160;-- | Modify the StackSet when the workspace containing w is focused&lt;br /&gt;&lt;span style=&quot;color: #991111;&quot;&gt;-viewingWs :: &lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;Eq a, Eq s, Eq i, Show i&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt; =&amp;gt;a-&amp;gt; &lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;W.StackSet i l a s sd -&amp;gt; W.StackSet i l a s sd&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt;-&amp;gt; W.StackSet i l a s sd-&amp;gt; W.StackSet i l a s sd&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #00b000;&quot;&gt;+viewingWs :: &lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;Eq a, Eq s, Eq i, Show i&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt; =&amp;gt;a-&amp;gt; &lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;i -&amp;gt; W.StackSet i l a s sd -&amp;gt; W.StackSet i l a s sd&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt;-&amp;gt; W.StackSet i l a s sd-&amp;gt; W.StackSet i l a s sd&lt;/span&gt;&lt;br /&gt;&amp;#160;viewingWs w f = do&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160;i &amp;lt;- W.tag . W.workspace . W.current&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160;ws &amp;lt;- find &lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;elem w . W.integrate&#039; . W.stack&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt; . W.workspaces&lt;br /&gt;&lt;span style=&quot;color: #991111;&quot;&gt;- &amp;#160; &amp;#160;maybe id &lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;fmap &lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;W.view i . f&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt; . W.view . W.tag&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt; ws&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #00b000;&quot;&gt;+ &amp;#160; &amp;#160;maybe id &lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;fmap &lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;W.view i . f i&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt; . W.view . W.tag&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt; ws&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160;-- | &#039;insertDown&#039; and &#039;focusLast&#039; belong in XMonad.StackSet?&lt;br /&gt;&amp;#160;insertDown :: &lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;Eq a&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt; =&amp;gt; a -&amp;gt; W.StackSet i l a s sd -&amp;gt; W.StackSet i l a s sd&lt;br /&gt;&amp;#160;&lt;/div&gt;&lt;br /&gt;
3. reconfigure ./xmonad/xmonad.hs&lt;br /&gt;
&lt;br /&gt;
add imports:&lt;br /&gt;
&lt;div class=&quot;haskell geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: #06c; font-weight: bold;&quot;&gt;import&lt;/span&gt; InsertPositionNew&lt;br /&gt;&lt;span style=&quot;color: #06c; font-weight: bold;&quot;&gt;import&lt;/span&gt; XMonad&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.&lt;/span&gt;Hooks&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.&lt;/span&gt;ManageHelpers&lt;br /&gt;&lt;span style=&quot;color: #06c; font-weight: bold;&quot;&gt;import&lt;/span&gt; XMonad&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.&lt;/span&gt;Layout&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.&lt;/span&gt;PerWorkspace&lt;br /&gt;&amp;#160;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
add shortcut for uzbl-browser:&lt;br /&gt;
&lt;div class=&quot;haskell geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;modm&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; xK&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;_&lt;/span&gt;u&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; spawn &lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;uzbl-browser&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
change layout hook:&lt;br /&gt;
&lt;div class=&quot;haskell geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;myLayout &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt;&lt;br /&gt;&amp;#160; modWorkspaces myWorkspaces avoidStruts &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;$&lt;/span&gt;&lt;br /&gt;&amp;#160; onWorkspace &lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;5:www&amp;quot;&lt;/span&gt; simpleTabbedAlways &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;$&lt;/span&gt;&lt;br /&gt;&amp;#160; tiled &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;|||&lt;/span&gt; Mirror tiled &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;|||&lt;/span&gt; simpleTabbedAlways &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;|||&lt;/span&gt; Full&lt;br /&gt;&amp;#160; &lt;span style=&quot;color: #06c; font-weight: bold;&quot;&gt;where&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- default tiling algorithm partitions the screen into two panes&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160;tiled &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; Tall nmaster delta ratio&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- The default number of windows in the master pane&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160;nmaster &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- Default proportion of screen occupied by master pane&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- ratio &amp;#160; = 1/2&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160;ratio &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;7&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;10&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- Percent of screen to increment by when resizing panes&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- delta &amp;#160; = 3/100&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160;delta &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;100&lt;/span&gt;&lt;br /&gt;&amp;#160;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
create manage hooks&lt;br /&gt;
&lt;div class=&quot;haskell geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;myManageHookFloat &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; composeAll&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: green;&quot;&gt;&amp;#91;&lt;/span&gt; className &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=?&lt;/span&gt; &lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;Gimp&amp;quot;&lt;/span&gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;--&amp;gt;&lt;/span&gt; doFloat&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; className &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=?&lt;/span&gt; &lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;MPlayer&amp;quot;&lt;/span&gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;--&amp;gt;&lt;/span&gt; doFloat&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;className &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=?&lt;/span&gt; &lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;Firefox&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;&amp;lt;&amp;amp;&amp;amp;&amp;gt;&lt;/span&gt; role &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=?&lt;/span&gt; &lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;Manager&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;--&amp;gt;&lt;/span&gt; doFloat&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: green;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;&amp;lt;+&amp;gt;&lt;/span&gt; composeOne &lt;span style=&quot;color: green;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; isDialog &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;-?&amp;gt;&lt;/span&gt; doCenterFloat&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: green;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #06c; font-weight: bold;&quot;&gt;where&lt;/span&gt; role &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; stringProperty &lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;WM_WINDOW_ROLE&amp;quot;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;myManageHookShift &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; composeAll&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: green;&quot;&gt;&amp;#91;&lt;/span&gt; className &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=?&lt;/span&gt; &lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;Uzbl-core&amp;quot;&lt;/span&gt; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;--&amp;gt;&lt;/span&gt; doShift &lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;5:www&amp;quot;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; className &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=?&lt;/span&gt; &lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;Firefox&amp;quot;&lt;/span&gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;--&amp;gt;&lt;/span&gt; doShift &lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;5:www&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;myManageHookPosition &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; insertPositionPerWorkspace &lt;span style=&quot;color: green;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;1&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;Below&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt;Newer&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;5:www&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;Below&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt;Older&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#93;&lt;/span&gt; Above Newer&lt;br /&gt;&amp;#160;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
combine manage hooks and override the default config:&lt;br /&gt;
&lt;div class=&quot;haskell geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; manageHook &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; myManageHookFloat &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;&amp;lt;+&amp;gt;&lt;/span&gt; myManageHookPosition &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;&amp;lt;+&amp;gt;&lt;/span&gt; myManageHookShift&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt;&lt;br /&gt;&amp;#160;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Done.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://frank-busse.de/bilder/rechner/uzbl_xmonad.png&quot;&gt;&lt;img src=&quot;http://frank-busse.de/bilder/rechner/uzbl_xmonad_small.png&quot; alt=&quot;multiple uzbl-browser windows within xmonad tabbed layout&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
¹ last one: the bookmark menu needs 30s to load all bookmarks&lt;br /&gt;
² webserver(!), torrent- and unusable mail client 
    </content:encoded>

    <pubDate>Tue, 06 Sep 2011 20:14:17 +0200</pubDate>
    <guid isPermaLink="false">http://www.frank-busse.de/blag/archives/522-guid.html</guid>
    <category>Firefox</category>
<category>Opera</category>
<category>lua</category>
<category>uzbl</category>
<category>xmonad</category>

</item>
<item>
    <title>ne keycodes</title>
    <link>http://www.frank-busse.de/blag/archives/520-ne-keycodes.html</link>
            <category>Informatik</category>
    
    <comments>http://www.frank-busse.de/blag/archives/520-ne-keycodes.html#comments</comments>
    <wfw:comment>http://www.frank-busse.de/blag/wfwcomment.php?cid=520</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.frank-busse.de/blag/rss.php?version=2.0&amp;type=comments&amp;cid=520</wfw:commentRss>
    

    <author>nospam@example.com (Frank)</author>
    <content:encoded>
    To get expected behaviour for home, end and backspace in ne with rxvt-unicode, start ne (the &quot;&lt;a href=&quot;http://ne.dsi.unimi.it/&quot;&gt;nice editor&lt;/a&gt;&quot;), press Ctrl+k for the command prompt, enter kc and in the new prompt press the specific key for the key code. Afterwards adjust the config file:&lt;br /&gt;
&lt;div class=&quot;bash geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;cat&lt;/span&gt; .ne&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;.keys&lt;br /&gt;KEY &lt;span style=&quot;color: #000000;&quot;&gt;105&lt;/span&gt; MoveSOL&lt;br /&gt;KEY &lt;span style=&quot;color: #000000;&quot;&gt;106&lt;/span&gt; MoveEOL&lt;br /&gt;KEY &amp;#160;7f Backspace&lt;/div&gt; 
    </content:encoded>

    <pubDate>Wed, 24 Aug 2011 19:55:20 +0200</pubDate>
    <guid isPermaLink="false">http://www.frank-busse.de/blag/archives/520-guid.html</guid>
    <category>keycode</category>
<category>ne</category>
<category>urxvt</category>

</item>
<item>
    <title>checking string routines with Klee</title>
    <link>http://www.frank-busse.de/blag/archives/516-checking-string-routines-with-Klee.html</link>
            <category>Informatik</category>
    
    <comments>http://www.frank-busse.de/blag/archives/516-checking-string-routines-with-Klee.html#comments</comments>
    <wfw:comment>http://www.frank-busse.de/blag/wfwcomment.php?cid=516</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.frank-busse.de/blag/rss.php?version=2.0&amp;type=comments&amp;cid=516</wfw:commentRss>
    

    <author>nospam@example.com (Frank)</author>
    <content:encoded>
    Two months ago I discovered some bugs in &lt;a href=&quot;http://www.libpng.org/pub/png/libpng.html&quot;&gt;libpng&lt;/a&gt; (&lt;a href=&quot;http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2011-2501&quot;&gt;CVE-2011-2501&lt;/a&gt;, &lt;a href=&quot;http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2011-2692&quot;&gt;CVE-2011-2692&lt;/a&gt;). In the &lt;a href=&quot;http://sourceforge.net/mailarchive/message.php?msg_id=27625024&quot;&gt;discussion&lt;/a&gt;¹ of the second bug I have criticized that libpng is often too permissive in the chunk validation. An example was the unchecked use of strtod(), which allows &quot;infinity&quot; or &quot;nan&quot; as valid values in the ASCII floating point representation in sCAL or pCAL chunks.&lt;br /&gt;
&lt;br /&gt;
These chunks contain byte strings in a quite &lt;a href=&quot;http://www.libmng.com/pub/png/spec/register/pngext-1.3.0-pdg.txt.gz&quot;&gt;simple format&lt;/a&gt;:&lt;br /&gt;
&lt;blockquote&gt;&lt;h2&gt;1.2. Floating-point values&lt;/h2&gt;&lt;br /&gt;
&lt;br /&gt;
The core of PNG does not use floating-point numbers anywhere; it uses integers or, where applicable, fixed-point fractional values. However, special-purpose chunks may need to represent values that do not fit comfortably in fixed-point notation. The textual floating-point notation defined here is recommended for use in all such cases. This representation is simple, has no a priori limits on range or precision, and is portable across all machines.&lt;br /&gt;
&lt;br /&gt;
A floating-point value in this notation is represented by an ASCII text string in a standardized decimal floating-point format. The string is variable-length and must be terminated by a null (zero) character unless it is the last item in its chunk. The string consists of an optional sign (&quot;+&quot; or &quot;-&quot;), an integer part, a fraction part beginning with a decimal point (&quot;.&quot;), and an exponent part beginning with an &quot;E&quot; or &quot;e&quot; and optional sign. The integer, fraction, and exponent parts each contain one or more digits (ASCII &quot;0&quot; to &quot;9&quot;). Either the integer part or the fraction part, but not both, may be omitted. A decimal point is allowed, but not required, if there is no fraction part. The exponent part may be omitted. No spaces or any other character besides those specified may appear.&lt;br /&gt;
&lt;br /&gt;
Note in particular that C-language &quot;F&quot; and &quot;L&quot; suffixes are not allowed, the string &quot;.&quot; is not allowed as a shorthand for 0 as in some other programming languages, and no commas or underscores are allowed. This format ought to be easily readable in all programming environments. &lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
Later I wondered, if I can use &lt;a href=&quot;http://klee.llvm.org/&quot;&gt;KLEE&lt;/a&gt; to find specification mismatches in string handling routines. And what should I say, it worked. I just tested in one direction: if strtod() returns without an error, the string should be valid according to the PNG specification. Of course that&#039;s wrong, but this assumption should reveal the cases where the strtod() implementation and the PNG specification differ.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;c geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: #339933;&quot;&gt;#include &amp;lt;assert.h&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #339933;&quot;&gt;#include &amp;lt;ctype.h&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #339933;&quot;&gt;#include &amp;lt;errno.h&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #339933;&quot;&gt;#include &amp;lt;math.h&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #339933;&quot;&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #339933;&quot;&gt;#include &amp;lt;string.h&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #339933;&quot;&gt;#include &amp;lt;klee/klee.h&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #993333;&quot;&gt;int&lt;/span&gt; is_png_fp&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #993333;&quot;&gt;char&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;*&lt;/span&gt; p&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;char&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;*&lt;/span&gt; pe&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #993333;&quot;&gt;int&lt;/span&gt; cs&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #339933;&quot;&gt;%%&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; machine png_fp&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; write data&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; main &lt;span style=&quot;color: #339933;&quot;&gt;:=&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;+&lt;/span&gt;\&lt;span style=&quot;color: #339933;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;?&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000dd;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #0000dd;&quot;&gt;9&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;.&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;?&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;|&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000dd;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #0000dd;&quot;&gt;9&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;.&#039;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000dd;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #0000dd;&quot;&gt;9&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;|&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;.&#039;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000dd;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #0000dd;&quot;&gt;9&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;Ee&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;+&lt;/span&gt;\&lt;span style=&quot;color: #339933;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;?&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000dd;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #0000dd;&quot;&gt;9&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;?;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; write init&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; write exec&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;%%&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; cs &lt;span style=&quot;color: #339933;&quot;&gt;&amp;gt;=&lt;/span&gt; png_fp_first_final&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #993333;&quot;&gt;int&lt;/span&gt; main&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #993333;&quot;&gt;int&lt;/span&gt; argc&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;char&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;**&lt;/span&gt;argv&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #993333;&quot;&gt;double&lt;/span&gt; d&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// create symbolic string&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #993333;&quot;&gt;char&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;*&lt;/span&gt;s &amp;#160;&lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;____&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; klee_make_symbolic&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;s&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000dd;&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;s&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; s&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000dd;&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;\0&lt;/span&gt;&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #993333;&quot;&gt;char&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;*&lt;/span&gt;se &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; s &lt;span style=&quot;color: #339933;&quot;&gt;+&lt;/span&gt; &lt;a href=&quot;http://www.opengroup.org/onlinepubs/009695399/functions/strlen.html&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;strlen&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;s&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #993333;&quot;&gt;char&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;*&lt;/span&gt;se_&lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; se&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// call strtod and omit error cases&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; errno &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; d &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.opengroup.org/onlinepubs/009695399/functions/strtod.html&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;strtod&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;s&lt;span style=&quot;color: #339933;&quot;&gt;,&amp;amp;&lt;/span&gt;se_&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;errno &lt;span style=&quot;color: #339933;&quot;&gt;!=&lt;/span&gt; &lt;span style=&quot;color: #0000dd;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;||&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;s &lt;span style=&quot;color: #339933;&quot;&gt;==&lt;/span&gt; se_&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; klee_silent_exit&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000dd;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// ---- mismatches ----&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// data: &#039;0z\x00\x00\x00&#039; (allowed trailing characters)&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;*&lt;/span&gt;se_ &lt;span style=&quot;color: #339933;&quot;&gt;!=&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;\0&lt;/span&gt;&#039;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt; klee_silent_exit&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000dd;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// data: &#039;\x0c0\x00\x00\x00&#039; (allowed leading whitespace)&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.opengroup.org/onlinepubs/009695399/functions/isspace.html&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;isspace&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;s&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000dd;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt; klee_silent_exit&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000dd;&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// data: &#039;iNF\x00\x00&#039; (infinity)&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;isinf&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;d&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt; klee_silent_exit&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000dd;&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// data: &#039;nAN\x00\x00&#039; (not a number)&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;isnan&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;d&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt; klee_silent_exit&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000dd;&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// assertion: s is in png ascii floating point format&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;a href=&quot;http://www.opengroup.org/onlinepubs/009695399/functions/assert.html&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;assert&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;is_png_fp&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;s&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;se&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #0000dd;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
For the description of the floating point strings I used a regular expression. In is_png_fp() this regular expression is converted into an automaton via &lt;a href=&quot;http://www.complang.org/ragel/&quot;&gt;ragel&lt;/a&gt; to forgo unnecessary regex-libraries. If one runs the example code with KLEE, the cases in the &quot;mismatches&quot;-section break the assertion. Leading whitespaces, trailing characters, infinity and not a number - all valid in C99/POSIX/GNU but not in PNG. At first I missed the hexadecimal representation but then I realized, that the uclibc I use with KLEE was build without hex-support.&lt;br /&gt;
&lt;br /&gt;
A quick sample run with commented mismatch section in example.c for those who want to follow my short notes. ;)&lt;br /&gt;
&lt;div class=&quot;bash geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;ragel &lt;span style=&quot;color: #660033;&quot;&gt;-m&lt;/span&gt; &lt;span style=&quot;color: #660033;&quot;&gt;-o&lt;/span&gt; gen.c example.c&lt;br /&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;llvm-gcc &lt;span style=&quot;color: #660033;&quot;&gt;-c&lt;/span&gt; &lt;span style=&quot;color: #660033;&quot;&gt;-emit-llvm&lt;/span&gt; -I&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;path to klee&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;gt;/&lt;/span&gt;include gen.c &lt;span style=&quot;color: #660033;&quot;&gt;-o&lt;/span&gt; genc&lt;br /&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;klee &lt;span style=&quot;color: #660033;&quot;&gt;--libc&lt;/span&gt;=uclibc &lt;span style=&quot;color: #660033;&quot;&gt;--optimize&lt;/span&gt; &lt;span style=&quot;color: #660033;&quot;&gt;--only-output-states-covering-new&lt;/span&gt; .&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;genc&lt;br /&gt;KLEE: output directory = &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;klee-out-37&amp;quot;&lt;/span&gt;&lt;br /&gt;WARNING: While resolving call to &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;__user_main&#039;&lt;/span&gt; arguments were dropped&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;!&lt;/span&gt;&lt;br /&gt;KLEE: WARNING: undefined reference to function: _stdio_term&lt;br /&gt;KLEE: WARNING: undefined reference to function: fcntl&lt;br /&gt;KLEE: WARNING: undefined reference to function: fstat&lt;br /&gt;KLEE: WARNING: undefined reference to function: open&lt;br /&gt;KLEE: WARNING: executable has module level assembly &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#40;&lt;/span&gt;ignoring&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;KLEE: WARNING: silently concretizing &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#40;&lt;/span&gt;reason: floating point&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#41;&lt;/span&gt; expression &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#40;&lt;/span&gt;Add w32 &lt;span style=&quot;color: #000000;&quot;&gt;4294967248&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#40;&lt;/span&gt;SExt w32 &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#40;&lt;/span&gt;Read w8 &lt;span style=&quot;color: #000000;&quot;&gt;0&lt;/span&gt; arr1&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#41;&lt;/span&gt; to value &lt;span style=&quot;color: #000000;&quot;&gt;7&lt;/span&gt; &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#40;&lt;/span&gt;:&lt;span style=&quot;color: #000000;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;KLEE: ERROR: ASSERTION FAIL: is_png_fp&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#40;&lt;/span&gt;s,se&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;KLEE: NOTE: now ignoring this error at this location&lt;br /&gt;&lt;br /&gt;KLEE: done: total instructions = &lt;span style=&quot;color: #000000;&quot;&gt;154995&lt;/span&gt;&lt;br /&gt;KLEE: done: completed paths = &lt;span style=&quot;color: #000000;&quot;&gt;645&lt;/span&gt;&lt;br /&gt;KLEE: done: generated tests = &lt;span style=&quot;color: #000000;&quot;&gt;13&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
The first found case are the trailing characters:&lt;br /&gt;
&lt;div class=&quot;bash geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;ktest-tool klee-last&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;test000002.ktest&lt;br /&gt;ktest &lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;file&lt;/span&gt; : &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;klee-last/test000002.ktest&#039;&lt;/span&gt;&lt;br /&gt;args &amp;#160; &amp;#160; &amp;#160; : &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;./genc&#039;&lt;/span&gt;&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;br /&gt;num objects: &lt;span style=&quot;color: #000000;&quot;&gt;1&lt;/span&gt;&lt;br /&gt;object &amp;#160; &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;0&lt;/span&gt;: name: &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;s&#039;&lt;/span&gt;&lt;br /&gt;object &amp;#160; &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;0&lt;/span&gt;: size: &lt;span style=&quot;color: #000000;&quot;&gt;5&lt;/span&gt;&lt;br /&gt;object &amp;#160; &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;0&lt;/span&gt;: data: &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;777z\x00&#039;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
A satisfying regular expression is:&lt;br /&gt;
&lt;div class=&quot;c geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; dec &amp;#160; &amp;#160;&lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;+&lt;/span&gt;\&lt;span style=&quot;color: #339933;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;?&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000dd;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #0000dd;&quot;&gt;9&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;.&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;?&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;|&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000dd;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #0000dd;&quot;&gt;9&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;.&#039;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000dd;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #0000dd;&quot;&gt;9&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;|&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;.&#039;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000dd;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #0000dd;&quot;&gt;9&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;Ee&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;+&lt;/span&gt;\&lt;span style=&quot;color: #339933;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;?&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000dd;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #0000dd;&quot;&gt;9&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;?;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; main &amp;#160;&lt;span style=&quot;color: #339933;&quot;&gt;:=&lt;/span&gt; space&lt;span style=&quot;color: #339933;&quot;&gt;*&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;/&lt;/span&gt;inf&lt;span style=&quot;color: #339933;&quot;&gt;/&lt;/span&gt;i &lt;span style=&quot;color: #339933;&quot;&gt;|&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;/&lt;/span&gt;nan&lt;span style=&quot;color: #339933;&quot;&gt;/&lt;/span&gt;i &lt;span style=&quot;color: #339933;&quot;&gt;|&lt;/span&gt; dec&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; any&lt;span style=&quot;color: #339933;&quot;&gt;*;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
Keep in mind, that this is no equivalence check. The defined language could be a superset of the language of the accepted strings of strtod().&lt;br /&gt;
&lt;br /&gt;
The corresponding automata images were generated with &lt;a href=&quot;http://www.graphviz.org/&quot;&gt;dot&lt;/a&gt;:&lt;br /&gt;
&lt;div class=&quot;bash geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;ragel &lt;span style=&quot;color: #660033;&quot;&gt;-mpV&lt;/span&gt; example.c &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;|&lt;/span&gt; dot &lt;span style=&quot;color: #660033;&quot;&gt;-Tgif&lt;/span&gt; &lt;span style=&quot;color: #660033;&quot;&gt;-o&lt;/span&gt; ragel_strtod.gif&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
strtod():&lt;br /&gt;
&lt;a href=&quot;http://frank-busse.de/bilder/rechner/ragel_strtod.gif&quot;&gt;&lt;img src=&quot;http://frank-busse.de/bilder/rechner/ragel_strtod_small.gif&quot; alt=&quot;strtod automaton&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
png floating point:&lt;br /&gt;
&lt;a href=&quot;http://frank-busse.de/bilder/rechner/ragel_pngfp.gif&quot;&gt;&lt;img src=&quot;http://frank-busse.de/bilder/rechner/ragel_pngfp_small.gif&quot; alt=&quot;png floating point automaton&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Papers you might be interested in:&lt;br /&gt;
&lt;ul&gt;&lt;br /&gt;
&lt;li&gt;&lt;a href=&quot;http://people.csail.mit.edu/akiezun/issta54-kiezun.pdf&quot;&gt;A. Kiezun, V. Ganesh, P. J. Guo. HAMPI: A Solver for String Constraints&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;
&lt;li&gt;&lt;a href=&quot;http://www.usenix.org/event/osdi08/tech/full_papers/cadar/cadar.pdf&quot;&gt;C. Cadar, D. Dunbar, D. Engler. KLEE: Unassisted and Automatic Generation of High-Coverage Tests for Complex Systems Programs&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;
&lt;li&gt;&lt;a href=&quot;http://keeda.stanford.edu/~daramos/papers/ucklee-cav-2011.pdf&quot;&gt;D. Ramos, D. Engler. Practical, low-effort equivalence verification of real code&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;
&lt;li&gt;&lt;a href=&quot;http://www3.nccu.edu.tw/~yuf/spin08.pdf&quot;&gt;F. Yu, T. Bultan, M. Cova, O. Ibarra. Symbolic String Verification: An Automata-based Approach&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;br /&gt;
¹ No, I still don&#039;t know their definition of &quot;non-positive&quot;. 
    </content:encoded>

    <pubDate>Tue, 09 Aug 2011 19:14:29 +0200</pubDate>
    <guid isPermaLink="false">http://www.frank-busse.de/blag/archives/516-guid.html</guid>
    <category>C</category>
<category>Klee</category>
<category>dot</category>
<category>ragel</category>
<category>regular expression</category>
<category>strtod</category>
<category>uclibc</category>

</item>
<item>
    <title>resort PNG chunks</title>
    <link>http://www.frank-busse.de/blag/archives/514-resort-PNG-chunks.html</link>
            <category>Informatik</category>
    
    <comments>http://www.frank-busse.de/blag/archives/514-resort-PNG-chunks.html#comments</comments>
    <wfw:comment>http://www.frank-busse.de/blag/wfwcomment.php?cid=514</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.frank-busse.de/blag/rss.php?version=2.0&amp;type=comments&amp;cid=514</wfw:commentRss>
    

    <author>nospam@example.com (Frank)</author>
    <content:encoded>
    If you ever needed to resort or drop chunks in a png file or to repair the signature and crc values, this one-evening-hack might be useful next time.&lt;br /&gt;
&lt;br /&gt;
Resort chunks:&lt;br /&gt;
&lt;div class=&quot;bash geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;.&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;png_resort.py brokensuite&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;hist_after_idat.png foo.png&lt;br /&gt;File: brokensuite&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;hist_after_idat.png&lt;br /&gt;No. Type &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#40;&lt;/span&gt;Position,Length&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #660033;&quot;&gt;--------------------------&lt;/span&gt;&lt;br /&gt;&amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;0&lt;/span&gt;. IHDR &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;8&lt;/span&gt;,&lt;span style=&quot;color: #000000;&quot;&gt;25&lt;/span&gt;&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;1&lt;/span&gt;. gAMA &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;33&lt;/span&gt;,&lt;span style=&quot;color: #000000;&quot;&gt;16&lt;/span&gt;&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;2&lt;/span&gt;. sBIT &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;49&lt;/span&gt;,&lt;span style=&quot;color: #000000;&quot;&gt;15&lt;/span&gt;&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;3&lt;/span&gt;. PLTE &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;64&lt;/span&gt;,&lt;span style=&quot;color: #000000;&quot;&gt;57&lt;/span&gt;&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;4&lt;/span&gt;. IDAT &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;121&lt;/span&gt;,&lt;span style=&quot;color: #000000;&quot;&gt;83&lt;/span&gt;&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;5&lt;/span&gt;. hIST &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;204&lt;/span&gt;,&lt;span style=&quot;color: #000000;&quot;&gt;42&lt;/span&gt;&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;6&lt;/span&gt;. IEND &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;246&lt;/span&gt;,&lt;span style=&quot;color: #000000;&quot;&gt;12&lt;/span&gt;&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;Enter new order &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#40;&lt;/span&gt;p.ex.: &lt;span style=&quot;color: #000000;&quot;&gt;0&lt;/span&gt;,&lt;span style=&quot;color: #000000;&quot;&gt;3&lt;/span&gt;..&lt;span style=&quot;color: #000000;&quot;&gt;5&lt;/span&gt;,&lt;span style=&quot;color: #000000;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#41;&lt;/span&gt;: &lt;span style=&quot;color: #000000;&quot;&gt;0&lt;/span&gt;..&lt;span style=&quot;color: #000000;&quot;&gt;3&lt;/span&gt;,&lt;span style=&quot;color: #000000;&quot;&gt;5&lt;/span&gt;,&lt;span style=&quot;color: #000000;&quot;&gt;4&lt;/span&gt;,&lt;span style=&quot;color: #000000;&quot;&gt;6&lt;/span&gt;&lt;br /&gt;New order: &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;0&lt;/span&gt;, &lt;span style=&quot;color: #000000;&quot;&gt;1&lt;/span&gt;, &lt;span style=&quot;color: #000000;&quot;&gt;2&lt;/span&gt;, &lt;span style=&quot;color: #000000;&quot;&gt;3&lt;/span&gt;, &lt;span style=&quot;color: #000000;&quot;&gt;5&lt;/span&gt;, &lt;span style=&quot;color: #000000;&quot;&gt;4&lt;/span&gt;, &lt;span style=&quot;color: #000000;&quot;&gt;6&lt;/span&gt;&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;br /&gt;&amp;#160;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Drop chunks and repair crc:&lt;br /&gt;
&lt;div class=&quot;bash geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;.&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;png_resort.py brokensuite&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;chunk_crc.png bar.png&lt;br /&gt;File: brokensuite&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;chunk_crc.png&lt;br /&gt;No. Type &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#40;&lt;/span&gt;Position,Length&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #660033;&quot;&gt;--------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#91;&lt;/span&gt;Error&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#93;&lt;/span&gt; Test failed: chunk crc&lt;br /&gt;repair crc &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#91;&lt;/span&gt;y&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;|&lt;/span&gt;n&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#93;&lt;/span&gt;:y&lt;br /&gt;&amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;0&lt;/span&gt;. IHDR &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;8&lt;/span&gt;,&lt;span style=&quot;color: #000000;&quot;&gt;25&lt;/span&gt;&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;1&lt;/span&gt;. gAMA &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;33&lt;/span&gt;,&lt;span style=&quot;color: #000000;&quot;&gt;16&lt;/span&gt;&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;2&lt;/span&gt;. PLTE &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;49&lt;/span&gt;,&lt;span style=&quot;color: #000000;&quot;&gt;780&lt;/span&gt;&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;3&lt;/span&gt;. IDAT &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;829&lt;/span&gt;,&lt;span style=&quot;color: #000000;&quot;&gt;445&lt;/span&gt;&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;4&lt;/span&gt;. IEND &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;1274&lt;/span&gt;,&lt;span style=&quot;color: #000000;&quot;&gt;12&lt;/span&gt;&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;Enter new order &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#40;&lt;/span&gt;p.ex.: &lt;span style=&quot;color: #000000;&quot;&gt;0&lt;/span&gt;,&lt;span style=&quot;color: #000000;&quot;&gt;3&lt;/span&gt;..&lt;span style=&quot;color: #000000;&quot;&gt;5&lt;/span&gt;,&lt;span style=&quot;color: #000000;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#41;&lt;/span&gt;: &lt;span style=&quot;color: #000000;&quot;&gt;0&lt;/span&gt;,&lt;span style=&quot;color: #000000;&quot;&gt;2&lt;/span&gt;..&lt;span style=&quot;color: #000000;&quot;&gt;4&lt;/span&gt;&lt;br /&gt;New order: &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;0&lt;/span&gt;, &lt;span style=&quot;color: #000000;&quot;&gt;2&lt;/span&gt;, &lt;span style=&quot;color: #000000;&quot;&gt;3&lt;/span&gt;, &lt;span style=&quot;color: #000000;&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;br /&gt;&amp;#160;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
For huge chunks you have to implement a more intelligent buffering (see read_bytes and writing).&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;python geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;#!/usr/bin/python3&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# select chunks from infile.png and write them resorted to outfile.png&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# usage: png_resort.py &amp;lt;infile.png&amp;gt; &amp;lt;outfile.png&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# user input:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# &amp;#160; comma separated list of chunk indices or index ranges&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# &amp;#160; &amp;#160; p.ex.: 0,2..4,1,5&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# &amp;#160; or &#039;exit&#039;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# Literature&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# ----------&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# Portable Network Graphics (PNG) Specification (Second Edition)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;import&lt;/span&gt; &lt;span style=&quot;color: #dc143c;&quot;&gt;readline&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #dc143c;&quot;&gt;struct&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #dc143c;&quot;&gt;sys&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #dc143c;&quot;&gt;zlib&lt;/span&gt; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# drop readline for less dependencies and comfort&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;from&lt;/span&gt; functools &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;import&lt;/span&gt; *&lt;br /&gt;&lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;from&lt;/span&gt; io &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;import&lt;/span&gt; *&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;png_signature &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; b&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\x&lt;/span&gt;89&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\x&lt;/span&gt;50&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\x&lt;/span&gt;4e&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\x&lt;/span&gt;47&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\x&lt;/span&gt;0d&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\x&lt;/span&gt;0a&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\x&lt;/span&gt;1a&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\x&lt;/span&gt;0a&#039;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;def&lt;/span&gt; print_error&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;*msgs&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #483d8b;&quot;&gt;&amp;quot;&amp;quot;&amp;quot;print highlighted error message(s)&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; msgs &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #483d8b;&quot;&gt;&#039; &#039;&lt;/span&gt;.&lt;span style=&quot;color: black;&quot;&gt;join&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #008000;&quot;&gt;map&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #008000;&quot;&gt;str&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;msgs&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\0&lt;/span&gt;33[1;31m[Error] {0}&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\0&lt;/span&gt;33[1;m&#039;&lt;/span&gt;.&lt;span style=&quot;color: black;&quot;&gt;format&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;msgs&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;def&lt;/span&gt; &lt;span style=&quot;color: #dc143c;&quot;&gt;test&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;title&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;condition&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;val&lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #008000;&quot;&gt;None&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #483d8b;&quot;&gt;&amp;quot;&amp;quot;&amp;quot;test condition, if false print test title and (maybe) val&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;if&lt;/span&gt; condition: &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;True&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;else&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; s &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;Test failed: {0} ({1})&#039;&lt;/span&gt;.&lt;span style=&quot;color: black;&quot;&gt;format&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;title&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;s&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;if&lt;/span&gt; val &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;Test failed: {0}&#039;&lt;/span&gt;.&lt;span style=&quot;color: black;&quot;&gt;format&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;title&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; print_error&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;s&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;False&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;def&lt;/span&gt; check_png_signature&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;f&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #483d8b;&quot;&gt;&amp;quot;&amp;quot;&amp;quot;read and validate png file signature&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# file signature (5.2)&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; sig &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; f.&lt;span style=&quot;color: black;&quot;&gt;read&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff4500;&quot;&gt;8&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;return&lt;/span&gt; \&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #dc143c;&quot;&gt;test&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;signature length&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #008000;&quot;&gt;len&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;sig&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #ff4500;&quot;&gt;8&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;and&lt;/span&gt; \&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #dc143c;&quot;&gt;test&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;signature&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;sig &lt;span style=&quot;color: #66cc66;&quot;&gt;==&lt;/span&gt; png_signature&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;def&lt;/span&gt; is_png_uint32&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;val&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# (7.1)&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #ff4500;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;lt;=&lt;/span&gt; val &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #ff4500;&quot;&gt;2&lt;/span&gt;**&lt;span style=&quot;color: #ff4500;&quot;&gt;31&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;def&lt;/span&gt; png_chunks&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;f&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #483d8b;&quot;&gt;&amp;quot;&amp;quot;&amp;quot;file -&amp;gt; [{&#039;type&#039;,&#039;pos&#039;,&#039;length&#039;[,&#039;crc&#039;]}]&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# chunk layout (5.3)&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# +-------------------------------------------------+&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# | length (4) | type (4) | data (length) | crc (4) |&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# +-------------------------------------------------+&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;def&lt;/span&gt; read_bytes&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;name&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;length&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #483d8b;&quot;&gt;&amp;quot;&amp;quot;&amp;quot;read length bytes&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; val &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; f.&lt;span style=&quot;color: black;&quot;&gt;read&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;length&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;len&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;val&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;lt;&lt;/span&gt; length:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; print_error&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;{0} &amp;lt; {1}&#039;&lt;/span&gt;.&lt;span style=&quot;color: black;&quot;&gt;format&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;name&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;length&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;raise&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;ValueError&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;else&lt;/span&gt;: &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;return&lt;/span&gt; val&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; ret &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; cnt &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #ff4500;&quot;&gt;0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;No. Type (Position,Length)&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&#039;&lt;/span&gt;+&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;-&#039;&lt;/span&gt;*&lt;span style=&quot;color: #ff4500;&quot;&gt;26&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;while&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;True&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# read chunk&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; pos &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; f.&lt;span style=&quot;color: black;&quot;&gt;tell&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; length_ &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; f.&lt;span style=&quot;color: black;&quot;&gt;read&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff4500;&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;len&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;length_&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #ff4500;&quot;&gt;4&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;length&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #dc143c;&quot;&gt;struct&lt;/span&gt;.&lt;span style=&quot;color: black;&quot;&gt;unpack_from&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;!I&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;length_&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ff4500;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;try&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; type_ &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; read_bytes&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;chunk type&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ff4500;&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; data &amp;#160;&lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; read_bytes&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;chunk data&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;length&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;if&lt;/span&gt; length &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #ff4500;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;else&lt;/span&gt; b&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; crc__ &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; read_bytes&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;chunk crc&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ff4500;&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;except&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; print_error&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;defective chunk&#039;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;break&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;else&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;type&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;try&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;type&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; type_.&lt;span style=&quot;color: black;&quot;&gt;decode&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;ascii&#039;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;except&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; print_error&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;non-ascii characters in type&#039;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #008000;&quot;&gt;type&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; type_.&lt;span style=&quot;color: black;&quot;&gt;decode&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;ascii&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;replace&#039;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;crc_&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #dc143c;&quot;&gt;struct&lt;/span&gt;.&lt;span style=&quot;color: black;&quot;&gt;unpack_from&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;!I&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;crc__&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ff4500;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; zcrc &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #dc143c;&quot;&gt;zlib&lt;/span&gt;.&lt;span style=&quot;color: black;&quot;&gt;crc32&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;type_+data&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; crc &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; crc_ &lt;span style=&quot;color: #66cc66;&quot;&gt;==&lt;/span&gt; zcrc&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; chunk_attrs &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: black;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;type&#039;&lt;/span&gt;:&lt;span style=&quot;color: #008000;&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;pos&#039;&lt;/span&gt;:pos&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;length&#039;&lt;/span&gt;:length+&lt;span style=&quot;color: #ff4500;&quot;&gt;12&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# (5.1)&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #dc143c;&quot;&gt;test&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;chunk length limit&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;is_png_uint32&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;length&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;length&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# check crc and repair&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;not&lt;/span&gt; &lt;span style=&quot;color: #dc143c;&quot;&gt;test&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;chunk crc&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;crc&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;crc&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;while&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;True&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; c &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;repair crc [y|n]:&#039;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: black;&quot;&gt;strip&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: black;&quot;&gt;lower&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;if&lt;/span&gt; c &lt;span style=&quot;color: #66cc66;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;y&#039;&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; chunk_attrs&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;crc&#039;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #dc143c;&quot;&gt;struct&lt;/span&gt;.&lt;span style=&quot;color: black;&quot;&gt;pack&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;!I&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;zcrc&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;break&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;elif&lt;/span&gt; c &lt;span style=&quot;color: #66cc66;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;n&#039;&lt;/span&gt;: &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;break&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;else&lt;/span&gt;: print_error&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&amp;quot;wrong input, just y or n&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; ret.&lt;span style=&quot;color: black;&quot;&gt;append&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;chunk_attrs&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;{3:&amp;gt;2}. {0} ({1},{2})&#039;&lt;/span&gt;.&lt;span style=&quot;color: black;&quot;&gt;format&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #008000;&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;pos&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;length+&lt;span style=&quot;color: #ff4500;&quot;&gt;12&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;cnt&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; cnt +&lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #ff4500;&quot;&gt;1&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# eof&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;elif&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;len&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;length_&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #ff4500;&quot;&gt;0&lt;/span&gt;: &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;break&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# error&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;else&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; print_error&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;defective chunk length&#039;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;break&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;return&lt;/span&gt; ret&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;def&lt;/span&gt; order_from_string&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;s&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #483d8b;&quot;&gt;&amp;quot;&amp;quot;&amp;quot;create list of numbers from string s&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; err &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;False&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;def&lt;/span&gt; convert&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;si&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;nonlocal&lt;/span&gt; err&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;if&lt;/span&gt; si &lt;span style=&quot;color: #66cc66;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;&#039;&lt;/span&gt;: &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;try&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# simple integer conversion&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; i &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;si&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;except&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# range notation&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;try&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; a&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;b &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; si.&lt;span style=&quot;color: black;&quot;&gt;split&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;..&#039;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; c&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;d &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;a&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #008000;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;b&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; l &amp;#160; &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;if&lt;/span&gt; c &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;lt;&lt;/span&gt; d:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; l &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;list&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #008000;&quot;&gt;range&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;c&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;d+&lt;span style=&quot;color: #ff4500;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;else&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; l &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;list&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #008000;&quot;&gt;range&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;d&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;c+&lt;span style=&quot;color: #ff4500;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; l.&lt;span style=&quot;color: black;&quot;&gt;reverse&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;except&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; print_error&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;unknown representation:&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;si&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; err &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;True&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;else&lt;/span&gt;: &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;return&lt;/span&gt; l&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;else&lt;/span&gt;: &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;i&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; order &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;reduce&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;lambda&lt;/span&gt; x&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;i:x+convert&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;i&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;s.&lt;span style=&quot;color: black;&quot;&gt;strip&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: black;&quot;&gt;split&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;,&#039;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;return&lt;/span&gt; order &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;not&lt;/span&gt; err &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;None&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;if&lt;/span&gt; __name__ &lt;span style=&quot;color: #66cc66;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;__main__&#039;&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# command line arguments&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;len&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #dc143c;&quot;&gt;sys&lt;/span&gt;.&lt;span style=&quot;color: black;&quot;&gt;argv&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;!=&lt;/span&gt; &lt;span style=&quot;color: #ff4500;&quot;&gt;3&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; print_error&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;Incorrect number of arguments.&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&#039;&lt;/span&gt; \&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;usage: png_resort.py &amp;lt;infile.png&amp;gt; &amp;lt;outfile.png&amp;gt;&#039;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; exit&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff4500;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;try&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# read file&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; infile_name &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #dc143c;&quot;&gt;sys&lt;/span&gt;.&lt;span style=&quot;color: black;&quot;&gt;argv&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #ff4500;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\0&lt;/span&gt;33[1;32mFile: {0}&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\0&lt;/span&gt;33[1;m&#039;&lt;/span&gt;.&lt;span style=&quot;color: black;&quot;&gt;format&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;infile_name&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;with&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;open&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;infile_name&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;rb&#039;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;as&lt;/span&gt; infile:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# read signature&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; check_png_signature&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;infile&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# read chunks&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; chunks &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; png_chunks&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;infile&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;len&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;chunks&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #ff4500;&quot;&gt;0&lt;/span&gt;: exit&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff4500;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# ask for new order&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;while&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;True&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #dc143c;&quot;&gt;cmd&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;Enter new order (p.ex.: 0,3..5,2): &#039;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #dc143c;&quot;&gt;cmd&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #dc143c;&quot;&gt;cmd&lt;/span&gt;.&lt;span style=&quot;color: black;&quot;&gt;strip&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #dc143c;&quot;&gt;cmd&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;exit&#039;&lt;/span&gt;: exit&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff4500;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; order &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; order_from_string&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #dc143c;&quot;&gt;cmd&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;if&lt;/span&gt; order &lt;span style=&quot;color: #66cc66;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;None&lt;/span&gt;: &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;continue&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;New order: {0}&#039;&lt;/span&gt;.&lt;span style=&quot;color: black;&quot;&gt;format&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;order&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# check new order&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;not&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;reduce&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;lambda&lt;/span&gt; b&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;v: b &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;and&lt;/span&gt; &lt;span style=&quot;color: #ff4500;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;lt;=&lt;/span&gt; v &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;len&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;chunks&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;order&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #008000;&quot;&gt;True&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; print_error&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;unknown chunk indices in new order&#039;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;else&lt;/span&gt;: &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;break&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# write new file&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; outfile_name &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #dc143c;&quot;&gt;sys&lt;/span&gt;.&lt;span style=&quot;color: black;&quot;&gt;argv&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #ff4500;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;with&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;open&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;outfile_name&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;wb&#039;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;as&lt;/span&gt; outfile:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# write signature&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; outfile.&lt;span style=&quot;color: black;&quot;&gt;write&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;png_signature&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# write chunks&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;for&lt;/span&gt; chunk_no &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;in&lt;/span&gt; order:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; c &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; chunks&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;chunk_no&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; infile.&lt;span style=&quot;color: black;&quot;&gt;seek&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;c&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;pos&#039;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;SEEK_SET&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# !!! needs advanced buffering for big files&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; data &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; infile.&lt;span style=&quot;color: black;&quot;&gt;read&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;c&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;length&#039;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; data &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; data &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;crc&#039;&lt;/span&gt; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;not&lt;/span&gt; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;in&lt;/span&gt; c &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;else&lt;/span&gt; data&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;:-&lt;span style=&quot;color: #ff4500;&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;+c&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;crc&#039;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; written &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; outfile.&lt;span style=&quot;color: black;&quot;&gt;write&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;data&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;not&lt;/span&gt; c&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;length&#039;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;len&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;data&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;==&lt;/span&gt; written:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; print_error&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;copy error&#039;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; exit&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff4500;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;except&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;IOError&lt;/span&gt; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;as&lt;/span&gt; err:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; print_error&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;err&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; exit&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff4500;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; exit&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff4500;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160;&lt;/div&gt; 
    </content:encoded>

    <pubDate>Tue, 05 Apr 2011 17:09:43 +0200</pubDate>
    <guid isPermaLink="false">http://www.frank-busse.de/blag/archives/514-guid.html</guid>
    <category>PNG</category>
<category>Python</category>

</item>
<item>
    <title>Verweissalat 2</title>
    <link>http://www.frank-busse.de/blag/archives/510-Verweissalat-2.html</link>
            <category>Informatik</category>
            <category>Kramkiste</category>
    
    <comments>http://www.frank-busse.de/blag/archives/510-Verweissalat-2.html#comments</comments>
    <wfw:comment>http://www.frank-busse.de/blag/wfwcomment.php?cid=510</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.frank-busse.de/blag/rss.php?version=2.0&amp;type=comments&amp;cid=510</wfw:commentRss>
    

    <author>nospam@example.com (Frank)</author>
    <content:encoded>
    &lt;h2&gt;Programmiersprachen&lt;/h2&gt;&lt;br /&gt;
&lt;a href=&quot;http://jashkenas.github.com/coffee-script/&quot;&gt;CoffeeScript&lt;/a&gt; (js)&lt;br /&gt;
&lt;a href=&quot;http://coherence-lang.org/&quot;&gt;Coherence&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://futureboy.us/frinkdocs/&quot;&gt;Frink&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://gosu-lang.org/&quot;&gt;Gosu&lt;/a&gt; (jvm)&lt;br /&gt;
&lt;a href=&quot;http://ooc-lang.org/&quot;&gt;ooc&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://sass-lang.com/&quot;&gt;Sass&lt;/a&gt; (css)&lt;br /&gt;
&lt;a href=&quot;http://onilabs.com/stratifiedjs&quot;&gt;StratifiedJS&lt;/a&gt; (js)&lt;br /&gt;
&lt;a href=&quot;http://thyrd.org/thyrd/&quot;&gt;Thyrd&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.impredicative.com/ur/&quot;&gt;Ur&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Bei Löschpedia werden gerade AliceML, Factor, Ioke, Joy, Nemerle, Pure... entfernt. Keine Relevanz für die engstirnigen Blockwarte.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;Software&lt;/h2&gt;&lt;br /&gt;
&lt;a href=&quot;https://www.mlstate.com/opa/&quot;&gt;OPA&lt;/a&gt; (web)&lt;br /&gt;
&lt;a href=&quot;http://surfraw.alioth.debian.org/&quot;&gt;surfraw&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://xzgv.sourceforge.net/&quot;&gt;xzgv&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;Kram&lt;/h2&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.foundphotos.net/&quot;&gt;Foundphotos&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.gen-evolu.de/&quot;&gt;Genevolu&lt;/a&gt; (Namensverteilung)&lt;br /&gt;
&lt;a href=&quot;http://en.wikipedia.org/wiki/List_of_cognitive_biases&quot;&gt;List of cognitive biases&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://staffwww.dcs.shef.ac.uk/people/S.Chapman/stringmetrics.html&quot;&gt;String Metrics&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://zmievski.org/2010/08/the-prime-that-wasnt&quot;&gt;The Prime That Wasn&#039;t&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://sillyskynet.blogspot.com/2009/11/typefuck.html&quot;&gt;Typefuck - Brainfuck in Haskell type checker&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://mitworld.mit.edu/video/33&quot;&gt;Walter Lewins Regenbögen&lt;/a&gt; (eng., Video) 
    </content:encoded>

    <pubDate>Fri, 18 Feb 2011 11:58:22 +0100</pubDate>
    <guid isPermaLink="false">http://www.frank-busse.de/blag/archives/510-guid.html</guid>
    <category>Programmiersprache</category>

</item>
<item>
    <title>Konferenzen 2010</title>
    <link>http://www.frank-busse.de/blag/archives/509-Konferenzen-2010.html</link>
            <category>Informatik</category>
    
    <comments>http://www.frank-busse.de/blag/archives/509-Konferenzen-2010.html#comments</comments>
    <wfw:comment>http://www.frank-busse.de/blag/wfwcomment.php?cid=509</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.frank-busse.de/blag/rss.php?version=2.0&amp;type=comments&amp;cid=509</wfw:commentRss>
    

    <author>nospam@example.com (Frank)</author>
    <content:encoded>
    &lt;a href=&quot;http://events.ccc.de/congress/2010/wiki/Documentation&quot;&gt;27C3&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://emerginglangs.com/&quot;&gt;Emerging Languages Camp 2010&lt;/a&gt; (&lt;a href=&quot;http://confreaks.net/events/elcamp2010&quot;&gt;videos&lt;/a&gt;)&lt;br /&gt;
&lt;a href=&quot;http://cufp.org/news/2011/cufp-2010-videos-now-available-online&quot;&gt;CUFP 2010 - videos&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.haskell.org/haskell-symposium/2010/accepted.html&quot;&gt;Haskell Symposium 2010&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.icfpconference.org/icfp2010/program.html&quot;&gt;ICFP 2010&lt;/a&gt; (&lt;a href=&quot;http://vimeo.com/album/1468571&quot;&gt;videos&lt;/a&gt;)&lt;br /&gt;
&lt;a href=&quot;http://www.cse.psu.edu/popl/10/&quot;&gt;Principles of Programming Languages 2010&lt;/a&gt; (&lt;a href=&quot;http://portal.acm.org/citation.cfm?id=1706299&amp;picked=prox&amp;CFID=9299946&amp;CFTOKEN=78743509&quot;&gt;papers&lt;/a&gt;) 
    </content:encoded>

    <pubDate>Fri, 18 Feb 2011 11:56:11 +0100</pubDate>
    <guid isPermaLink="false">http://www.frank-busse.de/blag/archives/509-guid.html</guid>
    <category>27C3</category>
<category>CUFP</category>
<category>ICFP</category>
<category>POPL</category>

</item>
<item>
    <title>dfa minimisation in Python</title>
    <link>http://www.frank-busse.de/blag/archives/508-dfa-minimisation-in-Python.html</link>
            <category>Informatik</category>
    
    <comments>http://www.frank-busse.de/blag/archives/508-dfa-minimisation-in-Python.html#comments</comments>
    <wfw:comment>http://www.frank-busse.de/blag/wfwcomment.php?cid=508</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.frank-busse.de/blag/rss.php?version=2.0&amp;type=comments&amp;cid=508</wfw:commentRss>
    

    <author>nospam@example.com (Frank)</author>
    <content:encoded>
    Recently I stumbled upon a paper by Marco Almeida, Nelma Moreira and Rogerio Reis: &lt;a href=&quot;http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.170.7222&quot;&gt;Incremental DFA minimisation&lt;/a&gt;. Beside some minor flaws, like e.g. the missing &quot;ICDFA&quot; definition (already present in the predecessor: &lt;a href=&quot;http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.65.4680&quot;&gt;On the performance of automata minimization algorithms&lt;/a&gt;) and the slightly strange pseudo code, I&#039;m still not convinced about their normalisation-function.&lt;br /&gt;
&lt;br /&gt;
They argue (section 4 below listing 1.1 resp. proof of lemma 1) that this function reduces the considered pairs to n²/2 - n. If we take all pairs p,q, we obviously get n² pairs. After sorting and removing the duplicates we get (n²+n)/2 pairs, without identities (n²-n)/2...&lt;br /&gt;
&lt;br /&gt;
In order to better understand some parts of the algorithm, I reimplemented it in Python. I left out most optimizations and tried to stay close to the original pseudo code. It works at least for two examples. ;)&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;python geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;#!/usr/bin/python3&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# Implementation of the MIN-INCR ICDFA minimisation algorithm without(!)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# optimized data structures.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;#&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# Use minimalIncremental() from FAdo Project for your projects.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# Literature&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# ----------&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;#&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# [idm] Almeida, Moreira, Reis: Incremental DFA minimisation&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# [ufa] Tarjan: Efficiency of a Good But Not Linear Set Union Algorithm&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;#&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;#&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# Links&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# -----&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;#&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# FAdo Project:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# &amp;#160; - http://www.ncc.up.pt/FAdo/&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# &amp;#160; - http://fado.dcc.fc.up.pt/FAdo/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;verbose &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;False&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# ==== fake union-find ==== ([ufa])&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #dc143c;&quot;&gt;sets&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: black;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;def&lt;/span&gt; make&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;x&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #483d8b;&quot;&gt;&amp;quot;&amp;quot;&amp;quot;creates new singleton set {x}&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;global&lt;/span&gt; &lt;span style=&quot;color: #dc143c;&quot;&gt;sets&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #dc143c;&quot;&gt;sets&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;x&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;set&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;x&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;def&lt;/span&gt; find_&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #dc143c;&quot;&gt;sets&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;x&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #483d8b;&quot;&gt;&amp;quot;&amp;quot;&amp;quot;returns representative element of set containing x&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;for&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;s &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;in&lt;/span&gt; &lt;span style=&quot;color: #dc143c;&quot;&gt;sets&lt;/span&gt;.&lt;span style=&quot;color: black;&quot;&gt;items&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;if&lt;/span&gt; x &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;in&lt;/span&gt; s:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;id&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;def&lt;/span&gt; find&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;x&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #483d8b;&quot;&gt;&amp;quot;&amp;quot;&amp;quot;wrapper for find_&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;global&lt;/span&gt; &lt;span style=&quot;color: #dc143c;&quot;&gt;sets&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;return&lt;/span&gt; find_&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #dc143c;&quot;&gt;sets&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;x&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;def&lt;/span&gt; union&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;p&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;q&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #483d8b;&quot;&gt;&amp;quot;&amp;quot;&amp;quot;combines a and b&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;global&lt;/span&gt; &lt;span style=&quot;color: #dc143c;&quot;&gt;sets&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; a&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;b &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; normalise&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;find&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;p&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;find&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;q&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;if&lt;/span&gt; a &lt;span style=&quot;color: #66cc66;&quot;&gt;!=&lt;/span&gt; b:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #dc143c;&quot;&gt;sets&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;a&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt; |&lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #dc143c;&quot;&gt;sets&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;b&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;del&lt;/span&gt; &lt;span style=&quot;color: #dc143c;&quot;&gt;sets&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;b&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# ==== minimisation ==== ([idm])&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;neq &amp;#160; &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;set&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;equiv &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;set&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;path &amp;#160;&lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;set&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;dfa &amp;#160; &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: black;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# (idm L1.1)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;def&lt;/span&gt; normalise&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;p&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;q&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;p&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;q&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;if&lt;/span&gt; p&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;lt;&lt;/span&gt;q &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;q&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;p&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# (idm L1.4) - just use python&#039;s set implementation&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;def&lt;/span&gt; set_make&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;set&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;def&lt;/span&gt; set_insert&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;v&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;s&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; s.&lt;span style=&quot;color: black;&quot;&gt;add&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;v&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;def&lt;/span&gt; set_remove&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;v&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;s&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; s.&lt;span style=&quot;color: black;&quot;&gt;remove&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;v&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;def&lt;/span&gt; set_search&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;v&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;s&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;return&lt;/span&gt; v &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;in&lt;/span&gt; s&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;def&lt;/span&gt; set_elements&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;s&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;return&lt;/span&gt; s&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# (idm L1.3)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;def&lt;/span&gt; equiv_p&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;p&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;q&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #483d8b;&quot;&gt;&amp;quot;&amp;quot;&amp;quot;tests equivalence of p and q&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;global&lt;/span&gt; neq&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt; equiv&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt; path&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt; dfa&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt; verbose&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; d &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; dfa&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; print_&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&amp;quot;equiv: {0}&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;path : {1}&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;neq &amp;#160;: {2}&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt;.&lt;span style=&quot;color: black;&quot;&gt;format&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;equiv&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;path&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;neq&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;p&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;q&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;in&lt;/span&gt; neq:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;False&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;if&lt;/span&gt; set_search&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;p&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;q&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;path&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;True&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; set_insert&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;p&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;q&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;path&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;for&lt;/span&gt; a &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;in&lt;/span&gt; d&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;Sigma&#039;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; print_&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&amp;quot;p,a,q:&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;p&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;a&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;q&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;p_&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;q_&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; normalise&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;find&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;d&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;delta&#039;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;p&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;a&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;find&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;d&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;delta&#039;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;q&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;a&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;if&lt;/span&gt; p_ &lt;span style=&quot;color: #66cc66;&quot;&gt;!=&lt;/span&gt; q_ &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;and&lt;/span&gt; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;not&lt;/span&gt; set_search&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;p_&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;q_&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;equiv&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; set_insert&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;p_&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;q_&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;equiv&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;not&lt;/span&gt; equiv_p&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;p_&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;q_&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;False&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;else&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; set_remove&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;p_&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;q_&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;path&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; set_insert&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;p&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;q&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;equiv&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;True&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# (idm Theorem 2)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;def&lt;/span&gt; joinstates&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;d&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;classes&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #483d8b;&quot;&gt;&amp;quot;&amp;quot;&amp;quot;returns new dfa based on equivalence classes&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; Q &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;set&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;classes.&lt;span style=&quot;color: black;&quot;&gt;keys&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; Sigma &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; d&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;Sigma&#039;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; delta &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;lambda&lt;/span&gt; p&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;a: find_&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;classes&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;d&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;delta&#039;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;p&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;a&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; q0 &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; find_&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;classes&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;d&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;q0&#039;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; F &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;set&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #008000;&quot;&gt;map&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;lambda&lt;/span&gt; x: find_&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;classes&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;x&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #008000;&quot;&gt;list&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;d&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;F&#039;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: black;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;Q&#039;&lt;/span&gt;:Q&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;Sigma&#039;&lt;/span&gt;:Sigma&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;delta&#039;&lt;/span&gt;:delta&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;q0&#039;&lt;/span&gt;:q0&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;F&#039;&lt;/span&gt;:F&lt;span style=&quot;color: black;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# (idm L1.2)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;def&lt;/span&gt; min_incr&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;d&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;global&lt;/span&gt; neq&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt; equiv&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt; path&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt; dfa&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; dfa &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; d&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;for&lt;/span&gt; q &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;in&lt;/span&gt; d&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;Q&#039;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; make&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;q&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; neq &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;set&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;normalise&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;p&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;q&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;for&lt;/span&gt; p &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;in&lt;/span&gt; d&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;F&#039;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;for&lt;/span&gt; q &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;in&lt;/span&gt; d&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;Q&#039;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt; - d&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;F&#039;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;for&lt;/span&gt; p &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;in&lt;/span&gt; d&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;Q&#039;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;for&lt;/span&gt; q &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;in&lt;/span&gt; &lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;x &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;for&lt;/span&gt; x &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;in&lt;/span&gt; d&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;Q&#039;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;if&lt;/span&gt; x &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;gt;&lt;/span&gt; p&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;p&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;q&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;in&lt;/span&gt; neq:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;continue&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;if&lt;/span&gt; find&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;p&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;==&lt;/span&gt; find&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;q&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;continue&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; equiv &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; set_make&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; path &amp;#160;&lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; set_make&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;if&lt;/span&gt; equiv_p&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;p&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;q&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;for&lt;/span&gt; &lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;p_&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;q_&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;in&lt;/span&gt; set_elements&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;equiv&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; union&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;p_&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;q_&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;else&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; neq |&lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; path&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; classes &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: black;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;for&lt;/span&gt; p &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;in&lt;/span&gt; d&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;Q&#039;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; lider &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; find&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;p&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; classes&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;lider&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; classes&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;lider&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt; | &lt;span style=&quot;color: #008000;&quot;&gt;set&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;p&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;if&lt;/span&gt; lider &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;in&lt;/span&gt; classes &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;set&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;p&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; print_&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;classes:&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;classes&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&#039;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;return&lt;/span&gt; joinstates&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;d&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;classes&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# ==== I/O ====&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;def&lt;/span&gt; print_&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;*args&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;global&lt;/span&gt; verbose&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;if&lt;/span&gt; verbose:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;*args&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;def&lt;/span&gt; print_dfa&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;name&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;d&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;{0}&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;{1}&#039;&lt;/span&gt;.&lt;span style=&quot;color: black;&quot;&gt;format&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;name&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;=&#039;&lt;/span&gt;*&lt;span style=&quot;color: #008000;&quot;&gt;len&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;name&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;Q &amp;#160; &amp;#160;: {0}&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;Sigma: {1}&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;delta:&#039;&lt;/span&gt;.&lt;span style=&quot;color: black;&quot;&gt;format&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;d&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;Q&#039;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;d&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;Sigma&#039;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;for&lt;/span&gt; q&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;a &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;in&lt;/span&gt; &lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;q&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;a&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;for&lt;/span&gt; q &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;in&lt;/span&gt; d&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;Q&#039;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;for&lt;/span&gt; a &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;in&lt;/span&gt; d&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;Sigma&#039;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039; &#039;&lt;/span&gt;*&lt;span style=&quot;color: #ff4500;&quot;&gt;6&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;q&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;a&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;d&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;delta&#039;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;q&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;a&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;q0 &amp;#160; : {0}&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;F &amp;#160; &amp;#160;: {1}&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&#039;&lt;/span&gt;.&lt;span style=&quot;color: black;&quot;&gt;format&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;d&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;q0&#039;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;d&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;F&#039;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# ==== examples ====&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# DFA d={q,s,d,q0,f}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;def&lt;/span&gt; dfa_01_d&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;p&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;a&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; tab &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: black;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff4500;&quot;&gt;0&lt;/span&gt;:&lt;span style=&quot;color: black;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;a&#039;&lt;/span&gt;:&lt;span style=&quot;color: #ff4500;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;b&#039;&lt;/span&gt;:&lt;span style=&quot;color: #ff4500;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff4500;&quot;&gt;1&lt;/span&gt;:&lt;span style=&quot;color: black;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;a&#039;&lt;/span&gt;:&lt;span style=&quot;color: #ff4500;&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;b&#039;&lt;/span&gt;:&lt;span style=&quot;color: #ff4500;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff4500;&quot;&gt;2&lt;/span&gt;:&lt;span style=&quot;color: black;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;a&#039;&lt;/span&gt;:&lt;span style=&quot;color: #ff4500;&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;b&#039;&lt;/span&gt;:&lt;span style=&quot;color: #ff4500;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff4500;&quot;&gt;3&lt;/span&gt;:&lt;span style=&quot;color: black;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;a&#039;&lt;/span&gt;:&lt;span style=&quot;color: #ff4500;&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;b&#039;&lt;/span&gt;:&lt;span style=&quot;color: #ff4500;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff4500;&quot;&gt;4&lt;/span&gt;:&lt;span style=&quot;color: black;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;a&#039;&lt;/span&gt;:&lt;span style=&quot;color: #ff4500;&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;b&#039;&lt;/span&gt;:&lt;span style=&quot;color: #ff4500;&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;return&lt;/span&gt; tab&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;p&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;a&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;dfa_01 &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: black;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;Q&#039;&lt;/span&gt;:&lt;span style=&quot;color: #008000;&quot;&gt;set&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #ff4500;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ff4500;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ff4500;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ff4500;&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ff4500;&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;Sigma&#039;&lt;/span&gt;:&lt;span style=&quot;color: #008000;&quot;&gt;set&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;a&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;b&#039;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;delta&#039;&lt;/span&gt;:dfa_01_d&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;q0&#039;&lt;/span&gt;:&lt;span style=&quot;color: #ff4500;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;F&#039;&lt;/span&gt;:&lt;span style=&quot;color: #008000;&quot;&gt;set&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #ff4500;&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;def&lt;/span&gt; dfa_02_d&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;p&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;a&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; tab &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: black;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff4500;&quot;&gt;0&lt;/span&gt;:&lt;span style=&quot;color: black;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;a&#039;&lt;/span&gt;:&lt;span style=&quot;color: #ff4500;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;b&#039;&lt;/span&gt;:&lt;span style=&quot;color: #ff4500;&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff4500;&quot;&gt;1&lt;/span&gt;:&lt;span style=&quot;color: black;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;a&#039;&lt;/span&gt;:&lt;span style=&quot;color: #ff4500;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;b&#039;&lt;/span&gt;:&lt;span style=&quot;color: #ff4500;&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff4500;&quot;&gt;2&lt;/span&gt;:&lt;span style=&quot;color: black;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;a&#039;&lt;/span&gt;:&lt;span style=&quot;color: #ff4500;&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;b&#039;&lt;/span&gt;:&lt;span style=&quot;color: #ff4500;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff4500;&quot;&gt;3&lt;/span&gt;:&lt;span style=&quot;color: black;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;a&#039;&lt;/span&gt;:&lt;span style=&quot;color: #ff4500;&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;b&#039;&lt;/span&gt;:&lt;span style=&quot;color: #ff4500;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff4500;&quot;&gt;4&lt;/span&gt;:&lt;span style=&quot;color: black;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;a&#039;&lt;/span&gt;:&lt;span style=&quot;color: #ff4500;&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;b&#039;&lt;/span&gt;:&lt;span style=&quot;color: #ff4500;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff4500;&quot;&gt;5&lt;/span&gt;:&lt;span style=&quot;color: black;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;a&#039;&lt;/span&gt;:&lt;span style=&quot;color: #ff4500;&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;b&#039;&lt;/span&gt;:&lt;span style=&quot;color: #ff4500;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;return&lt;/span&gt; tab&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;p&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;a&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;dfa_02 &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: black;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;Q&#039;&lt;/span&gt;:&lt;span style=&quot;color: #008000;&quot;&gt;set&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #008000;&quot;&gt;range&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff4500;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ff4500;&quot;&gt;6&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;Sigma&#039;&lt;/span&gt;:&lt;span style=&quot;color: #008000;&quot;&gt;set&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;a&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;b&#039;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;delta&#039;&lt;/span&gt;:dfa_02_d&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;q0&#039;&lt;/span&gt;:&lt;span style=&quot;color: #ff4500;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;F&#039;&lt;/span&gt;:&lt;span style=&quot;color: #008000;&quot;&gt;set&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #ff4500;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ff4500;&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ff4500;&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# ==== main ====&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;if&lt;/span&gt; __name__ &lt;span style=&quot;color: #66cc66;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;__main__&#039;&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; print_dfa&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;DFA 01&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;dfa_01&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; dfa_01_min &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; min_incr&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;dfa_01&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; print_dfa&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;DFA 01 min&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;dfa_01_min&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; print_dfa&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;DFA 02&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;dfa_02&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; dfa_02_min &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; min_incr&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;dfa_02&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; print_dfa&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #483d8b;&quot;&gt;&#039;DFA 02 min&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;dfa_02_min&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Feel free to play around with it. 
    </content:encoded>

    <pubDate>Fri, 11 Feb 2011 19:40:18 +0100</pubDate>
    <guid isPermaLink="false">http://www.frank-busse.de/blag/archives/508-guid.html</guid>
    <category>Minimierung</category>
<category>Python</category>
<category>dfa</category>
<category>icdfa</category>
<category>minimisation</category>

</item>
<item>
    <title>Gentoo: rlwrap</title>
    <link>http://www.frank-busse.de/blag/archives/506-Gentoo-rlwrap.html</link>
            <category>Informatik</category>
    
    <comments>http://www.frank-busse.de/blag/archives/506-Gentoo-rlwrap.html#comments</comments>
    <wfw:comment>http://www.frank-busse.de/blag/wfwcomment.php?cid=506</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.frank-busse.de/blag/rss.php?version=2.0&amp;type=comments&amp;cid=506</wfw:commentRss>
    

    <author>nospam@example.com (Frank)</author>
    <content:encoded>
    Wer Software wie Ocaml verwendet, bei der readline aus lizenztechnischen Gründen nicht rangebastelt werden darf, weicht notgedrungen auf ledit oder &lt;a href=&quot;http://utopia.knoware.nl/~hlub/rlwrap/&quot;&gt;rlwrap&lt;/a&gt; aus. Leider ist die Version in Gentoos Portage &lt;a href=&quot;http://bugs.gentoo.org/show_bug.cgi?id=318767&quot;&gt;ziemlich alt&lt;/a&gt; (stable 0.30, maskiert 0.32). Für 0.37 reicht es, das Ebuild der letzten Version in ein lokales Overlay zu kopieren, in ...-0.37 umzubenennen, das Manifest zu bauen und die neue Version zu installieren. Die letzten Schritte hatte ich vor Kurzem schon angerissen... 
    </content:encoded>

    <pubDate>Fri, 21 Jan 2011 16:29:01 +0100</pubDate>
    <guid isPermaLink="false">http://www.frank-busse.de/blag/archives/506-guid.html</guid>
    <category>Gentoo</category>
<category>Ocaml</category>
<category>rlwrap</category>

</item>
<item>
    <title>Matrox und mesa 7.9 unter Gentoo</title>
    <link>http://www.frank-busse.de/blag/archives/505-Matrox-und-mesa-7.9-unter-Gentoo.html</link>
            <category>Informatik</category>
    
    <comments>http://www.frank-busse.de/blag/archives/505-Matrox-und-mesa-7.9-unter-Gentoo.html#comments</comments>
    <wfw:comment>http://www.frank-busse.de/blag/wfwcomment.php?cid=505</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.frank-busse.de/blag/rss.php?version=2.0&amp;type=comments&amp;cid=505</wfw:commentRss>
    

    <author>nospam@example.com (Frank)</author>
    <content:encoded>
    xorg/mesa-Aktualisierungen sind immer etwas Feines. Das udev-Keyword flog vorher raus, man kennt ja das udev/hal-Debakel und die Treiber übersetzt man schon aus Reflex neu, man wurde ja schließlich nicht nur einmal von inaktiver Maus und Tastatur überrascht:&lt;br /&gt;
&lt;div class=&quot;bash geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;sudo&lt;/span&gt; emerge xf86-input-keyboard xf86-input-mouse xf86-video-mga&lt;/div&gt;&lt;br /&gt;
und trotzdem gab es etwas Neues: lahme und ruckelnde Videos. Die Ursache fand sich schnell:&lt;br /&gt;
&lt;div class=&quot;text geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;(EE) AIGLX error: dlopen of /usr/lib/dri/mga_dri.so failed (/usr/lib/dri/mga_dri.so: cannot open shared object file: No such file or directory)&lt;br /&gt;(EE) AIGLX: reverting to software rendering&lt;br /&gt;(II) AIGLX: Loaded and initialized /usr/lib/dri/swrast_dri.so&lt;br /&gt;(II) GLX: Initialized DRISWRAST GL provider for screen 0&lt;/div&gt;&lt;br /&gt;
die Lösung auch: &lt;a href=&quot;http://en.gentoo-wiki.com/wiki/Overlay#Creating_a_Local_Overlay_with_Portage&quot;&gt;Lokales Overlay&lt;/a&gt; verwenden bzw. anlegen, media-libs/mesa reinkopieren, im ebuild unter &quot;classic&quot;&lt;br /&gt;
&lt;div class=&quot;text geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;driver_enable video_cards_mga mga&lt;/div&gt;&lt;br /&gt;
hinzufügen, Manifest basteln:&lt;br /&gt;
&lt;div class=&quot;bash geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;sudo&lt;/span&gt; ebuild mesa-&lt;span style=&quot;color: #000000;&quot;&gt;7.9&lt;/span&gt;.ebuild manifest&lt;/div&gt;&lt;br /&gt;
mesa erneut kompilieren und fertig. 
    </content:encoded>

    <pubDate>Mon, 03 Jan 2011 14:44:47 +0100</pubDate>
    <guid isPermaLink="false">http://www.frank-busse.de/blag/archives/505-guid.html</guid>
    <category>Gentoo</category>
<category>Matrox</category>
<category>mesa</category>

</item>
<item>
    <title>JMStV</title>
    <link>http://www.frank-busse.de/blag/archives/504-JMStV.html</link>
            <category>Informatik</category>
            <category>Politik</category>
    
    <comments>http://www.frank-busse.de/blag/archives/504-JMStV.html#comments</comments>
    <wfw:comment>http://www.frank-busse.de/blag/wfwcomment.php?cid=504</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.frank-busse.de/blag/rss.php?version=2.0&amp;type=comments&amp;cid=504</wfw:commentRss>
    

    <author>nospam@example.com (Frank)</author>
    <content:encoded>
    Die Dummheit kennt &lt;a href=&quot;https://spreadsheets.google.com/pub?key=0AnrHIeb5cmJedGU4Q2hpdnU4SENHdENXd3czSHljX0E&amp;hl=de&amp;output=html&quot;&gt;länderweit&lt;/a&gt; mal wieder keine Grenzen, die Änderungen zum JMStV werden wohl durchgewunken und hoffentlich irgendwann auf anderer Ebene wieder einkassiert.&lt;br /&gt;
&lt;br /&gt;
Bis dahin kann man sich vorübergehend tolle Bildchen für die eigene Netzseite kreieren lassen, um Kinder vor der bösen Welt zu schützen. ZB. bei &lt;a href=&quot;http://www.jugendschutzprogramm.de/label-generator_hinweis.php&quot;&gt;jusprog&lt;/a&gt;, einem Kinderschutzprogramm der Erotikindustrie.&lt;br /&gt;
&lt;br /&gt;
Nach Beantwortung der Fragen erhält man Zeichensalat zum Einbinden:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.frank-busse.de/bilder/rechner/juspro_generator.png&quot;&gt;&lt;img src=&quot;http://www.frank-busse.de/bilder/rechner/juspro_generator_klein.png&quot; alt&quot;Zeichensalat als Ausgabe&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Mit &quot;alternativer&quot; Eingabe kann man die Ausgabe aufhübschen...&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.frank-busse.de/bilder/rechner/juspro_xss.png&quot;&gt;&lt;img src=&quot;http://www.frank-busse.de/bilder/rechner/juspro_xss_klein.png&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Ein-/Ausgabevalidierung lässt grüßen... 
    </content:encoded>

    <pubDate>Wed, 01 Dec 2010 11:53:18 +0100</pubDate>
    <guid isPermaLink="false">http://www.frank-busse.de/blag/archives/504-guid.html</guid>
    <category>JMStV</category>
<category>jusprog</category>
<category>xss</category>

</item>
<item>
    <title>Hex Editor unter Linux</title>
    <link>http://www.frank-busse.de/blag/archives/502-Hex-Editor-unter-Linux.html</link>
            <category>Informatik</category>
    
    <comments>http://www.frank-busse.de/blag/archives/502-Hex-Editor-unter-Linux.html#comments</comments>
    <wfw:comment>http://www.frank-busse.de/blag/wfwcomment.php?cid=502</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.frank-busse.de/blag/rss.php?version=2.0&amp;type=comments&amp;cid=502</wfw:commentRss>
    

    <author>nospam@example.com (Frank)</author>
    <content:encoded>
    Ich dachte nicht, dass das so ein Problem sein kann. Anzeigen via hexdump, xxd... kann jeder, dafür braucht man keinen Editor. Aber einfach mal &lt;em&gt;bequem&lt;/em&gt; ein paar Bytes einfügen, ohne zu überschreiben ist schon &lt;a href=&quot;http://en.wikipedia.org/wiki/Comparison_of_hex_editors&quot;&gt;zu kompliziert&lt;/a&gt;. Wtf?! Für derart triviale Sachen benötigen manche Exemplare Mono (bless), Gnome (ghex) oder gar Qt (&lt;a href=&quot;http://stoopidsimple.com/lfhex&quot;&gt;lfhex&lt;/a&gt;):&lt;br /&gt;
&lt;blockquote&gt;Minimal dependencies (just Qt)&lt;/blockquote&gt;&lt;br /&gt;
Wirklich minimal - nur 160MB allein an Qt-Kram. Für biew muss man TERM erst auf vt100 setzen, damit es überhaupt startet. Kurz darauf würgt man schon ob der Steuerung und ruft ganz schnell emerge --unmerge auf. Bei wxhexeditor reichte schon der Screenshot auf der Netzseite als Ausschlusskriterium. Ein kleines bescheidenes &lt;a href=&quot;http://bvi.sourceforge.net/&quot;&gt;bvi&lt;/a&gt; funktionierte dann tadellos - so kann&#039;s gehen. 
    </content:encoded>

    <pubDate>Fri, 19 Nov 2010 19:02:00 +0100</pubDate>
    <guid isPermaLink="false">http://www.frank-busse.de/blag/archives/502-guid.html</guid>
    <category>biew</category>
<category>bless</category>
<category>bvi</category>
<category>ghex</category>
<category>hex</category>
<category>lfhex</category>
<category>wxhexeditor</category>

</item>
<item>
    <title>pdfnup --trim</title>
    <link>http://www.frank-busse.de/blag/archives/501-pdfnup-trim.html</link>
            <category>Informatik</category>
    
    <comments>http://www.frank-busse.de/blag/archives/501-pdfnup-trim.html#comments</comments>
    <wfw:comment>http://www.frank-busse.de/blag/wfwcomment.php?cid=501</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.frank-busse.de/blag/rss.php?version=2.0&amp;type=comments&amp;cid=501</wfw:commentRss>
    

    <author>nospam@example.com (Frank)</author>
    <content:encoded>
    Parameterreihenfolge ist: &quot;left bottom right top&quot;, Eselsbrücke: css rückwärts. 
    </content:encoded>

    <pubDate>Mon, 26 Jul 2010 16:20:15 +0200</pubDate>
    <guid isPermaLink="false">http://www.frank-busse.de/blag/archives/501-guid.html</guid>
    <category>pdfnup</category>

</item>
<item>
    <title>Verweissalat 1</title>
    <link>http://www.frank-busse.de/blag/archives/492-Verweissalat-1.html</link>
            <category>Informatik</category>
    
    <comments>http://www.frank-busse.de/blag/archives/492-Verweissalat-1.html#comments</comments>
    <wfw:comment>http://www.frank-busse.de/blag/wfwcomment.php?cid=492</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.frank-busse.de/blag/rss.php?version=2.0&amp;type=comments&amp;cid=492</wfw:commentRss>
    

    <author>nospam@example.com (Frank)</author>
    <content:encoded>
    &lt;a href=&quot;http://bugspy.net/&quot;&gt;BugSpy&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.checkmycode.org/&quot;&gt;checkmycode&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://panopticlick.eff.org/&quot;&gt;Panopticlick&lt;/a&gt; (browser tracking)&lt;br /&gt;
&lt;a href=&quot;http://www.tineye.com/&quot;&gt;TinEye Reverse Image Search&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://wtfjs.com/&quot;&gt;wtfjs&lt;/a&gt; (JS)&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://geekwhisperer.blogspot.com/2010/01/twisty-maze-of-linux-clocks-all.html&quot;&gt;A Twisty Maze of Linux Clocks, All Slightly Different&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.danielvik.com/2010/05/c-language-quirks.html&quot;&gt;C Language Quirks&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.cups.org/documentation.php/options.html&quot;&gt;Command-Line Printing and Options&lt;/a&gt; (cups)&lt;br /&gt;
&lt;a href=&quot;http://mattmahoney.net/dc/dce.html&quot;&gt;Data Compression Explained&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.evanmiller.org/how-not-to-sort-by-average-rating.html&quot;&gt;How Not To Sort By Average Rating&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.eff.org/pages/list-printers-which-do-or-do-not-display-tracking-dots&quot;&gt;List of Printers Which Do or Do Not Display Tracking Dots&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://en.wikipedia.org/wiki/List_of_software_development_philosophies&quot;&gt;List of software development philosophies&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://en.trinary.ru/projects/setunws/&quot;&gt;Online Emulation of Soviet Ternary Computer Setun&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://extended64.com/blogs/news/archive/2009/05/10/tail-call-improvements-in-net-framework-4.aspx&quot;&gt;Tail Call Improvements in .NET Framework 4&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.vector.org.uk/?vol=24&amp;no=2&amp;art=polivka&quot;&gt;Ten divisions to Easter&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://research.swtch.com/2010/03/zip-files-all-way-down.html&quot;&gt;Zip Files All The Way Down&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://pll.cpsc.ucalgary.ca/charity1/www/home.html&quot;&gt;Charity&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://code.google.com/p/dompdf/&quot;&gt;dompdf&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://qbnz.com/highlighter/&quot;&gt;GeSHI&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.phash.org/&quot;&gt;phash&lt;/a&gt; (perceptual hash library)&lt;br /&gt;
&lt;a href=&quot;http://www.pixlr.com/editor/&quot;&gt;pixlr&lt;/a&gt; (online graphics editor)&lt;br /&gt;
&lt;a href=&quot;http://code.google.com/p/push/&quot;&gt;push&lt;/a&gt; (dataflow shell)&lt;br /&gt;
&lt;a href=&quot;http://code.google.com/p/re2/&quot;&gt;re2&lt;/a&gt; (regular expressions)&lt;br /&gt;
&lt;a href=&quot;http://www.sqlbuddy.com/&quot;&gt;SQL Buddy&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://code.google.com/p/stringencoders/&quot;&gt;stringencoders&lt;/a&gt; (string transformations)&lt;br /&gt;
&lt;a href=&quot;http://trac.haskell.org/ddc/&quot;&gt;The Disciplined Disciple Compiler&lt;/a&gt; (strict evaluated Haskell)&lt;br /&gt;
&lt;a href=&quot;http://labs.oracle.com/projects/maxine/&quot;&gt;The Maxine Virtual Machine&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://transterpreter.org/&quot;&gt;The Transterpreter Project&lt;/a&gt; (vm)&lt;br /&gt;
&lt;a href=&quot;http://www.tinypy.org/&quot;&gt;tinypy&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://sourceforge.net/projects/tmux/&quot;&gt;tmux&lt;/a&gt; 
    </content:encoded>

    <pubDate>Wed, 23 Jun 2010 10:10:34 +0200</pubDate>
    <guid isPermaLink="false">http://www.frank-busse.de/blag/archives/492-guid.html</guid>
    
</item>
<item>
    <title>c++ productivity</title>
    <link>http://www.frank-busse.de/blag/archives/500-c++-productivity.html</link>
            <category>Informatik</category>
    
    <comments>http://www.frank-busse.de/blag/archives/500-c++-productivity.html#comments</comments>
    <wfw:comment>http://www.frank-busse.de/blag/wfwcomment.php?cid=500</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.frank-busse.de/blag/rss.php?version=2.0&amp;type=comments&amp;cid=500</wfw:commentRss>
    

    <author>nospam@example.com (Frank)</author>
    <content:encoded>
    Wieder ein schöner &lt;a href=&quot;http://www.realworldtech.com/forums/index.cfm?action=detail&amp;id=110618&amp;threadid=110549&amp;roomid=2&quot;&gt;Beitrag von Linus Trovalds über C++&lt;/a&gt;:&lt;br /&gt;
&lt;blockquote&gt;So there are particular reasons why I think C is &quot;as simple&lt;br /&gt;
as possible, but no simpler&quot; for the particular case of an&lt;br /&gt;
OS kernel, or system programming in particular. That&#039;s why&lt;br /&gt;
I&#039;m absolutely not saying that you should use C for all&lt;br /&gt;
projects.&lt;br /&gt;
&lt;br /&gt;
But C++? I really don&#039;t think the &quot;good features&quot; of it&lt;br /&gt;
are very good at all. If you leave C behind, do it properly&lt;br /&gt;
and get some real features that matter. GC, some&lt;br /&gt;
concurrency support, dynamic code generation, whatever.&lt;/blockquote&gt;&lt;br /&gt;
Punktlandung. 
    </content:encoded>

    <pubDate>Tue, 08 Jun 2010 09:51:00 +0200</pubDate>
    <guid isPermaLink="false">http://www.frank-busse.de/blag/archives/500-guid.html</guid>
    <category>C++</category>
<category>Torvalds</category>

</item>
<item>
    <title>von dwm und mrxvt zu Xmonad und urxvt</title>
    <link>http://www.frank-busse.de/blag/archives/491-von-dwm-und-mrxvt-zu-Xmonad-und-urxvt.html</link>
            <category>Informatik</category>
    
    <comments>http://www.frank-busse.de/blag/archives/491-von-dwm-und-mrxvt-zu-Xmonad-und-urxvt.html#comments</comments>
    <wfw:comment>http://www.frank-busse.de/blag/wfwcomment.php?cid=491</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.frank-busse.de/blag/rss.php?version=2.0&amp;type=comments&amp;cid=491</wfw:commentRss>
    

    <author>nospam@example.com (Frank)</author>
    <content:encoded>
    Mit der Entwicklung von dwm war ich schon eine Weile unzufrieden, Xmonad hingegen hat sich seit meinem ersten Versuch vor drei Jahren inzwischen zu einem richtigen Metafenstermanager entwickelt.  Nahezu jede Funktion ist anpassbar und bereits in mehreren Varianten verfügbar, ganz ohne C schreiben oder veraltete Patches anpassen zu müssen. Sehr, sehr nett.&lt;br /&gt;
&lt;br /&gt;
Die erste .xmonad/xmonad.hs - weitestgehend zusammenkopiert aus der Doku:&lt;br /&gt;
&lt;div class=&quot;haskell geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: #06c; font-weight: bold;&quot;&gt;import&lt;/span&gt; XMonad&lt;br /&gt;&lt;span style=&quot;color: #06c; font-weight: bold;&quot;&gt;import&lt;/span&gt; XMonad&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.&lt;/span&gt;Actions&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.&lt;/span&gt;CopyWindow&lt;br /&gt;&lt;span style=&quot;color: #06c; font-weight: bold;&quot;&gt;import&lt;/span&gt; XMonad&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.&lt;/span&gt;Actions&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.&lt;/span&gt;DwmPromote&lt;br /&gt;&lt;span style=&quot;color: #06c; font-weight: bold;&quot;&gt;import&lt;/span&gt; XMonad&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.&lt;/span&gt;Hooks&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.&lt;/span&gt;DynamicLog&lt;br /&gt;&lt;span style=&quot;color: #06c; font-weight: bold;&quot;&gt;import&lt;/span&gt; XMonad&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.&lt;/span&gt;Hooks&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.&lt;/span&gt;ManageDocks&lt;br /&gt;&lt;span style=&quot;color: #06c; font-weight: bold;&quot;&gt;import&lt;/span&gt; XMonad&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.&lt;/span&gt;Layout&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.&lt;/span&gt;Tabbed&lt;br /&gt;&lt;span style=&quot;color: #06c; font-weight: bold;&quot;&gt;import&lt;/span&gt; XMonad&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.&lt;/span&gt;Util&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.&lt;/span&gt;Run&lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;spawnPipe&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #06c; font-weight: bold;&quot;&gt;import&lt;/span&gt; Data&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.&lt;/span&gt;Monoid&lt;br /&gt;&lt;span style=&quot;color: #06c; font-weight: bold;&quot;&gt;import&lt;/span&gt; System&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.&lt;/span&gt;Exit&lt;br /&gt;&lt;span style=&quot;color: #06c; font-weight: bold;&quot;&gt;import&lt;/span&gt; System&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.&lt;/span&gt;&lt;a href=&quot;http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#t:IO&quot;&gt;&lt;span style=&quot;color: #cccc00; font-weight: bold;&quot;&gt;IO&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.&lt;/span&gt;UTF8&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #06c; font-weight: bold;&quot;&gt;import&lt;/span&gt; &lt;span style=&quot;color: #06c; font-weight: bold;&quot;&gt;qualified&lt;/span&gt; XMonad&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.&lt;/span&gt;StackSet &lt;span style=&quot;color: #06c; font-weight: bold;&quot;&gt;as&lt;/span&gt; W&lt;br /&gt;&lt;span style=&quot;color: #06c; font-weight: bold;&quot;&gt;import&lt;/span&gt; &lt;span style=&quot;color: #06c; font-weight: bold;&quot;&gt;qualified&lt;/span&gt; Data&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.&lt;/span&gt;Map &amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #06c; font-weight: bold;&quot;&gt;as&lt;/span&gt; M&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- The preferred terminal program, which is used in a binding below and by&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- certain contrib modules.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;--&lt;/span&gt;&lt;br /&gt;myTerminal &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;urxvtc&amp;quot;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- Whether focus follows the mouse pointer.&lt;/span&gt;&lt;br /&gt;myFocusFollowsMouse &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;::&lt;/span&gt; &lt;a href=&quot;http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#t:Bool&quot;&gt;&lt;span style=&quot;color: #cccc00; font-weight: bold;&quot;&gt;Bool&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;myFocusFollowsMouse &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; True&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- Width of the window border in pixels.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;--&lt;/span&gt;&lt;br /&gt;myBorderWidth &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- modMask lets you specify which modkey you want to use. The default&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- is mod1Mask (&amp;quot;left alt&amp;quot;). &amp;#160;You may also consider using mod3Mask&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- (&amp;quot;right alt&amp;quot;), which does not conflict with emacs keybindings. The&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- &amp;quot;windows key&amp;quot; is usually mod4Mask.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;--&lt;/span&gt;&lt;br /&gt;myModMask &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; mod4Mask&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- The mask for the numlock key. Numlock status is &amp;quot;masked&amp;quot; from the&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- current modifier status, so the keybindings will work with numlock on or&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- off. You may need to change this on some systems.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;--&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- You can find the numlock modifier by running &amp;quot;xmodmap&amp;quot; and looking for a&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- modifier with Num_Lock bound to it:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;--&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- &amp;gt; $ xmodmap | grep Num&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- &amp;gt; mod2 &amp;#160; &amp;#160; &amp;#160; &amp;#160;Num_Lock (0x4d)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;--&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- Set numlockMask = 0 if you don&#039;t have a numlock key, or want to treat&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- numlock status separately.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;--&lt;/span&gt;&lt;br /&gt;myNumlockMask &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; mod2Mask&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- The default number of workspaces (virtual screens) and their names.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- By default we use numeric strings, but any string may be used as a&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- workspace name. The number of workspaces is determined by the length&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- of this list.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;--&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- A tagging example:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;--&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- &amp;gt; workspaces = [&amp;quot;web&amp;quot;, &amp;quot;irc&amp;quot;, &amp;quot;code&amp;quot; ] ++ map show [4..9]&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;--&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- myWorkspaces &amp;#160; &amp;#160;= [&amp;quot;1&amp;quot;,&amp;quot;2&amp;quot;,&amp;quot;3&amp;quot;,&amp;quot;4&amp;quot;,&amp;quot;5&amp;quot;,&amp;quot;6&amp;quot;,&amp;quot;7&amp;quot;,&amp;quot;8&amp;quot;,&amp;quot;9&amp;quot;]&lt;/span&gt;&lt;br /&gt;myWorkspaces &amp;#160; &amp;#160;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;1&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;2&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;3&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;4&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;5:www&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;6:min&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- Border colors for unfocused and focused windows, respectively.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;--&lt;/span&gt;&lt;br /&gt;myNormalBorderColor &amp;#160;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;#dddddd&amp;quot;&lt;/span&gt;&lt;br /&gt;myFocusedBorderColor &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;#ff0000&amp;quot;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- Key bindings. Add, modify or remove key bindings here.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;--&lt;/span&gt;&lt;br /&gt;myKeys conf&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;XConfig &lt;span style=&quot;color: green;&quot;&gt;&amp;#123;&lt;/span&gt;XMonad&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.&lt;/span&gt;modMask &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; modm&lt;span style=&quot;color: green;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; M&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.&lt;/span&gt;fromList &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;$&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- launch a terminal&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: green;&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;modm &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.|.&lt;/span&gt; shiftMask&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; xK&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;_&lt;/span&gt;Return&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; spawn &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;$&lt;/span&gt; XMonad&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.&lt;/span&gt;terminal conf&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- launch dmenu&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;modm&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; xK&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;_&lt;/span&gt;p &amp;#160; &amp;#160; &lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; spawn &lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;exe=`dmenu_path | dmenu` &amp;amp;&amp;amp; eval &lt;span style=&quot;background-color: #3cb371; font-weight: bold;&quot;&gt;\\&lt;/span&gt;&amp;quot;&lt;/span&gt;exec &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;$&lt;/span&gt;exe\\&lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- launch gmrun&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- , ((modm .|. shiftMask, xK_p &amp;#160; &amp;#160; ), spawn &amp;quot;gmrun&amp;quot;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- close focused window&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;modm &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.|.&lt;/span&gt; shiftMask&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; xK&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;_&lt;/span&gt;c &amp;#160; &amp;#160; &lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; kill&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- close focused window or just remove copy&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;modm &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.|.&lt;/span&gt; shiftMask &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.|.&lt;/span&gt; controlMask&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; xK&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;_&lt;/span&gt;c &amp;#160; &amp;#160; &lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; kill1&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- Rotate through the available layout algorithms&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;modm&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; xK&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;_&lt;/span&gt;space &lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; sendMessage NextLayout&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- &amp;#160;Reset the layouts on the current workspace to default&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;modm &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.|.&lt;/span&gt; shiftMask&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; xK&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;_&lt;/span&gt;space &lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; setLayout &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;$&lt;/span&gt; XMonad&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.&lt;/span&gt;layoutHook conf&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- Resize viewed windows to the correct size&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;modm&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; xK&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;_&lt;/span&gt;n &amp;#160; &amp;#160; &lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; refresh&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- Move focus to the next window&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;modm&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; xK&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;_&lt;/span&gt;Tab &amp;#160; &lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; windows W&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.&lt;/span&gt;focusDown&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- Move focus to the next window&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;modm&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; xK&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;_&lt;/span&gt;j &amp;#160; &amp;#160; &lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; windows W&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.&lt;/span&gt;focusDown&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- Move focus to the previous window&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;modm&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; xK&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;_&lt;/span&gt;k &amp;#160; &amp;#160; &lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; windows W&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.&lt;/span&gt;focusUp &amp;#160;&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- Move focus to the master window&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;modm&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; xK&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;_&lt;/span&gt;m &amp;#160; &amp;#160; &lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; windows W&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.&lt;/span&gt;focusMaster &amp;#160;&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- Swap the focused window and the master window&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;modm&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; xK&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;_&lt;/span&gt;Return&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; dwmpromote&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- Swap the focused window with the next window&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;modm &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.|.&lt;/span&gt; shiftMask&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; xK&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;_&lt;/span&gt;j &amp;#160; &amp;#160; &lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; windows W&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.&lt;/span&gt;swapDown &amp;#160;&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- Swap the focused window with the previous window&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;modm &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.|.&lt;/span&gt; shiftMask&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; xK&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;_&lt;/span&gt;k &amp;#160; &amp;#160; &lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; windows W&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.&lt;/span&gt;swapUp &amp;#160; &amp;#160;&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- Shrink the master area&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;modm&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; xK&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;_&lt;/span&gt;h &amp;#160; &amp;#160; &lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; sendMessage Shrink&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- Expand the master area&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;modm&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; xK&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;_&lt;/span&gt;l &amp;#160; &amp;#160; &lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; sendMessage Expand&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- Push window back into tiling&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;modm&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; xK&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;_&lt;/span&gt;t &amp;#160; &amp;#160; &lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; withFocused &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;$&lt;/span&gt; windows &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.&lt;/span&gt; W&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.&lt;/span&gt;sink&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- Increment the number of windows in the master area&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;modm &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; xK&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;_&lt;/span&gt;comma &lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; sendMessage &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;IncMasterN &lt;span style=&quot;color: red;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- Deincrement the number of windows in the master area&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;modm &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; xK&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;_&lt;/span&gt;period&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; sendMessage &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;IncMasterN &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- Toggle the status bar gap&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- Use this binding with avoidStruts from Hooks.ManageDocks.&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- See also the statusBar function from Hooks.DynamicLog.&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;--&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;modm &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; xK&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;_&lt;/span&gt;b &amp;#160; &amp;#160; &lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; sendMessage ToggleStruts&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- Quit xmonad&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;modm &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.|.&lt;/span&gt; shiftMask&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; xK&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;_&lt;/span&gt;q &amp;#160; &amp;#160; &lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; io &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;exitWith ExitSuccess&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- Restart xmonad&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;modm &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; xK&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;_&lt;/span&gt;q &amp;#160; &amp;#160; &lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; spawn &lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;xmonad --recompile; xmonad --restart&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: green;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;++&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- mod-[1..9] @@ Switch to workspace N&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- mod-shift-[1..9] @@ Move client to workspace N&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- mod-control-shift-[1..9] @@ Copy client to workspace N&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: green;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;m &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.|.&lt;/span&gt; modm&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; k&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; windows &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;$&lt;/span&gt; f i&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;|&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;i&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; k&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;&amp;lt;-&lt;/span&gt; &lt;a href=&quot;http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v:zip&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;zip&lt;/span&gt;&lt;/a&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;XMonad&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.&lt;/span&gt;workspaces conf&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#91;&lt;/span&gt;xK&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;_&lt;/span&gt;1 &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;..&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;f&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; m&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;&amp;lt;-&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;W&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.&lt;/span&gt;greedyView&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;W&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.&lt;/span&gt;shift&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; shiftMask&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;copy&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; shiftMask &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.|.&lt;/span&gt; controlMask&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;--&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- mod-{w,e,r}, Switch to physical/Xinerama screens 1, 2, or 3&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- mod-shift-{w,e,r}, Move client to screen 1, 2, or 3&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;--&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- [((m .|. modm, key), screenWorkspace sc &amp;gt;&amp;gt;= flip whenJust (windows . f))&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- &amp;#160; &amp;#160; | (key, sc) &amp;lt;- zip [xK_w, xK_e, xK_r] [0..]&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- &amp;#160; &amp;#160; , (f, m) &amp;lt;- [(W.view, 0), (W.shift, shiftMask)]]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;++&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: green;&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;modm&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; xK&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;_&lt;/span&gt;o&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; spawn &lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;opera -nomail -nolirc&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;modm&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; xK&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;_&lt;/span&gt;e&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; spawn &lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;claws-mail&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;modm&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; xK&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;_&lt;/span&gt;f&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; spawn &lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;firefox&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;modm&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; xK&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;_&lt;/span&gt;g&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; spawn &lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;gqview&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;modm &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.|.&lt;/span&gt; shiftMask&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; xK&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;_&lt;/span&gt;g&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; spawn &lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;geany&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;modm&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; xK&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;_&lt;/span&gt;s&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; spawn &lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;urxvt -pe tabbed,matcher&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;modm&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; xK&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;_&lt;/span&gt;less&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; windows &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;$&lt;/span&gt; W&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.&lt;/span&gt;greedyView &lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;5:www&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: green;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- Mouse bindings: default actions bound to mouse events&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;--&lt;/span&gt;&lt;br /&gt;myMouseBindings &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;XConfig &lt;span style=&quot;color: green;&quot;&gt;&amp;#123;&lt;/span&gt;XMonad&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.&lt;/span&gt;modMask &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; modm&lt;span style=&quot;color: green;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; M&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.&lt;/span&gt;fromList &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;$&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- mod-button1, Set the window to floating mode and move by dragging&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: green;&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;modm&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; button1&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;\w &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;-&amp;gt;&lt;/span&gt; focus w &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; mouseMoveWindow w&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; windows W&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.&lt;/span&gt;shiftMaster&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- mod-button2, Raise the window to the top of the stack&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;modm&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; button2&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;\w &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;-&amp;gt;&lt;/span&gt; focus w &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; windows W&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.&lt;/span&gt;shiftMaster&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- mod-button3, Set the window to floating mode and resize by dragging&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;modm&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; button3&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;\w &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;-&amp;gt;&lt;/span&gt; focus w &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; mouseResizeWindow w&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; windows W&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.&lt;/span&gt;shiftMaster&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- you may also bind events to the mouse scroll wheel (button4 and button5)&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: green;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- Layouts:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- You can specify and transform your layouts by modifying these values.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- If you change layout bindings be sure to use &#039;mod-shift-space&#039; after&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- restarting (with &#039;mod-q&#039;) to reset your layout state to the new&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- defaults, as xmonad preserves your old layout settings by default.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;--&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- The available layouts. &amp;#160;Note that each layout is separated by |||,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- which denotes layout choice.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;--&lt;/span&gt;&lt;br /&gt;myLayout &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; avoidStruts&lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;tiled &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;|||&lt;/span&gt; Mirror tiled &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;|||&lt;/span&gt; simpleTabbedAlways &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;|||&lt;/span&gt; Full&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &lt;span style=&quot;color: #06c; font-weight: bold;&quot;&gt;where&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- default tiling algorithm partitions the screen into two panes&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160;tiled &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; Tall nmaster delta ratio&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- The default number of windows in the master pane&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160;nmaster &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- Default proportion of screen occupied by master pane&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- ratio &amp;#160; = 1/2&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160;ratio &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;7&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;10&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- Percent of screen to increment by when resizing panes&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- delta &amp;#160; = 3/100&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160;delta &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;100&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- Window rules:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- Execute arbitrary actions and WindowSet manipulations when managing&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- a new window. You can use this to, for example, always float a&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- particular program, or have a client always appear on a particular&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- workspace.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;--&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- To find the property name associated with a program, use&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- &amp;gt; xprop | grep WM_CLASS&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- and click on the client you&#039;re interested in.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;--&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- To match on the WM_NAME, you can use &#039;title&#039; in the same way that&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- &#039;className&#039; and &#039;resource&#039; are used below.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;--&lt;/span&gt;&lt;br /&gt;myManageHook &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; composeAll&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: green;&quot;&gt;&amp;#91;&lt;/span&gt; className &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=?&lt;/span&gt; &lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;Gimp&amp;quot;&lt;/span&gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;--&amp;gt;&lt;/span&gt; doFloat&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; className &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=?&lt;/span&gt; &lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;MPlayer&amp;quot;&lt;/span&gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;--&amp;gt;&lt;/span&gt; doFloat&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; className &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=?&lt;/span&gt; &lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;Opera&amp;quot;&lt;/span&gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;--&amp;gt;&lt;/span&gt; doShift &lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;5:www&amp;quot;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;className &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=?&lt;/span&gt; &lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;Firefox&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;&amp;lt;&amp;amp;&amp;amp;&amp;gt;&lt;/span&gt; resource &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=?&lt;/span&gt; &lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;Dialog&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;--&amp;gt;&lt;/span&gt; doFloat &lt;span style=&quot;color: green;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- Event handling&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- * EwmhDesktops users should change this to ewmhDesktopsEventHook&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;--&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- Defines a custom handler function for X Events. The function should&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- return (All True) if the default handler is to be run afterwards. To&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- combine event hooks use mappend or mconcat from Data.Monoid.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;--&lt;/span&gt;&lt;br /&gt;myEventHook &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; mempty&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- Status bars and logging&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- Perform an arbitrary action on each internal state change or X event.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- See the &#039;XMonad.Hooks.DynamicLog&#039; extension for examples.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;--&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- myLogHook = return ()&lt;/span&gt;&lt;br /&gt;myLogHook h &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; dynamicLogWithPP &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;$&lt;/span&gt; myPP h&lt;br /&gt;&lt;br /&gt;myPP h &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; defaultPP &lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: green;&quot;&gt;&amp;#123;&lt;/span&gt; ppCurrent &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; wrap &lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;^bg(#e5f9ff)^fg(#105468)&amp;quot;&lt;/span&gt; &lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;^bg()^fg()&amp;quot;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; ppVisible &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; wrap &lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;^fg(#a00000)&amp;quot;&lt;/span&gt; &lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;^fg()&amp;quot;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; ppHidden &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; wrap &lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;^fg(#ffffff)&amp;quot;&lt;/span&gt; &lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;^fg()&amp;quot;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; ppHiddenNoWindows &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; wrap &lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;^fg(#7eacb9)&amp;quot;&lt;/span&gt; &lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;^fg()&amp;quot;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; ppSep &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot; | &amp;quot;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; ppWsSep &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot; &amp;#160;&amp;quot;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; ppTitle &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; shorten &lt;span style=&quot;color: red;&quot;&gt;80&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; ppOrder &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; workspaceTag&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt; ppOutput &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; System&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.&lt;/span&gt;&lt;a href=&quot;http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#t:IO&quot;&gt;&lt;span style=&quot;color: #cccc00; font-weight: bold;&quot;&gt;IO&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.&lt;/span&gt;UTF8&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;.&lt;/span&gt;hPutStrLn h&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: green;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #06c; font-weight: bold;&quot;&gt;where&lt;/span&gt; workspaceTag &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;x:xs&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;[ &amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;++&lt;/span&gt; x &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;++&lt;/span&gt; &lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot; ]&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt; : xs&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- Startup hook&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- Perform an arbitrary action each time xmonad starts or is restarted&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- with mod-q. &amp;#160;Used by, e.g., XMonad.Layout.PerWorkspace to initialize&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- per-workspace layout choices.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;--&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- By default, do nothing.&lt;/span&gt;&lt;br /&gt;myStartupHook &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v:return&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;return&lt;/span&gt;&lt;/a&gt; &lt;span style=&quot;color: green;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- Now run xmonad with all the defaults we set up.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- Run xmonad with the settings you specify. No need to modify this.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;--&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- main = xmonad defaults&lt;/span&gt;&lt;br /&gt;main &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #06c; font-weight: bold;&quot;&gt;do&lt;/span&gt; dzenh &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;&amp;lt;-&lt;/span&gt; spawnPipe &lt;span style=&quot;background-color: #3cb371;&quot;&gt;&amp;quot;dzen2 -p -w 1280 -ta l&amp;quot;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; xmonad &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;$&lt;/span&gt; defaults dzenh&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- A structure containing your configuration settings, overriding&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- fields in the default config. Any you don&#039;t override, will&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- use the defaults defined in xmonad/XMonad/Config.hs&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;--&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- No need to modify this.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;--&lt;/span&gt;&lt;br /&gt;defaults dzenh &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; defaultConfig &lt;span style=&quot;color: green;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- simple stuff&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; terminal &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; myTerminal&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; focusFollowsMouse &amp;#160;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; myFocusFollowsMouse&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; borderWidth &amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; myBorderWidth&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; modMask &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; myModMask&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; numlockMask &amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; myNumlockMask&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; workspaces &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; myWorkspaces&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; normalBorderColor &amp;#160;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; myNormalBorderColor&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; focusedBorderColor &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; myFocusedBorderColor&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- key bindings&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; keys &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; myKeys&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; mouseBindings &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; myMouseBindings&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #5d478b; font-style: italic;&quot;&gt;-- hooks, layouts&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; layoutHook &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; myLayout&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; manageHook &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; myManageHook&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; handleEventHook &amp;#160; &amp;#160;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; myEventHook&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; logHook &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; myLogHook dzenh&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;,&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; startupHook &amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #339933; font-weight: bold;&quot;&gt;=&lt;/span&gt; myStartupHook&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: green;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Die .xinitrc:&lt;br /&gt;
&lt;div class=&quot;bash geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;xsetroot -cursor_name left_ptr&lt;br /&gt;urxvtd &lt;span style=&quot;color: #660033;&quot;&gt;-f&lt;/span&gt; &lt;span style=&quot;color: #660033;&quot;&gt;-o&lt;/span&gt; &lt;span style=&quot;color: #660033;&quot;&gt;-q&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;exec&lt;/span&gt; xmonad&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Der Ressourcenverbrauch ist höher, aber wenn ich dadurch schneller arbeiten kann, ist es mir egal.&lt;br /&gt;
&lt;div class=&quot;bash geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;PR &amp;#160;NI &amp;#160;VIRT &amp;#160;RES &amp;#160;SHR S &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;%&lt;/span&gt;CPU &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;%&lt;/span&gt;MEM &amp;#160; &amp;#160;TIME+&lt;br /&gt;&lt;span style=&quot;color: #000000;&quot;&gt;40&lt;/span&gt; &amp;#160; &lt;span style=&quot;color: #000000;&quot;&gt;0&lt;/span&gt; &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;6916&lt;/span&gt; &lt;span style=&quot;color: #000000;&quot;&gt;3628&lt;/span&gt; &lt;span style=&quot;color: #000000;&quot;&gt;2496&lt;/span&gt; S &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;0.0&lt;/span&gt; &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;0.7&lt;/span&gt; &amp;#160; &lt;span style=&quot;color: #000000;&quot;&gt;0&lt;/span&gt;:&lt;span style=&quot;color: #000000;&quot;&gt;00.05&lt;/span&gt; xmonad&lt;br /&gt;&lt;span style=&quot;color: #000000;&quot;&gt;40&lt;/span&gt; &amp;#160; &lt;span style=&quot;color: #000000;&quot;&gt;0&lt;/span&gt; &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;3020&lt;/span&gt; &lt;span style=&quot;color: #000000;&quot;&gt;1144&lt;/span&gt; &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;940&lt;/span&gt; S &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;0.0&lt;/span&gt; &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;0.2&lt;/span&gt; &amp;#160; &lt;span style=&quot;color: #000000;&quot;&gt;0&lt;/span&gt;:&lt;span style=&quot;color: #000000;&quot;&gt;00.01&lt;/span&gt; dzen2&lt;br /&gt;&lt;span style=&quot;color: #000000;&quot;&gt;40&lt;/span&gt; &amp;#160; &lt;span style=&quot;color: #000000;&quot;&gt;0&lt;/span&gt; &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;3132&lt;/span&gt; &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;932&lt;/span&gt; &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;808&lt;/span&gt; S &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;0.0&lt;/span&gt; &amp;#160;&lt;span style=&quot;color: #000000;&quot;&gt;0.2&lt;/span&gt; &amp;#160; &lt;span style=&quot;color: #000000;&quot;&gt;0&lt;/span&gt;:&lt;span style=&quot;color: #000000;&quot;&gt;00.11&lt;/span&gt; dwm&lt;br /&gt;&amp;#160;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Gleiches gilt für mrxvt. Ein paar Bugs nervten auf Dauer (zB. Zeichenverlust beim Ändern der Fenstergröße) und die Dämonvariante urxvtd wird dem Tiling-Konzept meiner Meinung nach besser gerecht. 
    </content:encoded>

    <pubDate>Sun, 16 May 2010 20:16:00 +0200</pubDate>
    <guid isPermaLink="false">http://www.frank-busse.de/blag/archives/491-guid.html</guid>
    <category>dwm</category>
<category>mrxvt</category>
<category>urxvt</category>
<category>xmonad</category>

</item>

</channel>
</rss>
