<?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"
	>

<channel>
	<title>Ryan's Tech Blog</title>
	<atom:link href="http://ryepup.unwashedmeme.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://ryepup.unwashedmeme.com/blog</link>
	<description>mostly tech, mostly rants</description>
	<pubDate>Wed, 16 Apr 2008 23:17:17 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>lisp geocoding, more library possibilities</title>
		<link>http://ryepup.unwashedmeme.com/blog/2008/04/16/lisp-geocoding-more-library-possibilities/</link>
		<comments>http://ryepup.unwashedmeme.com/blog/2008/04/16/lisp-geocoding-more-library-possibilities/#comments</comments>
		<pubDate>Wed, 16 Apr 2008 23:17:17 +0000</pubDate>
		<dc:creator>ryan</dc:creator>
		
		<category><![CDATA[code snippet]]></category>

		<category><![CDATA[lisp]]></category>

		<guid isPermaLink="false">http://ryepup.unwashedmeme.com/blog/2008/04/16/lisp-geocoding-more-library-possibilities/</guid>
		<description><![CDATA[I&#8217;m finally working on a project that has a public component (besides a login screen), and the lisp has been flowing.   I&#8217;ve been able to put in probably around 10 hours a week on this thing, and I can&#8217;t wait until its more presentable to show off.  As part of this, we&#8217;re [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m finally working on a project that has a public component (besides a login screen), and the lisp has been flowing.   I&#8217;ve been able to put in probably around 10 hours a week on this thing, and I can&#8217;t wait until its more presentable to show off.  As part of this, we&#8217;re building up our work lisp codebase, and I&#8217;ve been keeping my eye out for opportunities to open source different library components, and trying to avoid creating a big ball of mud.</p>
<p>The first real candidate so far  was adw-charting, but I think I found the next potentials: adw-yahoo and adw-google.  They will be libraries for interfacing with various Yahoo! and Google services.  So far I&#8217;ve only got code for one service apiece, but there&#8217;s plenty of growth potential.</p>
<p>Here&#8217;s a sample:</p>
<pre>(defun geocode-fight ()
  (let ((adw-yahoo:*api-key* "YAHOO APPID")
	(adw-google:*api-key* "GOOGLE API-KEY")
	(address "5308 SW 75th ter, Gainesville FL, 32608"))
    (list
     (adw-yahoo:latlong address :cache-p nil)
     (adw-google:latlong address :cache-p nil))))

(geocode-fight)
=&gt; (("address" 29.604265 -82.42349 "5308 SW 75th Ter")
(8 29.604923 -82.42338 "5308 SW 75th Terrace, Gainesville, FL 32608, USA"))</pre>
<p>Yahoo and Google give back different some different data, but so far Yahoo&#8217;s coordinates seem more accurate.  One thing I noticed was that Google&#8217;s geocoding service gives a different lat/long than what maps.google.com displays, which I thought was a little sneaky.  I&#8217;ve also got some code to help construct google map widgets, using the homegrown html template system and parenscript, but I think much of that will end up getting stripped out, as it depends on the in-house libraries that are likely completely useless to anyone but us.</p>
<p>Still lots to do before either of those libs would be ready for a cl-net request, but it&#8217;s on the plate.   After building so much on top of so many great free libraries, the need to contribute something back is very strong.</p>
]]></content:encoded>
			<wfw:commentRss>http://ryepup.unwashedmeme.com/blog/2008/04/16/lisp-geocoding-more-library-possibilities/feed/</wfw:commentRss>
		</item>
		<item>
		<title>adw-charting to get a lot prettier</title>
		<link>http://ryepup.unwashedmeme.com/blog/2008/04/05/adw-charting-to-get-a-lot-prettier/</link>
		<comments>http://ryepup.unwashedmeme.com/blog/2008/04/05/adw-charting-to-get-a-lot-prettier/#comments</comments>
		<pubDate>Sun, 06 Apr 2008 00:02:33 +0000</pubDate>
		<dc:creator>ryan</dc:creator>
		
		<category><![CDATA[adw-charting]]></category>

		<category><![CDATA[lisp]]></category>

		<guid isPermaLink="false">http://ryepup.unwashedmeme.com/blog/2008/04/05/adw-charting-to-get-a-lot-prettier/</guid>
		<description><![CDATA[I&#8217;ve recently come to an obvious conclusion: chart layout is really hard, and not in a fun way.
Luckily, Google has clarified the terms of use on their charting service, which is a RESTful API that returns png files based on some arc-ish querystring parameters.  No google API key is required, the 300,000 pixel image [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently come to an obvious conclusion: chart layout is really hard, and not in a fun way.</p>
<p>Luckily, Google has clarified the terms of use on their <a href="http://code.google.com/apis/chart/">charting service</a>, which is a RESTful API that returns png files based on some arc-ish querystring parameters.  No google API key is required, the 300,000 pixel image size limit is reasonable, and they request to be notified if you need to make more than 250,000 charts in one day.</p>
<p>This afternoon I spent some a little time with <a href="http://weitz.de/drakma/">DRAKMA</a>, and ported my pie chart feature.  I challenge you to guess which went through my layout code, and which came through google:</p>
<p><img src="http://ryepup.unwashedmeme.com/blog/wp-content/uploads/2008/04/pie-gchart.png" alt="pie-gchart.png" /></p>
<p><img src="http://ryepup.unwashedmeme.com/blog/wp-content/uploads/2008/04/pie-chart.png" alt="pie-chart.png" /></p>
<p>Give up?   Me too.</p>
<p>Here are the two functions used to generate those charts:</p>
<pre>(defun pie-gchart ()
  (with-gchart (:pie 300 150)
    (add-slice "foo" 10d0)
    (add-slice "bar" 10d0)
    (add-slice "baz" 20d0)
    (save-file "pie-gchart.png")))

(defun pie-chart ()
  (with-pie-chart (300 150)
    (add-slice "foo" 10d0)
    (add-slice "bar" 10d0)
    (add-slice "baz" 20d0)
    (save-file "pie-chart.png")))</pre>
<p>I was able to use generic methods to reuse all my existing code, but instead of performing <a href="http://www.xach.com/lisp/vecto/">VECTO</a> operations, it builds up the proper parameter list and performs one http call.</p>
<p>I plan to make all of <a href="http://common-lisp.net/project/adw-charting/">ADW-CHARTING</a> use google to do the hard work.  I&#8217;ve got some code in the darcs repo, and after I get my other chart types ported over I&#8217;ll update the website, examples, docs, etc.</p>
<p>I did decide to change my API approach for the google charts, making one with-gchart that takes the chart type as an argument, instead of have a with-pie-gchart, with-line-gchart, etc.</p>
<p>I was a little concerned about adding the dependency on google, but all of my usages so far are either for web apps that are already connected, or for generating static html, in which I&#8217;d be saving the chart locally anyway.</p>
<p>Some day I might revisit the chart layout problem, but for now the parameter building problem is a lot less daunting, and the API design problem is a lot more interesting.  There are tons of options for google charts, and making lispy ways to specify all that should be fun.</p>
]]></content:encoded>
			<wfw:commentRss>http://ryepup.unwashedmeme.com/blog/2008/04/05/adw-charting-to-get-a-lot-prettier/feed/</wfw:commentRss>
		</item>
		<item>
		<title>What learning lisp taught me about other languages</title>
		<link>http://ryepup.unwashedmeme.com/blog/2008/03/30/what-learning-lisp-taught-me-about-other-languages/</link>
		<comments>http://ryepup.unwashedmeme.com/blog/2008/03/30/what-learning-lisp-taught-me-about-other-languages/#comments</comments>
		<pubDate>Sun, 30 Mar 2008 16:08:42 +0000</pubDate>
		<dc:creator>ryan</dc:creator>
		
		<category><![CDATA[C#]]></category>

		<category><![CDATA[java]]></category>

		<category><![CDATA[lisp]]></category>

		<category><![CDATA[python]]></category>

		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://ryepup.unwashedmeme.com/blog/2008/03/30/what-learning-lisp-taught-me-about-other-languages/</guid>
		<description><![CDATA[For the last few years I&#8217;ve been learning and using Lisp more, and here is a disorganized, poorly-worded dump of how Lisp changed my opinion about other languages.
Static Types (as implemented by C# and Java) are oppressive.
I spend most of my time in C#, and it always feels like I&#8217;m toiling in the Type mines [...]]]></description>
			<content:encoded><![CDATA[<p>For the last few years I&#8217;ve been learning and using Lisp more, and here is a disorganized, poorly-worded dump of how Lisp changed my opinion about other languages.</p>
<p><strong>Static Types (as implemented by C# and Java) are oppressive.</strong></p>
<p>I spend most of my time in C#, and it always feels like I&#8217;m toiling in the Type mines under the iron fist of compiler.  I frequently run into problems where I can&#8217;t abstract common code because the .NET framework doesn&#8217;t use C#&#8217;s abstraction mechanisms enough (<a href="http://ryepup.unwashedmeme.com/blog/2008/02/13/brief-list-of-things-that-make-working-in-c-frustrating/">more detail</a>).  In Lisp it feels like types are a tool I can employ when I need it, but it&#8217;s rare that I need COERCE something from one type to another.  Too much of my C# is devoted to casting to / from types, a hefty tax I pay to the compiler.</p>
<p><strong>Syntax doesn&#8217;t have to be so hard.</strong></p>
<p>I was recently working on a ruby script, and had to stop and think: &#8220;what does ruby want for ifs again? curly braces? indentation?&#8221;  In Lisp it&#8217;s easy: it wants matching parentheses.  You can add syntax if you find it useful <a href="http://www.weitz.de/cl-interpol/">(CL-INTERPOL</a> is one of my common additions), but there&#8217;s nothing I need to remember, no need for cheat sheets.  The simplicity also highlight the strangeness of things like python&#8217;s &#8220;pass&#8221; statement.  There&#8217;s no human meaning to a pass statement, it&#8217;s just to handhold the parser, and I don&#8217;t think that should be one of my responsibilities.</p>
<p><strong>Development tools don&#8217;t have to be such a pain in the ass. </strong></p>
<p>In C#, I frequently end up waiting for Visual Studio, and that&#8217;s on a modern dual-core workstation with 2GB of RAM.  In Lisp, I end up waiting once when I start slime/emacs, and once when I initially load a big system, and then everything else is pretty instant.  That&#8217;s on my Asus EEEpc, a 900MHz Celeron with 512MB RAM.  I could use cores to eliminate most of that start-up time.  At work we have one fast server we all use to run our lisps, and if we didn&#8217;t have to run programs like Visual Studio, we could use low-power, low-cost workstations and be perfectly happy.  I know some people think Emacs is a heavyweight program, but devenv.exe sets a new standard.<strong> </strong></p>
<p><strong>Variables don&#8217;t have to be so hard.</strong></p>
<p>LET statements and lexical scoping in lisp are pretty basic, and meet all my needs.  The scoping rules in other languages seem really overcomplicated by comparison.  In C#, sometimes curly braces open a new scope, but sometimes not.  Sometimes you have to declare variables away from their usage in order for them to be available in all the right scopes you want.  In python / ruby, I&#8217;m frequently confused whether I&#8217;m declaring a new variable or using one from a higher scope.  Most of that is from lack of ruby/python practice, but even when first learning Lisp, the rule was so simple that I never had trouble with it.</p>
]]></content:encoded>
			<wfw:commentRss>http://ryepup.unwashedmeme.com/blog/2008/03/30/what-learning-lisp-taught-me-about-other-languages/feed/</wfw:commentRss>
		</item>
		<item>
		<title>First flash game is out!</title>
		<link>http://ryepup.unwashedmeme.com/blog/2008/03/13/first-flash-game-is-out/</link>
		<comments>http://ryepup.unwashedmeme.com/blog/2008/03/13/first-flash-game-is-out/#comments</comments>
		<pubDate>Thu, 13 Mar 2008 15:12:34 +0000</pubDate>
		<dc:creator>ryan</dc:creator>
		
		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://ryepup.unwashedmeme.com/blog/2008/03/13/first-flash-game-is-out/</guid>
		<description><![CDATA[We finally pushed our first flash game, Celest, out the door at work!  The project was quite a learning experience.  The point of the game is to get a spaceship into orbit with simple directional thrusters.
Check it out at celest.funfinds.us:

We&#8217;ve starting posting about those learning experiences on the celest blog:

Celest, our first flash [...]]]></description>
			<content:encoded><![CDATA[<p>We finally pushed our first flash game, Celest, out the door at work!  The project was quite a learning experience.  The point of the game is to get a spaceship into orbit with simple directional thrusters.</p>
<p>Check it out at <a href="http://celest.funfinds.us">celest.funfinds.us</a>:</p>
<p><img src="http://russ.unwashedmeme.com/blog/wp-content/uploads/2008/03/celest_screen.PNG" height="270" width="438" /></p>
<p>We&#8217;ve starting posting about those learning experiences on the <a href="http://celest.funfinds.us/blog/">celest blog</a>:</p>
<ul>
<li><a href="http://celest.funfinds.us/blog/?p=3">Celest, our first flash game</a></li>
<li><a href="http://celest.funfinds.us/blog/?p=5">Flash Community Fragmentation</a></li>
</ul>
<p>Enjoy!  Look at our ads!</p>
]]></content:encoded>
			<wfw:commentRss>http://ryepup.unwashedmeme.com/blog/2008/03/13/first-flash-game-is-out/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Practical Lisp 2008</title>
		<link>http://ryepup.unwashedmeme.com/blog/2008/02/29/practical-lisp-2008/</link>
		<comments>http://ryepup.unwashedmeme.com/blog/2008/02/29/practical-lisp-2008/#comments</comments>
		<pubDate>Fri, 29 Feb 2008 15:24:45 +0000</pubDate>
		<dc:creator>ryan</dc:creator>
		
		<category><![CDATA[lisp]]></category>

		<guid isPermaLink="false">http://ryepup.unwashedmeme.com/blog/2008/02/29/practical-lisp-2008/</guid>
		<description><![CDATA[Zach Beane asked what people are working on, here&#8217;s my contribution:
Work:

Web application managing all data for my employer, Acceleration.net

Replaces an old C++ desktop app and an old ASP web app
Tracks LOTS of random customer data
Generates CSV exports for bulk credit card charging
Uses CLSQL and a byzantine set of libraries to use the legacy SQL Server [...]]]></description>
			<content:encoded><![CDATA[<p>Zach Beane asked <a href="http://xach.livejournal.com/162386.html">what people are working on</a>, here&#8217;s my contribution:</p>
<p><strong>Work:</strong></p>
<ul>
<li>Web application managing all data for my employer, <a href="http://www.acceleration.net">Acceleration.net</a>
<ul>
<li>Replaces an old C++ desktop app and an old ASP web app</li>
<li>Tracks LOTS of random customer data</li>
<li>Generates CSV exports for bulk credit card charging</li>
<li>Uses <a href="http://clsql.b9.com/">CLSQL</a> and a byzantine set of libraries to use the legacy SQL Server 2000 database as the data store, allowing parallel operation with the old C++.  I think this might make us the only outfit in the world using the Linux /Apache / SQL Server / Lisp stack.</li>
<li>Uses a modified <a href="http://common-lisp.net/project/ucw/">UCW</a> as a web framework, running in httpd mode behind Apache, which handles the LDAP authentication and SSL</li>
<li>Uses <a href="http://common-lisp.net/project/adw-charting/">ADW-CHARTING</a> for some data display</li>
<li>Uses <a href="http://www.cliki.net/CL-PDF">CL-PDF</a> and <a href="http://www.fractalconcept.com/asp/cl-typesetting">CL-TYPESETTING</a> to generate PDF invoices, which are printed and mailed (soon to be emailed)</li>
<li>Uses many more helper libraries: <a href="http://www.weitz.de/cl-ppcre/">CL-PPCRE</a>, <a href="http://common-lisp.net/project/bese/arnesi.html">ARNESI</a>, <a href="http://common-lisp.net/project/metabang-bind/">METABANG-BIND</a>, <a href="http://common-lisp.net/project/cxml/">CXML</a>, <a href="http://common-lisp.net/project/parenscript/">PARENSCRIPT</a></li>
</ul>
</li>
<li>Code-generation for administrative web interfaces for one client (I haven&#8217;t asked for permission to disclose this, so I&#8217;m not going to mention who)
<ul>
<li>Builds XML files containing <a href="http://www.mozilla.org/projects/xul/">XUL</a> and javascript, which get used as the front-end in an ASP.NET website</li>
<li>Uses several helper libraries: <a href="http://www.weitz.de/cl-ppcre/">CL-PPCRE</a>, <a href="http://common-lisp.net/project/cxml/">CXML</a>, <a href="http://common-lisp.net/project/parenscript/">PARENSCRIPT</a></li>
</ul>
</li>
<li>Some upcoming projects
<ul>
<li>various websites for profiling carbon emissions (will link when there&#8217;s anything up)</li>
<li>plan to use Postgresql with <a href="http://common-lisp.net/project/postmodern/">POSTMODERN</a>, possible <a href="http://common-lisp.net/project/cl-perec/">CL-PEREC</a> or <a href="http://common-lisp.net/project/elephant/">ELEPHANT</a></li>
</ul>
</li>
</ul>
<p><strong>Personal:</strong></p>
<ul>
<li>Charting random data using <a href="http://common-lisp.net/project/adw-charting/">ADW-CHARTING</a>, my pet graphing library</li>
<li>Some experiments with chat-bots and google calendar integration to get IM updates for events.  I failed at this early last year when <a href="http://common-lisp.net/project/cl-xmpp/">CL-XMPP</a> didn&#8217;t work and I didn&#8217;t know enough to read it, let alone fix it.  I think cl-xmpp has seen some loving in the last year, so I might give this another shot.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://ryepup.unwashedmeme.com/blog/2008/02/29/practical-lisp-2008/feed/</wfw:commentRss>
		</item>
		<item>
		<title>brief list of things that make working in C# frustrating</title>
		<link>http://ryepup.unwashedmeme.com/blog/2008/02/13/brief-list-of-things-that-make-working-in-c-frustrating/</link>
		<comments>http://ryepup.unwashedmeme.com/blog/2008/02/13/brief-list-of-things-that-make-working-in-c-frustrating/#comments</comments>
		<pubDate>Wed, 13 Feb 2008 22:58:17 +0000</pubDate>
		<dc:creator>ryan</dc:creator>
		
		<category><![CDATA[ASP.NET]]></category>

		<category><![CDATA[C#]]></category>

		<category><![CDATA[annoying]]></category>

		<guid isPermaLink="false">http://ryepup.unwashedmeme.com/blog/2008/02/13/brief-list-of-things-that-make-working-in-c-frustrating/</guid>
		<description><![CDATA[Problem:  .NET framework classes don&#8217;t use interfaces enough
Specific example: DataSource / DataBind()are separately defined on Repeater  and GridView, (and Control, and many, many others), and my abstract base class doesn&#8217;t care which option an implementor chooses, it just wants to bind the data however the base control wants it.
Possible Solutions:

Define interface IDataBinding, class [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem: </strong> .NET framework classes don&#8217;t use interfaces enough</p>
<p><strong>Specific example:</strong> <code>DataSource </code>/ <code>DataBind()</code>are separately defined on <code>Repeater </code> and <code>GridView</code>, (and <code>Control</code>, and many, many others), and my abstract base class doesn&#8217;t care which option an implementor chooses, it just wants to bind the data however the base control wants it.</p>
<p><strong>Possible Solutions:</strong></p>
<ul>
<li>Define interface <code>IDataBinding</code>, class <code>MyRepeater : Repeater, IDataBinding</code>, class <code>MyGridView : GridView, IDataBinding</code>, etc.</li>
<li><strike>Define interface <code>IDataBinding</code>, upgrade to C# 3, use extension methods to add <code>IDataBinding</code></strike> nope, extension methods can&#8217;t do this</li>
<li>Copy/paste identical code from my base class into concrete classes</li>
<li>Use reflection to set <code>DataSource </code>and call <code>DataBind()</code>, completely sidestepping the C# type system</li>
</ul>
<hr />
<strong>Problem: </strong>.NET framework classes not designed for extension: &#8220;<code>cannot override inherited member  'System.Collections.Generic.Dictionary&lt;X, Y&gt;.Add(X, Y)' because it is not marked virtual, abstract, or override</code>&#8220;</p>
<p><strong>Specific Example:</strong> Extending <code>System.Collections.Generic.Dictionary</code> to do some permit a list of values for one key, so adding the first item is stored as a single value, but adding a second value to the same key stores both values in a list.  Error message is: &#8220;<code>cannot override inherited member  'System.Collections.Generic.Dictionary&lt;X, Y&gt;.Add(X, Y)' because it is not marked virtual, abstract, or override</code>&#8220;</p>
<p><strong>Possible Solutions:</strong></p>
<ul>
<li>Define wrapper classes that encapsulates the framework class and implements all the base interfaces, with the vast majority of the code being straight delegation to the framework class:
<pre>
class MyDict : IDictionary, [other interfaces...] {
private Dictionary&lt;X,Y&gt; dict = new Dictionary&lt;X,Y&gt;;
public bool Contains(X key){ return dict.Contains(key);}
[... other simple wrappers...]
}</pre>
</li>
<li>Find a less appropriate framework class that is designed for extension, duplicate behavior of the proper framework class manually, eg: add run-time type checks for <code>Hashtable.Add(object, object) </code>in place of the letting the compiler handle the types as in <code>Dictionary&lt;X,Y&gt;.Add(X, Y)</code></li>
<li>Extend Dictionary&lt;X,Y&gt;, define a method <code>AddList(X,Y)</code>, and avoid using <code>IDictionary</code> in the rest of my code</li>
<li>Upgrade the C# 3, use extension to add function <code>AddList </code>to <code>IDictionary</code>, be sure to include those extensions on every consumer of <code>IDictionary</code></li>
</ul>
<hr />
<strong>Problem:</strong> .NET framwork classes not designed for extension: members declared private/ internal / protected internal</p>
<p><strong>Specific Example:</strong> Storing additional data in <code>ViewState </code>on 2 different controls that have different base classes.   One is a user control, another extends <code>RadioButtonList </code>to provide different UI for the same data</p>
<p><strong>Possible solutions:</strong></p>
<ul>
<li><strike>Upgrade to C# 3, use extension methods to add functions</strike> nope, extension methods can only see public members, <code>ViewState </code>is protected</li>
<li>Use reflection to set <code>ViewState</code></li>
<li>Copy/paste code into each control</li>
<li>Define  interface <code>IPublicViewstate</code>,  class <code>MyRadioButtonList : RadioButtonList, IPublicViewState</code>,  class<code> MyUserControl : UserControl, IPublicViewState</code>,  etc</li>
</ul>
<hr /> As Nathan said, I&#8217;m stuck between a rock and <code>IHardPlace</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://ryepup.unwashedmeme.com/blog/2008/02/13/brief-list-of-things-that-make-working-in-c-frustrating/feed/</wfw:commentRss>
		</item>
		<item>
		<title>adw-charting darcs repository moving</title>
		<link>http://ryepup.unwashedmeme.com/blog/2008/02/11/adw-charting-darcs-repository-moving/</link>
		<comments>http://ryepup.unwashedmeme.com/blog/2008/02/11/adw-charting-darcs-repository-moving/#comments</comments>
		<pubDate>Mon, 11 Feb 2008 23:49:43 +0000</pubDate>
		<dc:creator>ryan</dc:creator>
		
		<category><![CDATA[adw-charting]]></category>

		<category><![CDATA[lisp]]></category>

		<guid isPermaLink="false">http://ryepup.unwashedmeme.com/blog/2008/02/11/adw-charting-darcs-repository-moving/</guid>
		<description><![CDATA[I apparently can&#8217;t follow instructions, and put my darcs repo in the wrong place on common-lisp.net, polluting their darcsweb.   The new location is:
http://common-lisp.net/project/adw-charting/darcs/adw-charting
I&#8217;ll be deleting the old junk in a few days.
]]></description>
			<content:encoded><![CDATA[<p>I apparently can&#8217;t follow instructions, and put my darcs repo in the wrong place on common-lisp.net, polluting their <a href="http://common-lisp.net/cgi-bin/darcsweb/darcsweb.cgi">darcsweb</a>.   The new location is:</p>
<p>http://common-lisp.net/project/adw-charting/darcs/adw-charting</p>
<p>I&#8217;ll be deleting the old junk in a few days.</p>
]]></content:encoded>
			<wfw:commentRss>http://ryepup.unwashedmeme.com/blog/2008/02/11/adw-charting-darcs-repository-moving/feed/</wfw:commentRss>
		</item>
		<item>
		<title>the beginnings of bar charts</title>
		<link>http://ryepup.unwashedmeme.com/blog/2008/02/11/the-beginnings-of-bar-charts/</link>
		<comments>http://ryepup.unwashedmeme.com/blog/2008/02/11/the-beginnings-of-bar-charts/#comments</comments>
		<pubDate>Mon, 11 Feb 2008 04:30:38 +0000</pubDate>
		<dc:creator>ryan</dc:creator>
		
		<category><![CDATA[adw-charting]]></category>

		<category><![CDATA[lisp]]></category>

		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://ryepup.unwashedmeme.com/blog/2008/02/11/the-beginnings-of-bar-charts/</guid>
		<description><![CDATA[Spent a ton of time today playing with adw-charting.  I wanted to expand on the source contributor graphs from the other day, and ended up implementing some basic bar chart functionality.
I&#8217;ve read a lot of complaints about the lack of lisp libraries, so whenever I sit down to do some random task, I try [...]]]></description>
			<content:encoded><![CDATA[<p>Spent a ton of time today playing with adw-charting.  I wanted to expand on the source contributor graphs from the other day, and ended up implementing some basic bar chart functionality.</p>
<p>I&#8217;ve read a lot of complaints about the lack of lisp libraries, so whenever I sit down to do some random task, I try to use libraries as much as I can to test the validity of those complaints.  I also learn a lot by reading and experimenting with other people&#8217;s code, and slowly I can see my style getting more lispish, and less C#-ish.  clbuild makes it trivial to get many libraries usable, and today I had good luck with everything just working.</p>
<p>I used darcs as my source of dataset, its xml changes output has a simply formatted time string.  I told clbuild to install <a href="http://common-lisp.net/project/cxml/">closure xml</a> (cxml), and in fairly short order I had a 80 line program that:</p>
<ol>
<li>uses the <a href="http://common-lisp.net/project/cxml/klacks.html">cxml klacks</a> system to pull the information I wanted out of the file in one pass</li>
<li>uses <a href="http://www.weitz.de/cl-ppcre/">cl-ppcre</a> to parse the username out of the darcs author string, so authors &#8220;Ryan Davis &lt;ryan@acc&#8230;&#8221; and &#8220;ryan@acce&#8230;&#8221; both get displayed as &#8220;ryan&#8221;.</li>
<li>uses <a href="http://common-lisp.net/project/adw-charting/">adw-charting</a> to chart patches per day into a png</li>
</ol>
<p>The result was less than spectacular:</p>
<p><a href="http://ryepup.unwashedmeme.com/blog/wp-content/uploads/2008/02/darcs.png" title="darcs.png"><img src="http://ryepup.unwashedmeme.com/blog/wp-content/uploads/2008/02/darcs.thumbnail.png" alt="darcs.png" /></a></p>
<p>The chart looks pretty nice, but its lying horribly.  My data set didn&#8217;t have explicit zeros for days without activity, so the line goes from one active day to another, telling all kinds of lies.  My favorite is the 2.5 patches it says I pushed on 1/11.  The other fun one is that Russ shows up in the legend, but his one patch isn&#8217;t visible at all, because there was only one data point, and you need two points to make a line.</p>
<p>What is really appropriate here is a bar chart.  Adding explicit zeros is a waste of time and RAM (among other things), so I opted for making a bar chart type.  After many more hours of coding, I changed with-line-chart to with-bar-chart and re-ran my program:</p>
<p><a href="http://ryepup.unwashedmeme.com/blog/wp-content/uploads/2008/02/darcs1.png" title="darcs1.png"><img src="http://ryepup.unwashedmeme.com/blog/wp-content/uploads/2008/02/darcs1.thumbnail.png" alt="darcs1.png" /></a></p>
<p>Much better.  There&#8217;s a few rendering problems, but the data is shown alright.</p>
<p>Adding support for bar charts was actually really easy, it was going back and reworking my amatuerish code that took most of the time.  My big accomplishments:</p>
<ul>
<li>deleted a lot of code by using <a href="http://www.lispworks.com/documentation/HyperSpec/Body/m_w_acce.htm">with-accessors</a></li>
<li>made all usage of x/y points go through 3 functions: make-point, x, and y, allowing for easily changing the internal representation of points in the future</li>
<li>removed some slots from an object, replacing it with a few functions to calculate the desired value</li>
<li>added a few more generic functions to support bar charts</li>
<li>reduced the size of the legend</li>
</ul>
<p>After working on the line chart code for awhile, adding bar charts was trivial: one class that extends line-chart, one macro to mirror with-line-chart, one method to draw bars instead of lines, and a couple of helper functions.  I was really pleased with how easy it was to add the different graphing mode.</p>
<p>Of course, giving another dataset exposes more problems:</p>
<p><a href="http://ryepup.unwashedmeme.com/blog/wp-content/uploads/2008/02/darcs2.png" title="darcs2.png"><img src="http://ryepup.unwashedmeme.com/blog/wp-content/uploads/2008/02/darcs2.thumbnail.png" alt="darcs2.png" /></a></p>
<p>That&#8217;s for clbuild, and there are a few issues apparent here:</p>
<ul>
<li>when more than one bar is shown for one day, it draws them next to each other, which makes it hard to tell where on the bar is on the x-axis</li>
<li>the legend wanders off the edge</li>
<li>the month/day labels aren&#8217;t very descriptive</li>
</ul>
<p>I think I&#8217;m going to solve the first two issues by allowing a summarize mode, where less significant series can be aggregated into a single &#8220;other&#8221; series.  This is how I see a lot of other programs solve it, so I&#8217;ll give that a shot.  I don&#8217;t think that will completely solve the first issue, but should alleviate it a little bit.</p>
<p>The last issue I solved by making a function to show patches by month instead of by day:</p>
<p><a href="http://ryepup.unwashedmeme.com/blog/wp-content/uploads/2008/02/darcs3.png" title="darcs3.png"><img src="http://ryepup.unwashedmeme.com/blog/wp-content/uploads/2008/02/darcs3.thumbnail.png" alt="darcs3.png" /></a></p>
<p>That shows the side-by-side bars problem pretty clearly, but what I find most interesting is the right side of the chart where we see more people starting to contribute.  I think that&#8217;s indicative of the project gaining more users and activity.</p>
<p>Another interesting one, arnesi:</p>
<p><a href="http://ryepup.unwashedmeme.com/blog/wp-content/uploads/2008/02/darcs4.png" title="darcs4.png"><img src="http://ryepup.unwashedmeme.com/blog/wp-content/uploads/2008/02/darcs4.thumbnail.png" alt="darcs4.png" /></a></p>
<p>Early on, Marco Baringer was the driving force, but somewhere around the middle of 2006 I guess he had finished scratching all his itches, and Atilla Lendvai became the prime mover.</p>
<p>Alright, I could seriously speculate about these things all night, so I&#8217;m gonna stop now.</p>
<p>I still need to fix the above-mentioned bar chart issues, so there&#8217;s no new release of adw-charting, but all the code mentioned here is in the public darcs repository (http://common-lisp.net/project/adw-charting/darcs/) for the curious.</p>
<p>See the examples folder for the darc-changes graphing program, you need to get the xml from darcs using: darcs changes &#8211;xml.</p>
]]></content:encoded>
			<wfw:commentRss>http://ryepup.unwashedmeme.com/blog/2008/02/11/the-beginnings-of-bar-charts/feed/</wfw:commentRss>
		</item>
		<item>
		<title>clbuild on my eeepc</title>
		<link>http://ryepup.unwashedmeme.com/blog/2008/02/10/clbuild-on-my-eeepc/</link>
		<comments>http://ryepup.unwashedmeme.com/blog/2008/02/10/clbuild-on-my-eeepc/#comments</comments>
		<pubDate>Sun, 10 Feb 2008 08:25:17 +0000</pubDate>
		<dc:creator>ryan</dc:creator>
		
		<category><![CDATA[eeepc]]></category>

		<category><![CDATA[lisp]]></category>

		<guid isPermaLink="false">http://ryepup.unwashedmeme.com/blog/2008/02/10/clbuild-on-my-eeepc/</guid>
		<description><![CDATA[Today and yesterday I got my eeepc setup for lisp development, using clbuild to get all the dependencies resolved for me.  After some trial and error, here were my steps:

Added xandros repositories and updates.xepc.org repositories to /etc/apt/sources.list, set updates.xepc.org to have the same priority as the asus repository in /etc/apt/preferences
The version of git in [...]]]></description>
			<content:encoded><![CDATA[<p>Today and yesterday I got my eeepc setup for lisp development, using <a href="http://common-lisp.net/project/clbuild/">clbuild</a> to get all the dependencies resolved for me.  After some trial and error, here were my steps:</p>
<ol>
<li>Added <a href="http://wiki.eeeuser.com/addingxandrosrepos">xandros repositories</a> and updates.xepc.org repositories to /etc/apt/sources.list, set updates.xepc.org to have the same priority as the asus repository in /etc/apt/preferences</li>
<li>The version of git in those repos is too old, so also add backports.org to sources.list:<br />
<code>deb http://www.backports.org/debian etch-backports main contrib </code>non-free, then pin git-core in /etc/apt/preferences:</p>
<pre>
Package: git-core

Pin: release a=etch-backports

Pin-Priority: 999</pre>
</li>
<li>Install tools clbuild needs: <code>sudo apt-get install darcs cvs subversion curl cogito git-core sbcl</code></li>
<li>Install clbuild: <code>darcs get http://common-lisp.net/project/clbuild/clbuild</code></li>
<li>Make the script executable: <code>chmod u+x clbuild/clbuild</code></li>
<li>Get a recent version of sbcl: <code>./clbuild/clbuild buildsbcl</code></li>
<li>Watch sbcl compiler output, speculate on what things like &#8220;<code>(DEFINE-SOURCE-TRANSFORM LOGNOR ...)</code>&#8221; might mean</li>
<li>Give up on waiting for the sbcl to finish compiling, spend 6 hours at Nathan&#8217;s house for dinner, beer, and Rock Band.</li>
<li>Get some basic libraries:<code> ./clbuild/clbuild  update --main-projects </code></li>
<li>Compile <a href="http://common-lisp.net/project/slime/">slime</a>: <code>./clbuild/clbuild build slime</code></li>
<li>Load up emacs and slime to verify everything went smoothly: <code>./clbuild/clbuild slime</code></li>
</ol>
<p>UPDATE: added bits about getting  a recent version of git installed, clbuild needs it for updating source directories after initial installation.  My repos installed 1.4.x, and that doesn&#8217;t seem to include git-config, nor set the remote.origin.url config value which clbuild depends on.  Once I got git 1.5.x, I downloaded the projects again, and now everything works fine. That took me approximately forever to figure out.</p>
]]></content:encoded>
			<wfw:commentRss>http://ryepup.unwashedmeme.com/blog/2008/02/10/clbuild-on-my-eeepc/feed/</wfw:commentRss>
		</item>
		<item>
		<title>compiling emacs22 on my eeepc</title>
		<link>http://ryepup.unwashedmeme.com/blog/2008/02/08/compiling-emacs22-on-my-eeepc/</link>
		<comments>http://ryepup.unwashedmeme.com/blog/2008/02/08/compiling-emacs22-on-my-eeepc/#comments</comments>
		<pubDate>Fri, 08 Feb 2008 05:41:46 +0000</pubDate>
		<dc:creator>ryan</dc:creator>
		
		<category><![CDATA[eeepc]]></category>

		<category><![CDATA[emacs]]></category>

		<guid isPermaLink="false">http://ryepup.unwashedmeme.com/blog/2008/02/08/compiling-emacs22-on-my-eeepc/</guid>
		<description><![CDATA[Tonight I took some time and compiled emacs22 for my eeepc.  After a little trial and error, here were my steps:

Download emacs
Add non-asus package repositories
sudo apt-get install build-essential
sudo apt-get install libncurses5-dev
sudo apt-get install xlibs-dev (if you want to emacs to use X)
unpack emacs tarball
./configure
make (took about 6 minutes)
sudo make-install
go to sleep

]]></description>
			<content:encoded><![CDATA[<p>Tonight I took some time and compiled emacs22 for my eeepc.  After a little trial and error, here were my steps:</p>
<ol>
<li><a href="http://ftp.gnu.org/pub/gnu/emacs/">Download emacs</a></li>
<li><a href="http://wiki.eeeuser.com/addingxandrosrepos">Add non-asus package repositories</a></li>
<li>sudo apt-get install build-essential</li>
<li>sudo apt-get install libncurses5-dev</li>
<li>sudo apt-get install xlibs-dev (if you want to emacs to use X)</li>
<li>unpack emacs tarball</li>
<li>./configure</li>
<li>make (took about 6 minutes)</li>
<li>sudo make-install</li>
<li>go to sleep</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://ryepup.unwashedmeme.com/blog/2008/02/08/compiling-emacs22-on-my-eeepc/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 1.538 seconds -->
<!-- Cached page served by WP-Cache -->
