X10

こんなCall for Paperが流れていて,X10という言語を知りました.

6月のPLDI2011(San Jose)の併設ワークショップとして,
プログラミング言語X10 に関する「X10 Workshop」が開かれます.
論文投稿締切は2/7です.投稿および参加をご検討いただけますと幸いです.

                                                                                                                                                  • -

The ACM SIGPLAN 2011 X10 Workshop (X10'11)
co-located with PLDI'11

San Jose Convention Center
San Jose, California
Saturday, June 4, 2011

http://www.x10-lang.org/workshop

The concurrency and scale-out era is upon us. Application programmers
need to confront the architectural challenge of multiples cores and
accelerators, clusters and supercomputers. A central need is the
development of a usable programming model that can address these
challenges -- deal with thousands of cores and peta-bytes of data.


The open-source X10 programming language (http://x10-lang.org) is
designed to address these twin challenges of productivity and
performance. It is organized around four basic principles of
asynchrony, locality, atomicity and order, developed on a type-safe,
class-based, object-oriented foundation. This foundation is robust
enough to support fine-grained concurrency, Cilk-style fork-join
programming, GPU programming, SPMD computations, phased computations,
active messaging, MPI-style communicators, cluster programming. X10
implementations are available on Power and x86 clusters, on Linux,
AIX, MacOS, Cygwin and Windows.

The X10 Workshop is intended as a forum for X10 programmers,
developers, researchers and educators. The program may include
presentation of invited and selected papers, panels and a late evening
X10 hackathon with programming challenges and prizes.

Original papers are invited on all aspects of X10, including theory,
design, implementation, practice, curriculum development and
experience, applications and tools. Accepted authors will have the
option of having their paper in the proceedings that will be published by
the ACM.

X10 (プログラミング言語) - Wikipedia

あいにく,手元のマシンでインストールしてみようと思ったら,

     [exec] Unrecognized platform: 'FreeBSD,i386,i386'

って言われてビルドが止まってしまいました.

Hello, Worldのサンプルを見る限り,やはりJavaにそっくりです.

public class HelloWorld {
    public static def main(Array[String]): Void {
    	Console.OUT.println("Hello World");
    }
}

なおかつ,次のような並行処理が簡単に書けるそうで.

public class AsyncWithRaces {

	public static def main(Array[String]) {
		async Console.OUT.println("Hello, World");
		async Console.OUT.println("Bore Da, Byd");
		async Console.OUT.println("Bonjour, Monde");
	}
}
// prints 
// HBeolnljoo,u rW,o rMlodn
// Bore Da, Byd
// de

一つの処理の塊の中は他と並行じゃなくてまとまって扱いたい時は,次のように書けば良いらしいです.

public class AsyncWithRacesControlledByAtomicBlocks {

	public static def main(Array[String]) {
		async atomic Console.OUT.println("Hello, World");
		async atomic Console.OUT.println("Bore Da, Byd");
		async atomic Console.OUT.println("Bonjour, Monde");
	}
}
// prints 
// Hello, World
// Bore Da, Byd
// Bonjour, Monde

Javaはマルチスレッドは得意だけど何かとメンドクサイと思っていたので,こいつはイケてる感じがします.
並行処理が得意ってことは,当然のようにMapReduceもサポートされています.