<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>blog.joa-ebert.com - Blog of Joa Ebert</title>
	
	<link>http://blog.joa-ebert.com</link>
	<description>Actionscript3, Flash, Scala, Java, C#, C++, Algorithms &amp; Imageprocessing</description>
	<lastBuildDate>Tue, 07 Sep 2010 08:35:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/je2050" /><feedburner:info uri="je2050" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>PixelBender Support In Apparat</title>
		<link>http://feedproxy.google.com/~r/je2050/~3/vKIny04HQVs/</link>
		<comments>http://blog.joa-ebert.com/2010/09/07/pixelbender-support-in-apparat/#comments</comments>
		<pubDate>Tue, 07 Sep 2010 08:35:38 +0000</pubDate>
		<dc:creator>joa</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[hydra]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[apparat]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[pixelbender]]></category>

		<guid isPermaLink="false">http://blog.joa-ebert.com/?p=651</guid>
		<description><![CDATA[Since PixelBender is becomming a more popular technolog [...]]]></description>
			<content:encoded><![CDATA[<p>Since PixelBender is becomming a more popular technology in the Flash ecosystem I decided to add first-class Apparat support for it.</p>
<p>As you <a href="http://blog.joa-ebert.com/2008/09/08/pixelbender-runtime-compilation/" title="PixelBender Runtime Compilation" target="_self">might know</a> I have done a couple of <a href="http://blog.joa-ebert.com/2008/10/08/pixelbender-outline-view/" title="PixelBender Outline View" target="_self">different</a> <a href="http://blog.joa-ebert.com/pbdt/" target="_self" title="PBDT">tools</a> for PixelBender already.</p>
<p>When I switched to Linux a while ago I had to discover that there is no compiler for PixelBender available and also no PixelBender toolkit. Even PBDT does not work on Linux since it requires a compiler.</p>
<p>In the current state Apparat can read and write PBJ files. I already implemented the format two years ago for the outline view plug-in. But this time <a href="http://ncannasse.fr/" target="_blank" title="Nicolas Cannasse">Nicolas Cannasse&#8217;s</a> great work on the <a href="http://hxformat.googlecode.com/" title="hxformat" target="_blank">hxformat</a> library was my reference. </p>
<p>I will add two optimizations specific for PBJ files. TAAS will not be used here since it is only an unnecessary overhead.  You do not have to crack a nut with a sledgehammer. The PBJ format is already register based and has certain useful invariants.</p>
<p>To cleanup some mistakes of the PixelBender compiler I will add:</p>
<ul>
<li>Copy propagation</li>
<li>Dead Code Elimination</li>
</ul>
<p>The compiler is not bad. Compared to the ASC it is a beauty of technology that makes use of the <a href="http://www.llvm.org/" target="_blank" title="LLVM">LLVM</a>. However I think there must be some mistake in the code since unnecessary registers are used (Note: I doubt this is LLVMs fault but more the way how methods like sampleNearest are bound by Adobe). This can be solved with the simple optimizations I will add.</p>
<p>I will add some more things as well like a GLSL conversion or a DSL to write PixelBender kernels in Scala. If we get lucky this will also lead to a true cross platform opensource compiler for the PixelBender language. I think I will name that compiler <i>Hydra</i> :P
<div class="tweetmeme_button" style="float: right; margin-right: 10px; margin-top: 38px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.joa-ebert.com%2F2010%2F09%2F07%2Fpixelbender-support-in-apparat%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.joa-ebert.com%2F2010%2F09%2F07%2Fpixelbender-support-in-apparat%2F&amp;source=joa&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.joa-ebert.com/2010/09/07/pixelbender-support-in-apparat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.joa-ebert.com/2010/09/07/pixelbender-support-in-apparat/</feedburner:origLink></item>
		<item>
		<title>So I Recorded A New Video</title>
		<link>http://feedproxy.google.com/~r/je2050/~3/SDN9LB9YA_w/</link>
		<comments>http://blog.joa-ebert.com/2010/08/31/so-i-recorded-a-new-video/#comments</comments>
		<pubDate>Tue, 31 Aug 2010 12:38:49 +0000</pubDate>
		<dc:creator>joa</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[experiments]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[apparat]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jitb]]></category>
		<category><![CDATA[jvm]]></category>
		<category><![CDATA[taas]]></category>

		<guid isPermaLink="false">http://blog.joa-ebert.com/?p=647</guid>
		<description><![CDATA[

This time recorded on Ubuntu. Did I mention 64bit a [...]]]></description>
			<content:encoded><![CDATA[<div align="center"><object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/atzHF7YGp6Y?fs=1&amp;hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/atzHF7YGp6Y?fs=1&amp;hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object></div>
<p>This time recorded on Ubuntu. Did I mention 64bit already?<br />
Do not miss my session at <a href="http://www.flashonthebeach.com/" target="_blank">FOTB</a> for a live demo.
<div class="tweetmeme_button" style="float: right; margin-right: 10px; margin-top: 38px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.joa-ebert.com%2F2010%2F08%2F31%2Fso-i-recorded-a-new-video%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.joa-ebert.com%2F2010%2F08%2F31%2Fso-i-recorded-a-new-video%2F&amp;source=joa&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.joa-ebert.com/2010/08/31/so-i-recorded-a-new-video/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		<feedburner:origLink>http://blog.joa-ebert.com/2010/08/31/so-i-recorded-a-new-video/</feedburner:origLink></item>
		<item>
		<title>Putting Things In Perspective</title>
		<link>http://feedproxy.google.com/~r/je2050/~3/PkQUX5xU6cQ/</link>
		<comments>http://blog.joa-ebert.com/2010/08/30/putting-things-in-perspective/#comments</comments>
		<pubDate>Mon, 30 Aug 2010 16:34:18 +0000</pubDate>
		<dc:creator>joa</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[experiments]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[apparat]]></category>
		<category><![CDATA[avm]]></category>
		<category><![CDATA[jitb]]></category>
		<category><![CDATA[jvm]]></category>

		<guid isPermaLink="false">http://blog.joa-ebert.com/?p=642</guid>
		<description><![CDATA[I am back home in Germany from my trip to San Francisco [...]]]></description>
			<content:encoded><![CDATA[<p>I am back home in Germany from my trip to San Francisco where I initially announced JITB at <a href="http://www.fitc.ca/" target="_blank" title="FITC">FITC</a>. I did not expect it to get around that quickly and that a quick-and-dirty video filmed with my phone would get so much coverage.</p>
<p>I want to put a lot of things regarding JITB in perspective here as a followup to the various comments that I received via mail, reddit, etc.</p>
<h3>Flash Replacement</h3>
<p>JITB is not a Flash replacement. Imagine a F1 race car and a family van. The family van comes with air conditioning, a radio and a lot of comfort. For the F1 car you will probably have to wear a helmet and need an engineering team to get it running.<br />
The important factor for me is that JITB will run very fast under certain conditions. A race car is also not a jeep. JITB will not support all features of the Flash Player. If you search for a Flash replacement you might want to take a look at  <a href="http://sourceforge.net/apps/trac/lightspark" target="_blank">lightspark</a>.</p>
<h3>Performance</h3>
<p>Java is slow and the world is flat. That being said I will not talk about Java performance. JITB compiles to native Java code with a certain overhead. An ActionScript 3 closure is converted into an anonymous class for instance.<br />
JITB converts ActionScript 3 bytecode to Java bytecode at runtime and performs various optimizations. This way we can leverage the speed of the JVM for ActionScript and get great results.<br />
That being said there is also a problem of course. Startup time is not very good. JITB and its parent project Apparat are implemented in the <a href="http://www.scala-lang.org/" target="_blank">Scala</a> programming language and written for multi core architectures. The startup costs are high and JITB is only useful for long living applications. However compiling ActionScript to Java can be done <a href="http://en.wikipedia.org/wiki/AOT_compiler" target="_blank" title="AOT compiler on Wikipedia">AOT</a>. This means you need to deal only with the normal JVM startup time. The Flash Player API is implemented in pure Java.</p>
<p>The compiler used for JITB is doing relatively naive optimizations at the moment. Namely constant folding, copy propagation, dead code elimination and strength reduction. An older proof of concept version I implemented a year ago featured also loop invariant code motion, inline expansion and tail-recursive optimizations. The new compiler framework is very powerful and I will add even more algorithms and a graph coloring register allocator for example. So there is some more NP-complete fun ahead making startup time even worse.</p>
<h3>Purpose</h3>
<p>We need a Flash Player that performs very fast for special purposes. We could use JITB at <a href="http://www.audiotool.com/" target="_blank" title="Audiotool">Audiotool</a> to render mixdowns of tracks or other companies could use it to run their ActionScript code on the server side. You can use JITB to create an offline application that runs on a client machine. You can hack JITB to do what you want. Someone could potentially write a web framework for ActionScript and you could execute that code on Google App Engine if compiled AOT. And it is definitly possible to create Android applications using ActionScript. JITB&#8217;s terrain is everything but the browser in my opinion. However I can imagine that someone would be interested in creating a plugin version. With some <del datetime="2010-08-30T16:00:23+00:00">clever</del> simple caching algorithms it could make sense to get around startup costs but I am not interested in doing this. </p>
<h3>Legal</h3>
<p>There are no legal obligations to face since both the AVM2 and SWF specifications are published by Adobe. It is also not illegal to compile code for the JVM.</p>
<h3>ActionScript Subset</h3>
<p>By &#8220;a subset of the language&#8221; I really mean the language and not the API. JITB supports currently only statically typed ActionScript code. However the internal language model can be adjusted to support dynamic typing as well and with Java 7 things got even easier. In fact JITB does support dynamic code as long as it is able to infer types correct. Does this mean that I am willing to implement the full Flash Player API all by myself? Hell no.</p>
<p>In the next weeks I will probably create a better example that is easier to understand and get some other stuff ready so that you can try everything for yourself.
<div class="tweetmeme_button" style="float: right; margin-right: 10px; margin-top: 38px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.joa-ebert.com%2F2010%2F08%2F30%2Fputting-things-in-perspective%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.joa-ebert.com%2F2010%2F08%2F30%2Fputting-things-in-perspective%2F&amp;source=joa&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.joa-ebert.com/2010/08/30/putting-things-in-perspective/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		<feedburner:origLink>http://blog.joa-ebert.com/2010/08/30/putting-things-in-perspective/</feedburner:origLink></item>
		<item>
		<title>Introducing JITB</title>
		<link>http://feedproxy.google.com/~r/je2050/~3/DKnOpXG_Nic/</link>
		<comments>http://blog.joa-ebert.com/2010/08/19/introducing-jitb/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 02:07:41 +0000</pubDate>
		<dc:creator>joa</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[experiments]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[apparat]]></category>
		<category><![CDATA[fitc]]></category>
		<category><![CDATA[flashplayer]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jitb]]></category>
		<category><![CDATA[opengl]]></category>
		<category><![CDATA[san francisco]]></category>

		<guid isPermaLink="false">http://blog.joa-ebert.com/?p=636</guid>
		<description><![CDATA[
My talk at FITC San Francisco is over and I want to s [...]]]></description>
			<content:encoded><![CDATA[<div align="center"><object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/EMm893PRDJM?fs=1&amp;hl=de_DE"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/EMm893PRDJM?fs=1&amp;hl=de_DE" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object></div>
<p>My talk at FITC San Francisco is over and I want to share some of the anouncements from today with you. At the end of my talk I was showing <a href="http://www.youtube.com/watch?v=-IXvf17GWVI" target="_blank" title="JITB">JITB</a>.</p>
<p>What you see in the YouTube video I posted a while ago is a Java program executing a SWF. For FITC I added some more code and an OpenGL based Display List renderer. In other words: I wrote a Flash Player.</p>
<p>However I should rephrase that statement and say I am attempting to build a Flash Player. The current state is available in the <a href="http://code.google.com/r/joaebert-sf2010-sprint/source/list" target="_blank" title="sf2010-sprint clone">sf2010-sprint</a> clone of Apparat. I will merge the changes into the main Apparat branch when I am back home in Germany.</p>
<p>JITB is currently able to translate a subset of ActionScript code at runtime into Java bytecode and runs nearly at the same speed as native Java. This is a really huge improvement compared to standard ActionScript performance. A lot of smart people worked on the JVM and made it really fast. Apparat will allow you to leverage all this hard work in the future. I am also shooting for Java interoperability at some level so that you can call Java classes from within ActionScript. Hopefully you will be able to use JITB on your desktop machine, on a server or on an Android phone. Basically everywhere Java runs.</p>
<p>There are still a lot of things missing. The whole Flash API needs to be implemented. And the Display List rendering needs a proper OpenGL implementation. However I thought this might be some cool stuff to share with you in its early stages.<br />
My hope is that more people start contributing to the project. Maybe some OpenGL guru wants to take care of the Display List rendering or someone else likes to help implement the Flash API in Java.</p>
<p>I also showed a Raytracer by Nico Zimmermann during my presentation and promised to put the URL on my blog so here it is. His company is called Britzpetermann and the address is <a href="http://www.britzpetermann.com/" target="_blank" title="Britzpetermann">http://www.britzpetermann.com/</a>.</p>
<p><b>Update:</b> Please do not think that this implementation is 30x faster than the Flash Player developed by Adobe. One(!) microbenchmark is never a number you should count on. I would like to make clear that I never said this.
<div class="tweetmeme_button" style="float: right; margin-right: 10px; margin-top: 38px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.joa-ebert.com%2F2010%2F08%2F19%2Fintroducing-jitb%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.joa-ebert.com%2F2010%2F08%2F19%2Fintroducing-jitb%2F&amp;source=joa&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.joa-ebert.com/2010/08/19/introducing-jitb/feed/</wfw:commentRss>
		<slash:comments>46</slash:comments>
		<feedburner:origLink>http://blog.joa-ebert.com/2010/08/19/introducing-jitb/</feedburner:origLink></item>
		<item>
		<title>Apparat RC6: Say Hello To An Old Friend</title>
		<link>http://feedproxy.google.com/~r/je2050/~3/xifk7iAzHHY/</link>
		<comments>http://blog.joa-ebert.com/2010/07/28/apparat-rc6-say-hello-to-an-old-friend/#comments</comments>
		<pubDate>Wed, 28 Jul 2010 16:43:53 +0000</pubDate>
		<dc:creator>joa</dc:creator>
				<category><![CDATA[misc]]></category>
		<category><![CDATA[apparat]]></category>
		<category><![CDATA[as3c]]></category>
		<category><![CDATA[inline asm]]></category>
		<category><![CDATA[patrick le clec'h]]></category>

		<guid isPermaLink="false">http://blog.joa-ebert.com/?p=628</guid>
		<description><![CDATA[Patrick Le Clec'h is an active committer to the Apparat [...]]]></description>
			<content:encoded><![CDATA[<p>Patrick Le Clec&#8217;h is an <a href="https://www.ohloh.net/p/apparat/contributors" target="_blank" title="Apparat Contributors">active committer</a> to the <a href="http://apparat.googlecode.com/" target="_blank" title="Apparat on Googlecode">Apparat</a> project and recently we just merged his work into the main branch. With a couple of other changes this is now a good time for another release candidate. Patrick added a good old friend to Apparat: The <code>__asm</code> function. You might remember <code>__asm</code> from my work on the now deprecated <a href="http://as3c.googlecode.com/" target="_blank" title="AS3C on Googlecode">AS3C</a> project.</p>
<p>However the Apparat version is much better. First of all we have put a lot of work into Apparat to make such transformations rock-solid. AS3C had its issues and was never a reliable tool. But there are a lot of new great features Patrick implemented. You can mix AS3 in your bytecode as well. <code>__as3</code> is the best friend of <code>__asm</code>. Because sometimes writing pure bytecode is very verbose and not necessary.</p>
<p>A simple <code>trace('Hello World!')</code> with pure bytecode would look like this. Please note the <code>FindPropStrict</code> and <code>CallPropVoid</code> operations which reference <code>trace</code>.</p>
<p><code>
<pre>__asm(
  FindPropStrict(AbcQName('trace', AbcNamespace(NamespaceKind.PACKAGE, ''))),
  PushString('Hello World!'),
  CallPropVoid(AbcQName('trace', AbcNamespace(NamespaceKind.PACKAGE, '')), 1)
);</pre>
<p></code></p>
<p>Finding the object in the correct namespace is often a very cumbersome task. Thanks to <code>__as3</code> we can also write this in a much more conciese way.</p>
<p><code>
<pre>__asm(
  FindPropStrict(__as3(trace)),
  PushString('Hello World!'),
  CallPropVoid(__as3(trace), 1)
);</pre>
<p></code></p>
<p>Note that the ASM compiler will try to guess the required name once it is requested by an operation. You can use <code>__as3</code> also for other tasks.</p>
<p><code>
<pre>
var x: int = 1;
__asm(
  FindPropStrict(__as3(trace)),
  __as3(x < 10),
  CallPropVoid(__as3(trace), 1)
);
</pre>
<p></code></p>
<p>This would trace "true" for instance. If you are curious about the ASM syntax I can recommend you using the dump tool. It produces code which is nearly <code>__asm</code>-ready. We will probably write another output so you can directly transform existing code to <code>__asm</code> calls.</p>
<p>If you are interested in some more examples the Apparat Math replacements make use of <code>__asm</code> now as well. <a href="http://code.google.com/p/apparat/source/browse/apparat-ersatz/src/main/as3/apparat/math/IntMath.as" target="_blank" title="Apparat IntMath">IntMath</a> is a good example for an inlined class where you are using maybe a simple method like <code>IntMath.abs</code> and the heavy lifting is done behind the scenes using inline assembler. To use the ASM expansion you have to process your SWF file with TDSI. It is by default turned on.
<div class="tweetmeme_button" style="float: right; margin-right: 10px; margin-top: 38px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.joa-ebert.com%2F2010%2F07%2F28%2Fapparat-rc6-say-hello-to-an-old-friend%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.joa-ebert.com%2F2010%2F07%2F28%2Fapparat-rc6-say-hello-to-an-old-friend%2F&amp;source=joa&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.joa-ebert.com/2010/07/28/apparat-rc6-say-hello-to-an-old-friend/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		<feedburner:origLink>http://blog.joa-ebert.com/2010/07/28/apparat-rc6-say-hello-to-an-old-friend/</feedburner:origLink></item>
		<item>
		<title>LZMA compression in Apparat RC5</title>
		<link>http://feedproxy.google.com/~r/je2050/~3/F2T2ORJYPQo/</link>
		<comments>http://blog.joa-ebert.com/2010/07/15/lzma-matryoshka/#comments</comments>
		<pubDate>Thu, 15 Jul 2010 21:23:12 +0000</pubDate>
		<dc:creator>joa</dc:creator>
				<category><![CDATA[misc]]></category>
		<category><![CDATA[apparat]]></category>
		<category><![CDATA[compression]]></category>
		<category><![CDATA[deflate]]></category>
		<category><![CDATA[lzma]]></category>
		<category><![CDATA[matryoshka]]></category>
		<category><![CDATA[scala]]></category>

		<guid isPermaLink="false">http://blog.joa-ebert.com/?p=614</guid>
		<description><![CDATA[
I have released Apparat RC5 at GoogleCode. It contain [...]]]></description>
			<content:encoded><![CDATA[<div align="center"><img src="/wp-content/images/matryoshka.png" width="480" height="371" alt="Matryoshka avec moustache"/></div>
<p>I have released <a href="http://apparat.googlecode.com/" target="_blank" title="Apparat">Apparat</a> RC5 at GoogleCode. It contains a really cool feature which is called <a href="http://en.wikipedia.org/wiki/Lempel%E2%80%93Ziv%E2%80%93Markov_chain_algorithm" target="_blank" title="Lempel-Ziv-Markov chain algorithm">LZMA</a> compression.</p>
<p>Reducer has advanced a lot during the last couple of weeks. It is now also a strong SWF compression tool even if you do not have any PNG files it can compress. You may ask: &#8220;What is that Matryoshka doing there? And why the hell the top hat?&#8221; The top hat: <a href="http://www.youtube.com/watch?v=SL-BTMEDEs4" target="_blank" title="42">I do not know</a>. The Matryoshka: I can explain.</p>
<p>The Flash Player does not understand LZMA. SWF files are compressed using good old <a href="http://en.wikipedia.org/wiki/Deflate" target="_blank" title="DEFLATE">DEFLATE</a>. So what happens? Apparat extracts your original SWF. It compresses it again using the LZMA algorithm. The compressed SWF is injected into another SWF that contains an LZMA decoder. Size, background color, frame rate, etc. get adjusted. Finally you get a new SWF that contains your old SWF and a decoder to extract it at runtime. The overhead of the decoder is currently at around 5kb and I hope I can get it even smaller.</p>
<p>When you open that SWF with the Flash Player it will extract your original file and load it. Another nice feature is that I created different versions of the runtime decoder. One is using a classic preloader which is great if your SWF is a little bit bigger. And hey: it is a preloader for free so you do not have to deal with the [Frame] hassle. But here is the catch. We at <a href="http://www.audiotool.com/" target="_blank">audiotool.com</a> always write our SWF files in the same style and I can just hope you do the same or use the great <a href="http://va.lent.in/blog/2010/07/08/initinjector-0-2b/" target="_blank" title="InitInjector 0.2b">InitInjector</a> by Valentin Simonov.</p>
<p>Your main SWF class or the so called DocumentClass must make sure that a <code>stage</code> is available before accessing it. This is really easy:</p>
<p><code>
<pre>public function Main() {
  addEventListener(Event.ADDED_TO_STAGE, init)
  if(null != stage) init()
}

private function init(event: Event = null): void {
  removeEventListener(Event.ADDED_TO_STAGE, init)
  // your original constructor code goes here ...
}</pre>
<p></code></p>
<p>Stick to that rule or InitInjector can automate it for you. Otherwise you will get a runtime exception that the <code>stage</code> is <code>null</code>. So this is one new feature. The other one is actually pretty standard. If you compile and link against a SWC file all classes will come in their own ABC file. Each ABC file has a constant pool. So if you link against 1000 classes you get 1000 constant pools. Reducer can merge all those files into a single one with some minor exceptions. It can also sort the constant pool so that constants which are used frequently consume less bytes when accessed. The <a href="http://funk-as3.googlecode.com" target="_blank" title="funk-as3">funk-as3</a> test runner which links against FlexUnit and the Flex framework is only loosing 3.01% of its weight with the old Reducer. The new version reduces it by 17.81% already thanks to the ABC merging. Combine that with some LZMA love and we get <b>35.34%</b>.</p>
<p>Besides you can call the LZMA compression as often as you want for some basic obfuscation. The LZMA compression alone is already a (weak) obfuscation of your bytecode.</p>
<p>Last but not least: <a href="http://www.youtube.com/watch?v=1D1cap6yETA" target="_blank" title="Good News">Good news everyone</a>! <a href="http://www.scala-lang.org/downloads" title="Scala Downloads" target="_blank">Scala 2.8</a> arrived so this is the last time you will have to update it for a while.</p>
<p>You can <a href="http://code.google.com/p/apparat/downloads/list" title="Apparat Downloads" target="_blank">download</a> the latest Apparat version at <a href="http://apparat.googlecode.com/" title="Apparat" target="_blank">GoogleCode</a>. Scala 2.8.0 is required.</p>
<div class="tweetmeme_button" style="float: right; margin-right: 10px; margin-top: 38px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.joa-ebert.com%2F2010%2F07%2F15%2Flzma-matryoshka%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.joa-ebert.com%2F2010%2F07%2F15%2Flzma-matryoshka%2F&amp;source=joa&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.joa-ebert.com/2010/07/15/lzma-matryoshka/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		<feedburner:origLink>http://blog.joa-ebert.com/2010/07/15/lzma-matryoshka/</feedburner:origLink></item>
		<item>
		<title>Apparat And Maven</title>
		<link>http://feedproxy.google.com/~r/je2050/~3/DPbrTdCNBmw/</link>
		<comments>http://blog.joa-ebert.com/2010/07/03/apparat-and-maven/#comments</comments>
		<pubDate>Sat, 03 Jul 2010 09:10:06 +0000</pubDate>
		<dc:creator>joa</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[apparat]]></category>
		<category><![CDATA[flexmojos]]></category>
		<category><![CDATA[maven]]></category>

		<guid isPermaLink="false">http://blog.joa-ebert.com/?p=610</guid>
		<description><![CDATA[Two days ago I made a major change to the Apparat repos [...]]]></description>
			<content:encoded><![CDATA[<p>Two days ago I made a major change to the Apparat repository. I completely restructured the layout and fully integrated Apparat with Maven. We have now a plugin and archetypes for easy tooling. I also synchronized Apparat with the Maven central repository two weeks ago.</p>
<p>You might ask what the hell this is about. So in the current state you can download Apparat from Google Code. Then you have to have a working Scala installation which has been used to build Apparat. Whenever Scala is updated, I have to updated Apparat, and you will have to download Apparat again and install a new Scala version. This is absolutely cumbersome. This will change of course when Scala 2.8 is officially released.</p>
<p>I know that some people will always require command line access for Apparat. I am sorry for you at the moment that we have to play this game until 2.8 is out.</p>
<p>For the rest this is good news. If you have a working Maven 3.x version you can use the Apparat plugin and get automatic updates. This means you have to configure your project only once and do not bother with Scala and Apparat anymore. In fact if you want to you could also use the Apparat snapshot repository and get live updates.</p>
<p>Project configuration and setup is something one should not have to deal with. Therefore you can use the archetypes. I have built one for TurboDieselSportInjection.</p>
<pre><code>mvn archetype:generate \
  -DarchetypeRepository=http://oss.sonatype.org/content/repositories/snapshots \
  -DarchetypeGroupId=com.googlecode.apparat \
  -DarchetypeArtifactId=apparat-archetype-tdsi \
  -DarchetypeVersion=1.0-SNAPSHOT</code></pre>
<p>This terminal command is all you need to do to create a new project that is ready to compile &#8212; with TurboDieselSportInjection enabled. And it will automatically use the latest Apparat version.
<div class="tweetmeme_button" style="float: right; margin-right: 10px; margin-top: 38px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.joa-ebert.com%2F2010%2F07%2F03%2Fapparat-and-maven%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.joa-ebert.com%2F2010%2F07%2F03%2Fapparat-and-maven%2F&amp;source=joa&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.joa-ebert.com/2010/07/03/apparat-and-maven/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://blog.joa-ebert.com/2010/07/03/apparat-and-maven/</feedburner:origLink></item>
		<item>
		<title>FITC San Francisco 2010</title>
		<link>http://feedproxy.google.com/~r/je2050/~3/528Hp6ngpq4/</link>
		<comments>http://blog.joa-ebert.com/2010/07/01/fitc-san-francisco-2010/#comments</comments>
		<pubDate>Thu, 01 Jul 2010 13:27:24 +0000</pubDate>
		<dc:creator>joa</dc:creator>
				<category><![CDATA[misc]]></category>
		<category><![CDATA[apparat]]></category>
		<category><![CDATA[fitc 2010]]></category>
		<category><![CDATA[san francisco]]></category>

		<guid isPermaLink="false">http://blog.joa-ebert.com/?p=608</guid>
		<description><![CDATA[When you have people like Scott Dadich, Ben Fry, Kevin  [...]]]></description>
			<content:encoded><![CDATA[<p>When you have people like <a href="http://www.wired.com/" target="_blank">Scott Dadich</a>, <a href="http://www.processing.org/" target="_blank">Ben Fry</a>, <a href="http://www.adobe.com" target="_blank">Kevin Lynch</a> and <a href="http://www.yugop.com/" target="_blank">Yugo Nakamura</a> gathered at one conference you can be sure to expect nothing less than a stunning event.</p>
<p><a href="http://www.fitc.ca/" target="_blank">Shawn Pucknell</a> is obviously raising the bar. This will be a tough time for an ordinary speaker like me. However I have no other intentions than giving a <a href="http://www.fitc.ca/events/presentations/presentation.cfm?event=110&#038;presentation_id=1213" target="_blank">lecture</a> that proves itself worthy of this event.
<div class="tweetmeme_button" style="float: right; margin-right: 10px; margin-top: 38px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.joa-ebert.com%2F2010%2F07%2F01%2Ffitc-san-francisco-2010%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.joa-ebert.com%2F2010%2F07%2F01%2Ffitc-san-francisco-2010%2F&amp;source=joa&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.joa-ebert.com/2010/07/01/fitc-san-francisco-2010/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://blog.joa-ebert.com/2010/07/01/fitc-san-francisco-2010/</feedburner:origLink></item>
		<item>
		<title>FATC Awards</title>
		<link>http://feedproxy.google.com/~r/je2050/~3/5F0_k_Ghx54/</link>
		<comments>http://blog.joa-ebert.com/2010/06/10/fatc-awards/#comments</comments>
		<pubDate>Thu, 10 Jun 2010 13:19:28 +0000</pubDate>
		<dc:creator>joa</dc:creator>
				<category><![CDATA[news]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[assurf]]></category>
		<category><![CDATA[fatc]]></category>

		<guid isPermaLink="false">http://blog.joa-ebert.com/?p=601</guid>
		<description><![CDATA[ A couple of weeks ago the FlashAndTheCity conference t [...]]]></description>
			<content:encoded><![CDATA[<p><img src="/wp-content/images/fatc_award.jpg" alt="Lucky Me!" width="200" height="322" border="0" style="float: left; padding-right: 8px"/> A couple of weeks ago the <a href="http://www.flashandthecity.com/" target="_blank" title="FlashAndTheCity">FlashAndTheCity</a> conference took place in New York. Part of the program was also the FATC Awards ceremony. I am really happy, proud and thankful for winning two awards: &#8220;Most Talended Flash Developer of 2010&#8243; and &#8220;Best Contributor of 2010&#8243;. </p>
<p>A big thank you goes out to the organizers and the Flash community. It really shows that the opensource work I do is appreciated and not meaningless.</p>
<p>Part of the prize I already received has been donated to <a href="http://blog.inspirit.ru/" target="_blank" title="Eugene Zatepyakin">Eugene Zatepyakin</a>. I think he is doing great work on <a href="http://code.google.com/p/in-spirit/wiki/ASSURF" target="_blank" title="ASSURF">ASSURF</a> and was in desperate need of an FDT license ;)</p>
<p>Thank you. I hope I will be able to surprise you with some new stuff later this year.
<div class="tweetmeme_button" style="float: right; margin-right: 10px; margin-top: 38px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.joa-ebert.com%2F2010%2F06%2F10%2Ffatc-awards%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.joa-ebert.com%2F2010%2F06%2F10%2Ffatc-awards%2F&amp;source=joa&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.joa-ebert.com/2010/06/10/fatc-awards/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		<feedburner:origLink>http://blog.joa-ebert.com/2010/06/10/fatc-awards/</feedburner:origLink></item>
		<item>
		<title>New Apparat Example</title>
		<link>http://feedproxy.google.com/~r/je2050/~3/FqvpKgKcnW4/</link>
		<comments>http://blog.joa-ebert.com/2010/05/26/new-apparat-example/#comments</comments>
		<pubDate>Wed, 26 May 2010 11:50:54 +0000</pubDate>
		<dc:creator>joa</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[experiments]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[apparat]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[inline]]></category>

		<guid isPermaLink="false">http://blog.joa-ebert.com/?p=595</guid>
		<description><![CDATA[Good news everyone. The Apparat inline expansion works  [...]]]></description>
			<content:encoded><![CDATA[<p>Good news everyone. The Apparat inline expansion works now to full extent after fixing some minor bugs. A complete example is also available. Just change the paths in the <code>build.properties</code> file and compile everything using Ant.</p>
<div align="center"><img src="http://blog.joa-ebert.com/wp-content/images/apparat-shot.png" width="399" height="183" alt="Apparat Example"/></div>
<p>Use the inline feature with care. Apparat does not try to optimize your code and performs nothing but dead simple inlining. This can lead to <b>slower</b> code due to the creation of lots of local registers. Your code gets also much bigger and will require more space in memory. I am actually not a fan of manual inlining at all. I think it makes only sense to inline code if you have a powerful optimizer available that will cleanup the whole mess.</p>
<p>The fun story about this example is that the inlined version is slower using the lastes Flash Player release candidate if you have only 40.000 particles. That is why I increased the number of particles to 80.000 ;). I developed the example using an old standalone player and the inlined version was nearly twice as fast. However when I watched the example in the browser with the latest release candidate the game was completely different. Kudos to Adobe for significantly improving the Flash Player performance!</p>
<ul>
<li><a href="http://www.joa-ebert.com/swfs/apparat-example/as3" target="_blank" title="Pure AS3 version">AS3-only Version</a></li>
<li><a href="http://www.joa-ebert.com/swfs/apparat-example/apparat" target="_blank" title="Inline version">Inline Version</a></li>
<li><a href="http://code.google.com/p/apparat/downloads/detail?name=apparat-ant-example.zip" target="_blank" title="Source">Source</a></li>
</ul>
<div class="tweetmeme_button" style="float: right; margin-right: 10px; margin-top: 38px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.joa-ebert.com%2F2010%2F05%2F26%2Fnew-apparat-example%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.joa-ebert.com%2F2010%2F05%2F26%2Fnew-apparat-example%2F&amp;source=joa&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.joa-ebert.com/2010/05/26/new-apparat-example/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		<feedburner:origLink>http://blog.joa-ebert.com/2010/05/26/new-apparat-example/</feedburner:origLink></item>
		<item>
		<title>Inline Expansion</title>
		<link>http://feedproxy.google.com/~r/je2050/~3/09YHMy6J9j4/</link>
		<comments>http://blog.joa-ebert.com/2010/05/24/inline-expansion/#comments</comments>
		<pubDate>Mon, 24 May 2010 18:12:57 +0000</pubDate>
		<dc:creator>joa</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[apparat]]></category>
		<category><![CDATA[inline expansion]]></category>

		<guid isPermaLink="false">http://blog.joa-ebert.com/?p=593</guid>
		<description><![CDATA[In addition to macro expansion Apparat has now inline e [...]]]></description>
			<content:encoded><![CDATA[<p>In addition to macro expansion Apparat has now inline expansion as well. It works nearly the same way as macro expansion but without most of its limitations. To define a class for inline usage it must extend <code>apparat.inline.Inlined</code> and all its methods must be static. However the cool thing is that you can also return values in contrast to macro expansion. You can also pass normal parameters. For instance <code>FastMath.sin(FastMath.sqrt(2.0))</code> is valid code using inline expansion. It is enabled by default in TDSI.
<div class="tweetmeme_button" style="float: right; margin-right: 10px; margin-top: 38px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.joa-ebert.com%2F2010%2F05%2F24%2Finline-expansion%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.joa-ebert.com%2F2010%2F05%2F24%2Finline-expansion%2F&amp;source=joa&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.joa-ebert.com/2010/05/24/inline-expansion/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://blog.joa-ebert.com/2010/05/24/inline-expansion/</feedburner:origLink></item>
		<item>
		<title>Apparat For Scala 2.8 RC2</title>
		<link>http://feedproxy.google.com/~r/je2050/~3/CVbl2GnqVKI/</link>
		<comments>http://blog.joa-ebert.com/2010/05/24/apparat-for-scala-2-8-rc2/#comments</comments>
		<pubDate>Mon, 24 May 2010 13:44:37 +0000</pubDate>
		<dc:creator>joa</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[7z]]></category>
		<category><![CDATA[apparat]]></category>
		<category><![CDATA[scala 2.8-rc2]]></category>

		<guid isPermaLink="false">http://blog.joa-ebert.com/?p=591</guid>
		<description><![CDATA[Apparat is now available using the Scala 2.8-RC2 build. [...]]]></description>
			<content:encoded><![CDATA[<p>Apparat is now available using the Scala 2.8-RC2 build. You can <a href="http://code.google.com/p/apparat/downloads/list?q=label:scala-2.8.0.RC2" target="_blank" title="Apparat on Google Code">find appropriate downloads</a> now on Google Code by searching for the Scala version of your choice. 7z compression on OS X should work now as well.
<div class="tweetmeme_button" style="float: right; margin-right: 10px; margin-top: 38px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.joa-ebert.com%2F2010%2F05%2F24%2Fapparat-for-scala-2-8-rc2%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.joa-ebert.com%2F2010%2F05%2F24%2Fapparat-for-scala-2-8-rc2%2F&amp;source=joa&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.joa-ebert.com/2010/05/24/apparat-for-scala-2-8-rc2/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		<feedburner:origLink>http://blog.joa-ebert.com/2010/05/24/apparat-for-scala-2-8-rc2/</feedburner:origLink></item>
		<item>
		<title>Macro Expansion</title>
		<link>http://feedproxy.google.com/~r/je2050/~3/sogwBdFPlTw/</link>
		<comments>http://blog.joa-ebert.com/2010/05/10/macro-expansion/#comments</comments>
		<pubDate>Mon, 10 May 2010 17:31:34 +0000</pubDate>
		<dc:creator>joa</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[apparat]]></category>
		<category><![CDATA[inline]]></category>
		<category><![CDATA[macro expansion]]></category>
		<category><![CDATA[taas]]></category>

		<guid isPermaLink="false">http://blog.joa-ebert.com/?p=588</guid>
		<description><![CDATA[Apparat has another new feature called Macro Expansion. [...]]]></description>
			<content:encoded><![CDATA[<p>Apparat has another new feature called <a href="http://code.google.com/p/apparat/wiki/MacroExpansion" title="Macro Expansion" target="_blank">Macro Expansion</a>. I talked about this with Nico Zimmermann at FFK in Cologne. Nico was using TDSI for a project but he was not very satisfied with it because you have to inline all inverse-square root tricks manually.<br />
This is why Apparat has now macro expansion. I am actually not a big fan of it. I think a good compiler would do this for you without you having to go through all the steps. Unfortunately writing this compiler will take longer than the couple of hours I have spent on the macro expansion today.</p>
<p>So if you want to have quick and dirty inlining capabilities: <a href="http://code.google.com/p/apparat/wiki/MacroExpansion" target="_blank" title="Macro Expansion">this is for you</a>. It is an easy fix for a feature a lot of people have asked for. I will continue working on TAAS to implement this much better in the future.
<div class="tweetmeme_button" style="float: right; margin-right: 10px; margin-top: 38px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.joa-ebert.com%2F2010%2F05%2F10%2Fmacro-expansion%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.joa-ebert.com%2F2010%2F05%2F10%2Fmacro-expansion%2F&amp;source=joa&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.joa-ebert.com/2010/05/10/macro-expansion/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://blog.joa-ebert.com/2010/05/10/macro-expansion/</feedburner:origLink></item>
		<item>
		<title>Apparat: Crunching SWF Files Since 2009</title>
		<link>http://feedproxy.google.com/~r/je2050/~3/e5Lp_TRFuHs/</link>
		<comments>http://blog.joa-ebert.com/2010/05/07/apparat-crunching-swf-files-since-2009/#comments</comments>
		<pubDate>Fri, 07 May 2010 15:37:04 +0000</pubDate>
		<dc:creator>joa</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[projects]]></category>

		<guid isPermaLink="false">http://blog.joa-ebert.com/?p=578</guid>
		<description><![CDATA[Apparat has a great new feature that allows you to crea [...]]]></description>
			<content:encoded><![CDATA[<p>Apparat has a great new feature that allows you to create even smaller files. Basic SWF files are compressed using Java&#8217;s standard <code>java.util.zip.Deflater</code> class. This is perfectly fine. And I would even go with no compression at all during development.</p>
<p>However when deploying you can spend some extra time compressing your SWF files with the best tools available. <a href="http://www.7-zip.org/" target="_blank" title="7-Zip">7-Zip</a> is for instance such a tool and achieves a great compression ratio.</p>
<p>If you have the 7z executable on your <code>PATH</code> Apparat will make use of it to achieve the best compression for your SWF files. More configuration options are available <a href="http://code.google.com/p/apparat/wiki/HiddenGems" target="_blank" title="HiddenGems">here</a>.</p>
<p>This feature is currently only implemented for SWF files and not SWCs. However every tool will make use of it by default. So if you are running Reducer and have no graphics in your SWF files you can still get a better compression.</p>
<p>An example is straight from the sources:</p>
<blockquote><p><code>
<pre>reducer -i as3\Apparat.Tests.AS3\bin\Test07.swf
[i] Apparat -- http://apparat.googlecode.com/
[i] Launching tool: Reducer
[i] Waiting for 7z ...
[i] Compression ratio: <b>18.224573%</b>
[i] Total bytes: 310
[i] Completed in 547ms.</pre>
<p></code></p></blockquote>
<p>Note please that this SWF file does not contain any graphical assets and we got still a ratio of 18%. Our main <code>audiotool.swf</code> file is compressed by about 10% &#8212; about 200kb &#8212; and contains no graphical assets either.</p>
<p>You can download the latest Apparat on <a href="http://code.google.com/p/apparat/downloads/detail?name=apparat.zip"  target="_blank" title="Download Apparat">Google Code</a>. Please note that you will need <a href="http://www.scala-lang.org/downloads" target="_blank" title="Scala Downloads">Scala 2.8 RC1</a> as well.
<div class="tweetmeme_button" style="float: right; margin-right: 10px; margin-top: 38px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.joa-ebert.com%2F2010%2F05%2F07%2Fapparat-crunching-swf-files-since-2009%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.joa-ebert.com%2F2010%2F05%2F07%2Fapparat-crunching-swf-files-since-2009%2F&amp;source=joa&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.joa-ebert.com/2010/05/07/apparat-crunching-swf-files-since-2009/feed/</wfw:commentRss>
		<slash:comments>28</slash:comments>
		<feedburner:origLink>http://blog.joa-ebert.com/2010/05/07/apparat-crunching-swf-files-since-2009/</feedburner:origLink></item>
		<item>
		<title>We All Have To Agree</title>
		<link>http://feedproxy.google.com/~r/je2050/~3/5Ev674s-hq4/</link>
		<comments>http://blog.joa-ebert.com/2010/04/11/we-all-have-to-agree/#comments</comments>
		<pubDate>Sun, 11 Apr 2010 09:52:17 +0000</pubDate>
		<dc:creator>joa</dc:creator>
				<category><![CDATA[news]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[section311]]></category>
		<category><![CDATA[unity3d]]></category>

		<guid isPermaLink="false">http://blog.joa-ebert.com/?p=568</guid>
		<description><![CDATA[
We’ve been there before, and intermediate layers be [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>
We’ve been there before, and intermediate layers between the platform and the developer ultimately produces sub-standard apps and hinders the progress of the platform.
</p></blockquote>
<p>That is so right. The first thing that comes to my mind is Java on the Mac: sub-standard, castrated and broken. The second argument is even better. Intermediate layers can hinder the progress of a platform. So true. Apple, the intermediate layer between you and the iPhone, stops you from improving the platform. You have built something cool &#8212; like Unity3D &#8212; and can empower creative people with better tools? Sorry, you are out.</p>
<p>The only way to improve the progress of a platform is by opening it up. Yes, I think we have been there before.
<div class="tweetmeme_button" style="float: right; margin-right: 10px; margin-top: 38px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.joa-ebert.com%2F2010%2F04%2F11%2Fwe-all-have-to-agree%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.joa-ebert.com%2F2010%2F04%2F11%2Fwe-all-have-to-agree%2F&amp;source=joa&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.joa-ebert.com/2010/04/11/we-all-have-to-agree/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		<feedburner:origLink>http://blog.joa-ebert.com/2010/04/11/we-all-have-to-agree/</feedburner:origLink></item>
		<item>
		<title>What Apple Just Did…</title>
		<link>http://feedproxy.google.com/~r/je2050/~3/wkOPDNDddOw/</link>
		<comments>http://blog.joa-ebert.com/2010/04/09/what-apple-just-did/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 13:41:11 +0000</pubDate>
		<dc:creator>joa</dc:creator>
				<category><![CDATA[news]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[appstore]]></category>
		<category><![CDATA[free software]]></category>

		<guid isPermaLink="false">http://blog.joa-ebert.com/?p=549</guid>
		<description><![CDATA[Musician: Hey Apple, I just had to accept a new license [...]]]></description>
			<content:encoded><![CDATA[<p><b>Musician:</b> Hey Apple, I just had to accept a new license agreement for your iTunes platform.<br />
<b>Apple:</b> So what? You have been really reading through it?<br />
<b>Musician:</b> It says that I have to use GarageBand if I want to see any music I produce on iTunes.<br />
<b>Apple:</b> Correct.<br />
<b>Musician:</b> Well but I do not like GarageBand. I would like to use Ableton Live.<br />
<b>Apple:</b> Sorry but you are not allowed to use that.<br />
<b>Musician:</b> But it is suited very well for electronic music.<br />
<b>Apple:</b> Use GarageBand then. It is a magical and amazing product!<br />
<b>Musician:</b> Okay fair enough, but what if I would like to play the piano? An instrument I have practiced since more than eight years. I think I am creating better music on a piano than with GarageBand.<br />
<b>Apple:</b> Then you invested your time in the wrong instrument.<br />
<b>Musician:</b> Okay. What about the Audiotool? Can I use it?<br />
<b>Apple:</b> That application does not even run on our devices. Those developers are lazy.<br />
<b>Musician:</b> Errr, okay. So if I use GarageBand I can do what I want?<br />
<b>Apple:</b> No. If you use the F-word in a song for example it won&#8217;t be distributed via iTunes.<br />
<b>Musician:</b> You are kidding. Why?<br />
<b>Apple:</b> Because we think that it is not appropriate.<br />
<b>Musician:</b> That must be a joke.<br />
<b>Apple:</b> Not at all. Your child could listen to that song &#8212; think about it.<br />
<b>Musician:</b> Well, I think I know best what&#8217;s good for my child. Besides, would some parental control system not help here?<br />
<b>Apple:</b> Next question please.<br />
<b>Musician:</b> Okay, assume I use GarageBand and that my content is &#8220;appropriate&#8221;. Can I be sure it will make it to the iTunes store?<br />
<b>Apple:</b> First we will check it.<br />
<b>Musician:</b> How long will that take?<br />
<b>Apple:</b> Up to two months.<br />
<b>Musician:</b> Are you serious?<br />
<b>Apple:</b> Yes. There is plenty of music being created and we want to filter only whats best for our users.<br />
<b>Musician:</b> And you think you can decide that?<br />
<b>Apple:</b> Sure.<br />
<b>Musician:</b> Okay, let me sum this up quickly: I have to use GarageBand to create any music for iTunes. It has to be &#8220;appropriate&#8221; and then you let me wait for quite some time to tell me whether you like it or not?<br />
<b>Apple:</b> Now you make it sound like as if we were evil. Google is evil. We are the good guys! And look, the new iPad. Isn&#8217;t it beautiful?<br />
<b>Musician:</b> Oh, yeah. I really want that overpriced product. Where can I buy it?<br />
<b>Apple:</b> In our certified Apple retail stores.<br />
<b>Musician:</b> And you will not pull me over this time like you did with the iPhone when you dropped the price dramatically two weeks after its release?<br />
<b>Apple:</b> No. Not exactly. We will release an iPad with a webcam soon. And we will charge $200 extra for that.<br />
<i>[...]</i></p>
<p>Sounds strange doesn&#8217;t it? Thank god this was just a fictional interview and will never become reality.
<div class="tweetmeme_button" style="float: right; margin-right: 10px; margin-top: 38px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.joa-ebert.com%2F2010%2F04%2F09%2Fwhat-apple-just-did%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.joa-ebert.com%2F2010%2F04%2F09%2Fwhat-apple-just-did%2F&amp;source=joa&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.joa-ebert.com/2010/04/09/what-apple-just-did/feed/</wfw:commentRss>
		<slash:comments>58</slash:comments>
		<feedburner:origLink>http://blog.joa-ebert.com/2010/04/09/what-apple-just-did/</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic page generated in 1.437 seconds. --><!-- Cached page generated by WP-Super-Cache on 2010-09-07 10:35:54 -->
