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

<channel>
	<title>Tao Effect Blog</title>
	<atom:link href="http://www.taoeffect.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.taoeffect.com/blog</link>
	<description>Notice the Tao Effects...</description>
	<lastBuildDate>Mon, 08 Mar 2010 07:47:08 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Most Important Film of the Decade Goes To&#8230;</title>
		<link>http://www.taoeffect.com/blog/2010/03/best-documentary-of-the-decade-goes-to/</link>
		<comments>http://www.taoeffect.com/blog/2010/03/best-documentary-of-the-decade-goes-to/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 07:42:47 +0000</pubDate>
		<dc:creator>Greg Slepak</dc:creator>
				<category><![CDATA[Thoughts]]></category>
		<category><![CDATA[documentary]]></category>
		<category><![CDATA[film]]></category>
		<category><![CDATA[greg]]></category>
		<category><![CDATA[review]]></category>

		<guid isPermaLink="false">http://www.taoeffect.com/blog/?p=1920</guid>
		<description><![CDATA[What this film does in 104 minutes is simply magical.
The Union: The Business Behind Getting High
And you can watch it, right now, for free on Google Video.
]]></description>
			<content:encoded><![CDATA[<p>What this film does in 104 minutes is simply magical.</p>
<p><b>The Union: The Business Behind Getting High</b></p>
<p><i>And you can watch it, right now, <a href="http://video.google.com/videoplay?docid=-9077214414651731007">for free on Google Video</a>.</i></p>
]]></content:encoded>
			<wfw:commentRss>http://www.taoeffect.com/blog/2010/03/best-documentary-of-the-decade-goes-to/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Espionage 2.6 + New Video</title>
		<link>http://www.taoeffect.com/blog/2010/02/espionage-2-6-released/</link>
		<comments>http://www.taoeffect.com/blog/2010/02/espionage-2-6-released/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 17:59:47 +0000</pubDate>
		<dc:creator>Greg Slepak</dc:creator>
				<category><![CDATA[Espionage]]></category>
		<category><![CDATA[greg]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://www.taoeffect.com/blog/?p=1881</guid>
		<description><![CDATA[Espionage 2.6 has arrived, and here&#8217;s the full list of changes:

NEW: Redesigned and improved password prompts
NEW: &#8220;Lock Folder&#8221; contextual item is back for 10.6 (*Only visible after restart!*)
NEW: Daylite application template
NEW: Added Rocketbox support to Mail application template
IMPROVED: Behavior when registering with improperly named license
IMPROVED: Relationship with the TEDiagnosticTool
IMPROVED: Added informative dialog for Dropbox
IMPROVED: Improved [...]]]></description>
			<content:encoded><![CDATA[<p>Espionage 2.6 has arrived, and here&#8217;s the full list of changes:</p>
<ul class="box" style="height: 210px; overflow: auto;">
<li><b>NEW:</b> Redesigned and improved password prompts</li>
<li><b>NEW:</b> &#8220;Lock Folder&#8221; contextual item is back for 10.6 <b>(*Only visible after restart!*)</b></li>
<li><b>NEW:</b> Daylite application template</li>
<li><b>NEW:</b> Added Rocketbox support to Mail application template</li>
<li><b>IMPROVED:</b> Behavior when registering with improperly named license</li>
<li><b>IMPROVED:</b> Relationship with the TEDiagnosticTool</li>
<li><b>IMPROVED:</b> Added informative dialog for Dropbox</li>
<li><b>IMPROVED:</b> Improved documentation on restoration from recovered disk images</li>
<li><b>IMPROVED:</b> Clarity in how to restore from backups</li>
<li><b>IMPROVED:</b> Reordered folder verification code to check for applications first</li>
<li><b>IMPROVED:</b> The informative alert upon first encryption</li>
<li><b>IMPROVED:</b> Added an additional check to prevent encryption of folders within folders</li>
<li><b>CHANGED:</b> Default Minimum Image Capacity (MIC) to 10GB</li>
<li><b>FIXED:</b> Incorrect backup interval for hourly backup times</li>
<li><b>FIXED:</b> Hang that could occur during uninstallation if folders or disk images were missing</li>
<li><b>IMPROVED (2.6.1):</b> Updated RBSplitView to 1.2</li>
<li><b>IMPROVED (2.6.1):</b> Updated BWToolkit to 1.2.5</li>
<li><b>FIXED (2.6.1):</b> Issue where LCC version could be incorrectly detected preventing Espionage from running</li>
</ul>
<h4>Overview of Significant Changes</h4>
<p><b>Smarter Prompts</b></p>
<p><center><img src="http://www.taoeffect.com/blog/wp-content/uploads/2010/02/new_prompt.png"  title="Smarter Password Prompt" /></center></p>
<p>The new prompts are sleeker and have a timer on them to auto-deny the request after 60 seconds. Through the new action popup list it should now also be much clearer how an application can be added to the ignore list from the prompt itself.</p>
<p><b>Return of the Contextual Menu Item!</b></p>
<p>The &#8220;Lock&#8221; contextual menu is back in 10.6! It&#8217;s now called &#8220;Lock Folder&#8221; and rests directly in the root of the contextual menu:</p>
<p><center><img src="http://www.taoeffect.com/blog/wp-content/uploads/2010/02/contextual_menu_item.png" alt="" title="Contextual Menu Item in 10.6" width="338" height="480" class="alignnone size-full wp-image-1886" /></center></p>
<p>After updating to Espionage 2.6, <i>you must restart your computer before it appears on unlocked encrypted folders.</i> Currently, this item will not appear on unlocked non-encrypted folders, though this may change in the future.</p>
<h4>TrialPay &#8211; Get Espionage Free!</h4>
<p>We&#8217;ve added TrialPay as a payment option to our <a href="https://www.taoeffect.com/espionage/order/">new order page</a>, which means you can get Espionage <i>free</i> by completing an affiliate offer.</p>
<h4>New Screencast!</h4>
<p>There&#8217;s a brand new awesome screencast on the homepage&#8230; <a href="/espionage/">check it out!</a> <img src='http://www.taoeffect.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.taoeffect.com/blog/2010/02/espionage-2-6-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Easy Cocoa Setup Assistants with TESetupAssistant</title>
		<link>http://www.taoeffect.com/blog/2010/01/easy-cocoa-setup-assistants-with-tesetupassistant/</link>
		<comments>http://www.taoeffect.com/blog/2010/01/easy-cocoa-setup-assistants-with-tesetupassistant/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 02:25:59 +0000</pubDate>
		<dc:creator>Greg Slepak</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Free Stuff]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[greg]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://www.taoeffect.com/blog/?p=1766</guid>
		<description><![CDATA[Setup assistants can be a great tool when you need to guide users through a series of steps.
TESetupAssistant was born during my work on the 2.0 update to Espionage, when I discovered that many of its UI elements could stand to benefit from a generic setup assistant class.
The gallery below shows some of the places [...]]]></description>
			<content:encoded><![CDATA[<p>Setup assistants can be a great tool when you need to guide users through a series of steps.</p>
<p><b>TESetupAssistant</b> was born during my work on the <a href="/blog/2009/02/espionage-20-released/">2.0 update</a> to <a href="/espionage">Espionage</a>, when I discovered that many of its UI elements could stand to benefit from a generic setup assistant class.</p>
<p>The gallery below shows some of the places in Espionage where we use TESetupAssisant, illustrating its versatility:</p>
<div class="imageGallery" style="background-color:black">
<ul style="width:500px">
<li><a rel="imageGallery" href="http://www.taoeffect.com/blog/wp-content/uploads/2010/01/keychain.png" title="Switching keychains"><img style="margin-top:20px" src="http://www.taoeffect.com/blog/wp-content/uploads/2010/01/keychain_thumb.png"/></a></li>
<li><a rel="imageGallery" title="Encrypting application data" href="http://www.taoeffect.com/blog/wp-content/uploads/2010/01/apptemplates.png"><img src="http://www.taoeffect.com/blog/wp-content/uploads/2010/01/apptemplates_thumb.png" /></a></li>
<li class="right"><a rel="imageGallery" title="Installing Espionage itself" href="http://www.taoeffect.com/blog/wp-content/uploads/2010/01/install.png"><img style="margin-top:25px" src="http://www.taoeffect.com/blog/wp-content/uploads/2010/01/install_thumb.png" /></a></li>
</ul>
<div class="clear"></div>
</div>
<p>You can create these sorts of UIs very quickly and use them wherever the user needs to complete a series of steps, or even a single step (as shown in the first image above). Here&#8217;s a basic overview of it:</p>
<p><center><img src="http://www.taoeffect.com/blog/wp-content/uploads/2010/01/TESetupAssistant.png" /></center></p>
<p>There are two main classes: <B>TESetupAssistant</b> and <B>TEBaseAssistant</b>. TESetupAssistant is associated with a nib file that determines the overall layout. It manages a one or more assistants, each of which inherit from TEBaseAssistant. Each TEBaseAssistant subclass has its own nib file, usually just containing a single NSView container object.</p>
<h3>Example of a Modal Assistant</h3>
<p>Here&#8217;s an example of a very simple assistant using the minified UI and running modally:</p>
<p><center><img src="http://www.taoeffect.com/blog/wp-content/uploads/2010/01/simple_assistant.png"/></center></p>
<p>And here is all the code needed to create it:</p>
<pre class="code">
<span class="source source_objc"><span class="meta meta_preprocessor meta_preprocessor_c meta_preprocessor_c_include">#<span class="keyword keyword_control keyword_control_import keyword_control_import_include keyword_control_import_include_c">import</span> <span class="string string_quoted string_quoted_other string_quoted_other_lt-gt string_quoted_other_lt-gt_include string_quoted_other_lt-gt_include_c"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_c">&lt;</span>Cocoa/Cocoa.h<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_c">&gt;</span></span></span>
<span class="meta meta_preprocessor meta_preprocessor_c meta_preprocessor_c_include">#<span class="keyword keyword_control keyword_control_import keyword_control_import_include keyword_control_import_include_c">import</span> <span class="string string_quoted string_quoted_double string_quoted_double_include string_quoted_double_include_c"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_c">"</span>TESetupAssistant.h<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_c">"</span></span></span>

<span class="meta meta_interface-or-protocol meta_interface-or-protocol_objc"><span class="storage storage_type storage_type_objc"><span class="punctuation punctuation_definition punctuation_definition_storage punctuation_definition_storage_type punctuation_definition_storage_type_objc">@</span>interface</span> <span class="entity entity_name entity_name_type entity_name_type_objc">MiniAssistant</span> <span class="punctuation punctuation_definition punctuation_definition_entity punctuation_definition_entity_other punctuation_definition_entity_other_inherited-class punctuation_definition_entity_other_inherited-class_objc">:</span> <span class="entity entity_other entity_other_inherited-class entity_other_inherited-class_objc">TEBaseAssistant</span><span class="meta meta_divider meta_divider_objc"> </span><span class="meta meta_scope meta_scope_interface meta_scope_interface_objc">{
    <span class="storage storage_type storage_type_objc">IBOutlet</span> <span class="support support_class support_class_cocoa">NSTextField</span> *textField;
}
</span><span class="storage storage_type storage_type_objc"><span class="punctuation punctuation_definition punctuation_definition_storage punctuation_definition_storage_type punctuation_definition_storage_type_objc">@</span>end</span></span>

<span class="meta meta_implementation meta_implementation_objc"><span class="storage storage_type storage_type_objc"><span class="punctuation punctuation_definition punctuation_definition_storage punctuation_definition_storage_type punctuation_definition_storage_type_objc">@</span>implementation</span> <span class="entity entity_name entity_name_type entity_name_type_objc">MiniAssistant</span>
<span class="meta meta_scope meta_scope_implementation meta_scope_implementation_objc"><span class="meta meta_function meta_function_objc">- <span class="meta meta_return-type meta_return-type_objc"><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="support support_class support_class_cocoa">NSArray</span> *<span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="entity entity_name entity_name_function entity_name_function_objc">orderedSteps</span></span>
</span>{
    <span class="keyword keyword_control keyword_control_c">return</span> <span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_begin punctuation_section_scope_begin_objc">[</span><span class="support support_class support_class_cocoa">NSArray</span> <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">arrayWithObject<span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span><span class="string string_quoted string_quoted_double string_quoted_double_objc"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_objc">@"</span>Mini Step<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_objc">"</span></span></span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_end punctuation_section_scope_end_objc">]</span></span>;
}
<span class="meta meta_function meta_function_objc">- <span class="meta meta_return-type meta_return-type_objc"><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_c">void</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="entity entity_name entity_name_function entity_name_function_objc">start</span></span>
</span>{
    <span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_begin punctuation_section_scope_begin_objc">[</span><span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_begin punctuation_section_scope_begin_objc">[</span>controller <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">nextButton</span></span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_end punctuation_section_scope_end_objc">]</span></span> <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">setTitle<span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span><span class="string string_quoted string_quoted_double string_quoted_double_objc"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_objc">@"</span>Finish<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_objc">"</span></span></span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_end punctuation_section_scope_end_objc">]</span></span>;
    <span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_begin punctuation_section_scope_begin_objc">[</span>textField <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">setStringValue<span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span>NSSTR_FMT(
        <span class="string string_quoted string_quoted_double string_quoted_double_c"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_c">"</span>Hi there! I'm a mini-assistant <span class="constant constant_other constant_other_placeholder constant_other_placeholder_c">%s</span>running modally!<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_c">"</span></span>,
        <span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_begin punctuation_section_scope_begin_objc">[</span>controller <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">modal</span></span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_end punctuation_section_scope_end_objc">]</span></span> ? <span class="string string_quoted string_quoted_double string_quoted_double_c"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_c">"</span><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_c">"</span></span> : <span class="string string_quoted string_quoted_double string_quoted_double_c"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_c">"</span>not <span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_c">"</span></span>)
    </span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_end punctuation_section_scope_end_objc">]</span></span>;
}
</span><span class="storage storage_type storage_type_objc"><span class="punctuation punctuation_definition punctuation_definition_storage punctuation_definition_storage_type punctuation_definition_storage_type_objc">@</span>end</span></span>

<span class="comment comment_line comment_line_double-slash comment_line_double-slash_c++"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_c">//</span> To run it modally is just 4 lines of code (somewhere):
</span>
TESetupAssistant *sa = <span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_begin punctuation_section_scope_begin_objc">[</span><span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_begin punctuation_section_scope_begin_objc">[</span><span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_begin punctuation_section_scope_begin_objc">[</span>TESetupAssistant <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">alloc</span></span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_end punctuation_section_scope_end_objc">]</span></span> <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">initMini</span></span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_end punctuation_section_scope_end_objc">]</span></span> <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">autorelease</span></span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_end punctuation_section_scope_end_objc">]</span></span>;
<span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_begin punctuation_section_scope_begin_objc">[</span>sa <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">setModal<span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span><span class="constant constant_language constant_language_objc">YES</span></span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_end punctuation_section_scope_end_objc">]</span></span>;
<span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_begin punctuation_section_scope_begin_objc">[</span>sa <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">addAssistant<span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span><span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_begin punctuation_section_scope_begin_objc">[</span>MiniAssistant <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">assistant</span></span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_end punctuation_section_scope_end_objc">]</span></span></span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_end punctuation_section_scope_end_objc">]</span></span>;
<span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_begin punctuation_section_scope_begin_objc">[</span>sa <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">run</span></span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_end punctuation_section_scope_end_objc">]</span></span>;</span>
</pre>
<p>Notice that we don&#8217;t even need to load the nib file. That&#8217;s because our nib file is named after our assitant (MiniAssistant.nib). You can of course override the <span class="code">-assistantNib</span> method to specify a different one, but that illustrates one key aspect of TESetupAssistant, and that is that there are sensible defaults for almost everything, allowing you to quickly throw together these kinds of interfaces.</p>
<h3>Get It On Bitbucket</h3>
<p>I&#8217;m releasing TESetupAssistant as open source under a liberal license (just an attribution is asked for), and I&#8217;ve included a little demo app to help you hit the ground running. You can <a href="http://bitbucket.org/taoeffect/tesetupassistant/downloads/">download</a> it <a href="http://bitbucket.org/taoeffect/tesetupassistant/overview/">on bitbucket</a>.</p>
<p>If you use it in your application I&#8217;d love to know! Shoot us an email or post a comment below and I&#8217;ll place a link here to your app.</p>
<p>Enjoy! <img src='http://www.taoeffect.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><i style="color:inherit">You can follow me on twitter <a href="http://twitter.com/taoeffect">here</a>.</i></p>
]]></content:encoded>
			<wfw:commentRss>http://www.taoeffect.com/blog/2010/01/easy-cocoa-setup-assistants-with-tesetupassistant/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How Secure Is Your iPad?</title>
		<link>http://www.taoeffect.com/blog/2010/01/how-secure-is-your-ipad/</link>
		<comments>http://www.taoeffect.com/blog/2010/01/how-secure-is-your-ipad/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 18:11:18 +0000</pubDate>
		<dc:creator>Greg Slepak</dc:creator>
				<category><![CDATA[Thoughts]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[greg]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.taoeffect.com/blog/?p=1736</guid>
		<description><![CDATA[Apple&#8217;s iPad may turn out to be more of a security risk than a useful tool for some, especially for those who, prior to yesterday&#8217;s launch, speculated that the iPad would be a God-send to the health care system, and possibly other sectors like businesses.
According to Steve, however, the iPad is designed primarily for the [...]]]></description>
			<content:encoded><![CDATA[<p>Apple&#8217;s iPad may turn out to be more of a security risk than a useful tool for some, especially for those who, prior to yesterday&#8217;s launch, <a href="http://www.readwriteweb.com/archives/the_healthcare_system_an_apple_tablets_biggest_opp.php">speculated</a> that the iPad <a href="http://www.medpagetoday.com/Blogs/18143">would be a God-send</a> to the health care system, and possibly other sectors like businesses.</p>
<p>According to Steve, however, the iPad is designed primarily for the following activities:</p>
<p><center>
<div class="img" style="margin-bottom:0px"><img src="http://www.taoeffect.com/blog/wp-content/uploads/2010/01/iPad_specialties1.png" alt="" title="" width="500" height="243" class="alignnone size-full wp-image-1739" /></div>
<p></center></p>
<p>For some, even that may be something of a stretch.</p>
<p>As <a href="http://www.aaronsw.com/weblog/ipad">many</a> <a href="http://lifehacker.com/5458690/the-problem-with-the-apple-ipad">have</a> <a href="http://i.gizmodo.com/5458382/8-things-that-suck-about-the-ipad">pointed out</a>, the iPad is more of an oversized iPod Touch than an undersized MacBook Air, or as Daniel Tenner so aptly put it: <a href="http://danieltenner.com/posts/0015-ipad-an-apple-for-mom.html">&#8220;The uncomputer for the masses&#8221;</a>.</p>
<p>When you send someone an email, you expect it to fall into the hands of its intended recipient, not someone who happened to get a hold of their device. I would never download all of my email onto an iPad because I can neither <a href="/espionage">encrypt nor password protected it</a>. Apple&#8217;s lockdown of the OS means third-party developers cannot intervene and remedy this situation because they&#8217;re not allowed to touch certain parts of the system.</p>
<p>Businesses and hospitals won&#8217;t be thrilled with employees and nurses running around with an easily swipeable device containing unprotected company secrets, client data, and patient information. Thanks to the &#8220;duplicating functionality&#8221; clause of the SDK TOS, developers can&#8217;t even write their own encrypted versions of Mail or the iWork suite.</p>
<p>If you want a secure iPad, you&#8217;ll either have to hope Apple implements it, or depend on each individual developer to properly secure their application&#8217;s data&mdash;a situation that nobody should be thrilled with.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.taoeffect.com/blog/2010/01/how-secure-is-your-ipad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How newLISP Took My Breath (And Syntax) Away</title>
		<link>http://www.taoeffect.com/blog/2010/01/how-newlisp-took-my-breath-and-syntax-away/</link>
		<comments>http://www.taoeffect.com/blog/2010/01/how-newlisp-took-my-breath-and-syntax-away/#comments</comments>
		<pubDate>Fri, 08 Jan 2010 15:34:34 +0000</pubDate>
		<dc:creator>Greg Slepak</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[newLISP]]></category>
		<category><![CDATA[greg]]></category>

		<guid isPermaLink="false">http://www.taoeffect.com/blog/?p=644</guid>
		<description><![CDATA[A few years ago, a little-known language called newLISP completely changed my understanding of what &#8220;good&#8221; programming languages look like.
Why newLISP?
Before saying another word, I&#8217;d like to address the question that some of my LISP-familiar readers may be asking right now: Why newLISP? Why not Clojure, Scheme, or Common LISP?
The answer is that after evaluating [...]]]></description>
			<content:encoded><![CDATA[<p>A few years ago, a little-known language called <b>newLISP</b> completely changed my understanding of what &#8220;good&#8221; programming languages look like.</p>
<h4>Why newLISP?</h4>
<p>Before saying another word, I&#8217;d like to address the question that some of my LISP-familiar readers may be asking right now: <b>Why newLISP? Why not Clojure, Scheme, or Common LISP?</b></p>
<p>The answer is that after evaluating these dialects of LISP, I&#8217;ve come to the conclusion that <i>newLISP has several important advantages over other LISPs.</i></p>
<p>Today, unfortunately, whenever someone mentions newLISP on an online forum frequented by adherents of another LISP, an almost clan-like flame war will erupt. An adherent of one particular dialect, usually someone who has never used newLISP, will shout obscenities such as, <b>&#8220;newLISP goes <i>back</i> on just about every advancement made by LISPs&#8221;</b>, or <b>&#8220;dynamic scope is evil!&#8221;</b></p>
<p>The historical context out of which these sentiments are born is mostly unknown to those observing the debate. As signal gives way to noise, the discussion collapses, the melee disperses, and the bystanders go back to sipping their Java and eating their Pythons.</p>
<p>It is fortunate, I think, that my introduction to the language did not sprout out of one of these battles. It was, for the most part, largely unbiased.</p>
<h4>Something called LISP</h4>
<p>While attending the University of Florida, I had signed up for a course on artificial intelligence. Our professor predictably introduced the class to a programming language called <a href="http://en.wikipedia.org/wiki/Lisp_(programming_language)">LISP</a>.</p>
<p>Up to that point in time my knowledge of LISP consisted of the usual hearsay and mantra of those unfamiliar with the language:</p>
<blockquote><p style="text-align:center">&#8220;People who like it are crazy zealots who think they&#8217;re superior to everyone!&#8221;<br />
&#8220;It&#8217;s mainly used for artificial intelligence stuff.&#8221;<br />
&#8220;No one uses it for practical purposes.&#8221;<br />
&#8220;It&#8217;s mainly used as a research language.&#8221;<br />
&#8220;It stands for &#8216;Lots-of-Irritating-Silly-Parenthesis&#8217;. Haha!&#8221;
</p>
</blockquote>
<p>You get the idea. I did not have a clue as to what it was, but I was excited to finally be forced into the position of having to find out. My grade depended on it, after all.</p>
<p>What I discovered was that LISP did in fact live up to its reputation of zealot-inducing awesomeness. Simply being exposed to some of the basic concepts and philosophies of LISP had an immediate and positive impact on my abilities as a programmer.</p>
<h4>Syntax: Programmer Enemy #1</h4>
<p>LISP&#8217;s <a href="http://www.taoeffect.com/blog/wp-content/uploads/2009/12/LISP-in-a-nutshell2.gif" class="fancybox">relative lack of syntax</a> was perhaps the greatest insight, for I immediately felt as though a great weight had disappeared. I realized that it was syntax that was at the root of most programming errors. It was syntax that created a subconscious burden that I had simply been unaware of; causing errors, bugs, and making it difficult to simply turn my thoughts into code. Despite having many years of experience with C-based languages, and being intimately familiar with their syntax, I realized that it was nevertheless a totally unnecessary burden that was slowing me, and everyone else, down.</p>
<blockquote class="oneliner">
<p style="font-style:italic">This is one great advantage of Lisp-like languages: They have very few ways of forming compound expressions, and almost no syntactic structure. . . . After a short time we forget about syntactic details of the language (because there are none) and get on with the real issues.</p>
<p class="author">&mdash;Abelson and Sussman</p>
</blockquote>
<p>It&#8217;s not just the size of the syntax that matters, it&#8217;s what you can do with it. What requires layers of special syntax in languages like PHP, Python and Ruby, LISP can do with its basic concepts of lists, functions and symbols. It can do everything those languages can do, in a more elegant fashion, and still have enough tricks left up its sleeve to accomplish feats that are simply <i>not possible</i> in other languages.</p>
<h4>Common LISP: A Series of Unfortunate Mistakes</h4>
<p>Despite all of these exciting discoveries I still had an uneasy feeling.</p>
<p>Common LISP (CL) was a great departure from what I had known previously, but it reeked of antiquity, and worse, its syntax simply wasn&#8217;t very well thought out. The &#8220;Zen-like&#8221; perfection that it seemed to be yearning for was missing. It was a feeling that Mac users are all too familiar with: <b>There were too many buttons, and most of them were unnecessary.</b></p>
<p><center><img src="http://www.taoeffect.com/blog/wp-content/uploads/2010/01/CL-in-a-nutshell.gif" alt="Common LISP Syntax in a Nutshell" title="Common LISP Syntax" width="500" height="320" class="alignnone size-full wp-image-1498" /></center></p>
<p>Compared to C++, that&#8217;s fantastic. Then again, compared to C++, <i>most</i> languages appear favorable. Having had a taste of the liberty offered by the drop in syntax from C/C++/Java to CL, I did not see <i style="color:inherit">why</i> all of this syntax was necessary, and indeed, most of it wasn&#8217;t.</p>
<p>Every little piece of syntax that&#8217;s introduced into a language adds to the programmer&#8217;s mental burden, be he conscious of it or not. I was not prepared to spend the effort learning Common LISP if a better alternative could be found.</p>
<div class="box" style="margin-bottom:20px">
<h4>What do you mean by &#8220;syntax&#8221;?</h4>
<p>You may object at my inclusion of the functions <span class="code">defvar</span>, <span class="code">=</span>, <span class="code">eq</span>, <span class="code">eql</span>, etc. as they are <i>functions</i>. I include them because they constitute low-level functionality that cannot be expressed in the syntax of LISP itself. In other words, the functions <span class="code">=</span> and <span class="code">eq</span> are low-level primitives that must be defined in the language that LISP itself is implemented in, and their meaning and usage cannot be deduced from any other existing LISP syntax.</p>
<p class="last">Consider PHP&#8217;s <span class="code">!=</span> and <span class="code">!==</span>, they are both <i>operators</i> and are used in the same way, yet that doesn&#8217;t tell you anything about what the difference between them is. There&#8217;s no way to deduce their meaning from the existing semantics of the language and thus they each represent new syntax that must be learned.</p>
</div>
<h4>How I Discovered newLISP</h4>
<p>The professor revealed to us our &#8220;major class project&#8221;: we were to implement a text-based version of the game Chainshot:</p>
<p><center>
<div class="img" style="margin-bottom:0px"><img src="http://www.taoeffect.com/blog/wp-content/uploads/2009/12/chainshot.png" alt="Chainshot" title="Chainshot" width="282" height="305" class="alignnone size-full wp-image-1154" />
<p class="last">An implementation of Chainshot</p>
</div>
<p></center></p>
<p>Chainshot starts with a grid completely filled with colored cells. Your goal is to clear the board and you do this by clicking on each cell. If the cell has any adjacent cells of the same color, they all disappear. The effect spreads to include all of the cells adjacent to those, and so on. Cells then drop down to fill in the gap left by the vanished group. If an entire column disappears then all cells to the right of it move left to fill it in. There&#8217;s a wonderful and free implementation of this for OS X called <a href="http://www.macupdate.com/info.php/id/24493/otis">Otis</a>.</p>
<p>For the midterm we were to make a version of this playable by a human, and for the final we had to write an AI to play the game.</p>
<p><i>&#8220;One more thing&#8230;&#8221; he said, &#8220;If you do it in LISP, you&#8217;ll get a 10% bonus.&#8221;</i></p>
<p>The problem though was most of the lectures focused on various algorithms and theory for doing AI. Those who wanted the 10% bonus would have to teach themselves the language.</p>
<p>Most students chose to forsake the bonus in favor of using a language that they were already familiar with, and like most students I had very little time, so I was partial to that sentiment. However, I decided to do a Google search to see if I could find a Common LISP alternative that was more appetizing.</p>
<p>To my delight I found a language that seemed to check all the right boxes, and surprisingly it wasn&#8217;t <a href="http://en.wikipedia.org/wiki/Scheme_(programming_language)">Scheme</a> (although that is a wonderful language as well). Like Scheme, this language had greatly simplified Common LISP&#8217;s syntax, but at the same time it came with a standard library full of useful functions for performing modern scripting tasks, and all you needed to run it was a single tiny executable!</p>
<h3>Discovering newLISP</h3>
<p><img src="http://www.taoeffect.com/blog/wp-content/uploads/2009/12/newlisp-logo-horizontal-240x100.png" alt="newLISP" title="newLISP" width="240" height="100" class="alignright size-full wp-image-1049" style="float:right; padding-left: 10px; padding-bottom:20px" />Here is what ultimately turned me into such a fan of <a href="http://www.newlisp.org">newLISP</a>.</p>
<p>We had several months to complete the first part of the project, and the night before it was due, I did not have a <i>single part</i> of it complete. I had spent the night working on other things, and for perhaps an hour I spent some time looking over the newLISP website, reading about it.</p>
<p>The next day, approximately four hours before I was to hand in my finished, playable version of Chainshot, I sat down at a desk, put on my headphones, and proceeded to <i>simultaneously</i> learn newLISP while creating this game with it.</p>
<p>I finished in about <b>3 hours</b>, of which only about ten minutes was spent debugging. I was dumbfounded. I had discovered something new, a language that allowed me to rapidly write what, after years of C-based languages, seemed like <i>virtually &#8220;bug-free code&#8221; that just worked.</i> It was a language that I had come close to <i>mastering</i> in a matter of minutes, having never used it before! In the time I had learned newLISP and written a text-based game in it I would probably only be finishing the tutorials for Ruby or Python.</p>
<h4>newLISP&#8217;s Strengths</h4>
<p>At the beginning of this post I made the claim that newLISP has several advantages over the other LISPs. They can all be summarized as follows: <b>If you want a LISP-based scripting language, choose newLISP.</b></p>
<p>Before getting into the details let me warn:</p>
<blockquote><p style="text-align:center; font-style:normal; font-weight:bold">newLISP is <i>not</i> a general-purpose programming language.</p>
</blockquote>
<p>In the same sense that you wouldn&#8217;t use JavaScript to write an iPhone app (some <a href="http://www.nimblekit.com/">beg to differ</a>), you wouldn&#8217;t use use newLISP to write an operating system, a music player like iTunes, or a web browser like Firefox. For such endeavors I recommend without hesitation Clojure, Scheme, C, Objective-C, etc. In other words, languages geared for solving complex, low-level problems, as quickly as possible.</p>
<p>The very first sentence on newLISP&#8217;s website states (emphasis mine):</p>
<blockquote><p style="text-align:center; font-style:normal; font-weight:bold">newLISP is a Lisp-like, general-purpose <i>scripting</i> language.</p>
</blockquote>
<p>Long ago, when computers were slow, the LISP community was mercilessly mocked by their C and Assembly-wielding counterparts for the crime of being <i>too slow.</i> Ever since that time the subject of performance has been a sore spot for the LISP community from which, I dare say, it has yet to fully recover. Its focus turned towards compilation and proving to the world that it too, could be fast. As a result, few seem to have noticed the need for a general-purpose LISP focused instead on interpretation and scripting.</p>
<p>Luckily, newLISP seems to fit that role rather well. It is a general-purpose interpreted scripting language. It&#8217;s my understanding that because of how dynamic it is, it cannot even be compiled to bytecode (this does not mean it is not fast, though).</p>
<p>Without this understanding, some of its design decisions will not make sense. Why choose fexprs over macros? Why dynamic scope instead of lexical scope? Why <a href="http://www.newlisp.org/MemoryManagement.html">One-Reference-Only</a> memory management instead of garbage collection?</p>
<h4>Design and Syntax</h4>
<p>newLISP comes in a single, tiny 200+KB binary executable. Out of all the LISP derivatives I&#8217;ve tried, it is the easiest to setup, deploy, and develop for. Somehow that tiny package contains the entire language and includes functions for reading and writing files, parsing text, regular expressions, running code in parallel, over a network, and much more. For the final project I was the only person in the class to submit a fully parallelizable AI (scalable to any number of cores) to solve each grid. The only reason I did it was because I could do it without breaking a sweat. newLISP made it mind-numbingly easy, and this was before it had all the <a href="http://www.newlisp.org/downloads/CodePatterns.html#toc-19">actor</a> and <a href="http://www.newlisp.org/downloads/CodePatterns.html#toc-18">Cilk</a> stuff.</p>
<p>newLISP&#8217;s syntax is minimalist and well thought out. For the sake of comparison with the Common LISP syntax card, I&#8217;ve kept most of the attributes (such as font size) the same:</p>
<p><center><img src="http://www.taoeffect.com/blog/wp-content/uploads/2009/12/newLISP-in-a-nutshell2.gif" alt="newLISP in a nutshell" title="newLISP in a nutshell" width="500" height="320" class="alignnone size-full wp-image-1312" /></center></p>
<p>Functions do not need any of the <span class="code">&#038;rest</span>, <span class="code">&#038;optional</span> flags. Simply pass in variables or don&#8217;t, the parameters that don&#8217;t get anything are set to nil, and extra stuff can be accessed through the function <span class="code">(args)</span> or the symbol <span class="code">$args</span>.</p>
<p>Functions, like most other things, evaluate to themselves. You don&#8217;t need a special <span class="code">#&#8217;</span> syntax to access them. Functions are also <i>real lists</i>. This means you can get their <a href="http://www.newlisp.org/downloads/newlisp_manual.html#source">source</a> after they&#8217;ve been defined, and even <a href="http://kazimirmajorinc.blogspot.com/2009/04/crawler-tractor.html">modify them <i style="color:inherit">while they are executing</i></a>.</p>
<h4>fexprs and <span class="code" style="font-size:inherit; font-weight:inherit; font-style:inherit;">eval</span></h4>
<p>Instead of macros newLISP chose to use <a href="http://en.wikipedia.org/wiki/Fexpr">fexprs</a>, or functions that simply don&#8217;t evaluate their arguments (although to the chagrin of some, newLISP calls them macros). This decision makes sense because in an interpreted LISP, almost everything happens at runtime and there are situations where fexprs can be much faster to execute than macros. It also means that newLISP&#8217;s &#8220;macros&#8221; don&#8217;t need the special backquote syntax, making them easier to write and read.</p>
<p>You may have heard the mantra against using <span class="code">eval</span> in other languages. In newLISP, this just doesn&#8217;t apply. newLISP&#8217;s <a href="http://kazimirmajorinc.blogspot.com/2008/12/speed-of-newlisp-eval-test-v100.html">eval is faster than other LISPs</a>.</p>
<p>This has many consequences, one of which is that sometimes newLISP&#8217;s fexprs <a href="http://kazimirmajorinc.blogspot.com/2009/04/on-macro-expansion-evaluation-and.html">can be faster than compiled macros</a> in the other LISPs, but also it means that using <span class="code">eval</span> is no longer frowned upon, which opens up all sorts of coding possibilities.</p>
<h4>Equality and Memory Management</h4>
<p>Notice that there&#8217;s a single equality operator, the equals sign. newLISP can get away with this luxury because of its memory-management model, called <a href="http://www.newlisp.org/MemoryManagement.html">One-Reference-Only (ORO)</a>.</p>
<p>In short, most things are passed <i>by-value</i> and so you end up not needing all of those ridiculous comparison functions. If two things have the same value they are equal&mdash;end of story (except in the case of <a href="/blog/2009/12/introducing-objective-newlisp/">Objective newLISP</a>).</p>
<p>This is not as crazy as it sounds. Internally, newLISP passes data by reference between built-in functions and does other optimizations. You can pass data by reference through the use of <a href="http://www.newlisp.org/downloads/CodePatterns.html#toc-3">contexts and symbols</a>, or by using <a href="/blog/2009/12/introducing-objective-newlisp/">Objective newLISP</a>. newLISP&#8217;s ORO also means repeatable code execution times; you&#8217;ll never experience &#8220;GC Hell&#8221; because there is no garbage collector.</p>
<h4>Dynamic Scope</h4>
<p>Much fuss is often made over newLISP&#8217;s use of <a href="http://en.wikipedia.org/wiki/Scope_%28programming%29#Dynamic_scoping">dynamic scope</a>. It is true, dynamic scope <i>can be dangerous!</i></p>
<p>In a similar way, <i>pointers and alcohol can be dangerous too!</i> That doesn&#8217;t mean you shouldn&#8217;t ever program in C or enjoy yourself at a party. Check for <span class="code">NULL</span>, don&#8217;t drink and drive, and beware of &#8220;free variables.&#8221;</p>
<p>Remember, newLISP is an interpreted language. Lutz Mueller, the author of newLISP, made a simple cost/benefit analysis and chose dynamic scope because it&#8217;s faster than lexical scope, and because it&#8217;s very easy to avoid the potential pitfalls of dynamic scope. Instead of this:</p>
<pre class="code"><span class="source source_newlisp"><span class="entity entity_paren entity_paren_lisp">(</span><span class="meta meta_function meta_function_lisp"><span class="storage storage_type storage_type_function-type storage_type_function-type_lisp">define</span> <span class="entity entity_paren entity_paren_lisp">(</span><span class="entity entity_name entity_name_functiondef entity_name_functiondef_lisp">my-unsafe-func</span></span><span class="entity entity_paren entity_paren_lisp">)</span>
    <span class="entity entity_paren entity_paren_lisp">(</span><span class="entity entity_name entity_name_function entity_name_function_lisp">println</span> <span class="entity entity_symbol entity_symbol_lisp">my-var</span><span class="entity entity_paren entity_paren_lisp">)</span>
<span class="entity entity_paren entity_paren_lisp">)</span></span></pre>
<p>Do this:</p>
<pre class="code"><span class="source source_newlisp"><span class="entity entity_paren entity_paren_lisp">(</span><span class="meta meta_function meta_function_lisp"><span class="storage storage_type storage_type_function-type storage_type_function-type_lisp">define</span> <span class="entity entity_paren entity_paren_lisp">(</span><span class="entity entity_name entity_name_functiondef entity_name_functiondef_lisp">my-safe-func</span></span> <span class="entity entity_symbol entity_symbol_lisp">my-var</span><span class="entity entity_paren entity_paren_lisp">)</span>
    <span class="entity entity_paren entity_paren_lisp">(</span><span class="entity entity_name entity_name_function entity_name_function_lisp">println</span> <span class="entity entity_symbol entity_symbol_lisp">my-var</span><span class="entity entity_paren entity_paren_lisp">)</span>
<span class="entity entity_paren entity_paren_lisp">)</span></span></pre>
<p>It&#8217;s a small price to pay for the performance improvement, and oftentimes it&#8217;s actually quite handy to have dynamic scope (especially in combination with the no-longer taboo <span class="code">eval</span>). If you need lexical scope though, newLISP <a href="http://www.newlisp.org/downloads/newlisp_manual.html#expand">has</a> <a href="http://www.newlisp.org/downloads/newlisp_manual.html#letex">you</a> <a href="http://www.newlisp.org/downloads/newlisp_manual.html#contexts">covered</a>.</p>
<h4>Parallel Processing</h4>
<p>newLISP takes an interesting approach for running code in parallel. Whereas Clojure uses <a href="http://clojure.org/refs">advanced methods for multi-threading and ensuring safety</a>, newLISP simply uses its small size and lets the Operating System do all the work!</p>
<p>There are no threads. Writing safe, parallel code is simple through <a href="http://www.newlisp.org/downloads/CodePatterns.html#toc-19">actors</a> and <a href="http://www.newlisp.org/downloads/CodePatterns.html#toc-18">spawn/sync</a> because newLISP <i>simply forks itself</i>. Its modest stature makes this a fairly cheap operation, allowing the OS to handle scheduling and memory-protection. Try forking a JVM&#8230; <img src='http://www.taoeffect.com/blog/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<h4>Excellent Documentation and Community</h4>
<p>newLISP&#8217;s documentation <a href="http://www.newlisp.org/downloads/manual_frame.html">is one of the best examples of excellent documentation that I&#8217;ve ever seen</a>, simply surpassing the documentation for any other LISP that I&#8217;m aware of. You don&#8217;t need to shell out money for a book to learn it, and that&#8217;s because it doesn&#8217;t need a book! The short manual included with the reference documentation is all you&#8217;ll need to learn the language. Its documentation is one of the primary reasons that I was able to successfully procrastinate for my midterm.</p>
<p>If I had to pick a word to describe <a href="http://newlispfanclub.alh.net/forum/index.php">newLISP&#8217;s community</a> it would probably be <b>&#8220;cozy&#8221;</b> (and for Common LISP it would probably be &#8220;abrasive&#8221;). Everyone&#8217;s question is heard and answered in a friendly and rapid manner, and there is no formality. Lutz Mueller will often answer your question or incorporate your suggestions directly into the language. It&#8217;s a small community, yes, but it&#8217;s also agile and capable of rapid change without politics.</p>
<h4>Other Goodies</h4>
<p>There are <b>many other goodies</b> that I won&#8217;t dwell on:</p>
<ul>
<li><a href="http://www.newlisp.org/downloads/newlisp_manual.html#eval_rules">Two kinds of syntax for verbatim strings</a></li>
<li><a href="http://newlispfanclub.alh.net/forum/viewtopic.php?f=16&#038;t=2770&#038;p=15571#p15571">Readline support in REPL with tab completion</a></li>
<li><a href="http://www.newlisp.org/downloads/newlisp_manual.html#unicode_utf8">Full Unicode Support, Strings are UTF8</a></li>
<li><a href="http://www.newlisp.org/downloads/CodePatterns.html#toc-21">Simple and powerful distributed computing</a></li>
<li><a href="http://www.newlisp.org/downloads/CodePatterns.html#toc-22">Built-in web server</a></li>
<li><a href="http://www.newlisp.org/downloads/newlisp_manual.html#indexing">Implicit indexing and slicing for arrays, lists and strings</a></li>
<li><a href="http://www.newlisp.org/downloads/newlisp_manual.html#loading_contexts">Simple archiving and loading of state</a></li>
<li><a href="http://www.newlisp.org/downloads/CodePatterns.html#toc-23">Simple interface to C</a> (means you&#8217;re never at a loss for fast libraries)</li>
</ul>
<h3>Conclusion + Related Links</h3>
<p>newLISP is a true diamond in the rough, sorely under-hyped, but a thing of beauty nevertheless.</p>
<p>If you found this post interesting, you may find some of the links below worth visiting:</p>
<ul>
<li><a href="http://www.newlisp.com">newLISP Homepage</a></li>
<li><a href="http://www.rundragonfly.com">Dragonfly&mdash;A newLISP Web Framework</a></li>
<li><a href="http://kazimirmajorinc.blogspot.com/">Kazimir Majorinc&#8217;s Blog</a></li>
<li><a href="http://unbalanced-parentheses.nfshost.com/">Cormullion&#8217;s Blog</a></li>
<li><a href="http://www.newlisp.org/index.cgi?Code_Contributions">Even larger list of newLISP related links</a></li>
<li>Twitter: <a href="http://twitter.com/newlisp">@newlisp</a>, <a href="http://twitter.com/taoeffect">@taoeffect</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.taoeffect.com/blog/2010/01/how-newlisp-took-my-breath-and-syntax-away/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Using Espionage with Dropbox</title>
		<link>http://www.taoeffect.com/blog/2009/12/use-espionage-with-dropbox/</link>
		<comments>http://www.taoeffect.com/blog/2009/12/use-espionage-with-dropbox/#comments</comments>
		<pubDate>Mon, 14 Dec 2009 23:02:38 +0000</pubDate>
		<dc:creator>Greg Slepak</dc:creator>
				<category><![CDATA[Espionage]]></category>
		<category><![CDATA[dropbox]]></category>
		<category><![CDATA[greg]]></category>
		<category><![CDATA[tip]]></category>

		<guid isPermaLink="false">http://www.taoeffect.com/blog/?p=1419</guid>
		<description><![CDATA[We received an excellent tip from Ira Rainey of side lane digital development on a simple method of using Espionage with Dropbox.

The method does not involve storing Espionage&#8217;d folders inside of Dropbox (which can lead to issues), but rather using Espionage to easily and conveniently encrypt all of the files from your Dropbox on your [...]]]></description>
			<content:encoded><![CDATA[<p>We received an excellent tip from Ira Rainey of <a href="http://www.sidelane.co.uk">side lane digital development</a> on a simple method of using Espionage with <a href="https://www.dropbox.com/">Dropbox</a>.</p>
<p><center><img src="http://www.taoeffect.com/blog/wp-content/uploads/2009/12/espionage-+-dropbox2.png" alt="espionage + dropbox" title="espionage + dropbox" width="500" height="172" class="alignnone size-full wp-image-1428" /></center></p>
<p>The method does not involve storing Espionage&#8217;d folders inside of Dropbox (which can lead to issues), but rather using Espionage to easily and conveniently encrypt all of the files from your Dropbox on your Mac.</p>
<h3>Step 1 &#8211; Create a folder called &#8216;Vault&#8217; in your Home folder</h3>
<p><img src="http://www.taoeffect.com/blog/wp-content/uploads/2009/12/vault1.png" alt="Create a folder called &#039;Vault&#039;" title="Create a folder called &#039;Vault&#039;" width="506" height="280" class="alignnone size-full wp-image-1439" /></p>
<h3>Step 2 &#8211; Adjust Dropbox&#8217;s Preferences</h3>
<p><img src="http://www.taoeffect.com/blog/wp-content/uploads/2009/12/change-preferences.png" alt="Adjust Dropbox&#039;s Preferences" title="Adjust Dropbox&#039;s Preferences" width="498" height="611" class="alignnone size-full wp-image-1441" /></p>
<ol>
<li>Move the Dropbox into the Vault folder</li>
<li>Uncheck the &#8220;Start Dropbox on System Startup&#8221; checkbox</li>
</ol>
<h3>Step 3 &#8211; Quit Dropbox</h3>
<p><img src="http://www.taoeffect.com/blog/wp-content/uploads/2009/12/quit-dropbox.png" alt="Quit Dropbox" title="Quit Dropbox" width="236" height="256" class="alignnone size-full wp-image-1443" /></p>
<h3>Step 4 &#8211; Add &#8216;Vault&#8217; to Espionage &#038; Associate with Dropbox</h3>
<p><img src="http://www.taoeffect.com/blog/wp-content/uploads/2009/12/encrypt-vault.png" alt="Encrypt the Vault folder + Associate with Dropbox" title="Encrypt the Vault folder + Associate with Dropbox" width="534" height="374" class="alignnone size-full wp-image-1444" /></p>
<ol>
<li>Add the &#8216;Vault&#8217; folder to Espionage</li>
<li>Drag the Dropbox application onto the Application Associations list</li>
</ol>
<h3>Step 5 &#8211; Set Dropbox to &#8216;Launch At Login&#8217; in Espionage</h3>
<p><img src="http://www.taoeffect.com/blog/wp-content/uploads/2009/12/launch-at-login.png" alt="Set Dropbox to launch at login" title="Set Dropbox to launch at login" width="475" height="261" class="alignnone size-full wp-image-1446" /></p>
<ol>
<li>Select &#8216;Vault&#8217; in Espionage</li>
<li>Click the &#8216;Edit Application Associations&#8217; button</li>
<li>Check the box to &#8216;Launch at Login&#8217;</li>
<li>If prompted to enable &#8216;Autounlock at login&#8217;, click &#8216;Yes&#8217;</li>
<li>Click &#8216;Done&#8217;, then click &#8216;Save Changes&#8217;</li>
</ol>
<h3>That&#8217;s it!</h3>
<p>Your Dropbox is now encrypted locally, you can now launch Dropbox (you&#8217;ll be prompted for the folder&#8217;s password). Dropbox will upload any changes to it securely over the internet, and the files <a href="https://www.dropbox.com/help/27">are stored encrypted on their servers</a>.</p>
<p>It&#8217;s important to note that if you sync your Dropbox with another Mac the files on that machine won&#8217;t be encrypted unless you repeat these steps there as well. We are still investigating whether it&#8217;s possible to get Dropbox to play nicely with a live Espionage&#8217;d folder that&#8217;s inside of it.</p>
<p>Many thanks to Ira Rainey for pointing this out! You can read <a href="http://www.sidelane.co.uk/blog/2009/12/locking-down-your-dropbox-with-espionage/">more information about this tip on his blog</a>.</p>
<p>We&#8217;re always interested in hearing about how our users use Espionage, so if you have any interesting tips you&#8217;d like to share with us don&#8217;t hesitate <a href="/espionage/support">to let us know</a>! <img src='http://www.taoeffect.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.taoeffect.com/blog/2009/12/use-espionage-with-dropbox/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Introducing Objective newLISP</title>
		<link>http://www.taoeffect.com/blog/2009/12/introducing-objective-newlisp/</link>
		<comments>http://www.taoeffect.com/blog/2009/12/introducing-objective-newlisp/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 08:09:17 +0000</pubDate>
		<dc:creator>Greg Slepak</dc:creator>
				<category><![CDATA[Free Stuff]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[newLISP]]></category>
		<category><![CDATA[greg]]></category>
		<category><![CDATA[ObjNL]]></category>

		<guid isPermaLink="false">http://www.taoeffect.com/blog/?p=1318</guid>
		<description><![CDATA[newLISP is an awesome language that I use for all of my scripting needs, but one thing that is missing from it is a nice way of doing real object oriented programming.
By default it supports a pseudo-OOP paradigm called FOOP, but FOOP is simply inadequate for doing some of the most rudimentary of OOP tasks, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.newlisp.org">newLISP</a> is an awesome language that I use for all of my scripting needs, but one thing that is missing from it is a nice way of doing real object oriented programming.</p>
<p>By default it supports a pseudo-OOP paradigm called <a href="http://www.newlisp.org/downloads/newlisp_manual.html#foop">FOOP</a>, but FOOP is simply inadequate for doing some of the most rudimentary of OOP tasks, such as allowing objects to hold references to each other.</p>
<p>That is why I&#8217;m announcing <b>Objective newLISP: Real Object Oriented Programming for newLISP</b>.</p>
<h3>Let&#8217;s Dive In</h3>
<p>Objective newLISP&mdash;ObjNL for short&mdash;is modeled after parts of Objective-C and Java. Let&#8217;s open up a REPL and begin:</p>
<pre class="code terminal">$ newlisp ObjNL.lsp
newLISP v.10.1.6 on OSX IPv4 UTF-8, execute 'newlisp -h' for more info.
<b></b>
&gt; </pre>
<h4>Classes</h4>
<p>Classes are simply contexts and are defined using the function <span class="code">new-class</span>:</p>
<pre class="code terminal">&gt; (new-class 'Foo)
Foo</pre>
<p>If we wanted to create a subclass of <span class="code">Foo</span> called <span class="code">Bar</span> we can easily do so:</p>
<pre class="code terminal">&gt; (new-class 'Bar Foo)
Bar</pre>
<p>We can see that <span class="code">Foo</span> is the superclass of <span class="code">Bar</span>:</p>
<pre class="code terminal">&gt; Bar:@super
Foo</pre>
<p>And that all classes inherit from <span class="code">ObjNL</span>:</p>
<pre class="code terminal">&gt; Foo:@super
ObjNL</pre>
<h4>Objects</h4>
<p>Objects are instantiated from classes using the function <span class="code">instantiate</span>. They are contexts too:</p>
<pre class="code terminal">&gt; (setf obj (instantiate Foo))
Foo#1</pre>
<p>As we&#8217;re subverting newLISP&#8217;s <a href="http://www.newlisp.org/MemoryManagement.html">ORO memory management model</a> to gain real OOP, we should deallocate it manually when we&#8217;re through using it. I will cover the topic of <b>memory management</b> last.</p>
<h4>Constructors</h4>
<p>Constructors are defined using the <a href="http://www.newlisp.org/downloads/newlisp_manual.html#default_function">default function</a>. Let&#8217;s define constructors for <span class="code">Foo</span> and <span class="code">Bar</span> (suppose we entered this into the REPL between a pair of <span class="code">[cmd][/cmd]</span> tags):</p>
<pre class="code"><span class="source source_newlisp"><span class="entity entity_paren entity_paren_lisp">(</span><span class="entity entity_name entity_name_function entity_name_function_lisp">context</span> <span class="entity entity_symbol entity_symbol_lisp">Foo</span><span class="entity entity_paren entity_paren_lisp">)</span>
<span class="entity entity_paren entity_paren_lisp">(</span><span class="meta meta_function meta_function_lisp"><span class="storage storage_type storage_type_function-type storage_type_function-type_lisp">define</span> <span class="entity entity_paren entity_paren_lisp">(</span><span class="entity entity_name entity_name_functiondef entity_name_functiondef_lisp">Foo:Foo</span></span> <span class="entity entity_symbol entity_symbol_lisp">_bar</span><span class="entity entity_paren entity_paren_lisp">)</span>
    <span class="entity entity_paren entity_paren_lisp">(</span><span class="entity entity_name entity_name_function entity_name_function_lisp">setf</span> <span class="entity entity_symbol entity_symbol_lisp">bar</span> <span class="entity entity_symbol entity_symbol_lisp">_bar</span><span class="entity entity_paren entity_paren_lisp">)</span>
    <span class="constant constant_language constant_language_lisp">true</span>
<span class="entity entity_paren entity_paren_lisp">)</span>

<span class="entity entity_paren entity_paren_lisp">(</span><span class="entity entity_name entity_name_function entity_name_function_lisp">context</span> <span class="entity entity_symbol entity_symbol_lisp">Bar</span><span class="entity entity_paren entity_paren_lisp">)</span>
<span class="entity entity_paren entity_paren_lisp">(</span><span class="meta meta_function meta_function_lisp"><span class="storage storage_type storage_type_function-type storage_type_function-type_lisp">define</span> <span class="entity entity_paren entity_paren_lisp">(</span><span class="entity entity_name entity_name_functiondef entity_name_functiondef_lisp">Bar:Bar</span></span> <span class="entity entity_symbol entity_symbol_lisp">_foo</span><span class="entity entity_paren entity_paren_lisp">)</span>
    <span class="entity entity_paren entity_paren_lisp">(</span><span class="entity entity_name entity_name_function entity_name_function_lisp">setf</span> <span class="entity entity_symbol entity_symbol_lisp">foo</span> <span class="entity entity_symbol entity_symbol_lisp">_foo</span><span class="entity entity_paren entity_paren_lisp">)</span>
    <span class="constant constant_language constant_language_lisp">true</span> <span class="comment comment_line comment_line_semicolon comment_line_semicolon_lisp"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_lisp">;</span> don't allow ourselves to be deallocated
</span><span class="entity entity_paren entity_paren_lisp">)</span>
<span class="entity entity_paren entity_paren_lisp">(</span><span class="entity entity_name entity_name_function entity_name_function_lisp">context</span> <span class="entity entity_symbol entity_symbol_lisp">MAIN</span><span class="entity entity_paren entity_paren_lisp">)</span></span></pre>
<p>Note the extra <span class="code">true</span> at the end of each constructor. This is important because if the constructor returns <span class="code">nil</span> that tells ObjNL that an error occurred and to therefore deallocate the object immediately. Thus if <span class="code">_bar</span> were <span class="code">nil</span> and we didn&#8217;t have that <span class="code">true</span> the object would be deallocated, and we don&#8217;t want that.</p>
<p>When we call <span class="code">instantiate</span> with extra arguments they are passed to the constructor:</p>
<pre class="code terminal">&gt; (setf obj (instantiate Foo (instantiate Bar)))
Foo#2</pre>
<p>We can see that the instance variables were properly set:</p>
<pre class="code terminal">&gt; obj:bar
Bar#1
> obj:bar:foo

ERR: symbol expected : "obj:bar:foo"</pre>
<p>Huh. We were able to check <span class="code">obj:bar</span> but <span class="code">obj:bar:foo</span> resulted in an error. It seems newLISP treats the entire thing as a symbol if there&#8217;s more than one colon, instead of assuming we&#8217;re doing multiple context lookups.</p>
<p>Thankfully Objective newLISP has you covered.</p>
<h4>Deep Value and Symbol Access</h4>
<pre class="code terminal">&gt; (. obj bar foo)
nil</pre>
<p>The <b>dot macro</b> lets us look up the value of a symbol that we want through several object references. I&#8217;ll refer to this as &#8220;deep value access&#8221;. Sometime we want the <i>symbol</i> instead of the value, for example say for fun we want to create a circular reference between the objects <span class="code">obj</span> and <span class="code">obj:bar</span>. We can do this using the <b>dot-reference macro</b>:</p>
<pre class="code terminal">&gt; (.&#038; obj bar foo)
Bar#1:foo
&gt; (set (.&#038; obj bar foo) obj)
Foo#2</pre>
<p>The dot-reference macro allows for &#8220;deep symbol access&#8221;, it returns the context-qualified symbol for an object&#8217;s instance variable. Now we can show that our circular reference works:</p>
<pre class="code terminal">&gt; (. obj bar foo bar foo)
Foo#2
&gt; (= obj (. obj bar foo bar foo))
true</pre>
<h4>Interfaces</h4>
<p>Most object oriented systems have the concept of an <b>interface</b>, sometimes referred to as a <b>protocol</b>. Interfaces define a set of functions that a class can choose to implement or &#8220;conform&#8221; to. Objective newLISP has them too, and refers to them as interfaces even though they are technically <a href="http://en.wikipedia.org/wiki/Mixin">mixins</a>.</p>
<p>Let&#8217;s define a simple interface called <span class="code">protocol</span>:</p>
<pre class="code terminal">&gt; (define (protocol:test) "hello!")
(lambda () "hello!")</pre>
<p>There are two ways to implement an interface. You can specify a list of them when creating a new class:</p>
<pre class="code terminal">&gt; (new-class 'Foo ObjNL '(protocol))
Foo</pre>
<p>Or you can add them to a class or object after its definition. We actually want to do this right now because we instantiated <span class="code">obj</span> prior to adding <span class="code">protocol</span> to <span class="code">Foo</span>&#8217;s list of interfaces. We can check to see this is true by asking if <span class="code">obj</span> implements <span class="code">protocol</span>:</p>
<pre class="code terminal">&gt; (implements? protocol obj)
nil</pre>
<p>So the second way to add an interface to an object or class is to use the function <span class="code">add-interface</span>:</p>
<pre class="code terminal">&gt; (add-interface protocol obj)
(protocol Foo ObjNL)</pre>
<p>Now <span class="code">obj</span> should implement it, so we can try it out:</p>
<pre class="code terminal">&gt; (if (implements? protocol obj) (obj:test))
"hello!"</pre>
<p>The only real difference between an interface and a class is that a class has a constructor (default function) and ultimately inherits from <span class="code">ObjNL</span>. You can use <span class="code">implements?</span> to check inheritance as well:</p>
<pre class="code terminal">&gt; (implements? ObjNL obj)
true</pre>
<h4>Memory Management</h4>
<p>The last, and perhaps most important topic, is what to do with all those objects you&#8217;ve got lying around, also referred to as &#8220;memory management.&#8221;</p>
<p>Objective newLISP supports two styles of memory management: manual and reference counting.</p>
<p><b>Manual memory management</b> is simple: <span class="code">instantiate</span> your object, and when you&#8217;re done with it, <span class="code">deallocate</span> it!</p>
<pre class="code terminal">&gt; (setf b (instantiate Bar))
Bar#2
&gt; (deallocate b)
true</pre>
<p><b>Reference counting</b> is done the same way it is done in <a href="http://en.wikipedia.org/wiki/Objective-C">Objective-C</a>.  Each object starts with a <b>reference count</b> of <span class="code">1</span>. When you want to hold onto that object you <span class="code">retain</span> it, and when you&#8217;re through with it you <span class="code">release</span> or <span class="code">autorelease</span> it (which decrements the reference count). When the reference count hits zero the object is deallocated by <span class="code">deallocate</span>:</p>
<pre class="code terminal">&gt; (setf b (instantiate Bar))
Bar#3
&gt; (release b)
true</pre>
<p>I will cover <span class="code">autorelease</span> next, but I won&#8217;t go to great lengths to explain how all of this reference counting stuff works. If you&#8217;re unfamiliar with it, just know that it&#8217;s not complicated. If you want some practice make an iPhone app. <img src='http://www.taoeffect.com/blog/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>To illustrate <span class="code">autorelease</span>  I will implement the method <span class="code">ObjNL:dealloc</span>, which is called on an object just before it is deallocated.</p>
<pre class="code terminal">&gt; (define (Bar:dealloc) (println Bar:@self " has been deallocated!"))
(lambda () (println "Object " Bar:@self " has been deallocated!"))
&gt; (push-autorelease-pool)
(())
&gt; (dotimes (_ 5) (autorelease (instantiate Bar)))
Bar#8
&gt; (pop-autorelease-pool)
Bar#8 has been deallocated!
Bar#7 has been deallocated!
Bar#6 has been deallocated!
Bar#5 has been deallocated!
Bar#4 has been deallocated!
true</pre>
<p>One important point to mention is that deallocating objects in newLISP versions 10.1.8 or older is <b>very slow</b>. The details of why this is has to do with safety (which I discuss in the box below), but needless to say it was too slow to be acceptable. I contacted Lutz Mueller, the author of newLISP, and he agreed to introduce an &#8220;unsafe&#8221; optimization into the <span class="code">delete</span> function. In versions 10.1.9 and later, deallocating Objective newLISP objects is approximately <b>480 times faster</b>.</p>
<p>Because of this, it&#8217;s strongly recommended to use Objective newLISP with <b>newLISP 10.1.9 or later</b>. Currently the latest development release is 10.1.8, however Lutz graciously made this optimization available online in a development version of 10.1.9. Click <a href="http://www.newlisp.org/downloads/development/latest/newlisp-10.1.9-dev.tgz">here to grab the source</a> for this version. This link will expire soon, when it does you can get the latest development release <a href="http://www.newlisp.org/downloads/development/">here</a>.</p>
<div class="box" style="margin-bottom:20px">
<h4>Cautionary Note!</h4>
<p style="margin-bottom:5px">There are two situations to watch out for when using Objective newLISP:</p>
<p style="margin-bottom:5px"><b>#1: Unbound References in Functions</b></p>
<p style="margin-bottom:5px">Instead of this:</p>
<pre class="code"><span class="source source_newlisp"><span class="entity entity_paren entity_paren_lisp">(</span><span class="meta meta_function meta_function_lisp"><span class="storage storage_type storage_type_function-type storage_type_function-type_lisp">define</span> <span class="entity entity_paren entity_paren_lisp">(</span><span class="entity entity_name entity_name_functiondef entity_name_functiondef_lisp">modify-obj</span></span><span class="entity entity_paren entity_paren_lisp">)</span>
    <span class="entity entity_paren entity_paren_lisp">(</span><span class="entity entity_name entity_name_function entity_name_function_lisp">setf</span> <span class="entity entity_symbol entity_symbol_lisp">obj:bar</span> <span class="constant constant_numeric constant_numeric_lisp">5</span><span class="entity entity_paren entity_paren_lisp">)</span>
<span class="entity entity_paren entity_paren_lisp">)</span>
<span class="entity entity_paren entity_paren_lisp">(</span><span class="entity entity_name entity_name_function entity_name_function_lisp">setf</span> <span class="entity entity_symbol entity_symbol_lisp">obj</span> <span class="entity entity_paren entity_paren_lisp">(</span><span class="entity entity_name entity_name_function entity_name_function_lisp">instantiate</span> <span class="entity entity_symbol entity_symbol_lisp">Foo</span><span class="entity entity_paren entity_paren_lisp">))</span>
<span class="entity entity_paren entity_paren_lisp">(</span><span class="entity entity_name entity_name_function entity_name_function_lisp">modify-obj</span><span class="entity entity_paren entity_paren_lisp">)</span></span></pre>
<p style="margin-bottom:5px">Do this:</p>
<pre class="code"><span class="source source_newlisp"><span class="entity entity_paren entity_paren_lisp">(</span><span class="meta meta_function meta_function_lisp"><span class="storage storage_type storage_type_function-type storage_type_function-type_lisp">define</span> <span class="entity entity_paren entity_paren_lisp">(</span><span class="entity entity_name entity_name_functiondef entity_name_functiondef_lisp">modify-obj</span></span> <span class="entity entity_symbol entity_symbol_lisp">obj</span><span class="entity entity_paren entity_paren_lisp">)</span>
    <span class="entity entity_paren entity_paren_lisp">(</span><span class="entity entity_name entity_name_function entity_name_function_lisp">setf</span> <span class="entity entity_symbol entity_symbol_lisp">obj:bar</span> <span class="constant constant_numeric constant_numeric_lisp">5</span><span class="entity entity_paren entity_paren_lisp">)</span>
<span class="entity entity_paren entity_paren_lisp">)</span>
<span class="entity entity_paren entity_paren_lisp">(</span><span class="entity entity_name entity_name_function entity_name_function_lisp">setf</span> <span class="entity entity_symbol entity_symbol_lisp">obj</span> <span class="entity entity_paren entity_paren_lisp">(</span><span class="entity entity_name entity_name_function entity_name_function_lisp">instantiate</span> <span class="entity entity_symbol entity_symbol_lisp">Foo</span><span class="entity entity_paren entity_paren_lisp">))</span>
<span class="entity entity_paren entity_paren_lisp">(</span><span class="entity entity_name entity_name_function entity_name_function_lisp">modify-obj</span> <span class="entity entity_symbol entity_symbol_lisp">obj</span><span class="entity entity_paren entity_paren_lisp">)</span></span></pre>
<p>If you don&#8217;t do that, newLISP will read the <span class="code">obj:bar</span> in the definition of <span class="code">modify-obj</span> and instantly create and protect a context called <span class="code">obj</span>, making it impossible to <span class="code">setf</span> the <span class="code">obj</span> later on.</p>
<p style="margin-bottom:5px"><b>#2: Dangling References</b></p>
<p style="margin-bottom:5px">Use extreme caution when holding reference(s) to an object in a list or some other container! If that reference is later deallocated and you try to access it, bad things will happen:</p>
<pre class="code terminal">&gt; (setf b (instantiate Bar))
Bar#9
&gt; (push b alist)
Bar#9
&gt; (deallocate b)
Bar#9 has been deallocated!
true
&gt; alist
Bus error</pre>
<p style="margin-bottom:5px">Normally this would not be a problem, the object in <span class="code">alist</span> would simply be replaced with <span class="code">nil</span> upon its deallocation. However, since we&#8217;re using the fast, unsafe version of <span class="code">delete</span> to do our deallocation, newLISP will not do that. It is the same situation as when attempting to access free&#8217;d memory in C/C++/Objective-C.</p>
<p style="margin-bottom:5px">Instead we should use <span class="code">retain</span>/<span class="code">release</span>:</p>
<p class="last">
<pre class="code terminal">&gt; (setf b (instantiate Bar))
Bar#9
&gt; (push (retain b) alist)
Bar#9
&gt; (release b)
nil
&gt; alist
(Bar#9)
&gt; (release (pop alist))
Bar#9 has been deallocated!
true
&gt; alist
()</pre>
</p>
</div>
<h4>When to use FOOP</h4>
<p>Objective newLISP is not the answer to all OOP problems in newLISP. <a href="http://www.newlisp.org/downloads/newlisp_manual.html#foop">FOOP</a> has its place too. If you&#8217;re dealing with a situation where you may end up needing lots of objects, FOOP is probably the better choice. Although you can&#8217;t do full-blown OOP with it, FOOP objects can use far less memory than ObjNL objects because in ObjNL, methods are stored in each object, not in the class. After trying out both you should have a good feeling for when to use one over the other (i.e., if the limitations of FOOP start to become obvious).</p>
<h4>Download and API</h4>
<p>Download Objective newLISP here:</p>
<p><a href="/newlisp/ObjNL.zip" style="border:none"><img src="http://www.taoeffect.com/blog/wp-content/uploads/2009/12/objnl.png" alt="Download Objective newLISP" title="Download Objective newLISP" width="90" height="70" class="alignnone size-full wp-image-1401" /></a></p>
<p>Access the <a href="/newlisp/ObjNL.lsp.html">Objective newLISP API</a>.</p>
<p>And for news, follow <a href="http://twitter.com/taoeffect">@taoeffect</a> and <a href="http://twitter.com/newlisp">@newlisp</a> on twitter.</p>
<p>Thanks for checking out Objective newLISP!</p>
<p>Enjoy! <img src='http://www.taoeffect.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.taoeffect.com/blog/2009/12/introducing-objective-newlisp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Michael Moore&#8217;s &#8220;Capitalism: A Love Story&#8221;</title>
		<link>http://www.taoeffect.com/blog/2009/11/michael-moores-capitalism-a-love-story/</link>
		<comments>http://www.taoeffect.com/blog/2009/11/michael-moores-capitalism-a-love-story/#comments</comments>
		<pubDate>Sun, 01 Nov 2009 19:36:14 +0000</pubDate>
		<dc:creator>Greg Slepak</dc:creator>
				<category><![CDATA[Thoughts]]></category>
		<category><![CDATA[capitalism]]></category>
		<category><![CDATA[government]]></category>
		<category><![CDATA[greg]]></category>
		<category><![CDATA[michael moore]]></category>
		<category><![CDATA[society]]></category>

		<guid isPermaLink="false">http://www.taoeffect.com/blog/?p=988</guid>
		<description><![CDATA[Warning: This blog post is an opinion piece by Greg Slepak (while he searches for an appropriate medium), and has nothing to do with Tao Effect news.
This weekend I saw Michael Moore&#8217;s latest film Capitalism: A Love Story. Like most of his films, this one should come with a disclaimer: for the duration of the [...]]]></description>
			<content:encoded><![CDATA[<p><i>Warning: This blog post is an opinion piece by Greg Slepak (while he searches for an appropriate medium), and has nothing to do with Tao Effect news.</i></p>
<p>This weekend I saw Michael Moore&#8217;s latest film <b>Capitalism: A Love Story</b>. Like most of his films, this one should come with a disclaimer: for the duration of the film you&#8217;ll be looking at the world through the eyes of Michael Moore and those who reflect his views. Don&#8217;t expect to see or hear any conflicting views or arguments.</p>
<p>For those that hate Moore&#8217;s films, there&#8217;s plenty in the film to nit-pick about. There&#8217;s a scene where he does his best to convince you that all Christian priests hate Capitalism and consider it an evil. Some have argued that he&#8217;s misusing the word &#8220;capitalism&#8221; altogether and should instead say &#8220;corporatism&#8221;. He also tends to group various corporate entities into a single-group. AIG, Citibank, Goldman Sachs, Bank of America, etc. All of these are placed in the group of &#8220;evil rich people bent on screwing over the lower-classes while having cocktail parties on corporate yachts.&#8221; In some cases, there is actual truth to that notion, but of course for those looking to put down Michael and nit-pick, he leaves plenty of room in his films to accommodate you.</p>
<p>However, despite the flaws, I enjoy watching Moore&#8217;s films precisely because of how rare their kind is.</p>
<p>It has been my general experience in life that many of the people that I encounter are perfectly satisfied to watch the latest action blockbuster out of hollywood, and when a movie like <i style="color:inherit">Capitalism</i> rolls out they do two things: they pass up the ticket to see it for another action blockbuster, and then proceed to lambaste his films with a level of ignorance that far exceeds anything that I&#8217;ve heard Michael Moore say.</p>
<p>What further amazes me is how successful Moore has been at getting his films to play at major theaters. There are many many other films out there that do a much better job of espousing upon the insanities of our society and yet hardly ever make it into major theaters. Documentaries like <a href="http://en.wikipedia.org/wiki/Food,_Inc.">Food Inc.</a>, <a href="http://en.wikipedia.org/wiki/Jesus_Camp">Jesus Camp</a>, <a href="http://en.wikipedia.org/wiki/The_Century_of_the_Self">The Century of Self</a> (<a href="http://video.google.com/videoplay?docid=8953172273825999151">video link</a>), <a href="http://en.wikipedia.org/wiki/Who_Killed_the_Electric_Car%3F">Who Killed the Electric Car</a>, and many others only find home to a handful of theaters across the country. These important films have been kicked out of mainstream society, to be replaced by the latest blow-em-up out of Hollywood that has sold out several times over.</p>
<p>That scenario never ceases to amaze me. How such a large amount of people, often the group that stands to benefit most from seeing movies like <i style="color:inherit">The Century of Self</i>, who often live quite miserable lives because of their complete ignorance of their surroundings, can constantly, repeatedly purchase tickets to the same exact action script that Hollywood modifies slightly on a bi-monthly basis.</p>
<p>Ironically, it may in fact be <i style="color:inherit">because</i> of the overly narrow viewpoint espoused in <i style="color:inherit">Capitalism</i>, and its heavy use of emotional content, that he is able to get it distributed so widely. I say that&#8217;s better than nothing.</p>
<p>Further, while there are many imperfections in his films, they nevertheless tend to bring up worthy causes and viewpoints into the mainstream for discussion.</p>
<p>I also have to credit <i style="color:inherit">Capitalism</i> for making me consider a thought that I hadn&#8217;t thought of before, namely,</p>
<p><b>Why do we allow corporate lobbyists and advisers at all?</b></p>
<p>It seems to me that just as we supposedly have the separation of church and state, we should institute the separation of the state from all other entities other than, of course, &#8220;the people.&#8221;</p>
<p>One thing that I&#8217;ve been astonished to learn from some of these films (Moore&#8217;s and others), is how incredibly entrenched major corporations are in the decision making of our government.</p>
<p>I considered the opposing viewpoint, that perhaps &#8220;because they represent the interests of a large amount of people and jobs&#8221; they should therefore have a strong say in policy making.</p>
<p>However, this is simply not true. Corporate interests do not include various idealized notions such as the right to a trial by jury, and even more idealized, yet worthy, concepts such as the rights to &#8220;life, liberty, and the pursuit of happiness.&#8221; Corporate interests are much simpler than that, they just want to &#8220;make a lot of money.&#8221;</p>
<p>Worse, they have demonstrated unequivocally that the way they&#8217;ll go about getting this money will often be by <i style="color:inherit">screwing over</i> their workers, and quite often, their customers as well.</p>
<p>So, it seems to me that such entities should have no place whatsoever in any policy making that affects the lives of people outside of their corporation (and in some cases even inside of their corporation). Their advice is usually, simply put: <b>bad</b>. And in the rare instances where it&#8217;s not, we certainly did not need them for it. Instead of dictating policy to our representatives, they can call in like the rest of us. Respected scientists, nutritionists, farmers and various other in-field experts make good advisers to the FDA and USDA, not the board members of Kellogg&#8217;s and Monsanto.</p>
<p>Government, people often forget, should be owned by <b>the people</b> to serve the interests of <b>the people</b>. When corporations get in the picture, the people are no longer represented, instead the interests of a very small minority is represented, usually at the expense of all the others.</p>
<p>This is what has happened to our government. Although this situation is not anything new, it&#8217;s nevertheless messed up and it&#8217;s certainly worth changing.</p>
<p>A good way to upset the status quo is simply through the spread of information and the systematic removal of ignorance. Michael Moore&#8217;s <i style="color:inherit">Capitalism: A Love Story</i>, though certainly flawed, helps to serve this purpose by bringing some of these issues to the forefront of America&#8217;s consciousness, and for that reason, I recommend you see it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.taoeffect.com/blog/2009/11/michael-moores-capitalism-a-love-story/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Espionage 2.5.4 Released!</title>
		<link>http://www.taoeffect.com/blog/2009/10/espionage-2-5-4-released/</link>
		<comments>http://www.taoeffect.com/blog/2009/10/espionage-2-5-4-released/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 17:57:25 +0000</pubDate>
		<dc:creator>Greg Slepak</dc:creator>
				<category><![CDATA[Espionage]]></category>
		<category><![CDATA[greg]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://www.taoeffect.com/blog/?p=981</guid>
		<description><![CDATA[Espionage 2.5.4 contains minor bug fixes, user interface improvements, and a compatibility fix when using Little Snitch&#8217;s Configuration utility:

IMPROVED: When adding a folder to Espionage, &#8220;passwords do not match&#8221; is not displayed until second password is entered.
IMPROVED: Wording of documentation on how to re-import (aka restore) backed up or lost encrypted folders.
IMPROVED: Switched default keychain [...]]]></description>
			<content:encoded><![CDATA[<p>Espionage 2.5.4 contains minor bug fixes, user interface improvements, and a compatibility fix when using Little Snitch&#8217;s Configuration utility:</p>
<ul class="box">
<li><b>IMPROVED:</b> When adding a folder to Espionage, &#8220;passwords do not match&#8221; is not displayed until second password is entered.</li>
<li><b>IMPROVED:</b> Wording of documentation on how to re-import (aka restore) backed up or lost encrypted folders.</li>
<li><b>IMPROVED:</b> Switched default keychain choice during install to separate keychain as it has some advantages.</li>
<li><b>FIXED:</b> Issue where Little Snitch Configuration could cause app password prompt to appear repeatedly.</li>
<li><b>FIXED:</b> Removed unnecessary error message to the log related to reodering of folders.</li>
<li><b>FIXED:</b> Rare issue where &#8220;Edit Application Associations&#8221; button could be disabled when it shouldn&#8217;t be.</li>
</ul>
<p>We decided to change the default keychain to the separate Espionage keychain for several reasons: 1) It can be slightly more secure because it encourages the use of a different password, unique to Espionage. 2) Unlike the the login keychain it will lock itself after 15 minutes of inactivity, or if your machine is put to sleep. This will cause Espionage&#8217;s main window to lock as well if Espionage is running. 3) Espionage will keep backups of the separate keychain in its application support folder.</p>
<p>For some, the only disadvantage will be an extra prompt upon login for your master password if you&#8217;ve set any folders to autounlock at login. If this is too much of an issue you can always choose the login keychain! <img src='http://www.taoeffect.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Enjoy!</p>
<p><a href="/espionage/Espionage.dmg" style="border:none"><img src="/includes/images/EspionageDL.png"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.taoeffect.com/blog/2009/10/espionage-2-5-4-released/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Espionage 2.5.3 Released!</title>
		<link>http://www.taoeffect.com/blog/2009/10/espionage-2-5-3-released/</link>
		<comments>http://www.taoeffect.com/blog/2009/10/espionage-2-5-3-released/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 20:33:29 +0000</pubDate>
		<dc:creator>Greg Slepak</dc:creator>
				<category><![CDATA[Espionage]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[greg]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://www.taoeffect.com/blog/?p=958</guid>
		<description><![CDATA[Thanks go out to Dirk for emailing us today and letting us know of a security issue whereby a folder&#8217;s password could be logged to the system log in a certain error scenario (not cool!). The issue itself is due to a typo in the code that was introduced in 2.5, versions prior to that [...]]]></description>
			<content:encoded><![CDATA[<p>Thanks go out to Dirk for emailing us today and letting us know of a security issue whereby a folder&#8217;s password could be logged to the system log in a certain error scenario (not cool!). The issue itself is due to a typo in the code that was introduced in 2.5, versions prior to that are not affected.</p>
<ul class="box">
<li><b>SECURITY:</b> [Important!] Issue introduced in 2.5 where folder password could be logged to system log on an error. (Thanks to Dirk for catching this!)</li>
<li><b>IMPROVED:</b> Background UI when no folders in Espionage.</li>
<li><b>IMPROVED:</b> Better minimum window size.</li>
</ul>
<p>On the aesthetic side of things we&#8217;ve improved Espionage&#8217;s background UI for when no folders are protected:</p>
<p><img src="http://www.taoeffect.com/blog/wp-content/uploads/2009/10/newbg_small.png" alt="New background UI" title="New background UI" width="518" height="447" class="alignnone size-full wp-image-959" /></p>
<p>If you already have Espionage installed, the easiest and fastest way to update is to choose &#8220;Check for Updates&#8221; from the Espionage menu.</p>
<p>Otherwise you can download it here:</p>
<p><a href="/espionage/Espionage.dmg" style="border:none"><img src="/includes/images/EspionageDL.png"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.taoeffect.com/blog/2009/10/espionage-2-5-3-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.553 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-03-10 16:15:09 -->
