<?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>blog.betabong.com &#187; open source</title>
	<atom:link href="http://blog.betabong.com/tag/open-source/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.betabong.com</link>
	<description></description>
	<lastBuildDate>Thu, 13 May 2010 09:49:40 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Alchemy – THE cool new flash feature!</title>
		<link>http://blog.betabong.com/2008/11/19/alchemy-release/</link>
		<comments>http://blog.betabong.com/2008/11/19/alchemy-release/#comments</comments>
		<pubDate>Wed, 19 Nov 2008 14:53:39 +0000</pubDate>
		<dc:creator>betabong</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Flash & more]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://blog.betabong.com/?p=142</guid>
		<description><![CDATA[Adobe today released Alchemy, a SDK to compile C/C++ code into AVM2 Bytecode.
This has been sneak peaked a while ago (see Video below) &#8211; now it&#8217;s here. And I&#8217;m amazed!! Think of the possiblities: XSLT interpreter (as demoed in the vid), 3D speed, super fast parsing, physics, AI &#8211; everything that&#8217;s CPU intensive and won&#8217;t [...]


Related posts:<ol><li><a href='http://blog.betabong.com/2008/09/23/e4x-string-parser/' rel='bookmark' title='Permanent Link: E4X String Parser'>E4X String Parser</a></li><li><a href='http://blog.betabong.com/2008/08/22/flash-player-10-i-love-speed/' rel='bookmark' title='Permanent Link: Flash Player 10 – I love speed'>Flash Player 10 – I love speed</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p>Adobe today released <a href="http://labs.adobe.com/technologies/alchemy/">Alchemy</a>, a SDK to compile C/C++ code into AVM2 Bytecode.</p>
<p>This has been sneak peaked a while ago (see Video below) &#8211; now it&#8217;s here. And I&#8217;m amazed!! Think of the possiblities: XSLT interpreter (as demoed in the vid), 3D speed, super fast parsing, physics, AI &#8211; everything that&#8217;s CPU intensive and won&#8217;t need any platform specific stuff.</p>
<p>So far this C code still looks pretty fucked up to me (see examples at the labs), but hell, I&#8217;m sure that one day we&#8217;re gonna see some real fancy stuff thanks to this. I&#8217;m looking forward!</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="512" height="380" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://blip.tv/play/AZmeJIX8bw" /><embed type="application/x-shockwave-flash" width="512" height="380" src="http://blip.tv/play/AZmeJIX8bw"></embed></object></p>


<p>Related posts:<ol><li><a href='http://blog.betabong.com/2008/09/23/e4x-string-parser/' rel='bookmark' title='Permanent Link: E4X String Parser'>E4X String Parser</a></li><li><a href='http://blog.betabong.com/2008/08/22/flash-player-10-i-love-speed/' rel='bookmark' title='Permanent Link: Flash Player 10 – I love speed'>Flash Player 10 – I love speed</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.betabong.com/2008/11/19/alchemy-release/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>E4X String Parser</title>
		<link>http://blog.betabong.com/2008/09/23/e4x-string-parser/</link>
		<comments>http://blog.betabong.com/2008/09/23/e4x-string-parser/#comments</comments>
		<pubDate>Tue, 23 Sep 2008 11:13:00 +0000</pubDate>
		<dc:creator>betabong</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[e4x]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[os]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://blog.betabong.com/?p=111</guid>
		<description><![CDATA[I did a lot of string parsing in the recent time: CSS Selectors, XML Display Objects, Stylesheets, &#8230; I also need XML selection from String expressions – I formerly (AS2) used the great XPath4AS2 from XFactorStudio which did it&#8217;s job well (though a bit slow, it&#8217;s AS2 after all).
There&#8217;s also one for Actionscript 3 (xpath-as3). [...]


Related posts:<ol><li><a href='http://blog.betabong.com/2008/09/01/speed-parsing-string-in-as3/' rel='bookmark' title='Permanent Link: Simplicity follows Performance – parsing Strings in Actionscript 3'>Simplicity follows Performance – parsing Strings in Actionscript 3</a></li><li><a href='http://blog.betabong.com/2008/11/19/alchemy-release/' rel='bookmark' title='Permanent Link: Alchemy – THE cool new flash feature!'>Alchemy – THE cool new flash feature!</a></li><li><a href='http://blog.betabong.com/2008/07/21/nested-inner-functions-can-be-evil/' rel='bookmark' title='Permanent Link: Nested inner functions can be evil'>Nested inner functions can be evil</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p>I did a lot of string parsing in the recent time: CSS Selectors, XML Display Objects, Stylesheets, &#8230; I also need XML selection from String expressions – I formerly (AS2) used the great <a href="http://www.xfactorstudio.com/">XPath4AS2 from XFactorStudio</a> which did it&#8217;s job well (though a bit slow, it&#8217;s AS2 after all).</p>
<p>There&#8217;s also one for Actionscript 3 (<a href="http://code.google.com/p/xpath-as3/">xpath-as3</a>). But.. well&#8230; I wanted to go for some real speed! I like XPath a lot, but we now have native E4X selection in Actionscript 3, quite a different concept of node selection, and the conversion of XPath to E4X obviously results in quite a compromise in performance.</p>
<p>So all I need is a decent E4X parser. And hey, I found one! E<a href="http://www.adobe.com/devnet/flex/articles/e4x_print.html">4XParser from Digital Primates</a>. It does its job really well, especially considering the very compact code it consists of. Thanks to some preparsing and caching, it&#8217;s also quite fast.</p>
<p><strong>Still I thought I can do better :-)</strong> So I planted myself for a day (and a night) in front of my displays and hacked the hell out of it. The result is a little library which does pretty much the same thing as E4XParser, though pretty much more and a little faster too (15% to 50%). It&#8217;s about half as fast as the native E4X selection (once parsed). You can do nearly anything you can do with E4X. Use it like this:</p>
<p> </p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">import</span> com.<span style="color: #006600;">betabong</span>.<span style="color: #0066CC;">xml</span>.<span style="color: #006600;">e4x</span>.<span style="color: #006600;">E4X</span>;
<span style="color: #000000; font-weight: bold;">var</span> result : XMLList = E4X.<span style="color: #006600;">evaluate</span><span style="color: #66cc66;">&#40;</span> xmllist , <span style="color: #ff0000;">&quot;author.( name.@last == 'Jobs' )&quot;</span> <span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #808080; font-style: italic;">// E4X.evaluate( source : XMLList , expression : String ) : XMLList</span></pre></div></div>

<p> <br />
If your source is XML, just do XMLList( xml ), if your result should be xml, do xml = result[0]</p>
<p><a href="/showcase/e4x/E4X_Parse_Test.html">Test it here</a></p>
<p><a href="http://blog.betabong.com/showcase/e4x/E4X_Parse_Test.html" target="_blank"><img class="alignnone size-full wp-image-113" title="e4x" src="http://blog.betabong.com/wp-content/uploads/2008/09/e4x.png" alt="" width="512" height="405" /></a></p>
<p><strong>Restrictions:</strong> You can&#8217;t use AND/OR in comparisions. So, this won&#8217;t go: author.( name.@first == &#8216;Steve&#8217; &amp;&amp; name.@last == &#8216;Jobs&#8217; ) – though this is only a real limitations for OR. do this for AND: author.( name.@first == &#8216;Steve&#8217; ).( name.@last == &#8216;Jobs&#8217; ).</p>
<p><strong>What you can do:</strong> Yes, you can do quite advanced stuff like author.( name.@first == name.@last ) or car.@rating.average() (one of the few proprietary functions I added). Or even</p>
<pre>*..car.( @brand.toLowerCase() == 'volvo' ).( parent().( localName() == 'group' ).@rating &gt; @rating )</pre>
<p>– a weird example, I admit, but fancy, ain&#8217;t it? :-)</p>
<p>This is the first time ever I&#8217;m releasing part of my library as Open Source (MIT licence). As soon as I&#8217;ll find some time (and if I see any interest), I&#8217;m gonna put this into Google Code, so everybody can easily checkout and participate. Until then download it from here:</p>
<p><a class="download" href="/showcase/e4x/betabong-e4x.zip">Download</a> (zip 13kb)</p>


<p>Related posts:<ol><li><a href='http://blog.betabong.com/2008/09/01/speed-parsing-string-in-as3/' rel='bookmark' title='Permanent Link: Simplicity follows Performance – parsing Strings in Actionscript 3'>Simplicity follows Performance – parsing Strings in Actionscript 3</a></li><li><a href='http://blog.betabong.com/2008/11/19/alchemy-release/' rel='bookmark' title='Permanent Link: Alchemy – THE cool new flash feature!'>Alchemy – THE cool new flash feature!</a></li><li><a href='http://blog.betabong.com/2008/07/21/nested-inner-functions-can-be-evil/' rel='bookmark' title='Permanent Link: Nested inner functions can be evil'>Nested inner functions can be evil</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.betabong.com/2008/09/23/e4x-string-parser/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
