<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.2.1" -->
<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/"
	>

<channel>
	<title>lojic.com</title>
	<link>http://lojic.com/blog</link>
	<description></description>
	<pubDate>Sat, 31 May 2008 20:49:21 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.1</generator>
	<language>en</language>
			<item>
		<title>Blog Bifurcation</title>
		<link>http://lojic.com/blog/2008/05/31/blog-bifurcation/</link>
		<comments>http://lojic.com/blog/2008/05/31/blog-bifurcation/#comments</comments>
		<pubDate>Sat, 31 May 2008 20:49:21 +0000</pubDate>
		<dc:creator>Brian Adkins</dc:creator>
		
		<category><![CDATA[arc]]></category>

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

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

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

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

		<guid isPermaLink="false">http://lojic.com/blog/2008/05/31/blog-bifurcation/</guid>
		<description><![CDATA[One of the reasons I haven&#8217;t been blogging much lately is because I&#8217;ve decided to bifurcate my blog into a professional/technical blog (which will continue here on lojic.com/blog) and a personal blog, and until I&#8217;ve decided on the technology to use for my personal blog I&#8217;ve been reluctant to blog much.
The motivation for the split [...]]]></description>
			<content:encoded><![CDATA[<p>One of the reasons I haven&#8217;t been blogging much lately is because I&#8217;ve decided to bifurcate my blog into a professional/technical blog (which will continue here on lojic.com/blog) and a personal blog, and until I&#8217;ve decided on the technology to use for my personal blog I&#8217;ve been reluctant to blog much.</p>
<p>The motivation for the split is the feeling that a lot of my non-technical family &#038; friends grow weary of weeding through a lot of techno-geek material to find anything interesting, and folks who read my blog for technical info probably don&#8217;t want to weed through the silly videos, etc.</p>
<p>Wordpress has worked fine for my blog thus far, but I want to take the opportunity to develop my personal blog in a new technology more for the learning experience than necessity. I haven&#8217;t had time to select the appropriate technology, so I have a bit of analysis paralysis.</p>
<p>The candidates are:</p>
<ul>
<li>
<strong>Ruby on Rails</strong>: I currently develop primarily in Ruby on Rails, so in that respect it would be the logical choice and easiest way to get started; however, it wouldn&#8217;t have the benefit of learning a new technology.
</li>
<li>
<strong>Arc</strong>: I had high hopes for Arc when Paul Graham first released it. I still think it has potential, but that potential is limited by Paul&#8217;s interest level and available time. It&#8217;s been over 3 months since the last release and that was only a small incremental improvement. The forum seems dead, and the fact that Arc went through a 5 year <em>blackout</em> period makes me wonder whether it will be a dead-end language and a waste of valuable time.
</li>
<li>
<strong>Common Lisp</strong>: I am leaning toward a Lisp, so if Arc doesn&#8217;t pan out, Common Lisp would be a good fallback language. It&#8217;s much more mature with robust implementations. It doesn&#8217;t provide a nice <em>batteries included</em> experience though, and I&#8217;ve been reluctant to collect the necessary libraries from various sources to allow anything remotely similar to Ruby on Rails with respect to ease of development. I think it may have a greater <em>long term</em> potential though, so it may be worth the effort.
</li>
<li>
<strong>Scheme</strong>: The PLT web server may give me a head start on a Lisp based web site, and Arc is based on MZScheme, so it&#8217;s on the short list.
</li>
<li>
<strong>Haskell</strong>: I know very little Haskell (even less than Lisp which is not much), but I&#8217;m intrigued by many aspects of the language. GHC seems to be a great compiler that produces well performing programs. My initial impression is that it will take more effort to learn than a Lisp, but in terms of brain stretching, it has a lot to offer. There is a Haskell based web server available, but like a lot of <em>fringe</em> languages, it appears to be pretty rough around the edges.
</li>
</ul>
<p>I have a vacation coming up, so I think I&#8217;ll use some of the down time to do some research and make a decision. Look for the blog bifurcation to happen in the latter half of June. If you have any opinions on the matter, please add a comment <img src='http://lojic.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://lojic.com/blog/2008/05/31/blog-bifurcation/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Startup School 2008</title>
		<link>http://lojic.com/blog/2008/04/21/startup-school-2008/</link>
		<comments>http://lojic.com/blog/2008/04/21/startup-school-2008/#comments</comments>
		<pubDate>Mon, 21 Apr 2008 17:22:05 +0000</pubDate>
		<dc:creator>Brian Adkins</dc:creator>
		
		<category><![CDATA[video]]></category>

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

		<guid isPermaLink="false">http://lojic.com/blog/2008/04/21/startup-school-2008/</guid>
		<description><![CDATA[http://omnisio.com/startupschool08
http://www.justin.tv/hackertv/97554/Startup_School
Peter Norvig, Paul Graham, Marc Andreessen, Mike Arrington, Jeff Bezos, David Heinemeier Hansson, etc.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://omnisio.com/startupschool08">http://omnisio.com/startupschool08</a></p>
<p><a href="http://www.justin.tv/hackertv/97554/Startup_School">http://www.justin.tv/hackertv/97554/Startup_School</a></p>
<p>Peter Norvig, Paul Graham, Marc Andreessen, Mike Arrington, Jeff Bezos, David Heinemeier Hansson, etc.</p>
]]></content:encoded>
			<wfw:commentRss>http://lojic.com/blog/2008/04/21/startup-school-2008/feed/</wfw:commentRss>
		</item>
		<item>
		<title>cmd line history meme</title>
		<link>http://lojic.com/blog/2008/04/19/cmd-line-history-meme/</link>
		<comments>http://lojic.com/blog/2008/04/19/cmd-line-history-meme/#comments</comments>
		<pubDate>Sat, 19 Apr 2008 17:41:16 +0000</pubDate>
		<dc:creator>Brian Adkins</dc:creator>
		
		<category><![CDATA[utility]]></category>

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

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

		<guid isPermaLink="false">http://lojic.com/blog/2008/04/19/cmd-line-history-meme/</guid>
		<description><![CDATA[Aaron tagged me

brian@airstream:~$ history 1000 &#124; awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' &#124;
  sort -rn &#124; head

182 cd
141 ls
55 vim
52 ssh
44 timeclock.rb
29 ruby
28 irb
26 fr
26 cat
24 rake


I&#8217;ve made a definite switch to emacs, but vim is still handy for the quick view of a file, and I start emacs in the morning [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://aaronbedra.com/2008/4/16/cmd-line-history-meme">Aaron tagged me</a></p>
<pre>
brian@airstream:~$ history 1000 | awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' |
  sort -rn | head

182 cd
141 ls
55 vim
52 ssh
44 timeclock.rb
29 ruby
28 irb
26 fr
26 cat
24 rake
</pre>
<ol>
<li>I&#8217;ve made a definite switch to emacs, but vim is still handy for the quick view of a file, and I start emacs in the morning via an icon, and it stays up all day - otherwise, it would be way up on the list.</li>
<li>timeclock.rb is a handly little script to parse/format an emacs timelog file - incredibly nice way to track time on various tasks.</li>
<li>fr is an alias for: find . -regextype posix-extended -regex &#8216;\&#8221;.*.r(b|html)&#8217;\&#8221; | xargs grep</li>
</ol>
<p>Tag. You&#8217;re it <img src='http://lojic.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://lojic.com/blog/2008/04/19/cmd-line-history-meme/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Big Dog Robot</title>
		<link>http://lojic.com/blog/2008/03/20/big-dog-robot/</link>
		<comments>http://lojic.com/blog/2008/03/20/big-dog-robot/#comments</comments>
		<pubDate>Thu, 20 Mar 2008 21:45:51 +0000</pubDate>
		<dc:creator>Brian Adkins</dc:creator>
		
		<category><![CDATA[technology]]></category>

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

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

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

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

		<guid isPermaLink="false">http://lojic.com/blog/2008/03/20/big-dog-robot/</guid>
		<description><![CDATA[Very impressive balance and mobility. A robot from Boston Dynamics.



]]></description>
			<content:encoded><![CDATA[<p>Very impressive balance and mobility. A robot from <a href="http://www.bostondynamics.com">Boston Dynamics</a>.</p>
<p><object width="425" height="355">
<param name="movie" value="http://www.youtube.com/v/W1czBcnX1Ww&#038;hl=en"></param>
<param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/W1czBcnX1Ww&#038;hl=en" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://lojic.com/blog/2008/03/20/big-dog-robot/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Awareness Test</title>
		<link>http://lojic.com/blog/2008/03/20/awareness-test/</link>
		<comments>http://lojic.com/blog/2008/03/20/awareness-test/#comments</comments>
		<pubDate>Thu, 20 Mar 2008 16:58:48 +0000</pubDate>
		<dc:creator>Brian Adkins</dc:creator>
		
		<category><![CDATA[video]]></category>

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

		<guid isPermaLink="false">http://lojic.com/blog/2008/03/20/awareness-test/</guid>
		<description><![CDATA[Got this from my friend Curt&#8217;s blog. I didn&#8217;t do so well; see how you do  



]]></description>
			<content:encoded><![CDATA[<p>Got this from my friend Curt&#8217;s blog. I didn&#8217;t do so well; see how you do <img src='http://lojic.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><object width="425" height="355">
<param name="movie" value="http://www.youtube.com/v/Ahg6qcgoay4&#038;hl=en"></param>
<param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/Ahg6qcgoay4&#038;hl=en" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://lojic.com/blog/2008/03/20/awareness-test/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Amazon MP3 Downloads</title>
		<link>http://lojic.com/blog/2008/02/20/amazon-mp3-downloads/</link>
		<comments>http://lojic.com/blog/2008/02/20/amazon-mp3-downloads/#comments</comments>
		<pubDate>Wed, 20 Feb 2008 22:24:29 +0000</pubDate>
		<dc:creator>Brian Adkins</dc:creator>
		
		<category><![CDATA[music]]></category>

		<category><![CDATA[web 2.0]]></category>

		<guid isPermaLink="false">http://lojic.com/blog/2008/02/20/amazon-mp3-downloads/</guid>
		<description><![CDATA[This may be old news to many, but I discovered Amazon  MP3 downloads and it&#8217;s been a nice alternative to itunes. MP3 files are so much easier to deal with than the DRM ridden itunes format.
]]></description>
			<content:encoded><![CDATA[<p>This may be old news to many, but I discovered <a rel="nofollow" href="http://www.amazon.com/b?%5Fencoding=UTF8&#038;node=324382011&#038;tag=lojiccom-20&#038;linkCode=ur2&#038;camp=1789&#038;creative=9325">Amazon  MP3 downloads</a> and it&#8217;s been a nice alternative to itunes. MP3 files are so much easier to deal with than the DRM ridden itunes format.</p>
]]></content:encoded>
			<wfw:commentRss>http://lojic.com/blog/2008/02/20/amazon-mp3-downloads/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Soup or Bowl?</title>
		<link>http://lojic.com/blog/2008/02/17/soup-or-bowl/</link>
		<comments>http://lojic.com/blog/2008/02/17/soup-or-bowl/#comments</comments>
		<pubDate>Sun, 17 Feb 2008 19:09:04 +0000</pubDate>
		<dc:creator>Brian Adkins</dc:creator>
		
		<category><![CDATA[video]]></category>

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

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

		<guid isPermaLink="false">http://lojic.com/blog/2008/02/17/soup-or-bowl/</guid>
		<description><![CDATA[In case you didn&#8217;t see this during the pregame two weeks ago  



]]></description>
			<content:encoded><![CDATA[<p>In case you didn&#8217;t see this during the pregame two weeks ago <img src='http://lojic.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><object width="425" height="355">
<param name="movie" value="http://www.youtube.com/v/WF98Sg5C7lU&#038;rel=1"></param>
<param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/WF98Sg5C7lU&#038;rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://lojic.com/blog/2008/02/17/soup-or-bowl/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Nice Fonts for GNU Emacs on Ubuntu Linux</title>
		<link>http://lojic.com/blog/2008/02/07/nice-fonts-for-gnu-emacs-on-ubuntu-linux/</link>
		<comments>http://lojic.com/blog/2008/02/07/nice-fonts-for-gnu-emacs-on-ubuntu-linux/#comments</comments>
		<pubDate>Thu, 07 Feb 2008 16:13:18 +0000</pubDate>
		<dc:creator>Brian Adkins</dc:creator>
		
		<category><![CDATA[vim]]></category>

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

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

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

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

		<guid isPermaLink="false">http://lojic.com/blog/2008/02/07/nice-fonts-for-gnu-emacs-on-ubuntu-linux/</guid>
		<description><![CDATA[Before discussing how to get nice fonts for emacs, it might be reasonable to ask, &#8220;why emacs?&#8221; I haven&#8217;t fully answered that question myself, but had I not been able to get nice, readable fonts on emacs, I probably wouldn&#8217;t continue researching it. For the info on getting nice fonts to work, scroll down to [...]]]></description>
			<content:encoded><![CDATA[<p>Before discussing how to get nice fonts for emacs, it might be reasonable to ask, &#8220;why emacs?&#8221; I haven&#8217;t fully answered that question myself, but had I not been able to get nice, readable fonts on emacs, I probably wouldn&#8217;t continue researching it. For the info on getting nice fonts to work, scroll down to &#8220;Nice Fonts&#8221; below.</p>
<p>After many years of using large IDEs to develop software, I switched to <a href="http://www.vim.org/">vim</a> about a year and a half ago when I began developing with Ruby on Rails. Although the learning curve for vim was a bit steep, I quickly got to the point of being more productive with vim than I was with my previous IDE, and I&#8217;m continually learning features of vim that save me time and effort.</p>
<p>Ok, if vim is so great, why am I considering emacs? In a word, Lisp. Emacs, has great Lisp support. For the little bit of Lisp dabbling I&#8217;ve been doing, vim has been fine, but from what I&#8217;ve seen demonstrated with emacs and slime, I think it&#8217;s worth researching. Another important factor is that emacs is scripted with elisp, a dialect of Lisp. I&#8217;ve never taken the time to read up on vim scripting, but scripting emacs with elisp seems easy. Type in some elisp code into the scratch buffer, evaluate it, and it&#8217;s integrated immediately into emacs. I haven&#8217;t written any vim scripts in a year and a half, but within a few hours of researching emacs, I had implemented several elisp scripts (from source obtained online).</p>
<p>Here&#8217;s one to simulate the % command in vim which moves the cursor to the matching paren:</p>
<pre>
(defun match-paren (arg)
  "Go to the matching paren if on a paren; otherwise insert %."
  (interactive "p")
  (cond ((looking-at "\s(") (forward-list 1) (backward-char 1))
	((looking-at "\s)") (forward-char 1) (backward-list 1))
        (t (self-insert-command (or arg 1)))))

(global-set-key "%" 'match-paren)
</pre>
<p>Here&#8217;s one to simulate the vim o and O commands which open a new line either below or above the cursor and position the cursor properly indented, so you can start typing immediately. I use this quite often in vim:</p>
<pre>
(defun bja-open-line-below ()
  (interactive)
  (end-of-line)
  (open-line 1)
  (next-line 1)
  (indent-according-to-mode))

(global-set-key [?C-o] 'bja-open-line-below)

(defun bja-open-line-above ()
  (interactive)
  (beginning-of-line)
  (open-line 1)
  (indent-according-to-mode))

(global-set-key [?M-o] 'bja-open-line-above)
</pre>
<p>After my brief exposure to emacs, I think vim is more concise. In other words, it appears that vim can accomplish a given task with fewer keystrokes than emacs. I&#8217;m curious to see how hard it is to extend emacs to have some of the niceties I&#8217;m used to with vim. Maybe I can have the best of both worlds - the conciseness of vim and the extensibility and Lisp support of emacs. Lennart Borgman passed on a link to <a href="http://www.emacswiki.org/cgi-bin/wiki/vimpulse.el">vimpulse.el</a>, so I&#8217;ll take a look at it soon.</p>
<p>I swapped my caps-lock with my left control key a long time ago, so the emacs chording isn&#8217;t quite as much of a problem, but I still wonder if vim might be easier on the hands/wrists since it requires very little chording.</p>
<p>I know some famous lispers use vi(m) for Lisp development, so I don&#8217;t think emacs is a must-have. Also, if I end up using a commercial Lisp such as Lispworks or Allegro, I may consider returning to an IDE for lisp development. So, at this stage, I&#8217;m still very much a vim user who is researching emacs. </p>
<p><strong>UPDATE:</strong>Well, sometime between the original post and now I became a die-hard GNU Emacs user, so I figured I&#8217;d update the post <img src='http://lojic.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Nice Fonts</strong></p>
<p>But enough of that, how do you get nice fonts on emacs? I had heard that the new version of emacs (22) provided anti-aliased fonts, but apparently I was mistaken. I spent hours Googling and rebuilding emacs to no avail - quite a frustrating experience. Then I posted a question on the gnu.emacs.help usenet group and received a helpful reply in a few minutes which did the trick. <a href="http://groups.google.com/group/gnu.emacs.help/browse_frm/thread/56467e1d7e39d279/61f2560701405cc8?hl=en#61f2560701405cc8">Here&#8217;s the thread.</a></p>
<p>Here&#8217;s what I did:</p>
<pre>
cvs -z3 -d:pserver:anonymous@cvs.savannah.gnu.org:/sources/emacs co emacs
cd emacs
./configure --enable-font-backend --with-gif=no
make bootstrap
make
sudo make install
</pre>
<p>After that, I was able to use the &#8216;Bitstream Vera Sans Mono-10&#8242; font, and it looks great!</p>
<pre>
emacs -r -fn ""Bitstream Vera Sans Mono-10"
</pre>
<p>The -r flag is for reverse video. I much prefer a black background. After making emacs from the cvs sources, it reports its version as 23.0.60.2.</p>
<p>After editing my ~/.Xresources file to have the following line:</p>
<pre>
Emacs.font: Bitstream Vera Sans Mono-10
</pre>
<p>And running the command:</p>
<pre>
xrdb -merge ~/.Xresources
</pre>
<p>Emacs automatically uses that font at startup.</p>
<p>During my hours of Googling, I had seen the page with the correct information <a href="http://www.emacswiki.org/cgi-bin/wiki/XftGnuEmacs">here</a>. But in my haste, I read the statement, &#8220;<em>Note: Since the emacs-unicode-2 branch which had the xft support is merged into trunk, the current page is obsolete.</em>&#8220;, and somehow got the impression that the <strong>entire</strong> page was obsolete, but apparently that is not the case.<strong>*</strong></p>
<p>Fortunately, the helpful folks on gnu.emacs.help set me straight - thanks guys!</p>
<p><strong>*UPDATE:</strong> I edited the wiki page referenced above, so the &#8220;obsolete&#8221; notice is further down the page.</p>
]]></content:encoded>
			<wfw:commentRss>http://lojic.com/blog/2008/02/07/nice-fonts-for-gnu-emacs-on-ubuntu-linux/feed/</wfw:commentRss>
		</item>
		<item>
		<title>2000 Super Bowl Commercial</title>
		<link>http://lojic.com/blog/2008/02/02/2000-super-bowl-commercial/</link>
		<comments>http://lojic.com/blog/2008/02/02/2000-super-bowl-commercial/#comments</comments>
		<pubDate>Sat, 02 Feb 2008 15:53:23 +0000</pubDate>
		<dc:creator>Brian Adkins</dc:creator>
		
		<category><![CDATA[marketing]]></category>

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

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

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

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

		<guid isPermaLink="false">http://lojic.com/blog/2008/02/02/2000-super-bowl-commercial/</guid>
		<description><![CDATA[Terry Tate Office Linebacker  



]]></description>
			<content:encoded><![CDATA[<p>Terry Tate Office Linebacker <img src='http://lojic.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><object width="425" height="355">
<param name="movie" value="http://www.youtube.com/v/PcnEVGzNUwg&#038;rel=1"></param>
<param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/PcnEVGzNUwg&#038;rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://lojic.com/blog/2008/02/02/2000-super-bowl-commercial/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Arc has been released</title>
		<link>http://lojic.com/blog/2008/01/29/arc-has-been-released/</link>
		<comments>http://lojic.com/blog/2008/01/29/arc-has-been-released/#comments</comments>
		<pubDate>Wed, 30 Jan 2008 02:14:05 +0000</pubDate>
		<dc:creator>Brian Adkins</dc:creator>
		
		<category><![CDATA[arc]]></category>

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

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

		<guid isPermaLink="false">http://lojic.com/blog/2008/01/29/arc-has-been-released/</guid>
		<description><![CDATA[This has been a long time in coming. Paul Graham and Robert Morris have released an initial version of the Arc programming language.
Announcement
Language Web Site
Software
Tutorial
Forum
They recommend using version 352 of MzScheme because the latest version apparently breaks Arc. I already had 360 installed and was in a hurry, so I tried it, and most of [...]]]></description>
			<content:encoded><![CDATA[<p>This has been a long time in coming. Paul Graham and Robert Morris have released an initial version of the Arc programming language.</p>
<p><a href="http://paulgraham.com/arc0.html">Announcement</a><br />
<a href="http://arclanguage.org/">Language Web Site</a><br />
<a href="http://arclanguage.org/install">Software</a><br />
<a href="http://ycombinator.com/arc/tut.txt">Tutorial</a><br />
<a href="http://arclanguage.org/forum">Forum</a></p>
<p>They recommend using version 352 of MzScheme because the latest version apparently breaks Arc. I already had 360 installed and was in a hurry, so I tried it, and most of the tutorial seemed to work fine except for the web server which failed. I&#8217;ll try later with 352 and see how it goes.</p>
<p>The language is still quite volatile, so I&#8217;m not sure if anyone is too interested in investing a lot of time creating libraries yet, but when the language settles down, I&#8217;m very curious about the acceptance level of Arc. </p>
<p>It seems to have quite a bit of Lispy goodness, and I&#8217;ve agreed with Paul&#8217;s language philosophy from what I&#8217;ve read about what he wants Arc to become. Hopefully it will live up to those ideas. On the one hand, I can see benefits in having a standard such as the one for Common Lisp, but on the other hand, Ruby &#038; Python have done extremely well with the <a href="http://en.wikipedia.org/wiki/BDFL">BDFL</a> model with Matz &#038; Guido, and I think Paul Graham could pull off that role if he wants to.</p>
<p>A problem with a &#8220;standards&#8221; approach is the proliferation of implementations dividing the community; whereas, the single implementation languages seem to have a more unified community.</p>
<p>If Arc can retain the best of Lisp, add some niceties from other languages and attract an active developer community, I think it may become very interesting.</p>
<p><strong>rlwrap</strong></p>
<p>Probably one of the best things I&#8217;ve gotten out of the Arc release so far was a tip from a guy on the forum on how to add readline support to the Arc REPL using rlwrap. I&#8217;d never heard of rlwrap before, and it&#8217;s awesome! I can not get readline support for logo and arc without needing to rebuild them with native support. </p>
<p>sudo apt-get install rlwrap<br />
rlwrap logo</p>
<p>What a great idea <img src='http://lojic.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://lojic.com/blog/2008/01/29/arc-has-been-released/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Surfing a Huge Wave</title>
		<link>http://lojic.com/blog/2008/01/28/surfing-a-huge-wave/</link>
		<comments>http://lojic.com/blog/2008/01/28/surfing-a-huge-wave/#comments</comments>
		<pubDate>Tue, 29 Jan 2008 00:19:58 +0000</pubDate>
		<dc:creator>Brian Adkins</dc:creator>
		
		<category><![CDATA[video]]></category>

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

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

		<guid isPermaLink="false">http://lojic.com/blog/2008/01/28/surfing-a-huge-wave/</guid>
		<description><![CDATA[I&#8217;ve spent some time (kayaking or boogie boarding, not surfing) in waves big enough to really get the adrenaline pumping out of fear, and they were a tiny fraction of this size. I can&#8217;t imagine what this guy&#8217;s heart was doing!



]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve spent some time (kayaking or boogie boarding, not surfing) in waves big enough to really get the adrenaline pumping out of fear, and they were a tiny fraction of this size. I can&#8217;t imagine what this guy&#8217;s heart was doing!</p>
<p><object width="425" height="355">
<param name="movie" value="http://www.youtube.com/v/uvaJHeTg4Lg&#038;rel=1"></param>
<param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/uvaJHeTg4Lg&#038;rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://lojic.com/blog/2008/01/28/surfing-a-huge-wave/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Automatically Delete Unwanted Cookies in Firefox</title>
		<link>http://lojic.com/blog/2008/01/26/automatically-delete-unwanted-cookies-in-firefox/</link>
		<comments>http://lojic.com/blog/2008/01/26/automatically-delete-unwanted-cookies-in-firefox/#comments</comments>
		<pubDate>Sat, 26 Jan 2008 18:06:26 +0000</pubDate>
		<dc:creator>Brian Adkins</dc:creator>
		
		<category><![CDATA[internet]]></category>

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

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

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

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

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

		<guid isPermaLink="false">http://lojic.com/blog/2008/01/26/automatically-delete-unwanted-cookies-in-firefox/</guid>
		<description><![CDATA[I prefer to not have cookies stored in my browser, but it&#8217;s impractical to not store any cookies since this would require repeatedly logging in to authenticated sites that I frequently use. A simple solution in Firefox is the following:
From the Edit menu, choose Preferences and then click the Privacy tab. You should see a [...]]]></description>
			<content:encoded><![CDATA[<p>I prefer to not have cookies stored in my browser, but it&#8217;s impractical to not store any cookies since this would require repeatedly logging in to authenticated sites that I frequently use. A simple solution in Firefox is the following:</p>
<p>From the <span style="text-decoration: underline;">E</span>dit menu, choose <span style="text-decoration: underline;">P</span>references and then click the Privacy tab. You should see a dialog similar to the following one:</p>
<p><img src='http://lojic.com/blog/wp-content/uploads/2008/01/firefox1.png' alt='firefox1.png' /></p>
<p>Check the &#8220;Accept cookies from sites&#8221; checkbox. For the &#8220;Keep until&#8221; setting, select &#8220;I close Firefox&#8221;. The latter is the key - it will erase all cookies from Firefox whenever you close the program. Of course, we don&#8217;t want to erase <em>all</em> the cookies, so click the &#8220;Exceptions&#8230;&#8221; button on the right and you&#8217;ll see a dialog similar to the following:</p>
<p><img src='http://lojic.com/blog/wp-content/uploads/2008/01/firefox2.png' alt='firefox2.png' /></p>
<p>Just type the name of the web site you want to allow in the text box and click the &#8220;Allow&#8221; button, and Firefox will add it to the exception list so it won&#8217;t be deleted when you close Firefox. You can add a full URL such as www.MySite.com, or just the domain name MySite.com to allow cookies for any host in that domain. You an also add sites you want to disallow any cookies from by clicking the &#8220;Block&#8221; button.</p>
<p>I have about 30 sites that I allow Firefox to store cookies for, but this technique has helped me avoid accumulating tons of unwanted cookies in Firefox. I hope it&#8217;s helpful for you.</p>
]]></content:encoded>
			<wfw:commentRss>http://lojic.com/blog/2008/01/26/automatically-delete-unwanted-cookies-in-firefox/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Dolphin Bubble Rings</title>
		<link>http://lojic.com/blog/2008/01/22/dolphin-bubble-rings/</link>
		<comments>http://lojic.com/blog/2008/01/22/dolphin-bubble-rings/#comments</comments>
		<pubDate>Tue, 22 Jan 2008 14:25:13 +0000</pubDate>
		<dc:creator>Brian Adkins</dc:creator>
		
		<category><![CDATA[nature]]></category>

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

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

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

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

		<guid isPermaLink="false">http://lojic.com/blog/2008/01/22/dolphin-bubble-rings/</guid>
		<description><![CDATA[My uncle passed on a link he received from my cousin to an amazing video showing dolphins cleverly making sophisticated bubble rings and manipulating them in interesting ways:



]]></description>
			<content:encoded><![CDATA[<p>My uncle passed on a link he received from my cousin to an amazing video showing dolphins cleverly making sophisticated bubble rings and manipulating them in interesting ways:</p>
<p><object width="425" height="355">
<param name="movie" value="http://www.youtube.com/v/TMCf7SNUb-Q&#038;rel=1"></param>
<param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/TMCf7SNUb-Q&#038;rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://lojic.com/blog/2008/01/22/dolphin-bubble-rings/feed/</wfw:commentRss>
		</item>
		<item>
		<title>2008 Programming Language Plan</title>
		<link>http://lojic.com/blog/2008/01/17/2008-programming-language-plan/</link>
		<comments>http://lojic.com/blog/2008/01/17/2008-programming-language-plan/#comments</comments>
		<pubDate>Thu, 17 Jan 2008 22:12:17 +0000</pubDate>
		<dc:creator>Brian Adkins</dc:creator>
		
		<category><![CDATA[haskell]]></category>

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

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

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

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

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

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

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

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

		<guid isPermaLink="false">http://lojic.com/blog/2008/01/17/2008-programming-language-plan/</guid>
		<description><![CDATA[I&#8217;ve learned a number of programming languages since I began programming 25 years ago. Earlier in my career, my choice of which programming language to learn was largely driven by external factors such as a class or job requirement, or the expectation of job demand in the future.
More recently I&#8217;ve enjoyed learning new programming languages [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve learned a number of programming languages since I began programming 25 years ago. Earlier in my career, my choice of which programming language to learn was largely driven by external factors such as a class or job requirement, or the expectation of job demand in the future.</p>
<p>More recently I&#8217;ve enjoyed learning new programming languages both for the joy of learning something new, and for an increase in productivity. </p>
<p>While it&#8217;s true that no programming language is a <em><a href="http://en.wikipedia.org/wiki/No_Silver_Bullet">silver bullet</a></em>, I&#8217;ve found that the choice of programming language can provide a dramatic increase in productivity - much more so than many have asserted. The benefit can be direct, by allowing the creation of a solution to a particular problem with less time and effort than it would take using another language, or it can be an indirect by providing new ways to think about a solution. </p>
<p>Do you think language affects how we think?</p>
<p><strong>The Past</strong></p>
<p>In 1982, I spotted a Radio Shack Color Computer in a store window and immediately applied for a Radio Shack credit card which had a credit limit ($500) sufficient to purchase the computer which had 4K of RAM (I later upgraded to 16K) and no external storage (unless you count the ability to hook up a cassette recorder). Contrast the 16K RAM of that early machine with my current 2,097,152K RAM <img src='http://lojic.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>That was the beginning of a life long interest in programming.</p>
<p>In the language list below, bold indicates a more significant professional involvement, and the year indicates when I first learned the language. I&#8217;ve also likely forgotten a few:</p>
<ol>
<li>1982 - Radio Shack Extended Color BASIC</li>
<li>1983 - 6809e Assembler</li>
<li>1983 - Pascal</li>
<li>1984 - HP 48SX RPL</li>
<li><strong>1984 - S/360 Assembler</strong></li>
<li>1985 - COBOL</li>
<li>1985 - dBase III / Metafile</li>
<li><strong>1985 - C</strong></li>
<li><strong>1985 - 8088/8086 Assembler</strong></li>
<li><strong>1986 - C++</strong></li>
<li><strong>1996 - Java</strong></li>
<li>1997 - Perl</li>
<li><strong>2002 - C#</strong></li>
<li>2004 - Python</li>
<li><strong>2005 - JavaScript</strong></li>
<li><strong>2006 - Ruby</strong></li>
<li>2007 - PHP</li>
</ol>
<p><strong>The Present</strong></p>
<p>Currently, I program primarily in Ruby, followed by JavaScript and the occasional PHP script. Ruby is the most productive programming language I&#8217;ve used thus far. The combination of power, pragmatism &#038; pleasure in programming is hard to beat. If it also had performance, it would be a truly great language.</p>
<p>I&#8217;ve also begun <a href="http://lojic.com/blog/2008/01/05/learning-logo-part-one/">learning Logo</a> as I teach my daughter how to program. Logo is a great introduction to the Lisp family, so I hope to leverage it as I learn Scheme and Common Lisp later this year.</p>
<p><strong>The Future</strong></p>
<p>After completing the Logo course with my daughter, I plan on moving on to Scheme as I go through <a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&#038;location=http%3A%2F%2Fwww.amazon.com%2FStructure-Interpretation-Computer-Programs-Engineering%2Fdp%2F0262510871%3Fie%3DUTF8%26s%3Dbooks%26qid%3D1200604826%26sr%3D8-2&#038;tag=lojiccom-20&#038;linkCode=ur2&#038;camp=1789&#038;creative=9325">Structure and Interpretation of Computer Programs</a> which some have called the greatest computer science text ever written.</p>
<p>After Scheme I plan on learning Common Lisp which has the <em>potential</em> to replace Ruby as my primary programming language.</p>
<p>Beyond Logo/Scheme/Common Lisp, the following languages are of interest:</p>
<ul>
<li>Haskell</li>
<li>Erlang</li>
<li>Lua</li>
<li>ML</li>
<li>OCaml</li>
</ul>
<p>If you know of candidates for a future programming language, feel free to add it in a comment. </p>
<p>You may notice that Smalltalk is lacking from the lists above. Despite its prominence in programming language history, I currently don&#8217;t feel that Smalltalk is sufficiently better/different than Ruby to warrant an investment in learning it. </p>
<p>After focusing on <em>object oriented</em> for twenty years, I have more of an interest in the <em>functional</em> world of programming languages (and multiple dispatch is cool <img src='http://lojic.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ).</p>
<p><strong>Update:</strong> I was just over at <a href="http://news.ycombinator.com">Hacker News</a> and saw something I&#8217;ve seen many times before. In a nutshell, some guy was stating that Paul Graham&#8217;s success with ViaWeb had little to do with his choice of programming language (Lisp) and more to do with him just being a good hacker. In other words, he could&#8217;ve written it in any language. I&#8217;m so glad Paul responded because his response confirms my thoughts on the matter:</p>
<blockquote><p>
What a weird situation. I keep trying to tell people Lisp is great, and they say, no, no, you guys were just really good programmers. But if I&#8217;m such a good programmer, why don&#8217;t they believe me?
</p></blockquote>
<p>Paul Graham has written <strong>a lot</strong> on Lisp and is one of the main factors in me becoming interested in Lisp (along with the fact that Ruby pulled a lot of good ideas from it), but the simple quote above communicates volumes IMO.</p>
]]></content:encoded>
			<wfw:commentRss>http://lojic.com/blog/2008/01/17/2008-programming-language-plan/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Beware of LEGO Mindstorms NXT on Mac OSX</title>
		<link>http://lojic.com/blog/2008/01/08/beware-of-lego-mindstorms-nxt-on-mac-osx/</link>
		<comments>http://lojic.com/blog/2008/01/08/beware-of-lego-mindstorms-nxt-on-mac-osx/#comments</comments>
		<pubDate>Tue, 08 Jan 2008 23:19:58 +0000</pubDate>
		<dc:creator>Brian Adkins</dc:creator>
		
		<category><![CDATA[technology]]></category>

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

		<guid isPermaLink="false">http://lojic.com/blog/2008/01/08/beware-of-lego-mindstorms-nxt-on-mac-osx/</guid>
		<description><![CDATA[I recently installed the software that came with a LEGO Mindstorms NXT kit onto a Mac Mini running OSX 10.4. I was somewhat concerned when the install program prompted me for an admin password, so I attempted to install the software into a directory in my home directory instead of the main Applications directory, but [...]]]></description>
			<content:encoded><![CDATA[<p>I recently installed the software that came with a LEGO Mindstorms NXT kit onto a Mac Mini running OSX 10.4. I was somewhat concerned when the install program prompted me for an admin password, so I attempted to install the software into a directory in my home directory instead of the main Applications directory, but it still prompted for an admin password. Since LEGO is a large reputable company, I gave them the benefit of the doubt and figured the admin password may have been necessary to install Bluetooth drivers or some other feature. I should&#8217;ve learned a lesson from the Sony root kit debacle with respect to blindly trusting large corporations. In the Sony case, maliciousness was involved, in the LEGO Mindstorms case, I think only incompetence is to blame.</p>
<p>After installing the LEGO Mindstorms NXT software, I noticed that the OSX Activity Monitor failed to start which was puzzling. I also noticed that my Missing Sync program (used to synchronize data on my Treo 650 with the Mac) was failing as well - probably related to Bluetooth misconfiguration. I discovered later that, independently of the software issue, the LEGO Mindstorms  NXT kit was malfunctioning (some attachments worked, but the motors couldn&#8217;t be activated), so we sent it back for an exchange.</p>
<p>I thought that uninstalling the LEGO Mindstorms NXT software might return my Mac OSX system to normal, so I found the uninstall shell script in the Applications directory. With many OSX applications, it&#8217;s sufficient to simply delete the directory associated with the particular application from the Applications directory, but since Bluetooth drivers (and possibly other stuff) was installed, I figured the uninstall script would remove anything that was installed. I viewed the contents of the script briefly, but I was in a particular hurry at the time, so I double-clicked the icon for the uninstall script before I thoroughly reviewed it. It took longer to execute than I expected, and to my great dismay I shortly discovered why.</p>
<p><strong>The LEGO Mindstorms NXT uninstall script removed the entire Applications directory from my Mac OSX system!</strong></p>
<p>I&#8217;ve contacted technical support at LEGO Mindstorms mainly to try and determine how this happened. One of the reps did admit that this has happened before. I&#8217;m not sure what they could do to resolve this to my satisfaction other than pay me for the time I&#8217;ve lost in trying to get the Mac back to normal. I&#8217;ve been able to get the bundled applications reinstalled with some effort, but I still have a fair amount of work to do to reinstall many open source apps.</p>
<p>If LEGO Mindstorms comes up with a creative solution to resolve this to my satisfaction, I&#8217;ll be elated to post an update, but I expect that to be unlikely to say the least. Hopefully this blog post can save at least one person from losing an entire day to a similar problem.</p>
<p>When the replacement LEGO Mindstorms NXT kit arrives I&#8217;m either going to install the software on an old Windows PC, or create a new virtual machine for that purpose, but I don&#8217;t think I can trust LEGO Mindstorms enough to install it on an important computer at this point. Regardless, I&#8217;m going to be much more careful (paranoid?) when installing software that requires root access in the future.</p>
<p><strong>Update 1/18/2008:</strong> It&#8217;s been ten days since I originally called LEGO Mindstorms NXT technical support, and I haven&#8217;t received a call from a supervisor or level 2 person as was promised. I just called them again and talked to the same person who opened the ticket originally. He still refuses to allow me to talk with his supervisor (actually, he states he doesn&#8217;t have a supervisor, and that level 2 is his &#8220;supervisor&#8221;) and simply repeats the same mantra about how my issue has &#8220;been escalated several levels&#8221;. I can&#8217;t recall a tech support experience that has been quite this bad.</p>
<p><strong>Update 1/18/2008 13:00:</strong> I just received the following email response a few minutes ago (probably because I communicated the situation to LEGO corporate headquarters).</p>
<blockquote><p>
Hello,</p>
<p>Your issue has been escalated to the developers in Denmark.<br />
They will get back to you, but we have no control over when that will happen.</p>
<p>In the meantime the only solutions we can offer to you are to repair user permissions and to do an archive reinstall of your Operating System.
</p></blockquote>
<p><strong>Update 1/24/2008 14:10:</strong> Just spoke with David C. from LEGO Mindstorms NXT QA (he was referred to me by a LEGO consumer specialist I had spoken to a couple days ago), and he explained the situation to me. This was a known issue (deleting all your apps on Mac OSX) that has apparently been fixed in the current release of the software. He apologized and will send me a free LEGO Mindstorms NXT kit. It doesn&#8217;t match the monetary loss in time, but it&#8217;s a nice gesture and I appreciate it. I expect it&#8217;s more than many companies would do to remedy the situation.</p>
<p>As to the communication issues with the first line technical support, out of respect for David I won&#8217;t go into detail, but suffice it to say that they are aware of issues with their front line support and are endeavoring to correct them.</p>
]]></content:encoded>
			<wfw:commentRss>http://lojic.com/blog/2008/01/08/beware-of-lego-mindstorms-nxt-on-mac-osx/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Learning Logo - Part One</title>
		<link>http://lojic.com/blog/2008/01/05/learning-logo-part-one/</link>
		<comments>http://lojic.com/blog/2008/01/05/learning-logo-part-one/#comments</comments>
		<pubDate>Sat, 05 Jan 2008 21:37:01 +0000</pubDate>
		<dc:creator>Brian Adkins</dc:creator>
		
		<category><![CDATA[logo]]></category>

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

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

		<guid isPermaLink="false">http://lojic.com/blog/2008/01/05/learning-logo-part-one/</guid>
		<description><![CDATA[I decided last spring that it was a good time to begin teaching my eldest daughter how to program. She was eleven at the time and had demonstrated both interest and aptitude. So after researching various programming languages, I chose to use the Logo programming language - specifically, Berkeley Logo.
There are many good programming languages [...]]]></description>
			<content:encoded><![CDATA[<p>I decided last spring that it was a good time to begin teaching my eldest daughter how to program. She was eleven at the time and had demonstrated both interest and aptitude. So after researching various programming languages, I chose to use the Logo programming language - specifically, Berkeley Logo.</p>
<p>There are many good programming languages to choose from to teach children how to program depending on their abilities and interests, but I felt the benefits of Logo gave it the edge. It has much of the power of the Lisp family of languages but with a simpler syntax. The syntax is very uniform which saves children from having to learn too many inconsistent oddities of other languages (including my current favorite, Ruby). I had a preconceived idea that Logo was primarily about turtle graphics, so I was quite surprised when I dug a little deeper and found a very expressive language built on a solid foundation. Having said that, I think the availability of turtle graphics in Berkeley Logo is a big plus for allowing visual feedback for children.</p>
<p>In August, I wrote a <a href="http://lojic.com/blog/2007/08/31/logo-ruby-javascript/">blog post</a> comparing a short function (from Brian Harvey&#8217;s home page) in Logo and several other languages. Several people added other versions in the comments. It may give you a glimpse of the conciseness and expressiveness of Logo.</p>
<p>In deciding on a programming language, I purposely ignored IDEs. In fact, I&#8217;ve discovered that more powerful languages are much less dependent on the availability of good IDEs. For example, when I switched from Java to Ruby, I didn&#8217;t miss Eclipse at all, and I&#8217;m much more productive with Ruby and a good text editor than I was with Eclipse and Java. On the other hand, I&#8217;ve heard some glowing testimonial from Smalltalk and Lisp IDE users, so I expect I&#8217;ll be experimenting with Lisp IDEs in the future.</p>
<p><strong>Getting Started</strong></p>
<p>Many thanks to <a href="http://www.cs.berkeley.edu/~bh/">Brian Harvey</a> of UC Berkeley both for UCBLogo (along with other contributors) and for making excellent teaching materials freely available.</p>
<p>On Ubuntu Linux, simply install the ucblogo package. This will also install a PDF reference manual for Berkeley Logo which I recommend becoming familiar with.</p>
<p>You can also find links for other platforms on <a href="http://www.cs.berkeley.edu/~bh/">Brian Harvey&#8217;s home page</a>. </p>
<p>Here are links to the free text books:<br />
<a href="http://www.cs.berkeley.edu/~bh/v1-toc2.html">Computer Science Logo Style Volume 1: Symbolic Computing</a><br />
<a href="http://www.cs.berkeley.edu/~bh/v2-toc2.html">Computer Science Logo Style Volume 2: Advanced Techniques</a><br />
<a href="http://www.cs.berkeley.edu/~bh/v3-toc2.html">Computer Science Logo Style Volume 3: Beyond Programming</a></p>
<p>There is also a comp.lang.logo usenet group. You can access that via an nntp reader, or via Google below:<br />
http://groups.google.com/group/comp.lang.logo/topics?hl=en</p>
<p><strong>Methodology</strong></p>
<p>My teaching methodology thus far has simply been to have my daughter read a chapter, and then complete a short assignment of questions and programming exercises that I&#8217;ve designed to ensure she&#8217;s mastered the important concepts in the chapter. I&#8217;ll spend some time with her explaining the solutions to problems she may have missed.</p>
<p>If there&#8217;s interest, I can provide the complete set of chapter assignments including questions &#038; answers and programming problems &#038; solutions once we&#8217;ve completed volume 1. Feel free to leave a comment, if you&#8217;d like a copy.</p>
<p><strong>Some Quotes</strong></p>
<p>Here are some quotes from the preface of &#8220;Computer Science Logo Style vol 1&#8243; to <em>whet your appetite</em> <img src='http://lojic.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<blockquote><p>
The truth is that Logo is one of the most powerful programming languages available for home computers.
</p></blockquote>
<blockquote><p>
In Logo there is only one syntax, the one that invokes a procedure.
</p></blockquote>
<blockquote><p>
More powerful languages are based on some particular mathematical model of computing and use that model in a consistent way. For example, APL is based on the idea of matrix manipulation; Proglog is based on predicate calculus, a form of mathematical logic. Logo, like Lisp, is based on the idea of composition of functions.
</p></blockquote>
<p><strong>Conclusion</strong></p>
<p>I highly recommend learning Logo whether you&#8217;re teaching your children to program or you simply want to learn another programming language. I&#8217;ve found both to be beneficial to my professional programming career. The Berkeley version of Logo is very powerful and has the following special features (from the intro to the UCBLogo reference manual):</p>
<ul>
<li>Source file compatible among Unix, Windows &#038; Mac</li>
<li>Random-access arrays</li>
<li>Variable number of inputs to user-defined procedures</li>
<li>Mutators for list structure</li>
<li>First-class instruction and expression templates</li>
<li>Macros</li>
</ul>
<p>I&#8217;ve entitled this <em>Part One</em> because I intend to follow up with some more posts as we become more familiar with the language.</p>
<p>We&#8217;ve also been dabbling in some simple robotics projects. I would love to find a robotics controller, or kit, that allows programming in Logo - if anyone knows of such a thing, please let me know.</p>
<p>Happy programming <img src='http://lojic.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://lojic.com/blog/2008/01/05/learning-logo-part-one/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Name Guessing in Ruby</title>
		<link>http://lojic.com/blog/2007/12/20/name-guessing-in-ruby/</link>
		<comments>http://lojic.com/blog/2007/12/20/name-guessing-in-ruby/#comments</comments>
		<pubDate>Fri, 21 Dec 2007 02:04:11 +0000</pubDate>
		<dc:creator>Brian Adkins</dc:creator>
		
		<category><![CDATA[programming]]></category>

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

		<guid isPermaLink="false">http://lojic.com/blog/2007/12/20/name-guessing-in-ruby/</guid>
		<description><![CDATA[I came across a web site recently that prompted me to enter two names before I could view the site. So I wondered how difficult it would be to write a Ruby program that could pass the challenge. As you&#8217;d expect, it&#8217;s trivial in Ruby. If you encounter such a site, please don&#8217;t use the [...]]]></description>
			<content:encoded><![CDATA[<p>I came across a web site recently that prompted me to enter two names before I could view the site. So I wondered how difficult it would be to write a Ruby program that could pass the challenge. As you&#8217;d expect, it&#8217;s trivial in Ruby. If you encounter such a site, please don&#8217;t use the code in part two unless it&#8217;s permitted by the terms of service of the site in question.</p>
<p><strong>Part One - Obtain a file of names</strong></p>
<p>I found a government site that provided lists of the 1,000 most popular names for each decade, so I wrote a Ruby program to screen scrape the names into a list in order of popularity.</p>
<p>Make the open-uri library available.</p>
<pre style="background-color: #f8f8f8; font-weight: bold; line-height: 1.2em;">
require 'open-uri'
</pre>
<p>Create a simple Struct to contain the url for each decade along with an array for boy names and girl names (the site provides an ordered list for each gender). Then create an array of Decade instances for 80&#8217;s, 90&#8217;s and 00&#8217;s.</p>
<pre style="background-color: #f8f8f8; font-weight: bold; line-height: 1.3em;">
Decade = Struct.new(:url, :boy_names, :girl_names)
decades = [
  Decade.new('http://www.ssa.gov/OACT/babynames/decades/names1980s.html', [], []),
  Decade.new('http://www.ssa.gov/OACT/babynames/decades/names1990s.html', [], []),
  Decade.new('http://www.ssa.gov/OACT/babynames/decades/names2000s.html', [], [])
]
</pre>
<p>Iterate over each decade and screen scrape the list of boy names and girl names.</p>
<pre style="background-color: #f8f8f8; font-weight: bold; line-height: 1.3em;">
decades.each do |decade|
  str = open(decade.url).read
  str.scan(/&lt;tr&gt;&lt;td align="right"&gt;.*?&lt;td width="15%"&gt;(w+)&lt;/td&gt;.*?&lt;td width="15%"&gt;(w+)&lt;/td&gt;/m) do
    decade.boy_names &lt;&lt; $1
    decade.girl_names &lt;&lt; $2
  end
end
</pre>
<p>Now we have a pair of lists (boys &amp; girls) for each decade with each list in order of popularity - 6 lists in total. We want to form a single list by selecting the most popular name from each of the 6 lists, followed by the second most popular name, etc. The zip function comes to mind, so we&#8217;ll first create an array of the 6 lists.</p>
<pre style="background-color: #f8f8f8; font-weight: bold; line-height: 1.3em;">
name_lists = decades.inject([]) do |result, decade|
  result << decade.boy_names
  result << decade.girl_names
  result
end
</pre>
<p>Now we have a list containing 6 lists. Here is where the &#8220;everything is an object&#8221; aspect of ruby is a bit of a pain. What I want to do is simply zip the 6 lists together, for example:</p>
<pre style="background-color: #f8f8f8; font-weight: bold; line-height: 1.3em;">
x = zip(one, two, three, four, five, six)
</pre>
<p>but I&#8217;m forced to pick one of the lists to be the instance for the zip method, for example:</p>
<pre style="background-color: #f8f8f8; font-weight: bold; line-height: 1.3em;">
x = one.zip(two, three, four, five, six)
</pre>
<p>I suppose my dissatisfaction is due in part to my recent research in functional programming. </p>
<p>The line below will do the following (I <b>really</b> like Ruby <img src='http://lojic.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ):</p>
<ol>
<li>pop one of the lists off of the main list (leaving 5) to be the instance for zip</li>
<li>explode the list of 5 remaining lists into 5 individual arguments via the * operator</li>
<li>zip the 6 lists together</li>
<li>flatten the resulting list of lists produced by zip into one list</li>
<li>remove duplicate entries</li>
<li>write each name to standard output</li>
</ol>
<pre style="background-color: #f8f8f8; font-weight: bold; line-height: 1.3em;">
(name_lists.shift).zip(*name_lists).flatten.uniq.each {|name| puts name }
</pre>
<p>Run the program as follows to create a file named names.txt which will be used in part two.</p>
<pre style="background-color: #f8f8f8; font-weight: bold; line-height: 1.3em;">
ruby scrape_names.rb > names.txt
</pre>
<p><strong>Part Two - Brute force form submission</strong></p>
<p>Now that we have a list of over 2,000 names, it&#8217;s a simple matter of repeatedly trying pairs of names in order of popularity. Here&#8217;s the program in its entirety with comments following:</p>
<pre style="background-color: #f8f8f8; font-weight: bold; line-height: 1.3em;">
 1  require 'net/http'

 2  names = ARGF.inject([]) {|result, line| result << line.chomp; result } 

 3  Net::HTTP.start('www....com') do |query|
 4    headers = { 'Content-Type' => &#8216;application/x-www-form-urlencoded&#8217; }
 5    (1&#8230;names.length).each do |i|
 6      (0..i).each do |j|
 7        response = query.post(&#8217;/guess/&#8217;,
 8          &#8220;name1=#{names[i]}&#038;name2=#{names[j]}&#8221;, headers)
 9        if !response.body.include?(&#8217;Failed&#8217;)
10          puts &#8220;Answer: #{names[i]}, #{names[j]}&#8221;
11          exit
12        end
13      end
14    end
15  end
</pre>
<p>Line 1: makes the HTTP library accessible.</p>
<p>Line 2: reads a list of names from standard input into an array.</p>
<p>Line 3: opens a TCP connection to the specified web server (site withheld for privacy).</p>
<p>Line 4: through trial and error I discovered that contrary to the example in the Pick Axe p. 700, I need to add this header to get the form submission to work.</p>
<p>Lines 5-6: setup the iteration to compare each name (beginning with the second) with each of the previous names up to and including the current one (in case the answer is two identical names).</p>
<p>Lines 7-8: perform an HTTP post with the pair of names.</p>
<p>Lines 9-11: if the retrieved page doesn&#8217;t contain a failure string, print the solution to standard output and exit. </p>
<p>Run the program as follows:</p>
<pre style="background-color: #f8f8f8; font-weight: bold; line-height: 1.3em;">
ruby guess_names.rb < names.txt
</pre>
<p>There you have it - a pair of Ruby programs to pass a &#8220;guess two names to enter&#8221; challenge. The amount of time to find a solution will depend on the uncommonness of the names used. This is an O(n^2) algorithm, so if the names in the solution are near the bottom of the popularity scale, expect a <b>long</b> run time. The name list I produced had 2,697 names, so the worst case scenario is (2697 * 2698) /2 -1 = 3,638,252 requests. If only the first 100 names need to be compared there would be 5,049 requests.</p>
<p>This algorithm is trivial to parallelize - just change line 5 above from (1&#8230;names.length) to multiple non-overlapping ranges (one per process), and let her fly.</p>
<p>Ruby has many benefits and is currently my most productive programming language, but I think it particularly shines in this type of ad-hoc, web-enabled task because of the expressiveness of the language and the availability of useful libraries. I highly recommend putting it high on your list of languages to learn if you don&#8217;t already use it.</p>
]]></content:encoded>
			<wfw:commentRss>http://lojic.com/blog/2007/12/20/name-guessing-in-ruby/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Paul Graham on Procastination</title>
		<link>http://lojic.com/blog/2007/12/17/paul-graham-on-procastination/</link>
		<comments>http://lojic.com/blog/2007/12/17/paul-graham-on-procastination/#comments</comments>
		<pubDate>Tue, 18 Dec 2007 02:46:10 +0000</pubDate>
		<dc:creator>Brian Adkins</dc:creator>
		
		<category><![CDATA[productivity]]></category>

		<guid isPermaLink="false">http://lojic.com/blog/2007/12/17/paul-graham-on-procastination/</guid>
		<description><![CDATA[
The most impressive people I know are all terrible procrastinators. So could it be that procrastination isn&#8217;t always bad?
Most people who write about procrastination write about how to cure it. But this is, strictly speaking, impossible. There are an infinite number of things you could be doing. No matter what you work on, you&#8217;re not [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>
The most impressive people I know are all terrible procrastinators. So could it be that procrastination isn&#8217;t always bad?</p>
<p>Most people who write about procrastination write about how to cure it. But this is, strictly speaking, impossible. There are an infinite number of things you could be doing. No matter what you work on, you&#8217;re not working on everything else. So the question is not how to avoid procrastination, but how to procrastinate well.
</p></blockquote>
<p>It&#8217;s ironic that I read <a href="http://www.paulgraham.com/procrastination.html">this essay</a> while procastinating <img src='http://lojic.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> To read the rest, click the previous link.</p>
]]></content:encoded>
			<wfw:commentRss>http://lojic.com/blog/2007/12/17/paul-graham-on-procastination/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Bug Labs</title>
		<link>http://lojic.com/blog/2007/12/01/bug-labs/</link>
		<comments>http://lojic.com/blog/2007/12/01/bug-labs/#comments</comments>
		<pubDate>Sat, 01 Dec 2007 18:16:26 +0000</pubDate>
		<dc:creator>Brian Adkins</dc:creator>
		
		<category><![CDATA[video]]></category>

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

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

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

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

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

		<guid isPermaLink="false">http://lojic.com/blog/2007/12/01/bug-labs/</guid>
		<description><![CDATA[This is one of the coolest ideas I&#8217;ve seen in a while. Bug Labs is developing some technology that should be very interesting to any geek. Another great find by Robert Scoble. The video quality isn&#8217;t high because they were recorded on his cell phone, but I&#8217;m glad he had a video capable cell phone [...]]]></description>
			<content:encoded><![CDATA[<p>This is one of the coolest ideas I&#8217;ve seen in a while. <a href="http://www.buglabs.net/">Bug Labs</a> is developing some technology that should be very interesting to any geek. Another great find by <a href="http://scobleizer.com/2007/12/01/buglabsnets-really-cool-reconfigurable-gadget-in-depth/#comment-1587377">Robert Scoble</a>. The video quality isn&#8217;t high because they were recorded on his cell phone, but I&#8217;m glad he had a video capable cell phone with him when he bumped into Peter.</p>
<p><a href="http://video.google.com/googleplayer.swf?docId=-1932063822649530376&#038;hl=en">Part One</a><br />
<a href="http://video.google.com/googleplayer.swf?docId=-3090880151267528595&#038;hl=en">Part Two</a><br />
<a href="http://video.google.com/videoplay?docid=-3950989589304402454&#038;hl=en">Part Three</a></p>
<p><a href="http://www.buglabs.net/"><img src='http://lojic.com/blog/wp-content/uploads/2007/12/bug_lab.gif' alt='bug_lab.gif' /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://lojic.com/blog/2007/12/01/bug-labs/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Crayon Physics</title>
		<link>http://lojic.com/blog/2007/12/01/crayon-physics/</link>
		<comments>http://lojic.com/blog/2007/12/01/crayon-physics/#comments</comments>
		<pubDate>Sat, 01 Dec 2007 16:08:23 +0000</pubDate>
		<dc:creator>Brian Adkins</dc:creator>
		
		<category><![CDATA[video]]></category>

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

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

		<guid isPermaLink="false">http://lojic.com/blog/2007/12/01/crayon-physics/</guid>
		<description><![CDATA[I found this video of a &#8220;crayon physics&#8221; game on Robert Scoble&#8217;s site - very cool!



]]></description>
			<content:encoded><![CDATA[<p>I found this video of a &#8220;crayon physics&#8221; game on <a href="http://scobleizer.com/2007/12/01/i-might-become-a-tablet-pc-evangelist-again/">Robert Scoble&#8217;s site</a> - very cool!</p>
<p><object width="425" height="355">
<param name="movie" value="http://www.youtube.com/v/QsTqspnvAaI&#038;rel=0&#038;border=0"></param>
<param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/QsTqspnvAaI&#038;rel=0&#038;border=0" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://lojic.com/blog/2007/12/01/crayon-physics/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
