<?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>Artisan Coder &#187; iphone</title>
	<atom:link href="http://www.artisancoder.com/tag/iphone/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.artisancoder.com</link>
	<description>Software development as a craft</description>
	<lastBuildDate>Thu, 09 Sep 2010 14:42:56 +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>Apple relaxes restriction on interpreted code</title>
		<link>http://www.artisancoder.com/2010/06/apple-relaxes-restriction-on-interpreted-code/</link>
		<comments>http://www.artisancoder.com/2010/06/apple-relaxes-restriction-on-interpreted-code/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 17:31:11 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Lua]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Scheme]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[sdk]]></category>

		<guid isPermaLink="false">http://www.artisancoder.com/?p=174</guid>
		<description><![CDATA[Apple&#8217;s iOS SDK license agreement terms have always been source of disputes, discussions and many blog posts. Many accuse Apple of being too draconian and elitist, while being ineffective at barring bad applications from entering the store. The uproar just got fueled when Apple released the 4.0 version of the SDK with a new license [...]]]></description>
			<content:encoded><![CDATA[<p>Apple&#8217;s iOS SDK license agreement terms have always been source of disputes, discussions and many blog posts. Many accuse Apple of being too draconian and elitist, while being ineffective at barring bad applications from entering the store. The uproar just got fueled when Apple released the 4.0 version of the SDK with a new license agreement, changing</p>
<blockquote>
<p>3.3.1 — Applications may only use Documented APIs in the manner prescribed by Apple and must not use or call any private APIs.</p>
</blockquote>
<p>to</p>
<blockquote>
<p>3.3.1 — Applications may only use Documented APIs in the manner prescribed by Apple and must not use or call any private APIs. Applications must be originally written in Objective-C, C, C++, or JavaScript as executed by the iPhone OS WebKit engine, and only code written in C, C++, and Objective-C may compile and directly link against the Documented APIs (e.g., Applications that link to Documented APIs through an intermediary translation or compatibility layer or tool are prohibited).</p>
</blockquote>
<p>The intended effect is obviously to ban third-party abstraction layers, like then soon-to-be-released <a href="http://labs.adobe.com/technologies/flashcs5/appsfor_iphone/" title="Adobe Flash">Adobe&#8217;s Flash for iPhone</a>. But the wording is very broad and cover too many uses of other programming languages and technologies. Steve Jobs demoed himself the Tap Tap Revenge game for iPhone, which <a href="http://blog.anscamobile.com/2010/04/lua-the-lingua-franca-of-iphone-games/" title="Lua, the lingua franca of iPhone games">reportedly uses Lua</a>. The backslash was too big to ignore, making Apple revise the agreement again. This time section 3.3.2 was changed from</p>
<blockquote>
<p>3.3.2 &#8211; No interpreted code may be downloaded or used in an Application except for code that is interpreted and run by Apple’s Documented APIs and built-in interpreter(s).﻿</p>
</blockquote>
<p>to</p>
<blockquote>
<p>3.3.2 &#8211; Unless otherwise approved by Apple in writing, no interpreted code may be downloaded or used in an Application except for code that is interpreted and run by Apple’s Documented APIs and built-in interpreter(s). Notwithstanding the foregoing, with Apple’s prior written consent, an Application may use embedded interpreted code in a limited way if such use is solely for providing minor features or functionality that are consistent with the intended and advertised purpose of the Application.﻿</p>
</blockquote>
<p>Although still requiring Apple&#8217;s prior written approval, it leaves the door open for the use of other programming languages on iOS devices. Apple Outsider <a href="http://www.appleoutsider.com/2010/06/10/hello-lua/" title="Hello, Lua">believes</a> this is all about Lua, and he may be right. But of course Lua is not the only game in town.</p>
<p>I always thought <a href="http://www.artisancoder.com/2009/10/scheme-hits-the-app-store/" title="Scheme hits the App Store">my use of Scheme</a> in Reverso was ok with the previous version of the license agreement. No code is ever downloaded, and not interpreted either; Gambit-C compiles Scheme code to C which is compiled with Apple&#8217;s official tools to create a native library. But this changed with the new 3.3.1 section because my code was not originally written in one of the approved languages. <a href="http://jlongster.posterous.com/" title="jlongster’s posterous">James Long</a>, who first compiled Gambit-C for the iPhone, claimed that <a href="http://jlongster.com/blog/2010/04/09/scheme-dead-iphone/" title="Scheme is also dead on the iPhone">Scheme was dead on the iPhone</a>. But then Apple relented and changed section 3.3.2. What about now?</p>
<p>I believe that makes Scheme usable again, if used just like in Reverso: as a library. The application is written in Objective-C, but uses Scheme code (compiled to C) to only add features &#8220;that are consistent with the intended and advertised purpose of the Application&#8221;. Albeit it can be claimed that the code is not interpreted, this use follows the spirit of the law, even if it does not follow its letter.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.artisancoder.com/2010/06/apple-relaxes-restriction-on-interpreted-code/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Scheme hits the App Store</title>
		<link>http://www.artisancoder.com/2009/10/scheme-hits-the-app-store/</link>
		<comments>http://www.artisancoder.com/2009/10/scheme-hits-the-app-store/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 19:32:47 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Lisp]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Scheme]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[othello]]></category>
		<category><![CDATA[reversi]]></category>

		<guid isPermaLink="false">http://www.ventonegro.org/?p=123</guid>
		<description><![CDATA[I believe I have got the first Scheme application past Apple review into the iTunes App Store. It is yet another Reversi clone, called Reverso. It is a combination of 90% Scheme and 10% Objective-C, written with Gambit-C Scheme. James Long has already shown how to compile Gambit-C for the iPhone, and I started from [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.dunasystems.com.br/reverso/images/revlogo.png" alt="Reverso logo" style="float:left;padding:20px;" /></p>
<p>I believe I have got the first Scheme application past Apple review into the iTunes App Store. It is yet another <a href="http://en.wikipedia.org/wiki/Reversi" title="Reversi">Reversi</a> clone, called <a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=334979538&#038;mt=8" title="Reverso">Reverso</a>. It is a combination of 90% Scheme and 10% Objective-C, written with <a href="http://dynamo.iro.umontreal.ca/~gambit/wiki/index.php/Main_Page" title="Gambit-C">Gambit-C Scheme</a>. James Long has already <a href="http://jlongster.com/blog/2009/06/17/write-apps-iphone-scheme/" title="Writing apps for the iPhone in Scheme">shown how to compile Gambit-C for the iPhone</a>, and I started from there. My Scheme code is compiled to C by Gambit and later by GCC to produce native ARM code, bundled in a static library, which is ok with the iPhone SDK license agreement. The Objective-C then calls the library as a pure C library. The Scheme code deals with position evaluation, alpha-beta pruning, transposition tables, move legality, different strategies and so on. The Objective-C code deals with sound, animations, GUI, user preferences, basically everything that calls the iPhone OS API. Reversi was chosen because I like strategy games and it is much more algorithmic than artistic, and I am no artist.</p>
<p>The performance of the code is excellent. I used some Gambit-specific declarations, only fixnum arithmetic, pre-allocated a large heap, and called the garbage-collector every time the user needed to think. The search is not memory intensive, but the transposition tables are. I did not write a specific hash function but relied on Gambit-C&#8217;s table type. The boards used during search were retrieved from a pool (the newest Gambit-C has made <tt>subu8vector-move!</tt> a public API), so they did not put pressure on the garbage-collector. In the end it was a very successful experiment. Developing with Scheme is orders of magnitude more productive than with most other languages. Gambit-C is also one of the best Scheme compilers out there, and made my job a lot easier.</p>
<p><strong>Update</strong>: There was a bug in the application that caused it to play poorly. The weak AI was not Gambit&#8217;s or Scheme&#8217;s fault, but mine. I already sent an updated version to Apple that will play much better. Besides fixing the bug, I am now using Zobrist&#8217;s hashing instead of Gambit&#8217;s own hash function, that performs poorly for game positions. It is still written in Scheme, though. Now I am waiting for the approval of the update, and to hear further feedback from my users. <img src='http://www.artisancoder.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.artisancoder.com/2009/10/scheme-hits-the-app-store/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Is the App Store the way?</title>
		<link>http://www.artisancoder.com/2009/07/is-the-app-store-the-way/</link>
		<comments>http://www.artisancoder.com/2009/07/is-the-app-store-the-way/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 15:36:15 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Career]]></category>
		<category><![CDATA[freelancing]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://www.ventonegro.org/?p=109</guid>
		<description><![CDATA[Last year I chose some goals for my career: Work with very clever people or alone, from home Work with good development tools, i.e., Git, Mercurial, Emacs etc. Work with good programming languages, i.e., Scheme (first choice), Haskell, Common Lisp or Lua These goals are intended to guarantee my long term happiness and stress-free high [...]]]></description>
			<content:encoded><![CDATA[<p>Last year I chose some goals for my career:</p>
<ul>
<li>Work with very clever people or alone, from home</li>
<li>Work with good development tools, i.e.,  Git, Mercurial, Emacs etc.
<li>Work with good programming languages, i.e., Scheme (first choice), Haskell, Common Lisp or Lua</li>
</ul>
<p>These goals are intended to guarantee my long term happiness and stress-free high productivity. I mean a rewarding professional life. So far I could not attain any of them. Here in Brazil the chance of getting a regular job with these traits is nil. I began then to look for freelancing work, but I could only find worthless Java/PHP/ASP/VB/etc. projects. Unfortunately, here, those are the &#8220;high-tech&#8221; jobs.</p>
<p>As seen in my previous post, it is possible to use Scheme to develop for the iPhone and for the iPod Touch. Developing for the App Store has the potential of fulfilling my goals. Of course it is an already crowded market, but so far it seems to be the only way out. So I paid Apple and registered as an iPhone developer. Let&#8217;s see what I can come up with.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.artisancoder.com/2009/07/is-the-app-store-the-way/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
	</channel>
</rss>
