<?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:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;DEEASXk9fyp7ImA9WhJTFkw.&quot;"><id>tag:blogger.com,1999:blog-3473010329895921552</id><updated>2012-06-25T04:30:48.767-05:00</updated><category term="vim osx" /><category term="go" /><category term="c" /><title>Signed Int</title><subtitle type="html">Musings about software development and hacker culture.</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://blog.signedint.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://blog.signedint.com/" /><author><name>Eric</name><uri>http://www.blogger.com/profile/11681619250743608663</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/SignedInt" /><feedburner:info uri="signedint" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;DkEAR3Yyfyp7ImA9Wx5WF0k.&quot;"><id>tag:blogger.com,1999:blog-3473010329895921552.post-4491394970814030000</id><published>2010-09-29T02:17:00.000-05:00</published><updated>2010-09-29T02:17:26.897-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-09-29T02:17:26.897-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="go" /><title>Set's for Go</title><content type="html">One of my favorite things about Python lately has been the built-in Set class. &amp;nbsp;Due to my recent fling with Go I decided to implement it there too. &amp;nbsp;If you're interested, check out my &lt;a href="http://github.com/eclark/container"&gt;github repository&lt;/a&gt;, or just install it directly with the following command.&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;goinstall github.com/eclark/container/set&lt;/code&gt;&lt;img src="http://feeds.feedburner.com/~r/SignedInt/~4/VbYxF5Feeaw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.signedint.com/feeds/4491394970814030000/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.signedint.com/2010/09/sets-for-go.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3473010329895921552/posts/default/4491394970814030000?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3473010329895921552/posts/default/4491394970814030000?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SignedInt/~3/VbYxF5Feeaw/sets-for-go.html" title="Set's for Go" /><author><name>Eric</name><uri>http://www.blogger.com/profile/11681619250743608663</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.signedint.com/2010/09/sets-for-go.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEEGRHcyeip7ImA9Wx5QFkg.&quot;"><id>tag:blogger.com,1999:blog-3473010329895921552.post-8764306945335354079</id><published>2010-09-04T21:10:00.000-05:00</published><updated>2010-09-04T21:10:25.992-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-09-04T21:10:25.992-05:00</app:edited><title>Zygote: My skeleton files for a new project with GNU autotools</title><content type="html">For the third time this week I've started a new minor project in C and had to remind myself how to use the &lt;a href="http://en.wikipedia.org/wiki/GNU_build_system"&gt;GNU build system&lt;/a&gt;. &amp;nbsp;This time I thought it worth a few minutes to build a set of skeleton files for everyone to use. &amp;nbsp;The result is called Zygote and its available on github.&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;a href="http://github.com/eclark/zygote"&gt;github.com/eclark/zygote&lt;/a&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;This small package contains all the things you need to write a C program with a Python script to run tests where it is available. &amp;nbsp;All of the files are public domain so you can use this as the basis for any project. &amp;nbsp;Let me know if you find it useful.&lt;/div&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/SignedInt/~4/vCdhRgihmOU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.signedint.com/feeds/8764306945335354079/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.signedint.com/2010/09/zygote-my-skeleton-files-for-new.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3473010329895921552/posts/default/8764306945335354079?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3473010329895921552/posts/default/8764306945335354079?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SignedInt/~3/vCdhRgihmOU/zygote-my-skeleton-files-for-new.html" title="Zygote: My skeleton files for a new project with GNU autotools" /><author><name>Eric</name><uri>http://www.blogger.com/profile/11681619250743608663</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.signedint.com/2010/09/zygote-my-skeleton-files-for-new.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEIARn46eyp7ImA9Wx5QFUk.&quot;"><id>tag:blogger.com,1999:blog-3473010329895921552.post-9218192566697763270</id><published>2010-09-03T14:35:00.000-05:00</published><updated>2010-09-03T14:35:47.013-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-09-03T14:35:47.013-05:00</app:edited><title>Autoconf not finding pkg-config on OSX? An Easy fix</title><content type="html">I've run into this a couple times lately so it's worth noting for others. &amp;nbsp;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;aclocal&lt;/span&gt; only searches &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;/usr/share/aclocal&lt;/span&gt; by default. &amp;nbsp;This poses a problem because our pkg-config is in &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;/usr/local&lt;/span&gt;, but there's an easy fix. &amp;nbsp;Create a new file named &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;/usr/share/aclocal/dirlist&lt;/span&gt; with a line for each additional directory you want to search. &amp;nbsp;In our case just &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;/usr/local/share/aclocal&lt;/span&gt;. &amp;nbsp;Presto, now autoconf can find pkg-config's macros.&lt;img src="http://feeds.feedburner.com/~r/SignedInt/~4/Lreuq_ZcFk8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.signedint.com/feeds/9218192566697763270/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.signedint.com/2010/09/autoconf-not-finding-pkg-config-on-osx.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3473010329895921552/posts/default/9218192566697763270?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3473010329895921552/posts/default/9218192566697763270?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SignedInt/~3/Lreuq_ZcFk8/autoconf-not-finding-pkg-config-on-osx.html" title="Autoconf not finding pkg-config on OSX? An Easy fix" /><author><name>Eric</name><uri>http://www.blogger.com/profile/11681619250743608663</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><feedburner:origLink>http://blog.signedint.com/2010/09/autoconf-not-finding-pkg-config-on-osx.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkACQnc7fyp7ImA9Wx5QFEU.&quot;"><id>tag:blogger.com,1999:blog-3473010329895921552.post-4476770763471997777</id><published>2010-09-02T23:39:00.000-05:00</published><updated>2010-09-02T23:39:23.907-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-09-02T23:39:23.907-05:00</app:edited><title>Act Like You're Teaching to Avoid Sloppy Work</title><content type="html">This &lt;a href="http://lifehacker.com/5628699/act-like-youre-teaching-to-avoid-sloppy-work"&gt;short tip on Lifehacker&lt;/a&gt; is worth a read. Seems pretty obvious, but it never really occurred to me before. I'm not a fan of pair programming, but I can see how this aspect can be a significant quality improvement.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;Do stuff more efficiently and make fewer mistakes by acting like you are teaching someone how to do it. For example, if I'm painting my living room, I imagine I'm showing someone else the right and wrong things to: preventing drips and bubbles, how to prepare the room, etc. This helps me to be less sloppy when I'm doing things because when you teach someone how to do something you want them to do it right (and you tend to move a bit slower). If you pretend, in your mind, that you're teaching someone then you, too, will be more likely to do it right and make fewer mistakes.&lt;/blockquote&gt;&lt;img src="http://feeds.feedburner.com/~r/SignedInt/~4/Moc00Byhx10" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.signedint.com/feeds/4476770763471997777/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.signedint.com/2010/09/act-like-youre-teaching-to-avoid-sloppy.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3473010329895921552/posts/default/4476770763471997777?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3473010329895921552/posts/default/4476770763471997777?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SignedInt/~3/Moc00Byhx10/act-like-youre-teaching-to-avoid-sloppy.html" title="Act Like You're Teaching to Avoid Sloppy Work" /><author><name>Eric</name><uri>http://www.blogger.com/profile/11681619250743608663</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.signedint.com/2010/09/act-like-youre-teaching-to-avoid-sloppy.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0UFQns6cSp7ImA9Wx5QFEo.&quot;"><id>tag:blogger.com,1999:blog-3473010329895921552.post-4294414252382270078</id><published>2010-09-01T20:20:00.002-05:00</published><updated>2010-09-02T19:53:33.519-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-09-02T19:53:33.519-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="c" /><title>Back to Basics: Bubble Sorted Date Strings in C.</title><content type="html">Earlier today I ran across a job posting that had a small test, I wasn't interested in the job but I liked the test. &amp;nbsp;One problem was to write a date sorter without using a date parsing library. &amp;nbsp;The format to be parsed is: "Sep 1 2010". &amp;nbsp;Normally I would write something like this in a few lines of Python or Perl, but I decided to tackle the problem in C, just to make it harder. &amp;nbsp;Since regular expressions were allowed, I thought it was okay to use &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;sscanf&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
One of the first thing's you'll see is that I took a page from Perl's &lt;a href="http://en.wikipedia.org/wiki/Spaceship_operator"&gt;spaceship operator&lt;/a&gt;, and defined a macro that will compare two numbers and return -1 if it is less, 0 if equal and 1 if greater. &amp;nbsp;Normally for a sorting algorithm you would only need to know if it is less or not, but I wanted to chain comparisons together by falling down to the next comparison when two values are equal.&lt;br /&gt;
&lt;br /&gt;
Another trick I used is a bit of a hack to find the the number corresponding to the month. &amp;nbsp;You'll notice that I cast&amp;nbsp;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;char *a&lt;/span&gt;&amp;nbsp;to &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;uint32_t&lt;/span&gt;&amp;nbsp;as a way to avoid &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;strcmp&lt;/span&gt;. &amp;nbsp;I'm not sure if I would do this in production code, but its a fun trick.&lt;br /&gt;
&lt;br /&gt;
Full code is below.&lt;br /&gt;
&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;script src="http://gist.github.com/561654.js"&gt;
 
&lt;/script&gt;&lt;img src="http://feeds.feedburner.com/~r/SignedInt/~4/EK1rfSkGwVA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.signedint.com/feeds/4294414252382270078/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.signedint.com/2010/09/back-to-basics-bubble-sorted-date.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3473010329895921552/posts/default/4294414252382270078?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3473010329895921552/posts/default/4294414252382270078?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SignedInt/~3/EK1rfSkGwVA/back-to-basics-bubble-sorted-date.html" title="Back to Basics: Bubble Sorted Date Strings in C." /><author><name>Eric</name><uri>http://www.blogger.com/profile/11681619250743608663</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.signedint.com/2010/09/back-to-basics-bubble-sorted-date.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C08DRHYycSp7ImA9Wx5QE0w.&quot;"><id>tag:blogger.com,1999:blog-3473010329895921552.post-6699474448084160412</id><published>2010-08-31T22:31:00.000-05:00</published><updated>2010-08-31T22:31:15.899-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-08-31T22:31:15.899-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="vim osx" /><title>Coding without distraction: MacVim fullscreen</title><content type="html">&lt;p&gt;After wrestling with iTerm slowness with certain fonts, I made the switch from vim in iTerm to MacVim for coding.  Here's a small .gvimrc that cleans up fullscreen mode.  Try it out and let me know what you think.&lt;/p&gt;&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
if has("gui_macvim")&lt;br /&gt;
&amp;nbsp;&amp;nbsp;" looks a little better fullscreen&lt;br /&gt;
&amp;nbsp;&amp;nbsp;set bg=dark&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;" remove scroll bars and tool bar&lt;br /&gt;
&amp;nbsp;&amp;nbsp;set guioptions-=r&lt;br /&gt;
&amp;nbsp;&amp;nbsp;set guioptions-=L&lt;br /&gt;
&amp;nbsp;&amp;nbsp;set guioptions-=T&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;" nice font if you have it&lt;br /&gt;
&amp;nbsp;&amp;nbsp;set guifont=Anonymous\ Pro:h14&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;" expand width in fullscreen &lt;br /&gt;
&amp;nbsp;&amp;nbsp;set fuoptions=maxvert,maxhorz&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;" hide tab bar&lt;br /&gt;
&amp;nbsp;&amp;nbsp;set showtabline=0&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;" change key bindings&lt;br /&gt;
&amp;nbsp;&amp;nbsp;macm Window.Select\ Previous\ Tab  key=&amp;lt;D-Left&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;macm Window.Select\ Next\ Tab      key=&amp;lt;D-Right&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;macm Window.Toggle\ Full\ Screen\ Mode    key=&amp;lt;D-Return&amp;gt;&lt;br /&gt;
endif&lt;br /&gt;
&lt;/code&gt;&lt;img src="http://feeds.feedburner.com/~r/SignedInt/~4/K0_PGVRJDe4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.signedint.com/feeds/6699474448084160412/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.signedint.com/2010/08/coding-without-distraction-macvim.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3473010329895921552/posts/default/6699474448084160412?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3473010329895921552/posts/default/6699474448084160412?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SignedInt/~3/K0_PGVRJDe4/coding-without-distraction-macvim.html" title="Coding without distraction: MacVim fullscreen" /><author><name>Eric</name><uri>http://www.blogger.com/profile/11681619250743608663</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.signedint.com/2010/08/coding-without-distraction-macvim.html</feedburner:origLink></entry></feed>
