groovy

謹賀新年(Groovy version)

def data = "明けましておめでとうございます本年もよろしくです".reverse() def script = "class 謹賀新年 extends RuntimeException{}\n"; for (int i = 0; i < data.length() -1; i ++) { script += "def ${data.charAt(i)}${'_'.multiply(i)}(){${data.c…

1.6.0がリリースされているけど。。。

>groovysh Groovy Shell (1.6.0, JVM: 1.6.0_06) Type 'help' or '\h' for help. ---------------------------------------------------- groovy:000> println "hoge" hoge ===> null groovy:000> exit >groovysh --terminal=none Groovy Shell (1.6.0, JVM:…

groovy 1.6-beta-2 は入れちゃだめ

Groovy scripts can't access the 'args' property anymore to get the arguments from the command line http://jira.codehaus.org/browse/GROOVY-3084なんでこんなことがおきるのだろう。不思議だ。 --terminal=noneも挙動が変わっている >groovysh --term…

Groovy in Actionの翻訳本がやっとでたようだ

Groovyイン・アクション作者: Dierk Konig,Andrew Glover,Paul King,Guillaume Laforge,Jon Skeet,杉浦孝,櫻井正樹,須江信洋,関谷和愛,佐野徹郎,寺沢尚史出版社/メーカー: 毎日コミュニケーションズ発売日: 2008/09/27メディア: 単行本(ソフトカバー)購入:…

groovyshがやっとつかえるようになった。

http://groovy.codehaus.org/Groovy+Shell#GroovyShell-Troubleshooting groovysh --terminal=none そんなわなが。なぜこれがdefaultじゃないんだ。。

Closureからある条件で抜けたい

Closureからreturnできない。 groovy:000> [1,2,3].each { println it; if (it >= 2) { return } } 1 2 3 ===> [1, 2, 3]戻すことができない。 まだ未サポート。 groovy:000> try { [1,2,3].each { println it ; if (it >= 2) { throw new RuntimeException(…

groovy 1.5.6 released

http://groovy.codehaus.org/Download http://jira.codehaus.org/browse/GROOVY?report=com.atlassian.jira.plugin.system.project:changelog-panel 1.5.5からコンパイルが早くなった。これはバグフィックスのみ。

eclipse groovy plugin 1.5.1.xxxx をいれてみた

http://groovy.codehaus.org/Eclipse+Plugin http://dist.codehaus.org/groovy/distributions/update/ Javaプロジェクトを作成 projectのtopでAdd Groovy Nature projectを右クリックでJava Build Path の output を bin から bin-groovy に変更するか、groo…

Groovy 1.5.2 bug fix release

http://docs.codehaus.org/display/GROOVY/2008/01/29/Groovy+1.5.2+bug+fix+release http://groovy.codehaus.org/Download http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=10242&styleName=Html&version=13939

groovy 1.5 released

What's New in Groovy 1.5 http://www.infoq.com/articles/groovy-1.5-new1.1じゃなくてJava5にあわせたようだ。 1.4でもうごくけど1.5でしかうごかない機能があるので1.5で動かすのが無難だ。 自分は1.6で動かしている。http://www.infoq.com/articles/groo…

groovy 1.1 rc3 released

http://groovy.codehaus.org/Downloadhttp://groovy.codehaus.org/Roadmap によるとバグフィックスのみで最後のRC。1.1 final は12月初旬か。いま困っているのはいるのは groovyshのカーソル移動(左右)の動作が遅くてつかいづらい。 jline-0.9.91.jarからjli…

書籍

http://groups.google.co.jp/group/grails-ja によると オリジナルのgrails本 http://docs.google.com/View?docid=ddkpdqnk_3d22c22 Groovy in Actionの翻訳本 を計画しているようだ。すでにスクリプティング with Java作者: 沖林正紀出版社/メーカー: 技術…

Skype API for Java をつかってメッセージを投げる

会社でビルドエラーをすぐに気づくためにSkypeになげることになった。 Java版をつくってもらったが、もっとシンプルなやつをGroovyでつくってみた。http://skype.sourceforge.jp/ から skype_1.0.zip をダウンロードしてきて releaseフォルダのskype.jar, sw…

1.1-bate-3 release

http://dist.codehaus.org/groovy/distributions/ http://docs.codehaus.org/display/GROOVY/2007/09/20/ http://jira.codehaus.org/secure/IssueNavigator.jspa?reset=true&pid=10242&fixfor=13590なんか起動が早くなったな。we even got a 100% improvemen…

1.1-beta-2 released

http://dist.codehaus.org/groovy/distributions/ http://docs.codehaus.org/display/GROOVY/2007/07/05Java 5 の Genericがサポートされた。 classic forがサポート。 groovy> for (i = 0; i < 3; i ++) { println i } 1 2 3

groovy 1.1-beta-1 がリリースされてた

まったく気がつかなかった。 JavaOneにあわせてだすのかとおもっていたので。 http://dist.codehaus.org/groovy/distributions/ http://docs.codehaus.org/display/GROOVY/2007/04/30/Groovy+1.1-beta-1+with+annotation+support Java 5 の Annotation がサ…

マッチ

('xy' =~ /(.)(.)/).each { all, x, y -> assert all == 'xy' assert x == 'x' assert y == 'y' } がーん。しらなかった。いままで if ((m = ("xy" =~ /(.)(.)/))) { // mを()でかこまんとエラーになる m = m[0] assert m[0] == 'xy' assert m[1] == 'x' ass…

ciがantになってる。。。

maven2にいくのかとおもっていたがantになっていた。 pom.xmlが削除されている。

ついにgroovyにもsprintfが

+ + /** + * Sprintf to a string. Only works with JDK1.5 or later. + */ + public static String sprintf(Object self, String format, Object[] values) { + ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); + PrintStream out = ne…

久しぶりにGroovy

JDK1.6.0にしたら動かないスクリプトが。。。orz. Index: DefaultGroovyMethods.java =================================================================== --- DefaultGroovyMethods.java (revision 5014) +++ DefaultGroovyMethods.java (working copy) …

Groovy 1.0 Released!!!

ついに 1.0 Release. http://docs.codehaus.org/display/GROOVY/2007/01/02/Groovy+1.0+is+there http://dist.codehaus.org/groovy/distributions/ あとでパッチ送りそこねたやつが直っているかみないと。。。

おお日本人でGrailsを追っている人がいる

http://docs.codehaus.org/display/GRAILS/Japanese+Home (翻訳) http://groups-beta.google.com/group/grails-ja (Grailsのコミュニティ) http://xmldo.blogspot.com/ (Grailsに詳しい) http://laszlo.jp/modules/bwiki/index.php?TIPS%2FServerSideTechnol…

1.0 RC2 Released

http://docs.codehaus.org/display/GROOVY/2006/12/23 http://dist.codehaus.org/groovy/distributions/ 単純なクリスマスリリースか?いちおう a bug-fix release とはいっているが。。。

groovy 1.0 RC1 リリース

http://docs.codehaus.org/display/GROOVY/2006/12/04 http://dist.codehaus.org/groovy/distributions/ http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=10242&styleName=Html&version=12104内容をおっている暇はまったくないが。。。

GroovyEclipse

http://dist.codehaus.org/groovy/distributions/update/ 本家からダウンロードできるテストクラスの実行もサポートされている。 でもコード補完はもちろんない。。。

GroovyもついにSubversionに

svn co svn://svn.groovy.codehaus.org/groovy/trunk groovy-svnおお!! svn プロトコルだ。

ファイルの依存関係をきちんと見てくれるようになった

バージョンアップに対応していて気がついた。 >groovy -version Groovy Version: 1.0-JSR-06 JVM: 1.5.0_07-b03 >dir /B A.groovy B.groovy >type A.groovy class A { public A() { println "Hello A"; } } >type B.groovy new A(); >groovy B.groovy Hello …

groovy 1.0-JSR6 released

一時はcodehausがDISK障害でどうなることかと思ったがきちんとリリースされた 一応今回がRCの前の最後だといっているが本当か? http://docs.codehaus.org/display/GROOVY/2006/02/13/Groovy+JSR-05+released http://dist.codehaus.org/groovy/distributions…

Grailsのドメインができた

http://grails.org/

Guillaume Laforge Interview

Groovy bridges the scripting and the enterprise Java worlds http://www.indicthreads.com/interviews/429/groovy_grails_scripting_enterprise_java.html