<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3043798876461399350</id><updated>2011-12-03T09:21:52.897+01:00</updated><category term='parallelism'/><category term='ateji'/><category term='ateji px'/><category term='java'/><category term='venture capital'/><category term='optimj'/><title type='text'>The dress of thought</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ateji.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://ateji.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Patrick Viry</name><uri>http://www.blogger.com/profile/10442033581047493529</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_yjQMP8TlO50/SXT8zEl4a7I/AAAAAAAAANU/Adz-KJVwzlo/S220/photo.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>34</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3043798876461399350.post-3417433390594614543</id><published>2011-03-18T16:15:00.003+01:00</published><updated>2011-03-18T16:28:52.527+01:00</updated><title type='text'>This blog has moved</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/-r4TnMOOoYV8/TYN50st_jJI/AAAAAAAAAf4/RzgXywBVAVA/s1600/Ateji_103x75.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 103px; height: 75px;" src="http://3.bp.blogspot.com/-r4TnMOOoYV8/TYN50st_jJI/AAAAAAAAAf4/RzgXywBVAVA/s200/Ateji_103x75.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5585441909133773970" /&gt;&lt;/a&gt;&lt;br /&gt;This blog is now hosted on the Ateji web site at &lt;a href="http://www.ateji.com/blog/"&gt;http://www.ateji.com/blog/&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;Please update your RSS feeds.&lt;br /&gt;&lt;br /&gt;Using this new platform will make it much easier to format and post source code. Expect a wealth of technical articles about Java, multithreading, parallel programming and Ateji PX in the coming weeks. &lt;br /&gt;&lt;br /&gt;See you there.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3043798876461399350-3417433390594614543?l=ateji.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ateji.blogspot.com/feeds/3417433390594614543/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3043798876461399350&amp;postID=3417433390594614543' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/3417433390594614543'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/3417433390594614543'/><link rel='alternate' type='text/html' href='http://ateji.blogspot.com/2011/03/this-blog-has-moved.html' title='This blog has moved'/><author><name>Patrick Viry</name><uri>http://www.blogger.com/profile/10442033581047493529</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_yjQMP8TlO50/SXT8zEl4a7I/AAAAAAAAANU/Adz-KJVwzlo/S220/photo.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-r4TnMOOoYV8/TYN50st_jJI/AAAAAAAAAf4/RzgXywBVAVA/s72-c/Ateji_103x75.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3043798876461399350.post-4417716006321077146</id><published>2011-03-02T20:01:00.006+01:00</published><updated>2011-03-02T20:24:58.566+01:00</updated><title type='text'>Ateji PX Free Edition available</title><content type='html'>Here at Ateji, we aim at offering innovative programming languages and tools. Running such a business is like performing a delicate balancing act: developing a good product takes time, and when the product is finally out you need to implement the right business model. An important choice is pricing.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://upload.wikimedia.org/wikipedia/commons/thumb/f/f9/Balance_icon.svg/200px-Balance_icon.svg.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 200px; height: 163px;" src="http://upload.wikimedia.org/wikipedia/commons/thumb/f/f9/Balance_icon.svg/200px-Balance_icon.svg.png" border="0" alt="" /&gt;&lt;/a&gt;Offering free software helps building a community behind the product, but does not help financing the company. This is why innovative solutions are typically launched in two steps. We have now reached the first step, where an initial stream of corporate customers guarantees a recurrent revenue. Now that we've made sure that we can feed our families, we're ready to offer a free personal edition of the software.&lt;br /&gt;&lt;br /&gt;I am proud to announce the availability of the &lt;a href="http://www.ateji.com/px/free-ateji-px-download.html"&gt;Free Edition&lt;/a&gt; of Ateji PX, the easiest Java-based parallel programming tool on the market. The Free Edition handles up to 4 cores, which is typically the upper count found in personal computers. Use it for your existing applications and future developments, and enjoy multicore programming!&lt;br /&gt;&lt;br /&gt;Corporate servers now commonly have 16 cores or more for computational intensive applications. Corporate users can try the core-unlimited evaluation version and purchase a license when the tests are promising. Don't leave your powerful servers idle! Depending on the application, &lt;a href="http://www.ateji.com/px/whitepapers/Ateji%20PX%20MatMult%20Whitepaper%20v1.2.pdf?phpMyAdmin=95wsvAC1wsqrAq3j%2CM3duZU3UJ7"&gt;12x speedups on 16-core servers&lt;/a&gt; are not uncommon.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3043798876461399350-4417716006321077146?l=ateji.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ateji.blogspot.com/feeds/4417716006321077146/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3043798876461399350&amp;postID=4417716006321077146' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/4417716006321077146'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/4417716006321077146'/><link rel='alternate' type='text/html' href='http://ateji.blogspot.com/2011/03/ateji-px-free-edition-available.html' title='Ateji PX Free Edition available'/><author><name>Patrick Viry</name><uri>http://www.blogger.com/profile/10442033581047493529</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_yjQMP8TlO50/SXT8zEl4a7I/AAAAAAAAANU/Adz-KJVwzlo/S220/photo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3043798876461399350.post-6686796772698921332</id><published>2011-02-07T15:24:00.021+01:00</published><updated>2011-02-15T13:14:14.527+01:00</updated><title type='text'>Java on GPU with Ateji PX</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.itechnews.net/wp-content/uploads/2010/10/NVIDIA-Quadro-600-Fermi-Graphics-Card.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 450px; height: 283px;" src="http://www.itechnews.net/wp-content/uploads/2010/10/NVIDIA-Quadro-600-Fermi-Graphics-Card.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;An explicit parallel composition operator (&lt;a href="http://www.ateji.com/px"&gt;Ateji PX&lt;/a&gt;'s parallel bar) is pretty useful for hybrid CPU-GPU programming. &lt;br /&gt;&lt;br /&gt;All frameworks I know embed GPU code into some sort of method call, sometimes indirectly. In any case, you end up writing something like&lt;br /&gt;&lt;br /&gt;&lt;div style='font-family:monospace; border: 2px solid #e5e5e5; padding: 5px 5px 5px 5px; text-align: left; color:black; background-color: #f9ffe5; '&gt;&lt;br /&gt;blablabla();&amp;nbsp;&lt;span style="color: #004680;"&gt;//&amp;nbsp;runs&amp;nbsp;on&amp;nbsp;CPU&lt;/span&gt;&lt;br/&gt;&lt;br /&gt;&lt;span style="color: #004680;"&gt;//&amp;nbsp;this&amp;nbsp;code&amp;nbsp;must&amp;nbsp;run&amp;nbsp;on&amp;nbsp;the&amp;nbsp;GPU&lt;/span&gt;&lt;br /&gt;output&amp;nbsp;=&amp;nbsp;doSomethingOnGPU(input);&lt;br/&gt;&lt;br /&gt;blablabla();&amp;nbsp;&lt;span style="color: #004680;"&gt;//&amp;nbsp;runs&amp;nbsp;on&amp;nbsp;CPU&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The bottom line is that input and output data, either implicit or explicit, are passed from CPU to GPU before running the code, and then from GPU to CPU when computation terminates. In other words, the GPU spends a lot of time idle waiting for I/O.&lt;br /&gt;&lt;br /&gt;The key to GPU performance is to overlap data transfer and computation, so that input data is already present when a new computation starts. When coding in OpenCL or CUDA, this is done via asynchronous calls :&lt;br /&gt;&lt;br /&gt;&lt;div style='font-family:monospace; border: 2px solid #e5e5e5; padding: 5px 5px 5px 5px; text-align: left; color:black; background-color: #f9ffe5; '&gt;&lt;br /&gt;&lt;span style="color: #004680;"&gt;//&amp;nbsp;start&amp;nbsp;asynchronous&amp;nbsp;transfer&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #004680;"&gt;//&amp;nbsp;the&amp;nbsp;method&amp;nbsp;call&amp;nbsp;returns&amp;nbsp;immediately&lt;/span&gt;&lt;br /&gt;cudaMemcpyAsync(handle,&amp;nbsp;...);&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #004680;"&gt;//&amp;nbsp;perform&amp;nbsp;computations&amp;nbsp;that&amp;nbsp;do&amp;nbsp;not&amp;nbsp;depend&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #004680;"&gt;//&amp;nbsp;on&amp;nbsp;the&amp;nbsp;result&amp;nbsp;of&amp;nbsp;the&amp;nbsp;transfer&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #004680;"&gt;//&amp;nbsp;wait&amp;nbsp;until&amp;nbsp;the&amp;nbsp;transfer&amp;nbsp;is&amp;nbsp;finished,&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #004680;"&gt;//&amp;nbsp;using&amp;nbsp;'handle'&amp;nbsp;as&amp;nbsp;a&amp;nbsp;reference&amp;nbsp;to&amp;nbsp;the&amp;nbsp;async&amp;nbsp;transfer&lt;/span&gt;&lt;br /&gt;kernel&amp;lt;&amp;lt;&amp;lt;grid,&amp;nbsp;block&amp;gt;&amp;gt;&amp;gt;(handle);&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #004680;"&gt;//&amp;nbsp;now&amp;nbsp;we're&amp;nbsp;sure&amp;nbsp;the&amp;nbsp;transfer&amp;nbsp;is&amp;nbsp;complete,&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #004680;"&gt;//&amp;nbsp;we&amp;nbsp;can&amp;nbsp;perform&amp;nbsp;computations&amp;nbsp;that&amp;nbsp;do&amp;nbsp;depend&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #004680;"&gt;//&amp;nbsp;on&amp;nbsp;its&amp;nbsp;result&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;In this example, the &lt;span style="font-style:italic;"&gt;intent&lt;/span&gt; is really to perform computation and communication in parallel. But since there's no notion of &lt;span style="font-style:italic;"&gt;parallel composition&lt;/span&gt; in OpenCL (or C, or any mainstream language for that matter), it is not possible to express directly the intent. Instead, you have to resort to this complex and not very intuitive mechanism of asynchronous calls. This is pretty low-level and you'd be happy that the compiler transform your intent into these low-level calls. That's precisely what Ateji PX does.&lt;br /&gt;&lt;br /&gt;So what's the &lt;span style="font-style:italic;"&gt;intent&lt;/span&gt;? Expressing that CPU and GPU must execute concurrently. In Ateji PX, this is done with two parallel branches, one of them bearing the &lt;code&gt;#GPU&lt;/code&gt; annotation. A channel is visible from both branches and will be used for communication.&lt;br /&gt;&lt;br /&gt;&lt;div style='font-family:monospace; border: 2px solid #e5e5e5; padding: 5px 5px 5px 5px; text-align: left; color:black; background-color: #f9ffe5; '&gt;&lt;br /&gt;Chan&amp;nbsp;input&amp;nbsp;=&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;new&lt;/span&gt;&amp;nbsp;AsyncChan();&lt;br /&gt;Chan&amp;nbsp;output&amp;nbsp;=&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;new&lt;/span&gt;&amp;nbsp;AsyncChan()&lt;br /&gt;[&lt;br /&gt;&amp;nbsp;&amp;nbsp;||&amp;nbsp;&lt;span style="color: #004680;"&gt;//&amp;nbsp;code&amp;nbsp;to&amp;nbsp;be&amp;nbsp;run&amp;nbsp;on&amp;nbsp;CPU&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;br /&gt;&amp;nbsp;&amp;nbsp;||&amp;nbsp;(#OpenCL)&amp;nbsp;&lt;span style="color: #004680;"&gt;//&amp;nbsp;code&amp;nbsp;to&amp;nbsp;be&amp;nbsp;run&amp;nbsp;on&amp;nbsp;GPU&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;br /&gt;]&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Note that running code on the CPU or on the GPU is only a matter of modifying the annotations (can also be determined at run-time). No other change is the source code is required. &lt;br /&gt;&lt;br /&gt;The GPU repeatedly waits for input data on channel c, performs computation and sends a result:&lt;br /&gt;&lt;br /&gt;&lt;div style='font-family:monospace; border: 2px solid #e5e5e5; padding: 5px 5px 5px 5px; text-align: left; color:black; background-color: #f9ffe5; '&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;||&amp;nbsp;&lt;span style="color: #004680;"&gt;//&amp;nbsp;code&amp;nbsp;to&amp;nbsp;be&amp;nbsp;run&amp;nbsp;on&amp;nbsp;GPU&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;for&lt;/span&gt;(;;)&amp;nbsp;&lt;span style="font-weight:bold;"&gt;{&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;input&amp;nbsp;?&amp;nbsp;data;&amp;nbsp;&lt;span style="color: #004680;"&gt;//&amp;nbsp;receive&amp;nbsp;data&amp;nbsp;from&amp;nbsp;CPU&amp;nbsp;on&amp;nbsp;the&amp;nbsp;input&amp;nbsp;channel&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;result&amp;nbsp;=&amp;nbsp;computation(data);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;output&amp;nbsp;!&amp;nbsp;data;&amp;nbsp;&lt;span style="color: #004680;"&gt;//&amp;nbsp;send&amp;nbsp;result&amp;nbsp;on&amp;nbsp;the&amp;nbsp;output&amp;nbsp;channel&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The CPU repeatedly sends input data and waits for results:&lt;br /&gt;&lt;br /&gt;&lt;div style='font-family:monospace; border: 2px solid #e5e5e5; padding: 5px 5px 5px 5px; text-align: left; color:black; background-color: #f9ffe5; '&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;||&amp;nbsp;&lt;span style="color: #004680;"&gt;//&amp;nbsp;code&amp;nbsp;to&amp;nbsp;be&amp;nbsp;run&amp;nbsp;on&amp;nbsp;CPU&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;for&lt;/span&gt;(;;)&amp;nbsp;&lt;span style="font-weight:bold;"&gt;{&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;input&amp;nbsp;!&amp;nbsp;data;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;output&amp;nbsp;?&amp;nbsp;data;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;do&lt;/span&gt;&amp;nbsp;something&amp;nbsp;with&amp;nbsp;the&amp;nbsp;result&amp;nbsp;...&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Computation and communication overlap because the communication channels have been declared as asynchronous:&lt;br /&gt;&lt;br /&gt;&lt;div style='font-family:monospace; border: 2px solid #e5e5e5; padding: 5px 5px 5px 5px; text-align: left; color:black; background-color: #f9ffe5; '&gt;&lt;br /&gt;Chan&amp;nbsp;input&amp;nbsp;=&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;new&lt;/span&gt;&amp;nbsp;AsyncChan();&lt;br /&gt;Chan&amp;nbsp;output&amp;nbsp;=&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;new&lt;/span&gt;&amp;nbsp;AsyncChan();&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;That's all! &lt;br /&gt;&lt;br /&gt;The intent is clearly expressed in the source code : we have two parallel branches that communicate using channels, add a single annotation to state that a branch should run on GPU. No need to manage asynchronous calls, no need to use two different languages for coding an application, the Ateji PX compiler does all this for you. &lt;br /&gt;&lt;br /&gt;Code is understandable and maintainable, and can work on multicore CPUs by simply changing the #GPU annotation. You can for instance debug the application on CPU before deploying it on GPU.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="data:image/jpg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAkGBwgHBgkIBwgKCgkLDRYPDQwMDRsUFRAWIB0iIiAdHx8kKDQsJCYxJx8fLT0tMTU3Ojo6Iys/RD84QzQ5Ojf/2wBDAQoKCg0MDRoPDxo3JR8lNzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzf/wAARCAA7AIQDASIAAhEBAxEB/8QAGwAAAwEBAQEBAAAAAAAAAAAAAAYHBQQBAgP/xAA7EAABAwIDAgoHCAMBAAAAAAABAAIDBAURITEGEgcUIjI2QVFhsdETFVNxdJKhIzM0UnOBkaJCcrJi/8QAGgEBAAMBAQEAAAAAAAAAAAAABgQFBwEAA//EAC8RAAEDAgUCAwcFAAAAAAAAAAEAAgMEEQUGEyExElEzUsEUQUJhgaGxMmJx0eH/2gAMAwEAAhEDEQA/AFOT7x3vK7KC2y1fKJ3IvzHr9y+rbQmtrHAgljXcoDr7k409u5IEh3QNGt6kSqakRbDlarVVghAaOUs3Sgpqa01DmRgvDRynZnUJSVJ2koY2bPVsrGHksHKJ/wDQU2SnK8upSvN/i9AswzTNq1TTf4fUoQhCSoyhXTgX6Hu+Lk8GqFq6cC/Q93xcng1RK3wlLo/ET4dFBOETpnc/92/8NV7OihO3UDqnbq4xM1dI3E9g3G5o3Xm0QJ7p3lYhtW8nyn8hL1HSS1cm7EMhznHQLZZaaeCB7ngyPDTm7TTsWzQWv0cLWAejYO0ZnvXZLbo+LTbrXOIjccSe4ow+tu8AHZIKzEOprgDsphb/AMdT/qs8QnqSGKQYSRscO8YpItDPTXSijH+c8bf5cFR6y3TUpOW83uSLNDw2eIX3sfyh2VZGtjkaTvcKXHUrxenUrxMxwhbuUIQhdXFTtnKHi9E2QtxklJfpoDp9EyUtullwdIN1vYdV00FPHExjY43PDWDDdLfNTDhS2wvtBcoKajjntsYDsJDukzAEYEYY5fVY3FFLX1JZGQD3Ke4hizhJZg3PfZN3CLV0ts2efRvew1FZgxjCcDgCCSPdhmpKue6X+47QXO1z3PEvjp90HDAPzdysO/D6LoWi5coTR0hY43JNyiFfK+WXqehCEK/UFCunAv0Pd8XJ4NULV04F+h7vi5PBqiVvhKXR+Inw6KWXSha/bG8VTxj9qxrfkaqmUo1lNF62qnAFzny4nDdx5o7SOxDsflMdKPmf7SfDKjQe89xb7hZVPRTTnJpDeslfreXU1nslVU1UjGNETg0POAcSMhj3pZ4UdprnY7Y2O20c8BL2YVhDS1uOJ3dTnyRqMMCpZdNrrzerFBQ3KV0scdUHCYjAuyyacNcNVQ4fhM1UGTEgMvx77L4VOJyShzWCw4v/AIuykquIVENYWF/Fntl3QcN7dOOGP7KsbObU0O2dJO+jp5IZYGh0oeRk4k5DrOmqj1X+Gm/Td4Jk4DKaN1wulUahnpI6YMbBhyiCedpoMMMu1LM10sT4dZ36mjY/UKqwx72Ouw23CwHc4+9eL05kleJaOFVHlCEIXVxV+yXN8tDDI04kDA49RGRWjWU1pvojZdqKOcx80StBA7SP4SBs7cTTzyQOOTnEtB6+0JugqY5QCx2Duw5ELG6qndFKXM27ELUcRwyNzi17duQsHhP2XpvRUV5oGtibSMELo2My3NBpphj9VPlVNrqlx2Xro3E4uazTr5bVK08ylJI+hIeb2cQP4sCgWLU3s8/QOLXQhCEoVWhXTgX6Hu+Lk8GqFq6cC/Q93xcng1RK3wlLo/ET4VPK+ucNorrA05xTjI9hY0qhnRRTamuNFt/cnb26x72Ans5DUTxmHVpun5phgcGtLI39t/uE2zPorrS8TusDZIXHEtcAWuzxGP7hYO2Oxlsq9kzT2qGKk4o/jDAxmpAz01xGX8di6KerjmABIa7sJXTPVOjoakEnOF4xGvNKHQGaCVhjcRYg29y7W4XG4Oc0WcoxLG+aJ8cTHPe9paxrRiXE6ABO/BRstXWN1bcrtTy0z5KfdiY4NwLSc8esHIZZfv1K9jIbebeXc0VMWPu3gqzdrw14cxjt/uGia5rqZWllOwbOG5+qocGo31DiRwCFGShCEyHCoTyhCELq8tVxLZXFpIIccCFuW66slAjqCGSaB3UfJfk+hp9932fX+Y+a84jTez/sfNZ7JTagsVuUlRDK0Agrsv8AI42aoG+4tIbljlzgkhNk0LOKvh5Xo3DNu+cNfes71fS+z/sfNIsAj0KdzT5vQLNs0svVt6fL6lYiFt+r6X2Z+Y+aPV9L7M/MfNXuoEa0ysRXTgX6Hu+Lk8GqTer6X2Z+Y+asXBPCyHZdzIm4N4084Yk9TVErHgxqVSMIkunM6KCcInTO5/7t/wCGq9lRfbmkgk2ruL3sxcXtxO8fyNVDWNLmADummWpmxVTi7y+oWBbLoI2iGpOLRk1/Z3FbM0zjSSmOQ7pjdzXZaLI4jTez/sfNfccLImOEe80EEEB5wP1VK6i6nBwSWrdC9jnNBGyWbf8Ajqb9VniE+nRLlFQUwqoD6M4iRuHKPb70z17GxRYxjA+9W+YmGaaPp7FDcsOEccjT7yPwpshbZt9Lj92fmPmj1fS+zPzHzSsSBDzEbrEQtv1fS+zPzHzQvagXNMr/2Q=="&gt;&lt;img style="cursor:pointer; cursor:hand;width: 132px; height: 59px;" src="data:image/jpg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAkGBwgHBgkIBwgKCgkLDRYPDQwMDRsUFRAWIB0iIiAdHx8kKDQsJCYxJx8fLT0tMTU3Ojo6Iys/RD84QzQ5Ojf/2wBDAQoKCg0MDRoPDxo3JR8lNzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzf/wAARCAA7AIQDASIAAhEBAxEB/8QAGwAAAwEBAQEBAAAAAAAAAAAAAAYHBQQBAgP/xAA7EAABAwIDAgoHCAMBAAAAAAABAAIDBAURITEGEgcUIjI2QVFhsdETFVNxdJKhIzM0UnOBkaJCcrJi/8QAGgEBAAMBAQEAAAAAAAAAAAAABgQFBwEAA//EAC8RAAEDAgUCAwcFAAAAAAAAAAEAAgMEEQUGEyExElEzUsEUQUJhgaGxMmJx0eH/2gAMAwEAAhEDEQA/AFOT7x3vK7KC2y1fKJ3IvzHr9y+rbQmtrHAgljXcoDr7k409u5IEh3QNGt6kSqakRbDlarVVghAaOUs3Sgpqa01DmRgvDRynZnUJSVJ2koY2bPVsrGHksHKJ/wDQU2SnK8upSvN/i9AswzTNq1TTf4fUoQhCSoyhXTgX6Hu+Lk8GqFq6cC/Q93xcng1RK3wlLo/ET4dFBOETpnc/92/8NV7OihO3UDqnbq4xM1dI3E9g3G5o3Xm0QJ7p3lYhtW8nyn8hL1HSS1cm7EMhznHQLZZaaeCB7ngyPDTm7TTsWzQWv0cLWAejYO0ZnvXZLbo+LTbrXOIjccSe4ow+tu8AHZIKzEOprgDsphb/AMdT/qs8QnqSGKQYSRscO8YpItDPTXSijH+c8bf5cFR6y3TUpOW83uSLNDw2eIX3sfyh2VZGtjkaTvcKXHUrxenUrxMxwhbuUIQhdXFTtnKHi9E2QtxklJfpoDp9EyUtullwdIN1vYdV00FPHExjY43PDWDDdLfNTDhS2wvtBcoKajjntsYDsJDukzAEYEYY5fVY3FFLX1JZGQD3Ke4hizhJZg3PfZN3CLV0ts2efRvew1FZgxjCcDgCCSPdhmpKue6X+47QXO1z3PEvjp90HDAPzdysO/D6LoWi5coTR0hY43JNyiFfK+WXqehCEK/UFCunAv0Pd8XJ4NULV04F+h7vi5PBqiVvhKXR+Inw6KWXSha/bG8VTxj9qxrfkaqmUo1lNF62qnAFzny4nDdx5o7SOxDsflMdKPmf7SfDKjQe89xb7hZVPRTTnJpDeslfreXU1nslVU1UjGNETg0POAcSMhj3pZ4UdprnY7Y2O20c8BL2YVhDS1uOJ3dTnyRqMMCpZdNrrzerFBQ3KV0scdUHCYjAuyyacNcNVQ4fhM1UGTEgMvx77L4VOJyShzWCw4v/AIuykquIVENYWF/Fntl3QcN7dOOGP7KsbObU0O2dJO+jp5IZYGh0oeRk4k5DrOmqj1X+Gm/Td4Jk4DKaN1wulUahnpI6YMbBhyiCedpoMMMu1LM10sT4dZ36mjY/UKqwx72Ouw23CwHc4+9eL05kleJaOFVHlCEIXVxV+yXN8tDDI04kDA49RGRWjWU1pvojZdqKOcx80StBA7SP4SBs7cTTzyQOOTnEtB6+0JugqY5QCx2Duw5ELG6qndFKXM27ELUcRwyNzi17duQsHhP2XpvRUV5oGtibSMELo2My3NBpphj9VPlVNrqlx2Xro3E4uazTr5bVK08ylJI+hIeb2cQP4sCgWLU3s8/QOLXQhCEoVWhXTgX6Hu+Lk8GqFq6cC/Q93xcng1RK3wlLo/ET4VPK+ucNorrA05xTjI9hY0qhnRRTamuNFt/cnb26x72Ans5DUTxmHVpun5phgcGtLI39t/uE2zPorrS8TusDZIXHEtcAWuzxGP7hYO2Oxlsq9kzT2qGKk4o/jDAxmpAz01xGX8di6KerjmABIa7sJXTPVOjoakEnOF4xGvNKHQGaCVhjcRYg29y7W4XG4Oc0WcoxLG+aJ8cTHPe9paxrRiXE6ABO/BRstXWN1bcrtTy0z5KfdiY4NwLSc8esHIZZfv1K9jIbebeXc0VMWPu3gqzdrw14cxjt/uGia5rqZWllOwbOG5+qocGo31DiRwCFGShCEyHCoTyhCELq8tVxLZXFpIIccCFuW66slAjqCGSaB3UfJfk+hp9932fX+Y+a84jTez/sfNZ7JTagsVuUlRDK0Agrsv8AI42aoG+4tIbljlzgkhNk0LOKvh5Xo3DNu+cNfes71fS+z/sfNIsAj0KdzT5vQLNs0svVt6fL6lYiFt+r6X2Z+Y+aPV9L7M/MfNXuoEa0ysRXTgX6Hu+Lk8GqTer6X2Z+Y+asXBPCyHZdzIm4N4084Yk9TVErHgxqVSMIkunM6KCcInTO5/7t/wCGq9lRfbmkgk2ruL3sxcXtxO8fyNVDWNLmADummWpmxVTi7y+oWBbLoI2iGpOLRk1/Z3FbM0zjSSmOQ7pjdzXZaLI4jTez/sfNfccLImOEe80EEEB5wP1VK6i6nBwSWrdC9jnNBGyWbf8Ajqb9VniE+nRLlFQUwqoD6M4iRuHKPb70z17GxRYxjA+9W+YmGaaPp7FDcsOEccjT7yPwpshbZt9Lj92fmPmj1fS+zPzHzSsSBDzEbrEQtv1fS+zPzHzQvagXNMr/2Q==" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;We prototyped a parallel version of the Mandelbrot set demo based on this idea, and achieved a speedup of 60x on a standard desktop PC. A pretty impressive speedup for just adding a #GPU annotation in the source code, isn't it ?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3043798876461399350-6686796772698921332?l=ateji.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ateji.blogspot.com/feeds/6686796772698921332/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3043798876461399350&amp;postID=6686796772698921332' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/6686796772698921332'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/6686796772698921332'/><link rel='alternate' type='text/html' href='http://ateji.blogspot.com/2011/02/java-on-gpu-with-ateji-px.html' title='Java on GPU with Ateji PX'/><author><name>Patrick Viry</name><uri>http://www.blogger.com/profile/10442033581047493529</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_yjQMP8TlO50/SXT8zEl4a7I/AAAAAAAAANU/Adz-KJVwzlo/S220/photo.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3043798876461399350.post-4270007072973056772</id><published>2010-12-04T14:57:00.027+01:00</published><updated>2010-12-04T20:46:56.047+01:00</updated><title type='text'>Why multithreading is difficult</title><content type='html'>It is common wisdom that programming with Java threads is difficult (and even more so in other languages). But have you ever tried to figure precisely &lt;span style="font-weight:bold;"&gt;why&lt;/span&gt; this is so ?&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_yjQMP8TlO50/TPpL1Rk8LiI/AAAAAAAAAdI/isvqFu0gFDM/s1600/09-AMD.jpg"&gt;&lt;img style="border:0; float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 200px; height: 165px;" src="http://2.bp.blogspot.com/_yjQMP8TlO50/TPpL1Rk8LiI/AAAAAAAAAdI/isvqFu0gFDM/s200/09-AMD.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5546829269683678754" /&gt;&lt;/a&gt;&lt;a href="http://www.eecs.berkeley.edu/Pubs/TechRpts/2006/EECS-2006-1.pdf"&gt;The problem with threads&lt;/a&gt; (PDF) is a nicely written research report that tries to answer this question. In short, a thread is a notion that makes sense at the &lt;span style="text-decoration: underline;"&gt;hardware level&lt;/span&gt;, when you think in terms of registers and instruction pointers. But this hardware level notion should never have made its way up to the &lt;span style="text-decoration: underline;"&gt;source code level&lt;/span&gt;. Just like you wouldn't mix Java source code and assembly language instructions.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Let us try to go deeper: why exactly is the notion of thread ill-suited as a programming abstraction ? The core of the problem can be expressed in one single word: &lt;span style="font-weight:bold;"&gt;composability&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Consider for example arithmetic expressions. You can take two numbers and compose them to form an addition:&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-family:monospace;"&gt;1+2&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;The result of the addition is itself a number, so you can compose it again with yet another number:&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-family:monospace;"&gt;(1+2)+3&lt;/span&gt;   or   &lt;span style="font-family:monospace;"&gt;3+(1+2)&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;When there's no ambiguity, you can remove the parentheses altogether:&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-family:monospace;"&gt;1+2+3&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;In other words, arithmetic expressions can be composed using + as a composition operator (there are many other).&lt;br /&gt;&lt;br /&gt;The exact same process works for Java statements using sequential composition:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;span style="font-family:monospace;"&gt;{ a; b; }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:monospace;"&gt;{ a; b; }; c;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:monospace;"&gt;c; { a; b; }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:monospace;"&gt;a; b; c;&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_yjQMP8TlO50/TPpWc24FaqI/AAAAAAAAAdQ/saFPb2pWS0E/s1600/threads.jpg"&gt;&lt;img style="border:0; float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 124px; height: 87px;" src="http://1.bp.blogspot.com/_yjQMP8TlO50/TPpWc24FaqI/AAAAAAAAAdQ/saFPb2pWS0E/s200/threads.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5546840944827263650" /&gt;&lt;/a&gt;&lt;br /&gt;What about threads ? Can you take two threads and combine them in order to obtain a thread ? So that it can itself be combined with yet another thread ? No, &lt;span style="font-weight:bold;"&gt;threads do not compose&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;So why is composability important ?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Composability provides a method for building larger pieces out of smaller ones: just compose. This is how you can build large programs by building up on smaller ones. &lt;br /&gt;&lt;br /&gt;You want to make sure that the program behaves as expected ? First start by making sure that each of its pieces behaves as expected. This is what unit testing is about.&lt;br /&gt;&lt;br /&gt;Composability also provides a method for understanding what is going on: just decompose. If a divide-by-zero exception is thrown by &lt;span style="font-family:monospace;"&gt;{ a; b; }&lt;/span&gt;, then it must have been thrown either from &lt;span style="font-family:monospace;"&gt;a&lt;/span&gt; or from &lt;span style="font-family:monospace;"&gt;b&lt;/span&gt;. Decomposition is our standard and intuitive way to debug a program. &lt;br /&gt;&lt;br /&gt;Now what about a multithreaded program ? Imagine a program with two threads that throws an exception. Can you split the program in two pieces such that the exception comes from either one or the other ? No way !&lt;br /&gt;&lt;br /&gt;This is precisely why multithreading is difficult. Multithreaded programs are impossible to test and debug, and making sure that they work properly requires a thorough analysis of the whole code, including pieces you didn't even know they existed. &lt;br /&gt;&lt;br /&gt;Parallel programming itself does not need to be difficult, the problem is that mainstream programming languages do not provide a parallel composition operator as they do for sequential composition. Ateji's technological offering consists precisely in retrofitting languages with such an operator.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_yjQMP8TlO50/TPpcx2OV80I/AAAAAAAAAdY/XaMt959aUGU/s1600/chou.jpg"&gt;&lt;img style="border:0; cursor:pointer; cursor:hand;width: 116px; height: 112px;" src="http://1.bp.blogspot.com/_yjQMP8TlO50/TPpcx2OV80I/AAAAAAAAAdY/XaMt959aUGU/s200/chou.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5546847902499205954" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Let me stress this once again:&lt;/span&gt; multithreaded programming is difficult because of the lack of &lt;span style="font-weight:bold;"&gt;composability&lt;/span&gt;. Not because because of parallelism, non-determinism, or the other usual suspects. &lt;br /&gt;&lt;br /&gt;This is true of Java threads, but also of all structures built upon threads without  providing their own composition mechanism, such as tasks (the Java Executor framework) or concurrent collections (the Java concurrency framework).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3043798876461399350-4270007072973056772?l=ateji.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ateji.blogspot.com/feeds/4270007072973056772/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3043798876461399350&amp;postID=4270007072973056772' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/4270007072973056772'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/4270007072973056772'/><link rel='alternate' type='text/html' href='http://ateji.blogspot.com/2010/12/why-multithreading-is-difficult.html' title='Why multithreading is difficult'/><author><name>Patrick Viry</name><uri>http://www.blogger.com/profile/10442033581047493529</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_yjQMP8TlO50/SXT8zEl4a7I/AAAAAAAAANU/Adz-KJVwzlo/S220/photo.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_yjQMP8TlO50/TPpL1Rk8LiI/AAAAAAAAAdI/isvqFu0gFDM/s72-c/09-AMD.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3043798876461399350.post-1346672052774987485</id><published>2010-11-27T17:09:00.028+01:00</published><updated>2010-11-28T19:54:46.227+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ateji px'/><title type='text'>Back from SuperComputing 2010</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_yjQMP8TlO50/TPEydJ9FvTI/AAAAAAAAAcM/9b2xISBLwLA/s1600/nola%2Bskyline%2B%2B%255B1600%255D.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 640px; height: 180px;" src="http://1.bp.blogspot.com/_yjQMP8TlO50/TPEydJ9FvTI/AAAAAAAAAcM/9b2xISBLwLA/s320/nola%2Bskyline%2B%2B%255B1600%255D.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5544268092739534130" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;The New Orleans skyline from Garden District&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This view from the hotel at 6am was about the only time we had a chance to see the sun. SC10 has been a very busy week for the Ateji team, with a lot of business meetings (all the big guys where there) and a wealth of visitors to our booth.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_yjQMP8TlO50/TPKVGKIMuJI/AAAAAAAAAck/56dSuDndoA0/s1600/2010-11-16%2B13.52.53.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 240px;" src="http://1.bp.blogspot.com/_yjQMP8TlO50/TPKVGKIMuJI/AAAAAAAAAck/56dSuDndoA0/s320/2010-11-16%2B13.52.53.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5544658024276998290" /&gt;&lt;/a&gt;From left to right: Claude, Maxence and Patrick on the Ateji booth. Most visitors were curious about this new approach to do parallel programming and spent a long time chatting and asking questions. We even had a handful of teachers interested in using Ateji PX as a tool for teaching parallel programming, as it provides a general and intuitive model of parallelism on top of Java.&lt;br /&gt;&lt;br /&gt;&lt;table&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;&lt;br /&gt;Ateji was part of the &lt;a href="http://sc10.supercomputing.org/?pg=disrupttech.html"&gt;Disruptive Technologies&lt;/a&gt; exhibit. You get there after submitting your technology and vision and being selected by a panel of experts of the program committee. And yes, we got a free booth! Many thanks to John and Elizabeth for making this exhibit a success.&lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;td&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_yjQMP8TlO50/TPKX5-q8iII/AAAAAAAAAc8/CjoJZ3O7wjA/s1600/2010-11-17%2B09.28.34-a.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 320px; height: 274px;" src="http://4.bp.blogspot.com/_yjQMP8TlO50/TPKX5-q8iII/AAAAAAAAAc8/CjoJZ3O7wjA/s320/2010-11-17%2B09.28.34-a.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5544661113577965698" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;Parallel lines named Desire&lt;/span&gt;&lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Being recognized as a disruptive technology means that Ateji PX has the potential to deeply change the landscape of HPC and parallel programming in the coming years. We all hope for its success as an industry standard. The focus on disruptive technologies was emphasized by having Clayton Christensen, the author of "The Innovator's Dilemma" and "The Innovator's Solution", as &lt;a href="http://sc10.supercomputing.org/?pg=keynote.html"&gt;keynote speaker&lt;/a&gt;. Clayton, if you happen to read this, I'd be happy to have a chat with you.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_yjQMP8TlO50/TPExYJXeBnI/AAAAAAAAAcE/HV6wi1km-g0/s1600/keys.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 288px;" src="http://2.bp.blogspot.com/_yjQMP8TlO50/TPExYJXeBnI/AAAAAAAAAcE/HV6wi1km-g0/s320/keys.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5544266907170768498" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;We handed out these cute USB keys labeled Ateji - unlock Java performance, that contain whitepapers, documentation and an evaluation version of the software. They had a lot of success on the SC10 booth, but also with the TSA: I carried a few hundreds of them in my suitcase, it was opened and inspected &lt;span style="font-style:italic;"&gt;every single time&lt;/span&gt; we boarded a plane! I now have a collection of these &lt;a href="http://upload.wikimedia.org/wikipedia/commons/a/ad/Tsa_notice_of_baggage_inspection.jpg"&gt;flyers&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3043798876461399350-1346672052774987485?l=ateji.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ateji.blogspot.com/feeds/1346672052774987485/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3043798876461399350&amp;postID=1346672052774987485' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/1346672052774987485'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/1346672052774987485'/><link rel='alternate' type='text/html' href='http://ateji.blogspot.com/2010/11/back-from-supercomputing-2010.html' title='Back from SuperComputing 2010'/><author><name>Patrick Viry</name><uri>http://www.blogger.com/profile/10442033581047493529</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_yjQMP8TlO50/SXT8zEl4a7I/AAAAAAAAANU/Adz-KJVwzlo/S220/photo.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_yjQMP8TlO50/TPEydJ9FvTI/AAAAAAAAAcM/9b2xISBLwLA/s72-c/nola%2Bskyline%2B%2B%255B1600%255D.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3043798876461399350.post-5627506591277134250</id><published>2010-09-03T18:19:00.030+02:00</published><updated>2010-11-27T15:45:40.749+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ateji px'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='parallelism'/><title type='text'>Java for HPC (High-Performance Computing)</title><content type='html'>When presenting &lt;a href="http://www.ateji.com/px"&gt;Ateji PX&lt;/a&gt; to an audience with HPC or simulation background, I often hear definitive opinions of the kind "We'll never consider Java, it's too slow". &lt;br /&gt;&lt;br /&gt;This appears to be more a cultural bias than an objective statement referring to actual benchmarks. To better understand the state of Java for high-performance computing, let us browse through three recent publications:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.spscicomp.org/ScicomP15/slides/astro/torra.pdf"&gt;High-performance computing in Java: the data processing of Gaia&lt;/a&gt;, by Luri &amp; Torra, presented at SciComp XXL, May 2009 [1]&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.des.udc.es/~gltaboada/papers/taboada_pppj09_slides.pdf"&gt;Java for High Performance Computing: Assessment of Current Research and Practice&lt;/a&gt;, by Taboada et.al., presented at PPPJ’09 [2]&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://proactive.inria.fr/userfiles/file/papers/ProActiveJavaStatusforHPC.pdf"&gt;Current State of Java for HPC&lt;/a&gt;, by Amedro et.al., Inria Research Report N° 0353, August 2008 [3]&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Java is used happily for huge HPC projects&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;At the European Space Agency, Java has been chosen for large CPU and data handling needs in the order of 10^21 flops and 10^15 bytes. That's a lot of zeroes, there is no doubt here we're talking here about high-performance computing. &lt;br /&gt;&lt;blockquote&gt;"We are happy with the decision made and haven’t (yet) faced any major drawback due to the choice of language" [1].&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;"HPC developers and users usually want to use Java in their projects" [2]. Indeed, Java has many advantages over traditional HPC languages:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;faster development&lt;/li&gt;&lt;br /&gt;&lt;li&gt;higher code reliability&lt;/li&gt;&lt;br /&gt;&lt;li&gt;portability&lt;/li&gt;&lt;br /&gt;&lt;li&gt;adaptative run-time optimization&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;There is also a lesser known but very interesting side-effect. Since the language is cleaner, it is easier for developers to concentrate on performance optimization (rather than, say, chasing memory-allocation bugs):&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;"In Mare Nostrum the Java version runs about four times &lt;span style="font-weight:bold;"&gt;faster&lt;/span&gt; than the C version [...]. Obviously, an optimisation of the C code should make it much more efficient, to at least the level of the Java code. However, this shows how the same developer did a quicker and better job in Java (a language that, unlike C, he was unfamiliar with)" [1].&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Java code is no longer slow [2].&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;All benchmarks show that Java is not any slower than C++. This was the case ten years ago, and the deceptive results of the JavaGrande initiative for promoting Java for HPC gave it a bad reputation. But recent JVMs (Java Virtual Machines) do an impressive job of aggressive runtime optimization, adapting to the specific hardware it is running on and dynamically optimizing critical code fragments.&lt;br /&gt;&lt;br /&gt;However, performance varies greatly, depending on the JVM used (version and vendor) and the kind of computation performed [1]. One lesson to be remembered is that you should always test and benchmark your application with several recent JVMs from different vendors, as well as different command line arguments (compare -client and -server).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Obviously, there are some caveats.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;There are still performance penalties in Java communications: pure Java libraries are not well suited for HPC ("the speed and scalability of the Java ProActive implementation are, as of today still lower than MPI" [3]), and wrapping native libraries with JNI is slow.&lt;br /&gt;&lt;br /&gt;The situation is improving recently with projects such as &lt;a href="http://www.des.udc.es/~juan/papers/comcom.pdf"&gt;Java Fast Sockets&lt;/a&gt;, &lt;a href="http://www.springerlink.com/index/502370v652212273.pdf"&gt;Fast-MPJ&lt;/a&gt;, &lt;a href="http://acet.rdg.ac.uk/projects/mpj/"&gt;MPJ Express&lt;/a&gt;, that aim at providing fast message-passing without JNI overhead.&lt;br /&gt;&lt;br /&gt;HPC users also lack the quality and sophistication of those available in C or Fortran (but this seems to be improving). Obviously, this is a matter of having a large enough community, and the critical mass seems to have been reached.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;The decision process&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I cannot resist citing the whole part about the decision process that took place at ESA:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;FORTRAN was somewhat favoured by the scientific community but was quickly discarded; the type of system to develop would have been unmaintainable, and even not feasible in some cases. For this purpose the choice of an object-oriented approach was deemed advisable. The choice was narrowed to C++ and Java.&lt;br /&gt;&lt;br /&gt;The C++ versus Java debate lasted longer. “Orthodox” thinking stated that C++ should be used for High Performance Computing for performance reasons. “Heterodox” thinking suggested that the disadvantage of Java in performance was outweighted by faster development and higher code reliability.&lt;br /&gt;&lt;br /&gt;However, when JIT Java VMs were released we did some benchmarks to compare C++ vs Java performances (linear algebra, FFTs, etc.) . The results showed that the Java performance had become quite reasonable, even comparable to C++ code (and likely to improve!). Additionally, Java offered 100% portability and I/O was likely to be the main limiting factor rather than raw computation performance.&lt;br /&gt;&lt;br /&gt;Java was finally chosen as the development language for DPAC. Since then hundreds of thousands of code lines have been written for the reduction system. We are happy with the decision made and haven’t (yet) faced any major drawback due to the choice of language.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;And now comes Ateji PX&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So there's a growing consensus about using Java for HPC applications, in industries such as space, particle physics, bioinformatics, finance. &lt;br /&gt;&lt;br /&gt;However, Java does not make parallel programming easy. It relies on libraries providing explicit threads (a concepts very ill-suited as a programming abstraction, see &lt;a href="http://www.eecs.berkeley.edu/Pubs/TechRpts/2006/EECS-2006-1.pdf"&gt;"The Problem with Threads"&lt;/a&gt;) or relying on Runnable-like interfaces for distributed programming, leaving all the splitting and interfacing work to the programmer.&lt;br /&gt;&lt;br /&gt;What we've tried to provide with Ateji PX is a simple and easy way to do parallel high-performance computing in Java. Basically, the only thing you need to learn is the parallel bar '||'. Here is the parallel 'Hello World' in Ateji PX:&lt;br /&gt;&lt;div style='font-family:monospace; border: 2px solid #e5e5e5; padding: 5px 5px 5px 5px; text-align: left; color:black; background-color: #f9ffe5; '&gt;&lt;br /&gt;[&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;||&amp;nbsp;System.out.println("Hello");&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;||&amp;nbsp;System.out.println("World");&lt;br/&gt;&lt;br /&gt;]&lt;br/&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;This code contains two parallel branches, introduced by the '||' symbol. It will print either &lt;br /&gt;Hello&lt;br /&gt;World&lt;br /&gt;or&lt;br /&gt;World&lt;br /&gt;Hello&lt;br /&gt;depending on which branch gets scheduled first.&lt;br /&gt;&lt;br /&gt;Data parallelism is obtained by quantifiying parallel branches. For instance, the code below increments all N elements of array in parallel:&lt;br /&gt;&lt;div style='font-family:monospace; border: 2px solid #e5e5e5; padding: 5px 5px 5px 5px; text-align: left; color:black; background-color: #f9ffe5; '&gt;&lt;br /&gt;[&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;||&amp;nbsp;(&lt;span style="font-weight:bold; color: #b00000;"&gt;int&lt;/span&gt;&amp;nbsp;i:&amp;nbsp;n)&amp;nbsp;array[i]++;&lt;br/&gt;&lt;br /&gt;]&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Communication is also part of language, and is mapped by the compiler to any available communication library, such as sockets or MPI, or via shared memory when possible. Here are two communicating branches, the first one sends a value on a channel, the second one reads the value and prints it:&lt;br /&gt;&lt;div style='font-family:monospace; border: 2px solid #e5e5e5; padding: 5px 5px 5px 5px; text-align: left; color:black; background-color: #f9ffe5; '&gt;&lt;br /&gt;Chan&lt;Integer&gt;&amp;nbsp;c&amp;nbsp;=&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;new&lt;/span&gt;&amp;nbsp;Chan&lt;Integer&gt;();&lt;br/&gt;&lt;br /&gt;[&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;||&amp;nbsp;c&amp;nbsp;!&amp;nbsp;123;&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;||&amp;nbsp;c&amp;nbsp;?&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;int&lt;/span&gt;&amp;nbsp;value;&amp;nbsp;System.out.println(value);&lt;br/&gt;&lt;br /&gt;]&lt;br/&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;There much more, have a look at the &lt;a href="http://www.ateji.com/px/whitepapers/Ateji%20PX%20for%20Java%20v1.0.pdf"&gt;Ateji PX whitepaper&lt;/a&gt; for a detailed survey.&lt;br /&gt;&lt;br /&gt;Ateji PX has proven to be efficient, demonstrating a &lt;a href="http://www.ateji.com/px/whitepapers/Ateji%20PX%20MatMult%20Whitepaper%20v1.2.pdf"&gt;12.5x speedup on a 16-core server with a single '||'&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;It has also proven to be easy to learn and use. We ran a 12-month beta testing program that demonstrated that most Java developers, given the Ateji PX documentation can write, compile and run their first parallel program within a couple of hours.&lt;br /&gt;&lt;br /&gt;An interesting aspect is that the source code does not depend on the actual hardware architecture being used, be it shared-memory, cluster, grid, cloud or GPU accelerator. It is the compiler that performs the boring task of mapping syntactic constructs to specific architectures and libraries.&lt;br /&gt;&lt;br /&gt;A free evaluation version is available for download &lt;a href="http://www.ateji.com/px/30-day-free-trial.html"&gt;here&lt;/a&gt;. Have fun!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3043798876461399350-5627506591277134250?l=ateji.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ateji.blogspot.com/feeds/5627506591277134250/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3043798876461399350&amp;postID=5627506591277134250' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/5627506591277134250'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/5627506591277134250'/><link rel='alternate' type='text/html' href='http://ateji.blogspot.com/2010/09/java-for-high-performance-computing.html' title='Java for HPC (High-Performance Computing)'/><author><name>Patrick Viry</name><uri>http://www.blogger.com/profile/10442033581047493529</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_yjQMP8TlO50/SXT8zEl4a7I/AAAAAAAAANU/Adz-KJVwzlo/S220/photo.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3043798876461399350.post-8867544644003842426</id><published>2010-08-30T17:01:00.004+02:00</published><updated>2010-08-30T17:15:44.876+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ateji px'/><title type='text'>Disruptive Technology at SC'10</title><content type='html'>Ateji PX has been selected for presentation at the &lt;a href="http://sc10.supercomputing.org/?pg=disrupttech.html"&gt;Disrupted Technologies&lt;/a&gt; exhibit part of the SuperComputing 2010 conference. &lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_yjQMP8TlO50/THvJUo-WlgI/AAAAAAAAAbA/xFW6BYR72qQ/s1600/Sans+titre.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 104px; height: 130px;" src="http://2.bp.blogspot.com/_yjQMP8TlO50/THvJUo-WlgI/AAAAAAAAAbA/xFW6BYR72qQ/s320/Sans+titre.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5511219925451445762" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;"Each year, the SC Conference seeks out new technologies with the potential to disrupt the HPC landscape as we know it. Generally speaking, “disruptive technology” refers to drastic innovations in current practices such that they have the potential to completely transform the high-performance computing field as it currently exists — ultimately overtaking the incumbent technologies or software tools in the marketplace. For SC10, Disruptive Technologies examines new computing architectures and interfaces that will significantly impact the high-performance computing field throughout the next five to 15 years, but have not yet emerged in current systems. The Disruptive Technologies exhibits, located in the SC10 exhibit hall, will showcase technologies ranging from storage, programming, cooling and productivity software through presentations, demonstrations and an exhibit showcase.&lt;br /&gt;&lt;br /&gt;Selected technologies for SC10 will be on display during regular exhibit hall hours. Please stop by the booth for more information on the presentations and demonstrations schedule."&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;See you in New Orleans, November 13-19.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3043798876461399350-8867544644003842426?l=ateji.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ateji.blogspot.com/feeds/8867544644003842426/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3043798876461399350&amp;postID=8867544644003842426' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/8867544644003842426'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/8867544644003842426'/><link rel='alternate' type='text/html' href='http://ateji.blogspot.com/2010/08/disruptive-technology-at-sc10.html' title='Disruptive Technology at SC&apos;10'/><author><name>Patrick Viry</name><uri>http://www.blogger.com/profile/10442033581047493529</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_yjQMP8TlO50/SXT8zEl4a7I/AAAAAAAAANU/Adz-KJVwzlo/S220/photo.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_yjQMP8TlO50/THvJUo-WlgI/AAAAAAAAAbA/xFW6BYR72qQ/s72-c/Sans+titre.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3043798876461399350.post-6433606464387000214</id><published>2010-08-15T17:22:00.016+02:00</published><updated>2010-08-15T18:08:07.278+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ateji px'/><category scheme='http://www.blogger.com/atom/ns#' term='parallelism'/><title type='text'>Explaining parallelism to my mother with the Mandelbrot demo</title><content type='html'>We have put online an Ateji PX version of the &lt;a href="http://www.ateji.com/px/demo.html"&gt;Mandelbrot set demo&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;You specify the number of processor cores to be used for the computation using a slider (lower right), ranging from 1 to the number of available cores on your computer. My mom's PC has two cores:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_yjQMP8TlO50/TGgJei1CWrI/AAAAAAAAAaY/Z776oQldh5E/s1600/md3.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 200px; height: 71px;" src="http://3.bp.blogspot.com/_yjQMP8TlO50/TGgJei1CWrI/AAAAAAAAAaY/Z776oQldh5E/s200/md3.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5505660964810414770" /&gt;&lt;/a&gt;&lt;br /&gt;Look 'ma, when the slider is on 1, you see only one guy painting. When the slider is on 2, you see two guys painting at the same time:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_yjQMP8TlO50/TGgKoXv72UI/AAAAAAAAAag/dK-p1QPgqUg/s1600/md4.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 200px; height: 89px;" src="http://3.bp.blogspot.com/_yjQMP8TlO50/TGgKoXv72UI/AAAAAAAAAag/dK-p1QPgqUg/s200/md4.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5505662233146546498" /&gt;&lt;/a&gt;&lt;br /&gt;Now 'ma is finally able to proudly explain what her son is busy at. We're actually using the same demo with CTO's and high-ranking managers in large corporations.&lt;br /&gt;&lt;br /&gt;For us developers, here's the code. Since dots are independent of each other, we use a simple for loop:&lt;br /&gt;&lt;br /&gt;&lt;div style='font-family:monospace; border: 2px solid #e5e5e5; padding: 5px 5px 5px 5px; text-align: left; color:black; background-color: #f9ffe5; '&gt;&lt;br /&gt;for&amp;nbsp;(&lt;span style="font-weight:bold; color: #b00000;"&gt;int&lt;/span&gt;&amp;nbsp;x:nx,&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;int&lt;/span&gt;&amp;nbsp;y:ny)&lt;span style="font-weight:bold;"&gt;{&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;compute(&amp;nbsp;x&amp;nbsp;,&amp;nbsp;y&amp;nbsp;);&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;You can see the code used in the demo under the "Source Code" tab. Parallelizing the for loop is simply a matter of inserting parallel bars right after the for keyword:&lt;br /&gt;&lt;br /&gt;&lt;div style='font-family:monospace; border: 2px solid #e5e5e5; padding: 5px 5px 5px 5px; text-align: left; color:black; background-color: #f9ffe5; '&gt;&lt;br /&gt;for&amp;nbsp;||(&lt;span style="font-weight:bold; color: #b00000;"&gt;int&lt;/span&gt;&amp;nbsp;x:nx,&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;int&lt;/span&gt;&amp;nbsp;y:ny)&lt;span style="font-weight:bold;"&gt;{&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;compute(&amp;nbsp;x&amp;nbsp;,&amp;nbsp;y&amp;nbsp;);&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;The demo also shows some advanced features of loop splitting. By default, the work is split in blocks in order to get one block per processors. However, you can see on the Mandelbrot demo that some blocks take more time to compute than others (blacks dots take more time). The result is that although the work has been split in parallel across a number of workers, we end up waiting for the one worker who has the more black dots. This is not the most efficient way of leveraging parallel hardware.&lt;br /&gt;&lt;br /&gt;In such cases, the solution consists in splitting work in smaller blocks. You can play with block splitting in the "Advanced Settings" area (lower left). The effect on the source code is to insert the corresponding #BlockSize annotation:&lt;br /&gt;&lt;br /&gt;&lt;div style='font-family:monospace; border: 2px solid #e5e5e5; padding: 5px 5px 5px 5px; text-align: left; color:black; background-color: #f9ffe5; '&gt;&lt;br /&gt;for&amp;nbsp;||(#BlockSize(30),&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;int&lt;/span&gt;&amp;nbsp;x:nx,&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;int&lt;/span&gt;&amp;nbsp;y:ny)&lt;span style="font-weight:bold;"&gt;{&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;compute(&amp;nbsp;x&amp;nbsp;,&amp;nbsp;y&amp;nbsp;);&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;You can learn more about Ateji PX loop splitting in the language manual, downloadable from &lt;a href="http://www.ateji.com/px/index.html"&gt;Ateji's web site&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3043798876461399350-6433606464387000214?l=ateji.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ateji.blogspot.com/feeds/6433606464387000214/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3043798876461399350&amp;postID=6433606464387000214' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/6433606464387000214'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/6433606464387000214'/><link rel='alternate' type='text/html' href='http://ateji.blogspot.com/2010/08/explaining-parallelism-to-my-mother.html' title='Explaining parallelism to my mother with the Mandelbrot demo'/><author><name>Patrick Viry</name><uri>http://www.blogger.com/profile/10442033581047493529</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_yjQMP8TlO50/SXT8zEl4a7I/AAAAAAAAANU/Adz-KJVwzlo/S220/photo.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_yjQMP8TlO50/TGgJei1CWrI/AAAAAAAAAaY/Z776oQldh5E/s72-c/md3.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3043798876461399350.post-6944028304443193046</id><published>2010-07-30T11:29:00.023+02:00</published><updated>2010-08-01T17:32:38.845+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ateji px'/><category scheme='http://www.blogger.com/atom/ns#' term='parallelism'/><title type='text'>Integrating π (pi) in parallel</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_yjQMP8TlO50/TFKd4D_QodI/AAAAAAAAAaI/u4sjZRpdAIg/s1600/200px-Circle_Area.svg.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 200px; height: 200px;" src="http://1.bp.blogspot.com/_yjQMP8TlO50/TFKd4D_QodI/AAAAAAAAAaI/u4sjZRpdAIg/s200/200px-Circle_Area.svg.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5499631681441669586" /&gt;&lt;/a&gt;A simple way of computing the constant &lt;a href="http://en.wikipedia.org/wiki/Pi"&gt;π (pi)&lt;/a&gt; consists in measuring the surface under a curve. In more algebraic terms, this amounts to integrating y = 4/(1+x*x) between 0 and 1, and in programming terms this means incrementing x in small steps and summing the corresponding y (the smaller the steps, the more accurate the result).&lt;br /&gt;&lt;br /&gt;Tim Mattson in his blog entry &lt;a href="http://software.intel.com/en-us/articles/writing-parallel-programs-a-multi-language-tutorial-introduction/"&gt;"Writing Parallel Programs: a multi-language tutorial introduction"&lt;/a&gt; explores available tools for coding this algorithm in parallel, namely &lt;a href="http://en.wikipedia.org/wiki/Openmp"&gt;OpenMP&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/Message_Passing_Interface"&gt;MPI&lt;/a&gt; and &lt;a href="http://download.oracle.com/javase/tutorial/essential/concurrency/threads.html"&gt;Java threads&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Here we will stick to the Java universe, and compare Java sequential and multi-threaded code with their &lt;a href="http://www.ateji.com/px"&gt;Ateji PX&lt;/a&gt; equivalent. Impatient readers may readily jump to the Ateji PX version at the end of the article.&lt;br /&gt;&lt;br /&gt;The sequential Java code, inspired from Tim's sequential C version, is as follows:&lt;br /&gt;&lt;br /&gt;&lt;div style='font-family:monospace; border: 2px solid #e5e5e5; padding: 5px 5px 5px 5px; text-align: left; color:black; background-color: #ffffff; '&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;static&lt;/span&gt;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;final&lt;/span&gt;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;int&lt;/span&gt;&amp;nbsp;numSteps&amp;nbsp;=&amp;nbsp;100000;&amp;nbsp;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;static&lt;/span&gt;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;final&lt;/span&gt;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;double&lt;/span&gt;&amp;nbsp;step&amp;nbsp;=&amp;nbsp;1.0/numSteps;&amp;nbsp;;&amp;nbsp;&lt;br /&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;static&lt;/span&gt;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;void&lt;/span&gt;&amp;nbsp;main(String[]&amp;nbsp;args)&amp;nbsp;&lt;span style="font-weight:bold;"&gt;{&lt;/span&gt;&lt;br /&gt;  &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;double&lt;/span&gt;&amp;nbsp;sum&amp;nbsp;=&amp;nbsp;0.0;&amp;nbsp;&lt;br /&gt;  &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;for&lt;/span&gt;(int&amp;nbsp;i=0;&amp;nbsp;i&lt;=&amp;nbsp;numSteps;&amp;nbsp;i++)&amp;nbsp;&lt;span style="font-weight:bold;"&gt;{&lt;/span&gt;&amp;nbsp;&lt;br /&gt;   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;double&lt;/span&gt;&amp;nbsp;x&amp;nbsp;=&amp;nbsp;(i+0.5)*step;&amp;nbsp;&lt;br /&gt;   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sum&amp;nbsp;=&amp;nbsp;sum&amp;nbsp;+&amp;nbsp;4.0/(1.0+x*x);&amp;nbsp;&lt;br /&gt;  &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold;"&gt;}&lt;/span&gt;&amp;nbsp;&lt;br /&gt;  &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;double&lt;/span&gt;&amp;nbsp;pi&amp;nbsp;=&amp;nbsp;step&amp;nbsp;*&amp;nbsp;sum;&lt;br /&gt;  &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;System.out.println(pi);&lt;br /&gt;  &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;System.out.println(Math.PI);&amp;nbsp;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Try to play with the value of numSteps and see the effect on precision.&lt;br /&gt;&lt;br /&gt;Tim parallelizes this code using threads as follows (slightly edited to make it look more Java-ish) :&lt;br /&gt;&lt;br /&gt;&lt;div style='font-family:monospace; border: 2px solid #e5e5e5; padding: 5px 5px 5px 5px; text-align: left; color:black; background-color: #ffffff; '&gt;&lt;br /&gt; &lt;span style="font-weight:bold; color: #b00000;"&gt;static&lt;/span&gt;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;int&lt;/span&gt;&amp;nbsp;nProcs&amp;nbsp;=&amp;nbsp;Runtime.getRuntime().availableProcessors();&amp;nbsp;&lt;br /&gt;&lt;br /&gt; &lt;span style="font-weight:bold; color: #b00000;"&gt;static&lt;/span&gt;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;class&lt;/span&gt;&amp;nbsp;PIThread&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;extends&lt;/span&gt;&amp;nbsp;Thread&amp;nbsp;&lt;br /&gt; &lt;span style="font-weight:bold;"&gt;{&lt;/span&gt;&amp;nbsp;&lt;br /&gt;  &amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;final&lt;/span&gt;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;int&lt;/span&gt;&amp;nbsp;partNumber;&amp;nbsp;&lt;br /&gt;  &amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;double&lt;/span&gt;&amp;nbsp;sum&amp;nbsp;=&amp;nbsp;0.0;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;  &amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;public&lt;/span&gt;&amp;nbsp;PIThread(&lt;span style="font-weight:bold; color: #b00000;"&gt;int&lt;/span&gt;&amp;nbsp;partNumber)&amp;nbsp;&lt;span style="font-weight:bold;"&gt;{&lt;/span&gt;&amp;nbsp;&lt;br /&gt;   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;this&lt;/span&gt;.partNumber&amp;nbsp;=&amp;nbsp;partNumber;&amp;nbsp;&lt;br /&gt;  &amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold;"&gt;}&lt;/span&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;  &amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;void&lt;/span&gt;&amp;nbsp;run()&amp;nbsp;&lt;span style="font-weight:bold;"&gt;{&lt;/span&gt;&amp;nbsp;&lt;br /&gt;   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;for&lt;/span&gt;&amp;nbsp;(&lt;span style="font-weight:bold; color: #b00000;"&gt;int&lt;/span&gt;&amp;nbsp;i&amp;nbsp;=&amp;nbsp;partNumber;&amp;nbsp;i&amp;nbsp;&lt;&amp;nbsp;numSteps;&amp;nbsp;i&amp;nbsp;+=&amp;nbsp;nProcs)&amp;nbsp;&lt;span style="font-weight:bold;"&gt;{&lt;/span&gt;&amp;nbsp;&lt;br /&gt;    &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;double&lt;/span&gt;&amp;nbsp;x&amp;nbsp;=&amp;nbsp;(i&amp;nbsp;+&amp;nbsp;0.5)&amp;nbsp;*&amp;nbsp;step;&amp;nbsp;&lt;br /&gt;    &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sum&amp;nbsp;+=&amp;nbsp;4.0&amp;nbsp;/&amp;nbsp;(1.0&amp;nbsp;+&amp;nbsp;x&amp;nbsp;*&amp;nbsp;x);&amp;nbsp;&lt;br /&gt;   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold;"&gt;}&lt;/span&gt;&amp;nbsp;&lt;br /&gt;  &amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold;"&gt;}&lt;/span&gt;&amp;nbsp;&lt;br /&gt; &lt;span style="font-weight:bold;"&gt;}&lt;/span&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt; &lt;span style="font-weight:bold; color: #b00000;"&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;static&lt;/span&gt;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;void&lt;/span&gt;&amp;nbsp;main(String[]&amp;nbsp;args)&amp;nbsp;&lt;span style="font-weight:bold;"&gt;{&lt;/span&gt;&amp;nbsp;&lt;br /&gt;  &amp;nbsp;&amp;nbsp;PIThread[]&amp;nbsp;part_sums&amp;nbsp;=&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;new&lt;/span&gt;&amp;nbsp;PIThread[nProcs];&amp;nbsp;&lt;br /&gt;  &amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;for&lt;/span&gt;(int&amp;nbsp;i&amp;nbsp;=&amp;nbsp;0;&amp;nbsp;i&amp;nbsp;&lt;&amp;nbsp;nProcs;&amp;nbsp;i++)&amp;nbsp;&lt;span style="font-weight:bold;"&gt;{&lt;/span&gt;&amp;nbsp;&lt;br /&gt;   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;(part_sums[i]&amp;nbsp;=&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;new&lt;/span&gt;&amp;nbsp;PIThread(i)).start();&amp;nbsp;&lt;br /&gt;  &amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold;"&gt;}&lt;/span&gt;&amp;nbsp;&lt;br /&gt;  &amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;double&lt;/span&gt;&amp;nbsp;sum&amp;nbsp;=&amp;nbsp;0.0;&amp;nbsp;&lt;br /&gt;  &amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;for&lt;/span&gt;(int&amp;nbsp;i&amp;nbsp;=&amp;nbsp;0;&amp;nbsp;i&amp;nbsp;&lt;&amp;nbsp;nProcs;&amp;nbsp;i++)&amp;nbsp;&lt;span style="font-weight:bold;"&gt;{&lt;/span&gt;&amp;nbsp;&lt;br /&gt;   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;try&lt;/span&gt;&amp;nbsp;&lt;span style="font-weight:bold;"&gt;{&lt;/span&gt;&amp;nbsp;&lt;br /&gt;    &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;part_sums[i].join();&amp;nbsp;&lt;br /&gt;   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold;"&gt;}&lt;/span&gt;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;catch&lt;/span&gt;&amp;nbsp;(InterruptedException&amp;nbsp;e)&amp;nbsp;&lt;span style="font-weight:bold;"&gt;{&lt;/span&gt;&lt;br /&gt;   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold;"&gt;}&lt;/span&gt;&amp;nbsp;&lt;br /&gt;   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sum&amp;nbsp;+=&amp;nbsp;part_sums[i].sum;&amp;nbsp;&lt;br /&gt;  &amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold;"&gt;}&lt;/span&gt;&amp;nbsp;&lt;br /&gt;  &amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;double&lt;/span&gt;&amp;nbsp;pi&amp;nbsp;=&amp;nbsp;step&amp;nbsp;*&amp;nbsp;sum;&amp;nbsp;&lt;br /&gt;  &amp;nbsp;&amp;nbsp;System.out.println(pi);&amp;nbsp;&lt;br /&gt; &lt;span style="font-weight:bold;"&gt;}&lt;/span&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Pretty verbose, isn't it ? The core of the algorithm becomes hidden behind a lot of irrelevant details. &lt;br /&gt;&lt;br /&gt;Being verbose also means that it becomes just too easy to overlook potential problems. In this code, the handling of InterruptedException is wrong and may lead to very nasty bugs when put in the context of a larger application. Not to blame Tim: honestly, who understands the precise meaning and usage rules of InterruptedException ?&lt;br /&gt;&lt;br /&gt;In contrast, let us code the integration of π using Ateji PX, an extension of Java. First of all, the mathematical expression used in the integration is a typical example of a &lt;a href="http://en.wikipedia.org/wiki/List_comprehension"&gt;comprehension&lt;/a&gt;, for which Ateji PX provides an intuitive syntax. Here is the sequential code:&lt;br /&gt;&lt;br /&gt;&lt;div style='font-family:monospace; border: 2px solid #e5e5e5; padding: 5px 5px 5px 5px; text-align: left; color:black; background-color: #f9ffe5; '&gt;&lt;br /&gt; &lt;span style="font-weight:bold; color: #b00000;"&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;static&lt;/span&gt;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;void&lt;/span&gt;&amp;nbsp;main(String[]&amp;nbsp;args)&amp;nbsp;&lt;span style="font-weight:bold;"&gt;{&lt;/span&gt;&lt;br /&gt;  &amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;double&lt;/span&gt;&amp;nbsp;sum&amp;nbsp;=&amp;nbsp;`+&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;for&lt;/span&gt;&lt;span style="font-weight:bold;"&gt;{&lt;/span&gt;&amp;nbsp;4.0/(1.0+x*x)&amp;nbsp;|&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;int&lt;/span&gt;&amp;nbsp;i&amp;nbsp;:&amp;nbsp;numSteps,&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;double&lt;/span&gt;&amp;nbsp;x&amp;nbsp;=&amp;nbsp;(i+0.5)*step&amp;nbsp;&lt;span style="font-weight:bold;"&gt;}&lt;/span&gt;;&amp;nbsp;&lt;br /&gt;  &amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;double&lt;/span&gt;&amp;nbsp;pi&amp;nbsp;=&amp;nbsp;step&amp;nbsp;*&amp;nbsp;sum;&lt;br /&gt;  &amp;nbsp;&amp;nbsp;System.out.println(pi);&lt;br /&gt; &lt;span style="font-weight:bold;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The second line, computing sum, is very close to the standard big-sigma notation in mathematics. Having this notation available as an extension of Java makes the expression of many mathematical formulas concise and intuitive, almost like what you've learned in high school. &lt;br /&gt;&lt;br /&gt;It also makes the code closer to the programmer's intent. In the first sequential version, using a for loop, it takes some thinking before realizing that the code is actually computing a sum. This has a strong impact on code readability and maintenance.&lt;br /&gt;&lt;br /&gt;But what's really interesting is how this code can be parallelized. Simply add a parallel bar ("||") right after the for keyword, and Ateji PX will perform the computation in parallel using all available cores.&lt;br /&gt;&lt;br /&gt;&lt;div style='font-family:monospace; border: 2px solid #e5e5e5; padding: 5px 5px 5px 5px; text-align: left; color:black; background-color: #f9ffe5; '&gt;&lt;br /&gt; &lt;span style="font-weight:bold; color: #b00000;"&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;static&lt;/span&gt;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;void&lt;/span&gt;&amp;nbsp;main(String[]&amp;nbsp;args)&amp;nbsp;&lt;span style="font-weight:bold;"&gt;{&lt;/span&gt;&lt;br /&gt;  &amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;double&lt;/span&gt;&amp;nbsp;sum&amp;nbsp;=&amp;nbsp;`+&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;for&lt;/span&gt;||&lt;span style="font-weight:bold;"&gt;{&lt;/span&gt;&amp;nbsp;4.0/(1.0+x*x)&amp;nbsp;|&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;int&lt;/span&gt;&amp;nbsp;i&amp;nbsp;:&amp;nbsp;numSteps,&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;double&lt;/span&gt;&amp;nbsp;x&amp;nbsp;=&amp;nbsp;(i+0.5)*step&amp;nbsp;&lt;span style="font-weight:bold;"&gt;}&lt;/span&gt;;&amp;nbsp;&lt;br /&gt;  &amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;double&lt;/span&gt;&amp;nbsp;pi&amp;nbsp;=&amp;nbsp;step&amp;nbsp;*&amp;nbsp;sum;&lt;br /&gt;  &amp;nbsp;&amp;nbsp;System.out.println(pi);&lt;br /&gt; &lt;span style="font-weight:bold;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;In the OpenMP community, this is called a parallel reduction. Compare this code to the OpenMP version and the multi-threaded version.&lt;br /&gt;&lt;br /&gt;Comprehension expressions in Ateji PX are not limited to summation. They can express aggregate operations such as product, logical or, count and average, but also bulk data manipulation such as SQL-like queries and list or set comprehensions (the set of all ... such that ...), and even operate on user-defined operations.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3043798876461399350-6944028304443193046?l=ateji.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ateji.blogspot.com/feeds/6944028304443193046/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3043798876461399350&amp;postID=6944028304443193046' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/6944028304443193046'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/6944028304443193046'/><link rel='alternate' type='text/html' href='http://ateji.blogspot.com/2010/07/integrating-pi-in-parallel.html' title='Integrating π (pi) in parallel'/><author><name>Patrick Viry</name><uri>http://www.blogger.com/profile/10442033581047493529</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_yjQMP8TlO50/SXT8zEl4a7I/AAAAAAAAANU/Adz-KJVwzlo/S220/photo.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_yjQMP8TlO50/TFKd4D_QodI/AAAAAAAAAaI/u4sjZRpdAIg/s72-c/200px-Circle_Area.svg.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3043798876461399350.post-4682632463378173490</id><published>2010-07-19T17:24:00.008+02:00</published><updated>2010-08-01T17:24:45.084+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ateji px'/><category scheme='http://www.blogger.com/atom/ns#' term='parallelism'/><title type='text'>Ateji PX gems : Non-local exits in parallel branches</title><content type='html'>This article is the first of a series that will explore all the lesser known gems of Ateji PX.&lt;br /&gt;&lt;br /&gt;Non-local exits are all the statements that take the flow of control "away" from the current local scope. In Java, they are &lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;return, &lt;li&gt;throw, &lt;li&gt;break, &lt;li&gt;continue&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;Other than Ateji PX, I do not know of any parallel programming framework that properly handles the combination of parallelism and non-local exits.&lt;br /&gt;&lt;br /&gt;Which is a pity, because this combination proves very useful. For one, it makes it possible to parallelize existing code without having to rewrite all the control flow, a long and error-prone operation making code difficult to read.&lt;br /&gt;&lt;br /&gt;It also makes it possible to design interesting algorithms specifically making use of this combination.&lt;br /&gt;&lt;br /&gt;A good example is speculative parallelism. "speculative" in this context means starting work before being totally sure that it is needed. This is a way to make the best use of idle cores.&lt;br /&gt;&lt;br /&gt;You can use speculative parallelism to put different algorithms in competition, and take the result from the first one that terminates. Here is a try at speculatively sorting an array in Ateji PX:&lt;br /&gt;&lt;br /&gt;&lt;div style='font-family:monospace; border: 2px solid #e5e5e5; padding: 5px 5px 5px 5px; text-align: left; color:black; background-color: #f9ffe5; '&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;||&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;return&lt;/span&gt;&amp;nbsp;bubbleSortAlgorithm(array);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;||&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;return&lt;/span&gt;&amp;nbsp;insertionSortAlgorithm(array);&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;]&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;This code runs the two algorithms in parallel, take the result from the first algorithm that terminates and return it as the global result, stopping all remaining branches. &lt;br /&gt;&lt;br /&gt;Here the interesting work is done by the return statements enclosed within a parallel block. As expected, a return statement returns from the enclosing method, &lt;i&gt;stopping&lt;/i&gt; all existing branches as necessary. Without the return statements, the program would wait until both branches have terminated.&lt;br /&gt;&lt;br /&gt;Properly stopping other threads/tasks/processes is one of the trickiest part of parallel programming. If you've ever tried it, you know what I'm talking about. With Ateji PX, you simply add a return (or break, or continue) statement inside a branch.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3043798876461399350-4682632463378173490?l=ateji.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ateji.blogspot.com/feeds/4682632463378173490/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3043798876461399350&amp;postID=4682632463378173490' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/4682632463378173490'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/4682632463378173490'/><link rel='alternate' type='text/html' href='http://ateji.blogspot.com/2010/07/ateji-px-gems-non-local-exits-in.html' title='Ateji PX gems : Non-local exits in parallel branches'/><author><name>Patrick Viry</name><uri>http://www.blogger.com/profile/10442033581047493529</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_yjQMP8TlO50/SXT8zEl4a7I/AAAAAAAAANU/Adz-KJVwzlo/S220/photo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3043798876461399350.post-8744363417052890012</id><published>2010-07-15T14:02:00.004+02:00</published><updated>2010-07-15T23:52:27.652+02:00</updated><title type='text'>Dr Dobbs</title><content type='html'>I have been for years an enthousiastic reader of &lt;a href="http://www.drdobbs.com"&gt;Dr. Dobbs Journal&lt;/a&gt;, a software magazine where programmers talk to programmers. DDJ has always been for me a reference, providing accurate and timely information with a practitioner's point of view. &lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_yjQMP8TlO50/TD8H9ObpcUI/AAAAAAAAAZk/_KNDwYajwEs/s1600/drdobbsupdate.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 200px; height: 171px;" src="http://3.bp.blogspot.com/_yjQMP8TlO50/TD8H9ObpcUI/AAAAAAAAAZk/_KNDwYajwEs/s200/drdobbsupdate.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5494118818842767682" /&gt;&lt;/a&gt;I learned a lot from DDJ about technology itself and the way to apply it. I used to subscribe to the paper edition (probably sent via sail-mail, since it always took about 3 months to reach Paris...), before it became web-only.&lt;br /&gt;&lt;br /&gt;This is why I take special pride in having made the headline of Dr. Dobbs Update with Ateji PX in an article by Jon Erickson, DDJ's editor in chief, titled &lt;a href="http://www.drdobbs.com/blog/archives/2010/07/think_parallel_2.html"&gt;"Think Parallel, Think Java"&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3043798876461399350-8744363417052890012?l=ateji.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ateji.blogspot.com/feeds/8744363417052890012/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3043798876461399350&amp;postID=8744363417052890012' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/8744363417052890012'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/8744363417052890012'/><link rel='alternate' type='text/html' href='http://ateji.blogspot.com/2010/07/dr-dobbs.html' title='Dr Dobbs'/><author><name>Patrick Viry</name><uri>http://www.blogger.com/profile/10442033581047493529</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_yjQMP8TlO50/SXT8zEl4a7I/AAAAAAAAANU/Adz-KJVwzlo/S220/photo.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_yjQMP8TlO50/TD8H9ObpcUI/AAAAAAAAAZk/_KNDwYajwEs/s72-c/drdobbsupdate.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3043798876461399350.post-7198542251276778864</id><published>2010-07-05T14:53:00.010+02:00</published><updated>2010-08-01T17:25:47.151+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ateji px'/><category scheme='http://www.blogger.com/atom/ns#' term='parallelism'/><title type='text'>Easy multi-core programming for all: Ateji PX is launched</title><content type='html'>I am proud to announce the first public release of &lt;a href="http://www.ateji.com/px"&gt;Ateji PX&lt;/a&gt;, our new language extension and programming environment for multi-core and parallel programming in Java.&lt;br /&gt;&lt;br /&gt;Ateji PX went through a one year technology preview program with selected customers, that confirmed our initial claims about ease of use, ease of learning, and compatibility wih existing code and tools.&lt;br /&gt;&lt;br /&gt;You can now &lt;a href="http://www.ateji.com/px"&gt;download the public release&lt;/a&gt; and discover the powerful language constructs offered by Ateji PX. Read the documentation and play with the samples for a quick introduction.&lt;br /&gt;&lt;br /&gt;Here is the official &lt;a href="http://ateji.com/press-releases/2010-07-06.htm"&gt;press release&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Enjoy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3043798876461399350-7198542251276778864?l=ateji.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ateji.blogspot.com/feeds/7198542251276778864/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3043798876461399350&amp;postID=7198542251276778864' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/7198542251276778864'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/7198542251276778864'/><link rel='alternate' type='text/html' href='http://ateji.blogspot.com/2010/07/easy-multi-core-programming-for-all.html' title='Easy multi-core programming for all: Ateji PX is launched'/><author><name>Patrick Viry</name><uri>http://www.blogger.com/profile/10442033581047493529</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_yjQMP8TlO50/SXT8zEl4a7I/AAAAAAAAANU/Adz-KJVwzlo/S220/photo.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3043798876461399350.post-4609236598874372145</id><published>2010-06-01T18:12:00.004+02:00</published><updated>2010-08-01T17:26:05.822+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ateji px'/><category scheme='http://www.blogger.com/atom/ns#' term='parallelism'/><title type='text'>Everything you always wanted to know about Ateji PX</title><content type='html'>A gentle introduction to Ateji PX is available as a white-paper. It covers all new language constructs, and will definitely give you food for thought if you've ever had a look at the existing multi-core programming techniques.&lt;br /&gt;&lt;br /&gt;Download it &lt;a href="http://www.ateji.com/multicore/whitepapers/Ateji%20PX%20for%20Java%20v1.0.pdf"&gt;here &lt;/a&gt; (pdf, 408kb).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3043798876461399350-4609236598874372145?l=ateji.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ateji.blogspot.com/feeds/4609236598874372145/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3043798876461399350&amp;postID=4609236598874372145' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/4609236598874372145'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/4609236598874372145'/><link rel='alternate' type='text/html' href='http://ateji.blogspot.com/2010/06/everything-you-always-wanted-to-know.html' title='Everything you always wanted to know about Ateji PX'/><author><name>Patrick Viry</name><uri>http://www.blogger.com/profile/10442033581047493529</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_yjQMP8TlO50/SXT8zEl4a7I/AAAAAAAAANU/Adz-KJVwzlo/S220/photo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3043798876461399350.post-3470775694538106291</id><published>2010-04-27T17:03:00.003+02:00</published><updated>2010-04-27T17:23:29.428+02:00</updated><title type='text'>A *language* in the top-10 technologies</title><content type='html'>In its estimation of the &lt;a href="http://www.technologyreview.com/computing/25089/"&gt;10 most important emerging technologies&lt;/a&gt; for the year 2010, Technology Review mentions a programming language.&lt;br /&gt;&lt;br /&gt;Yes, a &lt;span style="font-style:italic;"&gt;language&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;When we started Ateji, the common wisdom was that language was an irrelevant artifact of the programming process. I'm glad to see that we were on the right track, and that the importance of language is now acknowledged even in the most prestigious magazines.&lt;br /&gt;&lt;br /&gt;We're preparing an offering for cloud programming that will let the same source code run indifferently on desktop PCs, multi-core servers, clusters, or in the cloud, while remaining compatible with existing tools and practice. This takes the form of a language extension, and wouldn't have been possible without language technology and clever language design.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3043798876461399350-3470775694538106291?l=ateji.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ateji.blogspot.com/feeds/3470775694538106291/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3043798876461399350&amp;postID=3470775694538106291' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/3470775694538106291'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/3470775694538106291'/><link rel='alternate' type='text/html' href='http://ateji.blogspot.com/2010/04/language-in-top-10-technologies.html' title='A *language* in the top-10 technologies'/><author><name>Patrick Viry</name><uri>http://www.blogger.com/profile/10442033581047493529</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_yjQMP8TlO50/SXT8zEl4a7I/AAAAAAAAANU/Adz-KJVwzlo/S220/photo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3043798876461399350.post-7348822765250066308</id><published>2010-03-31T18:16:00.003+02:00</published><updated>2010-03-31T18:29:59.727+02:00</updated><title type='text'>Robin Milner</title><content type='html'>Professor Robin Milner, one of the pioneers of computer science, passed away on March 20: &lt;a href="http://www.timesonline.co.uk/tol/comment/obituaries/article7081867.ece"&gt;http://www.timesonline.co.uk/tol/comment/obituaries/article7081867.ece&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;He will be remembered, among many other achievements, as the inventor of &lt;a href="http://en.wikipedia.org/wiki/Pi_calculus"&gt;pi-calculus&lt;/a&gt;, the theoretical foundation behind Ateji Parallel Extensions.&lt;br /&gt;&lt;br /&gt;Though I never had a chance to actually meet him, he inspired my career all along, as a researcher and as an entrepreneur.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3043798876461399350-7348822765250066308?l=ateji.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ateji.blogspot.com/feeds/7348822765250066308/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3043798876461399350&amp;postID=7348822765250066308' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/7348822765250066308'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/7348822765250066308'/><link rel='alternate' type='text/html' href='http://ateji.blogspot.com/2010/03/robin-milner.html' title='Robin Milner'/><author><name>Patrick Viry</name><uri>http://www.blogger.com/profile/10442033581047493529</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_yjQMP8TlO50/SXT8zEl4a7I/AAAAAAAAANU/Adz-KJVwzlo/S220/photo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3043798876461399350.post-881188883899012275</id><published>2010-03-27T18:22:00.010+01:00</published><updated>2010-07-20T09:57:43.259+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='parallelism'/><title type='text'>Ateji PX vs Java's ParallelArray</title><content type='html'>The &lt;code&gt;ParallelArray&lt;/code&gt; API is a proposal for integrating data parallelism into the Java language. Here is an overview by Brian Goetz: &lt;a href="http://www.ibm.com/developerworks/java/library/j-jtp11137.html"&gt;http://www.ibm.com/developerworks/java/library/j-jtp11137.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The canonical example for &lt;code&gt;ParallelArray&lt;/code&gt; shows how to compute an average of student grades in parallel. Note the declaration of &lt;code&gt;students&lt;/code&gt; as a &lt;code&gt;ParallelArray&lt;/code&gt; rather than an array, the introduction of a filter 'isSenior' and a selector 'selectGpa', and the use of an &lt;code&gt;ExecutorService&lt;/code&gt; 'fjPool'.&lt;br /&gt;&lt;br /&gt;&lt;div style='font-family:monospace; border: 2px solid #e5e5e5; padding: 5px 5px 5px 5px; text-align: left; color:black; '&gt;&lt;br /&gt;ParallelArray&lt;Student&gt;&amp;nbsp;students&amp;nbsp;=&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;new&lt;/span&gt;&amp;nbsp;ParallelArray&lt;Student&gt;(fjPool,&amp;nbsp;data);&lt;br /&gt;&lt;span style="font-weight:bold; color: #b00000;"&gt;double&lt;/span&gt;&amp;nbsp;bestGpa&amp;nbsp;=&amp;nbsp;students.withFilter(isSenior)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.withMapping(selectGpa)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.max();&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;span style="font-weight:bold; color: #b00000;"&gt;static&lt;/span&gt;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;final&lt;/span&gt;&amp;nbsp;Ops.Predicate&lt;Student&gt;&amp;nbsp;isSenior&amp;nbsp;=&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;new&lt;/span&gt;&amp;nbsp;Ops.Predicate&lt;Student&gt;()&amp;nbsp;&lt;span style="font-weight:bold;"&gt;{&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;boolean&lt;/span&gt;&amp;nbsp;op(Student&amp;nbsp;s)&amp;nbsp;&lt;span style="font-weight:bold;"&gt;{&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;return&lt;/span&gt;&amp;nbsp;s.graduationYear&amp;nbsp;==&amp;nbsp;Student.THIS_YEAR;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;}&lt;/span&gt;;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;span style="font-weight:bold; color: #b00000;"&gt;static&lt;/span&gt;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;final&lt;/span&gt;&amp;nbsp;Ops.ObjectToDouble&lt;Student&gt;&amp;nbsp;selectGpa&amp;nbsp;=&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;new&lt;/span&gt;&amp;nbsp;Ops.ObjectToDouble&lt;Student&gt;()&amp;nbsp;&lt;span style="font-weight:bold;"&gt;{&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;double&lt;/span&gt;&amp;nbsp;op(Student&amp;nbsp;student)&amp;nbsp;&lt;span style="font-weight:bold;"&gt;{&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;return&lt;/span&gt;&amp;nbsp;student.gpa;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;}&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Closures may help in making this code less verbose. Here is an example based on the BGGA proposal:&lt;br /&gt;&lt;br /&gt;&lt;div style='font-family:monospace; border: 2px solid #e5e5e5; padding: 5px 5px 5px 5px; text-align: left; color:black; '&gt;&lt;br /&gt;ParallelArray&amp;nbsp;students&amp;nbsp;=&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;new&lt;/span&gt;&amp;nbsp;ParallelArray(fjPool,&amp;nbsp;data);&lt;br /&gt;&lt;span style="font-weight:bold; color: #b00000;"&gt;double&lt;/span&gt;&amp;nbsp;bestGpa&amp;nbsp;=&amp;nbsp;students.withFilter(&lt;span style="font-weight:bold;"&gt;{&lt;/span&gt;Student&amp;nbsp;s&amp;nbsp;=&gt;&amp;nbsp;(s.graduationYear&amp;nbsp;==&amp;nbsp;THIS_YEAR)&amp;nbsp;&lt;span style="font-weight:bold;"&gt;}&lt;/span&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.withMapping(&lt;span style="font-weight:bold;"&gt;{&lt;/span&gt;&amp;nbsp;Student&amp;nbsp;s&amp;nbsp;=&gt;&amp;nbsp;s.gpa&amp;nbsp;&lt;span style="font-weight:bold;"&gt;}&lt;/span&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.max();&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;However, what we're interested in with this use case is expressing so-called "reduction operations" over arrays using generators, filters and selectors, and run them in parallel. Making Java a functional language is an interesting but different topic.&lt;br /&gt;&lt;br /&gt;Here is the syntax used by Ateji Parallel Extensions for expressing reduction operations (we actually call them "comprehensions", as in "list comprehension"). This syntax should look familiar, as it inspired by the set notation used in high school mathematics.&lt;br /&gt;&lt;br /&gt;&lt;div style='font-family:monospace; border: 2px solid #e5e5e5; padding: 5px 5px 5px 5px; text-align: left; color:black; background-color: #f9ffe5; '&gt;&lt;br /&gt;  Student[]&amp;nbsp;students&amp;nbsp;=&amp;nbsp;...;&lt;br /&gt;  &lt;span style="font-weight:bold; color: #b00000;"&gt;double&lt;/span&gt;&amp;nbsp;bestGpa&amp;nbsp;=&amp;nbsp;`+&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;for&lt;/span&gt;&lt;span style="font-weight:bold;"&gt;{&lt;/span&gt;&amp;nbsp;s.gpa&amp;nbsp;|&amp;nbsp;Student&amp;nbsp;s&amp;nbsp;:&amp;nbsp;students,&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;if&lt;/span&gt;&amp;nbsp;s.graduationYear&amp;nbsp;==&amp;nbsp;THIS_YEAR&amp;nbsp;&lt;span style="font-weight:bold;"&gt;}&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Note that &lt;code&gt;students&lt;/code&gt; remains a classical Java array. This code is sequential, it becomes parallel when a parallel operator is inserted right after the for keyword:&lt;br /&gt;&lt;br /&gt;&lt;div style='font-family:monospace; border: 2px solid #e5e5e5; padding: 5px 5px 5px 5px; text-align: left; color:black; background-color: #f9ffe5; '&gt;&lt;br /&gt;  Student[]&amp;nbsp;students&amp;nbsp;=&amp;nbsp;...;&lt;br /&gt;  &lt;span style="font-weight:bold; color: #b00000;"&gt;double&lt;/span&gt;&amp;nbsp;bestGpa&amp;nbsp;=&amp;nbsp;`+&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;for&lt;/span&gt;||&lt;span style="font-weight:bold;"&gt;{&lt;/span&gt;&amp;nbsp;s.gpa&amp;nbsp;|&amp;nbsp;Student&amp;nbsp;s&amp;nbsp;:&amp;nbsp;students,&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;if&lt;/span&gt;&amp;nbsp;s.graduationYear&amp;nbsp;==&amp;nbsp;THIS_YEAR&amp;nbsp;&lt;span style="font-weight:bold;"&gt;}&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The parallel operator on reduction expressions provides almost linear speedup on multi-core processors, as soon as the amount of computation for each array element is more than a couple of additions.&lt;br /&gt;&lt;br /&gt;Quiz: &lt;br /&gt;Using the comprehension notation, how would you express the number of students graduating this year ? The average of their grades ?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3043798876461399350-881188883899012275?l=ateji.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ateji.blogspot.com/feeds/881188883899012275/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3043798876461399350&amp;postID=881188883899012275' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/881188883899012275'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/881188883899012275'/><link rel='alternate' type='text/html' href='http://ateji.blogspot.com/2010/03/parallel-extensions-vs-parallelarray.html' title='Ateji PX vs Java&apos;s ParallelArray'/><author><name>Patrick Viry</name><uri>http://www.blogger.com/profile/10442033581047493529</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_yjQMP8TlO50/SXT8zEl4a7I/AAAAAAAAANU/Adz-KJVwzlo/S220/photo.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3043798876461399350.post-2111014388565153051</id><published>2010-03-23T15:37:00.018+01:00</published><updated>2010-04-03T00:44:25.710+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='parallelism'/><title type='text'>Matrix multiplication - 12.5x speedup with a single "||"</title><content type='html'>Agreed, matrix multiplication is not a very sexy piece of code, but it serves as a standard example and benchmark for data-parallel computations (code that applies the same operation to many elements in parallel).&lt;br /&gt;&lt;br /&gt;The matrix multiplication white-paper is available from &lt;a href="http://www.ateji.com/multicore/whitepapers.html"&gt;http://www.ateji.com/multicore/whitepapers.html&lt;/a&gt;. It shows how we achieved a 12.5x speedup on a 16-core server, simply adding one single "||" operator to an existing sequential Java code. Raw performance is pretty good as well, on par with linear algebra libraries.&lt;br /&gt;&lt;br /&gt;Here is the parallel code. Note the "||" operator right after the first 'for' keyword, this is the only difference between sequential and parallel version of the code.&lt;br /&gt;&lt;br /&gt;&lt;div style='font-family:monospace; border: 2px solid #e5e5e5; padding: 5px 5px 5px 5px; text-align: left; color:black; background-color: #f9ffe5; '&gt;&lt;br /&gt;for||(&lt;span style="font-weight:bold; color: #b00000;"&gt;int&lt;/span&gt;&amp;nbsp;i&amp;nbsp;:&amp;nbsp;I)&amp;nbsp;&lt;span style="font-weight:bold;"&gt;{&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;for&lt;/span&gt;(int&amp;nbsp;j&amp;nbsp;:&amp;nbsp;J)&amp;nbsp;&lt;span style="font-weight:bold;"&gt;{&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;for&lt;/span&gt;(int&amp;nbsp;k&amp;nbsp;:&amp;nbsp;K)&amp;nbsp;&lt;span style="font-weight:bold;"&gt;{&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;C[i][j]&amp;nbsp;+=&amp;nbsp;A[i][k]&amp;nbsp;*&amp;nbsp;B[k][j];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold;"&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Performance is pretty impressive, on par with dedicated linear algebra librairies:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_yjQMP8TlO50/S6jckGh40DI/AAAAAAAAAV8/eWt_F26XHsU/s1600-h/matmult1.PNG"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 320px; height: 166px;" src="http://3.bp.blogspot.com/_yjQMP8TlO50/S6jckGh40DI/AAAAAAAAAV8/eWt_F26XHsU/s320/matmult1.PNG" border="0" alt=""id="BLOGGER_PHOTO_ID_5451849861718134834" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The part that I find really interesting is the comparison with the same algorithm using plain Java threads. Even if you have a general knowledge about threads, you need to see actual code before you can imagine the amount of small details that need to be taken into account. &lt;br /&gt;&lt;br /&gt;They include adding many final keywords, copying local variables, computing indices, managing InterruptedException. 27 lines vs. 7 lines. And we haven't even returned values or thrown exception from within threads! The problem is not so much verbosity itself, but the fact that programmer's intent gets hidden behind a lot of irrelevant details.&lt;br /&gt;&lt;br /&gt;&lt;div style='font-family:monospace; border: 2px solid #e5e5e5; padding: 5px 5px 5px 5px; text-align: left; color:black; background-color: #f9f9f9; '&gt;&lt;br /&gt;&lt;b&gt;Enjoyed the article?&lt;/b&gt;&lt;br /&gt;Share your interest by voting up this article on social sites!&lt;br /&gt;&lt;script type="text/javascript"&gt;var dzone_style = '2';&lt;/script&gt;&lt;br /&gt;&lt;script language="javascript" src="http://widgets.dzone.com/links/widgets/zoneit.js"&gt;&lt;/script&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3043798876461399350-2111014388565153051?l=ateji.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ateji.blogspot.com/feeds/2111014388565153051/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3043798876461399350&amp;postID=2111014388565153051' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/2111014388565153051'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/2111014388565153051'/><link rel='alternate' type='text/html' href='http://ateji.blogspot.com/2010/03/matrix-multiplication-125x-speedup-with.html' title='Matrix multiplication - 12.5x speedup with a single &quot;||&quot;'/><author><name>Patrick Viry</name><uri>http://www.blogger.com/profile/10442033581047493529</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_yjQMP8TlO50/SXT8zEl4a7I/AAAAAAAAANU/Adz-KJVwzlo/S220/photo.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_yjQMP8TlO50/S6jckGh40DI/AAAAAAAAAV8/eWt_F26XHsU/s72-c/matmult1.PNG' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3043798876461399350.post-7627766274197744933</id><published>2009-11-24T08:31:00.004+01:00</published><updated>2010-08-01T17:26:25.503+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='parallelism'/><title type='text'>100-cores by next year</title><content type='html'>Once again, hardware is far ahead of software. Tilera has &lt;a href="http://tilera.com/news_&amp;_events/press_release_091026.php"&gt;announced &lt;/a&gt;a 100-cores processor for 2010.&lt;br /&gt;&lt;br /&gt;Unlike standard multi-core processors, Tilera's TILE-Gx is architectured around a 2D grid network rather than a single shared bus. This is a way to jump over the "memory wall", and feed enough data to keep all cores busy.&lt;br /&gt;&lt;br /&gt;This design provides a lot of raw computing power, but also better efficiency (more computing power per watt).&lt;br /&gt;&lt;br /&gt;But this beast is supposed to be coded in standard C/C++. It already requires black magic in order to write a 2-threads program that behaves as expected, what about 100's of threads ?&lt;br /&gt;&lt;br /&gt;The TILE-Gx is a perfect match for Ateji Parallel Extensions : data parallelism handles large scientific computations task parallelism handles server-like applications, and message-passing leverages the hardware's packet network interconnection mechanism. High-performance code can be arranged in a data-flow or streaming architecture, reducing accesses to shared memory.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3043798876461399350-7627766274197744933?l=ateji.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ateji.blogspot.com/feeds/7627766274197744933/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3043798876461399350&amp;postID=7627766274197744933' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/7627766274197744933'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/7627766274197744933'/><link rel='alternate' type='text/html' href='http://ateji.blogspot.com/2009/11/100-cores-by-next-year.html' title='100-cores by next year'/><author><name>Patrick Viry</name><uri>http://www.blogger.com/profile/10442033581047493529</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_yjQMP8TlO50/SXT8zEl4a7I/AAAAAAAAANU/Adz-KJVwzlo/S220/photo.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3043798876461399350.post-3516389091715150223</id><published>2009-11-18T20:41:00.002+01:00</published><updated>2009-11-18T20:45:35.273+01:00</updated><title type='text'>Session Evaluation</title><content type='html'>I just received my session evaluation from the TSS Java Symposium Europe : an impressive 4.58/5.0 with the comment "Great Session !". &lt;br /&gt;&lt;br /&gt;I am less proud of the speaker evaluation, at 4.21/5.0. If you attended the session, I'd be happy to hear from you about what could be improved.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3043798876461399350-3516389091715150223?l=ateji.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ateji.blogspot.com/feeds/3516389091715150223/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3043798876461399350&amp;postID=3516389091715150223' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/3516389091715150223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/3516389091715150223'/><link rel='alternate' type='text/html' href='http://ateji.blogspot.com/2009/11/session-evaluation.html' title='Session Evaluation'/><author><name>Patrick Viry</name><uri>http://www.blogger.com/profile/10442033581047493529</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_yjQMP8TlO50/SXT8zEl4a7I/AAAAAAAAANU/Adz-KJVwzlo/S220/photo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3043798876461399350.post-8181678462088829283</id><published>2009-11-01T16:01:00.001+01:00</published><updated>2009-11-24T08:30:41.771+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='parallelism'/><title type='text'>Parallelism at the language level - Part 1: Hello World</title><content type='html'>The major contribution of &lt;a href="http://www.ateji.com/multicore/multicore.html"&gt;Ateji Parallel Extensions&lt;/a&gt; is to add parallelism at the language level.&lt;br /&gt;&lt;br /&gt;What does this change? Today's mainstream programming languages have been designed with sequential processing in mind, they simply have no idea about what is parallelism. Consider how you'd run two tasks in parallel in Java:&lt;br /&gt;&lt;div style='font-family:monospace; border: 2px solid #e5e5e5; padding: 5px 5px 5px 5px; text-align: left; color:black; background-color: #f9ffe5; '&gt;&amp;nbsp;&amp;nbsp;Thread&amp;nbsp;otherThread&amp;nbsp;=&amp;nbsp;new&amp;nbsp;Thread()&amp;nbsp;&lt;span style="font-weight:bold;"&gt;{&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;void&amp;nbsp;run()&amp;nbsp;&lt;span style="font-weight:bold;"&gt;{&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;println("Hello");&amp;nbsp;&lt;span style="color: #004680;"&gt;// print Hello in the other thread&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold;"&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold;"&gt;}&lt;/span&gt;.start();&lt;br /&gt;&amp;nbsp;&amp;nbsp;println("World");&amp;nbsp;&lt;span style="color: #004680;"&gt;// print World in this thread&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;otherThread.join();&amp;nbsp;&lt;span style="color: #004680;"&gt;//&amp;nbsp;wait&amp;nbsp;until&amp;nbsp;code1&amp;nbsp;has&amp;nbsp;terminated&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Not to mention how unreadable and unmaintainable this code is, you'll notice that there is a fair amount of black magic involved here: just because you called a method whose name happens to be &lt;code&gt;start()&lt;/code&gt;, the &lt;i&gt;whole&lt;/i&gt; behaviour of your program has changed. But the compiler is not aware of this change, it thinks it is just calling an ordinary library method.&lt;br /&gt;&lt;br /&gt;With Ateji Parallel Extensions, two tasks are run in parallel by composing them using the || operator :&lt;br /&gt;&lt;br /&gt;&lt;div style='font-family:monospace; border: 2px solid #e5e5e5; padding: 5px 5px 5px 5px; text-align: left; color:black; background-color: #f9ffe5; '&gt;&amp;nbsp;&amp;nbsp;println("Hello");&amp;nbsp;||&amp;nbsp;println("World");&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;How could it be simpler?&lt;br /&gt;&lt;br /&gt;Not only is this much more concise and understandable, it also makes it easier for the developer to "think" parallel and to catch potential errors early. &lt;br /&gt;&lt;br /&gt;And since the very idea of parallelism is present in the language, the compiler is able to understand the actual meaning of the code and to perform tricks such as high-level code optimization or better verification.&lt;br /&gt;&lt;br /&gt;Read more on &lt;a href="http://www.ateji.com/multicore/multicore.html"&gt;parallelism at the language level&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3043798876461399350-8181678462088829283?l=ateji.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ateji.blogspot.com/feeds/8181678462088829283/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3043798876461399350&amp;postID=8181678462088829283' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/8181678462088829283'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/8181678462088829283'/><link rel='alternate' type='text/html' href='http://ateji.blogspot.com/2009/01/horizon-is-where-parallel-lines.html' title='Parallelism at the language level - Part 1: Hello World'/><author><name>Patrick Viry</name><uri>http://www.blogger.com/profile/10442033581047493529</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_yjQMP8TlO50/SXT8zEl4a7I/AAAAAAAAANU/Adz-KJVwzlo/S220/photo.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3043798876461399350.post-4809179453663064593</id><published>2009-10-30T00:42:00.007+01:00</published><updated>2009-10-30T17:38:10.113+01:00</updated><title type='text'>I have been assaulted...</title><content type='html'>...by a fan !&lt;br /&gt;&lt;br /&gt;Just back from TSS Java Symposium Europe, while waiting for my bags at CDG airport, a total stranger pounced on me: &lt;br /&gt;&lt;br /&gt;"I saw your presentation in Prague, it was great, wonderful, so exciting, definitely the best thing that happened to Java since its creation more than a decade ago. Oh, and did I mention your were awesome?!"&lt;br /&gt;&lt;br /&gt;Whoaa!!! This was great for my self-esteem. My cardiologist, my wife and myself owe you a big thank you.&lt;br /&gt;&lt;br /&gt;My presentation about Ateji Parallel Extensions was met with two extremely opposite reactions: either totally intrigued, all ears for the whole duration. Or totally lost, pulling "what an earth is this all about and what am I doing here?" type faces.&lt;br /&gt;&lt;br /&gt;I'll need to improve on the tutorial aspect of this talk. There was definitely strong interest in the audience, as I could see from the large number of questions.&lt;br /&gt;&lt;br /&gt;The Server Side Java Symposium Europe 2009 in Prague was overall a great  experience. It was rather orientated, well, "server-side" a world that I'm not that much familiar with. Lots of boring guys who try to make software actually work rather than just hacking the JVM for the fun of it. I loved the bits about practical static analysis and performance tuning. &lt;br /&gt;&lt;br /&gt;Other highlights were the "dinner with strangers" (not by the end), and hands-on pair programming. It was my first time, we had 30 minutes to write a method that sums factors and we hopelessly failed -- let's blame it on the Czech brandy. But I'll definitely try pair programming again with my team.&lt;br /&gt;&lt;br /&gt;But the best bit was Neal Ford introducing my presentation in his opening keynote speech!&lt;br /&gt;&lt;br /&gt;The topic was "Predicting the future". Well, first try learning lessons from the past: he began with a picture of a blacksmith in 1890. The best trade at the time, the career that you would recommend to your own children. But within 20 years there were no more blacksmiths. &lt;br /&gt;&lt;br /&gt;The biggest change happening now in software is the requirement to write parallel code, and he drew an analogy between the 1890 blacksmith and today's Java developer. In short, better become fluent in parallel programming right now or find another career.  &lt;br /&gt;&lt;br /&gt;He hinted that we will all need to battle with learning new languages (probably of the functional kind: Haskell, F#, etc.) if we want to survive the transition to parallel programming, whether we like it or not. &lt;br /&gt;&lt;br /&gt;The good news is that he was wrong: Ateji Parallel Extensions adds parallelism to your favourite language and doesn't require you to go back to school.&lt;br /&gt;&lt;br /&gt;Neal also insisted on the importance of language and notation, and even dared to mention the Sapir-Whorf hypothesis. I understand his talk as proof that common wisdom about the importance of language is gradually changing.  That I was on the right track four years ago when I founded Ateji in order to promote and develop language design and language technology.&lt;br /&gt;&lt;br /&gt;Neal concluded "The best way to predict the future is to create it". This is precisely what we're doing at Ateji. Stay tuned!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3043798876461399350-4809179453663064593?l=ateji.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ateji.blogspot.com/feeds/4809179453663064593/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3043798876461399350&amp;postID=4809179453663064593' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/4809179453663064593'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/4809179453663064593'/><link rel='alternate' type='text/html' href='http://ateji.blogspot.com/2009/10/i-have-been-assaulted.html' title='I have been assaulted...'/><author><name>Patrick Viry</name><uri>http://www.blogger.com/profile/10442033581047493529</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_yjQMP8TlO50/SXT8zEl4a7I/AAAAAAAAANU/Adz-KJVwzlo/S220/photo.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3043798876461399350.post-3354147835759726066</id><published>2009-10-24T22:42:00.006+02:00</published><updated>2009-10-24T22:58:36.346+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='parallelism'/><title type='text'>Heading for the Java Symposium Europe</title><content type='html'>Dear All,&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_yjQMP8TlO50/SuNpyv0nGPI/AAAAAAAAATk/__t8FcUn82Q/s1600-h/TSSJS09-speaking-125x125.gif"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 125px; height: 125px;" src="http://3.bp.blogspot.com/_yjQMP8TlO50/SuNpyv0nGPI/AAAAAAAAATk/__t8FcUn82Q/s320/TSSJS09-speaking-125x125.gif" border="0" alt=""id="BLOGGER_PHOTO_ID_5396273099071494386" /&gt;&lt;/a&gt;&lt;br /&gt;It's been a long time! We've been busy preparing Ateji's new product for parallel programming. If you thought parallel programming was difficult, we'll make you change your mind.&lt;br /&gt;&lt;br /&gt;The product is now available under a limited preview program, and is already a success with its early users.&lt;br /&gt;&lt;br /&gt;I'll be next week at the &lt;a href="http://javasymposium.techtarget.com/"&gt;Java Symposium Europe&lt;/a&gt; in Prague for its first public presentation. Watch out this blog for a smooth introduction to this new language and programming paradigm.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3043798876461399350-3354147835759726066?l=ateji.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ateji.blogspot.com/feeds/3354147835759726066/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3043798876461399350&amp;postID=3354147835759726066' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/3354147835759726066'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/3354147835759726066'/><link rel='alternate' type='text/html' href='http://ateji.blogspot.com/2009/10/heading-for-java-symposium-europe.html' title='Heading for the Java Symposium Europe'/><author><name>Patrick Viry</name><uri>http://www.blogger.com/profile/10442033581047493529</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_yjQMP8TlO50/SXT8zEl4a7I/AAAAAAAAANU/Adz-KJVwzlo/S220/photo.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_yjQMP8TlO50/SuNpyv0nGPI/AAAAAAAAATk/__t8FcUn82Q/s72-c/TSSJS09-speaking-125x125.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3043798876461399350.post-1068539603974843371</id><published>2008-10-23T16:50:00.005+02:00</published><updated>2009-01-19T23:55:10.967+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='optimj'/><title type='text'>Carpet-Bombing Marketing</title><content type='html'>Unless you spent the last 6 months deep in a cave, you must have heard buzz about the &lt;a href="http://code.msdn.microsoft.com/solverfoundation"&gt;Microsoft Solver Foundation&lt;/a&gt;. It is much less likely however that you've heard about &lt;a href="http://www.ateji.com/optimj.html"&gt;OptimJ&lt;/a&gt;. That's a major difference between being Microsoft or being Ateji.&lt;br /&gt;&lt;br /&gt;In the pure Microsoft tradition, this vaporware has already generated far more downloads and excitation than OptimJ, an existing and proven product acclaimed by our users. Everybody in the OR community is pretending that they're not concerned or worried by the MSF announcement, but have anyway downloaded a large .msi archive "just in case". And the blogosphere is buzzing with wild guesses about what's really inside (do you know how to open an .msi archive ? most of them don't know either, but who cares).&lt;br /&gt;&lt;br /&gt;Effects of carpet-bombing marketing are also visible in everything related to the forthcoming &lt;a href="http://ics09.meetings.informs.org/"&gt;ICS'09&lt;/a&gt; conference. I have yet to see any conference-related announcement without the "M" word. And almost all sponsorship opportunities are already bought and reserved by this single company. Maybe the Ateji team will end up on the side-walk distributing flyers from a makeshift cardboard tent (it may be cold in January, we'll exchange marketing material for warm soup).&lt;br /&gt;&lt;br /&gt;So what's Ateji to do in this context ? We cannot afford a carpet-bombing marketing strategy, and vaporware announcements are not an option. Clients expect us to deliver first.&lt;br /&gt;&lt;br /&gt;What we can do, however, is to leverage all this buzz-making to spread the word about what we've been promoting for long. The vaporware strategy is typically an attempt at delaying competitor's sales. Hairy-pointed bosses will prefer to wait until Microsoft actually delivers anything usable, and we'll lose those sales. But many others will have a chance to look at our product and download right now a fully functional version, so all in all we expect a big boost for Ateji. Time will tell.&lt;br /&gt;&lt;br /&gt;But the best bit is about self-satisfaction. The fact that Microsoft is following a similar embedded-language approach applied to optimization reassures me that we choose the right approach when we founded Ateji three years ago.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3043798876461399350-1068539603974843371?l=ateji.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ateji.blogspot.com/feeds/1068539603974843371/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3043798876461399350&amp;postID=1068539603974843371' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/1068539603974843371'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/1068539603974843371'/><link rel='alternate' type='text/html' href='http://ateji.blogspot.com/2008/10/carpet-bombing-marketing.html' title='Carpet-Bombing Marketing'/><author><name>Patrick Viry</name><uri>http://www.blogger.com/profile/10442033581047493529</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_yjQMP8TlO50/SXT8zEl4a7I/AAAAAAAAANU/Adz-KJVwzlo/S220/photo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3043798876461399350.post-3732363982140719432</id><published>2008-06-15T16:53:00.019+02:00</published><updated>2009-01-19T23:52:22.534+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='optimj'/><title type='text'>Common Idioms 2</title><content type='html'>Associative arrays are one of the driving force behind the adoption of so-called scripting languages such as JavaScript or Ruby. Strangely enough, they're absent from the mainstream generalist languages of the C++/C#/Java family.&lt;br /&gt;&lt;br /&gt;Associative arrays are like standard arrays but can be indexed with any given collection of values (whereas Java arrays can only be indexed with 0-based integers). Alternatively, associative arrays can be thought of as maps with built-in language support and a fixed an immutable set of keys (refering to a non-existent key raises an ArrayIndexOutOfBoundsException). Here is the &lt;a href="http://www.ateji.com/optimj"&gt;OptimJ&lt;/a&gt; version of the &lt;a href="http://en.wikipedia.org/wiki/Associative_arrays"&gt;canonical example from Wikipedia&lt;/a&gt; :&lt;br /&gt;&lt;div  style="border: 2px solid rgb(229, 229, 229); padding: 5px; text-align: left; color: black; background-color: rgb(249, 255, 229);font-family:monospace;"&gt;&amp;nbsp;&amp;nbsp;String[String] phoneBook = &lt;span style="font-weight: bold;"&gt;{&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"Sally Smart" -&gt; "555-9999",&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"John Doe" -&gt; "555-1212",&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"J. Random Hacker" -&gt; "553-1337"&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span style="font-weight: bold;"&gt;}&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span style="color: rgb(0, 70, 128);"&gt;// iterate over the values&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span style="font-weight: bold; color: rgb(176, 0, 0);"&gt;for&lt;/span&gt;(String number : phoneBook) &lt;span style="font-weight: bold;"&gt;{&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;System.out.println(number);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span style="font-weight: bold;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span style="color: rgb(0, 70, 128);"&gt;// iterate over the keys&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span style="font-weight: bold; color: rgb(176, 0, 0);"&gt;for&lt;/span&gt;(String name : phoneBook.keys) &lt;span style="font-weight: bold;"&gt;{&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;System.out.println(name + " -&gt; " + phoneBook[name]);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span style="font-weight: bold;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Notice the type String[String] that denotes an array of strings indexed by strings.&lt;br /&gt;&lt;br /&gt;To see how associative arrays differ from Java arrays, consider the two definitions :&lt;br /&gt;&lt;div style='font-family:monospace; border: 2px solid #e5e5e5; padding: 5px 5px 5px 5px; text-align: left; color:black; background-color: #f9ffe5; '&gt;&amp;nbsp;&amp;nbsp;String[]&amp;nbsp;a1&amp;nbsp;=&amp;nbsp;&lt;span style="font-weight:bold;"&gt;{&lt;/span&gt;&amp;nbsp;"a",&amp;nbsp;"b",&amp;nbsp;"c"&amp;nbsp;&lt;span style="font-weight:bold;"&gt;}&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;String[&lt;span style="font-weight:bold; color: #b00000;"&gt;int&lt;/span&gt;]&amp;nbsp;a2&amp;nbsp;=&amp;nbsp;&lt;span style="font-weight:bold;"&gt;{&lt;/span&gt;&amp;nbsp;12&amp;nbsp;-&gt;&amp;nbsp;"a",&amp;nbsp;3&amp;nbsp;-&gt;&amp;nbsp;"b",&amp;nbsp;7&amp;nbsp;-&gt;&amp;nbsp;"c"&amp;nbsp;&lt;span style="font-weight:bold;"&gt;}&lt;/span&gt;;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Here a1 is indexed by 0, 1, 2 and a2 is indexed by 3, 7, 12.  Note how their types are different.&lt;br /&gt;&lt;br /&gt;Java and associative array dimensions can be mixed freely:&lt;br /&gt;&lt;div style='font-family:monospace; border: 2px solid #e5e5e5; padding: 5px 5px 5px 5px; text-align: left; color:black; background-color: #f9ffe5; '&gt;&amp;nbsp;&amp;nbsp;int[String][][&lt;span style="font-weight:bold; color: #b00000;"&gt;double&lt;/span&gt;]&amp;nbsp;a;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;a is a 3-dimensional array. The first dimension is associative, indexed by doubles. The second dimension is a Java array dimension, indexed by 0-based integers. The third dimension is associative, indexed by strings.&lt;br /&gt;&lt;br /&gt;As usual in Java, an array index expression is written with indices in the opposite order of the types:&lt;br /&gt;&lt;div style='font-family:monospace; border: 2px solid #e5e5e5; padding: 5px 5px 5px 5px; text-align: left; color:black; background-color: #f9ffe5; '&gt;&amp;nbsp;&amp;nbsp;a[3.1416][10]["abc"]&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Associative arrays are common in algebraic modeling languages such as AMPL, GAMS, OPL, etc., where they allow for a concise and mathematical-like expression of optimization problems.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3043798876461399350-3732363982140719432?l=ateji.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ateji.blogspot.com/feeds/3732363982140719432/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3043798876461399350&amp;postID=3732363982140719432' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/3732363982140719432'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/3732363982140719432'/><link rel='alternate' type='text/html' href='http://ateji.blogspot.com/2008/06/common-idioms-2.html' title='Common Idioms 2'/><author><name>Patrick Viry</name><uri>http://www.blogger.com/profile/10442033581047493529</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_yjQMP8TlO50/SXT8zEl4a7I/AAAAAAAAANU/Adz-KJVwzlo/S220/photo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3043798876461399350.post-5809790280015310198</id><published>2008-06-08T23:40:00.005+02:00</published><updated>2009-01-19T23:52:37.673+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='optimj'/><title type='text'>Common Idioms 1</title><content type='html'>Most mainstream programming languages are pretty bad at initializating and populating structured data. Let's say you want a Java list containing "a" and "b".&lt;br /&gt;&lt;br /&gt;First attempt :&lt;br /&gt;&lt;div style='font-family:monospace; border: 2px solid #e5e5e5; padding: 5px 5px 5px 5px; text-align: left; color:black; '&gt;List&amp;lt;String&amp;gt;&amp;nbsp;a&amp;nbsp;=&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;new&lt;/span&gt;&amp;nbsp;ArrayList&amp;lt;String&amp;gt;();&lt;br /&gt;a.add("1");&lt;br /&gt;a.add("2");&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Pretty bad signal-to-noise ratio.&lt;br /&gt;&lt;br /&gt;Second attempt :&lt;br /&gt;&lt;div style='font-family:monospace; border: 2px solid #e5e5e5; padding: 5px 5px 5px 5px; text-align: left; color:black; '&gt;List&amp;lt;String&amp;gt;&amp;nbsp;a&amp;nbsp;=&amp;nbsp;Arrays.asList(&lt;span style="font-weight:bold; color: #b00000;"&gt;new&lt;/span&gt;&amp;nbsp;String[]&lt;span style="font-weight:bold;"&gt;{&lt;/span&gt;&amp;nbsp;"a",&amp;nbsp;"b"&amp;nbsp;&lt;span style="font-weight:bold;"&gt;}&lt;/span&gt;);&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Slightly more readable, but allocates a useless intermediate array.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Third attempt :&lt;br /&gt;&lt;div style='font-family:monospace; border: 2px solid #e5e5e5; padding: 5px 5px 5px 5px; text-align: left; color:black;'&gt;List&amp;lt;String&amp;gt;&amp;nbsp;a&amp;nbsp;=&amp;nbsp;Arrays.asList("a",&amp;nbsp;"b");&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Much more readable, but doesn't work if you want a set rather than a list : there's no &lt;code&gt;Arrays.asSet()&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;Here's the OptimJ version :&lt;br /&gt;&lt;div style='font-family:monospace; border: 2px solid #e5e5e5; padding: 5px 5px 5px 5px; text-align: left; color:black; background-color: #f9ffe5; '&gt;ArrayList&amp;lt;String&amp;gt;&amp;nbsp;a&amp;nbsp;=&amp;nbsp;&lt;span style="font-weight:bold;"&gt;{&lt;/span&gt;&amp;nbsp;"a",&amp;nbsp;"b"&amp;nbsp;&lt;span style="font-weight:bold;"&gt;}&lt;/span&gt;;&lt;br /&gt;HashSet&amp;lt;String&amp;gt;&amp;nbsp;s&amp;nbsp;=&amp;nbsp;&lt;span style="font-weight:bold;"&gt;{&lt;/span&gt;&amp;nbsp;"a",&amp;nbsp;"b"&amp;nbsp;&lt;span style="font-weight:bold;"&gt;}&lt;/span&gt;;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;But nausea quickly kicks in when you try to instanciate imbricated collection. A cooking recipe may be seen as a list (ordered) of sets of tasks (unordered because they can be done in parallel).&lt;br /&gt;&lt;br /&gt;First attempt :&lt;br /&gt;&lt;div style='font-family:monospace; border: 2px solid #e5e5e5; padding: 5px 5px 5px 5px; text-align: left; color:black; '&gt;&amp;nbsp;&amp;nbsp;List&amp;lt;Hashset&amp;lt;String&amp;gt;&amp;gt;&amp;nbsp;irishStew&amp;nbsp;=&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;new&lt;/span&gt;&amp;nbsp;ArrayList&amp;lt;Hashset&amp;nbsp;&amp;lt;String&amp;gt;&amp;gt;();&lt;br /&gt;&amp;nbsp;&amp;nbsp;HashSet&amp;lt;String&amp;gt;&amp;nbsp;set1&amp;nbsp;=&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;new&lt;/span&gt;&amp;nbsp;HashSet&amp;lt;String&amp;gt;();&lt;br /&gt;&amp;nbsp;&amp;nbsp;set1.add("Mince&amp;nbsp;the&amp;nbsp;meet");&lt;br /&gt;&amp;nbsp;&amp;nbsp;set1.add("Mash&amp;nbsp;the&amp;nbsp;potatoes");&lt;br /&gt;&amp;nbsp;&amp;nbsp;irishStew.add(set1);&lt;br /&gt;&amp;nbsp;&amp;nbsp;HashSet&amp;lt;String&amp;gt;&amp;nbsp;set2&amp;nbsp;=&amp;nbsp;&lt;span style="font-weight:bold; color: #b00000;"&gt;new&lt;/span&gt;&amp;nbsp;HashSet&amp;lt;String&amp;gt;();&lt;br /&gt;&amp;nbsp;&amp;nbsp;set2.add("Cook&amp;nbsp;in&amp;nbsp;oven");&lt;br /&gt;&amp;nbsp;&amp;nbsp;irishStew.add(set2);&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Wow! This is called &lt;i&gt;write-only&lt;/i&gt; code. Think about having to maintain pages of similar code written by an summer intern two years ago. &lt;br /&gt;&lt;br /&gt;Second attempt :&lt;br /&gt;&lt;div style='font-family:monospace; border: 2px solid #e5e5e5; padding: 5px 5px 5px 5px; text-align: left; color:black;'&gt;...&amp;nbsp;?&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The &lt;code&gt;asList&lt;/code&gt; doesn't work because it requires expressions, and the code that builds our sets is a sequence of statements, not an expression.&lt;br /&gt;&lt;br /&gt;Here's the OptimJ version :&lt;br /&gt;&lt;div style='font-family:monospace; border: 2px solid #e5e5e5; padding: 5px 5px 5px 5px; text-align: left; color:black; background-color: #f9ffe5; '&gt;&amp;nbsp;&amp;nbsp;ArrayList&amp;lt;HashSet&amp;lt;String&amp;gt;&amp;gt;&amp;nbsp;irishStew&amp;nbsp;=&amp;nbsp;&lt;span style="font-weight:bold;"&gt;{&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold;"&gt;{&lt;/span&gt;&amp;nbsp;"Mince&amp;nbsp;the&amp;nbsp;meet",&amp;nbsp;"Mash&amp;nbsp;the&amp;nbsp;potatoes"&amp;nbsp;&lt;span style="font-weight:bold;"&gt;}&lt;/span&gt;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold;"&gt;{&lt;/span&gt;&amp;nbsp;"Cook&amp;nbsp;in&amp;nbsp;oven"&lt;span style="font-weight:bold;"&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold;"&gt;}&lt;/span&gt;;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Do you feel more confident now taking this code maintenance assignment ?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3043798876461399350-5809790280015310198?l=ateji.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ateji.blogspot.com/feeds/5809790280015310198/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3043798876461399350&amp;postID=5809790280015310198' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/5809790280015310198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/5809790280015310198'/><link rel='alternate' type='text/html' href='http://ateji.blogspot.com/2008/06/common-idioms-1.html' title='Common Idioms 1'/><author><name>Patrick Viry</name><uri>http://www.blogger.com/profile/10442033581047493529</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_yjQMP8TlO50/SXT8zEl4a7I/AAAAAAAAANU/Adz-KJVwzlo/S220/photo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3043798876461399350.post-2618564806825080776</id><published>2008-04-28T18:30:00.004+02:00</published><updated>2009-01-19T23:52:59.084+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='optimj'/><title type='text'>Ateji supports the Roadef challenge</title><content type='html'>Every two years, the French Operational Research and Decision Support Society (&lt;a href="http://www.roadef.org/"&gt;ROADEF&lt;/a&gt;) organizes an OR challenge dedicated to industrial applications, in collaboration with an industrial partner. This year, the challenge is proposed by Amadeus and deals with &lt;a href="http://challenge.roadef.org/2009/index.en.htm"&gt;disruption management for commercial aviation&lt;/a&gt;. It is open to everyone and provides a fantastic opportunity to match theory and practice: do not miss this chance to demonstrate your talent.&lt;br /&gt;&lt;br /&gt;Ateji provides &lt;a href="http://www.ateji.com/optimj.html"&gt;OptimJ&lt;/a&gt; licences for the duration of the challenge to all participants (contact us if you need one), and will offer a commercial full-featured OptimJ licence to the winner.&lt;br /&gt;&lt;br /&gt;This year's topic is challenging in both data modeling and  optimization modeling. Since OptimJ seamlessly integrates both aspects, it can save you a large amount of boring coding time that you'll be able to spend instead on creative thinking. Good luck!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3043798876461399350-2618564806825080776?l=ateji.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ateji.blogspot.com/feeds/2618564806825080776/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3043798876461399350&amp;postID=2618564806825080776' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/2618564806825080776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/2618564806825080776'/><link rel='alternate' type='text/html' href='http://ateji.blogspot.com/2008/04/ateji-supports-roadef-challenge.html' title='Ateji supports the Roadef challenge'/><author><name>Patrick Viry</name><uri>http://www.blogger.com/profile/10442033581047493529</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_yjQMP8TlO50/SXT8zEl4a7I/AAAAAAAAANU/Adz-KJVwzlo/S220/photo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3043798876461399350.post-5710122318642374121</id><published>2008-04-04T13:18:00.004+02:00</published><updated>2009-01-24T01:49:21.722+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ateji'/><category scheme='http://www.blogger.com/atom/ns#' term='venture capital'/><title type='text'>Top 10 reasons to invest in a french technology venture</title><content type='html'>&lt;ol&gt;&lt;li&gt;Whenever you feel like spending a romantic week-end in Paris, pretend to have an urgent board meeting.&lt;/li&gt;&lt;li&gt;Paris is home to a large number of brilliant universities and grandes ecoles, with no shortage of talented people coming from all over Europe.&lt;li&gt;French VCs are a following trend, they'll courteously let you pick the nicest jewels first.&lt;/li&gt;&lt;li&gt;The french still learn engineering at school.&lt;/li&gt;&lt;li&gt;Public policy is strongly favoring entrepreneurship and foreign investment (see &lt;a href="http://www.invest-in-france.org/"&gt;www.invest-in-france.org&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;You will find here truly original projects with a sound industrial vision, not just the 10,001th copycat startup.&lt;/li&gt;&lt;li&gt; It wouldn't hurt to have a few assets in euros in your portfolio.&lt;/li&gt;&lt;li&gt;We're too far away ? Have you ever used Skype ?&lt;/li&gt;&lt;li&gt;Despite rumours to the contrary, the term "entrepreneur" is a loanword from French (&lt;a href="http://en.wikipedia.org/wiki/Entrepreneur"&gt;en.wikipedia.org/wiki/Entrepreneur&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;There is life outside the Valley. Have a look.&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3043798876461399350-5710122318642374121?l=ateji.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ateji.blogspot.com/feeds/5710122318642374121/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3043798876461399350&amp;postID=5710122318642374121' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/5710122318642374121'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/5710122318642374121'/><link rel='alternate' type='text/html' href='http://ateji.blogspot.com/2008/04/top-10-reasons-to-invest-in-french.html' title='Top 10 reasons to invest in a french technology venture'/><author><name>Patrick Viry</name><uri>http://www.blogger.com/profile/10442033581047493529</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_yjQMP8TlO50/SXT8zEl4a7I/AAAAAAAAANU/Adz-KJVwzlo/S220/photo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3043798876461399350.post-1700209268294245258</id><published>2007-12-07T23:38:00.000+01:00</published><updated>2007-12-07T23:38:53.547+01:00</updated><title type='text'>So what's a closure exactly ?</title><content type='html'>&lt;a href="http://gafter.blogspot.com/2007/11/closures-prototype-update-and-extension.html#links"&gt;Should I follow the blogosphere more closely, I would have noticed that Neal Gafter had just been developing this idea in the context of closures for Java. &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3043798876461399350-1700209268294245258?l=ateji.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://gafter.blogspot.com/2007/11/closures-prototype-update-and-extension.html#links' title='So what&apos;s a closure exactly ?'/><link rel='replies' type='application/atom+xml' href='http://ateji.blogspot.com/feeds/1700209268294245258/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3043798876461399350&amp;postID=1700209268294245258' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/1700209268294245258'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/1700209268294245258'/><link rel='alternate' type='text/html' href='http://ateji.blogspot.com/2007/12/so-whats-closure-exactly.html' title='So what&apos;s a closure exactly ?'/><author><name>Patrick Viry</name><uri>http://www.blogger.com/profile/10442033581047493529</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_yjQMP8TlO50/SXT8zEl4a7I/AAAAAAAAANU/Adz-KJVwzlo/S220/photo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3043798876461399350.post-5527043616217653077</id><published>2007-12-06T23:29:00.000+01:00</published><updated>2007-12-07T11:54:48.186+01:00</updated><title type='text'>The precautionary principle</title><content type='html'>Designing language extensions is not just black art, we are trying to follow a certain number of principles. One of them could be called 'the precautionary principle", or as Guy Steele put it "&lt;a href="http://java.sun.com/features/2003/05/steele_qa.html"&gt;planning for growth&lt;/a&gt;". In short, do not add features if they may hamper future developments. When in doubt, stay on the safe side. When facing a choice, if no argument stands out clearly in favor of one side or the other, devise restrictions in order to avoid making a choice rather than take the risk of having to carry the consequences of a wrong choice all over the language life time.&lt;br/&gt;&lt;br/&gt;One specific example comes to mind : the design of "&lt;a href="http://en.wikipedia.org/wiki/Closure_(computer_science)"&gt;closures&lt;/a&gt;" for Java, which is currently a heavily debated topic. If you haven't been brainwashed by programming teachers, "closures" are a very natural thing: wrap some piece of code  so that you can carry it away exactly like you would do for data. "Closures" are also the basic building block of&lt;a href="http://en.wikipedia.org/wiki/Lambda-calculus"&gt; lambda-calculus&lt;/a&gt;, widely recognized as the theoretical basis of computation, and available for decades in functional programming languages.&lt;br/&gt;&lt;br/&gt;With "closures", you can define methods or functions that take as parameters not only data, such as integers or strings, but also things to do, in other words pieces of code that will be executed when you evaluate the parameter. If you're familiar to C, this is similar to a pointer to a function (often used as &lt;a href="http://en.wikipedia.org/wiki/Callback_(computer_science)"&gt;callbacks&lt;/a&gt;), with the difference that you do not have to provide a name, and that the type system makes sure that you're not breaking things. Outside the Java world, "closures" are commonplace in functional languages such as Caml and scripting languages such as JavaScript. "closures" have also recently been added to C#. As the story goes, "closures" where even on the feature list of the first version of the Java language, and were dropped because of time-to-market considerations.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;The most widely publicized proposal for "closures for Java" today is named &lt;a href="http://www.javac.info/"&gt;BGGA&lt;/a&gt; by its authors' initials, and I strongly feel that this proposal is breaking the precautionary principle mentioned above. Let us try to remove the quotes around the word "closure". Theoreticians and functional programming languages talk about "functions" and "functional languages". A closure in this context is an instance of a function that remembers part of the context where it has been defined, for instance the value of some local variables. In some sense, this object is "closed", hence the name:  it has its own copy of the context it needs, and can be carried away as a black box. &lt;br/&gt;&lt;br/&gt;The problem is when you try to add functions to an imperative language such as Java. Variables in functional languages have one and only one value, while variables in imperative languages have values that can change in time; they refer to a memory location rather than to a mathematical value ("final" variables in Java are somewhat close to functional variables). Should a closure remember values or memory locations ? Said otherwise, if some value is changed within the closure, should the change be propagated to the original context ?&lt;br/&gt;&lt;br/&gt;The BGGA answer is yes. I can see two reasons for this choice. One is about the list of features that a magazine would use for a comparative review : because most scripting languages today do that, if Java would appear as &lt;i&gt;lacking&lt;/i&gt; a feature. The other reason is that closures in the BGGA proposal are in effect suggested as an answer for two really different things : macros (designing your own control structures) and functions (carrying away pieces of code). The meaning of what is a context, where should "return" return to, and so on, are totally different for macros and functions. Not surprisingly, macros and functions are compiled in very different ways.&lt;br/&gt;&lt;br/&gt;My answer is no. This is not about some subjective notion of language aesthetics, this is about the precautionary principle. Closures are not only about writing more concise code. Intuition and theory tell us for instance that closures are the basic building blocks of parallel programming (google for "pi-calculus"). You want to be able to express distributed computation as closures that are dispatched among different processors or computers. But this is just plain impossible if closures are able to modify arbitrary locations in their originating context. &lt;br/&gt;&lt;br/&gt;To put it shortly, the BGGA proposal for closures will go in the way of future language extension for parallel programming, which is the next "big thing" (most PCs sold today have 2 or 4 cores, and PCs with 100's of cores are not far away). The trade-off is between making a nice marketing announcement today and growing a language that will be able to handle multicore processing tomorrow.&lt;br/&gt;&lt;br/&gt;One reason for this misunderstanding is the ambiguous meaning of the word "closure", hence the quotes. As you have guessed, I strongly recommend to drop this term and use instead "function" and "macro".&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;See also my first comment on this topic on &lt;a href="http://gafter.blogspot.com/2007_04_01_archive.html"&gt;Neil Gafter's blog&lt;/a&gt; and &lt;a href="http://swik.net/Rails-Ruby/TechKnow+Zenze/Java+7:+The+Closure+Debate/vplv"&gt;a few references &lt;/a&gt;about closures in general.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3043798876461399350-5527043616217653077?l=ateji.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ateji.blogspot.com/feeds/5527043616217653077/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3043798876461399350&amp;postID=5527043616217653077' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/5527043616217653077'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/5527043616217653077'/><link rel='alternate' type='text/html' href='http://ateji.blogspot.com/2007/12/precautionary-principle.html' title='The precautionary principle'/><author><name>Patrick Viry</name><uri>http://www.blogger.com/profile/10442033581047493529</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_yjQMP8TlO50/SXT8zEl4a7I/AAAAAAAAANU/Adz-KJVwzlo/S220/photo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3043798876461399350.post-2555199841005501796</id><published>2007-11-07T03:35:00.001+01:00</published><updated>2009-01-19T23:53:13.891+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='optimj'/><title type='text'>In the deep end.</title><content type='html'>Hello from Seattle ! Lauching our product so far away from home has been an experience with its share of panicking moments, such as when our presentation material got lost somewhere between two airports. It was finally delivered just before the exhibit started and we opened our booth on time.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_yjQMP8TlO50/RzEmBLCPCXI/AAAAAAAAADs/Y5A4AUqcc0Q/s1600-h/PICT9522.JPG"&gt;&lt;img src="http://3.bp.blogspot.com/_yjQMP8TlO50/RzEmBLCPCXI/AAAAAAAAADs/Y5A4AUqcc0Q/s320/PICT9522.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5129923252135594354" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;During the first day we had representatives of most major players - we're talking world-class here - stopping at our booth. And many were enthusiastic about the product : « that's the way to go ! », they say. This has already translated into a dozen of qualified leads, articles in magazines with a world-wide audience, and a huge moral boost for the whole Ateji team.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_yjQMP8TlO50/RzEm_LCPCZI/AAAAAAAAAD8/aorhkUDQZR0/s1600-h/PICT9568.JPG"&gt;&lt;img src="http://3.bp.blogspot.com/_yjQMP8TlO50/RzEm_LCPCZI/AAAAAAAAAD8/aorhkUDQZR0/s320/PICT9568.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5129924317287483794" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Most french companies would first try to settle in their national market before attempting such a move. How strange. France would be about 2% of our market. Kick in other european countries and we may top 10%. Why building walls between yourself and your market? The fact that the product is developed in Paris is quite irrelevant. Even supporting clients on the other side of the globe is not much of an issue anymore using modern communication tools. I'd say it's more of a mental barrier.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_yjQMP8TlO50/RzEmRrCPCYI/AAAAAAAAAD0/3zqWTP2iJSQ/s1600-h/PICT9546.JPG"&gt;&lt;img src="http://1.bp.blogspot.com/_yjQMP8TlO50/RzEmRrCPCYI/AAAAAAAAAD0/3zqWTP2iJSQ/s320/PICT9546.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5129923535603435906" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Seattle is also  the place where you find the most Starbucks cafés and the most venture capitalists per square kilometer (note for the locals: a kilometer is a kind of celsius mile). Before we had even recovered from jet-lag, our first seafood dinner ended with an introduction to an influential VC. That is just unthinkable in Paris.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3043798876461399350-2555199841005501796?l=ateji.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ateji.blogspot.com/feeds/2555199841005501796/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3043798876461399350&amp;postID=2555199841005501796' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/2555199841005501796'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/2555199841005501796'/><link rel='alternate' type='text/html' href='http://ateji.blogspot.com/2007/11/in-deep-end.html' title='In the deep end.'/><author><name>Patrick Viry</name><uri>http://www.blogger.com/profile/10442033581047493529</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_yjQMP8TlO50/SXT8zEl4a7I/AAAAAAAAANU/Adz-KJVwzlo/S220/photo.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_yjQMP8TlO50/RzEmBLCPCXI/AAAAAAAAADs/Y5A4AUqcc0Q/s72-c/PICT9522.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3043798876461399350.post-1047455014317814149</id><published>2007-10-18T14:00:00.000+02:00</published><updated>2007-10-18T14:27:24.761+02:00</updated><title type='text'>The ever-expanding DSL syndrome</title><content type='html'>A DSL is a Domain Specific Language, a language designed for a particular application domain. You're likely to know already a few dozen DSLs : think of HTML, CSS and JavaFX (web), SQL (database), UML (modeling), COBOL and PL/1 (financial application), Fortran and Matlab (scientific applications), AutoCAD (3D design), Postscript (page design). Some more specialized DSLs are known only within their community :  MLFi (finance),  OPL, AMPL and GAMS (optimization), Lex and Yacc (parsing). Today there exist thousands of DSLs, and you could not imagine developing a software application without them. DSLs are important because they allow you to express quite directly the concepts you have in mind.&lt;br/&gt;&lt;br/&gt;Most DSLs are subject to what I call&lt;i&gt; &lt;/i&gt;&lt;i&gt;the ever-expanding DSL syndrom&lt;/i&gt;e : they come into existence as&lt;i&gt;“small”&lt;/i&gt; languages specifically designed for expressing concepts specific to an application domain (they are often designed in-house by the domain experts, not by language specialists). But DSL users soon feel the need to express arbitrary expressions, to have access to more and more library functions, to access databases and web browsers, to handle programming-in-the-large via e.g. powerful type systems and modularization, to have better tools support, and so on. &lt;br/&gt;&lt;br/&gt;As a result, DSL users are always waiting for a new feature, while DSL developers try to catch on by expanding the language and/or adding tool support, getting engaged in a never-ending spiral, in effect developing a general purpose language with a full-blown programming environment. This resulting language is obviously incompatible with anything existing, and is quite often plagued with quality problems and poor tooling support.&lt;br/&gt;&lt;br/&gt;As an example, let us look at the new features advertised for existing modeling languages. The following excerpts are taken from the respective manufacturer's web sites : you will note that all the features mentioned here are unrelated to the domain of modeling, and are already present in mainstream general-purpose languages.&lt;br/&gt;&lt;ul&gt;&lt;br/&gt;&lt;li&gt;AIMMS :&lt;br/&gt;&lt;ul&gt;&lt;br/&gt;&lt;li&gt;Web services &lt;br/&gt;&lt;/ul&gt;&lt;br/&gt;&lt;li&gt;AMPL :&lt;br/&gt;&lt;ul&gt;&lt;br/&gt;&lt;li&gt;Character strings&lt;br/&gt;&lt;li&gt;Database access&lt;br/&gt;&lt;li&gt;Looping and testing (writing "scripts")&lt;br/&gt;&lt;li&gt;Reporting and display&lt;br/&gt;&lt;/ul&gt;&lt;br/&gt;&lt;li&gt;GAMS :&lt;br/&gt;&lt;ul&gt;&lt;br/&gt;&lt;li&gt;Conditional statements&lt;br/&gt;&lt;/ul&gt;&lt;br/&gt;&lt;li&gt;OPL :&lt;br/&gt;&lt;ul&gt;&lt;br/&gt;&lt;li&gt;Connection with spreadsheets and relational databases&lt;br/&gt;&lt;li&gt;Scripting&lt;br/&gt;&lt;li&gt;Interactive development environment&lt;br/&gt;&lt;li&gt;External function calls&lt;br/&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;br/&gt;On the contrary, Ateji believes in designing DSLs that are &lt;i&gt;"large"&lt;/i&gt; languages, namely DSLs designed as extensions of mainstream generalist languages. Rather than starting with a few domain-specific concepts and progressively  adding additional features, we start with a full-featured general-purpose language and add domain-specific concepts.&lt;br/&gt;&lt;br/&gt;The difference is striking : you will never complain again that your DSL doesn't allow you to add 1+1 (think CSS), since it already has all the features of a large programming language. Additional benefits are integration at the language level (DSL code and application code work on the same objects) and availability of state-of-the-art development environment and tools.&lt;br/&gt;&lt;br/&gt;DSLs as extensions of mainstream languages also have a very fast learning curve. If you know the mainstream language, you'll only have to learn a few additional concepts. If you're a domain expert, you'll find a familiar language expressing the concepts of your domain. In both cases, you won't  need to learn yet another  different way of writing 1+1.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3043798876461399350-1047455014317814149?l=ateji.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ateji.blogspot.com/feeds/1047455014317814149/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3043798876461399350&amp;postID=1047455014317814149' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/1047455014317814149'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/1047455014317814149'/><link rel='alternate' type='text/html' href='http://ateji.blogspot.com/2007/10/ever-expanding-dsl-syndrome.html' title='The ever-expanding DSL syndrome'/><author><name>Patrick Viry</name><uri>http://www.blogger.com/profile/10442033581047493529</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_yjQMP8TlO50/SXT8zEl4a7I/AAAAAAAAANU/Adz-KJVwzlo/S220/photo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3043798876461399350.post-3115401974107900651</id><published>2007-10-11T00:44:00.000+02:00</published><updated>2007-10-11T01:24:25.508+02:00</updated><title type='text'>Preparing for Seattle</title><content type='html'>Ateji will be holding a booth at the &lt;a href="http://meetings.informs.org/Seattle07/"&gt;Informs&lt;/a&gt; conference in Seattle, Nov. 4th to 8th. This is our first booth abroad, we'll be introducing our &lt;a href="http://www.ateji.com/"&gt;OptimJ&lt;/a&gt; language to the &lt;a href="http://en.wikipedia.org/wiki/Operational_research"&gt;operational research&lt;/a&gt; community.&lt;br/&gt;&lt;br/&gt;When you discover all the work this implies, developing software looks easy in retrospect. Of course, we first made sure the product works fine by running a large-scale beta-test program. Software developpers can still handle this.&lt;br/&gt;&lt;br/&gt;But then you need to prepare brochures&lt;i&gt; (how many ?)&lt;/i&gt;, brush up your english &lt;i&gt;(can you ripit plize ?)&lt;/i&gt;, prepare your speech for the plenary session &lt;i&gt;(sorry everybody, I promise, my demo used to work until 5min ago)&lt;/i&gt;, make reservations for chairs and tables&lt;i&gt; (apparently cheaper to buy and throw away than rent for 4 days)&lt;/i&gt;, understand the union regulations &lt;i&gt;(it is strictly forbidden to carry yourself your own luggage between the entrance door and the booth, but the 10,000kms before reaching the entrance door are ok)&lt;/i&gt;, think about the booth décor, print posters, try to find an insurance company for civil liability &lt;i&gt;(french companies simply don't want to ensure an event abroad -- I'm still looking, in case you know someone who can help)&lt;/i&gt;, set up appointments with the press, and most important, research what kind of french sweets would be most successful in attracting prospective customers around our booth &lt;i&gt;(provided the customs don't consider them as potentially lethal).&lt;/i&gt; &lt;br/&gt;&lt;br/&gt;I used to work as a researcher, and even published a few involved theorems. A breeze. I managed the transition to becoming an engineer and now an entrepreneur. Cool. But setting up a booth in a conference is about to knock me down.&lt;br/&gt;&lt;br/&gt;Well, I'll sleep in the plane. See you in Seattle !&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3043798876461399350-3115401974107900651?l=ateji.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ateji.blogspot.com/feeds/3115401974107900651/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3043798876461399350&amp;postID=3115401974107900651' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/3115401974107900651'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/3115401974107900651'/><link rel='alternate' type='text/html' href='http://ateji.blogspot.com/2007/10/preparing-for-seattle.html' title='Preparing for Seattle'/><author><name>Patrick Viry</name><uri>http://www.blogger.com/profile/10442033581047493529</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_yjQMP8TlO50/SXT8zEl4a7I/AAAAAAAAANU/Adz-KJVwzlo/S220/photo.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3043798876461399350.post-2928514761225238207</id><published>2007-10-07T22:08:00.001+02:00</published><updated>2007-11-14T15:16:32.009+01:00</updated><title type='text'>Code generators</title><content type='html'>I have often been asked "After all, what you provide is a code generator ?". Well, yes and no.&lt;br/&gt;&lt;br/&gt;Yes, because every compiler is a code generator. Whether you generate assembly code, virtual machine instructions or source code doesn't make much a difference, as far as execution of the program is concerned.&lt;br/&gt;&lt;br/&gt;No, because the words "code generator" convey the idea that the "true" source code is the generated code, not the one you wrote. If you have ever played with a code generator, you have certainly noticed how little support there is for your &lt;i&gt;original&lt;/i&gt; source code. You have probably felt the need to patch the &lt;i&gt;generated&lt;/i&gt; code, and you have probably complained about the lack of tool support (think about debugging) at the &lt;i&gt;original&lt;/i&gt; source level.&lt;br/&gt;&lt;br/&gt;At Ateji we're indeed generating source code, for one specific reason : generating source code enables the reuse of all legacy software engineering tools and techniques available in the Java ecosystem. It would actually have been easier to directy generate byte code for the JVM. But you never actually see the generated code : our languages extend Java or other mainstream general-purpose languages, so you won't ever need to patch the generated code. Our languages are integrated at the IDE level, so that you always work directly with the original source code that you wrote.&lt;br/&gt;&lt;br/&gt;This is why we never use the word "code generator" when referring to our products : the generated source code does indeed exist, but is only an engineering artefact.&lt;br/&gt;&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3043798876461399350-2928514761225238207?l=ateji.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ateji.blogspot.com/feeds/2928514761225238207/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3043798876461399350&amp;postID=2928514761225238207' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/2928514761225238207'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/2928514761225238207'/><link rel='alternate' type='text/html' href='http://ateji.blogspot.com/2007/10/code-generators.html' title='Code generators'/><author><name>Patrick Viry</name><uri>http://www.blogger.com/profile/10442033581047493529</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_yjQMP8TlO50/SXT8zEl4a7I/AAAAAAAAANU/Adz-KJVwzlo/S220/photo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3043798876461399350.post-3039617059402176128</id><published>2007-10-05T16:51:00.001+02:00</published><updated>2009-01-19T23:53:35.823+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ateji'/><title type='text'>What's in a name</title><content type='html'>&lt;br/&gt;Choosing &lt;span&gt;&lt;span&gt;&lt;span&gt;Ateji®&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;  ("ah-teh-gee") as a company name came quite naturally : it relates to my personal experience (I used to live in Japan, and even spent some time teaching japanese language), and it reflects quite well the goal we are trying to achieve.&lt;br/&gt;&lt;br/&gt;An ateji is a japanese technique for associating ideographics characters with words (http://en.wikipedia.org/wiki/Ateji). A computer scientist would say associating &lt;i&gt;syntax&lt;/i&gt; with &lt;i&gt;semantics&lt;/i&gt;.&lt;br/&gt;&lt;br/&gt;When the japanese began importing chinese characters, they had basically two choices : import the chinese reading (more precisely a japanized version of the chinese pronunciation) together with the characters, or use the chinese characters to denote the existing japanese words with their existing pronunciation. Both versions are still common today.&lt;br/&gt;&lt;br/&gt;But the two languages do not always agree on what is a word. 'Otona' is the original japanese word for adult, written with the two chinese characters 'Big' + 'Person' : there is no way to cut 'otona' in two pieces in order to account for the two characters. This is the typical example of an ateji. Another example of an ateji is a kind of rebus, where unrelated characters are used on purpose to introduce some additional nuance. 'Kurabu', written with the kanjis 'Ku' (together), 'Ra' (fun) and 'Bu' (group), is a word created at the end of the 19th century to convey the meaning of 'club' while preserving a sound close to the original english pronunciation.&lt;br/&gt;&lt;br/&gt;As you see, bringing together sound (syntax) and meaning (semantics) can be quite tricky, but also can provide deep insight when they are cleverly designed. This is precisely what we are trying to do at &lt;span&gt;&lt;span&gt;&lt;span&gt;Ateji®&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; : design languages where you can express what you need to express, bringing the important semantic concepts at the language level, while making sure syntax doesn't go in the way.&lt;br/&gt; &lt;br/&gt;&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3043798876461399350-3039617059402176128?l=ateji.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ateji.blogspot.com/feeds/3039617059402176128/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3043798876461399350&amp;postID=3039617059402176128' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/3039617059402176128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3043798876461399350/posts/default/3039617059402176128'/><link rel='alternate' type='text/html' href='http://ateji.blogspot.com/2007/10/whats-in-name.html' title='What&apos;s in a name'/><author><name>Patrick Viry</name><uri>http://www.blogger.com/profile/10442033581047493529</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_yjQMP8TlO50/SXT8zEl4a7I/AAAAAAAAANU/Adz-KJVwzlo/S220/photo.png'/></author><thr:total>0</thr:total></entry></feed>
