<?xml version="1.0"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">

  <channel>
    <title>peteriserins.com</title>
    <link>http://peteriserins.com/</link>
    <atom:link href="http://peteriserins.com/rss.xml" rel="self" type="application/rss+xml" />
    <description>Blog posts by Peteris Erins</description>
    <language>en-us</language>
    <pubDate>Sun, 01 Jan 2012 03:24:21 EET</pubDate>
    <lastBuildDate>Sun, 01 Jan 2012 03:24:21 EET</lastBuildDate>

    
    <item>
      <title>Looking back at 2011</title>
      <link>http://peteriserins.com/2012/01/01/looking-back-at-2011.html</link>
      <pubDate>Sun, 01 Jan 2012 00:00:00 EET</pubDate>
      <author>peteris.erins@gmail.com (Peteris Erins)</author>
      <guid>http://peteriserins.com/2012/01/01/looking-back-at-2011</guid>
      <description>&lt;h2 id='looking_back_at_2011'&gt;Looking back at 2011&lt;/h2&gt;
&lt;time&gt;01.01.2012&lt;/time&gt;
&lt;p&gt;Following a common practice, below is a list of some of the things I did in 2011.&lt;/p&gt;

&lt;h3 id='big_picture'&gt;Big picture&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Completed first year at University, and first time living abroad&lt;/li&gt;

&lt;li&gt;First paid work at &lt;a href='http://reach.ly'&gt;Reach.ly&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;P90X&lt;/li&gt;

&lt;li&gt;Started this website (not that big really)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id='programming'&gt;Programming&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Learned what a startup is and ended up working at one&lt;/li&gt;

&lt;li&gt;Went to three hackathons&lt;/li&gt;

&lt;li&gt;Learned a whole bunch of programming/query languages; altogether, I wrote stuff using C++, Java, Javascript, Python, Clojure, Haskell, MATLAB, Ruby, Coffeescript, SQL and played around with bash, PHP, Mathematica, Prolog, C#, Obj-C, Perl, Scheme, Common Lisp, Qi, xslt, xquery&lt;/li&gt;

&lt;li&gt;Learned about functional and logic programming, REST, concurrency, databases (SQL and No), browser extensions, mobile development, multiplayer networking. Nice break from my previous algorithmic endeavours&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id='learning'&gt;Learning&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Did the three online Stanford courses on Artificial Intelligence, Machine Learning and Databases&lt;/p&gt;
&lt;/li&gt;

&lt;li&gt;
&lt;p&gt;Some good books I read:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The Lean Startup&lt;/li&gt;

&lt;li&gt;why&amp;#8217;s (poignant) guide to Ruby&lt;/li&gt;

&lt;li&gt;The Elements of Style&lt;/li&gt;

&lt;li&gt;Card Play Technique: The Art of Being Lucky&lt;/li&gt;

&lt;li&gt;Tapworthy&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;

&lt;li&gt;
&lt;p&gt;Great books I didn&amp;#8217;t finish yet:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Structure and Interpretation of Computer Programs&lt;/li&gt;

&lt;li&gt;On Lisp&lt;/li&gt;

&lt;li&gt;Dave Pelz&amp;#8217;s Short Game Bible&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;

&lt;li&gt;
&lt;p&gt;Key research papers and books:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href='http://conal.net/papers/push-pull-frp/push-pull-frp.pdf'&gt;Push-pull Functional Reactive Programming&lt;/a&gt;, C. Elliott&lt;/li&gt;

&lt;li&gt;&lt;a href='http://www.ida.liu.se/~ulfni/lpp/'&gt;Logic, Programming and Prolog&lt;/a&gt;, U. Nilsson &amp;amp; J. Maluszynski&lt;/li&gt;

&lt;li&gt;&lt;a href='http://pqdtopen.proquest.com/#abstract?dispub=3380156'&gt;Relational Programming in miniKanren: Techniques, Applications, and Implementations&lt;/a&gt;, W. E. Byrd&lt;/li&gt;

&lt;li&gt;&lt;a href='http://ro.uow.edu.au/infopapers/465/'&gt;Latency and Scalability: A Survey of Issues and Techniques for Supporting Networked Games&lt;/a&gt;, X. Jiang &amp;amp; F. Safaei &amp;amp; P. Boustead&lt;/li&gt;

&lt;li&gt;and some more at Reach.ly&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id='hobbies'&gt;Hobbies&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Helped Cambridge beat the Oxford undergraduates in the annual Varsity bridge match (not quite as fancy as it sounds)&lt;/li&gt;

&lt;li&gt;Wrapped up a great college basketball season, and started a bad one&lt;/li&gt;

&lt;li&gt;Started rowing&lt;/li&gt;

&lt;li&gt;Skied, cycled, ran&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id='technology'&gt;Technology&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Kindle&lt;/li&gt;

&lt;li&gt;Mac&lt;/li&gt;

&lt;li&gt;emacs (sorry, Vim)&lt;/li&gt;

&lt;li&gt;Mendeley&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id='outline_and_targets_for_2012'&gt;Outline and targets for 2012&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Post more&lt;/li&gt;

&lt;li&gt;Read more&lt;/li&gt;

&lt;li&gt;Go to a conference&lt;/li&gt;

&lt;li&gt;Write open source code&lt;/li&gt;

&lt;li&gt;Learn more about category theory, logic, types and how it all fits together&lt;/li&gt;

&lt;li&gt;Learn more about design&lt;/li&gt;

&lt;li&gt;Redesign this website&lt;/li&gt;

&lt;li&gt;Learn economics&lt;/li&gt;

&lt;li&gt;Improve health, fitness and earn some sports success&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Happy New Year!&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>SAT in Clojure core.logic</title>
      <link>http://peteriserins.com/2011/12/23/sat-in-clojure-core-logic.html</link>
      <pubDate>Fri, 23 Dec 2011 00:00:00 EET</pubDate>
      <author>peteris.erins@gmail.com (Peteris Erins)</author>
      <guid>http://peteriserins.com/2011/12/23/sat-in-clojure-core-logic</guid>
      <description>&lt;h2 id='sat_in_clojure_corelogic'&gt;SAT in Clojure core.logic&lt;/h2&gt;
&lt;time&gt;23.12.2011&lt;/time&gt;
&lt;p&gt;After reading a decent portion of On Lisp, I never really wrote an actual macro, until now. This is SAT or boolean satisfiability. I was hoping to write it as a function, but could not figure out if that is possible given that the &lt;code&gt;runs&lt;/code&gt; in core.logic are macros.&lt;/p&gt;

&lt;h3 id='code'&gt;Code&lt;/h3&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='clojure'&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='k'&gt;defn &lt;/span&gt;&lt;span class='nv'&gt;and-rewrite&lt;/span&gt; &lt;span class='p'&gt;[&lt;/span&gt;&lt;span class='nv'&gt;expr&lt;/span&gt;&lt;span class='p'&gt;]&lt;/span&gt;
  &lt;span class='o'&gt;`&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nf'&gt;conde&lt;/span&gt;
    &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nf'&gt;~&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nf'&gt;goalify&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;second &lt;/span&gt;&lt;span class='nv'&gt;expr&lt;/span&gt;&lt;span class='p'&gt;))&lt;/span&gt;
     &lt;span class='nv'&gt;~&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nf'&gt;goalify&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;second &lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;rest &lt;/span&gt;&lt;span class='nv'&gt;expr&lt;/span&gt;&lt;span class='p'&gt;))))))&lt;/span&gt;

&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='k'&gt;defn &lt;/span&gt;&lt;span class='nv'&gt;or-rewrite&lt;/span&gt; &lt;span class='p'&gt;[&lt;/span&gt;&lt;span class='nv'&gt;expr&lt;/span&gt;&lt;span class='p'&gt;]&lt;/span&gt;
  &lt;span class='o'&gt;`&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nf'&gt;conde&lt;/span&gt;
    &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nf'&gt;~&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nf'&gt;goalify&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;second &lt;/span&gt;&lt;span class='nv'&gt;expr&lt;/span&gt;&lt;span class='p'&gt;)))&lt;/span&gt;
    &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nf'&gt;~&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nf'&gt;goalify&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;second &lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;rest &lt;/span&gt;&lt;span class='nv'&gt;expr&lt;/span&gt;&lt;span class='p'&gt;))))))&lt;/span&gt;

&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='k'&gt;defn &lt;/span&gt;&lt;span class='nv'&gt;demorgan&lt;/span&gt; &lt;span class='p'&gt;[&lt;/span&gt;&lt;span class='nv'&gt;subexpr&lt;/span&gt;&lt;span class='p'&gt;]&lt;/span&gt;
  &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='k'&gt;if &lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;and &lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;seq? &lt;/span&gt;&lt;span class='nv'&gt;subexpr&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;
           &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;= &lt;/span&gt;&lt;span class='ss'&gt;&amp;#39;not&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;first &lt;/span&gt;&lt;span class='nv'&gt;subexpr&lt;/span&gt;&lt;span class='p'&gt;)))&lt;/span&gt;
    &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;second &lt;/span&gt;&lt;span class='nv'&gt;subexpr&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;
    &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;cons &lt;/span&gt;&lt;span class='ss'&gt;&amp;#39;not&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;list &lt;/span&gt;&lt;span class='nv'&gt;subexpr&lt;/span&gt;&lt;span class='p'&gt;))))&lt;/span&gt;

&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='k'&gt;defn &lt;/span&gt;&lt;span class='nv'&gt;not-rewrite&lt;/span&gt; &lt;span class='p'&gt;[&lt;/span&gt;&lt;span class='nv'&gt;expr&lt;/span&gt;&lt;span class='p'&gt;]&lt;/span&gt;
  &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='k'&gt;let &lt;/span&gt;&lt;span class='p'&gt;[&lt;/span&gt;&lt;span class='nv'&gt;expr&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;second &lt;/span&gt;&lt;span class='nv'&gt;expr&lt;/span&gt;&lt;span class='p'&gt;)]&lt;/span&gt;
    &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nf'&gt;cond&lt;/span&gt;
     &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;symbol? &lt;/span&gt;&lt;span class='nv'&gt;expr&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;
     &lt;span class='o'&gt;`&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;== &lt;/span&gt;&lt;span class='nv'&gt;~expr&lt;/span&gt; &lt;span class='nv'&gt;false&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;
     &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;= &lt;/span&gt;&lt;span class='ss'&gt;&amp;#39;not&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;first &lt;/span&gt;&lt;span class='nv'&gt;expr&lt;/span&gt;&lt;span class='p'&gt;))&lt;/span&gt;
     &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nf'&gt;goalify&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;second &lt;/span&gt;&lt;span class='nv'&gt;expr&lt;/span&gt;&lt;span class='p'&gt;))&lt;/span&gt;
     &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;= &lt;/span&gt;&lt;span class='ss'&gt;&amp;#39;and&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;first &lt;/span&gt;&lt;span class='nv'&gt;expr&lt;/span&gt;&lt;span class='p'&gt;))&lt;/span&gt;
     &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nf'&gt;goalify&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;cons &lt;/span&gt;&lt;span class='ss'&gt;&amp;#39;or&lt;/span&gt;  &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;map &lt;/span&gt;&lt;span class='nv'&gt;demorgan&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;rest &lt;/span&gt;&lt;span class='nv'&gt;expr&lt;/span&gt;&lt;span class='p'&gt;))))&lt;/span&gt;
     &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;= &lt;/span&gt;&lt;span class='ss'&gt;&amp;#39;or&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;first &lt;/span&gt;&lt;span class='nv'&gt;expr&lt;/span&gt;&lt;span class='p'&gt;))&lt;/span&gt;
     &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nf'&gt;goalify&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;cons &lt;/span&gt;&lt;span class='ss'&gt;&amp;#39;and&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;map &lt;/span&gt;&lt;span class='nv'&gt;demorgan&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;rest &lt;/span&gt;&lt;span class='nv'&gt;expr&lt;/span&gt;&lt;span class='p'&gt;)))))))&lt;/span&gt;

&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='k'&gt;defn &lt;/span&gt;&lt;span class='nv'&gt;goalify&lt;/span&gt; &lt;span class='p'&gt;[&lt;/span&gt;&lt;span class='nv'&gt;expr&lt;/span&gt;&lt;span class='p'&gt;]&lt;/span&gt;
  &lt;span class='s'&gt;&amp;quot;Turns boolean expressions into core.logic goals&amp;quot;&lt;/span&gt;
  &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nf'&gt;cond&lt;/span&gt;
   &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;symbol? &lt;/span&gt;&lt;span class='nv'&gt;expr&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;
   &lt;span class='o'&gt;`&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;== &lt;/span&gt;&lt;span class='nv'&gt;~expr&lt;/span&gt; &lt;span class='nv'&gt;true&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;
   &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;= &lt;/span&gt;&lt;span class='ss'&gt;&amp;#39;and&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;first &lt;/span&gt;&lt;span class='nv'&gt;expr&lt;/span&gt;&lt;span class='p'&gt;))&lt;/span&gt;
    &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nf'&gt;and-rewrite&lt;/span&gt; &lt;span class='nv'&gt;expr&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;
   &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;= &lt;/span&gt;&lt;span class='ss'&gt;&amp;#39;or&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;first &lt;/span&gt;&lt;span class='nv'&gt;expr&lt;/span&gt;&lt;span class='p'&gt;))&lt;/span&gt;
    &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nf'&gt;or-rewrite&lt;/span&gt; &lt;span class='nv'&gt;expr&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;
   &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;= &lt;/span&gt;&lt;span class='ss'&gt;&amp;#39;not&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;first &lt;/span&gt;&lt;span class='nv'&gt;expr&lt;/span&gt;&lt;span class='p'&gt;))&lt;/span&gt;
    &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nf'&gt;not-rewrite&lt;/span&gt; &lt;span class='nv'&gt;expr&lt;/span&gt;&lt;span class='p'&gt;)))&lt;/span&gt;

&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='k'&gt;defmacro &lt;/span&gt;&lt;span class='nv'&gt;sat&lt;/span&gt; &lt;span class='p'&gt;[&lt;/span&gt;&lt;span class='nv'&gt;vars&lt;/span&gt; &lt;span class='nv'&gt;expr&lt;/span&gt;&lt;span class='p'&gt;]&lt;/span&gt; 
  &lt;span class='s'&gt;&amp;quot;SAT&amp;quot;&lt;/span&gt;
  &lt;span class='o'&gt;`&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nf'&gt;run*&lt;/span&gt; &lt;span class='p'&gt;[&lt;/span&gt;&lt;span class='nv'&gt;q&lt;/span&gt;&lt;span class='o'&gt;#&lt;/span&gt;&lt;span class='p'&gt;]&lt;/span&gt;
         &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nf'&gt;fresh&lt;/span&gt; &lt;span class='nv'&gt;~vars&lt;/span&gt;
                &lt;span class='nv'&gt;~&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nf'&gt;goalify&lt;/span&gt; &lt;span class='nv'&gt;expr&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;
                &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;== &lt;/span&gt;&lt;span class='nv'&gt;q&lt;/span&gt;&lt;span class='o'&gt;#&lt;/span&gt; &lt;span class='nv'&gt;~vars&lt;/span&gt;&lt;span class='p'&gt;))))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;h3 id='usage'&gt;Usage&lt;/h3&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='clojure'&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nf'&gt;sat&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;and &lt;/span&gt;&lt;span class='nv'&gt;p&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;not &lt;/span&gt;&lt;span class='nv'&gt;p&lt;/span&gt;&lt;span class='p'&gt;)))&lt;/span&gt;
&lt;span class='c1'&gt;;=&amp;gt; ()&lt;/span&gt;

&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nf'&gt;sat&lt;/span&gt; &lt;span class='p'&gt;[&lt;/span&gt;&lt;span class='nv'&gt;p&lt;/span&gt; &lt;span class='nv'&gt;q&lt;/span&gt;&lt;span class='p'&gt;]&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;not &lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;and &lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;or &lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;not &lt;/span&gt;&lt;span class='nv'&gt;p&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt; &lt;span class='nv'&gt;q&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;
                     &lt;span class='nv'&gt;q&lt;/span&gt;&lt;span class='p'&gt;)))&lt;/span&gt;
&lt;span class='c1'&gt;;=&amp;gt; ([_.0 false] [true false])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    
    <item>
      <title>Gitit</title>
      <link>http://peteriserins.com/2011/12/18/gitit.html</link>
      <pubDate>Sun, 18 Dec 2011 00:00:00 EET</pubDate>
      <author>peteris.erins@gmail.com (Peteris Erins)</author>
      <guid>http://peteriserins.com/2011/12/18/gitit</guid>
      <description>&lt;h2 id='gitit'&gt;Gitit&lt;/h2&gt;
&lt;time&gt;18.12.2011&lt;/time&gt;
&lt;p&gt;Knowing many people who have forgotten the details of much of what they learned in college and school (and the latter includes myself), I&amp;#8217;ve been trying to figure out a mechanism for preserving at least the very essential learned thought-processes for concepts in Maths, Computer Science and anything else I end up learning about. Integrating &lt;a href='http://mendeley.com'&gt;Mendeley&lt;/a&gt; into my workflow has been a very fruitful first step. In essence, Mendeley gives fast access to PDFs, supports search, annotations and also synchronizes everything with the cloud. Not to mention it is able to recover a lot of metadata associated with the PDF which is very useful if you are writing papers.&lt;/p&gt;

&lt;p&gt;As a second step, I started writing up experimental LaTeX notes for some Maths, but quickly ran out of steam. These are not very rewarding to write, they are not interlinkable, searchable and it is infeasible to write them incrementally. Opening, editing, compiling, previewing, fixing, compiling, closing is a long loop for appending a simple thought.&lt;/p&gt;

&lt;p&gt;&lt;a href='http://gitit.net'&gt;Gitit&lt;/a&gt; is a personal wiki solution that solves these problems and plenty more. It is a git-backed wiki that supports in-browser editing, markdown, latex, code highlighting, slide show creation among other things. Check it out! Naturally, I have set one up as a &lt;a href='http://fluidapp.com'&gt;fluid app&lt;/a&gt;. The dog image given on the website was too detailed for the dock, so I created an icon to go with it. I tried to preserve the original color scheme of the disk. The green lambda did&amp;#8217;t go well with the disk colors though, so I colored it white. Here is the icon if you need it:&lt;/p&gt;
&lt;a href='../../../img/gitit_1024.png'&gt;&lt;img src='../../../img/gitit_1024.png' height='64' alt='Pink disk with a green border and a white lambda inside, logo of Gitit' style='padding-top: 30px' width='64' /&gt;&lt;img /&gt;&lt;/a&gt;</description>
    </item>
    
    <item>
      <title>Sliding Window Trick in Python</title>
      <link>http://peteriserins.com/2011/09/20/sliding-window-trick-in-python.html</link>
      <pubDate>Tue, 20 Sep 2011 00:00:00 EEST</pubDate>
      <author>peteris.erins@gmail.com (Peteris Erins)</author>
      <guid>http://peteriserins.com/2011/09/20/sliding-window-trick-in-python</guid>
      <description>&lt;h2 id='sliding_window_trick_in_python'&gt;Sliding Window Trick in Python&lt;/h2&gt;
&lt;time&gt;20.09.2011&lt;/time&gt;
&lt;p&gt;The &lt;a href='http://tjsct.wikidot.com/sliding-window-trick'&gt;Sliding Window Trick&lt;/a&gt; is a well-known and widely practiced method in Dynamic Programming that allows you to shave an order of magnitude off of the memory consumption for certain Dynamic Programming algorithms by discarding parts of the table that will not be used in further computation.&lt;/p&gt;

&lt;h3 id='example'&gt;Example&lt;/h3&gt;

&lt;p&gt;Here is a function that returns the r-th row of &lt;a href='http://en.wikipedia.org/wiki/Pascal&amp;apos;s_triangle'&gt;Pascal&amp;#8217;s triangle&lt;/a&gt; in Python 2.&lt;/p&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='python'&gt;&lt;span class='k'&gt;def&lt;/span&gt; &lt;span class='nf'&gt;comb_row&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='n'&gt;r&lt;/span&gt;&lt;span class='p'&gt;):&lt;/span&gt;
    &lt;span class='n'&gt;C&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='p'&gt;[(&lt;/span&gt;&lt;span class='n'&gt;r&lt;/span&gt; &lt;span class='o'&gt;+&lt;/span&gt; &lt;span class='mi'&gt;1&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt; &lt;span class='o'&gt;*&lt;/span&gt; &lt;span class='p'&gt;[&lt;/span&gt;&lt;span class='mi'&gt;0&lt;/span&gt;&lt;span class='p'&gt;]&lt;/span&gt; &lt;span class='k'&gt;for&lt;/span&gt; &lt;span class='n'&gt;_&lt;/span&gt; &lt;span class='ow'&gt;in&lt;/span&gt; &lt;span class='nb'&gt;range&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='n'&gt;r&lt;/span&gt; &lt;span class='o'&gt;+&lt;/span&gt; &lt;span class='mi'&gt;1&lt;/span&gt;&lt;span class='p'&gt;)]&lt;/span&gt;
    &lt;span class='n'&gt;C&lt;/span&gt;&lt;span class='p'&gt;[&lt;/span&gt;&lt;span class='mi'&gt;0&lt;/span&gt;&lt;span class='p'&gt;][&lt;/span&gt;&lt;span class='mi'&gt;0&lt;/span&gt;&lt;span class='p'&gt;]&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='mi'&gt;1&lt;/span&gt;
    &lt;span class='k'&gt;for&lt;/span&gt; &lt;span class='n'&gt;i&lt;/span&gt; &lt;span class='ow'&gt;in&lt;/span&gt; &lt;span class='nb'&gt;range&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='n'&gt;r&lt;/span&gt; &lt;span class='o'&gt;+&lt;/span&gt; &lt;span class='mi'&gt;1&lt;/span&gt;&lt;span class='p'&gt;):&lt;/span&gt;
        &lt;span class='n'&gt;C&lt;/span&gt;&lt;span class='p'&gt;[&lt;/span&gt;&lt;span class='n'&gt;i&lt;/span&gt;&lt;span class='p'&gt;][&lt;/span&gt;&lt;span class='mi'&gt;0&lt;/span&gt;&lt;span class='p'&gt;]&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='n'&gt;C&lt;/span&gt;&lt;span class='p'&gt;[&lt;/span&gt;&lt;span class='n'&gt;i&lt;/span&gt;&lt;span class='p'&gt;][&lt;/span&gt;&lt;span class='n'&gt;i&lt;/span&gt;&lt;span class='p'&gt;]&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='mi'&gt;1&lt;/span&gt;
        &lt;span class='k'&gt;for&lt;/span&gt; &lt;span class='n'&gt;j&lt;/span&gt; &lt;span class='ow'&gt;in&lt;/span&gt; &lt;span class='nb'&gt;range&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='mi'&gt;1&lt;/span&gt;&lt;span class='p'&gt;,&lt;/span&gt; &lt;span class='n'&gt;i&lt;/span&gt;&lt;span class='p'&gt;):&lt;/span&gt;
            &lt;span class='n'&gt;C&lt;/span&gt;&lt;span class='p'&gt;[&lt;/span&gt;&lt;span class='n'&gt;i&lt;/span&gt;&lt;span class='p'&gt;][&lt;/span&gt;&lt;span class='n'&gt;j&lt;/span&gt;&lt;span class='p'&gt;]&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='n'&gt;C&lt;/span&gt;&lt;span class='p'&gt;[&lt;/span&gt;&lt;span class='n'&gt;i&lt;/span&gt; &lt;span class='o'&gt;-&lt;/span&gt; &lt;span class='mi'&gt;1&lt;/span&gt;&lt;span class='p'&gt;][&lt;/span&gt;&lt;span class='n'&gt;j&lt;/span&gt; &lt;span class='o'&gt;-&lt;/span&gt; &lt;span class='mi'&gt;1&lt;/span&gt;&lt;span class='p'&gt;]&lt;/span&gt; &lt;span class='o'&gt;+&lt;/span&gt; &lt;span class='n'&gt;C&lt;/span&gt;&lt;span class='p'&gt;[&lt;/span&gt;&lt;span class='n'&gt;i&lt;/span&gt; &lt;span class='o'&gt;-&lt;/span&gt; &lt;span class='mi'&gt;1&lt;/span&gt;&lt;span class='p'&gt;][&lt;/span&gt;&lt;span class='n'&gt;j&lt;/span&gt;&lt;span class='p'&gt;]&lt;/span&gt;
    &lt;span class='k'&gt;return&lt;/span&gt; &lt;span class='n'&gt;C&lt;/span&gt;&lt;span class='p'&gt;[&lt;/span&gt;&lt;span class='n'&gt;r&lt;/span&gt;&lt;span class='p'&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;A relatively clear implementation, but the memory footprint is quadratic and that might be too much for certain applications.&lt;/p&gt;

&lt;h3 id='the_sliding_window_approach'&gt;The Sliding Window approach&lt;/h3&gt;

&lt;p&gt;Note that we only ever operate on the last two rows in the previous example. Naturally, we can rewrite the function to keep only the last two rows in memory.&lt;/p&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='python'&gt;&lt;span class='k'&gt;def&lt;/span&gt; &lt;span class='nf'&gt;comb_row_sliding&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='n'&gt;r&lt;/span&gt;&lt;span class='p'&gt;):&lt;/span&gt;
    &lt;span class='n'&gt;prev&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='n'&gt;r&lt;/span&gt; &lt;span class='o'&gt;+&lt;/span&gt; &lt;span class='mi'&gt;1&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt; &lt;span class='o'&gt;*&lt;/span&gt; &lt;span class='p'&gt;[&lt;/span&gt;&lt;span class='mi'&gt;0&lt;/span&gt;&lt;span class='p'&gt;]&lt;/span&gt;
    &lt;span class='n'&gt;cur&lt;/span&gt;  &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='n'&gt;r&lt;/span&gt; &lt;span class='o'&gt;+&lt;/span&gt; &lt;span class='mi'&gt;1&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt; &lt;span class='o'&gt;*&lt;/span&gt; &lt;span class='p'&gt;[&lt;/span&gt;&lt;span class='mi'&gt;0&lt;/span&gt;&lt;span class='p'&gt;]&lt;/span&gt;
    &lt;span class='n'&gt;prev&lt;/span&gt;&lt;span class='p'&gt;[&lt;/span&gt;&lt;span class='mi'&gt;0&lt;/span&gt;&lt;span class='p'&gt;]&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='mi'&gt;1&lt;/span&gt;
    &lt;span class='k'&gt;for&lt;/span&gt; &lt;span class='n'&gt;i&lt;/span&gt; &lt;span class='ow'&gt;in&lt;/span&gt; &lt;span class='nb'&gt;range&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='n'&gt;r&lt;/span&gt; &lt;span class='o'&gt;+&lt;/span&gt; &lt;span class='mi'&gt;1&lt;/span&gt;&lt;span class='p'&gt;):&lt;/span&gt;
        &lt;span class='n'&gt;cur&lt;/span&gt;&lt;span class='p'&gt;[&lt;/span&gt;&lt;span class='mi'&gt;0&lt;/span&gt;&lt;span class='p'&gt;]&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='n'&gt;cur&lt;/span&gt;&lt;span class='p'&gt;[&lt;/span&gt;&lt;span class='n'&gt;i&lt;/span&gt;&lt;span class='p'&gt;]&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='mi'&gt;1&lt;/span&gt;
        &lt;span class='k'&gt;for&lt;/span&gt; &lt;span class='n'&gt;j&lt;/span&gt; &lt;span class='ow'&gt;in&lt;/span&gt; &lt;span class='nb'&gt;range&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='mi'&gt;1&lt;/span&gt;&lt;span class='p'&gt;,&lt;/span&gt; &lt;span class='n'&gt;i&lt;/span&gt;&lt;span class='p'&gt;):&lt;/span&gt;
            &lt;span class='n'&gt;cur&lt;/span&gt;&lt;span class='p'&gt;[&lt;/span&gt;&lt;span class='n'&gt;j&lt;/span&gt;&lt;span class='p'&gt;]&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='n'&gt;prev&lt;/span&gt;&lt;span class='p'&gt;[&lt;/span&gt;&lt;span class='n'&gt;j&lt;/span&gt; &lt;span class='o'&gt;-&lt;/span&gt; &lt;span class='mi'&gt;1&lt;/span&gt;&lt;span class='p'&gt;]&lt;/span&gt; &lt;span class='o'&gt;+&lt;/span&gt; &lt;span class='n'&gt;prev&lt;/span&gt;&lt;span class='p'&gt;[&lt;/span&gt;&lt;span class='n'&gt;j&lt;/span&gt;&lt;span class='p'&gt;]&lt;/span&gt;
        &lt;span class='n'&gt;prev&lt;/span&gt;&lt;span class='p'&gt;,&lt;/span&gt; &lt;span class='n'&gt;cur&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='n'&gt;cur&lt;/span&gt;&lt;span class='p'&gt;,&lt;/span&gt; &lt;span class='n'&gt;prev&lt;/span&gt;
    &lt;span class='k'&gt;return&lt;/span&gt; &lt;span class='n'&gt;prev&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;Much better, but that was a lot of work.&lt;/p&gt;

&lt;h3 id='the_trick'&gt;The trick&lt;/h3&gt;

&lt;p&gt;Turns out, we only need to change one line of the first implementation to have it consume only linear memory. It involves a clever use of Python&amp;#8217;s list repetition syntax.&lt;/p&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='python'&gt;&lt;span class='k'&gt;def&lt;/span&gt; &lt;span class='nf'&gt;comb_row_neat&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='n'&gt;r&lt;/span&gt;&lt;span class='p'&gt;):&lt;/span&gt;
    &lt;span class='n'&gt;C&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='p'&gt;[(&lt;/span&gt;&lt;span class='n'&gt;r&lt;/span&gt; &lt;span class='o'&gt;+&lt;/span&gt; &lt;span class='mi'&gt;1&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt; &lt;span class='o'&gt;*&lt;/span&gt; &lt;span class='p'&gt;[&lt;/span&gt;&lt;span class='mi'&gt;0&lt;/span&gt;&lt;span class='p'&gt;],&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='n'&gt;r&lt;/span&gt; &lt;span class='o'&gt;+&lt;/span&gt; &lt;span class='mi'&gt;1&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt; &lt;span class='o'&gt;*&lt;/span&gt; &lt;span class='p'&gt;[&lt;/span&gt;&lt;span class='mi'&gt;0&lt;/span&gt;&lt;span class='p'&gt;]]&lt;/span&gt; &lt;span class='o'&gt;*&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='n'&gt;r&lt;/span&gt; &lt;span class='o'&gt;/&lt;/span&gt; &lt;span class='mi'&gt;2&lt;/span&gt; &lt;span class='o'&gt;+&lt;/span&gt; &lt;span class='mi'&gt;1&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;
    &lt;span class='n'&gt;C&lt;/span&gt;&lt;span class='p'&gt;[&lt;/span&gt;&lt;span class='mi'&gt;0&lt;/span&gt;&lt;span class='p'&gt;][&lt;/span&gt;&lt;span class='mi'&gt;0&lt;/span&gt;&lt;span class='p'&gt;]&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='mi'&gt;1&lt;/span&gt;
    &lt;span class='k'&gt;for&lt;/span&gt; &lt;span class='n'&gt;i&lt;/span&gt; &lt;span class='ow'&gt;in&lt;/span&gt; &lt;span class='nb'&gt;range&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='n'&gt;r&lt;/span&gt; &lt;span class='o'&gt;+&lt;/span&gt; &lt;span class='mi'&gt;1&lt;/span&gt;&lt;span class='p'&gt;):&lt;/span&gt;
        &lt;span class='n'&gt;C&lt;/span&gt;&lt;span class='p'&gt;[&lt;/span&gt;&lt;span class='n'&gt;i&lt;/span&gt;&lt;span class='p'&gt;][&lt;/span&gt;&lt;span class='mi'&gt;0&lt;/span&gt;&lt;span class='p'&gt;]&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='n'&gt;C&lt;/span&gt;&lt;span class='p'&gt;[&lt;/span&gt;&lt;span class='n'&gt;i&lt;/span&gt;&lt;span class='p'&gt;][&lt;/span&gt;&lt;span class='n'&gt;i&lt;/span&gt;&lt;span class='p'&gt;]&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='mi'&gt;1&lt;/span&gt;
        &lt;span class='k'&gt;for&lt;/span&gt; &lt;span class='n'&gt;j&lt;/span&gt; &lt;span class='ow'&gt;in&lt;/span&gt; &lt;span class='nb'&gt;range&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='mi'&gt;1&lt;/span&gt;&lt;span class='p'&gt;,&lt;/span&gt; &lt;span class='n'&gt;i&lt;/span&gt;&lt;span class='p'&gt;):&lt;/span&gt;
            &lt;span class='n'&gt;C&lt;/span&gt;&lt;span class='p'&gt;[&lt;/span&gt;&lt;span class='n'&gt;i&lt;/span&gt;&lt;span class='p'&gt;][&lt;/span&gt;&lt;span class='n'&gt;j&lt;/span&gt;&lt;span class='p'&gt;]&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='n'&gt;C&lt;/span&gt;&lt;span class='p'&gt;[&lt;/span&gt;&lt;span class='n'&gt;i&lt;/span&gt; &lt;span class='o'&gt;-&lt;/span&gt; &lt;span class='mi'&gt;1&lt;/span&gt;&lt;span class='p'&gt;][&lt;/span&gt;&lt;span class='n'&gt;j&lt;/span&gt; &lt;span class='o'&gt;-&lt;/span&gt; &lt;span class='mi'&gt;1&lt;/span&gt;&lt;span class='p'&gt;]&lt;/span&gt; &lt;span class='o'&gt;+&lt;/span&gt; &lt;span class='n'&gt;C&lt;/span&gt;&lt;span class='p'&gt;[&lt;/span&gt;&lt;span class='n'&gt;i&lt;/span&gt; &lt;span class='o'&gt;-&lt;/span&gt; &lt;span class='mi'&gt;1&lt;/span&gt;&lt;span class='p'&gt;][&lt;/span&gt;&lt;span class='n'&gt;j&lt;/span&gt;&lt;span class='p'&gt;]&lt;/span&gt;
    &lt;span class='k'&gt;return&lt;/span&gt; &lt;span class='n'&gt;C&lt;/span&gt;&lt;span class='p'&gt;[&lt;/span&gt;&lt;span class='n'&gt;r&lt;/span&gt;&lt;span class='p'&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;&lt;em&gt;Homework&lt;/em&gt;: There is a simpler linear-time, linear-memory, in-place algorithm for the problem that is somewhat harder to spot. I&amp;#8217;ll leave it as an exercise.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>SICP in Haskell: Chapter 1</title>
      <link>http://peteriserins.com/2011/08/22/sicp-chapter-1.html</link>
      <pubDate>Mon, 22 Aug 2011 00:00:00 EEST</pubDate>
      <author>peteris.erins@gmail.com (Peteris Erins)</author>
      <guid>http://peteriserins.com/2011/08/22/sicp-chapter-1</guid>
      <description>&lt;h2 id='sicp_in_haskell_chapter_1'&gt;SICP in Haskell: Chapter 1&lt;/h2&gt;
&lt;time&gt;22.08.2011&lt;/time&gt;
&lt;p&gt;I recently (see: &lt;a href='http://peteriserins.com/2011/08/12/starting-sicp-in-haskell.html'&gt;Starting SICP in Haskell&lt;/a&gt;) started doing the SICP exercises in Haskell. After a more-or-less idle week I&amp;#8217;ve managed to finish Section 1.3 and hence Chapter 1. My solutions are at &lt;a href='https://github.com/Pet3ris/sicp'&gt;GitHub&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Chapter 1 is called Building Abstractions with Procedures and introduces the basics of programming with a focus on functions including anonymous function and higher-order functions. It was mostly a recap for me, but there were some new things too, e.g., the Miller-Rabin primality test and Simpson&amp;#8217;s Rule for integration.&lt;/p&gt;

&lt;p&gt;Haskell has been entirely adequate so far. It was probably instructive to have to think about reasonable type signatures for the functions. One mistake I made was trying to use monads for IO initially. Don&amp;#8217;t get me wrong, I think monads are great in the long run, but for these kinds of pet problems, solutions with the &lt;code&gt;trace&lt;/code&gt; function end up being cleaner and more similar to the respective lisp versions. Also, for similar reasons, I will try to stop generalizing my types so much. It&amp;#8217;s tempting and occasionally instructive to make the functions at least as general as the respective lisp versions, but I was overdoing it for this Chapter. Wildcard feature that turned out to be really useful was automatic currying.&lt;/p&gt;

&lt;p&gt;Looking forward to the following chapters and hoping it gets a little more challenging. We&amp;#8217;ll see how Haskell holds up.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Arrow mania</title>
      <link>http://peteriserins.com/2011/08/18/arrow-mania.html</link>
      <pubDate>Thu, 18 Aug 2011 00:00:00 EEST</pubDate>
      <author>peteris.erins@gmail.com (Peteris Erins)</author>
      <guid>http://peteriserins.com/2011/08/18/arrow-mania</guid>
      <description>&lt;h2&gt;Arrow mania&lt;/h2&gt;
&lt;time&gt;18.08.2011&lt;/time&gt;

&lt;p&gt;
  The &lt;a href=&quot;http://en.wikipedia.org/wiki/Fortress_(programming_language)&quot;&gt;Fortress language&lt;/a&gt;
  is a lesser-known programming language currently in development which among other things
  promises to simplify concurrency via parallelism. It also allows the definition of various
  operators and complicated precedence rules in ASCII, defining the way code will be presented
  in LaTeX and how some character combinations would be translated to symbols.
&lt;/p&gt;
&lt;p&gt;
  There was an article in the wiki that drew my attention about defining which ASCII sequences
  should map to every Unicode arrow-like character. It's an amusing article with little
  applicability for most conventional programming languages. Only a small minority of them
  define the way their code should be presented, however, a couple do allow the definition 
  of operators or functions of a reasonable set of non-alphanumeric ASCII characters.
&lt;/p&gt;
&lt;p&gt;
  This is of use for, e.g, Haskell, Clojure programmers who might want to use the following
  sensible guidelines if implementing some sort of Mathematical operator that has an adopted
  arrow symbol. I hope the original author does not mind this article being copied in here.
  I claim no rights and no ownership. Enjoy the copy below and the
  &lt;a href=&quot;https://gist.github.com/1154685&quot;&gt;gist&lt;/a&gt;.
&lt;/p&gt;

&lt;div class=&quot;wikipage&quot;&gt; 
    &lt;div id=&quot;searchable&quot;&gt;&lt;h3 id=&quot;RepresentingArrowsinASCII&quot;&gt;Representing &quot;Arrows&quot; in ASCII&lt;/h3&gt; 
&lt;p&gt; 
Here is a set of guiding principles for defining ASCII-expressible tokens for arrows and arrow-like things.
&lt;/p&gt; 
&lt;p&gt; 
Just as we reserved a space of ASCII-expressible tokens to serve for brackets, we can reserve some tokens that would otherwise never occur in practice for arrows.  Unfortunately, it's hard to express up and down arrows, but we can do quite well for left and right arrows.
&lt;/p&gt; 
&lt;p&gt; 
We will just describe right arrows here.  Left arrows are obtained by a fairly obvious reversal of characters and using &lt;tt&gt;&amp;lt;&lt;/tt&gt; for&lt;tt&gt; &amp;gt;&lt;/tt&gt;.  Bidirectional arrows are made by using two heads rather than a head and a tail.
&lt;/p&gt; 
&lt;p&gt; 
A right arrow has a right-pointing tail, a body, and a right-pointing head.  The body may include a center.  At least one of the head, the center, and the tail must be nonempty.
&lt;/p&gt; 
&lt;p&gt; 
A right-pointing tail consists of some number (possibly zero) of &lt;tt&gt;|&lt;/tt&gt; characters followed by some number (possibly zero) of &lt;tt&gt;&amp;gt;&lt;/tt&gt; characters; among these may be interspersed &lt;tt&gt;*&lt;/tt&gt; characters, but never two &lt;tt&gt;*&lt;/tt&gt; characters in a row, and never a &lt;tt&gt;*&lt;/tt&gt; at the left-hand end.
&lt;/p&gt; 
&lt;p&gt; 
A body consists of some nonzero number of &lt;tt&gt;-&lt;/tt&gt;, &lt;tt&gt;=&lt;/tt&gt;, and &lt;tt&gt;~&lt;/tt&gt; characters.  If the body consists of more than two characters, then it may contain a center, provided that there must be at least one body character on each side of the center.  (If there is no center, we may simply say that the center is empty.)
&lt;/p&gt; 
&lt;p&gt; 
A nonempty center consists of some nonzero number of &lt;tt&gt;/&lt;/tt&gt; characters, some nonzero number of &lt;tt&gt;|&lt;/tt&gt; characters, or a single &lt;tt&gt;*&lt;/tt&gt;.
&lt;/p&gt; 
&lt;p&gt; 
A right-pointing head consists of either (a) some number of &lt;tt&gt;|&lt;/tt&gt;, &lt;tt&gt;&amp;lt;&lt;/tt&gt;, and &lt;tt&gt;&amp;gt;&lt;/tt&gt; characters provided that at least one &lt;tt&gt;&amp;gt;&lt;/tt&gt; is present and that any &lt;tt&gt;&amp;lt;&lt;/tt&gt; must be followed (not necessarily immediately) by a &lt;tt&gt;&amp;gt;&lt;/tt&gt;; or (b) some nonzero number of &lt;tt&gt;\&lt;/tt&gt; characters or some nonzero number of &lt;tt&gt;/&lt;/tt&gt; characters, followed by some number (possibly zero) of &lt;tt&gt;|&lt;/tt&gt; characters (this case is used for harpoons); or (c) no characters (this case is used for arrow tails and tacks).  In either case (a) or case (b), there may be interspersed &lt;tt&gt;*&lt;/tt&gt; characters,
but never two &lt;tt&gt;*&lt;/tt&gt; characters in a row, and never a &lt;tt&gt;*&lt;/tt&gt; at the right-hand end.  If the head belongs to case (b), then the body must contain at least two characters.
&lt;/p&gt; 
&lt;p&gt; 
Certain of these are used as Twiki for Unicode arrows.  As a rule, we try to make faithful pictures of the arrows, but by convention we use &lt;tt&gt;=-&lt;/tt&gt; for a triple shaft and &lt;tt&gt;-=-&lt;/tt&gt; for a quadruple shaft; &lt;tt&gt;|&amp;gt;&lt;/tt&gt; indicates an open arrowhead, and &lt;tt&gt;*&lt;/tt&gt; indicates blackness.
&lt;/p&gt; 
&lt;table class=&quot;wiki&quot;&gt; 
&lt;tr&gt;&lt;td&gt;&lt;tt&gt;-&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x2192;&lt;/td&gt;&lt;td&gt; U+2192 RIGHTWARDS ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;-/-&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                        &amp;#x219B;&lt;/td&gt;&lt;td&gt; U+219B RIGHTWARDS ARROW WITH STROKE
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;~&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x219D;&lt;/td&gt;&lt;td&gt; U+219D RIGHTWARDS WAVE ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;-&amp;gt;&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x21A0;&lt;/td&gt;&lt;td&gt; U+21A0 RIGHTWARDS TWO HEADED ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;-&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x21A3;&lt;/td&gt;&lt;td&gt; U+21A3 RIGHTWARDS ARROW WITH TAIL
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;|-&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x21A6;&lt;/td&gt;&lt;td&gt; U+21A6 RIGHTWARDS ARROW FROM BAR
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;=/=&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x21CF;&lt;/td&gt;&lt;td&gt; U+21CF RIGHTWARDS DOUBLE ARROW WITH STROKE
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;=&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x21D2;&lt;/td&gt;&lt;td&gt; U+21D2 RIGHTWARDS DOUBLE ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;=-&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x21DB;&lt;/td&gt;&lt;td&gt; U+21DB RIGHTWARDS TRIPLE ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;~~&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x21DD;&lt;/td&gt;&lt;td&gt; U+21DD RIGHTWARDS SQUIGGLE ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;-&amp;gt;|&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x21E5;&lt;/td&gt;&lt;td&gt; U+21E5 RIGHTWARDS ARROW TO BAR
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;|=|&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x21E8;&lt;/td&gt;&lt;td&gt; U+21E8 RIGHTWARDS WHITE ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;||=|&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x21F0;&lt;/td&gt;&lt;td&gt; U+21F0 RIGHTWARDS WHITE ARROW FROM WALL
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;-|-&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;        &amp;#x21F8;&lt;/td&gt;&lt;td&gt; U+21F8 RIGHTWARDS ARROW WITH VERTICAL STROKE
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;-||-&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x21FB;&lt;/td&gt;&lt;td&gt; U+21FB RIGHTWARDS ARROW WITH DOUBLE VERTICAL STROKE
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;-|&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x21FE;&lt;/td&gt;&lt;td&gt; U+21FE RIGHTWARDS OPEN-HEADED ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;-*-*&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x2794;&lt;/td&gt;&lt;td&gt; U+2794 HEAVY WIDE-HEADED RIGHTWARDS ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;=*-*&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x2799;&lt;/td&gt;&lt;td&gt; U+2799 HEAVY RIGHTWARDS ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;--*&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x279B;&lt;/td&gt;&lt;td&gt; U+279B DRAFTING POINT RIGHTWARDS ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;=*=*&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x279C;&lt;/td&gt;&lt;td&gt; U+279C HEAVY ROUND-TIPPED RIGHTWARDS ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;-|*&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x279D;&lt;/td&gt;&lt;td&gt; U+279D TRIANGLE-HEADED RIGHTWARDS ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;-*-|*&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x279E;&lt;/td&gt;&lt;td&gt; U+279E HEAVY TRIANGLE-HEADED RIGHTWARDS ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;=*=|*&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x27A1;&lt;/td&gt;&lt;td&gt; U+27A1 BLACK RIGHTWARDS ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;|*=*=*&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x27A7;&lt;/td&gt;&lt;td&gt; U+27A7 SQUAT BLACK RIGHTWARDS ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;|=|&amp;gt;*&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x27A9;&lt;/td&gt;&lt;td&gt; U+27A9 RIGHT-SHADED WHITE RIGHTWARDS ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;|*=|&amp;gt;        &lt;/tt&gt;&lt;/td&gt;&lt;td&gt;        &amp;#x27AA;&lt;/td&gt;&lt;td&gt; U+27AA LEFT-SHADED WHITE RIGHTWARDS ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;-&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x27B3;&lt;/td&gt;&lt;td&gt; U+27B3 WHITE-FEATHERED RIGHTWARDS ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;*&amp;gt;-&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x27B5;&lt;/td&gt;&lt;td&gt; U+27B5 BLACK-FEATHERED RIGHTWARDS ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;*&amp;gt;-*&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x27B8;&lt;/td&gt;&lt;td&gt; U+27B8 HEAVY BLACK-FEATHERED RIGHTWARDS ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;*&amp;gt;-|*&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x27BC;&lt;/td&gt;&lt;td&gt; U+27BC WEDGE-TAILED RIGHTWARDS ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;*&amp;gt;*&amp;gt;-|*&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x27BD;&lt;/td&gt;&lt;td&gt; U+27BD HEAVY WEDGE-TAILED RIGHTWARDS ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;--&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x27F6;&lt;/td&gt;&lt;td&gt; U+27F6 LONG RIGHTWARDS ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;==&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x27F9;&lt;/td&gt;&lt;td&gt; U+27F9 LONG RIGHTWARDS DOUBLE ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;|--&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x27FC;&lt;/td&gt;&lt;td&gt; U+27FC LONG RIGHTWARDS ARROW FROM BAR
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;|==&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x27FE;&lt;/td&gt;&lt;td&gt; U+27FE LONG RIGHTWARDS DOUBLE ARROW FROM BAR
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;~~~&amp;gt;        &lt;/tt&gt;&lt;/td&gt;&lt;td&gt;        &amp;#x27FF;&lt;/td&gt;&lt;td&gt; U+27FF LONG RIGHTWARDS SQUIGGLE ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;-|-&amp;gt;&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x2900;&lt;/td&gt;&lt;td&gt; U+2900 RIGHTWARDS TWO-HEADED ARROW WITH VERTICAL STROKE
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;-||-&amp;gt;&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x2901;&lt;/td&gt;&lt;td&gt; U+2901 RIGHTWARDS TWO-HEADED ARROW WITH DOUBLE VERTICAL STROKE
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;=|=&amp;gt;        &lt;/tt&gt;&lt;/td&gt;&lt;td&gt;        &amp;#x2903;&lt;/td&gt;&lt;td&gt; U+2903 RIGHTWARDS DOUBLE ARROW WITH VERTICAL STROKE
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;|-&amp;gt;&amp;gt;        &lt;/tt&gt;&lt;/td&gt;&lt;td&gt;        &amp;#x2905;&lt;/td&gt;&lt;td&gt; U+2905 RIGHTWARDS TWO-HEADED ARROW FROM BAR
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;|=&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x2907;&lt;/td&gt;&lt;td&gt; U+2907 RIGHTWARDS DOUBLE ARROW FROM BAR
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;-|-&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x2914;&lt;/td&gt;&lt;td&gt; U+2914 RIGHTWARDS ARROW WITH TAIL WITH VERTICAL STROKE
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;-||-&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x2915;&lt;/td&gt;&lt;td&gt; U+2915 RIGHTWARDS ARROW WITH TAIL WITH DOUBLE VERTICAL STROKE
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;-&amp;gt;&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x2916;&lt;/td&gt;&lt;td&gt; U+2916 RIGHTWARDS TWO-HEADED ARROW WITH TAIL
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;-|-&amp;gt;&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x2917;&lt;/td&gt;&lt;td&gt; U+2917 RIGHTWARDS TWO-HEADED ARROW WITH TAIL WITH VERTICAL STROKE
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;-||-&amp;gt;&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x2918;&lt;/td&gt;&lt;td&gt; U+2918 RIGHTWARDS TWO-HEADED ARROW WITH TAIL WITH DOUBLE VERTICAL STROKE
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;--&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x291A;&lt;/td&gt;&lt;td&gt; U+291A RIGHTWARDS ARROW-TAIL
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;--&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x291C;&lt;/td&gt;&lt;td&gt; U+291C RIGHTWARDS DOUBLE ARROW-TAIL
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;-&amp;gt;&amp;lt;*&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x291E;&lt;/td&gt;&lt;td&gt; U+291E RIGHTWARDS ARROW TO BLACK DIAMOND
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;|-&amp;gt;&amp;lt;*&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x2920;&lt;/td&gt;&lt;td&gt; U+2920 RIGHTWARDS ARROW FROM BAR TO BLACK DIAMOND
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;~-&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x2933;&lt;/td&gt;&lt;td&gt; U+2933 WAVE ARROW POINTING DIRECTLY RIGHT
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;-=-&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x2B46;&lt;/td&gt;&lt;td&gt; U+2B46 RIGHTWARDS QUADRUPLE ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;          &lt;/td&gt;&lt;td&gt;    
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;&amp;lt;-&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x2190;&lt;/td&gt;&lt;td&gt; U+2190 LEFTWARDS ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;&amp;lt;-/-&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x219A;&lt;/td&gt;&lt;td&gt; U+219A LEFTWARDS ARROW WITH STROKE
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;&amp;lt;~&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x219C;&lt;/td&gt;&lt;td&gt; U+219C LEFTWARDS WAVE ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;&amp;lt;&amp;lt;-&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x219E;&lt;/td&gt;&lt;td&gt; U+219E LEFTWARDS TWO HEADED ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;&amp;lt;-&amp;lt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x21A2;&lt;/td&gt;&lt;td&gt; U+21A2 LEFTWARDS ARROW WITH TAIL
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;&amp;lt;-|        &lt;/tt&gt;&lt;/td&gt;&lt;td&gt;        &amp;#x21A4;&lt;/td&gt;&lt;td&gt; U+21A4 LEFTWARDS ARROW FROM BAR
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;&amp;lt;=/=&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x21CD;&lt;/td&gt;&lt;td&gt; U+21CD LEFTWARDS DOUBLE ARROW WITH STROKE
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;&amp;lt;=&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;        &amp;#x21D0;&lt;/td&gt;&lt;td&gt; U+21D0 LEFTWARDS DOUBLE ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;&amp;lt;-=&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x21DA;&lt;/td&gt;&lt;td&gt; U+21DA LEFTWARDS TRIPLE ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;&amp;lt;~~        &lt;/tt&gt;&lt;/td&gt;&lt;td&gt;        &amp;#x21DC;&lt;/td&gt;&lt;td&gt; U+21DC LEFTWARDS SQUIGGLE ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;|&amp;lt;-&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x21E4;&lt;/td&gt;&lt;td&gt; U+21E4 LEFTWARDS ARROW TO BAR
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;&amp;lt;|=|&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x21E6;&lt;/td&gt;&lt;td&gt; U+21E6 LEFTWARDS WHITE ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;&amp;lt;-|-&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x21F7;&lt;/td&gt;&lt;td&gt; U+21F7 LEFTWARDS ARROW WITH VERTICAL STROKE
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;&amp;lt;-||-&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x21FA;&lt;/td&gt;&lt;td&gt; U+21FA LEFTWARDS ARROW WITH DOUBLE VERTICAL STROKE
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;&amp;lt;|-&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x21FD;&lt;/td&gt;&lt;td&gt; U+21FD LEFTWARDS OPEN-HEADED ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;&amp;lt;--&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x27F5;&lt;/td&gt;&lt;td&gt; U+27F5 LONG LEFTWARDS ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;&amp;lt;==&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x27F8;&lt;/td&gt;&lt;td&gt; U+27F8 LONG LEFTWARDS DOUBLE ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;&amp;lt;--|&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;        &amp;#x27FB;&lt;/td&gt;&lt;td&gt; U+27FB LONG LEFTWARDS ARROW FROM BAR
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;&amp;lt;==|&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x27FD;&lt;/td&gt;&lt;td&gt; U+27FD LONG LEFTWARDS DOUBLE ARROW FROM BAR
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;&amp;lt;=|=&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x2902;&lt;/td&gt;&lt;td&gt; U+2902 LEFTWARDS DOUBLE ARROW WITH VERTICAL STROKE
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;|=&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x2906;&lt;/td&gt;&lt;td&gt; U+2906 LEFTWARDS DOUBLE ARROW FROM BAR
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;--&amp;lt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x2919;&lt;/td&gt;&lt;td&gt; U+2919 LEFTWARDS ARROW-TAIL
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;--&amp;lt;&amp;lt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x291B;&lt;/td&gt;&lt;td&gt; U+291B LEFTWARDS DOUBLE ARROW-TAIL
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;&amp;lt;*&amp;gt;&amp;lt;-&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x291D;&lt;/td&gt;&lt;td&gt; U+291D LEFTWARDS ARROW TO BLACK DIAMOND
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;&amp;lt;*&amp;gt;&amp;lt;-|&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x291F;&lt;/td&gt;&lt;td&gt; U+291F LEFTWARDS ARROW FROM BAR TO BLACK DIAMOND
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;&amp;lt;*|=*=&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x2B05;&lt;/td&gt;&lt;td&gt; U+2B05 LEFTWARDS BLACK ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;&amp;lt;~~~&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                       &amp;#x2B33;&lt;/td&gt;&lt;td&gt; U+2B33 LONG LEFTWARDS SQUIGGLE ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;&amp;lt;&amp;lt;-|-&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x2B34;&lt;/td&gt;&lt;td&gt; U+2B34 LEFTWARDS TWO-HEADED ARROW WITH VERTICAL STROKE
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;&amp;lt;&amp;lt;-||-&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x2B35;&lt;/td&gt;&lt;td&gt; U+2B35 LEFTWARDS TWO-HEADED ARROW WITH DOUBLE VERTICAL STROKE
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;&amp;lt;&amp;lt;-|&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x2B36;&lt;/td&gt;&lt;td&gt; U+2B36 LEFTWARDS TWO-HEADED ARROW FROM BAR
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;&amp;lt;-|-&amp;lt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x2B39;&lt;/td&gt;&lt;td&gt; U+2B39 LEFTWARDS ARROW WITH TAIL WITH VERTICAL STROKE
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;&amp;lt;-||-&amp;lt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x2B3A;&lt;/td&gt;&lt;td&gt; U+2B3A LEFTWARDS ARROW WITH TAIL WITH DOUBLE VERTICAL STROKE
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;&amp;lt;&amp;lt;-&amp;lt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x2B3B;&lt;/td&gt;&lt;td&gt; U+2B3B LEFTWARDS TWO-HEADED ARROW WITH TAIL
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;&amp;lt;&amp;lt;-|-&amp;lt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x2B3C;&lt;/td&gt;&lt;td&gt; U+2B3C LEFTWARDS TWO-HEADED ARROW WITH TAIL WITH VERTICAL STROKE
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;&amp;lt;&amp;lt;-||-&amp;lt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x2B3D;&lt;/td&gt;&lt;td&gt; U+2B3D LEFTWARDS TWO-HEADED ARROW WITH TAIL WITH DOUBLE VERTICAL STROKE
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;&amp;lt;-~&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x2B3F;&lt;/td&gt;&lt;td&gt; U+2B3F WAVE ARROW POINTING DIRECTLY LEFT 
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;&amp;lt;-=-&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x2B45;&lt;/td&gt;&lt;td&gt; U+2B45 LEFTWARDS QUADRUPLE ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;          &lt;/td&gt;&lt;td&gt;    
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;&amp;lt;-&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x2194;&lt;/td&gt;&lt;td&gt; U+2194 LEFT RIGHT ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;&amp;lt;~&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x21AD;&lt;/td&gt;&lt;td&gt; U+21AD LEFT RIGHT WAVE ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;&amp;lt;-/-&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x21AE;&lt;/td&gt;&lt;td&gt; U+21AE LEFT RIGHT ARROW WITH STROKE
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;&amp;lt;=/=&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x21CE;&lt;/td&gt;&lt;td&gt; U+21CE LEFT RIGHT DOUBLE ARROW WITH STROKE
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;&amp;lt;=&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x21D4;&lt;/td&gt;&lt;td&gt; U+21D4 LEFT RIGHT DOUBLE ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;&amp;lt;-|-&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x21F9;&lt;/td&gt;&lt;td&gt; U+21F9 LEFT RIGHT ARROW WITH VERTICAL STROKE
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;&amp;lt;-||-&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x21FC;&lt;/td&gt;&lt;td&gt; U+21FC LEFT RIGHT ARROW WITH DOUBLE VERTICAL STROKE
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;&amp;lt;|-|&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x21FF;&lt;/td&gt;&lt;td&gt; U+21FF LEFT RIGHT OPEN-HEADED ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;&amp;lt;--&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x27F7;&lt;/td&gt;&lt;td&gt; U+27F7 LONG LEFT RIGHT ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;&amp;lt;==&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x27FA;&lt;/td&gt;&lt;td&gt; U+27FA LONG LEFT RIGHT DOUBLE ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;&amp;lt;=|=&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x2904;&lt;/td&gt;&lt;td&gt; U+2904 LEFT RIGHT DOUBLE ARROW WITH VERTICAL STROKE
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;&amp;lt;|=|&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x2B04;&lt;/td&gt;&lt;td&gt; U+2B04 LEFT RIGHT WHITE ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;&amp;lt;*|=*=|*&amp;gt;&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x2B0C;&lt;/td&gt;&lt;td&gt; U+2B0C LEFT RIGHT BLACK ARROW
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;          &lt;/td&gt;&lt;td&gt;    
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;--\&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x21C0;&lt;/td&gt;&lt;td&gt; U+21C0 RIGHTWARDS HARPOON WITH BARB UPWARDS
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;--/&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x21C1;&lt;/td&gt;&lt;td&gt; U+21C1 RIGHTWARDS HARPOON WITH BARB DOWNWARDS
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;--\|&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x2953;&lt;/td&gt;&lt;td&gt; U+2953 RIGHTWARDS HARPOON WITH BARB UP TO BAR
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;--/|&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x2957;&lt;/td&gt;&lt;td&gt; U+2957 RIGHTWARDS HARPOON WITH BARB DOWN TO BAR
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;|--\&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x295B;&lt;/td&gt;&lt;td&gt; U+295B RIGHTWARDS HARPOON WITH BARB UP FROM BAR
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;|--/&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x295F;&lt;/td&gt;&lt;td&gt; U+295F RIGHTWARDS HARPOON WITH BARB DOWN FROM BAR
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;          &lt;/td&gt;&lt;td&gt;    
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;/--&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x21BC;&lt;/td&gt;&lt;td&gt; U+21BC LEFTWARDS HARPOON WITH BARB UPWARDS
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;\--&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x21BD;&lt;/td&gt;&lt;td&gt; U+21BD LEFTWARDS HARPOON WITH BARB DOWNWARDS
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;|/--&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x2952;&lt;/td&gt;&lt;td&gt; U+2952 LEFTWARDS HARPOON WITH BARB UP TO BAR
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;|\--&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x2956;&lt;/td&gt;&lt;td&gt; U+2956 LEFTWARDS HARPOON WITH BARB DOWN TO BAR
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;/--|&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x295A;&lt;/td&gt;&lt;td&gt; U+295A LEFTWARDS HARPOON WITH BARB UP FROM BAR
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;\--|&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x295E;&lt;/td&gt;&lt;td&gt; U+295E LEFTWARDS HARPOON WITH BARB DOWN FROM BAR
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;          &lt;/td&gt;&lt;td&gt;    
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;/==/&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x21CB;&lt;/td&gt;&lt;td&gt; U+21CB LEFTWARDS HARPOON OVER RIGHTWARDS HARPOON
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;\==\&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x21CC;&lt;/td&gt;&lt;td&gt; U+21CC RIGHTWARDS HARPOON OVER LEFTWARDS HARPOON
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;/--/&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x294A;&lt;/td&gt;&lt;td&gt; U+294A LEFT BARB UP RIGHT BARB DOWN HARPOON
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;\--\&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x294B;&lt;/td&gt;&lt;td&gt; U+294B LEFT BARB DOWN RIGHT BARB UP HARPOON
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;/--\&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x294E;&lt;/td&gt;&lt;td&gt; U+294E LEFT BARB UP RIGHT BARB UP HARPOON
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;\--/&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x2950;&lt;/td&gt;&lt;td&gt; U+2950 LEFT BARB DOWN RIGHT BARB DOWN HARPOON
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;          &lt;/td&gt;&lt;td&gt;    
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;|--&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x22A2;&lt;/td&gt;&lt;td&gt; U+22A2 RIGHT TACK
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;|-&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x22A6;&lt;/td&gt;&lt;td&gt; U+22A6 ASSERTION
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;|=&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x22A7;&lt;/td&gt;&lt;td&gt; U+22A7 MODELS
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;|==&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x22A8;&lt;/td&gt;&lt;td&gt; U+22A8 TRUE
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;||--&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x22A9;&lt;/td&gt;&lt;td&gt; U+22A9 FORCES
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;|||-&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x22AA;&lt;/td&gt;&lt;td&gt; U+22AA TRIPLE VERTICAL BAR RIGHT TURNSTILE
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;||==&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x22AB;&lt;/td&gt;&lt;td&gt; U+22AB DOUBLE VERTICAL BAR DOUBLE RIGHT TURNSTILE
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;|-/-&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x22AC;&lt;/td&gt;&lt;td&gt; U+22AC DOES NOT PROVE
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;|=/=&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x22AD;&lt;/td&gt;&lt;td&gt; U+22AD NOT TRUE
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;||-/-&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x22AE;&lt;/td&gt;&lt;td&gt; U+22AE DOES NOT FORCE
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;||=/=&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x22AF;&lt;/td&gt;&lt;td&gt; U+22AF NEGATED DOUBLE VERTICAL BAR DOUBLE RIGHT TURNSTILE
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;|---&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x27DD;&lt;/td&gt;&lt;td&gt; U+27DD LONG RIGHT TACK
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;          &lt;/td&gt;&lt;td&gt;    
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;--|&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x22A3;&lt;/td&gt;&lt;td&gt; U+22A3 LEFT TACK
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;---|&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x27DE;&lt;/td&gt;&lt;td&gt; U+27DE LONG LEFT TACK
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;-|&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x2ADE;&lt;/td&gt;&lt;td&gt; U+2ADE SHORT LEFT TACK
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;--||        &lt;/tt&gt;&lt;/td&gt;&lt;td&gt;        &amp;#x2AE3;&lt;/td&gt;&lt;td&gt; U+2AE3 DOUBLE VERTICAL BAR LEFT TURNSTILE
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;==|&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x2AE4;&lt;/td&gt;&lt;td&gt; U+2AE4 VERTICAL BAR DOUBLE LEFT TURNSTILE
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;==||&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x2AE5;&lt;/td&gt;&lt;td&gt; U+2AE5 DOUBLE VERTICAL BAR DOUBLE LEFT TURNSTILE
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;          &lt;/td&gt;&lt;td&gt;    
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;-||-        &lt;/tt&gt;&lt;/td&gt;&lt;td&gt;               &amp;#x27DB;&lt;/td&gt;&lt;td&gt; U+27DB LEFT AND RIGHT TACK
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;tt&gt;=||=&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;                &amp;#x27DA;&lt;/td&gt;&lt;td&gt; U+27DA LEFT AND RIGHT DOUBLE TURNSTILE
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt; 
&lt;p&gt; 
Note that, under these rules, the ASCII token &lt;tt&gt;=/=&lt;/tt&gt; for &quot;not equals&quot; is considered an &quot;arrow&quot;, not that it really matters.  The other two cases of interest that have empty head and empty tail are &lt;tt&gt;-||-&lt;/tt&gt; for &amp;#x27DB;&lt;/td&gt;&lt;td&gt; U+27DB LEFT AND RIGHT TACK and &lt;tt&gt;=||=&lt;/tt&gt; for U+27DA LEFT AND RIGHT DOUBLE TURNSTILE.
&lt;/p&gt; 
&lt;/div&gt; 
   &lt;/div&gt; 
   
&lt;!--  
  &lt;script type=&quot;text/javascript&quot;&gt; 
   addHeadingLinks(document.getElementById(&quot;searchable&quot;), &quot;Link to this section&quot;);
  &lt;/script&gt; 
--&gt;
</description>
    </item>
    
    <item>
      <title>Introducing jacobian</title>
      <link>http://peteriserins.com/2011/08/14/introducing-jacobian.html</link>
      <pubDate>Sun, 14 Aug 2011 00:00:00 EEST</pubDate>
      <author>peteris.erins@gmail.com (Peteris Erins)</author>
      <guid>http://peteriserins.com/2011/08/14/introducing-jacobian</guid>
      <description>&lt;h2 id='introducing_jacobian'&gt;Introducing jacobian&lt;/h2&gt;
&lt;time&gt;14.08.2011&lt;/time&gt;
&lt;p&gt;We Contract Bridge players have never been blessed with good software. Chess players have it all: protocols, GUIs, engines. Many of them free. In Bridge, we have a collection of all-in-one packages, ranging from expensive to unusable. The only means of communication among them are online bridge servers and a protocol used solely at the World Computer Bridge Championships that requires programs to talk over TCP/IP.&lt;/p&gt;

&lt;p&gt;This is not only a barrier of entry in the computer bridge arena, but also is a missed opportunity in terms of getting more people involved in the game and increasing the overall level of play. Just look at how fast the Free Robot Bridge tournaments fill up at BridgeBase Online and it will be clear that there is significant demand for usable and free bridge robots.&lt;/p&gt;

&lt;p&gt;A little while ago &lt;a href='http://sedols.com'&gt;Edgars Sedols&lt;/a&gt; and I decided to do something about this. What we wanted was not a revolution in the computer bridge industry but the simple ability to set a deal and declare it against two robots. So we created jacobian.&lt;/p&gt;

&lt;p&gt;Jacobian is a simple, incomplete, but working protocol for computer bridge programs. With the host program, you specify a deal, vulnerability, contract and the four players by specifying their executable programs. The host then leads them trough a game of bridge (currently, only the play of the hand is implemented). That&amp;#8217;s it.&lt;/p&gt;

&lt;p&gt;The &amp;#8220;players&amp;#8221; can be anything as long as they adhere to the protocol. A GUI can be a player, serving as an interface to the protocol for a human player. A robot can be a player in which case the program will be a wrapper for the robot implementing the jacobian protocol.&lt;/p&gt;

&lt;p&gt;We wrote everything in Java due to its popularity and cross-platform support. Ironically, the current version is Unix only, but we&amp;#8217;re working on that already. The protocol description and the host program can be located at &lt;a href='https://github.com/Pet3ris/jacobian-host'&gt;jacobian-host&lt;/a&gt;. The GUI can be found at &lt;a href='https://github.com/Sedols/jacobian-GUI'&gt;jacobian-GUI&lt;/a&gt;. A GiB engine wrapper is at &lt;a href='https://github.com/Pet3ris/jacobian-gib-wrapper'&gt;jacobian-gib-wrapper&lt;/a&gt;. You will need your own GiB engine to play though.&lt;/p&gt;

&lt;p&gt;The whole package is really rough around the edges at the moment. To get started with it, if you&amp;#8217;re on a Unix computer, you will need to fetch the three &lt;code&gt;.jar&lt;/code&gt; files first. Put them in the same folder together with your GiB engine. Rename the GiB engine to &lt;code&gt;gib.exe&lt;/code&gt; if it&amp;#8217;s named &lt;code&gt;bridge.exe&lt;/code&gt; (we are using the free version for our experiments). You can test-drive a hand by writing&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ java -jar jacobian-host.jar &amp;#39;java -jar jacobian-gib-wrapper.jar&amp;#39; &amp;#39;java -jar jacobian-gib-wrapper.jar&amp;#39; &amp;#39;java -jar jacobian-gui.jar&amp;#39; &amp;#39;java -jar jacobian-gib-wrapper.jar&amp;#39; 3031333123220300123320212213021202022103101101003113 NONE 3NS&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;We have scratched our itch, we can now play a hand with GiB. But we would be happy to continue working with the community on this if we see some support and potential. You are absolutely welcome to contribute and/or implement the protocol for your own applications and make the Bridge world a little bit more open for everyone.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Starting SICP in Haskell</title>
      <link>http://peteriserins.com/2011/08/12/starting-sicp-in-haskell.html</link>
      <pubDate>Fri, 12 Aug 2011 00:00:00 EEST</pubDate>
      <author>peteris.erins@gmail.com (Peteris Erins)</author>
      <guid>http://peteriserins.com/2011/08/12/starting-sicp-in-haskell</guid>
      <description>&lt;h2 id='starting_sicp_in_haskell'&gt;Starting SICP in Haskell&lt;/h2&gt;
&lt;time&gt;12.08.2011&lt;/time&gt;
&lt;p&gt;Let me introduce the uninformed reader to &lt;a href='http://mitpress.mit.edu/sicp/'&gt;Structure and Interpretation of Computer Programs&lt;/a&gt;. It is a (free) book and a course originally introduced in MIT as an introductory series in Computer Science. Despite the fact that the first edition of the book dates back to 1985 (!) and that it uses Lisp (Scheme) as the main programming language, the book sustains a small but strong fellowship to this day. Why? Antti Sykari describes on &lt;a href='http://stackoverflow.com/questions/1711/what-is-the-single-most-influential-book-every-programmer-should-read'&gt;Stack Overflow&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&amp;#8220;It is a book that will enlighten you. It will evoke in you a passion for writing beautiful programs. Moreover, it will teach you to recognize and appreciate that very beauty. It will leave you with a state of awe and an unquenchable thirst to learn more. Other books may make you a better programmer; this book will make you a programmer.&amp;#8221;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So I&amp;#8217;ve decided to read it and do the exercises. Not expecting to be blown away by the book as I&amp;#8217;ve had some prolonged exposure to algorithms and functional programming before, but why not fill up the holes in my knowledge and compensate for the lack of a proper CS degree?&lt;/p&gt;

&lt;p&gt;The fun thing is that I will be doing it in Haskell. I&amp;#8217;ve picked up more Lisp than would be fair before starting this book and instead decided to do it in a language I would be learning while reading. Haskell is appropriate, being a functional language, but with its static type system, pervasive laziness and purity, it will hopefully provide enough of a challenge. You can follow along at the dedicated &lt;a href='https://github.com/Pet3ris/sicp'&gt;GitHub repository&lt;/a&gt;. Now this is lower priority than work, studies and personal projects, but I expect to put up something every week. I wouldn&amp;#8217;t want to end up owning one of the many unfinished SICP repositories in GitHub.&lt;/p&gt;

&lt;p&gt;P.S. Fun fact about Lisp. A couple of years ago I had the preconception that Lisp was useful primarily for list processing (hence the name) and would be an overly specific language to learn and use. I really only knew C++ and as it later turned out was embarrassingly conservative. Now I&amp;#8217;ve &lt;a href='http://www.go-hero.net/jam/11/multilang'&gt;played around&lt;/a&gt; with a couple of more languages including ironically a fresh dialect of Lisp called &lt;a href='http://clojure.org'&gt;Clojure&lt;/a&gt;. My idea of Lisp has been upraised to the extent that I wonder if that name was appropriate to begin with.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Google+, a New Blogging Platform in Town?</title>
      <link>http://peteriserins.com/2011/07/03/google-plus-a-new-blogging-platform-in-town.html</link>
      <pubDate>Sun, 03 Jul 2011 00:00:00 EEST</pubDate>
      <author>peteris.erins@gmail.com (Peteris Erins)</author>
      <guid>http://peteriserins.com/2011/07/03/google-plus-a-new-blogging-platform-in-town</guid>
      <description>&lt;h2 id='google_a_new_blogging_platform_in_town'&gt;Google+, a New Blogging Platform in Town?&lt;/h2&gt;
&lt;time&gt;03.07.2011&lt;/time&gt;
&lt;p&gt;There have been a couple of interesting posts recently about how &lt;a href='http://plus.google.com'&gt;Google+&lt;/a&gt; (G+) could be a threat to Facebook, Twitter, LinkedIn and Skype among others. I think there is significant inertia in these platforms in terms of their established and reasonably happy userbases, if only because these users themselves were not acquired in a year or two. However, G+ does have long term features going for it, such as Google integration and the ability to adapt to various use cases.&lt;/p&gt;

&lt;p&gt;Apart from the early-adopters, the first real chunks of users might come from niche features done right. An obvious example is videoconferencing. The G+ team has done an amazing job with Hangouts and people (and businesses?) will find this extremely convenient.&lt;/p&gt;

&lt;p&gt;Another case I see for it is blogging. G+ makes it really easy to share your thoughts. There is clearly enough technology in there to satisfy most bloggers&amp;#8217; needs. You also get immediate exposure, integrated comments and best of all, sharing your content is a click of a button away.&lt;/p&gt;

&lt;p&gt;Can we use it today? To a certain extent, yes, and in fact you could consider anyone who is writing longish pieces of writing in G+ to be using it as a blogging platform. We do have to wait a bit more to see how Google will handle the publicity of your posts. Ideally, you would like them to be visible to people who are not using G+ in a nice way. Another issue is lack of styling options. There is a conflict with Google&amp;#8217;s accessibility standards and most likely you will not be able to enforce a particular style to your writing.&lt;/p&gt;

&lt;p&gt;That said, most people using, e.g., &lt;a href='http://posterous.com'&gt;posterous&lt;/a&gt; use the same template, and G+ might well end up eliminating the need to choose a blogging platform.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Free ePub and mobi books for programmers</title>
      <link>http://peteriserins.com/2011/06/24/free-epub-and-mobi-books-for-programmers.html</link>
      <pubDate>Fri, 24 Jun 2011 00:00:00 EEST</pubDate>
      <author>peteris.erins@gmail.com (Peteris Erins)</author>
      <guid>http://peteriserins.com/2011/06/24/free-epub-and-mobi-books-for-programmers</guid>
      <description>&lt;h2 id='free_epub_and_mobi_books_for_programmers'&gt;Free ePub and mobi books for programmers&lt;/h2&gt;
&lt;time&gt;24.06.2011&lt;/time&gt;
&lt;p&gt;If you use an eReader, I&amp;#8217;m sure you know the difference between a PDF and ePub/mobi book. In the case of the Kindle, for the latter, you can change the font and its size, look up words in the dictionary and even have the Kindle read the book out loud to you. For a PDF, you are normally forced to resort to landscape to get a reasonable text size and to not have to use the cumbersome zoom feature.&lt;/p&gt;

&lt;p&gt;There are plenty free eBooks about programming in PDF and/or HTML. The latter can easily be ported to the eReader formats and some people have indeed been doing that. Here I&amp;#8217;ve tried to list the free ePub mobi programming books that I&amp;#8217;ve found on the web (mainly in &lt;a href='http://github.com'&gt;GitHub&lt;/a&gt;). Note that most eReaders do not support both formats, but that usually isn&amp;#8217;t a problem, because you can use software like &lt;a href='http://calibre-ebook.com/'&gt;Calibre&lt;/a&gt; to convert between the two. Credit goes to authors and porters. Happy reading!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href='https://github.com/propella/DesignPrinciplesBehindSmalltalk'&gt;Design Principles Behind Smalltalk&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href='https://github.com/turesheim/Guide_to_Fortran77'&gt;Guide to Fortran77&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href='https://github.com/igstan/learn-you-a-haskell-kindle'&gt;Learn You a Haskell for Great Good!&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href='https://github.com/igstan/learn-you-some-erlang-kindle'&gt;Learn You Some Erlang for Great Good!&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href='https://github.com/visionmedia/masteringnode'&gt;Mastering Node&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href='https://github.com/akosma/PracticalCommonLisp_ePub'&gt;Practical Common Lisp&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href='https://github.s3.amazonaws.com/media/progit.epub'&gt;ProGIT&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href='https://github.com/twcamper/sicp-kindle'&gt;Structure and Interpretation of Computer Programs&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href='https://github.com/zacharyscott/whys-poignant-guide-for-kindle'&gt;_why&amp;#8217;s (poignant) Guide to Ruby&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And if you know of some more, please add them in the comments!&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>How To: Compile every language from Vim</title>
      <link>http://peteriserins.com/2011/06/21/how-to-compile-every-language-from-vim.html</link>
      <pubDate>Tue, 21 Jun 2011 00:00:00 EEST</pubDate>
      <author>peteris.erins@gmail.com (Peteris Erins)</author>
      <guid>http://peteriserins.com/2011/06/21/how-to-compile-every-language-from-vim</guid>
      <description>&lt;h2 id='how_to_compile_every_language_from_vim'&gt;How To: Compile every language from Vim&lt;/h2&gt;
&lt;time&gt;21.06.2011&lt;/time&gt;
&lt;p&gt;&lt;em&gt;Warning&lt;/em&gt;: This post is for users of the Vim text editor. It might not be relevant to you unless you have been using it already or want a compelling argument to start doing so.&lt;/p&gt;

&lt;p&gt;One of the many reasons I like &lt;a href='http://www.vim.org/'&gt;Vim&lt;/a&gt; is how easy it is to set up a workable environment for any programming language. For most popular languages, filetype recognition and syntax highlighting are already in there. What I like to do further, is to set up easy compilation and running from within Vim with the click of a button. This post will show how.&lt;/p&gt;

&lt;p&gt;We are concerned with single source files, useful for when you are starting out in a new language, doing programming competitions or merely experimenting with language features, and want a little more control than you can get with a REPL.&lt;/p&gt;

&lt;h3 id='setting_up_c_compilation'&gt;Setting up C compilation&lt;/h3&gt;

&lt;p&gt;We are going to start with gcc and C compilation (a sufficiently non-trivial example), but we will look at a few others in the end. To compile a file test.c with gcc into test.out, we write&lt;/p&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='bash'&gt;&lt;span class='nv'&gt;$ &lt;/span&gt;gcc -o test.out test.c
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;When editing a file in Vim, you can run a command for the native terminal by preceding it with :!. For example, in Unix, try writing&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;:!ls&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;So, if we know that our filename is test.c, we can now compile and run without resorting to an external terminal window&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;:!gcc -o test.out test.c &amp;amp;&amp;amp; ./test.out&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Note we were assuming that the current directory is the directory of the file we are editing, which is not always the case. This will not be a problem as we generalize.&lt;/p&gt;

&lt;p&gt;Now, this is already quite convenient, but what if we had longer filenames? Turns out, there is a shortcut for getting the filename, it&amp;#8217;s &amp;#8221;%&amp;#8221;. Back to Vim:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;:!gcc -o ?? &amp;quot;%&amp;quot; &amp;amp;&amp;amp; ??&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&amp;#8221;%&amp;#8221; will expand into &amp;#8220;test.c&amp;#8221;, but how can we get test.out? We need Vim&amp;#8217;s filename modifiers. :p gives us the full path and :r removes the extension. So what we need is&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;:!gcc -o &amp;quot;%:p:r.out&amp;quot; &amp;quot;%:p&amp;quot; &amp;amp;&amp;amp; &amp;quot;%:p:r.out&amp;quot;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This would work for every file, all that&amp;#8217;s left now is to put it in .vimrc. I like to map it to F9 like so:&lt;/p&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='vim'&gt;autocmd &lt;span class='nb'&gt;FileType&lt;/span&gt; &lt;span class='k'&gt;c&lt;/span&gt; map &lt;span class='p'&gt;&amp;lt;&lt;/span&gt;F9&lt;span class='p'&gt;&amp;gt;&lt;/span&gt; :&lt;span class='p'&gt;!&lt;/span&gt;gcc &lt;span class='p'&gt;--&lt;/span&gt;&lt;span class='k'&gt;o&lt;/span&gt; &lt;span class='s2'&gt;&amp;quot;%:p:r.out&amp;quot;&lt;/span&gt; &lt;span class='s2'&gt;&amp;quot;%:p&amp;quot;&lt;/span&gt; &amp;amp;&amp;amp; &lt;span class='s2'&gt;&amp;quot;%:p:r.out&amp;quot;&lt;/span&gt;&lt;span class='p'&gt;&amp;lt;&lt;/span&gt;CR&lt;span class='p'&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;And we&amp;#8217;re good to go! Restart Vim and hit F9 while editing a C file to see it happen.&lt;/p&gt;

&lt;h3 id='other_languages'&gt;Other languages&lt;/h3&gt;

&lt;p&gt;Java classes present us with new kinds of issues, but they still fall to Vim&amp;#8217;s file modifiers. We use :h to get the classpath and :t helps us get the class name by stripping the path away.&lt;/p&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='vim'&gt;autocmd &lt;span class='nb'&gt;FileType&lt;/span&gt; java map &lt;span class='p'&gt;&amp;lt;&lt;/span&gt;F9&lt;span class='p'&gt;&amp;gt;&lt;/span&gt; :&lt;span class='p'&gt;!&lt;/span&gt;javac &lt;span class='s2'&gt;&amp;quot;%:p&amp;quot;&lt;/span&gt; &amp;amp;&amp;amp; java &lt;span class='p'&gt;-&lt;/span&gt;&lt;span class='k'&gt;cp&lt;/span&gt; &lt;span class='s2'&gt;&amp;quot;%:p:h&amp;quot;&lt;/span&gt; &lt;span class='s2'&gt;&amp;quot;%:t:r&amp;quot;&lt;/span&gt;&lt;span class='p'&gt;&amp;lt;&lt;/span&gt;CR&lt;span class='p'&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;Interpreted languages are even easier, here&amp;#8217;s ruby:&lt;/p&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='ruby'&gt;&lt;span class='n'&gt;autocmd&lt;/span&gt; &lt;span class='no'&gt;FileType&lt;/span&gt; &lt;span class='n'&gt;ruby&lt;/span&gt; &lt;span class='n'&gt;map&lt;/span&gt; &lt;span class='o'&gt;&amp;lt;&lt;/span&gt;&lt;span class='no'&gt;F9&lt;/span&gt;&lt;span class='o'&gt;&amp;gt;&lt;/span&gt; &lt;span class='p'&gt;:&lt;/span&gt;&lt;span class='o'&gt;!&lt;/span&gt;&lt;span class='n'&gt;ruby&lt;/span&gt; &lt;span class='s2'&gt;&amp;quot;%:p&amp;quot;&lt;/span&gt;&lt;span class='o'&gt;&amp;lt;&lt;/span&gt;&lt;span class='no'&gt;CR&lt;/span&gt;&lt;span class='o'&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;h3 id='further_tips'&gt;Further tips&lt;/h3&gt;

&lt;p&gt;If you want to separate compilation and execution, that&amp;#8217;s easy too. I&amp;#8217;ve also added a &amp;#8220;| more&amp;#8221; to make sure the first error does not leave the screen.&lt;/p&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='vim'&gt;autocmd &lt;span class='nb'&gt;FileType&lt;/span&gt; &lt;span class='k'&gt;c&lt;/span&gt; map &lt;span class='p'&gt;&amp;lt;&lt;/span&gt;F6&lt;span class='p'&gt;&amp;gt;&lt;/span&gt; :&lt;span class='p'&gt;!&lt;/span&gt;gcc &lt;span class='p'&gt;--&lt;/span&gt;&lt;span class='k'&gt;o&lt;/span&gt; &lt;span class='s2'&gt;&amp;quot;%:p:r.out&amp;quot;&lt;/span&gt; &lt;span class='s2'&gt;&amp;quot;%:p&amp;quot;&lt;/span&gt; &lt;span class='p'&gt;&amp;lt;&lt;/span&gt;&lt;span class='nb'&gt;bar&lt;/span&gt;&lt;span class='p'&gt;&amp;gt;&lt;/span&gt; &lt;span class='nb'&gt;more&lt;/span&gt;&lt;span class='p'&gt;&amp;lt;&lt;/span&gt;CR&lt;span class='p'&gt;&amp;gt;&lt;/span&gt;
autocmd &lt;span class='nb'&gt;FileType&lt;/span&gt; &lt;span class='k'&gt;c&lt;/span&gt; map &lt;span class='p'&gt;&amp;lt;&lt;/span&gt;F7&lt;span class='p'&gt;&amp;gt;&lt;/span&gt; :&lt;span class='p'&gt;!&lt;/span&gt;&lt;span class='s2'&gt;&amp;quot;%:p:r.out&amp;quot;&lt;/span&gt;&lt;span class='p'&gt;&amp;lt;&lt;/span&gt;CR&lt;span class='p'&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;h3 id='documentation'&gt;Documentation&lt;/h3&gt;

&lt;p&gt;Although :p, :r, :h and :t should be sufficient for most cases, there is much more you can do with file modifiers. Hit up&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;:!help filename-modifiers&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;To find out more.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>How this site was built</title>
      <link>http://peteriserins.com/2011/06/18/how-this-site-was-built.html</link>
      <pubDate>Sat, 18 Jun 2011 00:00:00 EEST</pubDate>
      <author>peteris.erins@gmail.com (Peteris Erins)</author>
      <guid>http://peteriserins.com/2011/06/18/how-this-site-was-built</guid>
      <description>&lt;h2 id='how_this_site_was_built'&gt;How this site was built&lt;/h2&gt;
&lt;time&gt;18.06.2011&lt;/time&gt;
&lt;p&gt;Let me begin by elaborating on the construction of this website. Instead of spraying a cloud of creepy sounding buzzwords, I&amp;#8217;ll try and start from the requirements and show why these choices were a good fit in my scenario. It might be helpful to look at the &lt;a href='https://www.github.com/Pet3ris/peteriserins.com'&gt;source code&lt;/a&gt; as you&amp;#8217;re reading this. I am not planning to go through the meaning of every file, there are &lt;a href='http://blog.envylabs.com/2009/08/publishing-a-blog-with-github-pages-and-jekyll/'&gt;many&lt;/a&gt; &lt;a href='http://paulstamatiou.com/how-to-wordpress-to-jekyll'&gt;good&lt;/a&gt; &lt;a href='http://mashable.com/2010/09/02/html5-boilerplate-guide/'&gt;tutorials&lt;/a&gt; on all technologies involved, so please check them out if you&amp;#8217;re interested in the details.&lt;/p&gt;

&lt;h3 id='what_does_one_want_in_a_blog'&gt;What does one want in a blog?&lt;/h3&gt;

&lt;p&gt;There are a couple of little things that matter. A good blog environment would&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;allow me to focus on creating content (posts). It would take care of interface and style issues and render my site for viewing on all popular platforms.&lt;/li&gt;

&lt;li&gt;It would support simple but important dynamic tasks, such as listing a certain number of recent posts, extracting dates and titles, allowing users to comment on the website, etc.&lt;/li&gt;

&lt;li&gt;It should be easy to debug.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id='html5_boilerplate'&gt;HTML5 boilerplate&lt;/h3&gt;

&lt;p&gt;This was a natural starting point for a project using HTML and CSS. It has all the standard practices baked in. &lt;a href='http://www.html5boilerplate.com'&gt;HTML5 boilerplate&lt;/a&gt; provides you with&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;an appropriate directory structure;&lt;/li&gt;

&lt;li&gt;basic .html, .css and .js files filled out with cross-platform compatibility boilerplate, resets and libraries;&lt;/li&gt;

&lt;li&gt;build script for minification and other useful automated tasks;&lt;/li&gt;

&lt;li&gt;most importantly, many other things I am not and do not have to be aware of thanks to the boilerplate team.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id='jekyll'&gt;Jekyll&lt;/h3&gt;

&lt;p&gt;Quite a few people already have advertised &lt;a href='https://github.com/mojombo/jekyll/'&gt;Jekyll&lt;/a&gt; to a more than adequate extent. It is essentially a preprocessor that has built-in support for blog posts. I feed in content written in plain-text (more precisely, markdown), some layout files serving as templates for, e.g., posts, and it spits out a blog in HTML. Yes, no databases, server-side scripting or admin panels. Best part: you get a working idea of what&amp;#8217;s going on without having to dive into the source code.&lt;/p&gt;

&lt;h3 id='putting_it_all_together'&gt;Putting it all together&lt;/h3&gt;

&lt;p&gt;To combine the two, I wanted something that spits out a blog that would have all the best practices, minified code and whatnot.&lt;/p&gt;

&lt;p&gt;To the credit of these technologies, joining them is easy if you are familiar with both. I run Jekyll first to generate the html for posts and the main page, putting the end-product in the _sites folder. Then, the build script is run on the assembled website. It is cleaned up for publishing and is ready for deployment at _sites/publish.&lt;/p&gt;

&lt;p&gt;The only non-trivial part was making the build script aware of all the posts so that it can work on their HTML. The solution is to have the build config (called project.properties) as a Jekyll template file and write the following line:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;file.pages =
{% for post in site.posts  %}
  {{ post.url | replace_first: &amp;#39;/&amp;#39;, &amp;#39;&amp;#39;  }},
{% endfor %}index.html, 404.html,&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;It merely loops over all the posts and inserts their URLs into the build script, comma-separated.&lt;/p&gt;

&lt;h3 id='the_result'&gt;The result&lt;/h3&gt;

&lt;p&gt;Writing blog posts becomes as easy and rewarding as drinking &lt;a href='http://www.liquidmarkup.org/'&gt;liquid&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Hello World!</title>
      <link>http://peteriserins.com/2011/06/16/hello-world.html</link>
      <pubDate>Thu, 16 Jun 2011 00:00:00 EEST</pubDate>
      <author>peteris.erins@gmail.com (Peteris Erins)</author>
      <guid>http://peteriserins.com/2011/06/16/hello-world</guid>
      <description>&lt;h2 id='hello_world'&gt;Hello World!&lt;/h2&gt;
&lt;time&gt;16.06.2011&lt;/time&gt;
&lt;p&gt;After two days of hard work, apparently there was something worth publishing, so here we are.&lt;/p&gt;

&lt;p&gt;I have wanted to have a blog for a long time. After lots of reading and playing around with Wordpress and posterous to no satisfaction, I eventually stumbled upon Jekyll and was instantly sold. For a small personal blog, it offers a good mix of flexibility and simplicity. It is lightweight, easy to pick up and secure, features that are scarce nowadays. If you haven&amp;#8217;t, by all means try it out, it is the one thing that made this blog a reality.&lt;/p&gt;

&lt;p&gt;As far as the direction of this blog, I have no clue at the moment. Expect a healthy dose of math and code as well as some ad hoc material once in a while. We&amp;#8217;ll see.&lt;/p&gt;

&lt;p&gt;As I&amp;#8217;m writing this, I realize that there is nothing apart from the &amp;#8220;up&amp;#8221; link to signify the end of a post. I should probably think of something more meaningful.&lt;/p&gt;</description>
    </item>
    

  </channel> 
</rss>
