<?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>rel=me &#187; Airake</title>
	<atom:link href="http://rel.me/c/airake/feed/" rel="self" type="application/rss+xml" />
	<link>http://rel.me</link>
	<description>programming, objective-c, cocoa, iphone, c</description>
	<lastBuildDate>Mon, 02 Aug 2010 20:09:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>popen&#8217;ing part 2</title>
		<link>http://rel.me/2007/11/09/popen-ing-and-why-you-should-rtfm-before-blogging/</link>
		<comments>http://rel.me/2007/11/09/popen-ing-and-why-you-should-rtfm-before-blogging/#comments</comments>
		<pubDate>Fri, 09 Nov 2007 06:35:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Airake]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[process]]></category>

		<guid isPermaLink="false">/2007/11/11/popen-ing-and-why-you-should-rtfm-before-blogging</guid>
		<description><![CDATA[I guess I should rtfm before blogging about something. This is my new IO.popen block which allows you to run a process which wants input, like the adt (Adobe Debug Tool) package task (which asks for your certificate password): IO.popen&#40;@cmd&#41; do &#124;f&#124; while s = f.read&#40;1&#41; printf s STDOUT.flush end end @process = $? View [...]]]></description>
			<content:encoded><![CDATA[<p>I guess I should <a href="http://www.ruby-doc.org/core/classes/IO.html#M002267">rtfm</a> before blogging about something. This is my new IO.popen block which allows you to run a process which wants input, like the adt (Adobe Debug Tool) package task (which asks for your certificate password):</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span class="kw4">IO</span>.<span class="me1">popen</span><span class="br0">&#40;</span>@cmd<span class="br0">&#41;</span> <span class="kw1">do</span> <span class="sy0">|</span>f<span class="sy0">|</span>                        
  <span class="kw1">while</span> s = f.<span class="me1">read</span><span class="br0">&#40;</span><span class="nu0">1</span><span class="br0">&#41;</span>
    <span class="kw3">printf</span> s
    STDOUT.<span class="me1">flush</span>
  <span class="kw1">end</span>
<span class="kw1">end</span>
<span class="re1">@process</span> = $?</pre></div></div>

<p>View the <a href="http://airake.rubyforge.org/svn/trunk/lib/airake/runner.rb">airake/runner.rb</a>. The <a href="http://www.ruby-doc.org/core/classes/IO.html#M002295">IO.read</a> call if not given args will block until EOF. This means we can&#8217;t output anything until the process ends which makes it appear hung if its asking for input. The waitpid call in the previous version just picks up the Process::Status since the read was the blocking call, but you can get that from $? after the popen block returns. I needed to add the STDOUT flush since printf isn&#8217;t guaranteed to (and wasn&#8217;t) outputing on the adt password input since I think it waits for a newline. Also this totally works on windows, although the whole read char + printf + flush makes it feel like a typewriter. This might be solved by using the <a href="http://www.ruby-doc.org/core/classes/IO.html#M002292">IO.read_nonblock</a> method. I&#8217;ll need to look into that.</p>
<p>Also, I updated the blog css, which I was told was depressing. Now its a total ripoff of <a href="http://coudal.com">coudal.com</a> instead of <a href="http://danwebb.net">danwebb.net</a></p>
]]></content:encoded>
			<wfw:commentRss>http://rel.me/2007/11/09/popen-ing-and-why-you-should-rtfm-before-blogging/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>popen&#8217;ing</title>
		<link>http://rel.me/2007/11/07/popen-your-new-best-friend/</link>
		<comments>http://rel.me/2007/11/07/popen-your-new-best-friend/#comments</comments>
		<pubDate>Wed, 07 Nov 2007 06:06:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Airake]]></category>
		<category><![CDATA[Rake]]></category>
		<category><![CDATA[process]]></category>

		<guid isPermaLink="false">/2007/11/08/popen-your-new-best-friend</guid>
		<description><![CDATA[I updated airake to work on windows (thanks Todd). Instead of using system (or %x), I am trying IO.popen: IO.popen&#40;@cmd&#41; do &#124;f&#124; @output = f.read @process = Process.waitpid2&#40;f.pid&#41;&#91;1&#93; end and in windows you&#8217;ll need to cmd.exe /c it: @cmd = RUBY_PLATFORM =~ /win32/ ? &#34;cmd.exe /c #{cmd}&#34; : cmd This thread was helpful and I [...]]]></description>
			<content:encoded><![CDATA[<p>I updated <a href="http://airake.rubyforge.org">airake</a> to work on windows (thanks <a href="http://rubyforge.org/tracker/index.php?func=detail&#038;aid=13976&#038;group_id=4337&#038;atid=16700">Todd</a>). Instead of using system (or %x), I am trying IO.popen:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span class="kw4">IO</span>.<span class="me1">popen</span><span class="br0">&#40;</span>@cmd<span class="br0">&#41;</span> <span class="kw1">do</span> <span class="sy0">|</span>f<span class="sy0">|</span>
  <span class="re1">@output</span> = f.<span class="me1">read</span>
  <span class="re1">@process</span> = <span class="kw4">Process</span>.<span class="me1">waitpid2</span><span class="br0">&#40;</span>f.<span class="me1">pid</span><span class="br0">&#41;</span><span class="br0">&#91;</span><span class="nu0">1</span><span class="br0">&#93;</span>
<span class="kw1">end</span></pre></div></div>

<p>and in windows you&#8217;ll need to cmd.exe /c it:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span class="re1">@cmd</span> = RUBY_PLATFORM =~ <span class="sy0">/</span>win32<span class="sy0">/</span> ? <span class="st0">&quot;cmd.exe /c #{cmd}&quot;</span> : cmd</pre></div></div>

<p>This <a href="http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/a274d5d47feae95">thread</a> was helpful and I popened a new <a href="http://airake.rubyforge.org/svn/trunk/lib/airake/runner.rb">airake/runner.rb</a> version. The FCSH daemon still doesn&#8217;t work in windows yet.</p>
]]></content:encoded>
			<wfw:commentRss>http://rel.me/2007/11/07/popen-your-new-best-friend/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>browsair &#8211; Letting sites live in your dock</title>
		<link>http://rel.me/2007/10/13/browsair/</link>
		<comments>http://rel.me/2007/10/13/browsair/#comments</comments>
		<pubDate>Sat, 13 Oct 2007 22:28:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Airake]]></category>
		<category><![CDATA[browsair]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[google reader]]></category>

		<guid isPermaLink="false">/2007/11/08/browsair</guid>
		<description><![CDATA[I wrote an AIR project generator for airake called browsair. It will build you a AIR webkit browser app targeted at a web site, so you can let it live in you dock (or tray whatever), instead of that 4th tab on the 2nd firefox window. Theoretically someone could make a packaged browser + greasemonkey [...]]]></description>
			<content:encoded><![CDATA[<p>I wrote an AIR project generator for <a href="http://airake.rubyforge.org">airake</a> called <a href="http://airake.rubyforge.org/browsair.html">browsair</a>. It will build you a AIR webkit browser app targeted at a web site, so you can let it live in you dock (or tray whatever), instead of that 4th tab on the 2nd firefox window.</p>
<p>Theoretically someone could make a packaged browser + greasemonkey + stylish AIR app for particular web sites that growl notifies and lives in the dock and be more in your face; but this scaffold right now is pretty basic.</p>
<p>I should also mention there is a website called <a href="http://airifier.com/">airifier</a> which does this as well, except I think they  give you a packaged app only, without the source.</p>
<p>I also got a bunch of fixes into this version of airake; packaging is fixed, and there is a task for creating certificates, among other things. I just deployed version 0.2.4 to rubyforge so it should be up by the time you read this.</p>
<p>The usage:</p>
<pre style="margin: 0 1em 1em 2em">browsair GReader http://reader.google.com path/to/rss_icon_128x128.png</pre>
<p>Creates an AIR project for a google reader AIR app. In the GReader project, run:</p>
<pre style="margin: 0 1em 1em 2em">rake air:package CERTIFICATE=path/to/cert.pfx</pre>
<p>If you need to generate a certificate:</p>
<pre style="margin: 0 1em 1em 2em">rake air:certificate CERTIFICATE=../ducktyper.pfx</pre>
<p>I built a couple already if you want to bypass all that compiling:</p>
<ul>
<li>Google Reader &#8211; <a href="http://browsair.s3.amazonaws.com/GReader.air">GReader.air</a></li>
<li>Facebook &#8211; <a href="http://browsair.s3.amazonaws.com/Facebook.air">Facebook.air</a></li>
</ul>
<p>(If you don&#8217;t have the AIR runtime installed, get it <a href="http://labs.adobe.com/downloads/air.html">here</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://rel.me/2007/10/13/browsair/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updated airake to support AIR/Flex Beta 2</title>
		<link>http://rel.me/2007/10/05/updated-airake-to-support-air-flex-beta-2/</link>
		<comments>http://rel.me/2007/10/05/updated-airake-to-support-air-flex-beta-2/#comments</comments>
		<pubDate>Fri, 05 Oct 2007 05:06:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Airake]]></category>
		<category><![CDATA[Rake]]></category>
		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">/2007/11/08/updated-airake-to-support-air-flex-beta-2</guid>
		<description><![CDATA[I updated airake to support new AIR/Flex beta 2 build. sudo gem update airake I changed the fcsh tasks to: rake fcsh:start rake fcsh:stop rake fcsh:restart]]></description>
			<content:encoded><![CDATA[<p>I updated <a href="http://airake.rubyforge.org/">airake</a> to support new AIR/Flex beta 2 build.</p>
<pre style="margin:0pt 3em 1em 2em;">sudo gem update airake</pre>
<p>I changed the fcsh tasks to:</p>
<pre style="margin:0pt 3em 1em 2em;">rake fcsh:start
rake fcsh:stop
rake fcsh:restart
</pre>
]]></content:encoded>
			<wfw:commentRss>http://rel.me/2007/10/05/updated-airake-to-support-air-flex-beta-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>airake &#8211; Rake tasks and generators for adobe AIR apps</title>
		<link>http://rel.me/2007/09/11/airake-rake-tasks-and-generators-for-adobe-air-apps/</link>
		<comments>http://rel.me/2007/09/11/airake-rake-tasks-and-generators-for-adobe-air-apps/#comments</comments>
		<pubDate>Tue, 11 Sep 2007 03:03:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Airake]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Rake]]></category>
		<category><![CDATA[Rakefile]]></category>
		<category><![CDATA[tasks]]></category>

		<guid isPermaLink="false">/2007/11/08/airake-rake-tasks-and-generators-for-adobe-air-apps</guid>
		<description><![CDATA[airake gives you tasks for compiling, debugging, testing and packaging Adobe AIR applications. It also has a basic project generator/scaffold. All this was made possible because of the prolific newgem and rubigen gems. To get started, checkout airake.rubyforge.org The tasks and project might be a little Flex specific (cause of the particular project we are [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://airake.rubyforge.org">airake</a> gives you tasks for compiling, debugging, testing and packaging Adobe AIR applications. It also has a basic project generator/scaffold. All this was made possible because of the prolific <a href="http://newgem.rubyforge.org/">newgem</a> and <a href="http://rubigen.rubyforge.org/">rubigen</a> gems.</p>
<p>To get started, checkout <a href="http://airake.rubyforge.org">airake.rubyforge.org</a></p>
<p>The tasks and project might be a little Flex specific (cause of the particular project we are working on), so feel free to poke around or contribute back. Also I only tested it on MacOSX.</p>
<p>Some of the FCSH (flex compiler shell) daemon and wrappers are from the <a href="http://code.google.com/p/projectsprouts/">Sprout</a> project, so be sure to check them out.</p>
]]></content:encoded>
			<wfw:commentRss>http://rel.me/2007/09/11/airake-rake-tasks-and-generators-for-adobe-air-apps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
