<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Recumbant Blogger</title>
	<atom:link href="http://www.recumbant-code.com/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.recumbant-code.com/blog</link>
	<description>Me Blogging About CodeStuff</description>
	<lastBuildDate>Sun, 25 Oct 2009 20:25:58 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Lisp</title>
		<link>http://www.recumbant-code.com/blog/?p=44</link>
		<comments>http://www.recumbant-code.com/blog/?p=44#comments</comments>
		<pubDate>Sun, 25 Oct 2009 20:25:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.recumbant-code.com/blog/?p=44</guid>
		<description><![CDATA[Everybody has heard of Lisp. Perhaps they&#8217;ve ignored it, but at least they&#8217;ve heard of it. It remains a unique language just for having persisted so long without going mainstream; and for being the only language I&#8217;ve heard of which has dialects &#8212; ala Scheme or Common Lisp or Clojure, which are all languages in [...]]]></description>
			<content:encoded><![CDATA[<p>Everybody has heard of Lisp. Perhaps they&#8217;ve ignored it, but at least they&#8217;ve heard of it. It remains a unique language just for having persisted so long without going mainstream; and for being the only language I&#8217;ve heard of which has dialects &#8212; ala <a href="http://www.plt-scheme.org/">Scheme</a> or <a href="http://sbcl.sourceforge.net/">Common Lisp</a> or <a href="http://clojure.org">Clojure</a>, which are all languages in their own right, but which all also share a common lispy syntax.</p>
<p>Lisp introduced garbage collection and first class functions, and literal data types (the proverbial &#8220;list&#8221; in Lisp) fifty years ago &#8212; long before these features started showing up in mainstream languages like Java or Python. It&#8217;s the original: the real mccoy. It had it all way before anybody else did. It&#8217;s forgotten more than mainstream languages ever learned.</p>
<p>Unfortunately, despite being oh so excellent, poor adoption by the mainstream has negatively effected the language. Common Lisp and Scheme lack libraries compared to other languages; there is no CPAN equivalent. As a efficiency minded programmer, you&#8217;d do better assembling Lego blocks in Java than writing it all from scratch in Scheme.</p>
<p>But what makes Lisp the 100 year language&#8211;the undying, unkillable, everlasting language&#8211;is that whenever a new paradigm comes along, somebody writes a new lisp (or an extension of an old lisp) to absorb that new paradigm as a first class feature of the language. As an example, Common Lisp was adapted to include Object Oriented programming, with CLOS (Common Lisp Object System.) Now the latest thing is concurrency, and lisp has an answer!</p>
<p><a href="http://clojure.org">Clojure</a> is a Lisp with strong concurrency semantics. It can handle scaling an application to many cores, and it interoperates seamlessly with the gazillions of Java libraries out there. You can have Lisp, and your Lego blocks too!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.recumbant-code.com/blog/?feed=rss2&amp;p=44</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Git</title>
		<link>http://www.recumbant-code.com/blog/?p=39</link>
		<comments>http://www.recumbant-code.com/blog/?p=39#comments</comments>
		<pubDate>Sat, 17 Oct 2009 21:05:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.recumbant-code.com/blog/?p=39</guid>
		<description><![CDATA[Since my workplace has standardized on Git for their version control, I&#8217;ve had to answer a lot of basic questions about Git. Since I&#8217;m totally tired of doing that, I&#8217;m writing this post and doing a screencast (available later), that sums up what I know about Git, and what I think you all should know [...]]]></description>
			<content:encoded><![CDATA[<p>Since my workplace has standardized on Git for their version control, I&#8217;ve had to answer a lot of basic questions about Git. Since I&#8217;m totally tired of doing that, I&#8217;m writing this post and doing a screencast (available later), that sums up what I know about Git, and what I think you all should know about Git.</p>
<ol>
<li>&#8220;git init&#8221; initializes a repository in your current directory. That&#8217;s the first command you should execute when you&#8217;re putting a project into version control.</li>
<li>&#8220;git add&#8221; adds files into the repository. By default nothing in your working directory is added into your git repository unless you call &#8220;git add&#8221; on it. That way you don&#8217;t waste time versioning your .pyc files <img src='http://www.recumbant-code.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </li>
<li>&#8220;git commit&#8221; saves whatever changes you&#8217;ve made since the last commit, into your repository. It&#8217;s just like making a save point or a check point. Each commit is uniquely identified, and you can always get back to it if you fall off the rails.</li>
</ol>
<p>The typical workflow for starting a project is:</p>
<p>cd project; git init; git add *; git commit -am &#8220;first commit&#8221;</p>
<p>At the end of which, you have a working git repository with all your files and an initial commit.</p>
<p>Now that&#8217;s only half of it; the local half. Now we talk about the remote portion of git: the part that deals with other people&#8217;s repositories, or repositories stored elsewhere.</p>
<ol>
<li>&#8220;git clone &lt;url&gt;&#8221; is the first step in getting at another person&#8217;s repository, where the &#8216;url&#8217; parameter is the path to that other person&#8217;s repository. A common example would be &#8220;git clone git://github.com/somedude/his-project.git&#8221;. Cloning a repo will give you a complete copy of the repo and all its history.</li>
<li>&#8220;git pull &lt;remote&gt; &lt;branch&gt;&#8221; fetches a remote repository and merges it into your local. The &#8216;remote&#8217; parameter could be a url like in the clone command, or it could be a name like &#8216;origin&#8217;. If you&#8217;ve cloned a repo off of github, you&#8217;ll probably be pulling from &#8216;origin&#8217;. Parameter &#8216;branch&#8217; defaults to &#8216;master&#8217;, which is the branch most people will be working on. As for the basic concept of a branch, that should be familiar to people with previous version control experience. Just know that git can have many branches at a time, and they&#8217;re easy to create and easy to merge back into the trunk.</li>
<li>&#8220;git push &lt;remote&gt; &lt;branch&gt;&#8221; sends the commits from your local repo to the remote.</li>
</ol>
<p>For collaborating, a typical workflow is:</p>
<p>git clone &lt;some-repo&gt;; [[make some changes]]; git commit -am &#8220;made some changes&#8221;; git push;</p>
<p>If your push fails, you might do a pull, then push.</p>
<p>Common Issues:</p>
<ol>
<li>&#8220;git checkout &lt;commit&gt; &lt;file-path&gt;&#8221; will restore a file (pointed to by &#8216;file-path&#8217;) from &#8216;commit&#8217; into the current working directory. If you accidentally deleted a file a few commits ago, and you want to have it back, you might do &#8220;git checkout master~2 my-dir/my-file.txt&#8221; to get it back. The &#8216;master~2&#8242; incantation is a special way to refer to a commit: it says go back 2 commits and get me whatever was on the master branch.</li>
<li>&#8220;git status&#8221; is one of the most useful commands (perhaps it should be at the top of this post) because it prints out the status of your working directory. Untracked files (files not yet under version control), modified files, new files and deleted files will all show up under this command. If you can&#8217;t remember what you&#8217;ve been futzing around with, type &#8220;git status&#8221; and find out real quick.</li>
<li>&#8220;git log&#8221; prints you a list of your commits, in case you can&#8217;t remember what you&#8217;ve been doing. It&#8217;s essential when you need to checkout an older commit: type &#8216;git log&#8217;, find the commit you&#8217;re looking for, and then copy the SHA1 identifier (big alphanumeric thing at the top.)</li>
<li>&#8220;git diff &lt;commit&gt; &lt;file?&gt;&#8221; will give you a diff of your HEAD versus &#8216;commit&#8217; for either your entire working directory, or just &#8216;file&#8217;. Very useful if you&#8217;ve made some changes and can&#8217;t figure out what they were ;</li>
</ol>
<p>For now that&#8217;s all I can think of. Next post I should have the screencasts and maybe some additions to this post.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.recumbant-code.com/blog/?feed=rss2&amp;p=39</wfw:commentRss>
		<slash:comments>632</slash:comments>
		</item>
		<item>
		<title>Autoinstaller</title>
		<link>http://www.recumbant-code.com/blog/?p=9</link>
		<comments>http://www.recumbant-code.com/blog/?p=9#comments</comments>
		<pubDate>Fri, 02 Oct 2009 05:21:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.recumbant-code.com/blog/?p=9</guid>
		<description><![CDATA[A few months ago I started writing a build system in Ruby. Actually, I began it in Perl; but it didn&#8217;t take long for me to switch. Perl is a monster. Forgive me for saying so, but it is. I thought I&#8217;d play a bit at learning it&#8217;s demonic syntax and insane object system, but [...]]]></description>
			<content:encoded><![CDATA[<p>A few months ago I started writing a build system in Ruby. Actually, I began it in Perl; but it didn&#8217;t take long for me to switch. Perl is a monster. Forgive me for saying so, but it is. I thought I&#8217;d play a bit at learning it&#8217;s demonic syntax and insane object system, but I failed. Ruby&#8217;s much nicer.<br />
In any case, one of the larger issues with the build system was defining the package declaration format. At first I used hashes, then classes, and now (in v2) I&#8217;ve settled on a custom dsl. </p>
<p><img class="alignnone size-full wp-image-8" title="Some Code" src="http://www.recumbant-code.com/blog/wp-content/uploads/2009/10/Screen-shot-2009-10-01-at-11.19.31-PM.png" alt="Some Code" width="489" height="183" /></p>
<p>I also have a GUI for viewing documentation and invoking commands.  </p>
<p><img src="http://www.recumbant-code.com/blog/wp-content/uploads/2009/10/Screen-shot-2009-10-01-at-11.34.53-PM.png" alt="Primordial GUI for Package Manager" title="Primordial GUI for Package Manager" width="600" height="385" class="alignnone size-full wp-image-15" /></p>
<p>Obviously it is half-baked. If you&#8217;ll notice, the title on the main window is &#8220;qttest.rb&#8221;, which is not final. The GUI is written with Qt, using the RubyQt4 bindings. I chose Qt because I have some experience with it; though that doesn&#8217;t stop me from getting hung up debugging segfaults. Honestly&#8230; all you have to do is pass in the wrong kind of object, or inherit from the wrong class and BAM! code explodes, interpreter crashes, program exits, done. </p>
<p>Despite the dangers of invoking third party C++ GUIs, Qt is the most mature cross platform GUI library outside the JVM, I&#8217;ve ever used. That doesn&#8217;t mean it is the last word, cause I haven&#8217;t tried all the GUI framworks, but there&#8217;s no doubt Qt is top tier. It even has a nice graphical editor.</p>
<p>The only gripe I have is that its wrappers (PyQt &#038; RubyQt) have trouble producing idiomatic code; thus code ends up being more verbose than it should otherwise be. This problem could probably be solved with a higher level of abstraction. HotCocoa comes to mind. But it&#8217;s not that big of a gripe. All things considered, it&#8217;s awesome that there are these bindings in the first place. I should count my blessing that I&#8217;ve never had to dive in to the Ruby FFI. (or does it even have one?!) </p>
<p>Back to my Autoinstaller; it&#8217;s not yet ready for release to the public (in fact, it&#8217;s not entirely ready to be used pervasively in my own company) but I like the potential of the DSL for specifying packages, and (if I have the time) it&#8217;d be awesome to get it to run on OSX and Windows. Right now it is heavily dependent on the Debian package management system to install most of its dependencies &#8212; what it handles for itself are things not in a Debian repository, or source code repositories that need to be pulled directly and then built. But I could certainly substitute in macports or fink or gentoo or portage&#8230; </p>
]]></content:encoded>
			<wfw:commentRss>http://www.recumbant-code.com/blog/?feed=rss2&amp;p=9</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
