<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">
 
 <title>appamatto</title>
 
 <link href="http://blog.appamatto.com/" />
 <updated>2012-04-19T17:27:43-05:00</updated>
 <id>http://blog.appamatto.com</id>
 <author>
   <name>Matthew Willis</name>
   <email>appamatto@gmail.com</email>
 </author>

 
 <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/appamatto" /><feedburner:info uri="appamatto" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry>
   <title>Copyfree is not the new copyleft.</title>
   <link href="http://feedproxy.google.com/~r/appamatto/~3/4Qxwx0hybqg/copyfree-is-not-the-new-copyleft.html" />
   <updated>2011-12-04T00:00:00-06:00</updated>
   <id>http://blog.appamatto.com/2011/12/04/copyfree-is-not-the-new-copyleft</id>
   <content type="html">&lt;h1&gt;Copyfree is not the new copyleft.&lt;/h1&gt;
&lt;p class="meta"&gt;04 Dec 2011&lt;/p&gt;
&lt;p&gt;&lt;em&gt;This article was inspired by Zed Shaw&amp;#8217;s essay, &lt;a href="http://zedshaw.com/essays/is_bsd_the_new_gpl.html"&gt;Is &lt;span class="caps"&gt;BSD&lt;/span&gt; the New &lt;span class="caps"&gt;GPL&lt;/span&gt;?&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Simple debate, short article. My premises, the requisite conclusions. &lt;a href="https://en.wikipedia.org/wiki/The_Rocky_Horror_Picture_Show"&gt;Androids fighting Brad and Janet.&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;For the Uninitiated: Copy{right,left,free}&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;#8220;&lt;strong&gt;Copyright&lt;/strong&gt; is a legal concept, enacted by most governments, giving the creator of an original work exclusive rights to it, usually for a limited time.&amp;#8221; &lt;em&gt;&lt;a href="https://en.wikipedia.org/wiki/Copyright"&gt;Copyright on Wikipedia&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;#8220;&lt;strong&gt;Copyleft&lt;/strong&gt; is a play on the word copyright to describe the practice of using copyright law to offer the right to distribute copies and modified versions of a work and requiring that the same rights be preserved in modified versions of the work.&amp;#8221; &lt;em&gt;&lt;a href="https://en.wikipedia.org/wiki/Copyleft"&gt;Copyleft on Wikipedia&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;#8220;&lt;strong&gt;Copyfree&lt;/strong&gt; is a term used to identify the freedom to copy, use, modify, and distribute what you possess.&amp;#8221; &lt;em&gt;&lt;a href="http://copyfree.org"&gt;What is Copyfree?&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Is it just a matter of taste?&lt;/h2&gt;
&lt;p&gt;Some like the &lt;span class="caps"&gt;BSD&lt;/span&gt; license. Others, the &lt;span class="caps"&gt;GPL&lt;/span&gt;. Some &lt;a href="https://en.wikipedia.org/wiki/Butter_Battle_Book"&gt;butter&lt;/a&gt; on the top, others on the bottom. (&lt;a href="http://en.wikipedia.org/wiki/Butter#Health_and_nutrition"&gt;Don&amp;#8217;t eat butter.&lt;/a&gt;) Unfortunately &amp;#8220;taste&amp;#8221; in licensing can come back to bite you&amp;#8212;the analogy breaks down as choosing Coke over Pepsi won&amp;#8217;t run you afoul of a &lt;a href="http://gpl-violations.org/"&gt;violations site&lt;/a&gt;. (And don&amp;#8217;t drink &lt;a href="http://en.wikipedia.org/wiki/Sugar#Human_health_effects"&gt;sugar drinks&lt;/a&gt; either.)&lt;/p&gt;
&lt;p&gt;Our decisions have direct legal consequences for those around us. We decide if the nasty emails get sent and how many IP lawyers the world needs.&lt;/p&gt;
&lt;h2&gt;Information Morality&lt;/h2&gt;
&lt;p&gt;I think the right and wrong of information and speech is pretty dry and should be less controversial than my parenthetical dietary recommendations:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;&lt;strong&gt;Think&lt;/strong&gt; whatever you want.&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;Express&lt;/strong&gt; whatever you can think.&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;Stay silent&lt;/strong&gt; when you want to.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Copyright makes sure that we can&amp;#8217;t cleanly protect these freedoms. Thanks.&lt;/p&gt;
&lt;h2&gt;Can we be friends?&lt;/h2&gt;
&lt;p&gt;Zed says that we&amp;#8217;re on the same side. Well, I think that copyleft disagrees with my &lt;em&gt;(3)&lt;/em&gt; above, since &lt;strong&gt;it requires expression where one might have preferred silence.&lt;/strong&gt; I can&amp;#8217;t distribute my program without also distributing its sources if it contains a copyleft component.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogstrapping.com/?page=2011.338.15.57.06"&gt;Not so friendly!&lt;/a&gt; Copyleft also contains all the asymmetry of copyright: licensees will have their right to silence violated but the original creator can go ahead and create proprietary derivatives. &lt;strong&gt;It&amp;#8217;s much harder to create such a monopoly with copyfree software because licensees are equally empowered to derive their own products.&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;Simulating a World without Copyright&lt;/h2&gt;
&lt;p&gt;The smoking gun: &lt;strong&gt;copyleft cannot exist without copyright&lt;/strong&gt;. Without copyright there is no way to force the developers of modifications to reveal their source code.&lt;/p&gt;
&lt;p&gt;Meanwhile, copyfree licenses attempt to simulate a world without copyright. When copyright meets its maker we&amp;#8217;ll effectively be living in a land of copyfree software.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I choose to waive copyright to my public works&lt;/strong&gt;, effectively putting them into the &amp;#8220;public domain&amp;#8221;. This isn&amp;#8217;t the most favored copyfree strategy because some countries don&amp;#8217;t allow you to waive your copyright. I think that the success of &lt;a href="http://sqlite.org/copyright.html"&gt;sqlite&lt;/a&gt; has shown that these fears about the public domain aren&amp;#8217;t warranted.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/appamatto/~4/4Qxwx0hybqg" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://tom.preston-werner.com/2011/12/04/copyfree-is-not-the-new-copyleft.html</feedburner:origLink></entry>
 
 <entry>
   <title>RTFM the T-Shirt</title>
   <link href="http://feedproxy.google.com/~r/appamatto/~3/jl2zgUpAbjI/rtfm-the-tshirt.html" />
   <updated>2011-11-29T00:00:00-06:00</updated>
   <id>http://blog.appamatto.com/2011/11/29/rtfm-the-tshirt</id>
   <content type="html">&lt;h1&gt;&lt;span class="caps"&gt;RTFM&lt;/span&gt; the T-Shirt&lt;/h1&gt;
&lt;p class="meta"&gt;29 Nov 2011&lt;/p&gt;
&lt;p&gt;Hokey goal number five on my programmer bucket list: see someone I don&amp;#8217;t know walking around wearing a nerdy t-shirt I designed. What higher accomplishment is there?&lt;/p&gt;
&lt;p&gt;And so after a bit of inkscaping and some wishful thinking, I bring you the green-on-black, early-bird edition of &lt;a href="http://www.spreadshirt.com/rtfm-deus-ex-machina-green-on-black-t-C3376A8577425/"&gt;&lt;span class="caps"&gt;RTFM&lt;/span&gt;: Deus Ex Machina&lt;/a&gt; the T-Shirt! You loved (to hate) &lt;a href="http://blog.appamatto.com/2011/11/22/how-to-rtfm.html"&gt;the article&lt;/a&gt;, now you can wear it around.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&amp;#8220;That is so full of win. I&amp;#8217;ve been needing some new shirts, too.&amp;#8221; -&lt;a href="http://www.chipsquips.com/"&gt;Chip Camden&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;br /&gt;
&lt;a href="http://www.spreadshirt.com/rtfm-deus-ex-machina-green-on-black-t-C3376A8577425/"&gt;&lt;br /&gt;
&lt;img src="http://image.spreadshirt.com/image-server/image/product/19340647/view/1/type/png/width/378/height/378" alt="Men's Heavyweight T-Shirt - T-Shirts RTFM: &amp;quot;Deus Ex Machina&amp;quot; Green on Black T-Shirt" title="Men's Heavyweight T-Shirt - T-Shirts RTFM: &amp;quot;Deus Ex Machina&amp;quot; Green on Black T-Shirt" style="width:378px; border:0px;"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;/td&gt;&lt;td&gt;
&lt;p&gt;&lt;a href="http://www.spreadshirt.com/rtfm-deus-ex-machina-green-on-black-t-C3376A8577425/"&gt;&lt;br /&gt;
&lt;img src="http://image.spreadshirt.com/image-server/image/product/19340647/view/2/type/png/width/378/height/378" alt="Men's Heavyweight T-Shirt - T-Shirts RTFM: &amp;quot;Deus Ex Machina&amp;quot; Green on Black T-Shirt" title="Men's Heavyweight T-Shirt - T-Shirts RTFM: &amp;quot;Deus Ex Machina&amp;quot; Green on Black T-Shirt" style="width:378px; border:0px;"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/p&gt;
&lt;p&gt;And for the those that prefer a smattering of appropriate command-line punnery, &lt;a href="http://www.spreadshirt.com/rtfm-man-k-up-green-on-black-t-shirt-C3376A8577636/"&gt;&lt;span class="caps"&gt;RTFM&lt;/span&gt;: man -k Up&lt;/a&gt; is also available.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&amp;#8220;I think I need to get one of those.&amp;#8221; -&lt;a href="http://blogstrapping.com/"&gt;Chad Perrin&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;br /&gt;
&lt;a href="http://www.spreadshirt.com/rtfm-man-k-up-green-on-black-t-shirt-C3376A8577636"&gt;&lt;br /&gt;
&lt;img src="http://image.spreadshirt.com/image-server/image/product/19340817/view/1/type/png/width/378/height/378" alt="Men's Heavyweight T-Shirt - T-Shirts RTFM: &amp;quot;man -k Up&amp;quot; Green on Black T-Shirt" title="Men's Heavyweight T-Shirt - T-Shirts RTFM: &amp;quot;Deus Ex Machina&amp;quot; Green on Black T-Shirt" style="width:378px; border:0px;"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;/td&gt;&lt;td&gt;
&lt;p&gt;&lt;a href="http://www.spreadshirt.com/rtfm-man-k-up-green-on-black-t-shirt-C3376A8577636"&gt;&lt;br /&gt;
&lt;img src="http://image.spreadshirt.com/image-server/image/product/19340817/view/2/type/png/width/378/height/378" alt="Men's Heavyweight T-Shirt - T-Shirts RTFM: &amp;quot;man -k Up&amp;quot; Green on Black T-Shirt" title="Men's Heavyweight T-Shirt - T-Shirts RTFM: &amp;quot;Deus Ex Machina&amp;quot; Green on Black T-Shirt" style="width:378px; border:0px;"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/p&gt;
&lt;p&gt;I thank you for your out-of-season yet forward-thinking support.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/appamatto/~4/jl2zgUpAbjI" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://tom.preston-werner.com/2011/11/29/rtfm-the-tshirt.html</feedburner:origLink></entry>
 
 <entry>
   <title>How to RTFM - Tips for a life of discovery</title>
   <link href="http://feedproxy.google.com/~r/appamatto/~3/tCGswFN9EWA/how-to-rtfm.html" />
   <updated>2011-11-22T00:00:00-06:00</updated>
   <id>http://blog.appamatto.com/2011/11/22/how-to-rtfm</id>
   <content type="html">&lt;h1&gt;How to &lt;span class="caps"&gt;RTFM&lt;/span&gt; &amp;#8211; Tips for a life of discovery&lt;/h1&gt;
&lt;p class="meta"&gt;22 Nov 2011 &amp;#8211; Houston&lt;/p&gt;
&lt;p&gt;My friends and I have often discussed the topic of programmer education. The idea is that programming is somehow unapproachable or favors a certain rare learning style. I can sympathize with this perspective. At the same time I feel that learning how to approach the unapproachable is somehow at the core of becoming a good programmer. The name of this all-important technique is &lt;a href="https://en.wikipedia.org/wiki/RTFM"&gt;&lt;span class="caps"&gt;RTFM&lt;/span&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Update: &lt;span class="caps"&gt;RTFM&lt;/span&gt; &lt;a href="http://blog.appamatto.com/2011/11/29/rtfm-the-tshirt.html"&gt;T-Shirts now available&lt;/a&gt;. Spread the euphoria!&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Everyone was a newb at some point. Chances are some jerk in &lt;code&gt;#latest-fp-language&lt;/code&gt; told you to &lt;span class="caps"&gt;RTFM&lt;/span&gt; and that rubbed you the wrong way.&lt;/p&gt;
&lt;p&gt;Well, I&amp;#8217;m here to tell you that &lt;span class="caps"&gt;RTFM&lt;/span&gt; is like &amp;#8220;Amen!&amp;#8221; (or &amp;#8220;So say we all!&amp;#8221; for you &lt;span class="caps"&gt;BSG&lt;/span&gt; fans) for programmers. These kind souls are just trying to remind you of your commitment to reading &lt;span class="caps"&gt;TFM&lt;/span&gt; which should be no less than religious.&lt;/p&gt;
&lt;h2&gt;Why &lt;span class="caps"&gt;RTFM&lt;/span&gt;?&lt;/h2&gt;
&lt;p&gt;First, I really recommend reading Vivek Haldar&amp;#8217;s &lt;a href="http://blog.vivekhaldar.com/post/8950163616/gui-vs-cli-operation-vs-expression"&gt;article&lt;/a&gt; comparing GUIs and CLIs. This is soul food for the aspiring reader of &lt;span class="caps"&gt;TFM&lt;/span&gt;. &lt;strong&gt;Internalization is critical for programming.&lt;/strong&gt; It&amp;#8217;s the only thing that separates effective from ineffective programmers. Your goal is to get as much of your daily required knowledge into your brain-&lt;span class="caps"&gt;RAM&lt;/span&gt; as possible. You do not want the syntax of your language of choice or the switches to &lt;code&gt;grep&lt;/code&gt; to reside on disk or on the network somewhere.&lt;/p&gt;
&lt;p&gt;&lt;span class="caps"&gt;RTFM&lt;/span&gt; forces you to think about what you&amp;#8217;re trying to do, and understand the tool you&amp;#8217;re using to do it. It also allows you to discover other tasks that the tool might help you with. It is my experience that this extra processing forces one to actually, uh, &lt;em&gt;think&lt;/em&gt;?&lt;/p&gt;
&lt;h2&gt;The Rules of &lt;span class="caps"&gt;RTFM&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;These are simple rules that should guide your daily &lt;span class="caps"&gt;RTFM&lt;/span&gt; practice. The goal here is not to simply get things done&amp;#8212;we want to get things done &lt;em&gt;and&lt;/em&gt; have learned (internalized) new techniques that will help us next time.&lt;/p&gt;
&lt;h2&gt;Rule #1: Do not Google (or DuckDuckGo) first&lt;/h2&gt;
&lt;p&gt;Google is a great tool. Google will match you with the guy who had your problem and show you exactly how he solved it. However, &lt;a href="http://www.lmgtfy.com/?q=giyf"&gt;Google Is Not Your Friend&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The reason is this: once you&amp;#8217;ve found the one-liner that will get you going and you&amp;#8217;ve copy-pasted it into &lt;a href="https://en.wikipedia.org/wiki/Z_shell"&gt;zsh&lt;/a&gt;, you&amp;#8217;re done. That&amp;#8217;s it. Google has deprived you of your quality time with &lt;span class="caps"&gt;TFM&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Using a pure &lt;span class="caps"&gt;RTFM&lt;/span&gt; strategy, the voyage of self-discovery is something like:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;&lt;strong&gt;Think&lt;/strong&gt; about what you&amp;#8217;re trying to do or why you&amp;#8217;re getting that error.&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;Remember&lt;/strong&gt; a similar tool or experience you&amp;#8217;ve used before.&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;Read&lt;/strong&gt; &lt;span class="caps"&gt;TFM&lt;/span&gt; for that tool or related tools.&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;Discover&lt;/strong&gt; new techniques or ways to apply your tools.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Google is the &lt;a href="https://en.wikipedia.org/wiki/Deus_ex_machina"&gt;deus ex machina&lt;/a&gt; of the programming world, punching plot holes in your epic rise to &lt;span class="caps"&gt;RTFM&lt;/span&gt; stardom. Google has weakened your ability to solve problems by jumping straight to discovery. If you absolutely have to Google, then make sure you also take time to understand the results of your Googling and how you might have found the answers through a more organic process.&lt;/p&gt;
&lt;h2&gt;Rule #2: Do not settle for an example&lt;/h2&gt;
&lt;p&gt;When people say that humans learn best by example, they really mean that humans avoid learning when they have examples. This is because examples enable one to employ tools without really understanding how they work.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Try to avoid learning things in opaque chunks.&lt;/strong&gt; If you&amp;#8217;re working with the shell, make sure you&amp;#8217;re learning what the &lt;code&gt;a&lt;/code&gt;, &lt;code&gt;u&lt;/code&gt;, and &lt;code&gt;x&lt;/code&gt; switches do in &lt;code&gt;ps aux&lt;/code&gt;. This means &lt;code&gt;man ps&lt;/code&gt; followed by tinkering with the various options until you develop a satisfying freedom of movement along the various axes of the command.&lt;/p&gt;
&lt;p&gt;If you&amp;#8217;re working from a big section of code, try changing it and seeing what happens. Make sure you can account for each part of the code. Seeing a chunk of code as an indivisible unit is buying a season pass to that same old article on Stack Overflow for the magical incantations.&lt;/p&gt;
&lt;h2&gt;Rule #3: Sometimes the code is &lt;span class="caps"&gt;TFM&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Not all projects have great documentation. That being said, most of the projects I use have docs in the decent to awesome range. For example, I would consider &lt;a href="http://developer.android.com"&gt;Android docs&lt;/a&gt; better than decent. I&amp;#8217;d consider the &lt;a href="http://www.freebsd.org/doc/en/books/handbook/"&gt;FreeBSD handbook&lt;/a&gt; to be awesome. Most of the programming languages I use are very well-documented.&lt;/p&gt;
&lt;p&gt;Hopefully the documentation for your project captures all behavior that is intended to be public. That still leaves a couple of reasons why the code itself may be the best or only documentation for a piece of software.&lt;/p&gt;
&lt;p&gt;It&amp;#8217;s my guess that writers read much more than they write and filmmakers watch many more hours of film than they produce. A programmer has to read code well especially now that most programming work consists of correctly using libraries and services written by others. &lt;strong&gt;In any case, code reading is sometimes the only way to figure out what received software does and how efficiently it does it.&lt;/strong&gt; Don&amp;#8217;t have the code? Try replacing that component with &lt;a href="http://copyfree.org/software"&gt;one of these&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Rule #4: Question your questions&lt;/h2&gt;
&lt;p&gt;It&amp;#8217;s a little-known fact that &lt;span class="caps"&gt;TFM&lt;/span&gt; will answer any question you pose it&amp;#8212;as long as it&amp;#8217;s the one that &lt;span class="caps"&gt;TFM&lt;/span&gt; was written to answer. It&amp;#8217;s like one of those movie kung fu teachers. You&amp;#8217;re going to be chasing the chicken and waxing on and off until you &lt;code&gt;man -k&lt;/code&gt; up and start asking the right questions.&lt;/p&gt;
&lt;p&gt;This generally requires knowledge that won&amp;#8217;t be cited, linked, or in any way communicated by &lt;span class="caps"&gt;TFM&lt;/span&gt;. You&amp;#8217;re not going to understand a language spec without understanding what the heap and the stack are. Insensitivity to the strangeness of one&amp;#8217;s questions is the most difficult obstacle to overcome in RTFMing, and it&amp;#8217;s also the most likely to be solved by contact with another human being.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Still, resist the urge to talk with someone.&lt;/strong&gt; If you need some release, open a shell and &lt;code&gt;echo&lt;/code&gt; into &lt;code&gt;/dev/null&lt;/code&gt; or tell your barber. After much confusion, much RTFMing and some good luck your brain will turn inside-out and you&amp;#8217;ll have an epiphany.&lt;/p&gt;
&lt;p&gt;Maybe.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/appamatto/~4/tCGswFN9EWA" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://tom.preston-werner.com/2011/11/22/how-to-rtfm.html</feedburner:origLink></entry>
 
 <entry>
   <title>Multiple Fossil Repositories Setup</title>
   <link href="http://feedproxy.google.com/~r/appamatto/~3/bca8CP0DiRg/multiple-fossil-repositories-setup.html" />
   <updated>2011-11-13T00:00:00-06:00</updated>
   <id>http://blog.appamatto.com/2011/11/13/multiple-fossil-repositories-setup</id>
   <content type="html">&lt;h1&gt;Multiple Fossil Repositories Setup&lt;/h1&gt;
&lt;p class="meta"&gt;13 Nov 2011 &amp;#8211; Houston&lt;/p&gt;
&lt;p&gt;Mananging a few fossil repositories can be daunting compared to the ease of using github for projects.&lt;/p&gt;
&lt;h2&gt;So why fossil?&lt;/h2&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;License&lt;/strong&gt; &amp;#8211; I&amp;#8217;m a &lt;a href="http://copyfree.org"&gt;copyfree&lt;/a&gt; guy, so I appreciate the &lt;a href="http://fossil-scm.org/index.html/doc/trunk/COPYRIGHT-BSD2.txt"&gt;fossil license&lt;/a&gt;, which is a 2-clause &lt;span class="caps"&gt;BSD&lt;/span&gt; license. I never know when I&amp;#8217;ll need to fix a bug or add a feature to any software I&amp;#8217;m using, and I&amp;#8217;m highly unlikely to contribute back to a legally-encumbered piece of software.&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;Organizational Tools&lt;/strong&gt; &amp;#8211; wiki, issue tracker, events, commentary&amp;#8212;all sort of metadata inhabit a typical fossil repository. They&amp;#8217;re just as decentralized as your source code. When you move your repository your meta-project organizational data move along with you. In contrast, a git clone from your github isn&amp;#8217;t going to clone your issues along with it.&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;Data store&lt;/strong&gt; &amp;#8211; Fossil uses a SQLite database rather than a pile-of-files for storing repository data. Fossil is thus able to take advantage of nice database properties like atomic transactions.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;The setup on FreeBSD: nginx and inetd&lt;/h2&gt;
&lt;p&gt;I host my fossil repositories on the same machine as my blog. nginx serves my blog as static files courtesy of &lt;a href="https://github.com/mojombo/jekyll/"&gt;jekyll&lt;/a&gt; and it passes fossil requests to the inetd-managed fossil server on port 8080. I&amp;#8217;m using FreeBSD, so adjust your setup accordingly.&lt;/p&gt;
&lt;p&gt;The relevant section in &lt;code&gt;/usr/local/etc/nginx/nginx.conf&lt;/code&gt;:&lt;/p&gt;
&lt;pre class="terminal"&gt;&lt;code&gt;server {
    server_name fossil.appamatto.com;
    location / {
        proxy_pass http://127.0.0.1:8080/;
        proxy_redirect off;
        proxy_set_header   Host             $host;
        proxy_set_header   X-Real-IP        $remote_addr;
        proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
    }
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To have inetd manage fossil we need to first add it as a service in &lt;code&gt;/etc/services&lt;/code&gt;:&lt;/p&gt;
&lt;pre class="terminal"&gt;&lt;code&gt;fossil 8080/tcp # Fossil repo hosting&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and then let inetd know what to do with fossil requests in &lt;code&gt;/etc/inetd.conf&lt;/code&gt; (on one line):&lt;/p&gt;
&lt;pre class="terminal"&gt;&lt;code&gt;fossil stream tcp nowait.1000 root /home/appamatto/bin/fossil
/home/appamatto/bin/fossil http /home/appamatto/fossil&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Lastly, make sure to start your servers and enable their start on boot. In &lt;code&gt;/etc/rc.conf&lt;/code&gt;:&lt;/p&gt;
&lt;pre class="terminal"&gt;&lt;code&gt;nginx_enable="YES"
inetd_enable="YES"&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and then in the shell:&lt;/p&gt;
&lt;pre class="terminal"&gt;&lt;code&gt;# /usr/local/etc/rc.d/nginx start
# /etc/rc.d/inetd start&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;The repositories directory&lt;/h2&gt;
&lt;p&gt;The above inetd setup assumes that my fossil repositories are stored in &lt;code&gt;~/fossil&lt;/code&gt;. The magic happens in the &lt;code&gt;fossil http&lt;/code&gt; command, which is built to serve a directory of fossil files using a url scheme that chops off the &lt;code&gt;.fossil&lt;/code&gt; extension. For example, the repository for this blog is stored in &lt;code&gt;~/fossil/appamatto.fossil&lt;/code&gt; and the url for the repository is &lt;a href="http://fossil.appamatto.com/appamatto"&gt;/appamatto&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Be fruitful and fossilize&lt;/h2&gt;
&lt;p&gt;Now that I&amp;#8217;ve setup my repository server to manage multiple repositories I am no longer afraid to create quick one-off repositories for my smaller projects. I&amp;#8217;d love to hear about further fossil management&amp;#8212; &lt;del&gt;managing user credentials across multiple repositories&lt;/del&gt; &lt;em&gt;(see update)&lt;/em&gt; or their web templates/styles.&lt;/p&gt;
&lt;h2&gt;Update &amp;#8211; single sign-on&lt;/h2&gt;
&lt;p&gt;It turns out that single sign-on between fossil repositories is easy to setup. Fossil creator drh gives &lt;a href="http://www.mail-archive.com/fossil-users@lists.fossil-scm.org/msg04856.html"&gt;a bit of explanation&lt;/a&gt; on the mailing list.&lt;/p&gt;
&lt;p&gt;Navigate to Login-Group in the Admin area of your fossil repository. Create a new group (I called mine &amp;#8220;group&amp;#8221;) and then enter the path to the other repository you&amp;#8217;re joining. If you&amp;#8217;re using the instructions in this post then the path should be something like &lt;code&gt;/foo.fossil&lt;/code&gt;. Thanks for the tip, &lt;a href="http://www.reddit.com/r/programming/comments/mbj5n/multiple_fossil_repositories_setup/"&gt;dchestnykh&lt;/a&gt;!&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/appamatto/~4/bca8CP0DiRg" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://tom.preston-werner.com/2011/11/13/multiple-fossil-repositories-setup.html</feedburner:origLink></entry>
 
 <entry>
   <title>Career Update</title>
   <link href="http://feedproxy.google.com/~r/appamatto/~3/Zuf89Ug7x0A/career-update.html" />
   <updated>2011-04-21T00:00:00-05:00</updated>
   <id>http://blog.appamatto.com/2011/04/21/career-update</id>
   <content type="html">&lt;h1&gt;Career Update&lt;/h1&gt;
&lt;p class="meta"&gt;21 Apr 2011 &amp;#8211; Houston&lt;/p&gt;
&lt;p&gt;This week has been crazy. I&amp;#8217;ve simultaneously experienced an explosion in the number of projects vying for my attention and a low point in focus and perseverance. Coincidence? I think not!&lt;/p&gt;
&lt;p&gt;I&amp;#8217;m transitioning over to a new Android development job at &lt;a href="http://www.toktumi.com/"&gt;Toktumi&lt;/a&gt;, makers of the mobile app &lt;a href="http://www.line2.com/"&gt;Line2&lt;/a&gt;. Excitement. Let&amp;#8217;s hope I can get everything squared away as I transition out of my current job.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;ve promised my &lt;a href="https://market.android.com/details?id=com.appamatto.dhp"&gt;Dhammapada&lt;/a&gt; users that I would give them a style editor, or at least a better color scheme. Given that they have been so generous in their ratings of my work-in-progress, I feel I need to give something back, and quick! Dhammapada has 214 users now, which is pretty nice for its niche. &lt;em&gt;(update 2011-11-13: 659 active installs!)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Due to my work volume, I&amp;#8217;ve been inactive in &lt;a href="http://stackoverflow.com/tags/android/topusers"&gt;[android]&lt;/a&gt;. Hopefully this will pick up again, as it&amp;#8217;s a great source of learning for me.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/appamatto/maru2"&gt;Maru&lt;/a&gt; saw some action a couple weeks ago due to some really interesting conversations I&amp;#8217;ve been having. It was nice to have some new thoughts about its design, especially the first class dictionary/stack hybrid idea. Thanks Evan!&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/appamatto/~4/Zuf89Ug7x0A" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://tom.preston-werner.com/2011/04/21/career-update.html</feedburner:origLink></entry>
 
 <entry>
   <title>Bitcoin, the Decentralized Cryptocurrency</title>
   <link href="http://feedproxy.google.com/~r/appamatto/~3/ozSGgsQ7vEg/bitcoin-the-decentralized-cryptocurrency.html" />
   <updated>2010-12-11T00:00:00-06:00</updated>
   <id>http://blog.appamatto.com/2010/12/11/bitcoin-the-decentralized-cryptocurrency</id>
   <content type="html">&lt;h1&gt;Bitcoin, the Decentralized Cryptocurrency&lt;/h1&gt;
&lt;p class="meta"&gt;11 Dec 2010 &amp;#8211; Houston&lt;/p&gt;
&lt;p&gt;A lot of my current work is inspired by &lt;a href="http://bitcoin.org/"&gt;bitcoin&lt;/a&gt;, the decentralized crypto-currency.  If you haven&amp;#8217;t heard of it, or don&amp;#8217;t fully understand how and why it works, then I can assure you that spending some time with it will be a much better use of your time than reading this article.&lt;/p&gt;
&lt;p&gt;Bitcoin has an interesting proof-of-work structure called a block chain, which is like a collaboratively defined linked list where adding an element involves solving a problem whose difficulty scales such that it is solved by one person (machine?) globally every ten minutes.  Bitcoin&amp;#8217;s data is packaged along with this solved problem, and thus the control of the bitcoin block chain rotates randomly among its users, each in proportion to his computing resources.  This ensures that there is a central data store for bitcoin without a central authority as long as a majority of the compute power is in benign hands.&lt;/p&gt;
&lt;p&gt;The system is a marvel!  After letting it sink in for a couple weeks I began to consider other systems based on block chains.  And many a protocol appeared in my mind like nails ready for some bitcoin-esque hammering.&lt;/p&gt;
&lt;p&gt;I started what became a &lt;a href="https://bitcointalk.org/index.php?topic=1790"&gt;mega-thread&lt;/a&gt; on the bitcoin forums about generalizing bitcoin to other applications.  I called the generalizion BitX, since it would support many different protocols like bitcoin and a hypothetical BitDNS.  The conversation tended toward a discussion of BitDNS specifically, prompted by recent government action, and BitX discussion resumed &lt;a href="https://bitcointalk.org/index.php?topic=2163"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/appamatto/~4/ozSGgsQ7vEg" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://tom.preston-werner.com/2010/12/11/bitcoin-the-decentralized-cryptocurrency.html</feedburner:origLink></entry>
 
 <entry>
   <title>Simple Implementation of CubeHash</title>
   <link href="http://feedproxy.google.com/~r/appamatto/~3/61r6LAl37v8/simple-implementation-of-cubehash.html" />
   <updated>2010-12-07T00:00:00-06:00</updated>
   <id>http://blog.appamatto.com/2010/12/07/simple-implementation-of-cubehash</id>
   <content type="html">&lt;h1&gt;Simple Implementation of CubeHash&lt;/h1&gt;
&lt;p class="meta"&gt;07 Dec 2010 &amp;#8211; Houston&lt;/p&gt;
&lt;p&gt;I was curious about hash functions and decided to implement one of the candidates for &lt;a href="http://en.wikipedia.org/wiki/NIST_hash_function_competition"&gt;&lt;span class="caps"&gt;SHA&lt;/span&gt;-3&lt;/a&gt;, &lt;a href="http://cubehash.cr.yp.to/"&gt;CubeHash&lt;/a&gt;.  The algorithm itself is very simple and features three tuning parameters that allow various speed/security trade-offs.&lt;/p&gt;
&lt;p&gt;The implementation is nothing special, as it is derived nearly verbatim from the description of CubeHash.  One thing I learned while doing this is that programs whose goal is to obfuscate their input are hard to debug, especially when a reference implementation is not available.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;m dedicating this code to the public domain; it might come in handy for someone who wants to check their own implementation.  Mine shouldn&amp;#8217;t win any awards for speed, although gcc is able to vectorize some of the loops.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://fossil.appamatto.com/cubehash"&gt;Check out the fossil repository.&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/appamatto/~4/61r6LAl37v8" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://tom.preston-werner.com/2010/12/07/simple-implementation-of-cubehash.html</feedburner:origLink></entry>
 
 
</feed>

