<?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>UNIXy Goodness &#187; Developer Tools</title>
	<atom:link href="http://quenelle.org/unix/category/developer-tools/feed/" rel="self" type="application/rss+xml" />
	<link>http://quenelle.org/unix</link>
	<description>UNIX developer tools and other cool stuff</description>
	<lastBuildDate>Fri, 25 Jun 2010 05:58:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>On Iteration by Andrei Alexandrescu</title>
		<link>http://quenelle.org/unix/2010/iterators/</link>
		<comments>http://quenelle.org/unix/2010/iterators/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 17:54:34 +0000</pubDate>
		<dc:creator>Chris Quenelle</dc:creator>
				<category><![CDATA[Compilers]]></category>
		<category><![CDATA[Developer Tools]]></category>

		<guid isPermaLink="false">http://quenelle.org/unix/?p=335</guid>
		<description><![CDATA[<p>I just finished reading a great article on iterators by Andrei Alexandrescu.  Mr. Alexandrescu is a contributor to the D programming language.  In this paper, he discusses the background of iterator implementations including C++ STL iterators, and then goes on to outline a new model for iterators.  It&#8217;s very readable, I recommend it.</p>
<p>http://www.informit.com/articles/article.aspx?p=1407357</p>
<p>To get a more [...]]]></description>
			<content:encoded><![CDATA[<p>I just finished reading a great article on iterators by Andrei Alexandrescu.  Mr. Alexandrescu is a contributor to the D programming language.  In this paper, he discusses the background of iterator implementations including C++ STL iterators, and then goes on to outline a new model for iterators.  It&#8217;s very readable, I recommend it.</p>
<p>http://www.informit.com/articles/article.aspx?p=1407357</p>
<p>To get a more readable all-in-one page, click on the &#8220;print&#8221; link on the page above, or go here:</p>
<p>http://www.informit.com/articles/printerfriendly.aspx?p=1407357</p>
]]></content:encoded>
			<wfw:commentRss>http://quenelle.org/unix/2010/iterators/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Charles Stross on EBooks</title>
		<link>http://quenelle.org/unix/2010/charles-stross-on-ebooks/</link>
		<comments>http://quenelle.org/unix/2010/charles-stross-on-ebooks/#comments</comments>
		<pubDate>Fri, 18 Jun 2010 00:24:20 +0000</pubDate>
		<dc:creator>Chris Quenelle</dc:creator>
				<category><![CDATA[Developer Tools]]></category>

		<guid isPermaLink="false">http://quenelle.org/unix/?p=332</guid>
		<description><![CDATA[<p>I just read a nice essay by science fiction author Charles Stross about EBooks.  As usual, he presents a very lucid and entertaining look into the world of publishing.</p>
<p>CMAP [...]]]></description>
			<content:encoded><![CDATA[<p>I just read a nice essay by science fiction author Charles Stross about EBooks.  As usual, he presents a very lucid and entertaining look into the world of publishing.</p>
<p><a title="CMAP #9: Ebooks" href="http://www.antipope.org/charlie/blog-static/2010/05/cmap-9-ebooks.html" target="_self">CMAP #9: Ebooks</a></p>
]]></content:encoded>
			<wfw:commentRss>http://quenelle.org/unix/2010/charles-stross-on-ebooks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Virtualization terms</title>
		<link>http://quenelle.org/unix/2010/virtualization-terms/</link>
		<comments>http://quenelle.org/unix/2010/virtualization-terms/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 01:23:26 +0000</pubDate>
		<dc:creator>Chris Quenelle</dc:creator>
				<category><![CDATA[Developer Tools]]></category>
		<category><![CDATA[OpenSolaris]]></category>
		<category><![CDATA[Tech Trivia]]></category>

		<guid isPermaLink="false">http://quenelle.org/unix/?p=329</guid>
		<description><![CDATA[<p>Okay, before I forget, I&#8217;m writing it all down.</p>
<p>We have to test against all this stuff, and it&#8217;s becoming more and more convenient to use virtualization as a way to share lab resources, so I figured I&#8217;d go make sense of all the terminology that&#8217;s flying around.  I understood 80% of it, but I could never [...]]]></description>
			<content:encoded><![CDATA[<p>Okay, before I forget, I&#8217;m writing it all down.</p>
<p>We have to test against all this stuff, and it&#8217;s becoming more and more convenient to use virtualization as a way to share lab resources, so I figured I&#8217;d go make sense of all the terminology that&#8217;s flying around.  I understood 80% of it, but I could never understand all of it at once.  A lot of this was extracted from Wikipedia.</p>
<p>Here are the things that affect my life: Xen, VirtualBox, VMWare, LDOMs, Zones, Containers.</p>
<p>Hypervisor : Software that emulates a hardware platform, so that Operating Systems can run on top of it, as if they had hardware to run on.</p>
<p>OS Virtualization: When you have one OS (one kernel) running multiple user-spaces. Applications think they are on separate machines.</p>
<p>There are two kinds of Hypervisors, some run directly on hardware (Type 1), and some run as applications (Type 2).</p>
<p>With those terms defined, here is a description of the technologies, features, products that I listed at the top:</p>
<ul>
<li>Hypervisors:
<ul>
<li>Running on hardware &#8211; Type 1 Hypervisor
<ul>
<li>Xen: Hypervisor that runs on hardware, supports x86 (aka Sun xVM)</li>
<li>LDOMs: Hypervisor that runs on hardware, supports SPARC</li>
</ul>
</li>
<li>Running as an application &#8211; Type 2 Hypervisor
<ul>
<li>VirtualBox: Hypervisor that runs as an application, supports x86</li>
<li>VMWare: Hypervisor that runs as an application, supports x86</li>
</ul>
</li>
</ul>
</li>
</ul>
<ul>
<li>OS Virtualization
<ul>
<li>Solaris Containers/Zones</li>
</ul>
</li>
</ul>
<p>The terms &#8220;zone&#8221; and &#8220;container&#8221; seem to interchangeable. I have not found a source that is both clear and authoritative that can tell me the difference.</p>
<p>Zones are capable of running different versions of Solaris inside one Global OS instance.</p>
<p>There are lots of things I glossed over here, but my goal was keep it short and sweet.</p>
<p>Trivia:</p>
<ul>
<li>You can run a specific old version of Linux inside a Solaris zone.</li>
<li>The VMWare company probably supports products on other chips than x86</li>
<li>There are lots of differences between the features of Xen and LDOMs that I didn&#8217;t discuss</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://quenelle.org/unix/2010/virtualization-terms/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Which version of Sun Studio do I have installed?</title>
		<link>http://quenelle.org/unix/2010/packaging-recipes/</link>
		<comments>http://quenelle.org/unix/2010/packaging-recipes/#comments</comments>
		<pubDate>Fri, 14 May 2010 17:47:09 +0000</pubDate>
		<dc:creator>Chris Quenelle</dc:creator>
				<category><![CDATA[Developer Tools]]></category>
		<category><![CDATA[OpenSolaris]]></category>

		<guid isPermaLink="false">http://quenelle.org/unix/?p=321</guid>
		<description><![CDATA[Recipes for supported packaging formats
<p>Sun Studio is available on three different packaging  systems. Here are some examples that show you how to get information  about the Sun Studio packages on each kind of system.</p>

IPS packaging system &#8211; on OpenSolaris
SYSV packages &#8211; on Solaris 10
RPMs &#8211; on SuSE and RedHat Linux

<p>If you want to know [...]]]></description>
			<content:encoded><![CDATA[<h4>Recipes for supported packaging formats</h4>
<p>Sun Studio is available on three different packaging  systems. Here are some examples that show you how to get information  about the Sun Studio packages on each kind of system.</p>
<ul>
<li>IPS packaging system &#8211; on OpenSolaris</li>
<li>SYSV packages &#8211; on Solaris 10</li>
<li>RPMs &#8211; on SuSE and RedHat Linux</li>
</ul>
<p>If you want to know what version of a Studio component you&#8217;re using,  the steps are shown below.  The compiler or tool you&#8217;re interested in  might be on your search path (you can find the location with &#8220;which cc&#8221;)  or you might already know the full path.  Once you have the full path,  here are the things you might want to find out:</p>
<ol>
<li>Find out the name of the package containing that binary.</li>
<li>Dump out information about that package.</li>
<li>Optionally look for other packages from the same Studio release, to  see what else is installed.</li>
</ol>
<p>Generally the multiple packages that make up Sun Studio will use a  similar naming convention.  In the currently available releases, these  package names are cryptic.</p>
<p><strong><span style="text-decoration: underline;">Sun Studio 12 update 1 installed on Solaris 10</span></strong></p>
<p>What version is built into the binary?</p>
<pre>% /opt/sunstudio12.1/bin/cc -V
cc: Sun C 5.10 SunOS_sparc 2009/06/03
usage: cc [ options] files.  Use 'cc -flags' for details</pre>
<p>Which package is that binary in?</p>
<pre>% pkgchk -l -p '/opt/sunstudio12.1/bin/cc'
NOTE: Couldn't lock the package database.
Pathname: /opt/sunstudio12.1/bin/cc
Type: symbolic link
Source of link: ../prod/bin/cc
Referenced by the following packages:
SPROcc
Current status: installed
</pre>
<p>What other packages are installed?</p>
<pre>% pkginfo | grep SPRO
application SPROatd                          Sun Studio 12 update 1 Advanced Tools Development Module
application SPROcc                           Sun Studio 12 update 1 C Compiler
application SPROcmpl                         Sun Studio 12 update 1 C++ Complex Library
application SPROcpl                          Sun Studio 12 update 1 C++ Compiler
application SPROcplx                         Sun Studio 12 update 1 C++ 64-bit Libraries
...</pre>
<p><span style="text-decoration: underline;"><strong>Sun Studio 12 update 1 installed on OpenSolaris</strong></span></p>
<p>What version is built into the binary?</p>
<pre>% /opt/sunstudio12.1/bin/cc -V
cc: Sun C 5.10 SunOS_i386 2009/06/03
usage: cc [ options] files.  Use 'cc -flags' for details% /opt/sunstudio12.1/bin/cc -V</pre>
<p>Which package is that binary in?</p>
<pre>% pkg search -lp /opt/sunstudio12.1/bin/cc
PACKAGE                                   PUBLISHER
pkg:/developer/sunstudio12u1@12.1.1-0.111</pre>
<p>What other packages are installed?</p>
<pre>% pkg list | grep -i studio
developer/sunstudio12u1                       12.1.1-0.111    installed  -----</pre>
<p><span style="text-decoration: underline;"><strong>Sun Studio 12 update 1 installed on SuSE 11 Linux</strong></span></p>
<p>What version is built into the binary?</p>
<pre>% /opt/sun/sunstudio12.1/bin/cc -V
cc: Sun C 5.10 Linux_i386 2009/06/03
usage: cc [ options] files.  Use 'cc -flags' for details</pre>
<p>Which package is that binary in?</p>
<pre>% rpm -qf /opt/sun/sunstudio12.1/bin/cc
sun-cc-12.1-1</pre>
<p>What other packages are installed?</p>
<pre>% rpm -qa | grep sun- | head
sun-lang-12.1-1
sun-idext-12.1-1
sun-mr3m-12.1-1
sun-prfan-12.1-1
sun-stl4h-12.1-1
sun-cplx-12.1-1
sun-dbxx-12.1-1
sun-pls-12.1-1
sun-dwrfs-12.1-1
sun-rtmx-12.1-1
...</pre>
<h4>Notes</h4>
<p>The excessively terse naming convention is because of the ancient  restrictions in AT&amp;T System V UNIX that limited package names to 9  characters.   Sun also made an early decision to prefix packages names  with 4 letters to mark the part of the company that was releasing the  packages.  In all fairness, Sun was trying to invent a scheme where  outside software vendors could reasonably choose package names without  accidentally conflicting with any of the Sun packages.  That&#8217;s difficult  to do in only 9 characters.  On OpenSolaris, you can see that we merged  everything into one package.  Because the friendly new packaging system  is one of the highlights of OpenSolaris, we didn&#8217;t want to confuse new  users with the multitude of small packages we have for Sun Studio.</p>
<p>Hopefully, this information will be useful in a variety of  circumstances. Inside the Studio team, we need to go back and forth  between all three packaging systems, and it&#8217;s not easy to remember the  right system commands to work with the packages on a given system. In  the support team, one of the first things they ask a customer is which  version of the Sun Studio software they are running. It&#8217;s also possible  to install subsets of Sun Studio, so you may want to know which tools  are currently installed.</p>
<p>Note: Studio will actually run fine on lots of different versions of  Linux, including distributions that don&#8217;t use RPM as their native  package format (like Ubuntu).  The tarball downloads are useful for  those Linux distributions.</p>
]]></content:encoded>
			<wfw:commentRss>http://quenelle.org/unix/2010/packaging-recipes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Code Bubbles</title>
		<link>http://quenelle.org/unix/2010/code-bubbles/</link>
		<comments>http://quenelle.org/unix/2010/code-bubbles/#comments</comments>
		<pubDate>Sat, 13 Mar 2010 05:15:57 +0000</pubDate>
		<dc:creator>Chris Quenelle</dc:creator>
				<category><![CDATA[Developer Tools]]></category>

		<guid isPermaLink="false">http://quenelle.org/unix/?p=299</guid>
		<description><![CDATA[<p>This is the IDE for me.  They start talking about debugger functionality about 75% of the way through.  IDEs are all about navigating huge amounts of information. Code [...]]]></description>
			<content:encoded><![CDATA[<p>This is the IDE for me.  They start talking about debugger functionality about 75% of the way through.  IDEs are all about navigating huge amounts of information. <a href="http://www.cs.brown.edu/people/acb/codebubbles_site.htm">Code Bubbles</a> (http://www.cs.brown.edu/people/acb/codebubbles_site.htm)</p>
]]></content:encoded>
			<wfw:commentRss>http://quenelle.org/unix/2010/code-bubbles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sun Studio uninstall problems (Sun Studio 12 update 1)</title>
		<link>http://quenelle.org/unix/2009/sun-studio-uninstall-problems/</link>
		<comments>http://quenelle.org/unix/2009/sun-studio-uninstall-problems/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 16:19:31 +0000</pubDate>
		<dc:creator>Chris Quenelle</dc:creator>
				<category><![CDATA[Developer Tools]]></category>

		<guid isPermaLink="false">http://quenelle.org/unix/?p=280</guid>
		<description><![CDATA[<p>If you installed the initial release of Sun Studio 12 update 1 (around June of 2009) you might have some problems running the uninstall script that came with it.  Our installer guru came up with a &#8220;workaround&#8221; script which is now available for download on the Sun Download Center.  You can find a description of the [...]]]></description>
			<content:encoded><![CDATA[<p>If you installed the initial release of Sun Studio 12 update 1 (around June of 2009) you might have some problems running the uninstall script that came with it.  Our installer guru came up with a &#8220;workaround&#8221; script which is now available for download on the Sun Download Center.  You can find a description of the problems and a link to the script on the Sun Studio web site&#8217;s <a href="http://developers.sun.com/sunstudio/support/troubleshooting/#failed_uninstall">Troubleshooting Page</a>.  You may also find it useful to check the Sun Studio 12 update 1 <a href="http://docs.sun.com/app/docs/doc/820-7601">installation guide</a>.  Some of the failure modes may show you errors like this:</p>
<pre>The local registry (/root/.nbi/registry.xml) could not be loaded, or was loaded partially.
The installer can continue to work normally, but doing so may result in a corrupted global registry.</pre>
<p>As Sun moves towards using the IPS packaging system, we&#8217;ll be able to rely more on the packaging tools built in to Solaris, and we won&#8217;t have as many issues like these.  I&#8217;m looking forward to it.</p>
]]></content:encoded>
			<wfw:commentRss>http://quenelle.org/unix/2009/sun-studio-uninstall-problems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Facets of Programming</title>
		<link>http://quenelle.org/unix/2009/facets/</link>
		<comments>http://quenelle.org/unix/2009/facets/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 21:55:10 +0000</pubDate>
		<dc:creator>Chris Quenelle</dc:creator>
				<category><![CDATA[Compilers]]></category>
		<category><![CDATA[Developer Tools]]></category>

		<guid isPermaLink="false">http://quenelle.org/unix/?p=272</guid>
		<description><![CDATA[<p>I&#8217;ve been thinking recently about the fact that the average piece of software code includes instructions to the compiler mixed together with instructions that should be executed at runtime.  Type declarations are instructions to the compiler. Most of the general sequential code is instructions that should be executed at runtime.  It occurred to me these are [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been thinking recently about the fact that the average piece of software code includes instructions to the compiler mixed together with instructions that should be executed at runtime.  Type declarations are instructions to the compiler. Most of the general sequential code is instructions that should be executed at runtime.  It occurred to me these are just two of many facets of software.  It would be nice to enable all these facets to be mixed together into one document so that the author of the software can keep all the facets consistent.</p>
<p>Another facet is specifications or unit tests.  I group those together because the way they&#8217;re tied to software at the code level is very similar, and they serve similar purposes.  There is an approach to coding called &#8220;Test Driven Design&#8221; where unit tests are written simultaneously with individual chunks of code.  There is a variant of this called &#8220;Behavior Driven Design&#8221;.  I was exposed to BDD in the latest Scala book (Programming Scala) and that was when I realized the TDD is really about verifiable specification, not so much about testing.</p>
<p>I really don&#8217;t want to use something that&#8217;s just a &#8220;programming language&#8221;, I want to use a &#8220;Software Authoring System&#8221;.</p>
<p>So what are the facets that a good &#8220;Software Authoring System&#8221; needs?</p>
<p>Runtime instructions: The purest expression of this facet is in dynamically typed languages, because they omit static type declarations.</p>
<p>Compiler instructions: Static type declarations for variables are instructions to the compiler. Type definitions themselves (in static or dynamic languages) are partly for the benefit of the compiler, and partly for the specification of runtime behavior.  Explicit testing and runtime manipulation of types (metaprogramming) uses types as part of the runtime behavior of the program. Virtual dispatch uses type information to determine runtime behavior. But non-virtual dispatch is really just a hint to the compiler about what code is going to be associated with what data. The behavior of such code is wired down at compile time.  The compiler uses it to optimize, and report programming errors back to the user.</p>
<p>The way that instructions are provided to the compiler should be rethought.  The declarative style of such instructions should be retained, but the functionality should be extensible through code that&#8217;s integrated with the project code. If I don&#8217;t like the way the static type system works (as supplied by the environment), I should be able to write extensions to it that will be executed by the compiler when it compiles my code. Among other benefits, this would allow me to implement better Domain Specific Languages and add better support for static analysis tools.  Moving the language complexity associated with static typing into a user-extensible library would also streamline the core language specification. The implementation of this feature would be more natural in a language where the compiler could just as easily interpret code as compile it, like dynamic interpreted languages.</p>
<p>Documentation: Embedding chunks of documentation inside your source code is a good start, and extracting method signatures is also useful (ala javadoc).  But a truly integrated system could provide much more information about interface specifications, preconditions, postconditions, etc.</p>
<p>Interface specification: If a public function takes arguments including a list and an integer that must be less than or equal to the length of the list, how does the author encode that information into the source code?  They can put it in comments.  They can add an assert statement (which will likely be ignored by the compiler, optimizer, documentation system etc). They can use TDD to create a test case that ensures the module throws an exception if the precondition is violated.  None of that goes far enough.  This kind of specification needs to be supported directly by the programming language and tied into the other facets of programming.</p>
<p>Module definition: The source code structures used to create a piece of software (a reusable module) are often not the same structures that you want to use to control how that software is used by other components.  That&#8217;s why programming languages support Classes and instances for object oriented design, and also support some concept of modules or packages for controlling the import and export of software interfaces to other components.  In most cases, this module/package support is a very thin layer glued onto the outside of a programming language.  For example, when creating a shared library on UNIX, there are linker-specific ways to enumerate which symbols are visible to consumers of the library.  There are also platform-specific hooks to allow this information to be passed into the linker from the source code, but again, it&#8217;s not truly integrated into the programming language.</p>
<p>Optimization: The author of a component usually needs to concern themselves (at some level) with basic choices that affect performance.  In some cases this requires in-depth bit-twiddling and care selection of compiler options, but in some cases it just means choosing data structure implementations that are appropriate for the task at hand.  As an author, I don&#8217;t want to have to use the Makefile to assign different optimization levels to different source files. I&#8217;d like to declare that a particular chunk of code needs to be heavily optimized and have the compiler just do the right thing.</p>
<p>Binding: Two kinds of binding are important to me as an author. My component will need to bind to the implementations of the interfaces it needs to be complete. Also, other components will bind to my component. The way I facilitate external binding is really part of the &#8220;module definition&#8221; facet discussed above.  The binding facet concerns itself with how to control the way that a component binds to its own required components. In some cases you want this binding to be via copy inclusion (think of archive libraries or combining .class files into a .jar file). In some cases you want to bind to external component, and include a version dependency in your component&#8217;s binary representation. In my source code I can say &#8220;import webservices.securesocket&#8221;, should I really have to go over to the makefile or build.xml in order to specify which version of the package I need to depend on?  A lot of what currently needs to go in the build structures should be folded into a new style of &#8220;rich&#8221; source code.</p>
<p>Static analysis: There&#8217;s a very useful development cycle in statically typed languages where you iterate between the compiler and editor while the compiler tells you about static typing errors in your source code.  But there are other static analysis tools besides the compiler.  The &#8220;compiler instructions&#8221; programming facet that I described above should be extended to include giving instructions to multiple static analysis tools in a unified way. Alternatively, the compiler can be extended as a universal front-end to outside analysis tools. Either way, this facet of programming should be expanded.</p>
<p>With this understanding as a basis, the next exercise would be to define a streamlined language that could be used as the basis for this kind of modern authoring system.</p>
]]></content:encoded>
			<wfw:commentRss>http://quenelle.org/unix/2009/facets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The next big concurrent language</title>
		<link>http://quenelle.org/unix/2009/concurrent-language/</link>
		<comments>http://quenelle.org/unix/2009/concurrent-language/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 02:08:24 +0000</pubDate>
		<dc:creator>Chris Quenelle</dc:creator>
				<category><![CDATA[Compilers]]></category>
		<category><![CDATA[Developer Tools]]></category>

		<guid isPermaLink="false">http://quenelle.org/unix/?p=267</guid>
		<description><![CDATA[<p>Tim Bray has been writing his thoughts recently on the topic of the next big language for concurrency.</p>
<p>Let me start by saying I&#8217;m completely an arm-chair quarterback here, I&#8217;ve never used a functional language for a real project, but I&#8217;ve worked in the area of development tools and multi-threaded applications for many years. I&#8217;ve watched a [...]]]></description>
			<content:encoded><![CDATA[<p>Tim Bray has been writing his thoughts recently on the topic of the <a title="Tim's concur.next blog" href="http://www.tbray.org/ongoing/When/200x/2009/09/27/Concur-dot-next" target="_self">next big language for concurrency</a>.</p>
<p>Let me start by saying I&#8217;m completely an arm-chair quarterback here, I&#8217;ve never used a functional language for a real project, but I&#8217;ve worked in the area of development tools and multi-threaded applications for many years. I&#8217;ve watched a lot of language extensions and libraries come and go over the years claiming to &#8220;solve&#8221; the problems of parallel coding.  I&#8217;ve also seen some pretty fancy analysis done by compilers, which seems like it could be better leveraged if the languages had better ways to communicate the intent of the code author.</p>
<p>Do we need a new language for concurrency?</p>
<p>My assumption is that the development of OO programming was the result of increasing software complexity, not a response to a particular change in the capabilities of computer hardware (like multi-core is hitting us today).</p>
<p>Over the last many years, distributed networks of computers have been a very popular platform for writing software.  There are many libraries and frameworks for dealing with distributed systems, but specific languages that address that need (I&#8217;m sure there are some) have not become popular in general.  Distributed programs are still written mostly in languages that don&#8217;t have any specific features to support distributed programming.</p>
<p>So I don&#8217;t think the need for concurrency itself will drive the adoption of a new language.  The compelling argument for me is the possibility that the needs of multi-core (and hence multi-threaded) programming may drive software complexity far enough that we need another big leap in programming technology.  I&#8217;m skeptical that&#8217;s the case, but it won&#8217;t stop me from theorizing about what the next leap in programming technology might be.  <img src='http://quenelle.org/unix/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Eventually we&#8217;ll need a new language, what will it be like?</p>
<p>Global state makes multi-threaded programs difficult to write and maintain because it requires synchronization.  The problem is not the synchronization, the problem is the global state. That&#8217;s a lesson I take from functional languages. Previous attempts to address concurrent programming tended to focus on encapsulating the synchronization, instead of encapsulating (or abstracting away) the global state.  For example, a parallel language extension that allows you to specify a matrix operation without needing to name any iterator variables has abstracted away the global state (in this case, the iterator variable).  A language feature (like OpenMP) that tells the compiler where and how to synchronize, but still requires you to code the iteration yourself, is hiding the synchronization but not the the global state.</p>
<p>It&#8217;s tempting to look for a language that emphasizes functional programming in its design, but that&#8217;s not necessarily the right approach.  There are many difficult and complex aspects to writing software, and the problem of global state is just one more. The right response is to look for a language that makes it easy to <strong>encapsulate</strong> global state.  In general, functional languages don&#8217;t necessarily make it easy to encapsulate global state. I think the correct response is to look at languages that can abstract away the complexity of MT coding and global state in effective ways.</p>
<p>So here&#8217;s an analogy: A long time ago I took a course on the software APIs used to internationalize software.  My main take-away was the the best way to internationalize any sort of library was to remove all the messages from the library, and only return diagnostic codes.  In other words, the best way to internationalize code is not to have to.  Similarly, the best way to synchronize code is not to have to. You want to encapsulate it into a specialized module.</p>
<p>In a layered application that is concurrent, you want to focus on making the lowest layers of software completely reentrant (that is, side-effect free). It&#8217;s generally not a big deal if the very top layer has global state, as long as the top layer is sufficiently thin. You want a language that makes it easy to write side-effect free code, but there is still lots of code that needs to have side-effects that can&#8217;t be ignored.</p>
<p>So it seems to me that the key feature we should be looking for is a significantly increased ability to abstract away implementation details.  By the way, any functional language that requires coders to understand how/why/when to write a tail-recursive function loses out big time in the abstraction department.</p>
<p>I was recently inspired by a paper in IEEE Computer that talked about a research language called SequenceL. I discussed it in a previous blog. The benefits of SequenceL are described as the ability to write executable code that maps as directly as possible into a requirements specification in the jargon of the problem domain.  This meshes with the recent discussions of DSLs (domain specific languages) as a good way to encapsulate various concurrent implementations.</p>
<p>Check out <a href="http://quenelle.org/unix/2009/sequencel/" target="_self">my last blog entry about SequenceL</a>, and read the paper, it&#8217;s very well written.  If you have a direct link for it, please let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://quenelle.org/unix/2009/concurrent-language/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SequenceL : Declarative Language Design</title>
		<link>http://quenelle.org/unix/2009/sequencel/</link>
		<comments>http://quenelle.org/unix/2009/sequencel/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 03:51:08 +0000</pubDate>
		<dc:creator>Chris Quenelle</dc:creator>
				<category><![CDATA[Compilers]]></category>
		<category><![CDATA[Developer Tools]]></category>

		<guid isPermaLink="false">http://quenelle.org/unix/?p=260</guid>
		<description><![CDATA[<p>I faithfully scan the tables of contents for IEEE Computer every time it comes out, and every now and then there&#8217;s a paper that I find both interesting and well written.  Today I found one called: &#8220;Taking Parnas’s Principles to the Next Level: Declarative Language Design&#8221; by Daniel E. Cooke and J. Nelson Rushton, at Texas [...]]]></description>
			<content:encoded><![CDATA[<p>I faithfully scan the tables of contents for IEEE Computer every time it comes out, and every now and then there&#8217;s a paper that I find both interesting and well written.  Today I found one called: &#8220;Taking Parnas’s Principles to the Next Level: Declarative Language Design&#8221; by Daniel E. Cooke and J. Nelson Rushton, at Texas Tech University.  I&#8217;d never heard of Parnas, but the paper discusses a programming language called SequenceL, which addresses some of the issue I have with programming language design.  Specifically, both functional and procedural languages make it necessary to &#8220;wire down&#8221; an implementation too much, and don&#8217;t allow enough leeway for an intelligent compiler or an intelligent library to offer a generic software service.  The language discussed in the paper revolves around an increased reliance on declarative syntax to specify a richer set of functionality. You might also describe the approach as heavily polymorphic, but I don&#8217;t think that description really captures the elegance apparent in the examples.</p>
<p>The emphasis in the paper seems to be on the ability to create an algorithm implementation that is very close to a natural language specification of the requirements.  In fields where that&#8217;s an issue (space shuttle software, in the article) that seems like a good measure of success. But I think the increased level of data hiding and abstraction also lends itself to supporting much more freedom in the compiler, libraries and runtime system to choose implementation details that are best suited to executing the program on particular hardware or in a particular operating environment. Unsurprisingly, when I googled for SequenceL I also found papers with names like: &#8220;Automatic parallel control structures in SequenceL&#8221; and &#8220;Automatic Concurrency in SequenceL&#8221;.</p>
<p><!-- articleText --></p>
<p>Anyway, it was a very stimulating paper. Unfortunately, it&#8217;s a restricted download on the IEEE site. If you&#8217;re a Sun employee, you can access the IEEE site without a special login, <a title="IEEE Access Instructions" href="https://sunspace.sfbay.sun.com/display/DLRINFOKNOWLEDGE/IEEE" target="_blank">the instructions</a> are available on the Sun internal network at the Sun Learning Services web site. I assume you can also purchase it online from the IEEE site, but I didn&#8217;t verify that.</p>
<p><span style="color: #008000;">Update: Very interesting.  Two days after I read this paper, I scanned through some slides being presented at Sun by Kunle <a href="http://ppl.stanford.edu/wiki/index.php/Pervasive_Parallelism_Laboratory">Stanford Pervasive Parallelism Laboratory</a>.  He discussed the future of highly parallel app development, and his vision includes more emphasis on Domain Specific Languages, using Scala as a base platform for the DSLs.  More support for the idea that current programming languages require you to put too much implementation knowledge into the application level. You can find <a href="http://www.scala-lang.org/node/3200">a set of slides very similar</a> to what he presented on the Scala web site.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://quenelle.org/unix/2009/sequencel/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Visualizing dynamic library dependencies</title>
		<link>http://quenelle.org/unix/2009/shared-library-graphs/</link>
		<comments>http://quenelle.org/unix/2009/shared-library-graphs/#comments</comments>
		<pubDate>Fri, 22 May 2009 15:59:01 +0000</pubDate>
		<dc:creator>Chris Quenelle</dc:creator>
				<category><![CDATA[Debugging]]></category>
		<category><![CDATA[Developer Tools]]></category>
		<category><![CDATA[OpenSolaris]]></category>

		<guid isPermaLink="false">http://quenelle.org/unix/?p=243</guid>
		<description><![CDATA[<p>Darryl Gove has been working on graphical display of shared library dependencies. It seems useful for performance analysis and debugging of dynamically linked applications.</p>
<p>He did one for StarOffice and for Firfox and Thunderbird.</p>

StarOffice : http://blogs.sun.com/d/entry/drawing_libraries_neater_eye_candy
Firefox, Thunderbird [...]]]></description>
			<content:encoded><![CDATA[<p>Darryl Gove has been working on graphical display of shared library dependencies. It seems useful for performance analysis and debugging of dynamically linked applications.</p>
<p>He did one for StarOffice and for Firfox and Thunderbird.</p>
<ul>
<li>StarOffice : <a href="http://blogs.sun.com/d/entry/drawing_libraries_neater_eye_candy">http://blogs.sun.com/d/entry/drawing_libraries_neater_eye_candy</a></li>
<li>Firefox, Thunderbird : <a href="http://blogs.sun.com/d/entry/graph_of_libraries_used_by">http://blogs.sun.com/d/entry/graph_of_libraries_used_by</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://quenelle.org/unix/2009/shared-library-graphs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
