<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>A Concurrent Affair</title>
	<atom:link href="http://www.concurrentaffair.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.concurrentaffair.org</link>
	<description>Blog about Mathias&#039; work and play.</description>
	<lastBuildDate>Thu, 04 Mar 2010 22:49:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Mint Talk at Purdue</title>
		<link>http://www.concurrentaffair.org/2010/03/04/mint-talk-at-purdue/</link>
		<comments>http://www.concurrentaffair.org/2010/03/04/mint-talk-at-purdue/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 22:49:55 +0000</pubDate>
		<dc:creator>Mathias</dc:creator>
				<category><![CDATA[Mint]]></category>

		<guid isPermaLink="false">http://www.concurrentaffair.org/?p=1698</guid>
		<description><![CDATA[I&#8217;m visiting my friend Luke at Purdue after SIGCSE, and we arranged for me to give a talk to the CS department.

If you have the chance, come grill me on Monday, March 15, 2010 at 3:30 PM.

Computer Science Colloquia
Mint: A Multi-stage Extension of Java
Mr. Mathias Ricken
Rice University
LWSN 3102 A/B
Monday, March 15, 2010
3:30 p.m. &#8211; 4:30 [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m visiting my friend Luke at Purdue after SIGCSE, and we arranged for me to give a <a href="http://calendar.cs.purdue.edu/calendar/webevent.cgi?cmd=showevent&#038;id=4830">talk to the CS department</a>.</p>

<p>If you have the chance, come grill me on Monday, March 15, 2010 at 3:30 PM.</p>

<blockquote>Computer Science Colloquia<br />
Mint: A Multi-stage Extension of Java<br />
Mr. Mathias Ricken<br />
Rice University<br />
LWSN 3102 A/B<br />
Monday, March 15, 2010<br />
3:30 p.m. &#8211; 4:30 p.m.<br />
<br />
Complete Description:<br />
Abstract:<br />
Multi-stage programming (MSP) provides a safe way of generating code at run-time. In mostly-functional languages like MetaOCaml, this has been used to reduce the performance penalties of abstractions such as loops, recursion or interpretation. The main advantage of MSP compared to other techniques, such as string or LISP quotations, is that MSP guarantees type safety for the generated code statically, at the time the program is compiled.<br />
<br />
Unfortunately, MSP is difficult to combine with imperative features found in most mainstream languages like Java. The central problem is &#8220;scope extrusion&#8221;, which may accidentally move variables outside the scopes in which they are bound, leading to run-time errors in the generated code. This problem can be prevented if code in escapes (or &#8220;anti-quotes&#8221;) is &#8220;weakly separable&#8221;, i.e. the computational effects occurring inside an escape that are visible from the outside do not involve code.<br />
<br />
We have formalized a type system, based on Lightweight Java, that uses weak separability to prevent scope extrusion, and we have proved that the type system is sound. We have also developed an implementation called Mint to demonstrate the expressivity of the type system and the performance benefits MSP can provide in an imperative setting. Since our implementation extends the Java language, our work is accessible to mainstream programmers.<br />
<br />
This talk is based on work will be presented at the Conference on Programming Language Design and Implementation (PLDI 2010). More information is available at http://mint.concutest.org/<br />
<br />
<br />
Bio:<br />
Mathias Ricken is a doctoral candidate in the Programming Languages Team at Rice University and one of the principal developers of the DrJava integrated development environment. His research interests include concurrent programming, extending the Java language, and computer science education. He is the developer of the Concutest concurrent unit testing framework and has created various experimental extensions of Java to address, for instance, programming with meta-data. Currently, Mathias is contributing to Mint, a multi-stage
extension of Java that allows safe and expressive statically typed program generation and specialization in an imperative language setting.<br />
<br />
Faculty and students wishing to speak privately with Mr. Ricken should contact Jan Vitek at jv@cs.purdue.edu.</blockquote>

<p>I&#8217;m a bit relieved that the sentence &#8220;He also has a weakness for Lady Gaga videos.&#8221; was left out of the bio.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.concurrentaffair.org/2010/03/04/mint-talk-at-purdue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>10.4 Programs, A Dying Breed</title>
		<link>http://www.concurrentaffair.org/2010/03/02/10-4-programs-a-dying-breed/</link>
		<comments>http://www.concurrentaffair.org/2010/03/02/10-4-programs-a-dying-breed/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 17:38:45 +0000</pubDate>
		<dc:creator>Mathias</dc:creator>
				<category><![CDATA[Ramblings]]></category>

		<guid isPermaLink="false">http://www.concurrentaffair.org/?p=1693</guid>
		<description><![CDATA[MacOS 10.4-compatible programs really are a dying breed. First, VLC stopped supporting 10.4 in new versions (last 10.4-compatible version is release 0.9.10), then Eclipse stopped supporting 10.4, and now VirtualBox has dropped support for 10.4 as well (last 10.4-compatible version is 3.0.12). I guess it&#8217;s high time for a new MacBook (Pro), but I want [...]]]></description>
			<content:encoded><![CDATA[<p>MacOS 10.4-compatible programs really are a dying breed. First, <a href="http://www.videolan.org/vlc/download-macosx.html">VLC</a> stopped supporting 10.4 in new versions (last 10.4-compatible version is release 0.9.10), then <a href="http://www.eclipse.org/projects/project-plan.php?projectid=eclipse#target_environments">Eclipse</a> stopped supporting 10.4, and now <a href="http://www.virtualbox.org/ticket/6036">VirtualBox</a> has dropped support for 10.4 as well (last 10.4-compatible version is 3.0.12). I guess it&#8217;s high time for a new <a href="http://gizmodo.com/5287179/macbook-pro-2009-review">MacBook (Pro)</a>, but I want to wait for the <a href="http://buyersguide.macrumors.com/#MacBook_Pro">next update</a>.</p>

<p>You may ask why I don&#8217;t just install MacOS 10.5 or 10.6. As I explained <a href="http://www.concurrentaffair.org/2010/01/22/it-hell/">before</a>, because Apple doesn’t support Java 6 on 32-bit Macs. I have a first-generation Intel MacBook (Core Duo, not Core 2 Duo), and I need Java 6.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.concurrentaffair.org/2010/03/02/10-4-programs-a-dying-breed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Review: DrJava &#8211; A Simple IDE For Beginners</title>
		<link>http://www.concurrentaffair.org/2010/02/28/review-drjava-a-simple-ide-for-beginners/</link>
		<comments>http://www.concurrentaffair.org/2010/02/28/review-drjava-a-simple-ide-for-beginners/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 02:52:58 +0000</pubDate>
		<dc:creator>Mathias</dc:creator>
				<category><![CDATA[DrJava]]></category>

		<guid isPermaLink="false">http://www.concurrentaffair.org/?p=1689</guid>
		<description><![CDATA[I found a nice review of DrJava today, written by Julian Jaic.

DrJava is a simple and light IDE for Java development. It is a free, open source IDE primarily designed for students. But it also includes powerful features for more advanced users. It has integrated debuggers, support unit testing with Junit and tools to generate [...]]]></description>
			<content:encoded><![CDATA[<p>I found a nice <a href="http://ezinearticles.com/?DrJava---A-Simple-IDE-For-Beginners&#038;id=3371747">review of DrJava</a> today, written by <a href="http://ezinearticles.com/?expert=Julian_Jaic">Julian Jaic</a>.</p>

<blockquote>DrJava is a simple and light IDE for Java development. It is a free, open source IDE primarily designed for students. But it also includes powerful features for more advanced users. It has integrated debuggers, support unit testing with Junit and tools to generate javadocs. DrJava is available for multiple platforms, including Windows, Linux, and Macintosh.<br />
<br />
DrJava is an ongoing project at Rice University, Texas, developed and maintain by students. DrJava shares the goal of providing a preparatory training environment that decreases the fear factor experienced by beginning students. This project provides an interface that is simple, interactive, and with a focus on the language.<br />
<br />

<strong>REPL &#8211; Read Eval Print Loop</strong><br />
<br />

The eminent feature of DrJava is the &#8216;interactions pane,&#8217; a &#8216;read-eval-print loop&#8217; (REPL) for evaluating Java expressions and statements interactively. Functional languages such as &#8216;Scheme&#8217; have long used Read Eval Print Loop. That make easy program development. Users experiment with Java constructs by typing an expression or statement will compile immediately without having a complete java code. REPL makes it possible to completely avoid the difficulties of Java I/O at the introductory level by using parameters and function return values. The interface is text based, and does require using Java syntax. This design was deliberately chosen so that only a single medium is required for dealing with program development, in contrast to the combination of UML and Java source code. Interactions can easily process graphic objects.<br />
<br />

<strong>User Interface</strong><br />
<br />

DrJava keep up a focus on Java and it gives two components, a definitions pane and an interactions pane in a &#8217;single window environment&#8217;. In definitions pane, when a class is compiled, it is directly available in the interactions pane for another uses. The Read Eval Print Loop features of the interactions pane boost understandable functional programming in association with the object-oriented model. The interactions pane keeps a history for comfortably recollecting the already inserted commands. This decreases the typing needed when going for experiential evaluations.<br />
<br />

A Lift Current Interaction to Definitions command copies an interaction into the editor. This gives a comfortable way to move experiential tests into a JUnit test to make them repeatable. Since each class method can be executed independently, the interactions pane is an impressive tool for small testing and troubleshooting. It also contains a debugger that helps adding breakpoints and explaining watches. In debug mode when execution is break up at a breakpoint, the interactions pane can be used to check or modify state variables using Java statements and expressions. Again the design approach was to maintain an easy and steady interface throughout. It&#8217;s compiler shows all syntax errors by parsing the file. Clicking an error message highlights the error in the source code.<br />
<br />

Dr.Java&#8217;s editor supplies automatic braces /parenthesis matching, comment /quotation highlighting and indentation that is refreshed in every keypress. A complete Java class can properly formated by an &#8216;Indent lines&#8217; command. The editor supports several documents but does not arrange files into projects. To organize files, it is necessary to use the operating system&#8217;s file management facilities. Another features of DrJava contain built-in support for JUnit test cases creation of javadoc and it&#8217;s preview.<br />
<br />

DrJava&#8217;s developers suggest that the IDE is useful beyond the beginner level, and cite advanced courses at Rice University that feature projects for extending the tool. One such project produced a DrJava plugin available for the Eclipse IDE that should ease the transition to the more powerful features of a professional IDE.<br />
<br />

IDE&#8217;s are very important tools for easing the entry of students into software development courses. Dr.Java serve easy interfaces especially designed for teaching. It encourage cumulative development and associative experimentation, which will possibly the most important feature of this IDE. DrJava provide excellent options for simple entry level software development in Java. DrJava has a cleaner and easier interface that manages a focus on the Java language.<br />
<br />

Julian is a professional content writer on <a href="http://www.telious.com/">software development</a> and now working at Telious Technologies.<br />
<br />

Article Source: <a href="http://ezinearticles.com/?expert=Julian_Jaic">http://EzineArticles.com/?expert=Julian_Jaic</a></blockquote>

<p>Thanks, Julian! Actually, DrJava does have a <a href="http://drjava.org/index.php?page=docs/user/ch04.html">project facility</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.concurrentaffair.org/2010/02/28/review-drjava-a-simple-ide-for-beginners/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ReLooper for DrJava?</title>
		<link>http://www.concurrentaffair.org/2010/02/27/relooper-for-drjava/</link>
		<comments>http://www.concurrentaffair.org/2010/02/27/relooper-for-drjava/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 14:37:52 +0000</pubDate>
		<dc:creator>Mathias</dc:creator>
				<category><![CDATA[DrJava]]></category>
		<category><![CDATA[Ramblings]]></category>

		<guid isPermaLink="false">http://www.concurrentaffair.org/?p=1686</guid>
		<description><![CDATA[I received a message from Danny Dig, the project lead of the ReLooper project. ReLooper is a refactoring tool  that enables Java programmers to parallelize loops over arrays or vectors using Java&#8217;s upcoming ParallelArray framework. I assume Danny searched for all Java projects on SourceForge and contacted all &#8220;expert programmers&#8221; of those projects.

I know [...]]]></description>
			<content:encoded><![CDATA[<p>I received a message from Danny Dig, the project lead of the <a href="http://refactoring.info/tools/ReLooper">ReLooper</a> project. ReLooper is a refactoring tool  that enables Java programmers to parallelize loops over arrays or vectors using Java&#8217;s upcoming <code class="codecolorer text mac-classic"><span class="text">ParallelArray</span></code> framework. I assume Danny searched for all Java projects on SourceForge and contacted all &#8220;expert programmers&#8221; of those projects.</p>

<p>I know Corky received the message, too, and we both came to the conclusion that there
aren&#8217;t many parts suitable for this kind of optimization. It would be nice if indenting and &#8220;Find All&#8221; were the operations could be sped up.</p>

<p>With indenting, there is the problem that indenting one line depends on how the previous lines were indented. I&#8217;m not sure how this would be split up and parallelized. &#8220;Find all&#8221; is in theory easier to parallelize, but right now, it is tied very much into our single-document model. Changing this would be a good thing &#8212; it would allow us to cancel a &#8220;Find all&#8221; operation, too, &#8212; but it is a delicate task.</p>

<p>From what I understand, ReLooper transforms ASTs in Eclipse. It also seems like it needs an array to work on (at least automatically). I don&#8217;t know if it is able to cut through classes like <code class="codecolorer text mac-classic"><span class="text">ArrayList</span></code> to the underlying array. The string representation in <code class="codecolorer text mac-classic"><span class="text">DefinitionsDocuments</span></code> may be suitable, but then again the list structure in the reduced model is connected to it.</p>

<p>ReLooper evokes a similar response in me as Dave Patterson&#8217;s talk did: This may work in many programs that really crunch data, but I expect will break down when those algorithms need to be tied together and connected to a GUI.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.concurrentaffair.org/2010/02/27/relooper-for-drjava/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Short, Non-Technical Talks Are Hard</title>
		<link>http://www.concurrentaffair.org/2010/02/25/short-non-technical-talks-are-hard/</link>
		<comments>http://www.concurrentaffair.org/2010/02/25/short-non-technical-talks-are-hard/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 00:43:20 +0000</pubDate>
		<dc:creator>Mathias</dc:creator>
				<category><![CDATA[Concurrent Unit Testing]]></category>
		<category><![CDATA[Graduate School]]></category>

		<guid isPermaLink="false">http://www.concurrentaffair.org/?p=1682</guid>
		<description><![CDATA[I just gave my talk Testing Concurrent Programs, A 7-Minute Jargon-Free Introduction to the students of the Thesis Writing Seminar of the School of Engineering here at Rice. It went very well, but I&#8217;ve got to say that this was probably the most difficult talk I&#8217;ve had to prepare.

It is a 7-minute talk to an [...]]]></description>
			<content:encoded><![CDATA[<p>I just gave my talk <a href="http://www.concurrentaffair.org/2010/02/25/presentation-testing-concurrent-programs-a-7-minute-jargon-free-introduction/">Testing Concurrent Programs, A 7-Minute Jargon-Free Introduction</a> to the students of the <a href="http://engr.rice.edu/content.aspx?id=2052">Thesis Writing Seminar</a> of the School of Engineering here at Rice. It went very well, but I&#8217;ve got to say that this was probably the most difficult talk I&#8217;ve had to prepare.</p>

<p>It is a 7-minute talk to an audience of smart engineering graduate students who generally are in all kinds of different fields. You can&#8217;t really use jargon or assume too much background knowledge and be too technical, otherwise you might lose your audience. You also can&#8217;t spend too much time explaining concepts. And at eight minutes, you get cut off.</p>

<p>I&#8217;ve really had to cut the number of slides down, gloss over a few things, and unfortunately also ignore some achievements that I think are really cool, like the reachability check of the join graph, which prevents &#8220;lucky&#8221; threads. Because of the extremely short time, practicing the talk pays off a lot, because your explanations just have to work. You don&#8217;t have time to start over.</p>

<p>The talk went very well and received unanimously positive feedback. What people liked the most was that it was virtually jargon-free, that the animations were simple and helpful, and that I was able to simplify the concepts and make them accessible to non-computer scientists without talking down to them.</p>

<p>Again, I finished working on the presentation only an hour before the talk, and my delivery definitely could have benefited from more time to practice. I also still haven&#8217;t figured out how to take a sip of water while giving a talk, but seven minutes fortunately were not long enough to develop a serious case of dry mouth.</p>

<p>Interestingly, Rui Zhang&#8217;s talk about software transactional memory was next, and my talk served as a good introduction.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.concurrentaffair.org/2010/02/25/short-non-technical-talks-are-hard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Presentation: Testing Concurrent Programs, A 7-Minute Jargon-Free Introduction</title>
		<link>http://www.concurrentaffair.org/2010/02/25/presentation-testing-concurrent-programs-a-7-minute-jargon-free-introduction/</link>
		<comments>http://www.concurrentaffair.org/2010/02/25/presentation-testing-concurrent-programs-a-7-minute-jargon-free-introduction/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 00:25:57 +0000</pubDate>
		<dc:creator>Mathias</dc:creator>
				<category><![CDATA[Publications]]></category>

		<guid isPermaLink="false">http://www.concurrentaffair.org/?p=1677</guid>
		<description><![CDATA[Testing Concurrent Programs, A 7-Minute Jargon-Free Introduction
(PowerPoint, view embedded)

Where: Rice University School of Engineering, Thesis Writing Seminar
When: February 25, 2010

A 7-minute jargon-free introduction to the problems of testing concurrent programs, and a proposal for a solution, with non-computer science engineering graduate students as intended audience.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.cs.rice.edu/~mgricken/research/concutest/download/TWS-Ricken-Concutest-2010-02-25.ppt">Testing Concurrent Programs, A 7-Minute Jargon-Free Introduction</a><br />
(PowerPoint, <a href="http://www.cs.rice.edu/~mgricken/research/concutest/view-pdf.shtml?http://www.cs.rice.edu/~mgricken/research/concutest/download/TWS-Ricken-Concutest-2010-02-25.ppt">view embedded</a>)<br /></p>

<p>Where: Rice University School of Engineering, <a href="http://engr.rice.edu/content.aspx?id=2052">Thesis Writing Seminar</a><br />
When: February 25, 2010</p>

<p>A 7-minute jargon-free introduction to the problems of testing concurrent programs, and a proposal for a solution, with non-computer science engineering graduate students as intended audience.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.concurrentaffair.org/2010/02/25/presentation-testing-concurrent-programs-a-7-minute-jargon-free-introduction/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>1.6.0_18 Seems to Have Fixed Bug</title>
		<link>http://www.concurrentaffair.org/2010/02/18/1-6-0_18-seems-to-have-fixed-bug/</link>
		<comments>http://www.concurrentaffair.org/2010/02/18/1-6-0_18-seems-to-have-fixed-bug/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 18:11:07 +0000</pubDate>
		<dc:creator>Mathias</dc:creator>
				<category><![CDATA[DrJava]]></category>

		<guid isPermaLink="false">http://www.concurrentaffair.org/?p=1667</guid>
		<description><![CDATA[Java&#8217;s latest version, JDK 1.6.0 Update 18, seems to have fixed the most frequent DrJava bug report, which Corky determined to be Sun&#8217;s problem (Oracle&#8217;s problem now). We have been filing all of the bug reports as duplicates of bug 2831821&#8243;Caret updating is broken&#8221;.

So far, there hasn&#8217;t been a single bug report describing the same [...]]]></description>
			<content:encoded><![CDATA[<p>Java&#8217;s latest version, <a href="http://java.sun.com/javase/downloads/widget/jdk6.jsp">JDK 1.6.0 Update 18</a>, seems to have fixed <a href="http://www.concurrentaffair.org/2009/10/08/drjavas-most-annoying-bug-is-suns-jvm-bug/">the most frequent DrJava bug report, which Corky determined to be Sun&#8217;s problem</a> (Oracle&#8217;s problem now). We have been filing all of the bug reports as duplicates of <a href="https://sourceforge.net/tracker/?func=detail&#038;atid=438935&#038;aid=2831821&#038;group_id=44253">bug 2831821&#8243;Caret updating is broken&#8221;</a>.</p>

<p>So far, there hasn&#8217;t been a single bug report describing the same symptoms that used 1.6.0_18. Here are links to SourceForge tracker searches:</p>

<ul>
    <li><a href="https://sourceforge.net/search/index.php?group_id=44253&#038;words=details%3A%28%2B1.6.0_18%29+AND+all_comments%3A%28%2BCaret+%2Bupdating+%2Bis+%2Bbroken%29&#038;type_of_search=artifact&#038;pmode=0&#038;words=1.6.0_18+AND+all_comments%3A%28%2BCaret+%2Bupdating+%2Bis+%2Bbroken%29&#038;Search=Search">&#8220;1.6.0_18&#8243; and &#8220;Caret updating is broken&#8221; in comments</a>: 0 items</li>
    <li><a href="https://sourceforge.net/search/index.php?group_id=44253&#038;words=details%3A%28%2Bjava.version+NOT+1.6.0_18%29+AND+all_comments%3A%28%2BCaret+%2Bupdating+%2Bis+%2Bbroken%29&#038;type_of_search=artifact&#038;pmode=0&#038;words=java.version+NOT+1.6.0_18+AND+all_comments%3A%28%2BCaret+%2Bupdating+%2Bis+%2Bbroken%29&#038;Search=Search">no &#8220;1.6.0_18&#8243; and &#8220;Caret updating is broken&#8221; in comments</a>: 35 items</li>
    <li><a href="https://sourceforge.net/search/index.php?group_id=44253&#038;words=details%3A%28%2B1.6.0_17%29+AND+all_comments%3A%28%2BCaret+%2Bupdating+%2Bis+%2Bbroken%29&#038;type_of_search=artifact&#038;pmode=0&#038;words=1.6.0_17+AND+all_comments%3A%28%2BCaret+%2Bupdating+%2Bis+%2Bbroken%29&#038;Search=Search">&#8220;1.6.0_17&#8243; and &#8220;Caret updating is broken&#8221; in comments</a>: 10 items</li>
    <li><a href="https://sourceforge.net/search/index.php?group_id=44253&#038;words=details%3A%28%2B1.6.0_16%29+AND+all_comments%3A%28%2BCaret+%2Bupdating+%2Bis+%2Bbroken%29&#038;type_of_search=artifact&#038;pmode=0&#038;words=1.6.0_16+AND+all_comments%3A%28%2BCaret+%2Bupdating+%2Bis+%2Bbroken%29&#038;Search=Search">&#8220;1.6.0_16&#8243; and &#8220;Caret updating is broken&#8221; in comments</a>: 17 items</li>
    <li><a href="https://sourceforge.net/search/index.php?group_id=44253&#038;words=1.6.0_16+AND+all_comments%3A%28%2BCaret+%2Bupdating+%2Bis+%2Bbroken%29&#038;type_of_search=artifact&#038;pmode=0&#038;words=1.6.0_15+AND+all_comments%3A%28%2BCaret+%2Bupdating+%2Bis+%2Bbroken%29&#038;Search=Search">&#8220;1.6.0_15&#8243; and &#8220;Caret updating is broken&#8221; in comments</a>: 3 items</li>
    <li><a href="https://sourceforge.net/search/index.php?group_id=44253&#038;words=1.6.0_15+AND+all_comments%3A%28%2BCaret+%2Bupdating+%2Bis+%2Bbroken%29&#038;type_of_search=artifact&#038;pmode=0&#038;words=1.6.0_14+AND+all_comments%3A%28%2BCaret+%2Bupdating+%2Bis+%2Bbroken%29&#038;Search=Search">&#8220;1.6.0_14&#8243; and &#8220;Caret updating is broken&#8221; in comments</a>: 3 items</li>
    <li>Bugs <a href="https://sourceforge.net/tracker/index.php?func=detail&#038;aid=2867539&#038;group_id=44253&#038;atid=438935">2867539</a> and <a href="https://sourceforge.net/tracker/index.php?func=detail&#038;aid=2867540&#038;group_id=44253&#038;atid=438935">2867540</a> use 1.6.0_16 but for some reason don&#8217;t appear in the searches above.</li>
    <li><a href="https://sourceforge.net/search/index.php?group_id=44253&#038;words=details%3A%28%2B1.6.0_15%29+AND+all_comments%3A%28%2BCaret+%2Bupdating+%2Bis+%2Bbroken%29&#038;type_of_search=artifact&#038;pmode=0&#038;words=all_comments%3A%28%2BCaret+%2Bupdating+%2Bis+%2Bbroken%29&#038;Search=Search">&#8220;Caret updating is broken&#8221; in comments</a>: 35 items</li>
</ul>

<p>That covers all 35 duplicate bug reports we have received.</p>

<p>It&#8217;s difficult to definitively check that a bug that only happened sporadically has indeed been fixed, and fixed by someone else without any involvement by us, but I think I&#8217;ll close the bug report.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.concurrentaffair.org/2010/02/18/1-6-0_18-seems-to-have-fixed-bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Mint Release: r15116</title>
		<link>http://www.concurrentaffair.org/2010/02/17/new-mint-release-r15116/</link>
		<comments>http://www.concurrentaffair.org/2010/02/17/new-mint-release-r15116/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 03:44:48 +0000</pubDate>
		<dc:creator>Mathias</dc:creator>
				<category><![CDATA[Mint]]></category>

		<guid isPermaLink="false">http://www.concurrentaffair.org/?p=1664</guid>
		<description><![CDATA[I just created a new release of Mint and DrJava with Mint: February 17, 2010 (r15116). The release is available from the Mint implementation page:


    JavaMint-r15116.tar.gz
    JavaMint-r15116-binaries.zip
    drjava-r5178-mint-r15116.jar


There were some small changes in the approximation of weak separability to make the implementation match improvements in the [...]]]></description>
			<content:encoded><![CDATA[<p>I just created a new release of <a href="http://www.javamint.org/">Mint</a> and <a href="http://www.cs.rice.edu/~mgricken/research/mint/index.shtml">DrJava with Mint</a>: February 17, 2010 (r15116). The release is available from the Mint implementation page:</p>

<ul>
    <li><a href="http://plresearch.org/twiki/pub/ProgrammingLanguages/JavaMint/JavaMint-r15116.tar.gz">JavaMint-r15116.tar.gz</a></li>
    <li><a href="http://plresearch.org/twiki/pub/ProgrammingLanguages/JavaMint/JavaMint-r15116-binaries.zip">JavaMint-r15116-binaries.zip</a></li>
    <li><a href="http://www.cs.rice.edu/%7Emgricken/research/mint/download/drjava-r5178-mint-r15116.jar">drjava-r5178-mint-r15116.jar</a></li>
</ul>

<p>There were some small changes in the approximation of weak separability to make the implementation match improvements in the paper more closely. It also disallows stitching in a <code class="codecolorer text mac-classic"><span class="text">Code&lt;?&gt;</span></code> as a statement, because we can&#8217;t statically know if we have to discard the result in a statement context or not.</p>

<p>(Re-posted from <a href="http://www.javamint.org/2010/02/new-mint-release-r15116.html">The Java Mint Blog</a>.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.concurrentaffair.org/2010/02/17/new-mint-release-r15116/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&lt;clinit&gt; in The Thread of First Use</title>
		<link>http://www.concurrentaffair.org/2010/02/16/clinit-in-the-thread-of-first-use/</link>
		<comments>http://www.concurrentaffair.org/2010/02/16/clinit-in-the-thread-of-first-use/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 05:21:16 +0000</pubDate>
		<dc:creator>Mathias</dc:creator>
				<category><![CDATA[Concurrent Unit Testing]]></category>

		<guid isPermaLink="false">http://www.concurrentaffair.org/?p=1657</guid>
		<description><![CDATA[Question: In which thread does &#60;clinit&#62; run?

Answer: &#60;clinit&#62; is being executed in whatever thread uses the class first.

123456789101112131415161718192021222324252627282930313233343536package testers;

import java.awt.EventQueue;

public class CLInit &#123;
&#160; &#160; public static void main&#40;String&#91;&#93; args&#41; throws Exception &#123;
&#160; &#160; &#160; &#160; new CLInit2&#40;&#41;.doSomething&#40;&#41;;
&#160; &#160; &#160; &#160; EventQueue.invokeAndWait&#40;new Runnable&#40;&#41; &#123;
&#160; &#160; &#160; &#160; &#160; &#160; public void run&#40;&#41; &#123;
&#160; &#160; &#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.concurrentaffair.org/2010/02/16/clinitin-which-thread/">Question: In which thread does <code class="codecolorer text mac-classic"><span class="text">&lt;clinit&gt;</span></code> run?</a></p>

<p>Answer: <code class="codecolorer text mac-classic"><span class="text">&lt;clinit&gt;</span></code> is being executed in whatever thread uses the class first.</p>

<div class="codecolorer-container java default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br /></div></td><td><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">package</span> <span style="color: #006699;">testers</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.awt.EventQueue</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> CLInit <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> args<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aexception+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Exception</span></a> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">new</span> CLInit2<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">doSomething</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aeventqueue+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">EventQueue</span></a>.<span style="color: #006633;">invokeAndWait</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Arunnable+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Runnable</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> run<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">new</span> CLInit2<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">doSomething</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">new</span> CLInit3<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">doSomething</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">new</span> CLInit3<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">doSomething</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">class</span> CLInit2 <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;CLInit2.&lt;CLInit&gt;: &quot;</span><span style="color: #339933;">+</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Athread+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Thread</span></a>.<span style="color: #006633;">currentThread</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> doSomething<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;CLInit2.doSomething&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">class</span> CLInit3 <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;CLInit3.&lt;CLInit&gt;: &quot;</span><span style="color: #339933;">+</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Athread+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Thread</span></a>.<span style="color: #006633;">currentThread</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> doSomething<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;CLInit3.doSomething&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>

<p>produces the output</p>

<p><pre>$ java testers.CLInit
CLInit2.&lt;CLInit&gt;: Thread[main,5,main]
CLInit2.doSomething
CLInit2.doSomething
CLInit3.&lt;CLInit&gt;: Thread[AWT-EventQueue-0,6,main]
CLInit3.doSomething
CLInit3.doSomething</pre></p>

<p>As you can see, the class initializer for <code class="codecolorer text mac-classic"><span class="text">CLInit2</span></code> is run in the main thread, but the one for <code class="codecolorer text mac-classic"><span class="text">CLInit3</span></code> is executed in the event thread.</p>

<p>The implication of this is that class initializers may run in the event thread (or auxiliary threads) and therefore have to be considered when I compute the methods that are reachable in auxiliary threads or the event thread.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.concurrentaffair.org/2010/02/16/clinit-in-the-thread-of-first-use/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Anonymous Inner Class Surprise</title>
		<link>http://www.concurrentaffair.org/2010/02/16/anonymous-inner-class-surprise/</link>
		<comments>http://www.concurrentaffair.org/2010/02/16/anonymous-inner-class-surprise/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 19:51:46 +0000</pubDate>
		<dc:creator>Mathias</dc:creator>
				<category><![CDATA[Ramblings]]></category>

		<guid isPermaLink="false">http://www.concurrentaffair.org/?p=1652</guid>
		<description><![CDATA[I had no idea that the following code was allowed:

1234567public class AICSurprise &#123;
&#160; &#160; public static void main&#40;String&#91;&#93; args&#41; &#123;
&#160; &#160; &#160; &#160; new Object&#40;&#41; &#123;
&#160; &#160; &#160; &#160; &#160; &#160; public void foo&#40;&#41; &#123; System.out.println&#40;&#34;foo&#34;&#41;; &#125;
&#160; &#160; &#160; &#160; &#125;.foo&#40;&#41;;
&#160; &#160; &#125;
&#125;

I thought foo() could not be accessed from outside the class, because the [...]]]></description>
			<content:encoded><![CDATA[<p>I had no idea that the following code was allowed:</p>

<div class="codecolorer-container java default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br /></div></td><td><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> AICSurprise <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> args<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aobject+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Object</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> foo<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;foo&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span>.<span style="color: #006633;">foo</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>

<p>I thought <code class="codecolorer text mac-classic"><span class="text">foo()</span></code> could not be accessed from outside the class, because the class was an anonymous extension of <code class="codecolorer text mac-classic"><span class="text">Object</span></code>. That&#8217;s demonstrated here:</p>

<div class="codecolorer-container java default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br /></div></td><td><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> AICSurprise <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> args<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aobject+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Object</span></a> o <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aobject+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Object</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> foo<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;foo&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; o.<span style="color: #006633;">foo</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// error</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>

<p>Note that <code class="codecolorer text mac-classic"><span class="text">Object</span></code> is the most precise type we can give for <code class="codecolorer text mac-classic"><span class="text">o</span></code>. Somehow there are special rules for accessing an anonymous inner class directly when it is being created.</p>

<p>Did you know this? After working with Java for nearly ten years, I still didn&#8217;t.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.concurrentaffair.org/2010/02/16/anonymous-inner-class-surprise/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Code&lt;?&gt; Escaped As Statement</title>
		<link>http://www.concurrentaffair.org/2010/02/16/code-wildcardescaped-as-statement/</link>
		<comments>http://www.concurrentaffair.org/2010/02/16/code-wildcardescaped-as-statement/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 17:48:31 +0000</pubDate>
		<dc:creator>Mathias</dc:creator>
				<category><![CDATA[Mint]]></category>

		<guid isPermaLink="false">http://www.concurrentaffair.org/?p=1646</guid>
		<description><![CDATA[A few days ago, I changed the Mint compiler to allow non-void code objects to be spliced in where statement form is required:

12Code&#60;Integer&#62; x = &#60;&#124; 1 &#124;&#62;;
Code&#60;Void&#62; c = &#60;&#124; &#123; `x &#125; &#124;&#62;;

This essentially generates the code below, which allows the 1 to be discarded:

1&#60;&#124; &#123; &#123; Object temp = 1; &#125; &#125; [...]]]></description>
			<content:encoded><![CDATA[<p>A few days ago, I changed the <a href="http://www.javamint.org/">Mint</a> compiler to <a href="http://www.concurrentaffair.org/2010/02/12/new-mint-release-r15085/">allow non-void code objects to be spliced in where statement form is required</a>:</p>

<div class="codecolorer-container java default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Code<span style="color: #339933;">&lt;</span>Integer<span style="color: #339933;">&gt;</span> x <span style="color: #339933;">=</span> <span style="color: #339933;">&lt;|</span> 1 <span style="color: #339933;">|&gt;;</span><br />
Code<span style="color: #339933;">&lt;</span>Void<span style="color: #339933;">&gt;</span> c <span style="color: #339933;">=</span> <span style="color: #339933;">&lt;|</span> <span style="color: #009900;">&#123;</span> `x <span style="color: #009900;">&#125;</span> <span style="color: #339933;">|&gt;;</span></div></td></tr></tbody></table></div>

<p>This essentially generates the code below, which allows the <code class="codecolorer text mac-classic"><span class="text">1</span></code> to be discarded:</p>

<div class="codecolorer-container java default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339933;">&lt;|</span> <span style="color: #009900;">&#123;</span> <span style="color: #009900;">&#123;</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aobject+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Object</span></a> temp <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> <span style="color: #009900;">&#125;</span> <span style="color: #339933;">|&gt;;</span></div></td></tr></tbody></table></div>

<p>Eddy pointed out that there is still a problem: Since I do a static type check on the type argument of <code class="codecolorer text mac-classic"><span class="text">Code&lt;T&gt;</span></code>, the proper form cannot be determined if there is a wildcard <code class="codecolorer text mac-classic"><span class="text">Code&lt;?&gt;</span></code>. We can check at run-time whether a code object is in statement form or whether it is an expression whose result needs to be discarded, but we cannot simply write an if-statement, because one of the alternatives would always be syntactically incorrect:</p>

<div class="codecolorer-container java default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339933;">&lt;|</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>c.<span style="color: #006633;">isStat</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; `c<span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// already in statement form</span><br />
<span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aobject+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Object</span></a> temp <span style="color: #339933;">=</span> `c<span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// expression, discard result</span><br />
<span style="color: #009900;">&#125;</span> <span style="color: #009900;">&#125;</span> <span style="color: #339933;">|&gt;;</span></div></td></tr></tbody></table></div>

<p>If <code class="codecolorer text mac-classic"><span class="text">c.isStat</span></code> is true, then the else-branch is syntactically incorrect; if <code class="codecolorer text mac-classic"><span class="text">c.isStat</span></code> is false, then there is a syntax error in the then-branch. Eddy pointed out that we can handle the <code class="codecolorer text mac-classic"><span class="text">Code&lt;?&gt;</span></code> case, though, because the two branches are in future-stage code. That is, we can turn</p>

<div class="codecolorer-container java default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339933;">&lt;|</span> <span style="color: #009900;">&#123;</span> `<span style="color: #009900;">&#40;</span>c<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> <span style="color: #339933;">|&gt;</span></div></td></tr></tbody></table></div>

<p>into</p>

<div class="codecolorer-container java default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>c.<span style="color: #006633;">isStat</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #339933;">&lt;|</span> <span style="color: #009900;">&#123;</span> `<span style="color: #009900;">&#40;</span>c<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> <span style="color: #339933;">|&gt;</span><br />
<span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #339933;">&lt;|</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aobject+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Object</span></a> temp <span style="color: #339933;">=</span> `c<span style="color: #339933;">;</span> <span style="color: #339933;">|&gt;</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>

<p>Unfortunately, this gets more complicated if there is more than one <code class="codecolorer text mac-classic"><span class="text">Code&lt;?&gt;</span></code> being escaped in. We would have <img src='http://www.superscalar.org/blog/wp-content/latexrenderer/pictures/d1db0d9c696a8c056e7117dbbb4ef6db.gif' title='2^n' alt='2^n' align=absmiddle> cases, where <img src='http://www.superscalar.org/blog/wp-content/latexrenderer/pictures/7b8b965ad4bca0e41ab51de7b31363a1.gif' title='n' alt='n' align=absmiddle> is the number of <code class="codecolorer text mac-classic"><span class="text">Code&lt;?&gt;</span></code> objects being stitched in:</p>

<div class="codecolorer-container java default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339933;">&lt;|</span> <span style="color: #009900;">&#123;</span> `<span style="color: #009900;">&#40;</span>c<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> `<span style="color: #009900;">&#40;</span>d<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> <span style="color: #339933;">|&gt;</span></div></td></tr></tbody></table></div>

<p>would have to be turned into</p>

<div class="codecolorer-container java default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br /></div></td><td><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>c.<span style="color: #006633;">isStat</span> <span style="color: #339933;">&amp;&amp;</span> d.<span style="color: #006633;">isStat</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #339933;">&lt;|</span> <span style="color: #009900;">&#123;</span> `<span style="color: #009900;">&#40;</span>c<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> `<span style="color: #009900;">&#40;</span>d<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> <span style="color: #339933;">|&gt;</span><br />
<span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>c.<span style="color: #006633;">isStat</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span>d.<span style="color: #006633;">isStat</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #339933;">&lt;|</span> <span style="color: #009900;">&#123;</span> `<span style="color: #009900;">&#40;</span>c<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#123;</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aobject+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Object</span></a> temp <span style="color: #339933;">=</span> `d<span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> <span style="color: #009900;">&#125;</span> <span style="color: #339933;">|&gt;</span><br />
<span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>c.<span style="color: #006633;">isStat</span> <span style="color: #339933;">&amp;&amp;</span> d.<span style="color: #006633;">isStat</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #339933;">&lt;|</span> <span style="color: #009900;">&#123;</span> <span style="color: #009900;">&#123;</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aobject+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Object</span></a> temp <span style="color: #339933;">=</span> `c<span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> `<span style="color: #009900;">&#40;</span>d<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> <span style="color: #339933;">|&gt;</span><br />
<span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #339933;">&lt;|</span> <span style="color: #009900;">&#123;</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aobject+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Object</span></a> temp <span style="color: #339933;">=</span> `c<span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> <span style="color: #009900;">&#123;</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aobject+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Object</span></a> temp <span style="color: #339933;">=</span> `d<span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> <span style="color: #339933;">|&gt;</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>

<p>I think for now I will change the compiler so that escaping a <code class="codecolorer text mac-classic"><span class="text">Code&lt;?&gt;</span></code> in as a statement generates a compiler error. It seems like this is an unimportant corner case, and I don&#8217;t want to spend my time on something that is rarely beneficial. Again, this only happens for <code class="codecolorer text mac-classic"><span class="text">Code&lt;?&gt;</span></code>, and only when escaping into bracket with a code block where statement form is required by Java rules.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.concurrentaffair.org/2010/02/16/code-wildcardescaped-as-statement/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&lt;clinit&gt; in Which Thread?</title>
		<link>http://www.concurrentaffair.org/2010/02/16/clinit-in-which-thread/</link>
		<comments>http://www.concurrentaffair.org/2010/02/16/clinit-in-which-thread/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 06:58:11 +0000</pubDate>
		<dc:creator>Mathias</dc:creator>
				<category><![CDATA[Concurrent Unit Testing]]></category>

		<guid isPermaLink="false">http://www.concurrentaffair.org/?p=1637</guid>
		<description><![CDATA[Question: In which thread does &#60;clinit&#62; run?

Answer tomorrow.
]]></description>
			<content:encoded><![CDATA[<p>Question: In which thread does <code class="codecolorer text mac-classic"><span class="text">&lt;clinit&gt;</span></code> run?</p>

<p><a href="http://www.concurrentaffair.org/2010/02/16/clinit-in-the-thread-of-first-use/">Answer</a> tomorrow.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.concurrentaffair.org/2010/02/16/clinit-in-which-thread/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Free Java Book</title>
		<link>http://www.concurrentaffair.org/2010/02/15/the-free-java-book/</link>
		<comments>http://www.concurrentaffair.org/2010/02/15/the-free-java-book/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 18:32:05 +0000</pubDate>
		<dc:creator>Mathias</dc:creator>
				<category><![CDATA[Concurrent Unit Testing]]></category>
		<category><![CDATA[DrJava]]></category>

		<guid isPermaLink="false">http://www.concurrentaffair.org/?p=1634</guid>
		<description><![CDATA[Corky just informed me that there is a talk by Daniel L. Schuster at SIGCSE 2010 about Java, games, and the Free Java Book. I&#8217;ll definitely check out the talk and the book. I&#8217;ll also examine how concurrency is handled in the ACM Java Library.

Daniel is kind enough to state the following in his book:

Dr. [...]]]></description>
			<content:encoded><![CDATA[<p>Corky just informed me that there is a <a href="http://db.grinnell.edu/sigcse/sigcse2010/Program/viewAcceptedProposal.asp?sessionType=paper&#038;sessionNumber=180">talk</a> by <a href="http://webapps.western.edu/faculty/dschuster/index.html">Daniel L. Schuster</a> at <a href="http://www.sigcse.org/sigcse2010/">SIGCSE 2010</a> about Java, games, and <a href="http://mcis.western.edu/freejavabook/">the Free Java Book</a>. I&#8217;ll definitely check out the talk and the book. I&#8217;ll also examine how concurrency is handled in the <a href="http://www-cs-faculty.stanford.edu/~eroberts/jtf/">ACM Java Library</a>.</p>

<p>Daniel is kind enough to state the following in his book:</p>

<blockquote>Dr. Java is the preferred development environment for the Free Java Book. It is an easy to use but powerful editor and development environment. It is available via download and is free.  Free as in $0.00! It is available for Windows and Mac. </blockquote>

<p>Thanks! I added a link to the Free Java Book to the list of <a href="http://drjava.org/index-frame.shtml?usersites.shtml">DrJava user sites</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.concurrentaffair.org/2010/02/15/the-free-java-book/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Mint Release: r15085</title>
		<link>http://www.concurrentaffair.org/2010/02/12/new-mint-release-r15085/</link>
		<comments>http://www.concurrentaffair.org/2010/02/12/new-mint-release-r15085/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 15:28:12 +0000</pubDate>
		<dc:creator>Mathias</dc:creator>
				<category><![CDATA[Mint]]></category>

		<guid isPermaLink="false">http://www.concurrentaffair.org/?p=1591</guid>
		<description><![CDATA[I just created a new release of Mint and DrJava with Mint: February 12, 2010 (r15085). The release is available from the Mint implementation page:


JavaMint-r15085.tar.gz
JavaMint-r15085-binaries.zip
drjava-r5178-mint-r15085.jar


The two changes since the last release involve CSP values and escapes in bracket statements. Instead of storing CSP values in a CSP table, we now store CSP values in individual [...]]]></description>
			<content:encoded><![CDATA[<p>I just created a new release of <a href="http://www.javamint.org/">Mint</a> and <a href="http://www.cs.rice.edu/%7Emgricken/research/mint/index.shtml">DrJava with Mint</a>: February 12, 2010 (r15085). The release is available from the <a href="http://plresearch.org/do/view/ProgrammingLanguages/JavaMint">Mint implementation</a> page:</p>

<ul>
<li><a href="http://plresearch.org/twiki/pub/ProgrammingLanguages/JavaMint/JavaMint-r15085.tar.gz">JavaMint-r15085.tar.gz</a></li>
<li><a href="http://plresearch.org/twiki/pub/ProgrammingLanguages/JavaMint/JavaMint-r15085-binaries.zip">JavaMint-r15085-binaries.zip</a></li>
<li><a href="http://www.cs.rice.edu/%7Emgricken/research/mint/download/drjava-r5178-mint-r15085.jar">drjava-r5178-mint-r15085.jar</a></li>
</ul>

<p>The two changes since the last release involve CSP values and escapes in bracket statements. Instead of storing CSP values in a CSP table, we now store CSP values in individual fields. This reduces the overhead by eliminating an array lookup. The serializer benchmark benefited from this, for example.</p>

<p>We now also allow non-void escapes in bracket statements. For example, the following code is now allowed:</p>

<div class="codecolorer-container java default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Code<span style="color: #339933;">&lt;</span>Integer<span style="color: #339933;">&gt;</span> x <span style="color: #339933;">=</span> <span style="color: #339933;">&lt;|</span> 1 <span style="color: #339933;">|&gt;;</span><br />
Code<span style="color: #339933;">&lt;</span>Void<span style="color: #339933;">&gt;</span> c <span style="color: #339933;">=</span> <span style="color: #339933;">&lt;|</span> <span style="color: #009900;">&#123;</span> `x <span style="color: #009900;">&#125;</span> <span style="color: #339933;">|&gt;;</span></div></td></tr></tbody></table></div>

<p>In the past, this caused an error because <code class="codecolorer text mac-classic"><span class="text">1</span></code> was not a statement. The Mint compiler now accepts this and discards the result of the escape if it is used in statement form, but it does emit a warning.</p>

<p>(Re-posted from <a href="http://www.javamint.org/2010/02/new-mint-release-r15085.html">The Java Mint Blog</a>.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.concurrentaffair.org/2010/02/12/new-mint-release-r15085/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Mint Talk Video</title>
		<link>http://www.concurrentaffair.org/2010/02/12/mint-talk-video/</link>
		<comments>http://www.concurrentaffair.org/2010/02/12/mint-talk-video/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 06:29:15 +0000</pubDate>
		<dc:creator>Mathias</dc:creator>
				<category><![CDATA[Mint]]></category>
		<category><![CDATA[Pictures]]></category>

		<guid isPermaLink="false">http://www.concurrentaffair.org/?p=1596</guid>
		<description><![CDATA[The video recording of the Mint talk I gave on Monday is now available on vimeo:



Mint: A Multi-stage Extension of Java (Mathias Ricken) from Mathias Ricken on Vimeo.
]]></description>
			<content:encoded><![CDATA[<p>The video recording of the Mint <a href="http://www.concurrentaffair.org/2010/02/08/mint-talk-in-comp-600/">talk I gave on Monday</a> is now available on <a href="http://vimeo.com/9390149">vimeo</a>:</p>

<p><object width="400" height="300"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=9390149&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=9390149&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"></embed></object></p>

<p><a href="http://vimeo.com/9390149">Mint: A Multi-stage Extension of Java (Mathias Ricken)</a> from <a href="http://vimeo.com/mgricken">Mathias Ricken</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.concurrentaffair.org/2010/02/12/mint-talk-video/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pictures from Yesterday&#8217;s Talk</title>
		<link>http://www.concurrentaffair.org/2010/02/09/pictures-from-yesterdays-talk/</link>
		<comments>http://www.concurrentaffair.org/2010/02/09/pictures-from-yesterdays-talk/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 18:49:00 +0000</pubDate>
		<dc:creator>Mathias</dc:creator>
				<category><![CDATA[Graduate School]]></category>
		<category><![CDATA[Mint]]></category>
		<category><![CDATA[Pictures]]></category>

		<guid isPermaLink="false">http://www.concurrentaffair.org/?p=1578</guid>
		<description><![CDATA[Here are a few pictures from yesterday&#8217;s talk about Mint.

 

 

 
]]></description>
			<content:encoded><![CDATA[<p>Here are a few pictures from <a href="http://www.concurrentaffair.org/2010/02/08/presentation-mint-a-multi-stage-extension-of-java/">yesterday&#8217;s talk</a> about <a href="http://www.cs.rice.edu/~mgricken/research/mint/">Mint</a>.</p>

<p><a href="http://www.concurrentaffair.org/wp-content/uploads/2010/02/vlcsnap-49097.jpg"><img src="http://www.concurrentaffair.org/wp-content/uploads/2010/02/vlcsnap-49097-300x168.jpg" alt="Multi-stage Programming" title="Multi-stage Programming" width="300" height="168" class="aligncenter size-medium wp-image-1580" /></a> <a href="http://www.concurrentaffair.org/wp-content/uploads/2010/02/vlcsnap-50839.jpg"><img src="http://www.concurrentaffair.org/wp-content/uploads/2010/02/vlcsnap-50839-300x168.jpg" alt="MSP in Java" title="MSP in Java" width="300" height="168" class="aligncenter size-medium wp-image-1582" /></a></p>

<p><a href="http://www.concurrentaffair.org/wp-content/uploads/2010/02/vlcsnap-51065.jpg"><img src="http://www.concurrentaffair.org/wp-content/uploads/2010/02/vlcsnap-51065-300x168.jpg" alt="MSP in Java 2" title="MSP in Java 2" width="300" height="168" class="aligncenter size-medium wp-image-1581" /></a> <a href="http://www.concurrentaffair.org/wp-content/uploads/2010/02/vlcsnap-51710.jpg"><img src="http://www.concurrentaffair.org/wp-content/uploads/2010/02/vlcsnap-51710-300x168.jpg" alt="Staged power Function" title="Staged power Function" width="300" height="168" class="aligncenter size-medium wp-image-1584" /></a></p>

<p><a href="http://www.concurrentaffair.org/wp-content/uploads/2010/02/vlcsnap-49588.jpg"><img src="http://www.concurrentaffair.org/wp-content/uploads/2010/02/vlcsnap-49588-300x168.jpg" alt="Weak Separability" title="Weak Separability" width="300" height="168" class="aligncenter size-medium wp-image-1583" /></a> <a href="http://www.concurrentaffair.org/wp-content/uploads/2010/02/vlcsnap-50505.jpg"><img src="http://www.concurrentaffair.org/wp-content/uploads/2010/02/vlcsnap-50505-300x168.jpg" alt="Thank You" title="Thank You" width="300" height="168" class="aligncenter size-medium wp-image-1579" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.concurrentaffair.org/2010/02/09/pictures-from-yesterdays-talk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mint Talk in COMP 600</title>
		<link>http://www.concurrentaffair.org/2010/02/08/mint-talk-in-comp-600/</link>
		<comments>http://www.concurrentaffair.org/2010/02/08/mint-talk-in-comp-600/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 20:39:06 +0000</pubDate>
		<dc:creator>Mathias</dc:creator>
				<category><![CDATA[Graduate School]]></category>
		<category><![CDATA[Mint]]></category>

		<guid isPermaLink="false">http://www.concurrentaffair.org/?p=1549</guid>
		<description><![CDATA[I just gave the first presentation about Mint in the COMP 600 graduate seminar at Rice. The slides for &#8220;Mint: A Multi-stage Extension of Java&#8221; are available (PowerPoint, PDF, view embedded). This weekend, I was kicking myself why I had volunteered for this talk out of turn, but it was good practice, and I&#8217;m a [...]]]></description>
			<content:encoded><![CDATA[<p>I just gave the first presentation about Mint in the <a href="http://www.owlnet.rice.edu/~comp600/">COMP 600 graduate seminar</a> at Rice. The slides for <a href="http://www.concurrentaffair.org/2010/02/08/presentation-mint-a-multi-stage-extension-of-java/">&#8220;Mint: A Multi-stage Extension of Java&#8221;</a> are available (<a href="http://www.cs.rice.edu/~mgricken/research/mint/download/COMP600-Ricken-Mint-2010-02-08.ppt">PowerPoint</a>, <a href="http://www.cs.rice.edu/~mgricken/research/mint/download/COMP600-Ricken-Mint-2010-02-08.pdf">PDF</a>, <a href="http://www.cs.rice.edu/~mgricken/view-pdf.shtml?http://www.cs.rice.edu/~mgricken/research/mint/download/COMP600-Ricken-Mint-2010-02-08.ppt">view embedded</a>). This weekend, I was kicking myself why I had volunteered for this talk out of turn, but it was good practice, and I&#8217;m a philanthropist and got the other grad students pizza that way.</p>

<p>Thanks for the opportunity to speak and for the good feedback!</p>

<p>Finally, the Java Mint Blog has a new URL: <a href="http://www.javamint.org/">www.javamint.org</a>. We currently also have some problems with the <a href="http://plresearch.org/do/view/ProgrammingLanguages/JavaMint">implementation URL</a>; for now, you can use <a href="http://mint.concutest.org">http://mint.concutest.org</a> as a resource hub for <a href="http://mint.concutest.org">everything Mint-related</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.concurrentaffair.org/2010/02/08/mint-talk-in-comp-600/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Presentation: Mint: A Multi-stage Extension of Java</title>
		<link>http://www.concurrentaffair.org/2010/02/08/presentation-mint-a-multi-stage-extension-of-java/</link>
		<comments>http://www.concurrentaffair.org/2010/02/08/presentation-mint-a-multi-stage-extension-of-java/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 20:27:21 +0000</pubDate>
		<dc:creator>Mathias</dc:creator>
				<category><![CDATA[Mint]]></category>
		<category><![CDATA[Publications]]></category>

		<guid isPermaLink="false">http://www.concurrentaffair.org/?p=1546</guid>
		<description><![CDATA[Mint: A Multi-stage Extension of Java
(PowerPoint, PDF, view embedded)
Video recording available on vimeo.

Where: Rice University Computer Science Department, COMP 600 Graduate Seminar
When: February 8, 2010

Multi-stage programming (MSP) provides a safe way of generating code
at run-time. In mostly-functional languages like MetaOCaml, this has
been used to reduce the performance penalties of abstractions such as
loops, recursion or interpretation. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.cs.rice.edu/~mgricken/research/mint/download/COMP600-Ricken-Mint-2010-02-08.ppt">Mint: A Multi-stage Extension of Java</a><br />
(PowerPoint, <a href="http://www.cs.rice.edu/~mgricken/research/mint/download/COMP600-Ricken-Mint-2010-02-08.pdf">PDF</a>, <a href="http://www.cs.rice.edu/~mgricken/view-pdf.shtml?http://www.cs.rice.edu/~mgricken/research/mint/download/COMP600-Ricken-Mint-2010-02-08.ppt">view embedded</a>)<br />
<a href="http://vimeo.com/9390149">Video recording</a> available on <a href="http://vimeo.com/9390149">vimeo</a>.</p>

<p>Where: Rice University Computer Science Department, <a href="http://www.owlnet.rice.edu/~comp600/">COMP 600 Graduate Seminar</a><br />
When: February 8, 2010</p>

<p>Multi-stage programming (MSP) provides a safe way of generating code
at run-time. In mostly-functional languages like MetaOCaml, this has
been used to reduce the performance penalties of abstractions such as
loops, recursion or interpretation. The main advantage of MSP compared
to other techniques, such as string or LISP quotations, is that MSP
guarantees type safety for the generated code statically, at the time
the program is compiled.</p>

<p>Unfortunately, MSP is difficult to combine with imperative features
found in most mainstream languages like Java. The central problem is
&#8220;scope extrusion&#8221;, which may accidentally move variables outside the
scopes in which they are bound, leading to run-time errors in the
generated code. This problem can be prevented if code in escapes (or
&#8220;anti-quotes&#8221;) is &#8220;weakly separable&#8221;, i.e. the computational effects
occurring inside an escape that are visible from the outside do not
involve code.</p>

<p>We have formalized a type system, based on Lightweight Java, that uses
weak separability to prevent scope extrusion, and we have proved that
the type system is sound. We have also developed an implementation
called Mint to demonstrate the expressivity of the type system and the
performance benefits MSP can provide in an imperative setting. Since
our implementation extends the Java language, our work is accessible
to mainstream programmers.</p>

<p>This talk is based on work done in collaboration with Edwin Westbrook,
Jun Inoue, Yilong Yao, Tamer Abdelatif, and Walid Taha. A paper titled
&#8220;Mint: Java Multi-stage Programming Using Weak Separability&#8221; has been
accepted for publication in the Proceedings of the 2010 ACM SIGPLAN
Conference on Programming Language Design and Implementation (<a href="http://www.cs.stanford.edu/pldi10/">PLDI
2010</a>).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.concurrentaffair.org/2010/02/08/presentation-mint-a-multi-stage-extension-of-java/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Paper: Mint: Java Multi-stage Programming Using Weak Separability</title>
		<link>http://www.concurrentaffair.org/2010/01/31/paper-mint-java-multi-stage-programming-using-weak-separability/</link>
		<comments>http://www.concurrentaffair.org/2010/01/31/paper-mint-java-multi-stage-programming-using-weak-separability/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 01:21:58 +0000</pubDate>
		<dc:creator>Mathias</dc:creator>
				<category><![CDATA[Mint]]></category>
		<category><![CDATA[Publications]]></category>

		<guid isPermaLink="false">http://www.concurrentaffair.org/?p=1523</guid>
		<description><![CDATA[Mint: Java Multi-stage Programming Using Weak Separability

2010 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2010)

Multi-stage programming (MSP) provides a disciplined approach
to run-time code generation. In the purely functional setting, it
has been shown how MSP can be used to reduce the overhead
of abstractions, allowing clean, maintainable code without paying
performance penalties. Unfortunately, MSP is [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.cs.rice.edu/~mgricken/research/mint/download/pldi2010-mint.pdf">Mint: Java Multi-stage Programming Using Weak Separability</a></p>

<p>2010 ACM SIGPLAN Conference on Programming Language Design and Implementation (<a href="http://www.cs.stanford.edu/pldi10/pldi2010_home.html">PLDI 2010</a>)</p>

<p>Multi-stage programming (MSP) provides a disciplined approach
to run-time code generation. In the purely functional setting, it
has been shown how MSP can be used to reduce the overhead
of abstractions, allowing clean, maintainable code without paying
performance penalties. Unfortunately, MSP is difﬁcult to combine
with imperative features, which are prevalent in mainstream
languages. The central difﬁculty is scope extrusion, wherein free
variables can inadvertently be moved outside the scopes of their
binders. This paper proposes a new approach to combining MSP
with imperative features that occupies a &#8220;sweet spot&#8221; in the design
space in terms of how well useful MSP applications can be expressed and how easy it is for programmers to understand. The key
insight is that escapes (or &#8220;anti-quotes&#8221;) must be <em>weakly separable</em>
from the rest of the code, i.e. the computational effects occurring
inside an escape that are visible outside the escape are guaranteed
to not contain code. To demonstrate the feasibility of this approach,
we formalize a type system based on Lightweight Java which we
prove sound, and we also provide an implementation, called Mint,
to validate both the expressivity of the system and the performance
gains attainable by using MSP in this setting.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.concurrentaffair.org/2010/01/31/paper-mint-java-multi-stage-programming-using-weak-separability/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java Bug 4396719 Work-Around?</title>
		<link>http://www.concurrentaffair.org/2010/01/31/java-bug-4396719-work-around/</link>
		<comments>http://www.concurrentaffair.org/2010/01/31/java-bug-4396719-work-around/#comments</comments>
		<pubDate>Sun, 31 Jan 2010 17:00:54 +0000</pubDate>
		<dc:creator>Mathias</dc:creator>
				<category><![CDATA[Concurrent Unit Testing]]></category>
		<category><![CDATA[DrJava]]></category>

		<guid isPermaLink="false">http://www.concurrentaffair.org/?p=1517</guid>
		<description><![CDATA[It seems like I can get around the garbage collector bug if I use -XX:+UseConcMarkSweepGC JVM argument.

Now I&#8217;m having more Soot problems, but they actually make sense. In addition to being cross-platform, DrJava is also &#8220;cross-JDK version&#8221;: We support JDK versions 5 and 6 and OpenJDK version 6. In the past, we also supported JDK [...]]]></description>
			<content:encoded><![CDATA[<p>It seems like I can get around the <a href="http://www.concurrentaffair.org/2010/01/29/java-bug-4396719-mark-sweep-stack-overflow-on-deeply-nested-object-arrays/">garbage collector bug</a> if I use <tt>-XX:+UseConcMarkSweepGC</tt> JVM argument.</p>

<p>Now I&#8217;m having more Soot problems, but they actually make sense. In addition to being cross-platform, DrJava is also &#8220;cross-JDK version&#8221;: We support JDK versions 5 and 6 and OpenJDK version 6. In the past, we also supported JDK version 4 and various versions of <a href="http://jcp.org/en/jsr/detail?id=14">JSR-14</a> (adding generics to Java 4).</p>

<p>The adapter to the JDK 5 compiler is compiled with and linked against JDK 5; the adapter to the JDK 6 compiler is compiled with and linked against JDK 6. At runtime, we will never use a JDK 5 adapter with a JDK 6 compiler, and vice versa. But when I&#8217;m generating the call graph with JDK 6, Soot is now also looking at the JDK 5 adapter.</p>

<p>The JDK 5 <code class="codecolorer text mac-classic"><span class="text">com.sun.tools.javac.util.Log</span></code> class had a <code class="codecolorer text mac-classic"><span class="text">String getText(String a, Object[] b)</span></code> method, but that has disappeared in JDK 6. Therefore, Soot is not finding a method it expects.</p>

<p>I guess I will have to remove the cross-version capability for the purpose of the call graph creation.</p>

<p><b>Update</b></p>

<p>On Windows and Mac, using <tt>-XX:+UseConcMarkSweepGC</tt> actually seems to help. On Linux, I&#8217;m still getting a segfault.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.concurrentaffair.org/2010/01/31/java-bug-4396719-work-around/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
