<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Matthieu Brucher's blog</title> <link>http://matt.eifelle.com</link> <description /> <lastBuildDate>Tue, 09 Mar 2010 16:23:43 +0000</lastBuildDate> <generator>http://wordpress.org/?v=2.9.1</generator> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/eifelle/CPPV" /><feedburner:info uri="eifelle/cppv" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item><title>Annoucement: PyVST 0.1</title><link>http://feedproxy.google.com/~r/eifelle/CPPV/~3/oOD5_apbpsw/</link> <comments>http://matt.eifelle.com/2010/03/09/annoucement-pyvst-0-1/#comments</comments> <pubDate>Tue, 09 Mar 2010 08:06:43 +0000</pubDate> <dc:creator>Matt</dc:creator> <category><![CDATA[Music]]></category> <category><![CDATA[Python]]></category> <category><![CDATA[ctypes]]></category> <category><![CDATA[VST]]></category><guid isPermaLink="false">http://matt.eifelle.com/?p=1134</guid> <description><![CDATA[I am pleased to announce the first release of PyVST.
PyVST is a ctypes-based wrapper for the (open) VST standard developed by Steinberg for audio processing.
Version 0.1 provides basic access to the VST interface, as well as a script to analyze and display the audio process of a plugin. It can be easy-installed or downloaded [...]]]></description> <content:encoded><![CDATA[<p>I am pleased to announce the first release of PyVST.<br
/> PyVST is a ctypes-based wrapper for the (open) VST standard developed by <a
href="http://www.steinberg.com/">Steinberg</a> for audio processing.</p><p>Version 0.1 provides basic access to the VST interface, as well as a script to analyze and display the audio process of a plugin. It can be easy-installed or downloaded on <a
href="https://launchpad.net/pyvst">its Launchpad page</a>.</p><p>Changelog for 0.1:</p><ul><li>Uses the VST dispatcher for several functions:<ul><li>processReplacing</li><li>processDoubleReplacing</li><li>open/close the plugin</li><li>open/close the GUI editor</li><li>returns the GUI rectangle</li><li>set the sample rate</li><li>set the block size</li><li>get name/vendor/product</li><li>handle programs</li><li>handle parameters</li><li>suspend/resume</li></ul></li><li>set/get a parameter</li><li>get number of programs</li><li>get number of inputs</li><li>get number of outputs</li><li>display.py script<ul><li>can load any plugin</li><li>displays the editor, if it exists</li><li>uses a stereo sine-sweep</li><li>displays a spectrogram of the process of the stereo sine-sweep</li><li>dumps properties information</li></ul></li></ul>
<p><a href="http://feedads.g.doubleclick.net/~a/cMHvn0KvcMdK8oztww9G9t-ANmA/0/da"><img src="http://feedads.g.doubleclick.net/~a/cMHvn0KvcMdK8oztww9G9t-ANmA/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/cMHvn0KvcMdK8oztww9G9t-ANmA/1/da"><img src="http://feedads.g.doubleclick.net/~a/cMHvn0KvcMdK8oztww9G9t-ANmA/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/eifelle/CPPV/~4/oOD5_apbpsw" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://matt.eifelle.com/2010/03/09/annoucement-pyvst-0-1/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://matt.eifelle.com/2010/03/09/annoucement-pyvst-0-1/</feedburner:origLink></item> <item><title>Fixing the QtAGain plugin</title><link>http://feedproxy.google.com/~r/eifelle/CPPV/~3/oGo4osnByow/</link> <comments>http://matt.eifelle.com/2010/03/02/fixing-the-qtagain-plugin/#comments</comments> <pubDate>Tue, 02 Mar 2010 08:21:58 +0000</pubDate> <dc:creator>Matt</dc:creator> <category><![CDATA[C++]]></category> <category><![CDATA[Music]]></category> <category><![CDATA[Qt]]></category> <category><![CDATA[VST]]></category><guid isPermaLink="false">http://matt.eifelle.com/?p=1130</guid> <description><![CDATA[Some months ago, I&#8217;ve modified the AGain plugin sample from the VST SDK to add a Qt window. At that time, I encountered an issue with Vsthost, which is a common VST host. The issue was that in windowed mode, the plugin&#8217;s UI wasn&#8217;t displayed. With Traktion, I didn&#8217;t have this problem, but the minihost [...]]]></description> <content:encoded><![CDATA[<p>Some months ago, <a
href="http://matt.eifelle.com/2009/12/01/vst-plugin-again-reloaded-with-a-qt-gui/">I&#8217;ve modified the AGain plugin sample</a> from the VST SDK to add a Qt window. At that time, I encountered an issue with <a
href="http://www.hermannseib.com/english/vsthost.htm">Vsthost</a>, which is a common VST host. The issue was that in windowed mode, the plugin&#8217;s UI wasn&#8217;t displayed. With Traktion, I didn&#8217;t have this problem, but the minihost (a sample from the SDK) also didn&#8217;t use the UI size.</p><p>When developing <a
href="http://matt.eifelle.com/2010/02/09/pyvst-another-ctypes-based-python-vst-wrapper/">pyvst</a>, I has to implement the retrieval of the size of the plugin, and I&#8217;ve decided to add this to QtAGain. I was surprised to see that it actually work with just giving back the UI size (so fixing this was less than 5 lines).</p><p>So now, I know that to impelment an UI for a VST plugin, I have to implement:</p><ul><li><strong>open()</strong></li><li><strong>close()</strong></li><li>but also <strong>getRect()</strong></li></ul><p>Don&#8217;t make the same mistake as I did, do implement all three of them, even if your favorite VST host can live without <strong>getRect()</strong>.</p><p>P.S.: Mixing Qt for VST UIs and wxPython for pyvst works really fine!</p>
<p><a href="http://feedads.g.doubleclick.net/~a/2HSAvRmYaD-4_0Xr024YeCCmsYo/0/da"><img src="http://feedads.g.doubleclick.net/~a/2HSAvRmYaD-4_0Xr024YeCCmsYo/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/2HSAvRmYaD-4_0Xr024YeCCmsYo/1/da"><img src="http://feedads.g.doubleclick.net/~a/2HSAvRmYaD-4_0Xr024YeCCmsYo/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/eifelle/CPPV/~4/oGo4osnByow" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://matt.eifelle.com/2010/03/02/fixing-the-qtagain-plugin/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://matt.eifelle.com/2010/03/02/fixing-the-qtagain-plugin/</feedburner:origLink></item> <item><title>Optimization scikit: Structure and implementation</title><link>http://feedproxy.google.com/~r/eifelle/CPPV/~3/fMNjN9bjMsw/</link> <comments>http://matt.eifelle.com/2010/02/25/optimization-scikit-structure-and-implementation/#comments</comments> <pubDate>Thu, 25 Feb 2010 08:04:09 +0000</pubDate> <dc:creator>Matt</dc:creator> <category><![CDATA[Generic optimizers]]></category> <category><![CDATA[Python]]></category> <category><![CDATA[Architecture]]></category> <category><![CDATA[Optimization]]></category> <category><![CDATA[scikit]]></category><guid isPermaLink="false">http://matt.eifelle.com/?p=1120</guid> <description><![CDATA[Some weeks ago, the first release of the optimization scikit was done. I&#8217;d like to expose here the internal structure and the way the implementation was thought.Context
There a lot of optimization routines that can be found in dozens of languages. The issue I faced when implementing manifold learning algorithms is that I needed something that [...]]]></description> <content:encoded><![CDATA[<p>Some weeks ago, <a
href="http://matt.eifelle.com/2010/02/02/annoucement-scikits-optimization-0-1/">the first release of the optimization scikit was done</a>. I&#8217;d like to expose here the internal structure and the way the implementation was thought.<br
/> <span
id="more-1120"></span></p><h4>Context</h4><p>There a lot of optimization routines that can be found in dozens of languages. The issue I faced when implementing <a
href="http://matt.eifelle.com/tag/dimensionality-reduction/">manifold learning algorithms</a> is that I needed something that would allow me to test several different optimizers as well as developing new ones.</p><p>I first focused on unconstrained optimization, and more exactly direction and then line search optimization. I was supposed to be able to pick different direction searches, different line searches, and then different criteria. Besides, some of these algorithms may be decorated by others (for instance, a line search may start from different step lengths given by one or several of its decorators). The issue that arises is that each of these small algorithms may need different pieces of information from the others, and also may give different pieces of intel.</p><h4>Separation principle and object orientation</h4><p>Usually everyone uses objects in Python, especially for a complex framework. The problem is, as I&#8217;ve said, that each object needs information that is created by all the others objects. It is not elegant to browse through each of them so I had to find something else: the separation principle.</p><p>This principle says that any state information is saved inside a single structure and all the objects needing information do not have an associated state. This is opposition to the object orientation (with a focus on encapsulation), but in reality, the line is fuzzy. So this is the main idea behind the optimization scikit: separation principle on objects.</p><h4>Usage and conclusion</h4><p>I will present a complex use of the scikit in the future, but the idea is simple: create your direction search, create your line search, pick a stopping criterion and use everything with an optimizer. You may reuse each of them with another optimizer later. This way, I&#8217;ve designed some complex optimizers that needed finely choosing parts (line searches with some conjugate gradients may benefit from starting point that are different). Also, the cost function is also an object with gradient or even Hessian. This means that numerical differentiation is easilly implemented with a specific class, just as least squares would also be.</p><p>Of course, this means that the scikit does not provide the fastest optimization routine. You may create one that is really faster than the scikit, but this means that you already know the precise optizer you need as well as that you may loose a lot of time inside the optimizer and not the cost function. In most cases, this is not the case.</p><p>Although this framework was written in Python, it could be ported to several langages with more or less advantages or drawbacks (Java, C++ with heavy usage of templates, &#8230;).</p>
<p><a href="http://feedads.g.doubleclick.net/~a/sJ5Ven7FuzQKNsQSbSHd8L6s4OA/0/da"><img src="http://feedads.g.doubleclick.net/~a/sJ5Ven7FuzQKNsQSbSHd8L6s4OA/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/sJ5Ven7FuzQKNsQSbSHd8L6s4OA/1/da"><img src="http://feedads.g.doubleclick.net/~a/sJ5Ven7FuzQKNsQSbSHd8L6s4OA/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/eifelle/CPPV/~4/fMNjN9bjMsw" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://matt.eifelle.com/2010/02/25/optimization-scikit-structure-and-implementation/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://matt.eifelle.com/2010/02/25/optimization-scikit-structure-and-implementation/</feedburner:origLink></item> <item><title>Book review: Inside Cyber Warfare</title><link>http://feedproxy.google.com/~r/eifelle/CPPV/~3/F_ohuk16Q3E/</link> <comments>http://matt.eifelle.com/2010/02/16/book-review-inside-cyber-warfare/#comments</comments> <pubDate>Tue, 16 Feb 2010 07:57:09 +0000</pubDate> <dc:creator>Matt</dc:creator> <category><![CDATA[Book review]]></category> <category><![CDATA[O'Reilly]]></category><guid isPermaLink="false">http://matt.eifelle.com/?p=1108</guid> <description><![CDATA[It&#8217;s funny I&#8217;ve started reading this book shortly before Google announced it withdraws from China because of a cyber attack. Well, this book is about this new theater of operations and explains what everyone should be ready for.Content and opinions
Warfare is gouverned by international laws. You can&#8217;t attack another country (unless you&#8217;re the USA&#8230;) without [...]]]></description> <content:encoded><![CDATA[<p>It&#8217;s funny I&#8217;ve started reading this book shortly before Google announced it withdraws from China because of a cyber attack. Well, this book is about this new theater of operations and explains what everyone should be ready for.<br
/> <span
id="more-1108"></span></p><h4>Content and opinions</h4><p>Warfare is gouverned by international laws. You can&#8217;t attack another country (unless you&#8217;re the USA&#8230;) without some solid arguments. The issue arises here, as a cyber attack is not something we are used to see, and thus there are several interpretations on this topic.</p><p>Jeffrey Carr tries to clear the picture by stating what is a cyber attack and how a state can be found responsible for a cyber attack. Indeed, this is a difficult topic as a lot of attacks are made by &#8220;simple&#8221; hackers that are not officially employed by a state (kind of mercenaries). The fourth whapter is written by an invited guest and describes how a cyber attack may be responded to. It is a complicated legal issue under international laws, but the author is also very clear in his demonstration.</p><p>After the legal part, Jeffrey Carr tackles the general topic of intelligence. Attacks may focus on retrieving information (social intelligence or data) or disconnecting websites. I was amazed to see that there were attacks on some websites so that people couldn&#8217;t get information from rebels to some states, and that those attacks were made by the before-mentioned states. I thought that hackers were mainly outlaws, but it seems that states rely on hackers when rebels rely more on open information (I&#8217;m thinking about the Iran situation).</p><p>A lot of time must be spend on finding who launched the attack. How is it possible to launch an attack without being indentified is an issue tackled by several chapters. It seems that a lot of people on the Internet do not ware about accurate information, and this disables the capacity of investigators to find their quarry. It&#8217;s also surprising to see the difference between the reality and the movies/TV series where a hacker can find the attacker in less than a minute&#8230;</p><p>The last chapters are dedicated to using malwares for an attack (retrieving information or setting up a DDOS attack), the military doctrine of China and Russia, how can cyber attack be detected (in a state versus state situation) and general advice for cyber defense.</p><p>I have to say that I&#8217;m worried when I hear some of France MP saying that all DNS are under US management (which is obviously wrong) and that France should nationalize the Internet: how could we prepare for cyber warfare with this kind of MP??</p><h4>Conclusion</h4><p>Although only China, Russia and the USA positions are tackled, I think Europe has even greater problems than the US. The picture given by the book may be grim, but at least it clearly states the challenges we have to face now. I think it is also a corner stone for developing our (meaning your country&#8217;s) cyber doctrine. So if you think that Google versus China is not something to be worried about, read it, and if you know that is a symptom of a dangerous disease, read it also.</p><p>Here is <a
href="http://radar.oreilly.com/2010/02/cyber-warfare-dont-inflate-it.html">an interview of Jeffrey Carr that I found also interesting</a>.</p><div
style="border: 1px solid #000; padding: 5px; margin-bottom: 15px; background: url(http://matt.eifelle.com/wp-content/uploads/2009/12/BN_Logo_3tier.jpg) right bottom no-repeat #ffffff;"> <a
rel="nofollow" href="http://r.popshops.com/pp/73648/inside-cyber-warfare"><img
style="width: 150px;" src="http://images.barnesandnoble.com/images/49510000/49514139.JPG" border="0" alt="Inside Cyber Warfare" /></a><br
/> <a
rel="nofollow" href="http://r.popshops.com/pp/73648/inside-cyber-warfare">Inside Cyber Warfare</a><br
/> Price: $28.79</div><div
class="subcolumns"><div
style="border: 1px solid #000; padding: 5px; margin-bottom: 15px; background: url(http://matt.eifelle.com/wp-content/plugins/amazonsimpleadmin/img/amazon_US_small.gif) right bottom no-repeat #ffffff;"><div
style="width: 57px; float: left; margin-right: 5px;"> <a
href="http://www.amazon.com/exec/obidos/ASIN/0596802153/masbl03-20" target="_blank"><img
src="http://ecx.images-amazon.com/images/I/51RZyFG%2BgWL._SL75_.jpg" width="57" height="75" border="0" /></a></div><div><p><a
href="http://www.amazon.com/exec/obidos/ASIN/0596802153/masbl03-20" target="_blank">Inside Cyber Warfare: Mapping the Cyber Underworld</a> (Paperback)<br
/> <span
style="font-size: 0.8em;">by <strong>Jeffrey Carr</strong></span><br
/> ISBN: 0596802153</p><p><strong>Price:</strong> <span
style="color: #990000; font-weight: bold;">USD 26.39</span><br
/> <strong>38 used &#038; new</strong> available from <span
style="color: #990000; font-weight: bold;">USD 16.99</span></p><p> <img
src="http://matt.eifelle.com/wp-content/plugins/amazonsimpleadmin/img/stars-4.gif" class="asa_rating_stars" /> | 4 | 11</div><div
style="clear: both;"></div></div></div>
<p><a href="http://feedads.g.doubleclick.net/~a/dKSoc8Nxo-X4XRiLPnb8_KHIqps/0/da"><img src="http://feedads.g.doubleclick.net/~a/dKSoc8Nxo-X4XRiLPnb8_KHIqps/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/dKSoc8Nxo-X4XRiLPnb8_KHIqps/1/da"><img src="http://feedads.g.doubleclick.net/~a/dKSoc8Nxo-X4XRiLPnb8_KHIqps/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/eifelle/CPPV/~4/F_ohuk16Q3E" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://matt.eifelle.com/2010/02/16/book-review-inside-cyber-warfare/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://matt.eifelle.com/2010/02/16/book-review-inside-cyber-warfare/</feedburner:origLink></item> <item><title>PyVST: another ctypes-based Python VST wrapper</title><link>http://feedproxy.google.com/~r/eifelle/CPPV/~3/zUUBz7oNrHY/</link> <comments>http://matt.eifelle.com/2010/02/09/pyvst-another-ctypes-based-python-vst-wrapper/#comments</comments> <pubDate>Tue, 09 Feb 2010 08:06:47 +0000</pubDate> <dc:creator>Matt</dc:creator> <category><![CDATA[C++]]></category> <category><![CDATA[Python]]></category> <category><![CDATA[ctypes]]></category> <category><![CDATA[VST]]></category><guid isPermaLink="false">http://matt.eifelle.com/?p=1075</guid> <description><![CDATA[In a previous post, I&#8217;ve tried to use Qt for the editor window of a VST plugin. The thing is, I want to do more than just play with a GUI, I also want to see what is done to an audio stream by a plugin.
To do so, I&#8217;ve decided to expose the VST interface [...]]]></description> <content:encoded><![CDATA[<p>In <a
href="http://matt.eifelle.com/2009/12/01/vst-plugin-again-reloaded-with-a-qt-gui/">a previous post</a>, I&#8217;ve tried to use Qt for the editor window of a VST plugin. The thing is, I want to do more than just play with a GUI, I also want to see what is done to an audio stream by a plugin.</p><p>To do so, I&#8217;ve decided to expose the VST interface to Python. There are some implementation I&#8217;ve heard of, but they are based on Cython or other wrapping tools. Ctypes has the advantage of not needing a compilation step. There are also every functionality needed, as callback creation (plugins use a callback to ask the host some stuffs), and Python provides the additional mathematical tools to display what the plugin does. It may not be perfect, but it will be enough for a starter.<br
/> <span
id="more-1075"></span></p><h4>Wrapping the VST effect class</h4><p>Wrapping a VST class is not an easy task. The plugin is accessed by a C structure with pointer functions for the main functionalities: processing an audio flow (with floats or doubles), setting and getting parameters, and a general function for setting and getting information. Additionaly, when instantiating a plugin, a callback must be given. This ctypes callback will have to be stored inside the wrapper so that it stays valid through the plugin lifetime.</p><p>So the C structure is created as a class that inherits from ctypes.Structure. Then I have to populate a class that will call the correct function or return the appropriate element inside this structure.</p><div
class="wp_codebox_msgheader"><span
class="right"><sup><a
href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span
style="color: #99cc00">?</span></a></sup></span><span
class="left2">Download <a
href="http://matt.eifelle.com/wp-content/plugins/wp-codebox/wp-codebox.php?p=1075&amp;download=aeffect.py">aeffect.py</a></span><div
class="codebox_clear"></div></div><div
class="wp_codebox"><table><tr
id="p10753"><td
class="code" id="p1075code3"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">class</span> AEffect<span style="color: black;">&#40;</span>Structure<span style="color: black;">&#41;</span>:
  _fields_ = <span style="color: black;">&#91;</span>
                    <span style="color: black;">&#40;</span><span style="color: #483d8b;">'magic'</span>, c_int<span style="color: black;">&#41;</span>,
                    <span style="color: black;">&#40;</span><span style="color: #483d8b;">'dispatcher'</span>, c_void_p<span style="color: black;">&#41;</span>,
                    <span style="color: black;">&#40;</span><span style="color: #483d8b;">'process'</span>, c_void_p<span style="color: black;">&#41;</span>,
                    <span style="color: black;">&#40;</span><span style="color: #483d8b;">'setParameter'</span>, c_void_p<span style="color: black;">&#41;</span>,
                    <span style="color: black;">&#40;</span><span style="color: #483d8b;">'getParameter'</span>, c_void_p<span style="color: black;">&#41;</span>,
<span style="color: black;">&#40;</span>...<span style="color: black;">&#41;</span>
                    <span style="color: black;">&#93;</span>
&nbsp;
audiomaster_callback = CFUNCTYPE<span style="color: black;">&#40;</span>c_void_p, POINTER<span style="color: black;">&#40;</span>AEffect<span style="color: black;">&#41;</span>, c_int, c_int, c_long, c_void_p, c_float<span style="color: black;">&#41;</span></pre></td></tr></table></div><div
class="wp_codebox_msgheader"><span
class="right"><sup><a
href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span
style="color: #99cc00">?</span></a></sup></span><span
class="left2">Download <a
href="http://matt.eifelle.com/wp-content/plugins/wp-codebox/wp-codebox.php?p=1075&amp;download=vstplugin.py">vstplugin.py</a></span><div
class="codebox_clear"></div></div><div
class="wp_codebox"><table><tr
id="p10754"><td
class="code" id="p1075code4"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">class</span> VSTPlugin<span style="color: black;">&#40;</span><span style="color: #008000;">object</span><span style="color: black;">&#41;</span>:
  <span style="color: #ff7700;font-weight:bold;">def</span> <span style="color: #0000cd;">__init__</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, filename, audio_callback = basic_callback<span style="color: black;">&#41;</span>:
    <span style="color: #483d8b;">&quot;&quot;&quot;
    Constructor
    Parameters:
      filename is the name of the plugin to load
      audio_callback is the Python function to call (optional)
    &quot;&quot;&quot;</span>
    <span style="color: #008000;">self</span>.__lib = CDLL<span style="color: black;">&#40;</span>filename<span style="color: black;">&#41;</span>
    <span style="color: #008000;">self</span>.__callback = audiomaster_callback<span style="color: black;">&#40;</span>audio_callback<span style="color: black;">&#41;</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">try</span>:
      <span style="color: #008000;">self</span>.__lib.<span style="color: black;">VSTPluginMain</span>.<span style="color: black;">argtypes</span> = <span style="color: black;">&#91;</span>audiomaster_callback, <span style="color: black;">&#93;</span>
      <span style="color: #008000;">self</span>.__lib.<span style="color: black;">VSTPluginMain</span>.<span style="color: black;">restype</span> = POINTER<span style="color: black;">&#40;</span>AEffect<span style="color: black;">&#41;</span>
      <span style="color: #008000;">self</span>.__effect = <span style="color: #008000;">self</span>.__lib.<span style="color: black;">VSTPluginMain</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>.__callback<span style="color: black;">&#41;</span>.<span style="color: black;">contents</span>
    <span style="color: #ff7700;font-weight:bold;">except</span> <span style="color: #008000;">AttributeError</span>:
      <span style="color: #008000;">self</span>.__lib.<span style="color: black;">main</span>.<span style="color: black;">argtypes</span> = <span style="color: black;">&#91;</span>audiomaster_callback, <span style="color: black;">&#93;</span>
      <span style="color: #008000;">self</span>.__lib.<span style="color: black;">main</span>.<span style="color: black;">restype</span> = POINTER<span style="color: black;">&#40;</span>AEffect<span style="color: black;">&#41;</span>
      <span style="color: #008000;">self</span>.__effect = <span style="color: #008000;">self</span>.__lib.<span style="color: black;">main</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>.__callback<span style="color: black;">&#41;</span>.<span style="color: black;">contents</span></pre></td></tr></table></div><p>The main VST function must be called through a dispatch function available in the structure. I will only show of them:</p><h4>Rewritting the minihost sample</h4><p>The minihost sample prints some details of the VST plugin and then displays them. Here, I&#8217;ll do the same, but I&#8217;ve processed a sine-sweep signal and then display the result. If the 64bits processing is available, I will use it.</p><p>Here are some info that are displayed prior to the processing for the <a
href="http://bigtick.pastnotecut.org/index.php?action=PROD&#038;pcode=200&#038;lang=EN">Big Tick NastyShaper plugin</a>:</p><pre>
Plugin name:
Vendor name:
Product name:
numPrograms = 16
numParams = 11
numInputs = 2
numOutputs = 2

Program 000: Nasty Shaper
(...)
Program 015: Nasty Shaper
Param 000: Pre-Gain [0.00 dB] (normalized = 0.500000)
Param 001: Post-Gain [0.00 dB] (normalized = 0.500000)
Param 002: WS1 [25.00  %] (normalized = 0.250000)
Param 003: WS2 [35.00  %] (normalized = 0.350000)
Param 004: WS3 [45.00  %] (normalized = 0.450000)
Param 005: WS4 [55.00  %] (normalized = 0.550000)
Param 006: WS5 [20.00  %] (normalized = 0.200000)
Param 007: WS6 [60.00  %] (normalized = 0.600000)
Param 008: WS7 [30.00  %] (normalized = 0.300000)
Param 009: WS8 [40.00  %] (normalized = 0.400000)
Param 010: Oversample [OFF  ] (normalized = 0.000000)
Testing with floats (32bits)
</pre><p>Here is a graphical result. On the first row, I display the original input, on the second row is the associated output.</p><p><center><a
href="http://matt.eifelle.com/wp-content/uploads/2010/02/Big-Tick-NastyShaper.png"><img
src="http://matt.eifelle.com/wp-content/uploads/2010/02/Big-Tick-NastyShaper-300x225.png" alt="" title="Big Tick NastyShaper spectrogram" width="300" height="225" class="aligncenter size-medium wp-image-1101" /></a</center></p><h4>To be continued</h4><p>The whole 2.4 standard is not yet wrapped, far from it. There is still much to do to be able to use this wrapper class for every plugin (how do I load an impulse for a convolution reverb for instance), but it can still help analyze how a lot of plugins change the audio signal.</p><p>Some plugins are not working yet (mainly because every input and output must be connected), but I&#8217;m working on it <img
src='http://matt.eifelle.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p><p>The code is available on <a
href="https://launchpad.net/pyvst">Launchpad</a>.</p>
<p><a href="http://feedads.g.doubleclick.net/~a/U3PMDCwKATcX33WCbRMfzsoVVYA/0/da"><img src="http://feedads.g.doubleclick.net/~a/U3PMDCwKATcX33WCbRMfzsoVVYA/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/U3PMDCwKATcX33WCbRMfzsoVVYA/1/da"><img src="http://feedads.g.doubleclick.net/~a/U3PMDCwKATcX33WCbRMfzsoVVYA/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/eifelle/CPPV/~4/zUUBz7oNrHY" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://matt.eifelle.com/2010/02/09/pyvst-another-ctypes-based-python-vst-wrapper/feed/</wfw:commentRss> <slash:comments>3</slash:comments> <feedburner:origLink>http://matt.eifelle.com/2010/02/09/pyvst-another-ctypes-based-python-vst-wrapper/</feedburner:origLink></item> <item><title>Annoucement: scikits.optimization 0.1</title><link>http://feedproxy.google.com/~r/eifelle/CPPV/~3/HBRM0UB01CE/</link> <comments>http://matt.eifelle.com/2010/02/02/annoucement-scikits-optimization-0-1/#comments</comments> <pubDate>Tue, 02 Feb 2010 08:36:18 +0000</pubDate> <dc:creator>Matt</dc:creator> <category><![CDATA[Generic optimizers]]></category> <category><![CDATA[Python]]></category> <category><![CDATA[Annoucement]]></category> <category><![CDATA[numpy]]></category> <category><![CDATA[Optimization]]></category> <category><![CDATA[scikit]]></category><guid isPermaLink="false">http://matt.eifelle.com/?p=1093</guid> <description><![CDATA[I&#8217;m pleased to announce the first release of one of my projects. This scikits is based on a generic framework that can support unconstrained cost function minimization. It is based on a separation principle and is also completely object oriented.
Several optimizers are available:Nelder-Mead or simplex minimization
Unconstrained gradient-based minimizationThe usual criterias can be used:Iteration limit
Parameter change [...]]]></description> <content:encoded><![CDATA[<p>I&#8217;m pleased to announce the first release of one of my projects. This scikits is based on a generic framework that can support unconstrained cost function minimization. It is based on a separation principle and is also completely object oriented.</p><p>Several optimizers are available:</p><ul><li>Nelder-Mead or simplex minimization</li><li>Unconstrained gradient-based minimization</li></ul><p>The usual criterias can be used:</p><ul><li>Iteration limit</li><li>Parameter change (relative and absolute)</li><li>Cost function changer (relative and absolute)</li><li>Composite criterion generation (AND/OR)</li></ul><p>Different direction searches are available:</p><ul><li>Gradient</li><li>Several conjugate-gradient (Fletcher-Reeves, &#8230;)</li><li>Decorators for selecting part of the gradient</li><li>Marquardt step</li></ul><p>Finally several line searches (1D minimization) were coded:</p><ul><li>Fibonacci and gold number methods (exact line searches)</li><li>Wolfe-Powell soft and strong rules</li><li>Goldstein line search</li><li>Cubic interpolation</li></ul><p>Additional helper classes can be used:</p><ul><li>Finite difference differentation (central and forward)</li><li>Quadratic cost (for least square estimation)</li><li>Levenberg-Marquardt approximation for least square estimation</li></ul><p>Although it is the 0.1 version, the code is quite stable and is used in the <a
href="http://sourceforge.net/projects/scikit-learn">learn scikit</a>.</p><p>The package can be easy-installed or can be found on <a
href="http://pypi.python.org/pypi/scikits.optimization/0.1">PyPI</a>.</p><p>Several tutorials are available or will be available on the future at the following locations:</p><ul><li><a
href="http://matt.eifelle.com/tag/optimization/">http://matt.eifelle.com/tag/optimization/</a></li><li><a
href="http://projects.scipy.org/scikits/wiki/Optimization/tutorial">http://projects.scipy.org/scikits/wiki/Optimization/tutorial</a></li></ul>
<p><a href="http://feedads.g.doubleclick.net/~a/IgXzNNEfmd3IhDDfz4d7we9LVvk/0/da"><img src="http://feedads.g.doubleclick.net/~a/IgXzNNEfmd3IhDDfz4d7we9LVvk/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/IgXzNNEfmd3IhDDfz4d7we9LVvk/1/da"><img src="http://feedads.g.doubleclick.net/~a/IgXzNNEfmd3IhDDfz4d7we9LVvk/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/eifelle/CPPV/~4/HBRM0UB01CE" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://matt.eifelle.com/2010/02/02/annoucement-scikits-optimization-0-1/feed/</wfw:commentRss> <slash:comments>2</slash:comments> <feedburner:origLink>http://matt.eifelle.com/2010/02/02/annoucement-scikits-optimization-0-1/</feedburner:origLink></item> <item><title>Fun book: Dreaming In Code</title><link>http://feedproxy.google.com/~r/eifelle/CPPV/~3/DKxK9EzW-5U/</link> <comments>http://matt.eifelle.com/2010/01/26/fun-book-dreaming-in-code/#comments</comments> <pubDate>Tue, 26 Jan 2010 08:29:27 +0000</pubDate> <dc:creator>Matt</dc:creator> <category><![CDATA[Book review]]></category> <category><![CDATA[Open source]]></category><guid isPermaLink="false">http://matt.eifelle.com/?p=1085</guid> <description><![CDATA[I&#8217;ve decided for once to read a novel about software. This book is about the story of Chandler, a piece of software that was a dream that didn&#8217;t quite came true.Content and opinions
The audience of this book is mainly people that do not know much about software but that want to know about a story [...]]]></description> <content:encoded><![CDATA[<p>I&#8217;ve decided for once to read a novel about software. This book is about the story of Chandler, a piece of software that was a dream that didn&#8217;t quite came true.<br
/> <span
id="more-1085"></span></p><h4>Content and opinions</h4><p>The audience of this book is mainly people that do not know much about software but that want to know about a story that drove people for several years. There are a lot of fkashbacks inside software history or parenthesises on software.</p><p>Also the book is acclaimed by the critics, I didn&#8217;t find it that much interesting. It is very difficult to read the whole book, as the the thread goes from history to context to side stories to the main stories, sometimes after each parenthesis. This is tiresome, and is a drawback for a good book when you want to relax a little bit. Here, you won&#8217;t be able to do so, you&#8217;ll have to keep focusing on what the author wants to tell you (and that&#8217;s not really easy).</p><h4>Conclusion</h4><p>Not as much fun as I expected, but still, there are some passages that may be worth it for managers that don&#8217;t want to read a book on software project management. I won&#8217;t recommend it, but you may still want to learn from other people&#8217;s mistakes.</p><div
style="border: 1px solid #000; padding: 5px; margin-bottom: 15px; background: url(http://matt.eifelle.com/wp-content/uploads/2009/12/BN_Logo_3tier.jpg) right bottom no-repeat #ffffff;"> <a
rel="nofollow" href="http://r.popshops.com/pp/71454/dreaming-in-code-two-dozen-programmers-three-years-4-732-bugs-and-one-quest-for-"><img
style="width: 150px;" src="http://images.barnesandnoble.com/images/22210000/22210186.JPG" border="0" alt="Dreaming in Code: Two Dozen Programmers, Three Years, 4, 732 Bugs, and One Quest for Transcendent Software" /></a><br
/> <a
rel="nofollow" href="http://r.popshops.com/pp/71454/dreaming-in-code-two-dozen-programmers-three-years-4-732-bugs-and-one-quest-for-">Dreaming in Code: Two Dozen Programmers, Three Years, 4, 732 Bugs, and One Quest for Transcendent Software</a><br
/> Price: $11.92</div><div
class="subcolumns"><div
style="border: 1px solid #000; padding: 5px; margin-bottom: 15px; background: url(http://matt.eifelle.com/wp-content/plugins/amazonsimpleadmin/img/amazon_US_small.gif) right bottom no-repeat #ffffff;"><div
style="width: 50px; float: left; margin-right: 5px;"> <a
href="http://www.amazon.com/exec/obidos/ASIN/1400082471/masbl03-20" target="_blank"><img
src="http://ecx.images-amazon.com/images/I/51Klh6hn1KL._SL75_.jpg" width="50" height="75" border="0" /></a></div><div><p><a
href="http://www.amazon.com/exec/obidos/ASIN/1400082471/masbl03-20" target="_blank">Dreaming in Code: Two Dozen Programmers, Three Years, 4,732 Bugs, and One Quest for Transcendent Software</a> (Paperback)<br
/> <span
style="font-size: 0.8em;">by <strong>Scott Rosenberg</strong></span><br
/> ISBN: 1400082471</p><p><strong>Price:</strong> <span
style="color: #990000; font-weight: bold;">USD 9.86</span><br
/> <strong>59 used &#038; new</strong> available from <span
style="color: #990000; font-weight: bold;">USD 2.95</span></p><p> <img
src="http://matt.eifelle.com/wp-content/plugins/amazonsimpleadmin/img/stars-4.gif" class="asa_rating_stars" /> | 4 | 70</div><div
style="clear: both;"></div></div></div>
<p><a href="http://feedads.g.doubleclick.net/~a/JChmGhOrCtgzFRQgzw-X-sTwCY4/0/da"><img src="http://feedads.g.doubleclick.net/~a/JChmGhOrCtgzFRQgzw-X-sTwCY4/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/JChmGhOrCtgzFRQgzw-X-sTwCY4/1/da"><img src="http://feedads.g.doubleclick.net/~a/JChmGhOrCtgzFRQgzw-X-sTwCY4/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/eifelle/CPPV/~4/DKxK9EzW-5U" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://matt.eifelle.com/2010/01/26/fun-book-dreaming-in-code/feed/</wfw:commentRss> <slash:comments>1</slash:comments> <feedburner:origLink>http://matt.eifelle.com/2010/01/26/fun-book-dreaming-in-code/</feedburner:origLink></item> <item><title>Book review: Software Project Secrets: Why Software Projects Fail</title><link>http://feedproxy.google.com/~r/eifelle/CPPV/~3/Rn45JC8jzNs/</link> <comments>http://matt.eifelle.com/2010/01/19/book-review-software-project-secrets-why-software-projects-fail/#comments</comments> <pubDate>Tue, 19 Jan 2010 08:03:46 +0000</pubDate> <dc:creator>Matt</dc:creator> <category><![CDATA[APress]]></category> <category><![CDATA[Book review]]></category> <category><![CDATA[Development process]]></category><guid isPermaLink="false">http://matt.eifelle.com/?p=1080</guid> <description><![CDATA[There are more stories of failed software projects than of failed insert_another_field projects. But why is that so? Of course, software management is young, contrary to the other fields, but there are a set of management practices that should help project managers in their jobs. Why are they failing? Is it because they are not [...]]]></description> <content:encoded><![CDATA[<p>There are more stories of failed software projects than of failed <em>insert_another_field</em> projects. But why is that so? Of course, software management is young, contrary to the other fields, but there are a set of management practices that should help project managers in their jobs. Why are they failing? Is it because they are not applied? Because the field is really too young? Or something else?<br
/> <span
id="more-1080"></span></p><h4>Content and opinions</h4><p>The first part is dedicated to the reasons why a software project can fail. It starts with 12 reasons of why software is different than other fields. This implies some assumptions that can differ from the usual project management. The last chapter is a simulation of what a failing software project is. All in all, the main message passes, but I think it is too harsh. The underlying idea is that software is different than all the other fields, but in fact, it may be all the same (at least on the points that were underlined): building a bridge is something we know how to do through usual management, but it can still run late/too expensive/&#8230; Besides, the example is overdone. It cumulates all the typical mistakes that we know now how to avoid.</p><p>The second part gives the pieces of advice to fix what the first part uncovered. Three agile processes are explained, then tools to budget with one of these processes. the last is the example of the first part reloaded with agile methods. I agree that agile methods are an answer to the software management project, but each time software management is really opposed to usual management. There are issues that are still really different in software projects: defining the needs of the users. When you build a bridge or when you build a house, you know what you want. You know the number of ways, or the number of doors/windows/rooms, &#8230; In software projects, you don&#8217;t know how many doors you need. Another issue is that people think that software is easy to do, so it&#8217;s easy to add something else (mainly because it is mandatory&#8230; or not).</p><h4>Conclusion</h4><p>If the book is really easy to read, there are some shortcuts that did bother me: the two examples are caricatures of reality (not even a real example where things went well or really bad, they are a story), and software management is also exagerated compared to project management. Perhaps the real conclusion is this one: exageration. Software project management is too difficult to be explained by a caricature: it may lead to the opposite effect.</p><div
style="border: 1px solid #000; padding: 5px; margin-bottom: 15px; background: url(http://matt.eifelle.com/wp-content/uploads/2009/12/BN_Logo_3tier.jpg) right bottom no-repeat #ffffff;"><a
rel="nofollow" href="http://r.popshops.com/pp/69813/the-passionate-<a rel="nofollow" href="http://r.popshops.com/pp/70573/software-project-secrets-why-software-projects-fail"><img
style="width: 150px;" src="http://images.barnesandnoble.com/images/17380000/17382509.JPG" border="0" alt="Software Project Secrets: Why Software Projects Fail" /></a><br
/> <a
rel="nofollow" href="http://r.popshops.com/pp/70573/software-project-secrets-why-software-projects-fail">Software Project Secrets: Why Software Projects Fail</a><br
/> Price: $49.49</div><div
class="subcolumns"><div
style="border: 1px solid #000; padding: 5px; margin-bottom: 15px; background: url(http://matt.eifelle.com/wp-content/plugins/amazonsimpleadmin/img/amazon_US_small.gif) right bottom no-repeat #ffffff;"><div
style="width: 49px; float: left; margin-right: 5px;"> <a
href="http://www.amazon.com/exec/obidos/ASIN/1590595505/masbl03-20" target="_blank"><img
src="http://ecx.images-amazon.com/images/I/51dgzhEfKJL._SL75_.jpg" width="49" height="75" border="0" /></a></div><div><p><a
href="http://www.amazon.com/exec/obidos/ASIN/1590595505/masbl03-20" target="_blank">Software Project Secrets: Why Software Projects Fail (Expert&#8217;s Voice)</a> (Hardcover)<br
/> <span
style="font-size: 0.8em;">by <strong>George Stepanek</strong></span><br
/> ISBN: 1590595505</p><p><strong>Price:</strong> <span
style="color: #990000; font-weight: bold;">USD 33.20</span><br
/> <strong>39 used &#038; new</strong> available from <span
style="color: #990000; font-weight: bold;">USD 2.99</span></p><p> <img
src="http://matt.eifelle.com/wp-content/plugins/amazonsimpleadmin/img/stars-4.5.gif" class="asa_rating_stars" /> | 4.5 | 6</div><div
style="clear: both;"></div></div></div>
<p><a href="http://feedads.g.doubleclick.net/~a/JaDdmTw17xRV0QV8091yJZGeQ7s/0/da"><img src="http://feedads.g.doubleclick.net/~a/JaDdmTw17xRV0QV8091yJZGeQ7s/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/JaDdmTw17xRV0QV8091yJZGeQ7s/1/da"><img src="http://feedads.g.doubleclick.net/~a/JaDdmTw17xRV0QV8091yJZGeQ7s/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/eifelle/CPPV/~4/Rn45JC8jzNs" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://matt.eifelle.com/2010/01/19/book-review-software-project-secrets-why-software-projects-fail/feed/</wfw:commentRss> <slash:comments>1</slash:comments> <feedburner:origLink>http://matt.eifelle.com/2010/01/19/book-review-software-project-secrets-why-software-projects-fail/</feedburner:origLink></item> <item><title>Thinking of good practices when developing with accelerators</title><link>http://feedproxy.google.com/~r/eifelle/CPPV/~3/DrGEqxlVdKk/</link> <comments>http://matt.eifelle.com/2010/01/05/thinking-of-good-practices-when-developing-with-accelerators/#comments</comments> <pubDate>Tue, 05 Jan 2010 08:48:57 +0000</pubDate> <dc:creator>Matt</dc:creator> <category><![CDATA[C++]]></category> <category><![CDATA[Design Patterns]]></category> <category><![CDATA[Development process]]></category> <category><![CDATA[Distributed Computing]]></category> <category><![CDATA[High Performance Computing]]></category> <category><![CDATA[Tools]]></category> <category><![CDATA[CUDA]]></category> <category><![CDATA[Fortran]]></category> <category><![CDATA[Grid computing]]></category> <category><![CDATA[HMPP]]></category> <category><![CDATA[MPI]]></category> <category><![CDATA[Multithreaded applications]]></category> <category><![CDATA[Scientific computing]]></category><guid isPermaLink="false">http://matt.eifelle.com/?p=997</guid> <description><![CDATA[Due to the end of the free lunch, manufacturers started to provide differents processing units and developers started to go parallel. It&#8217;s kind of back to the future, as accelerators existed before today (the x87 FPU started as a coprocessor, for instance). If those accelerators were integrated into the CPU, their instruction set were also.
Today&#8217;s [...]]]></description> <content:encoded><![CDATA[<p>Due to the end of the <a
href="http://www.gotw.ca/publications/concurrency-ddj.htm">free lunch</a>, manufacturers started to provide differents processing units and developers started to go parallel. It&#8217;s kind of back to the future, as accelerators existed before today (the x87 FPU started as a coprocessor, for instance). If those accelerators were integrated into the CPU, their instruction set were also.</p><p>Today&#8217;s accelerators are not there yet. The tools are not ready yet (code translators) and usual programming practices may not be adequate. All the ecosystem will evolve, accelerators will change (GPUs are the main trend, but they will be different in a few years), so what you will do today needs to be shaped with these changes in mind. How is it possible to do so? Is it even possible?<br
/> <span
id="more-997"></span></p><h4>Available code translators</h4><p>Code translators are the easiest path to solution. I know two of them.</p><p>The first is the <a
href="http://www.pgroup.com/resources/accel.htm">PGI compiler</a>. It only supports CUDA and the Fortran and C99 language. I didn&#8217;t use it yet, also I plan of testing it in the near future. It is based on pragmas, and the compiler generates the CUDA microcode.</p><p>The second solution is <a
href="http://www.caps-entreprise.com/fr/page/index.php?id=49&amp;p_p=36">HMPP</a>. It supports more than just CUDA (also CAL/IL or OpenCL) and Fortran/C (also Java now). As the PGI compiler, it is based on pragmas, and a excellent thing is that it detects the available accelerators and launches the correct kernel (if you authorized it) or the original code. You can also modify the generated code to put your own (you can tune the code for instance, which may give you an additional x2 factor). Unfortunately, it is not possible to call functions inside the parallelized kernels, which means that only simple or badly-written (too many lines or duplicated code) kernels can be called. I think this is the same for the PGI compiler.</p><p>It seems that code translators still need work:</p><ul><li>only few accelerators are supported (CUDA, and sometimes CAL/IL or OpenCL),</li><li>almost no langage (Fortran/C/Java, a lot of Virtual Machines should be able to use them natively, without developers using specific tools),</li><li>only one function can be parallelized at a time.</li></ul><p>The last point is currently the biggest issue. You need to cut your function int pieces to have clean code and a good portability/evolutivity for the future.</p><p>This is why one still need to program a lot for those accelerators, and so we need to adapt our programming practices, develop in the accelerators&#8217; native langages (even if we know that they may disappear in a few years).</p><h4>Developping your own &#8220;tool chain&#8221; for accelerators</h4><p>For accelerators, there are a lot of things that needs to be done each time: copying some data, computing and getting some data back. These are the steps that code translators automate, in fact it is a common practice to use tools to automate stuff. The issue is that complex kernels are not supported by those translators. So what?</p><p>Creating automatic functions that will copy the data you need is in fact very common in metaprogramming. Coding the kernel on an accelerator is in fact not that difficult: the manufacturers provide the needed compilers (that&#8217;s what nVidia does and the success of the tool chain cannot be denied), and this is really the cornerstone. One has to write more code, some parts are less portable (because they are written in one of the accelerator&#8217;s languages), but in the end, with metaprogramming, the code can be better tuned, enhanced and read. This is the leverage of the accelerators.</p><h4>Conclusion</h4><p>Why do we care developing for accelerators? We know that they will go away. Before they do, they are the only way of speeding up our software. Code translators are the best tools to develop in a portable way, but they need time to support more accelerators, languages and method of programming. When CPUs will be on a par with accelerators, their progress will help compilers to target them correctly. It&#8217;s just a matter of time.<br
/> Meanwhile, metaprogrammin is the next best solution to automate processes that code translators cannot support yet.</p>
<p><a href="http://feedads.g.doubleclick.net/~a/PGxp42lmHDi_9R_1LTaYPxVqjdQ/0/da"><img src="http://feedads.g.doubleclick.net/~a/PGxp42lmHDi_9R_1LTaYPxVqjdQ/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/PGxp42lmHDi_9R_1LTaYPxVqjdQ/1/da"><img src="http://feedads.g.doubleclick.net/~a/PGxp42lmHDi_9R_1LTaYPxVqjdQ/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/eifelle/CPPV/~4/DrGEqxlVdKk" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://matt.eifelle.com/2010/01/05/thinking-of-good-practices-when-developing-with-accelerators/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://matt.eifelle.com/2010/01/05/thinking-of-good-practices-when-developing-with-accelerators/</feedburner:origLink></item> <item><title>Book review: The Passionate Programmer</title><link>http://feedproxy.google.com/~r/eifelle/CPPV/~3/OJLs_WhxRIw/</link> <comments>http://matt.eifelle.com/2009/12/29/book-review-the-passionate-programmer/#comments</comments> <pubDate>Tue, 29 Dec 2009 08:53:16 +0000</pubDate> <dc:creator>Matt</dc:creator> <category><![CDATA[Book review]]></category> <category><![CDATA[Pragmatic Bookshelf]]></category><guid isPermaLink="false">http://matt.eifelle.com/?p=993</guid> <description><![CDATA[It&#8217;s all about passion. The second edition of the book saw its title changed (it was called My Job Went To India) to something less depressing and more adequate to what we all should do: be passionate about our work and be happy to do it (it also applies to other job than developers!).Content and [...]]]></description> <content:encoded><![CDATA[<p>It&#8217;s all about passion. The second edition of the book saw its title changed (it was called <u>My Job Went To India</u>) to something less depressing and more adequate to what we all should do: be passionate about our work and be happy to do it (it also applies to other job than developers!).<br
/> <span
id="more-993"></span></p><h4>Content and opinions</h4><p>The book consists of a lot of pieces of advice (the brand of Pragmatic Bookshelf, the publisher), not too many so as not to be bored at the end.</p><p>It starts with the field (i.e. language and technology) you may focus on. Either you want to be at the edge, or rely on a mature technology. It depends, but there are some specifics you should know if you want to bloom.<br
/> The second aspect/part is dedicated to your network: how do you get information and how do you give it? Who should you be working with? All these aspects help you be the best at what you do.<br
/> When you actually work, there are some advice to make you really essential to your company: speak your mind, read the leader&#8217;s one, make your job profitabe to your company, &#8230;<br
/> The fourth part is about marketing. It is perhaps surprising, but you have to sell yourself. You may be the best in your field, have an excellent network and are essential to your company, if it doesn&#8217;t know it, you&#8217;re screwed. Sell yourself, this will be also great if you want/have to switch jobs.<br
/> Your carrier path is not clear with all the technology changes, with the current economical situation. You have to ready yourself to this, which is what the last part is all about: prospects and your future.</p><p>Each time the chapter is clear and goes straight to the point. The content is also explained with music metaphors, as the author is also a musician. Other well-known people give their opinion on some chapters of the book, each time shedding a new light on our own situation.</p><h4>Conclusion</h4><p>Pragmatic advice starts with obvious advice. If the content seems rather obvious (especially if you want to be better at your job, you may have applied a lot of the pieces of advice of the book), it&#8217;s always good to have it reminded, as we tend to not see the forest of the trees.</p><p>The main idea is to be at the edge. Learn from others, listen to the trends and the people who make them, and act accordingly.</p><div
style="border: 1px solid #000; padding: 5px; margin-bottom: 15px; background: url(http://matt.eifelle.com/wp-content/uploads/2009/12/BN_Logo_3tier.jpg) right bottom no-repeat #ffffff;"> <a
rel="nofollow" href="http://r.popshops.com/pp/69813/the-passionate-programmer-creating-a-remarkable-career-in-software-development"><img
style="width: 150px;" src="http://images.barnesandnoble.com/images/37010000/37010184.JPG" border="0" alt="The Passionate Programmer: Creating a Remarkable Career in Software Development" /></a><br
/> <a
rel="nofollow" href="http://r.popshops.com/pp/69813/the-passionate-programmer-creating-a-remarkable-career-in-software-development">The Passionate Programmer: Creating a Remarkable Career in Software Development</a><br
/> Price: $20.47</div><div
class="subcolumns"><div
style="border: 1px solid #000; padding: 5px; margin-bottom: 15px; background: url(http://matt.eifelle.com/wp-content/plugins/amazonsimpleadmin/img/amazon_US_small.gif) right bottom no-repeat #ffffff;"><div
style="width: 50px; float: left; margin-right: 5px;"> <a
href="http://www.amazon.com/exec/obidos/ASIN/1934356344/masbl03-20" target="_blank"><img
src="http://ecx.images-amazon.com/images/I/41fyjTVARFL._SL75_.jpg" width="50" height="75" border="0" /></a></div><div><p><a
href="http://www.amazon.com/exec/obidos/ASIN/1934356344/masbl03-20" target="_blank">The Passionate Programmer: Creating a Remarkable Career in Software Development (Pragmatic Life)</a> (Paperback)<br
/> <span
style="font-size: 0.8em;">by <strong>Chad Fowler</strong></span><br
/> ISBN: 1934356344</p><p><strong>Price:</strong> <span
style="color: #990000; font-weight: bold;">USD 16.29</span><br
/> <strong>39 used &#038; new</strong> available from <span
style="color: #990000; font-weight: bold;">USD 12.28</span></p><p> <img
src="http://matt.eifelle.com/wp-content/plugins/amazonsimpleadmin/img/stars-4.5.gif" class="asa_rating_stars" /> | 4.5 | 29</div><div
style="clear: both;"></div></div></div>
<p><a href="http://feedads.g.doubleclick.net/~a/q00ziJjfNe5DnJxENPrpT7nOfxM/0/da"><img src="http://feedads.g.doubleclick.net/~a/q00ziJjfNe5DnJxENPrpT7nOfxM/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/q00ziJjfNe5DnJxENPrpT7nOfxM/1/da"><img src="http://feedads.g.doubleclick.net/~a/q00ziJjfNe5DnJxENPrpT7nOfxM/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/eifelle/CPPV/~4/OJLs_WhxRIw" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://matt.eifelle.com/2009/12/29/book-review-the-passionate-programmer/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://matt.eifelle.com/2009/12/29/book-review-the-passionate-programmer/</feedburner:origLink></item> </channel> </rss><!-- Served from: lb3.celeonet.com @ 2010-03-12 18:45:04 by W3 Total Cache -->
