<?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>ZBlog &#187; haxe</title>
	<atom:link href="http://blog.zarate.tv/category/haxe/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.zarate.tv</link>
	<description>Using the law to keep justice away</description>
	<lastBuildDate>Tue, 24 Aug 2010 11:50:33 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>A folder is not a file</title>
		<link>http://blog.zarate.tv/2010/06/19/a-folder-is-not-a-file/</link>
		<comments>http://blog.zarate.tv/2010/06/19/a-folder-is-not-a-file/#comments</comments>
		<pubDate>Sat, 19 Jun 2010 16:23:47 +0000</pubDate>
		<dc:creator>Zarate</dc:creator>
				<category><![CDATA[air]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[haxe]]></category>

		<guid isPermaLink="false">http://blog.zarate.tv/?p=1594</guid>
		<description><![CDATA[That seems pretty obvious, right? Well, not for quite a few people. Just check out the opening sentence on the ActionScript reference for the File object:
A File object represents a path to a file or directory.
Uh? Why? When you bring this up some people start banging about old paradigms such as &#8220;system nodes&#8221; and other [...]]]></description>
			<content:encoded><![CDATA[<p>That seems pretty obvious, right? Well, not for quite a few people. Just check out the opening sentence on the ActionScript reference for the <a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/filesystem/File.html">File</a> object:</p>
<blockquote><p>A File object represents a path to a file <strong>or directory</strong>.</p></blockquote>
<p>Uh? Why? When you bring this up some people start banging about old paradigms such as &#8220;<em>system nodes</em>&#8221; and other ancient stuff. Well, I think whoever designed the AIR API lost a great opportunity to make a difference and start applying some usability to API design. This is most likely due to the old inferiority complex about ActionScript being a &#8220;serious&#8221; language that Java and C developers cannot look down to.</p>
<p>Well, how do you think Java and C developers explain it to Grandma?</p>
<blockquote><p>Yeah, you have 2 types of files, one is for storing information, the other is a special type of file which can contain other files (of the first type) and other special files like itself.</p></blockquote>
<p>Or</p>
<blockquote><p>Yeah, you have files for your docs, and folders where you can group other files and folders. Y&#8217;know, like real life files and folders.</p></blockquote>
<p>Best part is, since they are forcing the concept so much, they end up with ugly APIs and code. Let&#8217;s see:</p>
<p>Smelly code:</p>
<div class="codesnip-container" >
<div class="actionscript codesnip" style="font-family:monospace;">
<ol>
<li class="li1">
<div class="de1"><span class="co1">// WTF? I want a folder but have to create a new File object? </span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">var</span> folder : File = <span class="kw2">new</span> File<span class="br0">&#40;</span>path<span class="br0">&#41;</span>;</div>
</li>
</ol>
</div>
</div>
<div class="codesnip-container" >
<div class="actionscript codesnip" style="font-family:monospace;">
<ol>
<li class="li1">
<div class="de1"><span class="co1">// The code below compiles although it doesn&#8217;t make sense</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// cause a file can&#8217;t contain files. Wondering if returns 0 or throws an error</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">var</span> file : File = <span class="kw2">new</span> File<span class="br0">&#40;</span>path<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">var</span> files : <span class="kw3">Array</span> = file.<span class="me1">getDirectoryListing</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
</ol>
</div>
</div>
<p>Smelly API:<br />
<a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/filesystem/File.html#isDirectory">File.isDirectory</a> says it pretty much all:</p>
<blockquote><p>Indicates whether <strong>the reference</strong> is to a directory. The value is true if the File object points to a directory; false otherwise.</p></blockquote>
<p>&#8220;<em>The reference</em>&#8220;. Maybe they should&#8217;ve called the class Reference instead of File, then?</p>
<p>Also, if files and folders are the same, why there is <a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/filesystem/File.html#deleteDirectory()">File.deleteDirectory(deleteDirectoryContents)</a> vs <a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/filesystem/File.html#deleteFile()">File.deleteFile()</a>? Sure there should be a common method called File.delete(), right? Well, turns out that most systems don&#8217;t allow you to remove a non-empty folder without confirmation and thus the <em>deleteDirectoryContents</em> parameter.</p>
<p>So, convinced now? If you are not, then enjoy the official API. If you are, check out <a href="http://github.com/zarate/xapi">XAPI</a> for AIR : )</p>
<p>Benefits (IMHO):</p>
<p>* No instances, all methods are static.<br />
* Different <a href="http://github.com/zarate/xapi/blob/master/src/air/xa/File.as">File</a> and <a href="http://github.com/zarate/xapi/blob/master/src/air/xa/Folder.as">Folder</a> APIs with consistent method names.<br />
* Much simpler API. Compare:</p>
<p>Reading the contents of a text file in plain AIR:</p>
<div class="codesnip-container" >
<div class="actionscript codesnip" style="font-family:monospace;">
<ol>
<li class="li1">
<div class="de1"><span class="kw2">var</span> file : File = <span class="kw2">new</span> File<span class="br0">&#40;</span>path<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">var</span> stream : FileStream = <span class="kw2">new</span> FileStream<span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">stream.<span class="me1">open</span><span class="br0">&#40;</span>file, FileMode.<span class="me1">READ</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">var</span> content : <span class="kw3">String</span> = stream.<span class="me1">readUTFBytes</span><span class="br0">&#40;</span>stream.<span class="me1">bytesAvailable</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">stream.<span class="kw3">close</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
</ol>
</div>
</div>
<p>Using XAPI:</p>
<div class="codesnip-container" >
<div class="actionscript codesnip" style="font-family:monospace;">
<ol>
<li class="li1">
<div class="de1"><span class="kw2">var</span> content : <span class="kw3">String</span> = xa.<span class="me1">File</span>.<span class="me1">read</span><span class="br0">&#40;</span>path<span class="br0">&#41;</span>;</div>
</li>
</ol>
</div>
</div>
<p>You decide : )</p>
<p>XAPI for AIR hasn&#8217;t been released yet, so if you can&#8217;t wait just go and checkout the code from Github. Once it&#8217;s done it will be released as a SWC, I guess.</p>
<p>Extra ball: XAPI for AIR would be almost 100% identical to XAPI for haXe which was the original implementation (differences due to platform limitations), so if  you are up to developing <a href="http://blog.zarate.tv/2010/02/08/build-tools-with-haxe/">build tools using haXe</a> the jump would be much simpler cause you would be using the same (X)API.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zarate.tv/2010/06/19/a-folder-is-not-a-file/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Running Flash apps 24/7</title>
		<link>http://blog.zarate.tv/2010/05/03/running-flash-apps-247/</link>
		<comments>http://blog.zarate.tv/2010/05/03/running-flash-apps-247/#comments</comments>
		<pubDate>Mon, 03 May 2010 14:40:03 +0000</pubDate>
		<dc:creator>Zarate</dc:creator>
				<category><![CDATA[air]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[haxe]]></category>
		<category><![CDATA[mac]]></category>

		<guid isPermaLink="false">http://blog.zarate.tv/?p=1546</guid>
		<description><![CDATA[[UPDATE: I presented this alongside with Matt Pollitt at the London Flash Platform User Group, thanks to everyone that came down to the talk.  So sorry that I couldn't stay for longer, but had a train to catch. If you have any doubts or want to say something, just leave a comment and I'll [...]]]></description>
			<content:encoded><![CDATA[<p>[<em>UPDATE: I presented this alongside with <a href="http://www.mattpollitt.co.uk/">Matt Pollitt</a> at the <a href="http://www.lfpug.com/27th-may-2010-27052010/">London Flash Platform User Group</a>, thanks to everyone that came down to the talk.  So sorry that I couldn't stay for longer, but had a train to catch. If you have any doubts or want to say something, just leave a comment and I'll get in touch. <a href="http://www.lfpug.com/developing-flash-apps-to-run-247/">Video is now available</a>, go check it out if you missed it.</em>]</p>
<p>We are developing at <a href="http://ustwo.co.uk/">ustwo</a> a very interesting internal little project that needs to run 24/7. By default developers should always be very careful with memory leaks and hogging resources, but with an AIR/Flash app running non-stop every detail counts.</p>
<p>To top it up, the app must handle images, SWFs (AS2, AS3) and videos <strong>without going through developers</strong>. That means marketing can contact one of the designers, ask s/he to produce someething and put it to display without developer approval. Oh, and all assets are in the network, not in the machine. Scary. </p>
<p>Preliminary tests show we are doing OK, we&#8217;ve been running the app non-stop for 4 days without a crash or needing it to reboot. The player takes and releases memory when it needs to, transitions and animations look as smooth as the first day, etc.</p>
<p>Check out below some of our thoughts.</p>
<p><strong>FAIL, FAIL, FAIL</strong></p>
<p>Shit will happen, so be ready to fail. Assets won&#8217;t load, video will have the wrong codec, image will be 80mb, network will be down&#8230;.</p>
<p>That&#8217;s Google&#8217;s approach to servers. Instead of having a big fat multimillion dollar server, they have a farm of 100 mini-servers and they *know* one or two *will* crash everyday. They&#8217;ve build their systems to cope with failure and fail gracefully.</p>
<p>Also embed some default content for when everything else fails. </p>
<p><strong>RELEASE, RELEASE, RELEASE</strong></p>
<p>You must release resources. Explicitly remove every single listener you add, use FP 10 unloadAndStop and if you are in AIR don&#8217;t hold references to File objects (more about this in another post).</p>
<p>If you are a good dev, the Flash player will behave most of the times&#8230; </p>
<p><strong>MONITOR, MONITOR, MONITOR</strong></p>
<p>&#8230;but sometimes it won&#8217;t. Or something you didn&#8217;t even think was possible will happen in-your-face. You can&#8217;t prevent <strong>all</strong> errors, but you can react when they happen.</p>
<p>At the beginning we were trusting our own app to be its own watchdog, but then we got a nasty crash and obviously the watchdog failed as well. So we&#8217;ve created a <a href="http://blog.zarate.tv/2010/02/08/build-tools-with-haxe/">little haXe/Neko app</a> called &#8220;<em>the helper</em>&#8221; that is automatically called every minute and that checks the state of our app.</p>
<p>At the moment, the helper is being automatically launched using <a href="http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man5/launchd.plist.5.html#//apple_ref/doc/man/5/launchd.plist">launchd</a> (fancy cron job for OS X), but that has very interesting side effects (again, more on another post).</p>
<p>The helper checks if our app is running using something like:</p>
<div class="codesnip-container" >
<div class="bash codesnip" style="font-family:monospace;">
<ol>
<li class="li1">
<div class="de1"><span class="kw2">ps</span> <span class="re5">-x</span> <span class="re5">-o</span> <span class="kw2">comm</span></div>
</li>
</ol>
</div>
</div>
<p>And parsing the result for a relevant match. If the app is not running, it starts it again using:</p>
<div class="codesnip-container" >
<div class="bash codesnip" style="font-family:monospace;">
<ol>
<li class="li1">
<div class="de1">open <span class="sy0">/</span>path<span class="sy0">/</span>to<span class="sy0">/</span>our<span class="sy0">/</span>app</div>
</li>
</ol>
</div>
</div>
<p>Since we are using AIR 2 beta, we could implement a more refined communication system using the new <a href="http://www.adobe.com/devnet/air/flex/quickstart/interacting_with_native_process.html">Native Process API</a>, but for the time being checking if the app is running &#8220;<em>the hard way</em>&#8221; is enough.</p>
<p><strong>UPDATE, UPDATE, UPDATE</strong></p>
<p>Find a good mechanism to auto-update your app. Most 24/7 apps are unattended apps and they might well be in a different room / building / city / country. But even if you are just a few steps away, you still want to be able to remotely deploy a new version.</p>
<p>We decided to implement our own update system based on GIT commits instead of relying on AIR&#8217;s update framework.</p>
<p><strong>LOG, LOG, LOG</strong></p>
<p>Log as much as you can. You&#8217;ll be happy you did when you need to find out why your app crashed. Believe me, in this case more is more, even if you face huge log files. If you are a little bit consistent you can always build automatic parsing tools for your logs or just run a simple grep to find error traces.</p>
<p>BTW, we settled for a log file per day to avoid massive log files.  </p>
<p><strong>WARN, WARN, WARN</strong></p>
<p>As I said before, most of these apps run unattended, so you want to be notified as soon as possible when there&#8217;s an error. You can:</p>
<p>* Use a private Twitter account that people subscribe to.<br />
* Send an email. You can do that from Flash using for example <a href="http://www.bytearray.org/?p=27">SMTP Mailer</a> and a local SMTP server.</p>
<p>Whatever you do, don&#8217;t rely on one method only, specially Twitter, in case is down when the app needs it.</p>
<p><strong>REMOTE, REMOTE, REMOTE</strong></p>
<p>You either enable VNC, SSH or both. If you can&#8217;t, then be prepared for walking / driving / taking the bus a lot.</p>
<p>&#8211;</p>
<p>I&#8217;ll leave the details of running your apps using launchd and the peculiar way in which AIR holds &#8220;hard&#8221; references to files for another posts.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zarate.tv/2010/05/03/running-flash-apps-247/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Giving a go to haxIgniter</title>
		<link>http://blog.zarate.tv/2010/04/05/giving-a-go-to-haxigniter/</link>
		<comments>http://blog.zarate.tv/2010/04/05/giving-a-go-to-haxigniter/#comments</comments>
		<pubDate>Mon, 05 Apr 2010 10:48:00 +0000</pubDate>
		<dc:creator>Zarate</dc:creator>
				<category><![CDATA[haxe]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blog.zarate.tv/?p=1486</guid>
		<description><![CDATA[Every time I come back to PHP I miss a compiler to save me from my stupid silly mistakes. Also, I have to say that after years of AS2, AS3 and haXe, PHP&#8217;s syntax feels odd. And basically that&#8217;s the excuse to try haxIginiter, a web framework for haXe targeting PHP and Neko.
[Warning, haxeIgniter is [...]]]></description>
			<content:encoded><![CDATA[<p>Every time I come back to PHP I miss a compiler to save me from my stupid silly mistakes. Also, I have to say that after years of AS2, AS3 and haXe, PHP&#8217;s syntax feels odd. And basically that&#8217;s the excuse to try <a href="http://wiki.github.com/ciscoheat/haxigniter/">haxIginiter</a>, a web framework for haXe targeting PHP and Neko.</p>
<p>[<em>Warning, haxeIgniter is not a port of <a href="http://codeigniter.com/">CodeIgniter</a>, the PHP framework. Sure, ideas are pretty similar, but it's not a direct port</em>]</p>
<p>As a rule of thumb, I like it. Although docs and code need further improvement, it seems easy enough to get your head around. Let alone it brings a compiler and friendly haXe syntax to the server. If you want to try it yourself, read the docs, starting at the <a href="http://wiki.github.com/ciscoheat/haxigniter/">intro</a> and follow links from there.</p>
<p>I&#8217;ll list some things that got me and might save you some time.</p>
<p><strong>By default only works in the root of your server</strong></p>
<p>In theory you should be able to make it work in any folder by tweaking Config.hx, but I got it working in the root and didn&#8217;t try again.</p>
<p><strong>Needs write permission on www/runtime folder</strong></p>
<p>When I started testing on OSX under XAMPP I wasn&#8217;t getting anything on the screen or Apache logs, for some reason. Finally tried in Ubuntu and got to the problem, you need write access folders in www/runtime. </p>
<p><strong>Custom router</strong></p>
<p>The router is the piece of code that decides the &#8220;translation&#8221; between URL and controllers. There&#8217;re 2 by default, Basic and RESTful. Basic translates URLs to classes like this:</p>
<p>site.com/class/method/param1/param2</p>
<p>The RESTful follows the <a href="http://wiki.github.com/ciscoheat/haxigniter/rest-reference">REST approach</a> where:</p>
<p>site.com/controller/id > show(id, ?args)<br />
site.com/controller/new > make(?args)<br />
&#8230;</p>
<p>Ok, but what if you need more control than that? Well, for the time being you just have to roll your own. Create a MyRouter class implementing Router, add it to your Config.hx (about line 259 in 0.9.2) and you have full control over mapping URLs to controllers. See DefaultRouter.hx in haxigniter.server.routing for sample (as any other library, haxIgniter is installed in haxelib&#8217;s path, find it running <em>haxelib path</em> or <em>haxelib setup</em>).</p>
<p><strong>No obvious way of creating common + content views</strong></p>
<p>haxeIgniter offers 3 different template systems. <a href="http://haxe.org/doc/cross/template">haxe.Template</a> (default), <a href="http://haxe.org/com/libs/templo">Templo</a> and good ol&#8217; <a href="http://www.smarty.net/">Smarty</a>. I&#8217;m not so sure that <em>more is more</em> in this case, especially since there&#8217;s a low common denominator interface to deal with all of them, but anyway.</p>
<p>If you want to create a common + content view (common being html header, title, css and js links and content being each page&#8217;s specific markup) you need to render templates inside templates:</p>
<div class="codesnip-container" >
<div class="actionscript codesnip" style="font-family:monospace;">
<ol>
<li class="li1">
<div class="de1"><span class="co1">// Create content template and assign some sample value</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">var</span> contentTemplate = <span class="kw2">new</span> haxigniter.<span class="me1">server</span>.<span class="me1">views</span>.<span class="me1">HaxeTemplate</span><span class="br0">&#40;</span><span class="kw3">this</span>.<span class="me1">config</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">contentTemplate.<span class="me1">assign</span><span class="br0">&#40;</span><span class="st0">&#8216;project&#8217;</span>, <span class="st0">&#8216;Wadus&#8217;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// Render content template and assign output to content var</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// in main template. Main template needs ::content:: variable!</span></div>
</li>
<li class="li1">
<div class="de1">view.<span class="me1">assign</span><span class="br0">&#40;</span><span class="st0">&#8216;content&#8217;</span>, contentTemplate.<span class="me1">render</span><span class="br0">&#40;</span><span class="st0">&#8216;page.mtt&#8217;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// Display main template</span></div>
</li>
<li class="li1">
<div class="de1">view.<span class="me1">display</span><span class="br0">&#40;</span><span class="st0">&#8216;common.mtt&#8217;</span><span class="br0">&#41;</span>;</div>
</li>
</ol>
</div>
</div>
<p><strong>No helper for linking assets into views</strong></p>
<p>By default there&#8217;s no helper to include assets in your view (js, css, images, etc). Something like:</p>
<div class="codesnip-container" >
<div class="actionscript codesnip" style="font-family:monospace;">
<ol>
<li class="li1">
<div class="de1"><span class="kw3">html</span>.<span class="me1">image</span><span class="br0">&#40;</span><span class="st0">&#8216;foo.png&#8217;</span><span class="br0">&#41;</span>;</div>
</li>
</ol>
</div>
</div>
<p>In theory, inside a view, that code would create a img tag with the right path to the foo image, working out what the application path is inside the server, etc. At the moment there&#8217;s nothing like that, but you can set the <a href="http://www.w3schools.com/TAGS/tag_base.asp">base path</a> in your html and then use absolute paths. Something like:</p>
<div class="codesnip-container" >
<div class="actionscript codesnip" style="font-family:monospace;">
<ol>
<li class="li1">
<div class="de1"><span class="co1">// In your controller. Needs ::baseUrl:: in the template</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">var</span> <span class="kw3">url</span> = <span class="kw2">new</span> haxigniter.<span class="me1">server</span>.<span class="me1">libraries</span>.<span class="kw3">Url</span><span class="br0">&#40;</span><span class="kw3">this</span>.<span class="me1">config</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">view.<span class="me1">assign</span><span class="br0">&#40;</span><span class="st0">&#8216;baseUrl&#8217;</span>, <span class="kw3">url</span>.<span class="me1">linkUrl</span><span class="br0">&#40;</span><span class="br0">&#41;</span> + <span class="st0">&#8216;/&#8217;</span><span class="br0">&#41;</span>;</div>
</li>
</ol>
</div>
</div>
<div class="codesnip-container" >
<div class="html4strict codesnip" style="font-family:monospace;">
<ol>
<li class="li1">
<div class="de1"><span class="sc-1">&lt;!&#8211; In your view -&gt;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="sc-1">&lt;img src=&#8217;/foo.png&#8217; /&gt;</span></div>
</li>
</ol>
</div>
</div>
<p>&#8211;</p>
<p>So, there&#8217;re a few gotchas and probably haxeIgniter is not ready for mass consumption yet, but I think it&#8217;s a good start. I&#8217;m using it for building the next version of my website, so you will be able to look at &#8220;real&#8221; code soon. I&#8217;m using quotes here because the next version of my site is going to be <strong>very, very simple</strong>, so probably not the most complete haxeIgniter sample, but sample code nonetheless : )</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zarate.tv/2010/04/05/giving-a-go-to-haxigniter/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>XAPI</title>
		<link>http://blog.zarate.tv/2010/02/23/xapi/</link>
		<comments>http://blog.zarate.tv/2010/02/23/xapi/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 13:53:23 +0000</pubDate>
		<dc:creator>Zarate</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[haxe]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://blog.zarate.tv/?p=1467</guid>
		<description><![CDATA[As I said in the last post regarding build tools in haXe, I&#8217;ve been working in XAPI. 
To put it simply, XAPI (Ximple API, the &#8220;x&#8221; is mandatory on haXe projects, you know?!) is a higher level API for haXe backends. Tu put it even simpler, that means doing more with less lines of code.
So, [...]]]></description>
			<content:encoded><![CDATA[<p>As I said in the last post regarding <a href="http://blog.zarate.tv/2010/02/08/build-tools-with-haxe/">build tools in haXe</a>, I&#8217;ve been working in <a href="http://github.com/zarate/xapi">XAPI</a>. </p>
<p>To put it simply, XAPI (Ximple API, the &#8220;<em>x</em>&#8221; is mandatory on haXe projects, you know?!) is a higher level API for haXe backends. Tu put it even simpler, that means doing more with less lines of code.</p>
<p><strong>So, what can it do?</strong></p>
<ul>
<li>Read / write / manage files and folders.</li>
<li>Get information about your system (OS, where&#8217;s the temp or the user folder, etc.).</li>
<li>Interact with other tools in your system (Git, SVN, MTASC, SWfMill, etc.).</li>
<li>Search for files and folders.</li>
<li>And other smaller bits and pieces.</li>
</ul>
<p>You can do all this already with &#8220;plain&#8221; haXe, XAPI only simplifies how you do it. Sometimes it also prevents developers for making mistakes. Two quick samples:</p>
<p>Writing content to a text file using XAPI:</p>
<div class="codesnip-container" >
<div class="actionscript codesnip" style="font-family:monospace;">
<ol>
<li class="li1">
<div class="de1">xa.<span class="me1">File</span>.<span class="me1">write</span><span class="br0">&#40;</span><span class="st0">&#8216;myFile.txt&#8217;</span>, <span class="st0">&#8216;haXe rocks&#8217;</span><span class="br0">&#41;</span>;</div>
</li>
</ol>
</div>
</div>
<p>Using plain haXe:</p>
<div class="codesnip-container" >
<div class="actionscript codesnip" style="font-family:monospace;">
<ol>
<li class="li1">
<div class="de1"><span class="kw2">var</span> f = neko.<span class="me1">io</span>.<span class="me1">File</span>.<span class="me1">write</span><span class="br0">&#40;</span><span class="st0">&#8216;myFile.txt&#8217;</span>, <span class="kw2">false</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">f.<span class="me1">writeString</span><span class="br0">&#40;</span><span class="st0">&#8216;haXe rocks&#8217;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">f.<span class="kw3">close</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
</ol>
</div>
</div>
<p>[<em>BTW, the opposite is not true, there's neko.io.File.getContent() which I didn't know about and used to use for this example. And also, turns out the PHP package has php.io.File. putContent()</em>]</p>
<p>Checking if a file exists using XAPI:</p>
<div class="codesnip-container" >
<div class="actionscript codesnip" style="font-family:monospace;">
<ol>
<li class="li1">
<div class="de1"><span class="kw2">var</span> exists = xa.<span class="me1">File</span>.<span class="me1">isFile</span><span class="br0">&#40;</span><span class="kw2">null</span><span class="br0">&#41;</span>;</div>
</li>
</ol>
</div>
</div>
<p>Using plain haXe:</p>
<div class="codesnip-container" >
<div class="actionscript codesnip" style="font-family:monospace;">
<ol>
<li class="li1">
<div class="de1"><span class="kw2">var</span> exists = <span class="sy0">!</span>neko.<span class="me1">FileSystem</span>.<span class="me1">isFolder</span><span class="br0">&#40;</span><span class="kw2">null</span><span class="br0">&#41;</span>;</div>
</li>
</ol>
</div>
</div>
<p>So, there&#8217;s no &#8220;isFile()&#8221; call in the API, plus using haXe alone you would get an exception because you are passing null (in real world you would never pass null on purpose, but it happens that you pass a variable that is), whereas in XAPI I check for null and, if it is, it just returns false. I think that&#8217;s how it should work and I <a href="http://code.google.com/p/haxe/issues/detail?id=67">reported it as a bug</a>, but it won&#8217;t get fixed :/</p>
<p>Those are the little and not so little additions that XAPI provides to the Std API. To get full details, just install and check out the docs. Simplest option is installing via haxelib (<em>haxelib install xapi</em>), but you can read <a href="http://wiki.github.com/zarate/xapi/installation">installation instructions</a> on the wiki.  </p>
<p>HippoHX&#8217;s API is the mother of XAPI. That&#8217;s when I first decided that I was going to expose a slightly different API that **I** thought it was simpler. See those stars around &#8220;I&#8221;? They are important. You see, this business of building APIs is very, very subjective.  I honestly think it&#8217;s much like designing. You need to know your target audience, one size doesn&#8217;t fit all, and there&#8217;s a great deal of taste involved.</p>
<p>XAPI is an API for developers like me, with the same needs I have, etc., etc. I&#8217;m fine with that, I have no plan to dominate the world (yet), and I&#8217;ve built XAPI to help me on my own projects. I open it to the world so hopefully a) other devs will benefit and b) people will help me fix bugs.</p>
<p><strong>What the future is? </strong></p>
<p>Turns out XAPI is almost feature complete because I want to keep it simple. I want it to be easy to use and I don&#8217;t want to target every single project out there, because that&#8217;s what the Std API is for. When we were discussing on the list about what XAPI could do,<a href="http://jdegoes.squarespace.com/">Jonh de Goes</a> came up with an interesting idea about building some kind of &#8220;general file system wrapper&#8221; API where each &#8220;node&#8221; could be a file on your system, in the cloud or somewhere else (read it <a href="http://lists.motion-twin.com/pipermail/haxe/2010-January/033324.html">here</a>). Well, that sounds like an awesome project, but out of the scope of XAPI. </p>
<p>On what can only be described as sweet irony, he also was the person who convinced me <strong>NOT</strong> to do it when I read his series of posts about writing Good APIs (<a href="http://jdegoes.squarespace.com/journal/2009/5/2/good-api-design-part-1.html">1</a>, <a href="http://jdegoes.squarespace.com/journal/2009/5/6/good-api-design-part-2.html">2</a>, <a href="http://jdegoes.squarespace.com/journal/2009/5/11/good-api-design-part-3.html">3</a>, <a href="http://jdegoes.squarespace.com/journal/2009/9/28/good-api-design-part-4.html">4</a>. Extra Ball, also read his post about <a href="http://jdegoes.squarespace.com/journal/2009/1/3/dispersed-development.html">Dispersed Development</a>).</p>
<p><em>Sweet Spot Saturation Rule</em></p>
<blockquote><p>&#8220;By letting go of the power users, they achieve high usability (this is not always an inevitable tradeoff, but at the very least, simpler applications are easier to make usable than more complex applications&#8221;</p></blockquote>
<p>And that&#8217;s exactly what I&#8217;m planning to do. By not implementing the general file system wrapper he proposes I&#8217;m going to let go power-users like him on behalf of mid-users like myself. I hope it pays off resulting in a very simple to use API. Time will tell.</p>
<p>One thing that I&#8217;m thinking about is custom exceptions, though. At the moment if the Neko VM finds a problem it raises an exception which I&#8217;m not sure we know the type of. So catching them in XAPI and raising new ones to which we know the type I think would help a lot. Ideas welcome, btw. </p>
<p><strong>Is XAPI for you?</strong>  </p>
<p>Well, depends on the type of projects you face and the kind of developer you are. </p>
<p>If you build for backends (php, cpp, neko), it might interest you.<br />
If you are rather new to haXe, it might interest you.<br />
If you develop build tools, it might interest you.<br />
If you are wiling to sacrifice some flexibility to gain simplicity, it might interest you.</p>
<p>And to wrap up, thanks to <a href="http://www.wildwinter.net/">Ian Thomas</a>, he was the first one <a href="http://groups.google.com/group/hippohx/msg/4044af472b8aab4b">suggesting such a project more than a year ago</a>. I might need some time, but I do deliver : )</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zarate.tv/2010/02/23/xapi/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Build tools with haXe</title>
		<link>http://blog.zarate.tv/2010/02/08/build-tools-with-haxe/</link>
		<comments>http://blog.zarate.tv/2010/02/08/build-tools-with-haxe/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 21:40:21 +0000</pubDate>
		<dc:creator>Zarate</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[haxe]]></category>

		<guid isPermaLink="false">http://blog.zarate.tv/?p=1451</guid>
		<description><![CDATA[Remember how I&#8217;ve been lately pestering about how cool is learning to program in Bash? Well, I&#8217;m not retracting, but last couple of days I&#8217;ve been doing the same thing but using haXe + Neko + Xcross. And I like it better.
How is this better than the others?
I think it&#8217;s better than Bash because haXe [...]]]></description>
			<content:encoded><![CDATA[<p>Remember how I&#8217;ve been lately pestering about how cool is learning to program in Bash? Well, I&#8217;m not retracting, but last couple of days I&#8217;ve been doing the same thing but using <a href="http://haxe.org/">haXe</a> + <a href="http://nekovm.org/">Neko</a> + <a href="http://code.google.com/p/xcross/">Xcross</a>. And I like it better.</p>
<p><strong>How is this better than the others?</strong></p>
<p>I think it&#8217;s better than Bash because haXe is an OO language and it&#8217;s fully crossplatform (no bash in Win unless you use <a href="http://www.cygwin.com/">Cygwin</a>). I also think it&#8217;s better than <a href="http://ant.apache.org/">Ant</a> because you get rid of bloody-fatty Java as a dependency. </p>
<p><strong>How is this done</strong></p>
<p>In a nutshell: you program in haXe, compile to Neko and then pack to a native app using Xcross. Piece of cake! </p>
<p>Let&#8217;s say you need to read some config file, compile your AS using MTASC and copy the output file to several places.  Let&#8217;s assume a simple config file like this:</p>
<div class="codesnip-container" >tv.zarate.wadus.Main.hx<br />
wadus.swf</div>
<p>And that we pass it to our tool like this:</p>
<div class="codesnip-container" >
<div class="bash codesnip" style="font-family:monospace;">
<ol>
<li class="li1">
<div class="de1">tool config.cfg</div>
</li>
</ol>
</div>
</div>
<p>Now the pseudo-code:</p>
<div class="codesnip-container" >
<div class="actionscript codesnip" style="font-family:monospace;">
<ol>
<li class="li1">
<div class="de1"><span class="co1">// Get application args, and use the first one</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">var</span> args : Array<span class="sy0">&lt;</span>String<span class="sy0">&gt;</span> = xa.<span class="me1">Application</span>.<span class="me1">getArgs</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">var</span> configPath : <span class="kw3">String</span> = args<span class="br0">&#91;</span>0<span class="br0">&#93;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// Read the content of the config file and parse it</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">var</span> content : <span class="kw3">String</span> = xa.<span class="me1">File</span>.<span class="me1">read</span><span class="br0">&#40;</span>configPath<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">var</span> lines : Array<span class="sy0">&lt;</span>String<span class="sy0">&gt;</span> = content.<span class="kw3">split</span><span class="br0">&#40;</span><span class="st0">&quot;<span class="es0">\n</span>&quot;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">var</span> <span class="kw2">class</span> : <span class="kw3">String</span> = lines<span class="br0">&#91;</span>0<span class="br0">&#93;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">var</span> swf : <span class="kw3">String</span> = lines<span class="br0">&#91;</span>1<span class="br0">&#93;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// Call MTASC passing the output swf and the class read from the config file</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">var</span> args = <span class="br0">&#91;</span><span class="st0">&quot;-swf&quot;</span>, swf, <span class="st0">&quot;-main&quot;</span>, <span class="kw2">class</span><span class="br0">&#93;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">var</span> p = <span class="kw2">new</span> xa.<span class="me1">Process</span><span class="br0">&#40;</span>mtascPath, args<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">var</span> output = p.<span class="me1">getOutput</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">var</span> <span class="kw3">error</span> = p.<span class="me1">getError</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">var</span> exitCode = p.<span class="me1">exitCode</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// Check MTASC exit code, if not 0, something went wrong</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">if</span><span class="br0">&#40;</span>exitCode <span class="sy0">!</span>= 0<span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;xa.<span class="me1">Utils</span>.<span class="kw3">print</span><span class="br0">&#40;</span><span class="kw3">error</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">else</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;xa.<span class="me1">Utils</span>.<span class="kw3">print</span><span class="br0">&#40;</span>output<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
</ol>
</div>
</div>
<p>And now compiling:</p>
<div class="codesnip-container" >
<div class="bash codesnip" style="font-family:monospace;">
<ol>
<li class="li1">
<div class="de1">haxe <span class="re5">-neko</span> wadus.n <span class="re5">-main</span> Wadus.hx</div>
</li>
<li class="li1">
<div class="de1">haxelib run xcross builder.n</div>
</li>
</ol>
</div>
</div>
<p>That should be it; we&#8217;ve read and parsed a config file passed as a parameter and then called MTASC handling the result. Then compiled to native Win, Mac and Linux apps. </p>
<p>As I said, that&#8217;s pseudo code, on a real life app you would definitely need more error handling or might have a more complex config file (maybe xml, try parsing xml in Bash!), etc., but since haXe is a really similar to Flash or JS, it feels very natural to me. Granted, you can do the same in Bash, but to my eyes is much more complicated.</p>
<p>Some more notes:</p>
<ul>
<li>From a Neko app you can call any other tool on your system. That includes SVN, Ant, GIT, grep&#8230; Whatever is there, you can call it.</li>
<li>Apps created with Xcross embed the Neko VM so they have zero dependencies (unless you use any of the tools described above, of course).</li>
</ul>
<p>We are investigating this route instead of Ant for our build scripts. You might think it&#8217;s kind of reinventing the Ant wheel, but we have the feeling that this is going to be <strong>much</strong> faster and flexible to our needs. </p>
<p>We&#8217;ll see : )</p>
<p>PS: I&#8217;ve used the xa.* package in the code, that&#8217;s a little project I&#8217;m working on to provide a simpler haXe API for backends. This is a spin-off of HippoHX and it&#8217;s not ready yet, but if you are interested you can follow the development in <a href="http://github.com/zarate/xapi">GitHub</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zarate.tv/2010/02/08/build-tools-with-haxe/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>hxGaia is waiting for you</title>
		<link>http://blog.zarate.tv/2009/05/11/hxgaia-is-waiting-for-you/</link>
		<comments>http://blog.zarate.tv/2009/05/11/hxgaia-is-waiting-for-you/#comments</comments>
		<pubDate>Mon, 11 May 2009 08:50:13 +0000</pubDate>
		<dc:creator>Zarate</dc:creator>
				<category><![CDATA[as3]]></category>
		<category><![CDATA[haxe]]></category>

		<guid isPermaLink="false">http://blog.zarate.tv/?p=959</guid>
		<description><![CDATA[How cool is that?!
Unless you&#8217;ve been living under a HUGE rock you should know by now what GAIA is. Either that or you are not a Flash dev so here it goes anyway: GAIA is a Flash framework that is meant to greatly speed up your development workflow. It automatically gives you scaffolding, SWFAddress, SWFObject, [...]]]></description>
			<content:encoded><![CDATA[<p>How cool is that?!</p>
<p>Unless you&#8217;ve been living under a HUGE rock you should know by now what <a href="http://www.gaiaflashframework.com/">GAIA</a> is. Either that or you are not a Flash dev so here it goes anyway: GAIA is a Flash framework that is meant to greatly speed up your development workflow. It automatically gives you scaffolding, SWFAddress, SWFObject, transitions between pages, etc. And as with any other frameworks, it makes bringing new people to the team much more easier because it&#8217;s known and documented. The problem for Linux peeps was that it requires the Flash IDE. Well, not any more!</p>
<p><a href="http://www.designrealm.co.uk/">Lee McColl</a> (one of the guys behind the <a href="http://www.amazon.co.uk/gp/product/0470122137?ie=UTF8&#038;tag=designrealm-21&#038;linkCode=as2&#038;camp=1634&#038;creative=6738&#038;creativeASIN=0470122137">haXe book</a>) has ported it to haXe. This is just version 0.1 and there&#8217;re still some wrinkles here and there, so some more testing is required. Read the <a href="http://lists.motion-twin.com/pipermail/haxe/2009-May/025063.html">announce on the mailing list</a> for more info.</p>
<p>This is another great addition to haXe after PHP and soon-to-be-released C++ backends. Whatever your dev background is, I think haXe is well worth looking at, you can start by the brand new <a href="http://haxe.org/manual/1_intro">haXe introduction</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zarate.tv/2009/05/11/hxgaia-is-waiting-for-you/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Want it fast?</title>
		<link>http://blog.zarate.tv/2008/12/05/want-it-fast/</link>
		<comments>http://blog.zarate.tv/2008/12/05/want-it-fast/#comments</comments>
		<pubDate>Fri, 05 Dec 2008 11:58:27 +0000</pubDate>
		<dc:creator>Zarate</dc:creator>
				<category><![CDATA[adobe]]></category>
		<category><![CDATA[alchemy]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[haxe]]></category>

		<guid isPermaLink="false">http://blog.zarate.tv/?p=424</guid>
		<description><![CDATA[Probably you&#8217;ve already heard about Adobe Alchemy, if you haven&#8217;t, here&#8217;s quick sum up: Alchemy is a tool to cross-compile pure C/C++ to a SWF for the Flash player 10. If you want to know more about it, just go to the Labs and follow the links. What&#8217;s really interesting is this:
&#8230;performance can be considerably [...]]]></description>
			<content:encoded><![CDATA[<p>Probably you&#8217;ve already heard about <a href="http://labs.adobe.com/technologies/alchemy/">Adobe Alchemy</a>, if you haven&#8217;t, here&#8217;s quick sum up: Alchemy is a tool to cross-compile pure C/C++ to a SWF for the Flash player 10. If you want to know more about it, just go to the Labs and follow the links. What&#8217;s really interesting is this:</p>
<blockquote><p>&#8230;performance can be considerably faster than ActionScript 3.0&#8230;</p></blockquote>
<p>Luckily for us, what&#8217;s interesting to me is a challenge for the so-called <em>man that never sleeps</em>, Nicolas Cannasse. How come you could create faster SWFs with Alchemy? At the end of the day it&#8217;s just a SWF, right? Well, it&#8217;s not. Alchemy SWFs use parts of the AVM2 that &#8220;regular&#8221; SWFs don&#8217;t use.</p>
<p>It didn&#8217;t take long to Nicolas to come up with the haXe solution: the <a href="http://ncannasse.fr/blog/virtual_memory_api">Virtual Memory API</a>. So from haXe you can use this new API that outputs the same bytecode as Alchemy does, therefore you get super-fast SWFs. Veeeeeery cool. Or very cool if you are an haXe developer.</p>
<p>And this is my point. How weird it is that there&#8217;re 2 ways of producing fast SWFs but none of them is officially supported by Adobe? One is in the labs, the other one is haXe. Now put yourself in the shoes of a Papervision or Away3D developer. It sucks. Those projects (and many others) need to squeeze the player till the very last drop of performance. And when you are talking about 30-40% performance boost&#8230;. it&#8217;s a big deal.</p>
<p>On the bright side, Adobe keeps improving the AVM2 and that&#8217;s always good for everybody, haXe developer or not!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zarate.tv/2008/12/05/want-it-fast/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>haXe goes CSS</title>
		<link>http://blog.zarate.tv/2008/10/19/haxe-goes-css/</link>
		<comments>http://blog.zarate.tv/2008/10/19/haxe-goes-css/#comments</comments>
		<pubDate>Sun, 19 Oct 2008 15:06:27 +0000</pubDate>
		<dc:creator>Zarate</dc:creator>
				<category><![CDATA[haxe]]></category>

		<guid isPermaLink="false">http://blog.zarate.tv/?p=198</guid>
		<description><![CDATA[Say what? Yep, you read it right. Mr Cannasse has just announced HSS.
To sum up, write your CSS files using haXe. There are quite nice tricks like nested block, variables, etc. I&#8217;ll definitely give it a go when needed, but I&#8217;d like to know what my CSS friends think about it.
And as usual, hats off [...]]]></description>
			<content:encoded><![CDATA[<p>Say what? Yep, you read it right. Mr <a href="http://ncannasse.fr/">Cannasse</a> has just <a href="http://lists.motion-twin.com/pipermail/haxe/2008-October/020155.html">announced</a> <a href="http://ncannasse.fr/projects/hss">HSS</a>.</p>
<p>To sum up, write your CSS files using haXe. There are quite nice tricks like nested block, variables, etc. I&#8217;ll definitely give it a go when needed, but I&#8217;d like to know what <a href="http://orangeside.org/">my</a> CSS <a href="http://denegro.com/">friends</a> think about it.</p>
<p>And as usual, hats off to Nicolas. I love the spirit: &#8220;<em>I don&#8217;t like how this works I think I can make it better</em>&#8221; that we all should follow. Also, he shouldn&#8217;t create any more tools, he should write a book about productivity to teach us that how to build them ourselves. </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zarate.tv/2008/10/19/haxe-goes-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
