<?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>simonrichardson.info &#187; HaXe</title> <atom:link href="http://www.simonrichardson.info/category/haxe/feed/" rel="self" type="application/rss+xml" /><link>http://www.simonrichardson.info</link> <description>ActionScript &#38; Android</description> <lastBuildDate>Mon, 05 Dec 2011 09:54:05 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.2.1</generator> <item><title>Eleven. Exactly. One louder.</title><link>http://www.simonrichardson.info/2011/07/14/eleven-exactly-one-louder/</link> <comments>http://www.simonrichardson.info/2011/07/14/eleven-exactly-one-louder/#comments</comments> <pubDate>Thu, 14 Jul 2011 16:53:22 +0000</pubDate> <dc:creator>Simon Richardson</dc:creator> <category><![CDATA[ActionScript]]></category> <category><![CDATA[ActionScript3]]></category> <category><![CDATA[HaXe]]></category> <category><![CDATA[Java]]></category> <category><![CDATA[Javascript]]></category> <guid
isPermaLink="false">http://www.simonrichardson.info/?p=187</guid> <description><![CDATA[The stream of tweets this week revealed that Flash Player 11 is out&#8230; awesome! Maybe they implemented some really cool new features that I would like to play with&#8230;. hmmm&#8230;. the list looks small&#8230; bummer! In all seriousness, I think the new 3D stuff is awesome, it&#8217;s going to be really amazing. If we can [...]]]></description> <content:encoded><![CDATA[<p>The <a
href="http://twitter.com/#!/search/fp11">stream of tweets</a> this week revealed that Flash Player 11 is out&#8230; awesome! Maybe they implemented some really cool new features that I would like to play with&#8230;. hmmm&#8230;. the list looks small&#8230; bummer!</p><p>In all seriousness, I think the new 3D stuff is awesome, it&#8217;s going to be really amazing. If we can somehow utilise it for user interfaces then we&#8217;re off to a winner! That&#8217;s one of the major issues that I had and still have is that when it comes to rendering it just doesn&#8217;t cut the mustard. Hopefully this will change and it will give one less thing for me to bitch about. It&#8217;s sort of a love hate relation ship I have with the ecosystem that is Flash. One things for certain, I&#8217;m really thinking of leaving it and moving on to Java/Scala and even dare I say it Javascript (probably using <a
href="http://haxe.org">haXe</a> if anything)! Why I hear you cry, here be a list:</p><ul><li><strong>ECMA 4</strong> &#8211; I&#8217;m guessing Adobe are still in the spoils of the ECMA fallout, where Adobe aren&#8217;t 100% sure what to do. If that&#8217;s not the case, this is what is perceived from the dwindling hordes of developers. Is Adobe following ECMA Harmony or are they doing their own thing? The latest FP11 doesn&#8217;t look like it&#8217;s done any sort of move in any direction. The great rival that has appeared in the last couple of years (Javascript) seems to moving lightening fast, ok maybe they&#8217;re not all singing from the same hymn sheet, but at least they&#8217;re moving when it&#8217;s concerning the language (probably excluding MS here somewhat). Things that look appealing to me from a Javascript point of view or even <a
href="http://www.ecma-international.org/activities/Languages/Language%20overview.pdf">original ECMA 4 document</a>, which I believe should be in FP11. Even if there is no official ECMA 4 now, at least have the balls to follow it through!<br
/></p><ul><li>Union types and the set of predefined union types</li><li>Type definitions</li><li>Subtypes</li><li>&#8220;like&#8221;</li><li>yield</li><li>let</li><li>Iterators</li><li>Map</li></ul></li><li><strong>Enums</strong> &#8211; Why can ActionScript 3 not get enums, they&#8217;re basic simplicity that help reduce boiler plate.</li><li><strong>Abstract Classes</strong> &#8211; With all the functionality that ActionScript 3 is getting, it becomes a necessity to have more help from a language and I consider Abstract Classes part of that. Why can&#8217;t the compiler tell me I should override a class if I mark something as Abstract, hell it moans about something when I don&#8217;t override something which I should, it&#8217;s not like a massive leap?</li><li><strong>Private constructors</strong> &#8211; Why did we remove these again?</li><li><strong>Generics</strong> &#8211; Generics in ActionScript 3 is just decent, not good and not excellent, it&#8217;s just decent. It&#8217;s like they went, &#8220;we want to implement generics, but we don&#8217;t have the time. I know, lets implement it in a half arsed way!&#8221;</li><li><strong>Const</strong> &#8211; How about const keyword, is it implemented? Who knows? It&#8217;s not implemented in the Flash IDE, but is implemented the Flex SDK compiler, but you can create a swc file from the Flex SDK and use it in the Flash IDE? How have they managed to do this without changing the player or the Flash IDE? Well it turns out they only do a compile time (better than not I suppose!) and once the check is done, they use the var AVM2 Bytecode instead.</li><li> <strong>Flex compiler</strong> &#8211; Why oh why is the Flex compiler aka mxmlc and compc two separate entities and why oh why do they not implement some really basic rules of optimisations.<br
/></p><ul><li>Inlining</li><li>Constant propagation</li><li>Tail recursive optimistations</li></ul></li></ul><p>I really do hope this stuff is coming, because I think it really is make or break time. People that didn&#8217;t want to invest that much into Actionscript 3 are now moving or have moved on to other languages (Javascript). The people that are still riding it out for better language expressiveness to get down in code what&#8217;s on the tip of their fingers are thinking about it or <a
href="http://blog.joa-ebert.com/">have already done so</a>!</p><p><strong>Edit:</strong><br
/> I was speaking with various colleagues about this thread and <em>we</em> all tended to agree, that most of this is syntax sugar. We use this language day in day out, I&#8217;ve invested a lot of time into this language and it would be helpful if this language could help us out as well.</p><p>You may as an observer say well this looks like language A or like B, I would love to work in A or B, but I&#8217;m on a project that requires AS3 and we don&#8217;t have to option to move to A or B. In the future though I think A or B is on the horizon, especially in these fast moving times.</p> ]]></content:encoded> <wfw:commentRss>http://www.simonrichardson.info/2011/07/14/eleven-exactly-one-louder/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Javascript</title><link>http://www.simonrichardson.info/2010/11/25/javascript/</link> <comments>http://www.simonrichardson.info/2010/11/25/javascript/#comments</comments> <pubDate>Thu, 25 Nov 2010 21:29:00 +0000</pubDate> <dc:creator>Simon Richardson</dc:creator> <category><![CDATA[ActionScript]]></category> <category><![CDATA[ActionScript3]]></category> <category><![CDATA[HaXe]]></category> <category><![CDATA[Javascript]]></category> <guid
isPermaLink="false">http://www.simonrichardson.info/?p=106</guid> <description><![CDATA[In the last couple of days I&#8217;ve been thrown into the deep end again with JavaScript. I&#8217;ve not really touched JavaScript for about 4-5 years, where I made my own framework. This framework had a lot of things, mainly focused at UI and the heavy lifting there of, including (ajax before ajax was trendy and [...]]]></description> <content:encoded><![CDATA[<p>In the last couple of days I&#8217;ve been thrown into the deep end again with JavaScript. I&#8217;ve not really touched JavaScript for about 4-5 years, where I made my own framework. This framework had a lot of things, mainly focused at UI and the heavy lifting there of, including (ajax before ajax was trendy and I even had certain canvas elements from the FireFox and Safari nightly builds). It never really made it past alpha and it got abandoned when I moved jobs and started to learn AS3.</p><p>Now I&#8217;ve come back, not much has changed! The speed of Javascript has improved tremendously, which annoys me slightly because I wish the AVM would improve with such radical pace.</p><p>With that in mind, with my time away from Javascript I have grown fond of more strongly typed languages i.e. AS3, Java and haXe. So I&#8217;ve been keeping my ears open about possible solutions that target Javascript where you don&#8217;t actually have to write Javascript (there are a lot!)[1].</p><p>So it weird that for a general purpose language, that features in every browser in some way or form there are a lot of ways to not actually write Javascript. This does tell me that a lot of people don&#8217;t actually like writing Javascript. So why are there a lot of people pinning their hopes on HTML5, when developers aren&#8217;t really interesting in writing Javascript? Now wouldn&#8217;t be impressive if a browser provider actually had the guts to introduce a way to implement pure bytecode. That way we could remove &#8220;my language is better than your language&#8221; scenario. My worry in the future is that the Javascript landscape is going to be fragmented, not by frameworks (which is bad enough), but by what you language you write Javascript in. Which begs the question, is Javascript becoming browser bytecode &#8211; I hope not?</p><p>[1]<ul><li><a
href="http://haxe.org">haXe</a></li><li><a
href="http://cappuccino.org/">Cappuccino</a></li><li><a
href="http://www.jangaroo.net/home/">Jangaroo</a></li><li><a
href="http://code.google.com/webtoolkit/">GWT</a></li><li><a
href="http://www.mozilla.org/rhino/">Rhino</a></li><li><a
href="http://mozakai.blogspot.com/2010/08/emscripten-llvm-to-javascript-compiler.html">Emscripten</a></li><li><a
href="http://jashkenas.github.com/coffee-script/">Coffee-script</a></li></ul> ]]></content:encoded> <wfw:commentRss>http://www.simonrichardson.info/2010/11/25/javascript/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Flash issues.</title><link>http://www.simonrichardson.info/2010/09/06/flash-issues/</link> <comments>http://www.simonrichardson.info/2010/09/06/flash-issues/#comments</comments> <pubDate>Mon, 06 Sep 2010 10:33:21 +0000</pubDate> <dc:creator>Simon Richardson</dc:creator> <category><![CDATA[ActionScript]]></category> <category><![CDATA[ActionScript3]]></category> <category><![CDATA[Compiler]]></category> <category><![CDATA[HaXe]]></category> <category><![CDATA[as3]]></category> <category><![CDATA[flash]]></category> <category><![CDATA[haxe]]></category> <category><![CDATA[mxmlc]]></category> <guid
isPermaLink="false">http://www.simonrichardson.info/?p=89</guid> <description><![CDATA[I&#8217;ve been building a framework for as3 for the last six months, it&#8217;s has been more experimental work for me. It&#8217;s helped me understand complex programming fundamentals. I&#8217;ve written a very simple runtime compiler, a management system for object pooling and my own garbage collection for the system. There is a lot more as well, [...]]]></description> <content:encoded><![CDATA[<p>I&#8217;ve been building a framework for as3 for the last six months, it&#8217;s has been more experimental work for me. It&#8217;s helped me understand complex programming fundamentals. I&#8217;ve written a very simple runtime compiler, a management system for object pooling and my own garbage collection for the system. There is a lot more as well, I&#8217;ve not released it as I think that this is more personal exploration and a lot of it hasn&#8217;t been tested or used in anger.</p><p>One thing that I&#8217;ve been toying with a lot is moving the whole code base to haXe. I&#8217;ve been a fan of haXe for a long time, I&#8217;ve used it for a lot of projects as helpers. I&#8217;ve never used it for the main development work though. If I was the main developer and I could control this 100% of the time, without question I would ship the lot to it.</p><p>The reason I want to do this is because Adobe are slow are optimising the bytecode it outputs. To give you a basic example, the Logic Operators (&#038;&#038; and ||) are completely useless when compiled with MXMLC. I read <a
href="http://jacksondunstan.com/articles/810">Jackson Dunstan&#8217;s</a> blog a lot and what he found today shocks me! How can an enterprise compiler, which is what this is fail on some many levels? The compiler is the most stupidest compiler I&#8217;ve ever seen, it does nothing, nothing at all! In fact it&#8217;s so dumb, we have to get one of the <a
href="http://code.google.com/p/apparat/">smartest guy&#8217;s</a> to implement a post compiler to patch the compiler. Joa shouldn&#8217;t have to do the basic parts, in fact he should be doing things that are edge cases, instead he&#8217;s doing Adobe&#8217;s job.</p><p>So with this in mind, I&#8217;m constantly toying with moving across to haXe as my main dev library, so what&#8217;s stopping me.</p><ol><li>Once everything is compiled it becomes public, no matter how you write it.</li><li>There is no internal or protected, I really like these in AS3.</li><li>There is no const keyword. I like the const keyword as it makes me aware of what is mutable and what isn&#8217;t.</li><li>Last but not least, you can&#8217;t load swf&#8217;s in to the same applicationDomain because of the Boot class. (see bug <a
href="http://code.google.com/p/haxe/issues/detail?id=177&#038;colspec=ID%20Type%20Status%20Priority%20Platform%20Milestone%20Owner%20Summary">here</a>)</li></ol><p>I hope the bug get&#8217;s fixed soon as I think I could easily start using it a help of a lot sooner.</p><p>The IDE support is a lot more useful as well, with FlashDevelop and FDT also giving a big surge, just a pity flash compiler developers aren&#8217;t listening.</p> ]]></content:encoded> <wfw:commentRss>http://www.simonrichardson.info/2010/09/06/flash-issues/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Interruption</title><link>http://www.simonrichardson.info/2010/05/06/interruption/</link> <comments>http://www.simonrichardson.info/2010/05/06/interruption/#comments</comments> <pubDate>Thu, 06 May 2010 15:59:55 +0000</pubDate> <dc:creator>Simon Richardson</dc:creator> <category><![CDATA[ActionScript]]></category> <category><![CDATA[ActionScript3]]></category> <category><![CDATA[HaXe]]></category> <category><![CDATA[HaXe-C++]]></category> <category><![CDATA[performance]]></category> <guid
isPermaLink="false">http://www.simonrichardson.info/?p=51</guid> <description><![CDATA[I know I&#8217;ve supposed to have written about Unit testing (part 3), it&#8217;s in draft and needs amending, but in the mean time I&#8217;ve been thinking about compilers and languages. I&#8217;ve been reading the dragon book of late, because I&#8217;ve needed to implement a coding style verifier and micro optimiser (something which has been talked [...]]]></description> <content:encoded><![CDATA[<p>I know I&#8217;ve supposed to have written about Unit testing (part 3), it&#8217;s in draft and needs amending, but in the mean time I&#8217;ve been thinking about compilers and languages. I&#8217;ve been reading the <a
href="http://en.wikipedia.org/wiki/Dragon_Book_(computer_science)">dragon book</a> of late, because I&#8217;ve needed to implement a coding style verifier and micro optimiser (something which has been talked about in length by developers).</p><p>One thing has struck me of late and that is; we do have really fast operational codes in the <a
href="http://www.ncannasse.fr/blog/adobe_alchemy">language</a>, but other than <a
href="http://haxe.org/">haXe</a> and <a
href="http://labs.adobe.com/technologies/alchemy/">Adobe Alchemy</a> not much is taking advantage of it. You can of course try and use <a
href="http://blog.joa-ebert.com/2009/08/05/turbodieselsportinjection/">TDSI</a> from <a
href="http://blog.joa-ebert.com/">Joa Ebert</a>, but why should we have to optimise something after we&#8217;ve written it? This should be either standard from the language or the compiler.</p><p><strong>So what is this really about?</strong><br
/> This is about wanting to code without thinking about optimising the basics, you don&#8217;t hear of C/C++/C#/Java developers talking about trying to squeeze every ounce of power from the language every time they code something. I&#8217;m not saying you shouldn&#8217;t optimise, what I am saying is that as a platform it always seems like we&#8217;re starting with a handicap.<br
/> I want the fasting language for the platform and have all the features for the language. I really like method overloading from Java. I know the AVM2 doesn&#8217;t support it by default, but that doesn&#8217;t stop you from implementing in some way. A perfect example of this is type parameters (generics) of the Vector class, which I really like from Java and HaXe, but why is it not default on all objects. The compiler checks what your implementing and the aligns it to correct compound types.</p><p>Now why can&#8217;t a language do this for method overloading, by simply changing the method signature to something else at compile time.</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td
class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #339966; font-weight: bold;">function</span> <span style="color: #004993;">method</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">name</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #0033ff; font-weight: bold;">void</span>
<span style="color: #000000;">&#123;</span>
<span style="color: #000000;">&#125;</span>
<span style="color: #339966; font-weight: bold;">function</span> <span style="color: #004993;">method</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">name</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span><span style="color: #000066; font-weight: bold;">,</span> age<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">int</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
<span style="color: #000000;">&#123;</span>
<span style="color: #000000;">&#125;</span>
<span style="color: #004993;">method</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">'fred'</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #004993;">method</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">'jim'</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">24</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></td></tr></table></div><p>This would be translated to the following:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td
class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #339966; font-weight: bold;">function</span> method_StringVoid<span style="color: #000000;">&#40;</span><span style="color: #004993;">name</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #0033ff; font-weight: bold;">void</span>
<span style="color: #000000;">&#123;</span>
<span style="color: #000000;">&#125;</span>
<span style="color: #339966; font-weight: bold;">function</span> method_StringIntVoid<span style="color: #000000;">&#40;</span><span style="color: #004993;">name</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span><span style="color: #000066; font-weight: bold;">,</span> age<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">int</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
<span style="color: #000000;">&#123;</span>
<span style="color: #000000;">&#125;</span>
method_StringVoid<span style="color: #000000;">&#40;</span><span style="color: #990000;">'fred'</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
method_StringIntVoid<span style="color: #000000;">&#40;</span><span style="color: #990000;">'jim'</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">24</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></td></tr></table></div><p>The reason for the curious method signature is to enable something to call the method if it&#8217;s not directly know i.e. external swf file etc.</p><p>Also why is the fastest int, not used automatically? To use the fastest int, you have to delve into opcodes, which seems extraordinary as you&#8217;re actually saying to your developers &#8220;we do have this really fast player, but you&#8217;re not allowed to use it&#8221;. It would be great if a language just used the fastest int and not require the developer to jump into another language (C/C++/haXe).</p> ]]></content:encoded> <wfw:commentRss>http://www.simonrichardson.info/2010/05/06/interruption/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
