<?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>Marc Hibbins &#187; alchemy</title>
	<atom:link href="http://blog.marchibbins.com/category/alchemy/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.marchibbins.com</link>
	<description>Freelance Web developer, blogger</description>
	<lastBuildDate>Wed, 21 Sep 2011 11:42:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Tonight, Tonight</title>
		<link>http://blog.marchibbins.com/2009/06/04/tonight-tonight/</link>
		<comments>http://blog.marchibbins.com/2009/06/04/tonight-tonight/#comments</comments>
		<pubDate>Thu, 04 Jun 2009 16:04:46 +0000</pubDate>
		<dc:creator>Marc Hibbins</dc:creator>
				<category><![CDATA[alchemy]]></category>
		<category><![CDATA[lfpug]]></category>

		<guid isPermaLink="false">http://blog.marchibbins.com/?p=677</guid>
		<description><![CDATA[Tonight's LFPUG meets for a presentation on Adobe's Alchemy project, followed by another hour on the Flash Pixel Bender plug-in.]]></description>
			<content:encoded><![CDATA[<p>Tonight&#8217;s <a title="London Flash Platform User Group  » Blog Archive   » 4th June 2009 (04/06/2009)" href="http://www.lfpug.com/4th-june-2009-04062009/" target="_blank">LFPUG</a> meets for a presentation on <a title="Adobe Labs - Alchemy" href="http://labs.adobe.com/technologies/alchemy/" target="_blank">Adobe&#8217;s Alchemy project</a>, followed by another hour on the <a title="Adobe Labs - Pixel Bender" href="http://labs.adobe.com/technologies/pixelbender/" target="_blank">Flash Pixel Bender</a> plug-in.</p>
<p>In December <a title=" » Find a Way Marc Hibbins" href="http://blog.marchibbins.com/2008/12/02/find-a-way/" target="_blank">I played around with Alchemy</a>, going through the basic set up and few of the examples. But found it tough to go much further beyond there.</p>
<p>My C and C++ isn&#8217;t great, I think there were a few bugs and glitches in the software and I couldn&#8217;t get through them. More tutorials would have been good, I guess there could be more around now, I&#8217;ve been meaning to get back into it again.</p>
<p>The presentation tonight is from Thomas Vian, a Flash developer rather than a C developer &#8211; so I&#8217;m looking forward to the session.</p>
<p>So far there are 75 people registered to attend &#8211; not a bad number, hopefully he&#8217;ll cover more than just he basic tutorials and getting started setup that Adobe offer on their Labs page.</p>
<p>There&#8217;s also a &#8216;double feature&#8217; on Adobe TV with Ryan Stewart talking to Scott Peterson about the project, there&#8217;s a demo after the interview. Good catch-up viewing:</p>
<p><span style="text-align:center; display: block;"><embed src="http://tv.adobe.com/Embed.swf" quality="high" bgcolor="#000000" width="467" height="300" name="AdobeTVPlayer" play="true" loop="false" quality="high" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" flashVars="v=~b64~aHR0cDovL2Fkb2JlLmVkZ2Vib3NzLm5ldC9mbGFzaC9hZG9iZS9hZG9iZXR2Mi9hZGNfcHJlc2VudHMvNjRfYWRjXzA3OC5mbHY/cnNzX2ZlZWRpZD0xNDcyJnhtbHZlcnM9Mg==&#038;w=467&#038;t=http://tv.adobe.com/vi+f1472v1033&#038;h=300"></embed></span></p>
<p>And not to dismiss the Pixel Bender presentation, looking forward to that too!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.marchibbins.com/2009/06/04/tonight-tonight/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Fix</title>
		<link>http://blog.marchibbins.com/2008/12/03/the-fix/</link>
		<comments>http://blog.marchibbins.com/2008/12/03/the-fix/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 10:22:40 +0000</pubDate>
		<dc:creator>Marc Hibbins</dc:creator>
				<category><![CDATA[adobe]]></category>
		<category><![CDATA[alchemy]]></category>
		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://hibbins.wordpress.com/?p=164</guid>
		<description><![CDATA[I’ve recently started playing with Adobe Alchemy, a beta project for compiling C/C++ libraries into Actionscript. I was having problems compiling the sample app - here's the fix.]]></description>
			<content:encoded><![CDATA[<p><em>I&#8217;ve recently started playing with <a title="Adobe Labs - Alchemy" href="http://labs.adobe.com/technologies/alchemy/" target="_blank">Adobe Alchemy</a>, a beta project for compiling C/C++ libraries into Actionscript.</em></p>
<p>I <a title="Find a Way - Marc Hibbins" href="http://hibbins.wordpress.com/2008/12/02/find-a-way/" target="_blank">was having problems</a> compiling the sample app &#8211; the GCC couldn&#8217;t find the Actionscript libraries and I was seeing a duplication in the path:</p>
<blockquote><p>cc1 error: /usr/lib/alchemy/usr/lib/alchemy/avm2-libc/avm2/AVM2Env.h</p></blockquote>
<p>I posted it up on the <a title="Adobe - Alchemy" href="http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid=72&amp;catid=755" target="_blank">Alchemy forums</a> and it would seem I wasn&#8217;t the only one experiencing this problem.</p>
<p>Turns out it&#8217;s an unnecessary Perl hack, in the <strong>hacks.pl</strong> script in the <strong>/alchemy/achacks/</strong> directory.</p>
<p>Commenting out the following lines of the <strong>pfix</strong> function:</p>
<blockquote><p>$p =~ s/(^|^-[-\w]+=?)(\/usr\/include\/)/$1${home}\/avm2-libc\/include\//;<br />
$p =~ s/(^|^-[-\w]+=?)(\/usr\/)/$1${home}$2/;</p></blockquote>
<p>and it stops the incorrect &#8216;fix&#8217; of the file path.</p>
<p>Try again, and the SWC compiles. Who says forums don&#8217;t work? There&#8217;s a lot of excitement about this project, glad to see them so active.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.marchibbins.com/2008/12/03/the-fix/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Find a Way</title>
		<link>http://blog.marchibbins.com/2008/12/02/find-a-way/</link>
		<comments>http://blog.marchibbins.com/2008/12/02/find-a-way/#comments</comments>
		<pubDate>Mon, 01 Dec 2008 23:42:46 +0000</pubDate>
		<dc:creator>Marc Hibbins</dc:creator>
				<category><![CDATA[adobe]]></category>
		<category><![CDATA[air]]></category>
		<category><![CDATA[alchemy]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://hibbins.wordpress.com/?p=161</guid>
		<description><![CDATA[Adobe recently beta released a new project codenamed Alchemy, a research project that allows you to compile C and C++ code to run on the Actionscript Virtual Machine (AVM2), enabling you to utilise compiled C and C++ libraries in your web applications.]]></description>
			<content:encoded><![CDATA[<p>Adobe recently beta released a new project codenamed <a title="Adobe Labs - Alchemy" href="http://labs.adobe.com/technologies/alchemy/" target="_blank">Alchemy</a>.</p>
<p>Alchemy is basically a research project that allows you to compile C and C++ code to run on the Actionscript Virtual Machine (AVM2), essentially, enabling you to utilise compiled C and C++ libraries, &#8216;as Actionscript&#8217;, in all your web applications:</p>
<blockquote><p>Alchemy is primarily intended to be used with C/C++ libraries that have few operating system dependencies. Ideally suited for computation-intensive use cases, such as audio/video transcoding, data manipulation, XML parsing, cryptographic functions or physics simulation.</p></blockquote>
<p>It used to be called <a title="What is FlaCC all about? | Peter Elst" href="http://www.peterelst.com/blog/2008/10/04/what-is-flacc-all-about/" target="_blank">FlaCC</a>, and was previewed at <a title="YouTube - Flash on C/C++ Sneak Peek" href="http://uk.youtube.com/watch?v=0hX-Uh3oTcE" target="_blank">Adobe MAX last year</a>. Although it&#8217;s not intended to produce complete applications, it can run <a title="FAQ - Adobe Labs" href="http://labs.adobe.com/wiki/index.php/Alchemy:FAQ" target="_blank">up to ten times faster</a> than Actionscript &#8211; although still slower than native C/C++ code.</p>
<p>The <a title="Adobe Labs - Alchemy" href="http://labs.adobe.com/technologies/alchemy/" target="_blank">Alchemy site at Adobe Labs</a> offers a promising &#8216;Getting Started&#8217; guide with tutorials for Windows, Macintosh and Linux now that each platform &#8211; <a title="Adobe - Adobe Flash Player" href="http://get.adobe.com/flashplayer/" target="_blank">Flash Player 10</a>, <a title="Adobe - Adobe AIR" href="http://get.adobe.com/air/" target="_blank">Adobe Air</a>, the <a title="Downloads" href="http://www.adobe.com/products/flex/flexdownloads/index.html" target="_blank">Flex SDK</a> and the <a title="Alchemy" href="http://labs.adobe.com/downloads/alchemy.html" target="_blank">Alchemy toolkit</a> &#8211; are all cross-platform and open source.</p>
<p>I decided to give it a go, working with my <a title="Weapon of Choice - Marc Hibbins" href="http://hibbins.wordpress.com/2008/11/19/weapon-of-choice/" target="_blank">preferred development environment</a> running on Ubuntu 8. However, in following the seemingly quite simple steps to compile my first library, I ran across a number holes in the guide and problems in the toolkit.</p>
<p>Alongside my efforts, <a title="Blog - Blog Archive - Flame Alc - on!!" href="http://blog.birdsigh.com/2008/11/30/flame_alc-on/" target="_blank">Tim Crook</a> tried the same on Machintosh.</p>
<p>Unable to get any success from Adobe&#8217;s instructions, we took following steps to get Alchemy up and (almost) running:</p>
<p>Set up your environment &#8211; make sure you have up-to-date versions of Java, Perl and GCC. Then download the latest <a title="Downloads" href="http://www.adobe.com/products/flex/flexdownloads/index.html" target="_blank">Flex SDK</a> and add the <strong>bin</strong> directory to your system path. If you&#8217;ve not done this before, you&#8217;ve basically two methods. Firstly get the path to the SDK, mine is at:</p>
<blockquote><p>/usr/lib/flex_sdk_3/</p></blockquote>
<p>Then, to add the <strong>bin</strong> directory <em>for the current session</em>, execute:</p>
<blockquote><p>export PATH=$PATH:/usr/lib/flex_sdk_3/bin</p></blockquote>
<p>Obviously change the path accordingly if yours isn&#8217;t in the same place. But you&#8217;ll have to do this with every new session you create, because the append is only temporary.</p>
<p>Instead, to add the path automatically you&#8217;ll need to modify your login script or bash profile &#8211; depending on your system. On Ubuntu 8, I add the above line to the end of of my bash startup file, which I find at:</p>
<blockquote><p>/etc/bash.bashrc</p></blockquote>
<p>There are different ways to add directories for various user types &#8211; whether for single or multiple users, for the root user etc &#8211; there&#8217;s <a title="Adding a Directory to the Path" href="http://www.troubleshooters.com/linux/prepostpath.htm" target="_blank">a troubleshoot here</a>. You can check whether either method was successful by calling:</p>
<blockquote><p>echo $PATH</p></blockquote>
<p>You should see the path appended &#8211; there&#8217;ll most likely be other directories listed too. Test the path and SDK by running:</p>
<blockquote><p>adt -version</p></blockquote>
<p>You should see output similar to:</p>
<blockquote><p>adt version &#8220;1.5.0.7220&#8243;</p></blockquote>
<p>Which is just your Air Developer Tool version number. You&#8217;ll need to restart the session if you&#8217;ve modified your bash script rather than modifying the path temporarily.</p>
<p>Then download and extract the <a title="Alchemy" href="http://labs.adobe.com/downloads/alchemy.html" target="_blank">Alchemy toolkit</a>, again, mine is at:</p>
<blockquote><p>/usr/lib/alchemy/</p></blockquote>
<p>Run the configuration file by navigating to the folder using the <strong>cd</strong> command and execute:</p>
<blockquote><p>./config</p></blockquote>
<p>As you&#8217;ll be prompted, there&#8217;s a set-up that needs to be run every time you login. To achieve this automatically, open up the bash profile again and <em>before </em>the path modification add:</p>
<blockquote><p>source /usr/lib/alchemy/alchemy-setup</p></blockquote>
<p>If you&#8217;ve followed the &#8216;Getting Started&#8217; guide &#8211; it&#8217;s all the same up until now, but here&#8217;s where we begin to differ. Restart your terminal session. As far as we found, you&#8217;ve no need to modify your path any further. To check whether the set-up did run successfully, turn Alchemy on and check which GCC you are using:</p>
<blockquote><p>alc-on<br />
which gcc</p></blockquote>
<p>You should see something along the lines of:</p>
<blockquote><p>/usr/lib/alchemy/achacks/gcc</p></blockquote>
<p>The Adobe instructions say you&#8217;re now ready to compile one of the sample libraries. Navigate to:</p>
<blockquote><p>cd /usr/lib/alchemy/samples/stringecho</p></blockquote>
<p>Then run:</p>
<blockquote><p>gcc stringecho.c -03 -Wall -swc -o stringecho.swc</p></blockquote>
<p>And you should see some ouput. But I didn&#8217;t, neither did Tim &#8211; ours both die silently. <img src='http://blog.marchibbins.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>After a lot of head scratching a Googling we found <a title="Adobe - Alchemy" href="http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=72&amp;catid=755&amp;threadid=1406714&amp;enterthread=y" target="_blank">a forum complaint</a> that there are some bad symlinks in the current release of the toolkit &#8211; and we found them too. There&#8217;s two symlinks in <strong>/alchemy/bin</strong>:</p>
<blockquote><p>llvm-g++ -&gt; /usr/lib/alchemy/bin/llvm-gcc4-ubuntu-install/bin/llvm-g++<br />
llvm-gcc -&gt; /usr/lib/alchemy/bin/llvm-gcc4-ubuntu-install/bin/llvm-gcc</p></blockquote>
<p>These go nowhere, so created new links to the correct compilers as follows:</p>
<blockquote><p>ln -s /usr/lib/alchemy/bin/llvm-gcc4-ubuntu-install/bin/g++ llvm-g++<br />
ln -s /usr/lib/alchemy/bin/llvm-gcc4-ubuntu-install/bin/gcc llvm-gcc</p></blockquote>
<p>Then try again.</p>
<p>For Tim, success &#8211; for me, not so much.</p>
<p>There&#8217;s obviously something in the Linux toolkit that&#8217;s not in the Macintosh version. Amongst the output I do get though, is the following line:</p>
<blockquote><p>cc1 error: /usr/lib/alchemy/usr/lib/alchemy/avm2-libc/avm2/AVM2Env.h</p></blockquote>
<p>So it&#8217;s another path issue somewhere that&#8217;s causing the duplication &#8211; I&#8217;m just yet to locate it, or find a way to resolve it. I&#8217;m working on it.</p>
<p>This whole project could be incredible, Adobe are strongly encouraging developers to share ported libraries and support the open source ethos.</p>
<p>If anybody has run into the same problems as I, or even fixed them &#8211; get in touch!</p>
<p><strong>Update (03.12.08):</strong> I&#8217;ve since found <a title="The Fix - Marc Hibbins" href="http://hibbins.wordpress.com/2008/12/03/the-fix/" target="_blank">the fix</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.marchibbins.com/2008/12/02/find-a-way/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

